Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 267036 - app-portage/eix-0.15.7 ignores $PROFILE/package.{unmask,keywords}
Summary: app-portage/eix-0.15.7 ignores $PROFILE/package.{unmask,keywords}
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Martin Väth
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-21 23:25 UTC by Malte Starostik
Modified: 2009-05-11 17:50 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Malte Starostik 2009-04-21 23:25:27 UTC
/etc/portage/profile/package.keywords and /etc/portage/profile/package.unmask are not honoured by eix.

Reproducible: Always

Steps to Reproduce:
Create package.unmask and/or package.keywords files/directories in /etc/portage/profile and add some entries there. e.g.:

$ cat /etc/portage/profile/package.keywords
~sys-apps/portage-2.2_rc31 amd64

$ cat /etc/portage/profile/package.unmask
~sys-apps/portage-2.2_rc31
Actual Results:  
while portage behaves as expected, eix ignores those entries and suggests a downgrade:

$ emerge -pv1 portage

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

Calculating dependencies... done!
[ebuild     U ] sys-apps/portage-2.2_rc31 [2.2_rc30] USE="-build -doc -epydoc (-selinux)" LINGUAS="-pl" 857 kB

Total: 1 package (1 upgrade), Size of downloads: 857 kB

$ eix -e portage
[D] sys-apps/portage
     Available versions:  2.1.4.5 2.1.6.4 2.1.6.7 ~2.1.6.11 [M]~2.2_rc28 [M]~2.2_rc29 [M]~2.2_rc30 [M]~2.2_rc31 {build doc epydoc linguas_pl selinux}
     Installed versions:  2.2_rc30(01:40:18 16.04.2009)(-build -doc -epydoc -linguas_pl -selinux)
     Homepage:            http://www.gentoo.org/proj/en/portage/index.xml
     Description:         Portage is the package management and distribution system for Gentoo

Expected Results:  
When I add those entries to /etc/portage/package.* instead, eix does The Right Thing:

$ eix -e portage
[U] sys-apps/portage
     Available versions:  2.1.4.5 2.1.6.4 2.1.6.7 ~2.1.6.11 [M]~2.2_rc28 [M]~2.2_rc29 [M]~2.2_rc30 {M}(~)2.2_rc31 {build doc epydoc linguas_pl selinux}
     Installed versions:  2.2_rc30(01:40:18 16.04.2009)(-build -doc -epydoc -linguas_pl -selinux)
     Homepage:            http://www.gentoo.org/proj/en/portage/index.xml
     Description:         Portage is the package management and distribution system for Gentoo

The same should happen when using /etc/portage/profile/package.
Comment 1 Malte Starostik 2009-04-21 23:27:25 UTC
Forgot to mention that eix does get /etc/portage/profile/package.mask right.  Only keywording/unmasking seems to fail.
Comment 2 Martin Väth 2009-04-22 07:04:22 UTC
$PROFILE/package.keywords is not supported by portage
(you probably have unmasked this by some other means).

$PROFILE/package.unmask is not documented even on the newest portage manpage.
However, you are right that it seems that current portage versions support it
anyway but no profile uses it yet.
Comment 3 Martin Väth 2009-04-22 07:36:33 UTC
Current eix svn trunk (>=eix-0.15.8) now supports $PROFILE/package.unmask
Comment 4 Malte Starostik 2009-04-22 09:51:54 UTC
I don't know about portage 2.1, but in the 2.2 RCs package.keywords is supported.  Changes to the file work as expected with one caveat: as opposed to /etc/portage/package.keywords, the arch has to be explicitly mentioned.  e.g. the line
sys-apps/portage
doesn't change anything while
sys-apps/portage x86 amd64
marks all portage versions as stable on x86 and amd64.

Looking at /usr/lib/portage/pym/portage/__init__.py this doesn't surprise me; in lines 1337ff the custom profile is added to self.profiles and lines 1359ff pull in package.keywords from the dirs in self.profiles while lines 1591ff handle /etc/portage/package.keywords but in this case with the current arch as a default.

(line numbers as of 2.2_rc28)
Comment 5 Martin Väth 2009-04-22 10:13:34 UTC
Currently, I have no access to a gentoo machine, but before I had written my
reponse, I had entered "sys-devel/gcc **" into
/etc/portage/profile/package.keywords, and the latest gcc (which is from a
local overlay with KEYWORDS="") was *not* installed (with portage-2.2_rc31).
Comment 6 Malte Starostik 2009-04-22 10:40:18 UTC
Oh, I didn't try ** and that indeed fails.  Only the exact arch works.  Anyway, the possibility to have a package.keywords in the profile is very convenient for me as I centrally manage the contents of /etc/portage/profile for multiple machines and this removes the need to symlink or seperately sync /etc/portage/package.keywords in order to get some unstable packages pulled in.
Comment 7 Martin Väth 2009-04-22 13:23:05 UTC
OK, I am now back to a gentoo machine and see that $PROFILE/package.keywords
is implemented sanely as it should - namely at a way to extend the package
keywords. It will be somewhat cumbersome to implement this in eix correctly.

Anyway, /etc/portage/profile is - as the name says - intended to extend your
profile. Your misuse of this directory as a "sync" directory is not correct.
The correct way for you would be to let /etc/portage/package.* be directories
and make symbolic links like e.g.
  /etc/portage/package.keywords/sync -> /etc/sync/package.keywords
  /etc/portage/package.mask/sync -> /etc/sync/package.mask
  /etc/portage/package.unmask/sync -> /etc/sync/package.unmask
and then sync only the /etc/sync directory.
Comment 8 Malte Starostik 2009-04-22 13:43:33 UTC
Well, actually I use it as a custom profile dir.  The sync part was just about that profile being rsynced from an authoritative master selected according to the box's usage.
Apart from masking some and unmasking other packages it also contains make.defaults, packages, package.use and some set definitions.  But as the sets include KDE 4.2 and other unstable packages, I've always missed a way to add keywords to specific packages exaclty as is possible now.  This way I can provide a self-contained profile that does not require additional fiddling with keywords.

But that's getting off-topic now.  Thanks alot for the fast package.unmask fix and considering package.keywords
Comment 9 Martin Väth 2009-04-22 21:02:32 UTC
eix svn trunk now contains also some handling of $PROFILE/package.keywords.
Since this is a profile file, it is intentionally not treated with eix -T.
Moreover, the package.keywords file in a non-local profile directory
acts similarly as if the keyword was added in the package (i.e. you will
not even see (~)).
Unfortunately the memory footprint of eix thus increases a lot,
because all keywords must be saved for all variants and all versions.
Comment 10 Martin Väth 2009-04-23 20:19:30 UTC
Just to document it somewhere: I have now chosen another implementation which
is only slightly slower but brings eix' memory footprint back to normal.
Comment 11 Malte Starostik 2009-04-29 12:53:56 UTC
Confirmed working with trunk.  Thanks alot!
Comment 12 Martin Väth 2009-05-11 17:50:17 UTC
Closing since eix-0.16.0 is now in the tree.