Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 44712 - dev-lang/gpc ebuilds assign to read-only variables.
Summary: dev-lang/gpc ebuilds assign to read-only variables.
Status: RESOLVED DUPLICATE of bug 48377
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: George Shapovalov (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on: 44503 44504 44505 44506 44507
Blocks:
  Show dependency tree
 
Reported: 2004-03-14 16:46 UTC by Mr. Bones. (RETIRED)
Modified: 2005-07-17 13:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
list of ebuilds that assign to portage's read-only variables (readonly,9.15 KB, text/plain)
2004-03-14 16:47 UTC, Mr. Bones. (RETIRED)
Details
updated list (readonly,6.26 KB, text/plain)
2004-03-14 19:41 UTC, Mr. Bones. (RETIRED)
Details
updated list (readonly,4.35 KB, text/plain)
2004-03-15 22:54 UTC, Mr. Bones. (RETIRED)
Details
again with the updated list. (readonly,3.34 KB, text/plain)
2004-03-16 23:53 UTC, Mr. Bones. (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mr. Bones. (RETIRED) gentoo-dev 2004-03-14 16:46:52 UTC
Here's a list of ebuilds that assign to portage's read-only variables.
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2004-03-14 16:47:25 UTC
Created attachment 27383 [details]
list of ebuilds that assign to portage's read-only variables
Comment 2 Seemant Kulleen (RETIRED) gentoo-dev 2004-03-14 17:14:50 UTC
first set of CC's -- teams can you fix up your respective ebuilds and then remove yourselves from cc list
Comment 3 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-03-14 17:29:04 UTC
Fixed - app-emacs/elib and app-emacs/proofgeneral.
Comment 4 Spider (RETIRED) gentoo-dev 2004-03-14 17:34:48 UTC
gnome-base/gconf fixed
Comment 5 Spider (RETIRED) gentoo-dev 2004-03-14 17:35:14 UTC
adding myself to CC due to QA
Comment 6 Seemant Kulleen (RETIRED) gentoo-dev 2004-03-14 17:37:20 UTC
udftools fixed
Comment 7 Seemant Kulleen (RETIRED) gentoo-dev 2004-03-14 17:54:37 UTC
adding mobile for pcmcia-cs
Comment 8 Seemant Kulleen (RETIRED) gentoo-dev 2004-03-14 17:56:02 UTC
added lu_Zero for bochs and lolo for dinero
Comment 9 Seemant Kulleen (RETIRED) gentoo-dev 2004-03-14 17:57:59 UTC
matsuu, please don't use dosed in src_compile for nbench
Comment 10 Seemant Kulleen (RETIRED) gentoo-dev 2004-03-14 18:00:49 UTC
gtk-systrace fixed
Comment 11 Seemant Kulleen (RETIRED) gentoo-dev 2004-03-14 18:01:41 UTC
added zul for net-irc stuff
Comment 12 Seemant Kulleen (RETIRED) gentoo-dev 2004-03-14 18:06:13 UTC
bochs is fixed
Comment 13 Brad Cowan (RETIRED) gentoo-dev 2004-03-14 18:13:50 UTC
ratpoison fixed
Comment 14 Seemant Kulleen (RETIRED) gentoo-dev 2004-03-14 18:21:15 UTC
wow the three avr- things were DISGUSTING.  Absolute rubbish.  Whoever did those, needs to go back and learn how to create ebuilds.  Whoever checked them in could use a lesson in ebuilding as well. /me goes to take a shower now.

avr-binutils, avr-gcc and avr-libc are fixed, HOWEVER, I am NOT convinced ONE BIT that they are even necessary to have in portage at all.
Comment 15 George Shapovalov (RETIRED) gentoo-dev 2004-03-14 18:32:19 UTC
Ok, sometimes this is the easiest on the only "reasonable" way to go, given certain precautions are taken, as some packages have interesting ideas on how to use variables before they define them (for example :)).

dev-lang/gpc:
its a construct of the form:
    SAVEP="${P}"
    unset P
    
    econf ...
    ...

    P="${SAVEP}"

All thew wrapping is done inside single function, so P is preserved as far as portage is concerned.

Same story for sys-cluster/mpich...
And these seem to be the only two that I could relate to myself.
Removing myself from CC as seemant requested, but if I missed something please readd..

George
Comment 16 Jeremy Huddleston (RETIRED) gentoo-dev 2004-03-14 18:50:34 UTC
media-{sound,libs} packages cleaned up
Comment 17 Peter Johanson (RETIRED) gentoo-dev 2004-03-14 19:00:42 UTC
pcmcia-cs-{tools,drivers} fixed.
Comment 18 Seemant Kulleen (RETIRED) gentoo-dev 2004-03-14 19:01:33 UTC
george, I think MY_P is a better way to go, than to redefine P

all ebuild docs explicitly state that P and other such portage variables are not to be redefined.  can you fix please?
Comment 19 solar (RETIRED) gentoo-dev 2004-03-14 19:07:38 UTC
Removing the hardened herd.. hardened-gcc is maintained by pappy@gentoo 
( adding to CC: )
Add hardened back if I missed something on that list and it belongs to us.
Comment 20 Mr. Bones. (RETIRED) gentoo-dev 2004-03-14 19:41:37 UTC
Created attachment 27387 [details]
updated list
Comment 21 MATSUU Takuto (RETIRED) gentoo-dev 2004-03-14 20:01:17 UTC
nbench fixed.
Comment 22 Seemant Kulleen (RETIRED) gentoo-dev 2004-03-14 20:11:17 UTC
just fixed ical
Comment 23 Seemant Kulleen (RETIRED) gentoo-dev 2004-03-14 20:13:17 UTC
for the baselayout one, we'll need Nick's input, because the assignment was done to make baselayout packageable as a tbz2
Comment 24 Seemant Kulleen (RETIRED) gentoo-dev 2004-03-14 20:14:39 UTC
Adding pvdabeel so that he can fix dev-libs/dv* and also add metadata.xml files
Comment 25 Seemant Kulleen (RETIRED) gentoo-dev 2004-03-14 20:15:37 UTC
adding emacs herd back, for dev-util/cscope
Comment 26 Seemant Kulleen (RETIRED) gentoo-dev 2004-03-14 20:18:07 UTC
avenj and zul for some of the net-irc stuff
Comment 27 Jon Portnoy (RETIRED) gentoo-dev 2004-03-14 20:32:09 UTC
Fixed ninja.
Comment 28 Mr. Bones. (RETIRED) gentoo-dev 2004-03-15 01:59:22 UTC
I fixed net-print/poster
Comment 29 Mr. Bones. (RETIRED) gentoo-dev 2004-03-15 02:05:57 UTC
added jhhudso@gentoo.org for net-misc/aria
Comment 30 Chuck Short (RETIRED) gentoo-dev 2004-03-15 04:03:43 UTC
oer-mysql is fixed.
Comment 31 Mr. Bones. (RETIRED) gentoo-dev 2004-03-15 14:24:10 UTC
fixed dev-util/xmingw*
Comment 32 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-03-15 22:39:48 UTC
dev-util/cscope is fixed.
Comment 33 Mr. Bones. (RETIRED) gentoo-dev 2004-03-15 22:54:49 UTC
Created attachment 27436 [details]
updated list
Comment 34 Mr. Bones. (RETIRED) gentoo-dev 2004-03-15 22:56:38 UTC
rphillips@gentoo.org for bashburn
Comment 35 Seemant Kulleen (RETIRED) gentoo-dev 2004-03-15 23:09:32 UTC
fixed jmeter and realplayer
Comment 36 Spider (RETIRED) gentoo-dev 2004-03-15 23:37:37 UTC
I think realplayer should just be removed from the tree as things stand
Comment 37 Mr. Bones. (RETIRED) gentoo-dev 2004-03-15 23:43:46 UTC
sed -i \
     -e 's/\$(P)//' `find . -type f | xargs grep -l '\$(P)'` \
         || die "sed failed"

should fix mpich
Comment 38 Mr. Bones. (RETIRED) gentoo-dev 2004-03-16 00:02:19 UTC
fixed dev-db/dbbalancer
Comment 39 Aron Griffis (RETIRED) gentoo-dev 2004-03-16 12:00:41 UTC
Regarding comment 37, please use something more safe, such as

grep -frlZ '$(P)' | xargs -0 sed -i -e 's/\$(P)//'

This avoids issues such as spaces/quotes in filenames and argv limitations.
Comment 40 Aron Griffis (RETIRED) gentoo-dev 2004-03-16 12:03:52 UTC
Rather grep -FrlZ '$(P)' . | xargs -0 sed -i -e 's/\$(P)//'
Comment 41 Chris Aniszczyk (RETIRED) gentoo-dev 2004-03-16 21:33:26 UTC
dev-java/* taken care of
Comment 42 Mr. Bones. (RETIRED) gentoo-dev 2004-03-16 23:53:16 UTC
Created attachment 27508 [details]
again with the updated list.
Comment 43 Seemant Kulleen (RETIRED) gentoo-dev 2004-03-16 23:56:11 UTC
qiv fixed
Comment 44 Seemant Kulleen (RETIRED) gentoo-dev 2004-03-17 00:08:21 UTC
aria fix0red
Comment 45 Seemant Kulleen (RETIRED) gentoo-dev 2004-03-17 00:13:02 UTC
bashburn fixed
Comment 46 Seemant Kulleen (RETIRED) gentoo-dev 2004-03-17 00:57:13 UTC
subversion fixed
Comment 47 Seemant Kulleen (RETIRED) gentoo-dev 2004-03-17 01:06:36 UTC
dev-libs/dv* taken care of
Comment 48 Seemant Kulleen (RETIRED) gentoo-dev 2004-03-17 01:16:52 UTC
fixed baselayout, please don't kill me Az
Comment 49 Mr. Bones. (RETIRED) gentoo-dev 2004-03-17 01:30:55 UTC
Fixed mpich.  thanks to spyderous for the moral support and agriffis for the
grep | sed fix.
Comment 50 Seemant Kulleen (RETIRED) gentoo-dev 2004-03-17 01:37:08 UTC
fixed hardened-gcc
Comment 51 Mr. Bones. (RETIRED) gentoo-dev 2004-03-17 01:49:20 UTC
narrowing the cc list now that most are fixed.
Comment 52 Mr. Bones. (RETIRED) gentoo-dev 2004-03-17 01:50:33 UTC
added george for gpc
Comment 53 Mr. Bones. (RETIRED) gentoo-dev 2004-03-17 01:59:20 UTC
Here are the remaining ebuilds:

dev-java/blackdown-jre/blackdown-jre-1.4.2_rc1.ebuild: Readonly variable assignment to A on line 24
dev-java/blackdown-jre/blackdown-jre-1.4.2_rc1.ebuild: Readonly variable assignment to A on line 27
dev-java/blackdown-jre/blackdown-jre-1.4.2_rc1.ebuild: Readonly variable assignment to A on line 30
dev-java/blackdown-jre/blackdown-jre-1.4.2_rc1.ebuild: Readonly variable assignment to A on line 33
dev-lang/gpc/gpc-2.1.ebuild: Readonly variable assignment to P on line 26
dev-lang/gpc/gpc-20030209.ebuild: Readonly variable assignment to P on line 99
Comment 54 George Shapovalov (RETIRED) gentoo-dev 2004-03-17 02:59:49 UTC
>george, I think MY_P is a better way to go, than to redefine P
Seemant: its not that I need to use the modified $P somewhere, its that the *existance* of P at that very point breaks package build scripts (they use it internally).
If you've read my comment, you see that I am just cleanly wrapping $P around few configure/make calls (saving and unsetting P before and restoring P later), all *within the same function*, so that portage *does not even see that I do it*. And yea, I did it this way on purpose, exactly to avoid breakage we are worried about in this bug (otherwise I would have to do heavy patching on Makefiles, etc.)...

Mr. Bones:
see my comment #15. I took care of that when I was modifying these ebuilds in the first place (so it never was an issue). That's the same situation for both dev-lang/gpc and sys-cluster/mpich.

George
Comment 55 Mr. Bones. (RETIRED) gentoo-dev 2004-03-17 04:56:43 UTC
I read your comment from before, but I disagree that wrapping the build process
in the unset P code is the way to go.  I fixed sys-cluster/mpich and I
belive gpc should be patched as well to not use P or to use it correctly
in the build process.
Comment 56 George Shapovalov (RETIRED) gentoo-dev 2004-03-17 14:12:19 UTC
Well, I agree that, given the way portage deals with env vars this would be the better way to go. (although I keep my position, that it would be better if portage would have done pre-expansion of its own env vars before passing ebuilds to bash. That seems a more "correct" way to go, than polluting local environmant. (Vars defined in the ebuild are Ok either way) But this is the way it is now, so we have to deal with it.)

Although in the case of gpc the "fix" will not be right away since
1. strictly speaking the ebuild is not broken
2. it is a low priority one and I have a more urgent issues on my hands right now (and the fix does not seem to be trivial).
But its on my TODO list, so I'll get to it eventually..

George
Comment 57 Mr. Bones. (RETIRED) gentoo-dev 2004-03-17 22:37:20 UTC
dev-java/blackdown-jre has been fixed by zx.
Comment 58 Mr. Bones. (RETIRED) gentoo-dev 2004-03-17 22:51:50 UTC
dev-lang/gpc is the only package in portage that does this now so I'm changing
the summary and and passing it off to george to get it off the wrangler list.
Comment 59 George Shapovalov (RETIRED) gentoo-dev 2004-06-11 18:19:25 UTC
Marking this as a dup. Will be tracking this package via #48377

*** This bug has been marked as a duplicate of 48377 ***