Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 536392

Summary: sys-apps/portage: autounmask (sometimes?) writes =-atoms for abi_x86_32 flags
Product: Portage Development Reporter: Michał Górny <mgorny>
Component: UnclassifiedAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal CC: esigra
Priority: Normal Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 376695, 484436    

Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-01-12 09:18:19 UTC
# required by virtual/libudev-215-r1
# required by media-libs/mesa-10.3.4
# required by x11-libs/cairo-1.12.16-r4
# required by x11-libs/gtk+-2.24.25
# required by app-crypt/pinentry-0.9.0
# required by app-crypt/gnupg-2.0.26-r2
# required by app-crypt/gcr-3.12.2
# required by gnome-base/gnome-keyring-3.12.2-r1
# required by sys-auth/pambase-20140313
# required by net-misc/openssh-6.7_p1-r3
# required by virtual/ssh-0
# required by @system
# required by @world (argument)
=sys-apps/systemd-217-r3 abi_x86_32
# required by net-im/skype-4.3.0.37-r3[apulse]
# required by skype[apulse,-pulseaudio] (argument)
>=media-sound/apulse-0.1.4 abi_x86_32
# required by x11-libs/gtk+-2.24.25
# required by app-text/acroread-9.5.5-r2
# required by @selected
# required by @world (argument)
=x11-libs/cairo-1.12.18 abi_x86_32
# required by dev-qt/qtsql-4.8.6-r1[mysql]
# required by qtsql (argument)
>=virtual/mysql-5.6-r2 abi_x86_32
# required by media-sound/pulseaudio-5.0-r6
# required by media-plugins/alsa-plugins-1.0.28
=sys-apps/systemd-218 abi_x86_32
# required by virtual/libudev-215-r1
# required by dev-libs/libusb-1.0.19
# required by virtual/libusb-1-r1
# required by net-print/cups-2.0.1-r1
# required by app-emulation/wine-1.7.29
# required by @selected
# required by @world (argument)
=sys-apps/systemd-218-r1 abi_x86_32

[...]

I have no clue why it chooses >= or =, but choosing = means one's going to be forced to re-enable the flag every single upgrade...
Comment 1 Zac Medico gentoo-dev 2015-01-12 16:19:56 UTC
The code in depgraph.py looks like this:

	if is_latest:
		unstable_keyword_msg[root].append(
			">=%s %s\n" % (pkg.cpv, keyword))
	elif is_latest_in_slot:
		unstable_keyword_msg[root].append(
			">=%s:%s %s\n" % (pkg.cpv, pkg.slot, keyword))
	else:
		unstable_keyword_msg[root].append(
			"=%s %s\n" % (pkg.cpv, keyword))
	else:
		unstable_keyword_msg[root].append(
			"=%s %s\n" % (pkg.cpv, keyword))

Your issue could be due to bugs in the check_if_latest function that is used to set the is_latest variable. It looks like this function doesn't account for masking, a masked -9999 ebuild could probably trigger the =atom behavior.
Comment 2 Rafał Mużyło 2015-01-12 22:04:43 UTC
(In reply to Zac Medico from comment #1)
> Your issue could be due to bugs in the check_if_latest function that is used
> to set the is_latest variable. It looks like this function doesn't account
> for masking, a masked -9999 ebuild could probably trigger the =atom behavior.

Any chance the problem here is that the case of package.use.stable.mask isn't handled as priority over package.mask/'-*' ebuilds ?
Comment 3 Zac Medico gentoo-dev 2015-01-12 23:36:50 UTC
(In reply to Rafał Mużyło from comment #2)
> Any chance the problem here is that the case of package.use.stable.mask
> isn't handled as priority over package.mask/'-*' ebuilds ?

Well, the check_if_latest function accounts for neither use masking nor package masking/visibility.
Comment 4 Zac Medico gentoo-dev 2015-01-17 08:35:44 UTC
(In reply to Zac Medico from comment #1)
> Your issue could be due to bugs in the check_if_latest function that is used
> to set the is_latest variable. It looks like this function doesn't account
> for masking, a masked -9999 ebuild could probably trigger the =atom behavior.

All three of the packages listed in comment #0 that have =foo atoms also have -9999 ebuilds, so that confirms my hypothesis.

I think I'll add a boolean keyword argument to check_if_latest that causes it to ignore masked packages. Then I'll use the new argument to make the package.use code ignore masked packages. That will fix the package.use code, while leaving the package.mask/package.accept_keywords behavior unchanged.
Comment 5 Zac Medico gentoo-dev 2015-01-18 07:17:10 UTC
I have a patch in the following branch:

	https://github.com/zmedico/portage/tree/bug_536392

I've posted it for review here:

	http://thread.gmane.org/gmane.linux.gentoo.portage.devel/5108
Comment 6 Zac Medico gentoo-dev 2015-01-18 18:51:03 UTC
This is in the master branch now:

https://github.com/gentoo/portage/commit/0b85e54ce3de54d8b1dfaf2c3f3b23b5326d4c44
Comment 7 Brian Dolbec (RETIRED) gentoo-dev 2015-02-12 06:11:53 UTC
Released in portage-2.2.16