Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 120825 - New portage handles ||() incorrectly ? (defaults to masked modular xorg instead of monolithic xorg)
Summary: New portage handles ||() incorrectly ? (defaults to masked modular xorg inst...
Status: RESOLVED WORKSFORME
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
: 124032 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-01-29 08:39 UTC by Fred Krogh
Modified: 2006-02-27 20:30 UTC (History)
2 users (show)

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


Attachments
Result of running emerge --debug -Dau world with portage-2.0.54 (debug_2.0.54,452.44 KB, text/plain)
2006-02-26 14:39 UTC, Fred Krogh
Details
Result of running emerge --debug -Dau world with portage-2.1_pre5-r1 (debug_2.1_pre5-r1,19.42 KB, text/plain)
2006-02-26 14:41 UTC, Fred Krogh
Details
My /var/lib/portage/world (world,1.90 KB, text/plain)
2006-02-26 15:38 UTC, Fred Krogh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fred Krogh 2006-01-29 08:39:22 UTC
Apologies if this problem is known, but I couldn't find it.
When I emerge any portage from 2.1_pre1 to 2.1_pre4-r1 and then do an emerge -Dau world, I get this

Calculating world dependencies -
!!! All ebuilds that could satisfy "x11-libs/libX11" have been masked.
!!! One of the following masked packages is required to complete your request:
- x11-libs/libX11-1.0.0 (masked by: package.mask)
# Donnie Berkholz <spyderous@gentoo.org> (07 Aug 2005)
# Modularized X, upstream release candidates

I tried installing a new X once and don't want to try again any time soon.

============= emerge --info

System uname: 2.6.15-gentoo-r1 x86_64 AMD Opteron(tm) Processor 242
Gentoo Base System version 1.12.0_pre15
dev-lang/python:     2.3.5, 2.4.2
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=opteron -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib64/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-O2 -march=opteron -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.osuosl.org http://cudlug.cudenver.edu/gentoo http://gentoo.binarycompass.org"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X alsa amd64 apache2 audiofile avi bash-completion bcmath berkdb bitmap-fonts blas bmp bonobo bzip2 calendar cdr crypt ctype cups curl dbus dga divx-linux dvd dvdr dvdread eds emacs emboss emul-linux86 encode esd exif expat fam fastcgi fbcon foomaticdb fortran ftp gdbm gif glut gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile hal idn imlib ipv6 java jpeg junit kde kerberos lapack lcms libwww lzw lzw-tiff mad mbox mcal mime mng motif mozilla mp3 mpeg mpi mysql mysqli ncurses nls nocd nptl nvidia offensive ogg openal opengl osc oscar oss pam pcre pdflib perl png portaudio ppds python qt quicktime readline samba sasl sdl sharedmem sockets source sox speex spell ssl svg symlink tcltk tcpd tetex threads tiff truetype truetype-fonts type1-fonts udev usb userlocales vhosts xine xml xml2 xpm xv xvid zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-01-29 08:45:38 UTC
Kindly review the following before reporting portage "bugs"

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3&chap=3#doc_chap3
Comment 2 Fred Krogh 2006-01-29 08:57:42 UTC
I'm sorry, but I don't see why the previous comment.  I have neither portage nor X11 unmasked.  Portage is masked as if I try to use it, it leads to problems.  I truly would like to help by reporting bugs, but at the moment I have no ides why this should not have been reported.
Comment 3 SpanKY gentoo-dev 2006-01-29 09:00:26 UTC
yeah, settle down, the new portage 2.1_pre4 appears to handle || () incorrectly
Comment 4 Fred Krogh 2006-01-29 09:03:57 UTC
Note that in my original comment, I mentioned that portage 2.1_pre4 was still causing the problem for me.  (That was pre4-r1 so maybe an r2 is on the way?)
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2006-01-29 09:52:10 UTC
Cannot reproduce this - a simple test:

gcc has the following deps, so the bug should manifest itself, right?

|| ( app-admin/eselect-compiler >=sys-devel/gcc-config-1.3.12-r4 )


# emerge -pv eselect-compiler

These are the packages that I would merge, in order:

Calculating dependencies
!!! All ebuilds that could satisfy "eselect-compiler" have been masked.
!!! One of the following masked packages is required to complete your request:
- app-admin/eselect-compiler-2.0.0_beta5 (masked by: package.mask, ~x86 keyword)
# Jeremy Huddleston <eradicator@gentoo.org> (24 Sep 2005)
# Still in development

- app-admin/eselect-compiler-2.0.0_rc1-r1 (masked by: package.mask, ~x86 keyword)

For more information, see MASKED PACKAGES section in the emerge man page or
refer to the Gentoo Handbook.

# emerge -pv gcc-config

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild  N    ] sys-devel/gcc-config-1.3.12-r6  0 kB

# emerge -uDpv world

These are the packages that I would merge, in order:

Calculating world dependencies ...done!
[ebuild  N    ] sys-devel/gcc-config-1.3.12-r6  0 kB
Comment 6 gent_bz 2006-02-12 16:32:37 UTC
I think I'm seeing something related to this - although it may not be related.  

I have xorg-7 (many packages unmasked in package.unmask) and portage 2.1_pre4-r1.


emerge -pv Xaw3d

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[blocks B     ] x11-libs/libXft (is blocking x11-base/xorg-x11-6.8.99.15-r4)
[ebuild  N    ] x11-base/opengl-update-3.0.0  0 kB 
[ebuild     UD] x11-base/xorg-x11-6.8.99.15-r4 [7.0-r1] USE="bitmap-fonts% doc% ipv6% nls% opengl% pam% truetype-fonts% type1-fonts% xv% -3dfx -cjk% -debug% -font-server% -insecure-drivers% -minimal% -nocxx% -sdk% -static% -xprint" 0 kB 
[ebuild  N    ] virtual/x11-6.8  0 kB 
[ebuild  N    ] x11-libs/Xaw3d-1.5-r1  0 kB 

Total size of downloads: 0 kB


It *appears* that emerge is making the wrong choice wrt xorg-x11 versions.  Running emerge with --debug includes this output : 

Depstring: || ( ( x11-libs/libXt x11-libs/libX11 x11-libs/libXmu x11-libs/libXpm x11-libs/libXp ) virtual/x11 ) >=sys-apps/sed-4 || ( ( x11-proto/xextproto x11-misc/imake x11-misc/gccmakedep ) virtual/x11 ) !bootstrap? ( sys-devel/patch ) || ( ( x11-libs/libXt x11-libs/libX11 x11-libs/libXmu x11-libs/libXpm x11-libs/libXp ) virtual/x11 )
Candidates: ['virtual/x11']


Manually emerging all the would-be xorg-7 dependencies gives the following (making it clear as to what is going on) :


emerge -pv libXt libX11 libXmu libXpm libXp xextproto imake gccmakedep

These are the packages that I would merge, in order:

Calculating dependencies -
!!! All ebuilds that could satisfy "gccmakedep" have been masked.
!!! One of the following masked packages is required to complete your request:
- x11-misc/gccmakedep-1.0.1-r1 (masked by: package.mask)
# Donnie Berkholz <spyderous@gentoo.org> (07 Aug 2005)
# Modularized X, upstream release candidates


So the "problem" was actually that one dep was still masked, because gccmakedep has been recently added to package.mask.  Adding gccmakedep to my package.unmask results in the 'correct' set of deps being calculated.

There's a bunch of Xaw3d related bugs (that have been closed by Jakub) that could *probably* be solved with a closer examination of package.*mask - in fact, I suspect that any package that depends on gccmakedep will be seeing some emerge-gives-wrong-deps type bugs.

The problem is quite a subtle one - a little more diagnostic info from emerge would be really handy in cases like this.
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2006-02-25 00:19:41 UTC
*** Bug 124032 has been marked as a duplicate of this bug. ***
Comment 8 Fred Krogh 2006-02-26 14:11:25 UTC
I just installed sys-apps/portage-2.1_pre5-r1, and after the emerge, an emerge -Dau world, still gives

!!! All ebuilds that could satisfy "x11-libs/libX11" have been masked.
!!! One of the following masked packages is required to complete your request:
- x11-libs/libX11-1.0.0-r2 (masked by: package.mask)
# Donnie Berkholz <spyderous@gentoo.org> (07 Aug 2005)
# Modularized X, upstream release candidates

So at least for me this latest portage still has the same problem.


Comment 9 gent_bz 2006-02-26 14:16:17 UTC
What output do you get with 'emerge --debug -Dua' ?
Comment 10 Fred Krogh 2006-02-26 14:21:00 UTC
(In reply to comment #9)
> What output do you get with 'emerge --debug -Dua' ?
> 

I mainly just get a question asking me what I want to do.  If I add "world" at the end, I get lots of output.  Before attaching that, I'd like to know exactly what you want including whether it should be done with the portage-2.0.54 that I'm using now, or you want it with the new portage that fails.  And whether you want "world" at the end.
Thanks.
Comment 11 gent_bz 2006-02-26 14:25:54 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > What output do you get with 'emerge --debug -Dua' ?
> > 
> 
> I mainly just get a question asking me what I want to do.  If I add "world" at
> the end, I get lots of output.  Before attaching that, I'd like to know exactly
> what you want 
Hopefully, amongst it there will be information that may help diagnose the problem.

> including whether it should be done with the portage-2.0.54 that
> I'm using now, or you want it with the new portage that fails.
Both would probably be useful... 

>  And whether you want "world" at the end.
Yes, sorry.
Comment 12 Fred Krogh 2006-02-26 14:39:15 UTC
Created attachment 80795 [details]
Result of running emerge --debug -Dau world with portage-2.0.54
Comment 13 Fred Krogh 2006-02-26 14:41:24 UTC
Created attachment 80796 [details]
Result of running emerge --debug -Dau world with portage-2.1_pre5-r1
Comment 14 gent_bz 2006-02-26 14:51:25 UTC
What output from "emerge -pv virtual/x11"?
Comment 15 Fred Krogh 2006-02-26 14:55:53 UTC
(In reply to comment #14)
> What output from "emerge -pv virtual/x11"?
> 
Both versions give the same output, namely,

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] virtual/x11-6.8  0 kB 

Total size of downloads: 0 kB

Comment 16 gent_bz 2006-02-26 15:27:04 UTC
It would indeed appear to be a portage bug, but I cannot reproduce it here.

Specifically, something appears to be screwy in the process of calculating deps for tk.

You could try 'emerge -pv tk' (or 'emerge -pv gcc tk' on a whim) and see if that demonstrates the bug, otherwise I'm out of ideas.  Well, you could post your world file (/var/lib/portage/world).  That /may/ be of interest...
Comment 17 Fred Krogh 2006-02-26 15:38:28 UTC
Created attachment 80799 [details]
My /var/lib/portage/world

And here are other results requested (for the working portage only)

emerge -pv tk

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] dev-lang/tk-8.4.11-r1  +threads 0 kB 

Total size of downloads: 0 kB

=================== and 
emerge -pv gcc tk

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] sys-devel/gcc-3.4.5  (-altivec) -bootstrap -boundschecking -build +fortran -gcj +gtk -hardened -ip28 (-multilib) -multislot (-n32) (-n64) +nls -nocxx -nopie -nossp -objc -vanilla 47 kB 
[ebuild   R   ] dev-lang/tk-8.4.11-r1  +threads 0 kB 

Total size of downloads: 47 kB
Comment 18 gent_bz 2006-02-26 16:35:17 UTC
I've tried a few more things and I just cannot reproduce this bug.

Final idea : upgrade to latest portage, run 'emerge --metadata' and 'emerge -Dua world' again.
Comment 19 Fred Krogh 2006-02-26 16:42:01 UTC
(In reply to comment #18)
> I've tried a few more things and I just cannot reproduce this bug.
> 
> Final idea : upgrade to latest portage, run 'emerge --metadata' and 'emerge
> -Dua world' again.
> 
Sorry this is final.  I've tried this, and I'm having the same old problem.
Thanks.
Comment 20 Brian Harring (RETIRED) gentoo-dev 2006-02-26 18:55:44 UTC
The bug isn't with portage, it's with the visibility of the packages in question- reread comment #6, it's dead on. reassigning...
Comment 21 gent_bz 2006-02-26 19:05:40 UTC
(In reply to comment #20)
> reread comment #6, it's dead on. reassigning...

Err, thanks.  But (just to be clear) comment #6 is not the original bug - just something that (I thought) looks like it.  

What is the exact problem in this case?  

And what is the difference between 2.0.54 and 2.1_pre that is causing it to happen?
Comment 22 Chris Slycord 2006-02-26 23:43:21 UTC
The only times I've been seeing this fail is when the masked package happens to be installed already (but wasn't in the world file as it had been a dependency of something else I installed during the time I had stuff unmasked).

Like when you have || ( x11-libs/libX11 virtual/x11 ) and libX11 installed (but not in world file) things get messed up.

Now one wonders why portage doesn't just (by default) search /var/db/pkg for packages installed that are masked rather than have it done in an obscure dependency sorter?
Comment 23 Brian Harring (RETIRED) gentoo-dev 2006-02-26 23:45:11 UTC
(In reply to comment #21)
> And what is the difference between 2.0.54 and 2.1_pre that is causing it to
> happen?

For ||() parsing, 2.1 has a subtle bug corrected- 

|| ( a ( b? ( c ) ) )
b is False
|| ( a ( ) )
Portage would use the empty node, '()' to satisfy the or. It's possible it's what's occuring here, but I would dig down through the emerge -Dd output and verify it.
Comment 24 gent_bz 2006-02-27 15:42:32 UTC
Brian : Thanks for the explanation.

Fred : Have you tried 'emerge --distclean' at any stage?

Something like (change as appropriate)
emerge -DuavN world  # ensure everything is up to date wrt USE flags
revdep-rebuild
emerge --distclean --pretend  # get a list of packages that could be removed.

and then, if appropriate
emerge --distclean
or
emerge -C whichever packages as appropriate

Then upgrade portage to latest and see if the problem is still present.  Even if this doesn't solve the problem, you'll end up with a slightly more consistent system :)
Comment 25 Fred Krogh 2006-02-27 19:53:56 UTC
(In reply to comment #24)
> Brian : Thanks for the explanation.
> 
> Fred : Have you tried 'emerge --distclean' at any stage?
> 
> Something like (change as appropriate)
> emerge -DuavN world  # ensure everything is up to date wrt USE flags
> revdep-rebuild
> emerge --distclean --pretend  # get a list of packages that could be removed.
> 
> and then, if appropriate
> emerge --distclean
> or
> emerge -C whichever packages as appropriate
> 
> Then upgrade portage to latest and see if the problem is still present.  Even
> if this doesn't solve the problem, you'll end up with a slightly more
> consistent system :)
> 
Thanks for the suggestion.  With the substitution of --depclean for --distlean above, I followed your suggestions.  Lots of things got removed.  After this I ran revdep-rebuild and it wanted to emerge 17 things.  At least two of them wanted files in /usr/lib64 that had been deleted.  After copying one over from backups emerging, then seeing another that was needed, etc., etc., the process finally converged.
I have now emerged the latest portage, and run emerge -Dau world and it found no updated packages.  The process was a bit painful, but I'm glad to have this straightened out, at least on my system.

I'm not convinced that there was not some kind of defect introduced in the recent portages, but evidently my system was not in an ideal state.  My apologies to any who felt their time was wasted on this.
Thanks again!
Comment 26 gent_bz 2006-02-27 20:21:05 UTC
Glad that it has been resolved! 
(feel free to close the bug)

If you 'emerge --depclean' before 'emerge -N' and revdep-rebuild (which is what you appear to have done), it is more likely to be a problematic process - you remove packages that may still be needed by others.  Fortunately, you had backups :)
Comment 27 Fred Krogh 2006-02-27 20:30:47 UTC
(In reply to comment #26)
> Glad that it has been resolved! 
> (feel free to close the bug)
> 
> If you 'emerge --depclean' before 'emerge -N' and revdep-rebuild (which is what
> you appear to have done), it is more likely to be a problematic process - you
> remove packages that may still be needed by others.  Fortunately, you had
> backups :)
> 
O.K. I'll close the bug. And note that I followed exactly what you had suggested, except for running revdep after running emerge --depclean.  My very limited experience with emerge --depclean is that it is somewhat hazardous.  But the emerge -N was run before emerge --depclean, it however had nothing to do.
Many thanks!