Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 350488 - portage-2.2.0_alpha12 without python3 dies when re-emerging itself
Summary: portage-2.2.0_alpha12 without python3 dies when re-emerging itself
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, REGRESSION
: 350607 (view as bug list)
Depends on:
Blocks: 349307
  Show dependency tree
 
Reported: 2011-01-03 18:28 UTC by Martin Väth
Modified: 2011-02-19 12:00 UTC (History)
2 users (show)

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


Attachments
handle installed masked packages better (installed_masked.patch,1.56 KB, patch)
2011-01-04 01:18 UTC, Zac Medico
Details | Diff
use ebuild visibility for installed (ebuild_visibility.patch,1.78 KB, patch)
2011-01-05 00:56 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Väth 2011-01-03 18:28:55 UTC
$ emerge -1a portage
emerge: there are no ebuilds to satisfy "dev-lang/python:2.8".
(dependency required by "sys-apps/portage-2.2.0_alpha12" [ebuild])
(dependency required by "portage" [argument])

This does not happen with portage-2.2.0_alpha11. Apparently, the cause is in
/usr/portage/metadata/cache/sys-apps/portage-2.2.0_alpha12:
|| ( dev-lang/python:2.8 dev-lang/python:2.7 dev-lang/python:2.6 )

The only installed python version on my system is python-2.6.6.
portage-2.2.0_alpha12 is installed with the USE-flags:
ipc -build -doc -epydoc -linguas_pl -python3 -selinux
Comment 1 Zac Medico gentoo-dev 2011-01-03 20:39:47 UTC
This type of behavior typically means that all of the valid choices or masked. You can test them individually like this:

  emerge -pv dev-lang/python:2.6
  emerge -pv dev-lang/python:2.7
Comment 2 Martin Väth 2011-01-03 22:05:17 UTC
No, they are not masked:

$ emerge -pv dev-lang/python:2.6
[...]
[ebuild   R   ] dev-lang/python-2.6.6-r1  USE="doc ncurses readline sqlite ssl threads (wide-unicode) xml -berkdb -build -examples -gdbm -ipv6 -tk -wininst" ELIBC="(-uclibc)" 0 kB
[...]

$ emerge -pv portage            
[...]
emerge: there are no ebuilds to satisfy "dev-lang/python:2.8".
(dependency required by "sys-apps/portage-2.2.0_alpha12" [ebuild])
(dependency required by "portage" [argument])

Not sure whether this has become clear in my report:

$ emerge -1O =portage-2.2.0_alpha11
[...]
$ emerge -pv portage               
[...]
[ebuild     U ] sys-apps/portage-2.2.0_alpha12 [2.2.0_alpha11] USE="(ipc) -build -doc -epydoc -python3 (-selinux)" LINGUAS="-pl" 0 kB

When upgrading portage again, the error re-occurs, so it really seems to be a
regression.
Comment 3 Zac Medico gentoo-dev 2011-01-03 22:23:39 UTC
It's probably something about the code from bug 350285. It seems like your installed instance of python-2.6.6-r1 is being masked for some reason, which is causing it to make a bad choice.
Comment 4 Martin Väth 2011-01-03 22:47:54 UTC
Yes: After reversely applying depclean2.patch from bug 350285, I receive

$ emerge -1p portage
[...]
[ebuild   R   ] sys-apps/portage-2.2.0_alpha12  USE="(ipc) -build -doc -epydoc -python3 (-selinux)" LINGUAS="-pl" 0 kB

Comment 5 Martin Väth 2011-01-03 23:08:30 UTC
I made some experiments:

$ ACCEPT_KEYWORDS='~amd64' emerge -1p portage

works. (However, once more: emerge -1p python:2.6 works, too).
The only item related to python in my /etc/portage is (in package.mask):

dev-lang/python:3.1

After remove this, I get another surprise: While

$ ACCEPT_KEYWORDS='~amd64' emerge -1p portage

works (without pulling in any new python version), the same without testing
keywords wants to pull in python-3.1.3 which in turn does not like my
installed python-2.6.6-r1:

$ emerge -1p portage
[...]
!!! All ebuilds that could satisfy "dev-lang/python:2.7[gdbm?,ipv6?,ncurses?,readline?,sqlite?,ssl?,threads?,tk?,xml?]" have been masked.
!!! One of the following masked packages is required to complete your request:
- dev-lang/python-2.7.1::gentoo (masked by: ~amd64 keyword)
- dev-lang/python-2.7::gentoo (masked by: ~amd64 keyword)

(dependency required by "dev-lang/python-3.1.2-r4" [ebuild])
(dependency required by "sys-apps/portage-2.2.0_alpha12" [ebuild])
(dependency required by "portage" [argument])
[...]

Also without the python:3.1 mask the call

$ emerge -1p python:2.6

is successfull and wants to emerge the same USE-flags as

$ emerge -1p python

so it is probably not an issue of USE-dependency.
Comment 6 Martin Väth 2011-01-03 23:15:49 UTC
Now I found out why portage considers my python-2.6.6-r1 as masked:

When I had installed python-2.6.6-r1, it was ~amd64, and this value is still
stored in /var/db/pkg/dev-lang/python-2.6.6-r1/KEYWORDS
After replacing ~amd64 by amd64 in this file the error vanishes.

So it seems that portage by mistake takes the mask state from /var/db/pkg
instead of /usr/portage/metadata
Comment 7 Zac Medico gentoo-dev 2011-01-04 01:18:42 UTC
Created attachment 258783 [details, diff]
handle installed masked packages better

Hopefully this fixes it. Save as /tmp/installed_masked.patch and apply as follows:

patch /usr/lib/portage/pym/portage/dep/dep_check.py /tmp/installed_masked.patch
Comment 8 Martin Väth 2011-01-04 16:42:08 UTC
The patch seems to fix the problem. Thanks.
Comment 9 Martin Väth 2011-01-04 17:35:18 UTC
Sorry, the patch does not work completely:

Although "emerge -1p portage" now works, "emerge -NaDu @world"
wants to install python:2.5 for no apparent reason.
This does not happen when I mask <python-2.6.6 in /etc/portage/package.mask
(and "emerge -NaDu @world" also gives no error).
This also does not happen when I edit
/var/db/pkg/dev-lang/python-2.6.6-r1/KEYWORDS (~amd64 -> amd64).
So it seems that the above file is still used in some place where it shouldn't...
Comment 10 Zac Medico gentoo-dev 2011-01-05 00:56:21 UTC
Created attachment 258881 [details, diff]
use ebuild visibility for installed

Apply this in addition to the other patch:

Save as /tmp/ebuild_visibility.patch and apply as follows:

cd /usr/lib/portage
patch -p1 < /tmp/ebuild_visibility.patch
Comment 11 Zac Medico gentoo-dev 2011-01-05 02:11:17 UTC
This is fixed in 2.1.9.29 and 2.2.0_alpha12.
Comment 12 Martin Väth 2011-01-05 15:35:16 UTC
Works like a charm. Thanks a lot.
Comment 13 Zac Medico gentoo-dev 2011-01-06 01:01:23 UTC
*** Bug 350607 has been marked as a duplicate of this bug. ***