Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 380979 - app-portage/eix interprets 'profiles/' in different way than portage does
Summary: app-portage/eix interprets 'profiles/' in different way than portage does
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Martin Väth
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-28 21:06 UTC by Maxim Koltsov (RETIRED)
Modified: 2011-09-06 14:22 UTC (History)
4 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 Maxim Koltsov (RETIRED) gentoo-dev 2011-08-28 21:06:02 UTC
Consider 'layman/rion' overlay, which has all leechcraft-* packages in 'profiles/package.mask' because they are in tree. Portage interprets that as if only overlay's version is masked, but 'eix' shows that all versions are, which is confusing for users.
Portage can emerge package, but it's shown as masked in eix:
[ebuild   R   *] net-misc/leechcraft-core-9999  USE="sqlite -debug -postgres" 0 kB

Reproducible: Always

Actual Results:  
[D] net-misc/leechcraft-core
     Available versions:  [M](~)0.4.85 [M](~)0.4.85[1] [M](**)9999 [M](**)9999[1] {debug postgres +sqlite}

Expected Results:  
[D] net-misc/leechcraft-core
     Available versions:  (~)0.4.85 [M](~)0.4.85[1] (**)9999 [M](**)9999[1] {debug postgres +sqlite}

maks@maksbotan-netbook ~ $ emerge --info app-portage/eix
Portage 2.1.10.11 (default/linux/amd64/10.0/desktop, gcc-4.5.3, glibc-2.13-r4, 3.0.3-gentoo x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.0.3-gentoo-x86_64-Intel-R-_Pentium-R-_CPU_U5600_@_1.33GHz-with-gentoo-2.0.3
Timestamp of tree: Sun, 28 Aug 2011 19:45:01 +0000
app-shells/bash:          4.2_p10
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r2, 3.1.4-r2, 3.2-r2
dev-util/cmake:           2.8.5-r2
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.10.3, 1.11.1-r1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.39 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo proaudio rion gamerlay-stable
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=core2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=core2"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv"
FFLAGS=""
GENTOO_MIRRORS="ftp://mirror.yandex.ru/gentoo-distfiles/"
LANG="ru_RU.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="ru"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/pro-audio /var/lib/layman/rion /var/lib/layman/gamerlay"
SYNC="rsync://mirror.yandex.ru/gentoo-portage/"
USE="X a52 aac acl acpi alsa amd64 apm avahi bash-completion berkdb bluetooth bonjour branding bzip2 cairo cdda cli consolekit cracklib crypt cups cxx dbus doomsday dri drm dts dvd dvdr emboss encode exif fam fbcon ffmpeg firefox flac fortran gallium gdbm gdu gif git gpm gstreamer gtk iconv ipod ipv6 jack jpeg laptop lcms libnotify lm_sensors mad mercurial mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly nsplugin offensive ogg opengl openmp pam pango pcre pdf perl pmu png policykit ppds pppd python qt3support qt4 readline samba scanner sdl session spell sqlite sse sse2 ssl startup-notification subversion svg sysfs tcpd tiff truetype udev unicode usb vim-syntax vorbis wifi x264 xcb xcomposite xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel i915" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

app-portage/eix-0.22.11 was built with the following:
USE="bzip2 (multilib) nls sqlite -debug -doc -hardened -optimization -strong-optimization -tools -zsh-completion"
Comment 1 Andreis Vinogradovs ( slepnoga ) 2011-08-28 21:11:04 UTC
confirm this bug as rion overlay committer
Comment 2 Martin Väth 2011-08-29 09:02:38 UTC
This is not easy to solve, since eix does not organize profiles
per repository yet.

Does anybody know what exactly is the "correct" behavior?
Would it be correct to treat only profile/package.mask as if
"::repository" would be appended to every package listed?
But then, what happens if another repository is explicitly specified?

It is really unclear to me what portage is doing, since e.g. a package.mask
in the gentoo repository influences all repositories and not only "gentoo".
So the gentoo repository is to be treated as an exception because of its name?
What about /etc/portage/profile?

It seems that pms does not specify the behavior clearly...
Comment 3 Zac Medico gentoo-dev 2011-08-29 15:09:14 UTC
(In reply to comment #2)
> Does anybody know what exactly is the "correct" behavior?
> Would it be correct to treat only profile/package.mask as if
> "::repository" would be appended to every package listed?

That's right. This is the "repo level" package.mask, so it behaves as if atoms have implicit :: repo appended.

> But then, what happens if another repository is explicitly specified?

It's not allowed. The ::repo syntax is an extension that is not part of any official EAPI at this time.

> It is really unclear to me what portage is doing, since e.g. a package.mask
> in the gentoo repository influences all repositories and not only "gentoo".

Not anymore. Every "repo level" package.mask now behaves as if atoms have implicit ::repo appended.

> So the gentoo repository is to be treated as an exception because of its name?

No, all "repo level" package.mask files behave he same.

> What about /etc/portage/profile?

This is a "profile level" package.mask, which does not have an implicit repo associated with it, so it behaves just like older portage.

> It seems that pms does not specify the behavior clearly...

That's probably because the old portage behavior was different, so it's unspecified.
Comment 4 Martin Väth 2011-08-29 17:24:02 UTC
Thanks for clarification.
However, there is one thing which I still do not understand:

> > It is really unclear to me what portage is doing, since e.g. a
> > package.mask in the gentoo repository influences all
> > repositories and not only "gentoo".
> 
> Not anymore. Every "repo level" package.mask now behaves as if atoms have
> implicit ::repo appended.

For testing, I copied some package from /usr/portage/package.mask
into my local overlay (e.g. ffmpeg), but portage does not want to install
the higher versions from my overlay. Similarly, if a package is
completely masked in /usr/portage/package.mask, portage does not want to
install it from my local overlay, either.

Do I misunderstand something or is this a bug in portage
or not yet implemented in portage-2.2.0_alpha51
Comment 5 Zac Medico gentoo-dev 2011-08-29 17:51:17 UTC
(In reply to comment #4)
> For testing, I copied some package from /usr/portage/package.mask
> into my local overlay (e.g. ffmpeg), but portage does not want to install
> the higher versions from my overlay. Similarly, if a package is
> completely masked in /usr/portage/package.mask, portage does not want to
> install it from my local overlay, either.

What's happening is that the local overlay is inheriting package.mask entries from the master repo (determined by PORTDIR). The code for this is located in 
/usr/lib/portage/pym/portage/package/ebuild/_config/MaskManager.py:

 for master in repo.masters:
   master_lines = grab_pmask(master.location)
     lines.append(stack_lists([master_lines, repo_lines], incremental=1,
       remember_source_file=True, warn_for_unmatched_removal=True,
       strict_warn_for_unmatched_removal=strict_umatched_removal))

Later, it appends the overlay's repo to all those atoms:

  repo_pkgmasklines.extend(append_repo(stack_lists(lines), repo.name,
    remember_source_file=True))

Note that the master repo defaults to PORTDIR, but it can also be overridden with a "masters" entry in $OVERLAY/metadata/layout.conf.

> Do I misunderstand something or is this a bug in portage
> or not yet implemented in portage-2.2.0_alpha51

It's working like it's supposed to. I'm sorry I didn't mention this earlier. I wasn't familiar with this behavior.
Comment 6 Martin Väth 2011-08-29 18:17:31 UTC
Thanks.

The issue is fixed in eix svn trunk (>=eix-0.23.0).
Since eix does not support layout.conf, PORTDIR/package.mask
is now hardcoded as acting globally.
Comment 7 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2011-09-06 14:22:18 UTC
in tree