Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 307163 - "emerge -p --noreplace world" lists nothings for portage 2.1.7.16
Summary: "emerge -p --noreplace world" lists nothings for portage 2.1.7.16
Status: RESOLVED DUPLICATE of bug 281008
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: AMD64 Linux
: High major
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-28 11:12 UTC by Samuel Penn
Modified: 2010-03-04 10:52 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 Samuel Penn 2010-02-28 11:12:12 UTC
Since upgrading to portage 2.1.7.16, running "emerge -p --noreplace world" shows that nothing on my system needs updating. Prior to upgrading from portage 2.1.6.*, a number of packages required an update (including portage). I updated portage by itself, re-ran emerge to see what else to update, and the previous packages were no longer listed.

This has happened on 3 different Gentoo systems over the last few days.

There are packages in my world file which require an update. "emerge -pu world" and "emerge -p world" lists these packages, but "emerge -p --noreplace world" does not.

All three systems are AMD64. One has a hardened profile, the others are standard AMD64 profile. One was installed a few months back, one was installed back in 2004. I note that a couple of my other systems aren't listing the 2.1.7 version of portage as available, and these are working fine.

Reproducible: Always

Steps to Reproduce:
1. Run "emerge -p --noreplace world"


Actual Results:  
Get back empty list.

Expected Results:  
Get list of packages requiring an update.

Portage 2.1.7.16 (hardened/linux/amd64/10.0/no-multilib, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.28-hardened-r7 x86_64)                                                                                                          
=================================================================                                               
System uname: Linux-2.6.28-hardened-r7-x86_64-AMD_Processor_model_-with-gentoo-1.12.13                          
Timestamp of tree: Sun, 28 Feb 2010 01:00:01 +0000                                                              
app-shells/bash:     3.2_p39                                                                                    
dev-lang/python:     2.6.2-r1                                                                                   
dev-python/pycrypto: 2.0.1-r8                                                                                   
sys-apps/baselayout: 1.12.13                                                                                    
sys-apps/sandbox:    1.6-r2                                                                                     
sys-devel/autoconf:  2.63-r1                                                                                    
sys-devel/automake:  1.9.6-r2, 1.10.2                                                                           
sys-devel/binutils:  2.18-r1                                                                                    
sys-devel/gcc:       3.4.6-r2, 4.1.2                                                                            
sys-devel/gcc-config: 1.4.0-r4                                                                                  
sys-devel/libtool:   2.2.6b                                                                                     
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://mirror.qubenet.net/mirror/gentoo/ http://212.219.56.153/sites/www.ibiblio.org/gentoo/ http://mirror.bytemark.co.uk/gentoo/"
LDFLAGS="-Wl,-O1"
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"
SYNC="rsync://wotan.glendale/gentoo-portage"
USE="acl amd64 berkdb bzip2 cli cracklib crypt cups cxx dri gdbm gpm hardened iconv justify mmx modules mudflap ncurses nls nptl nptlonly openmp pam pcre perl pic pppd python readline reflection session spl sse sse2 ssl sysfs tcpd unicode urandom xorg 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="proxy proxy_http auth_digest 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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Doktor Notor 2010-02-28 16:03:16 UTC
I really don't understand what are you after here, the command doesn't make any sense.

man emerge:
<snip>
Skips the packages specified on the command-line that have already been installed.
</snip>

So, it skips world... what exactly do you expect to be emerged. 
Comment 2 Samuel Penn 2010-02-28 18:28:38 UTC
It used to make sense. Prior to 2.1.7.16, --noreplace did update existing packages to newer versions, it just suppressed the rebuild of packages which didn't require an update.

There's some discussion here:
http://forums.gentoo.org/viewtopic.php?p=6189000#6189000

Prior to 2.1.7.16, the behaviour of emerge was:

emerge world : Rebuild or update everything in the world file.

emerge --noreplace world : Update out of date packages in the world file, plus minimal dependencies.

emerge --update world : Update out of date packages in the world file, plus many dependencies.

So "emerge --noreplace world" did actually do something. e.g., on a system running portage 2.1.6.13, I get the following result using "--noreplace":

fenris ~ # emerge -p --noreplace world 

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

Calculating dependencies... done!
[ebuild  N    ] media-libs/libdiscid-0.1.1
[ebuild     UD] sys-apps/hotplug-20040923-r1 [20040923-r2]
[ebuild  NS   ] sys-kernel/gentoo-sources-2.6.31-r6 [2.6.9-r14, 2.6.11-r7, 2.6.11-r11, 2.6.12-r6, 2.6.12-r10, 2.6.15-r4, 2.6.15-r5, 2.6.15-r7, 2.6.16-r7, 2.6.16-r12, 2.6.17-r4, 2.6.17-r7, 2.6.17-r8, 2.6.18-r6, 2.6.20-r7, 2.6.20-r8, 2.6.22-r2, 2.6.22-r8, 2.6.24-r4, 2.6.25-r7, 2.6.27-r7] USE="-build -symlink"
[ebuild     U ] sys-fs/fuse-2.8.1 [2.7.0]
[ebuild     U ] sys-fs/udev-146-r1 [124-r1] USE="devfs-compat%* -extras%"
...

Since I've been using this functionality since 2.1.6.4 (when the default behaviour of "emerge world" was changed), it now doesn't do what I'd expect (and want) under the new version of portage (i.e., the old default behaviour of "emerge world").

There seems to be mixed thoughts on whether the prior behaviour was a bug which has now been fixed, or whether the new behaviour is a bug.

If the new behaviour is deliberate, what's the equivalent command to get the old behaviour?
Comment 3 Doktor Notor 2010-02-28 18:48:03 UTC
It never made any sense to use world with --noreplace. You can 

- either use this to stick something that you don't want depcleaned to world (e.g.: emerge --noreplace =sys-kernel/gentoo-sources-2.6.30-r5)
- or use it if you grab a looong list of packages somewhere and actually only want to emerge those that you don't have installed yet or are outdated

emerge --noreplace a b c d e f ... x y z

> emerge --noreplace world : Update out of date packages in the world file, plus
> minimal dependencies.

No, that never worked like that...

> emerge --noreplace world : Update out of date packages in the world file, plus
> minimal dependencies.

What kind of minimal dependencies are you talking about? You can use

emerge -u world (without dependencies that are not in world as well)
emerge -uD world (incl. dependencies not in world)
emerge -uD --with-bdeps y world (incl. dependencies not in world and those that are build-time *only* dependencies)

--noreplace does not make any sense when used with world at all.

Comment 4 Doktor Notor 2010-02-28 18:59:28 UTC
Also, there's --nodeps if you don't want even direct dependencies upgraded but note that those are there for a reason since the newer version is generally required. So ignoring them is a bad idea and will result in INVALID and pointless "bugs". If you have systems so desperately outdated that you have even totally obsolete stuff like sys-apps/hotplug still installed, then a fresh clean reinstall from stage-3 will be a lot less painful. 
Comment 5 Samuel Penn 2010-02-28 20:28:27 UTC
(In reply to comment #4)
> > emerge --noreplace world : Update out of date packages in the world
> > file, plus minimal dependencies.
> 
> No, that never worked like that...

Um, yes it did. It is currently working like that on one of my systems,
and has worked like that for the last year on about a dozen different
systems I've used. The fragment I listed showing the output of
"emerge --noreplace" above proves it.

It may be that it wasn't meant to work like that, but until last week
that's how it worked on many (see next comment) of the systems I've
used (and though I built most of them, I didn't build all of them).

> What kind of minimal dependencies are you talking about? You can use
>
> emerge -u world (without dependencies that are not in world as well)

Um, really? The output below has been edited for brevity:

heimdall ~ # emerge -p squirrelmail
[ebuild  NS   ] mail-client/squirrelmail-1.4.19 [1.4.17]

heimdall ~ # emerge -pu squirrelmail
[ebuild     U ] perl-core/DB_File-1.820 [1.815]
[ebuild     U ] virtual/perl-DB_File-1.820 [1.815]
[ebuild  NS   ] mail-client/squirrelmail-1.4.19 [1.4.17]

heimdall ~ # grep perl /var/lib/portage/world
heimdall ~ #

Neither DB_File nor perl-DB_File are in my world file, yet both are
pulled in when I perform an "emerge -u". Note that I get a similar
result if I run emerge on 'world' rather than just 'squirrelmail'.

In the past I've found that -u touches a lot more packages than I'm
happy with (e.g., upgrading the whole of X, rather than just a single
application), so I tend not to use it for regular updates.

> --noreplace does not make any sense when used with world at all.

It did on my systems, where apparently it works differently :-)
Comment 6 Samuel Penn 2010-02-28 20:36:46 UTC
Something that just occurred to me, is that some of my virtual machines
have had a problem in that emerge wasn't apparently working. Just going
back to check it, and I can verify that "emerge --noreplace world" does
nothing. These VMs are Linux-VServer guests. I just assumed that there
was something broken in the way they shared the /usr/portage directory
with the host, and hadn't had time to investigate since individual
package installs worked fine. Checking now, and "emerge -u world" does
work.

It looks like they are exhibiting the behaviour of 
"emerge --noreplace" that I'll assume is correct, rather than the
behaviour I've come to expect.

They have different profiles to the non-virtual machines, and are
using baselayout-2 with portage 2.2_rc44, which may be why they're
different.

Comment 7 Doktor Notor 2010-02-28 21:01:38 UTC
I'd suggest to move this to forums.gentoo.org; if you we relying on some weird buggy behaviour which occured for you on rather outdated boxes, then it is simply gone and you need to switch to using portage properly. --noreplace behaves exactly as described in man emerge. Also, things like portage-2.2_rc44 are no longer in the tree for a long time, so switch to something that exists and can be used for reproducing some behaviour if you want any support.

emerge -u pulls in direct dependencies, -uD indirect ones as well. That's as designed, the dependencies are there because they are needed, not to annoy users. Also, you have tons of stuff installed that's no longer in the tree so you'll always get upgrade for that (perl-core/DB_File-1.820 is the *only* version in the tree ATM). 
Comment 8 Samuel Penn 2010-02-28 21:32:56 UTC
(In reply to comment #7)
> I'd suggest to move this to forums.gentoo.org; if you we relying on
> some weird buggy behaviour which occured for you on rather outdated
> boxes...

One last thing I will say, is that one of the boxes was built in
November so can't be *that* outdated, and exhibited the same behaviour
as the ones built in 2004.

I'll leave any more comments to the forum.

Thanks.
Comment 9 Doktor Notor 2010-02-28 21:55:22 UTC
Yeah... will be a better place for discussing stuff. So, last note - if you do NOT want something upgraded, then /etc/portage/package.mask is the place to do this, not --noreplace, --nodeps or whatever similar.
Comment 10 Marius Mauch 2010-03-01 01:30:37 UTC
This is a regression. Please assign it to dev-portage@g.o so Zac can fix it.
Comment 11 Zac Medico gentoo-dev 2010-03-01 20:51:04 UTC
*** This bug has been marked as a duplicate of bug 281008 ***
Comment 12 Marius Mauch 2010-03-04 08:04:58 UTC
Zac, is there a way to restore the old --noreplace behavior? (I assume that --update still includes first-level deps).
Comment 13 Zac Medico gentoo-dev 2010-03-04 10:52:34 UTC
(In reply to comment #12)
> Zac, is there a way to restore the old --noreplace behavior? (I assume that
> --update still includes first-level deps).

No, --update doesn't do that anymore. You can use --deep=1 if you want the old --update behavior (I assume you don't). Also, you can use --selective=n if you want to force non-selective behavior with --update (you probably don't want to do that either).

Anyway, the new `emerge -pu world` is equivalent to the old `emerge -pn world`.