public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH eutils] Die if epunt_cxx is called unnecessarily.
@ 2013-01-30 21:36 Michał Górny
  2013-01-30 23:57 ` [gentoo-dev] " Ryan Hill
  0 siblings, 1 reply; 4+ messages in thread
From: Michał Górny @ 2013-01-30 21:36 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

Currently, epunt_cxx always succeeds. This results in some
of the ebuilds keeping its use even though the C++ checks were removed
upstream.

Therefore, I'm suggesting to add a simple check to the function -- if
none of the patching attempts succeed, die requesting the user to remove
the invocation.
---
 gx86/eclass/eutils.eclass | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gx86/eclass/eutils.eclass b/gx86/eclass/eutils.eclass
index 6588792..9d77389 100644
--- a/gx86/eclass/eutils.eclass
+++ b/gx86/eclass/eutils.eclass
@@ -1269,10 +1269,14 @@ epunt_cxx() {
 	local dir=$1
 	[[ -z ${dir} ]] && dir=${S}
 	ebegin "Removing useless C++ checks"
-	local f
+	local f any_found
 	find "${dir}" -name configure | while read f ; do
-		patch --no-backup-if-mismatch -p0 "${f}" "${PORTDIR}/eclass/ELT-patches/nocxx/nocxx.patch" > /dev/null
+		patch --no-backup-if-mismatch -p0 "${f}" \
+			"${PORTDIR}/eclass/ELT-patches/nocxx/nocxx.patch" > /dev/null \
+			&& any_found=1
 	done
+
+	[[ -n ${any_found} ]] || die "No C++ checks to punt."
 	eend 0
 }
 
-- 
1.8.1.2



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [gentoo-dev] Re: [PATCH eutils] Die if epunt_cxx is called unnecessarily.
  2013-01-30 23:57 ` [gentoo-dev] " Ryan Hill
@ 2013-01-30 23:53   ` Michał Górny
  2013-01-31  0:17     ` Ryan Hill
  0 siblings, 1 reply; 4+ messages in thread
From: Michał Górny @ 2013-01-30 23:53 UTC (permalink / raw
  To: gentoo-dev; +Cc: dirtyepic

[-- Attachment #1: Type: text/plain, Size: 609 bytes --]

On Wed, 30 Jan 2013 17:57:20 -0600
Ryan Hill <dirtyepic@gentoo.org> wrote:

> On Wed, 30 Jan 2013 22:36:53 +0100
> Michał Górny <mgorny@gentoo.org> wrote:
> 
> > Currently, epunt_cxx always succeeds. This results in some
> > of the ebuilds keeping its use even though the C++ checks were removed
> > upstream.
> > 
> > Therefore, I'm suggesting to add a simple check to the function -- if
> > none of the patching attempts succeed, die requesting the user to remove
> > the invocation.
> 
> eqawarn?

Yes, eqawarn if we don't want users to be hurt :P.

-- 
Best regards,
Michał Górny

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 316 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [gentoo-dev] Re: [PATCH eutils] Die if epunt_cxx is called unnecessarily.
  2013-01-30 21:36 [gentoo-dev] [PATCH eutils] Die if epunt_cxx is called unnecessarily Michał Górny
@ 2013-01-30 23:57 ` Ryan Hill
  2013-01-30 23:53   ` Michał Górny
  0 siblings, 1 reply; 4+ messages in thread
From: Ryan Hill @ 2013-01-30 23:57 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 596 bytes --]

On Wed, 30 Jan 2013 22:36:53 +0100
Michał Górny <mgorny@gentoo.org> wrote:

> Currently, epunt_cxx always succeeds. This results in some
> of the ebuilds keeping its use even though the C++ checks were removed
> upstream.
> 
> Therefore, I'm suggesting to add a simple check to the function -- if
> none of the patching attempts succeed, die requesting the user to remove
> the invocation.

eqawarn?


-- 
gcc-porting
toolchain, wxwidgets            learn a language baby, it's that kind of place
@ gentoo.org                   where low card is hunger and high card is taste

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [gentoo-dev] Re: [PATCH eutils] Die if epunt_cxx is called unnecessarily.
  2013-01-30 23:53   ` Michał Górny
@ 2013-01-31  0:17     ` Ryan Hill
  0 siblings, 0 replies; 4+ messages in thread
From: Ryan Hill @ 2013-01-31  0:17 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 984 bytes --]

On Thu, 31 Jan 2013 00:53:06 +0100
Michał Górny <mgorny@gentoo.org> wrote:

> On Wed, 30 Jan 2013 17:57:20 -0600
> Ryan Hill <dirtyepic@gentoo.org> wrote:

> > On Wed, 30 Jan 2013 22:36:53 +0100
> > Michał Górny <mgorny@gentoo.org> wrote:

> > > Currently, epunt_cxx always succeeds. This results in some
> > > of the ebuilds keeping its use even though the C++ checks were removed
> > > upstream.
> > > 
> > > Therefore, I'm suggesting to add a simple check to the function -- if
> > > none of the patching attempts succeed, die requesting the user to remove
> > > the invocation.
> > 
> > eqawarn?
> 
> Yes, eqawarn if we don't want users to be hurt :P.

I think it would be overkill to make what is essentially a no-op into a fatal
error.  A warning would be appropriate.


-- 
gcc-porting
toolchain, wxwidgets            learn a language baby, it's that kind of place
@ gentoo.org                   where low card is hunger and high card is taste

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-01-31  0:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-30 21:36 [gentoo-dev] [PATCH eutils] Die if epunt_cxx is called unnecessarily Michał Górny
2013-01-30 23:57 ` [gentoo-dev] " Ryan Hill
2013-01-30 23:53   ` Michał Górny
2013-01-31  0:17     ` Ryan Hill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox