Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 88150 - emerge -G ignores local package.mask
Summary: emerge -G ignores local package.mask
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-06 05:43 UTC by Martin Donnelly
Modified: 2006-05-11 03:41 UTC (History)
0 users

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 Martin Donnelly 2005-04-06 05:43:05 UTC
If a package is masked in '/etc/portage/package.mask' any you update the system using binary packages the mask gets ignored.

Reproducible: Always
Steps to Reproduce:
1. Pick a package which is available for update and mask it. In the case I first noticed:
  echo '>dev-util/cvs-1.12 >> /etc/portage/package.mask'
2. emerge sync; emerge -aG cvs

Actual Results:  
# emerge -pG cvs

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

Fetching binary packages info...
Loaded metadata pickle.

<snip cache stuff>

Calculating dependencies ...done!
[binary     U ] dev-util/cvs-1.12.11 [1.11.17]

Expected Results:  
running 'emerge -pg cvs' gives:

# emerge -pg cvs

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

Fetching binary packages info...

<snip cache stuff>

Calculating dependencies ...done!
[ebuild     U ] dev-util/cvs-1.11.19 [1.11.17]

# emerge info
Portage 2.0.51.19 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20050125-r0,
2.4.28-gentoo-r5 i686)
=================================================================
System uname: 2.4.28-gentoo-r5 i686 Pentium III (Coppermine)
Gentoo Base System version 1.6.9
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, Feb 21 2005, 10:49:35)]
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.5
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.6.3, 1.9.4, 1.4_p6
sys-devel/binutils:  2.15.92.0.2-r3
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.4.22-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-mtune=pentium3 -O3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/afs/C /etc/afs/afsws /etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -mcpu=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://apps.ramix-uk.cho.ge.com/portage"
USE="x86 X adns afs alsa apache2 apm avi bash-completion berkdb bitmap-fonts cdr
crypt cups curl eds emboss encode esd flac font-server foomaticdb fortran gdbm
gif gnome gpm gstreamer gtk gtk2 imap imlib java jpeg kde kerberos ldap libg++
libwww mad mikmod mmx mozilla mp3 mpeg mysql ncurses nls oggvorbis opengl oss
pam pdflib perl png python qt quicktime readline samba sasl sdl spell sse ssl
svga tcpd tiff truetype truetype-fonts type1-fonts unicode xml2 xmms xprint xv zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS
Comment 1 Martin Donnelly 2005-04-14 07:32:18 UTC
It also appears tht using -G causes some parts of the profile to be ignored. This system is using 2005.0/2.4 profile.

# emerge -pu gentoo-sources

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

Calculating dependencies ...done!
[ebuild     U ] sys-devel/gnuconfig-20050223 [20040214]
[ebuild     UD] sys-devel/binutils-2.15.92.0.2-r7 [2.15.92.0.2-r8]
[ebuild  NS   ] sys-kernel/gentoo-sources-2.4.28-r8

# emerge -puG gentoo-sources

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

Fetching binary packages info...

Calculating dependencies ...done!
[binary  NS   ] sys-kernel/gentoo-sources-2.6.11-r4

using 'g' is not consistent either:

# emerge -pug gentoo-sources

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

Fetching binary packages info...
Calculating dependencies ...done!
[binary     UD] sys-devel/binutils-2.15.92.0.2-r7 [2.15.92.0.2-r8]
[binary  NS   ] sys-kernel/gentoo-sources-2.4.28-r8
Comment 2 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-05-23 21:02:36 UTC
According to the manpage:
      --getbinpkgonly (-G)
              This option is identical to -g, as above, except it will not use
              ANY  information  from  the local machine.  All binaries will be
              downloaded from the remote server  without  consulting  packages
              existing in the local packages directory.
from /usr/lib/portage/bin/emerge:
if ("--getbinpkgonly" in myopts) and not ("--usepkgonly" in myopts):
	myopts.append("--usepkgonly")

if ("--getbinpkgonly" in myopts) and not ("--getbinpkg" in myopts):
	myopts.append("--getbinpkg")
# Also allow -K to apply --usepkg/-k
if ("--usepkgonly" in myopts) and not ("--usepkg" in myopts):
	myopts.append("--usepkg")
So --getbinpkgonly (-G) implies --usepkg ( use binaries ) and --usepkgonly ( 
Only use Binaries (-K)

<snip...>
#from Depgraph's select_dep()
	if ("--usepkgonly" not in myopts):
	# Remove any binary package entries that are masked in the portage tree 
(#55871)
	for idx in range(len(myeb_pkg_matches)-1,-1,-1):
		if myeb_pkg_matches[idx] not in myeb_matches:
			del myeb_pkg_matches[idx]

Here we see the emerge code only doing masks if --usepkgonly is not set.
Thus -G is ( at least code-wise and man-page-wise ) supposed to ignore local 
masking, which it does.

That leaves -g, which doesn't seem to be pulling either a binary or an ebuild 
for GNUCONFIG.  Probably an "emerge -dupg gentoo-sources" can shed some light on 
that issue.  Could you provide that?
 
Comment 3 Martin Donnelly 2005-05-24 03:18:46 UTC
Never noticed that behaviour in the man page before :-[ It does make managing
machines in a large network much more time consuming if there is no easy way to
control the installed versions via a package.mask. Are there any plans to
include this functionality?

# emerge -dupg gentoo-sources
<snip>
Calculating dependencies
Parent:    None
Depstring: sys-kernel/gentoo-sources
Candidates: ['sys-kernel/gentoo-sources']
ebuild: sys-kernel/gentoo-sources-2.4.28-r8
binpkg: sys-kernel/gentoo-sources-2.4.28-r8
 -
Parent:    binary / sys-kernel/gentoo-sources-2.4.28-r8 merge
Depstring:  !build? ( sys-apps/sed >=sys-devel/binutils-2.11.90.0.31 ) doc? (
app-text/docbook-sgml-utils ) !build? ( >=sys-libs/ncurses-5.2 sys-devel/make )
!build? ( sys-apps/sed >=sys-devel/binutils-2.11.90.0.31 ) doc? (
app-text/docbook-sgml-utils ) !build? ( >=sys-libs/ncurses-5.2 sys-devel/make )
!build? ( sys-apps/sed >=sys-devel/binutils-2.11.90.0.31 ) doc? (
app-text/docbook-sgml-utils ) !build? ( >=sys-libs/ncurses-5.2 sys-devel/make )
Candidates: ['sys-apps/sed', '>=sys-libs/ncurses-5.2', 'sys-devel/make',
'>=sys-devel/binutils-2.11.90.0.31']
ebuild: sys-apps/sed-4.1.4
binpkg: sys-apps/sed-4.1.4
 \ebuild: sys-libs/ncurses-5.4.20050319
binpkg: sys-libs/ncurses-5.4.20050319
 |
Parent:    binary / sys-libs/ncurses-5.4.20050319 merge
Depstring:  gpm? ( sys-libs/gpm )
Candidates: ['sys-libs/gpm']
ebuild: sys-libs/gpm-1.20.1-r4
binpkg: sys-libs/gpm-1.20.1-r4
 /Exiting... binary / sys-libs/ncurses-5.4.20050319 merge
ebuild: sys-devel/make-3.80-r2
binpkg: sys-devel/make-3.80-r2
 -
Parent:    binary / sys-devel/make-3.80-r2 merge
Depstring:
ebuild: sys-devel/binutils-2.15.92.0.2-r9
binpkg: sys-devel/binutils-2.15.92.0.2-r9
 \
Parent:    binary / sys-devel/binutils-2.15.92.0.2-r9 merge
Depstring:  >=sys-devel/binutils-config-1.8 >=sys-devel/binutils-config-1.8
>=sys-devel/binutils-config-1.8
Candidates: ['>=sys-devel/binutils-config-1.8']
ebuild: sys-devel/binutils-config-1.8-r2
binpkg: sys-devel/binutils-config-1.8-r2
 |
Parent:    binary / sys-devel/binutils-config-1.8-r2 merge
Depstring:  app-shells/bash
Candidates: ['app-shells/bash']
ebuild: app-shells/bash-3.0-r11
binpkg: app-shells/bash-3.0-r11
 /
Parent:    binary / app-shells/bash-3.0-r11 merge
Depstring:
Exiting... binary / sys-devel/binutils-config-1.8-r2 merge
Exiting... binary / sys-devel/binutils-2.15.92.0.2-r9 merge
Exiting... binary / sys-kernel/gentoo-sources-2.4.28-r8 merge
Exiting... None
 ...done!
[binary     U ] sys-libs/ncurses-5.4.20050319 [5.4-r6]
[binary     U ] sys-devel/make-3.80-r2 [3.80-r1]
[binary     U ] app-shells/bash-3.0-r11 [3.0-r9]
[binary     U ] sys-devel/binutils-config-1.8-r2 [1.8-r1]
[binary     U ] sys-devel/binutils-2.15.92.0.2-r9 [2.15.92.0.2-r7]
[binary  N    ] sys-kernel/gentoo-sources-2.4.28-r8
Comment 4 Jason Stubbs (RETIRED) gentoo-dev 2005-05-24 07:08:58 UTC
Personally, I'm for this change in behaviour. The only issue is that packages 
that are unmasked in PORTDIR, have a binary built for them and then remasked 
will not be downgraded when using --usepkg. At least, special handling will be 
needed to get this behaviour. 
Comment 5 Martin Donnelly 2006-05-11 03:41:28 UTC
Not a bug.