Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 11619 - Portage fails silently on anything
Summary: Portage fails silently on anything
Status: RESOLVED INVALID
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: Normal critical
Assignee: Nicholas Jones (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-05 06:36 UTC by Matteo Sasso
Modified: 2011-10-30 22:17 UTC (History)
3 users (show)

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


Attachments
emerge info (portage.info,1.50 KB, text/plain)
2002-12-05 06:38 UTC, Matteo Sasso
Details
Results of a simple test (getenvtest.txt,1.73 KB, text/plain)
2002-12-13 05:28 UTC, Matteo Sasso
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matteo Sasso 2002-12-05 06:36:39 UTC
emerge [anything] fails since my latest world -u! 
No error messages, just another shell prompt. I'm stalled! 
Here are a couple of examples: 
---- 
emerge portage 
Calculating dependencies ...done! 
>>> emerge (1 of 1) sys-apps/portage-2.0.45-r1 to / 
---- 
emerge gplflash 
Calculating dependencies ...done! 
>>> emerge (1 of 1) net-www/gplflash-0.4.10-r1 to / 
>>> md5 ;-) flash-0.4.10.tgz 
----
Comment 1 Matteo Sasso 2002-12-05 06:38:17 UTC
Created attachment 6222 [details]
emerge info
Comment 2 Nicholas Jones (RETIRED) gentoo-dev 2002-12-05 10:56:58 UTC
Use the rescue portage.
Read:
/usr/portage/sys-apps/portage/files/README.RESCUE
Comment 3 Matteo Sasso 2002-12-05 14:56:01 UTC
Portage-rescue package did not solve the problem. Thanks anyway. 
Comment 4 Chad Huneycutt (RETIRED) gentoo-dev 2002-12-06 11:54:40 UTC
Avi Schwartz reported the same problem on the gentoo-dev mailing list.  Setting
FEATURES=-sandbox allowed him to emerge again.

What version of portage are you using?
What version of portage did you try to rescue with?

Try turning off sandbox (as above) and then emerge portage.
Comment 5 Matteo Sasso 2002-12-06 18:24:45 UTC
My version of Portage and of Portage-rescue is 2.0.44. Other details are   
available in the attached file (att. #6222, see above). With the workaround   
you suggested I managed to update portage to v2.0.45-r1, but the problem  
persists! Of course, now I can update a package if I really need it. 
Thank you for your precious help! 
Comment 6 Matteo Sasso 2002-12-07 07:03:14 UTC
I noticed a possibly related glitch: I cannot play files with mplayer anymore 
because a module (read_subtitles_file) crashes. An error message few lines 
above reads: "Can't find HOME directory". However ll ~ -d works and $HOME is 
set. This happens ONLY under the root account. 
Comment 7 Matteo Sasso 2002-12-08 10:15:32 UTC
I found a workaround: it is sufficient to "export HOME=/root" (as root, of 
course) before emerging. This is because, although $HOME seems to be set (is 
shown by "set"), it is not read by getenv calls (they just return NULL), thus 
making the sandbox module crash. Can anyone tell me how is this possible? 
Comment 8 Nicholas Jones (RETIRED) gentoo-dev 2002-12-09 05:57:53 UTC
I've got a fix in cvs to be released shortly.
Not sure how successful this will be though.
If home isn't set, I export it as PORTAGE_TMPDIR
(Lets fakeroot/droppriv work too, I hope.)
Comment 9 Nicholas Jones (RETIRED) gentoo-dev 2002-12-09 05:58:56 UTC
Anyone know a general reason HOME couldn't be getenv()'d ?
Comment 10 Martin Schlemmer (RETIRED) gentoo-dev 2002-12-09 09:56:41 UTC
Possibly if you start a terminal/whatever without logging in ( the old
problem where you have to tell gnome-terminal/whatever to behave like login),
but he does say that it is present if he run 'set'.

I guess it can also be possible that something in sandbox is borked, but I
rather find that unlikely, as (if I remember correct) sandbox do not use/alter
HOME.
Comment 11 Nicholas Jones (RETIRED) gentoo-dev 2002-12-10 06:34:49 UTC
grep 'root' /etc/passwd

Is the info proper?
Comment 12 Matteo Sasso 2002-12-10 14:06:08 UTC
It is. (root:x:0:0::/root:/bin/bash) 
In fact, HOME is "set" correctly even though it cannot be getenv()'d. 
Comment 13 Matteo Sasso 2002-12-13 05:28:03 UTC
Created attachment 6461 [details]
Results of a simple test

I built a program to getenv() a certain environment variable, then I run it
over the whole environment. Variables marked by "(null)" cannot be getenv()'d
even though they are set. I also dug a little bit in the bash source, but I
couldn't find the cause of this yet. However, those vars are set internally and
can only be accessed by internal bash routines, so they are shown with set,
they are used for path expansion and shell prompt visualization. I'll keep you
informed as I find out more pieces of the puzzle...
Comment 14 Matteo Sasso 2002-12-13 07:55:58 UTC
Ok, I found the culprit: it was a crappy script named "sux" (very    
appropriate!). It tries to copy the X cookies and to build a valid "su"   
command line, but produces something that seems to work and eventually 
hijacks the environment quite badly. I don't know how, exactly, since I hate 
hacking through shell scripts. I think I'll rewrite everything in Ruby. Please 
re-open this bug if anyone experiences this problem and is not using sux. 
Anyway, it wasn't exactly portage's fault (well, just lack of error handling, 
really). 
   
Thank you!