Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 30357 - emerge --upgradeonly does not always work
Summary: emerge --upgradeonly does not always work
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-04 19:25 UTC by Jeremy Huddleston (RETIRED)
Modified: 2011-10-30 22:18 UTC (History)
1 user (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 Jeremy Huddleston (RETIRED) gentoo-dev 2003-10-04 19:25:38 UTC
--upgradeonly will allow a downgrade if the ebuild for the installed version
nolonger exists.  The expected behavior would be to not downgrade.

Additionally, I can't figure out why it wants to downgrade my KDE.  kde-3.1.4
ebuilds are all there still...

~ $ emerge -Upv world
>>> --upgradeonly implies --update... adding --update to options.

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

Calculating world dependencies ...done!
[ebuild     UD] kde-base/arts-1.1.2 [1.1.4] +alsa +oggvorbis -artswrappersuid
[ebuild     UD] app-doc/kdelibs-apidocs-3.1.2 [3.1.4]
[ebuild     UD] kde-base/kdelibs-3.1.2-r1 [3.1.4] +alsa +cups +ipv6 +ssl
[ebuild     UD] kde-base/kdebase-3.1.2 [3.1.4] -ldap +pam +motif +encode
+oggvorbis +cups +ssl +opengl +samba +java
[ebuild     UD] kde-base/kdenetwork-3.1.2 [3.1.4]
[ebuild     UD] kde-base/kdebindings-3.1.2 [3.1.3] +mozilla +java +python
[ebuild  N    ] app-office/abiword-2.0.0  +spell +jpeg +xml2 +gnome
[ebuild  N    ] dev-php/mod_php-4.3.3-r1  +apache2 +X +crypt +curl -firebird
+flash -freetds +gd +gd-external +gdbm +imap -informix +ipv6 +java +jpeg -ldap
+mcal -memlimit +mysql +nls +oci8 +odbc +pam +pdflib +png +postgres +qt +snmp
+spell +ssl +tiff +truetype +xml2 +berkdb

   ] app-office/abiword-2.0.0  +spell +jpeg +xml2 +gnome
[ebuild  N    ] dev-php/mod_php-4.3.3-r1  +apache2 +X +crypt +curl -firebird
+flash -freetds +gd +gd-external +gdbm +imap -informix +ipv6 +java +jpeg -ldap
+mcal -memlimit +mysql +nls +oci8 +odbc +pam +pdflib +png +postgres +qt +snmp
+spell +ssl +tiff +truetype +xml2 +berkdb



Reproducible: Always
Steps to Reproduce:
1. delete an ebuild
2. emerge -Upv <package>
3. watch as it wants to allow the downgrade

Actual Results:  
--upgradeonly allows upgrades

Expected Results:  
make --upgradeonly only allow upgrades

~ $ emerge info
Portage 2.0.49-r7 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 2.4.20-gentoo-r6)
=================================================================
System uname: 2.4.20-gentoo-r6 i686 Celeron (Mendocino)
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium2 -mcpu=pentium2 -O3 -pipe -fomit-frame-pointer
-falign-functions=4 -falign-jumps=4 -falign-loops=4"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config
/usr/kde/3/share/config /var/bind /usr/X11R6/lib/X11/xkb
/usr/kde/3.1/share/config /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/afs/C /etc/afs/afsws /etc/env.d"
CXXFLAGS="-march=pentium2 -mcpu=pentium2 -O3 -pipe -fomit-frame-pointer
-falign-functions=4 -falign-jumps=4 -falign-loops=4"
DISTDIR="/usr/local/download/portage/distfiles"
FEATURES="ccache autoaddcvs sandbox buildpkg userpriv usersandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/local/download/portage/packages-pentium2"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/download/portage"
SYNC="rsync://localhost/gentoo-portage"
USE="x86 oss apm avi crypt cups encode foomaticdb gif jpeg libg++ mad mikmod mmx
mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib directfb
gtkhtml alsa gdbm berkdb slang readline arts tetex aalib nas bonobo svga ggi
tcltk java guile ruby mysql postgres X sdl gpm tcpd pam libwww ssl perl python
esd imlib oggvorbis gnome gtk qt kde motif opengl mozilla gphoto2 snmp cdr
scanner 3ds acl acpi afs altivec amd apache2 ardour-ksi atlas autofs bidi
bindist clamav clisp cmucl cscope curl dga dnd doc dv dvb dvd emacs emacs-w3
ethereal evo expat faad fax fbcon fbdev ffmpeg flash gb gcl gd gd-external glut
gmtfull gmthigh gmtsuppl gmttria gnomedb gps gstreamer gtk2 hbci icc imagemagick
imap innodb ipalias ipv6 jack javascript jbig jikes joystick junit justify
kerberos ladcca lcd lcms ldam leim libdsk libg libgda lids lirc lmtp ltsp lua
lucid mbox mcal md5sum milter mng mozaccess mozcalendar mozctl mozinterfaceinfo
mozp3p mozsvg mozxmlterm mpi mule music neXt nviz oav objc oci8 odbc offensive
ofx oldworld openal parse-clocks passfile pcap pcmcia pda php pic plotutils pnp
ppds prelude psyco qhull rplay S3TC samba sasl skey slp socks5 sox sqlite src
tiff transcode transparent-proxy trusted type1 usb vim-with-x wmf wxwin
wxwindows X509 Xaw3d xchattext xine xinerama xml xosd xvid zeo"
Comment 1 John Robinson 2003-12-12 20:28:33 UTC
I can confirm the above.

--upgradeonly will also allow a downgrade if the USE flags have changed. This may be the desired behaviour but it's no good to me:

# emerge -pU world
>>> --upgradeonly implies --update... adding --update to options.

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

Calculating world dependencies ...done!
[ebuild     U ] sys-apps/man-pages-1.64 [1.60]
[ebuild     UD] sys-apps/baselayout-1.8.6.10-r1 [1.8.6.12]
[ebuild     U ] sys-devel/gcc-config-1.3.4 [1.3.3-r1]
[ebuild     U ] sys-devel/gcc-3.2.3-r3 [3.2.3-r2]
[ebuild     U ] sys-libs/glibc-2.3.2-r3 [2.3.2-r1]
[ebuild     U ] sys-apps/util-linux-2.11z-r8 [2.11z-r6]
[ebuild     U ] sys-apps/diffutils-2.8.4-r4 [2.8.4-r3]
[ebuild     U ] sys-apps/vcron-3.0.1-r3 [3.0.1-r2]
[ebuild     U ] net-misc/rsync-2.5.7 [2.5.6-r3]
[ebuild     U ] sys-apps/procps-3.1.12-r1 [3.1.9]
[ebuild     U ] sys-apps/coreutils-5.0-r5 [5.0-r3]
[ebuild     U ] sys-apps/shadow-4.0.3-r9 [4.0.3-r7]
[ebuild     U ] net-misc/openssh-3.7.1_p2-r1 [3.7.1_p2]
[ebuild     U ] net-misc/wget-1.9-r2 [1.8.2-r2]
[ebuild     U ] sys-apps/which-2.16 [2.14]
[ebuild     U ] sys-apps/hotplug-20030805-r2 [20030501-r2]
[ebuild     UD] net-dialup/speedtouch-1.2_beta2 [1.2_beta3]
[ebuild     U ] sys-apps/debianutils-1.16.7-r4 [1.16.7-r3]

(1) I installed the later, masked, baselayout with USE="~x86", at the suggestion of a Gentoo developer. I don't want to `USE="~x86" emerge -U world` because that will upgrade stacks more packages, and I can't `emerge -U` and tell it not to downgrade baselayout.

(2) I made speedtouch-1.2_beta3.ebuild myself, and have submitted a request for it to go in; however before that happens, when I ran `emerge sync` my ebuild got scrubbed (no problem, I knew it would) and so as reported above, `emerge -U` wants to downgrade.
Comment 2 Jeremy Huddleston (RETIRED) gentoo-dev 2003-12-12 22:13:36 UTC
For 2, you can put your own packages in PORTAGE_OVERLAY so they don't get removed when you emerge sync.
Comment 3 John Robinson 2003-12-13 07:09:52 UTC
Thanks for the info, Jeremy; yes I was just explaining how I came to not have the ebuild for the installed version.

Re my previous note, just to clarify, obviously I meant ACCEPT_KEYWORDS="~x86" not USE="~x86", but you know what I mean. It may still be the wrong thing for individually-picked alternate settings to USE and ACCEPT_KEYWORDS to get scrubbed in e.g. `emerge -u world`; can we have some kind of `USE="foo" emerge --i-know-what-i-am-doing-so-dont-you-forget-it package` or `emerge --use-flags-for-this-build-only-and-dont-forget package` (and similar for ACCEPT_KEYWORDS) to indicate to Portage that until we come along later and explicitly say it's allowed to forget our temporarily altered USE or ACCEPT_KEYWORDS, it wouldn't forget, meaning (in my earlier example) that my baselayout wouldn't get downgraded even with `emerge -u world` (i.e. not upgradeonly) whereas another package I'd custom-installed without that extra option would? Or maybe this is just far too complex because of the potential for remembered alternate settings trickling through to dependent packages etc. I suppose I can always try
  emerge `emerge -pu --columns world | awk -- '$2=="U" { print $4; }'`
or something like that. Anyway enough of this babble, as it occurs to me anyway that all this is another bug (feature?) from the original reported one anyway.
Comment 4 John Robinson 2003-12-13 07:20:59 UTC
Oh I see from http://forums.gentoo.org/viewtopic.php?t=33534 that:
  There is currently no way for ACCEPT_KEYWORDS to "stick" to a package or packages, so it is somewhat complicated to mix stable and unstable packages. "Sticky variables" will hopefully become part of Portage. Those interested should follow bug #3252.

So scrub the above babble.

I still think --upgradeonly should not downgrade packages.
Comment 5 SpanKY gentoo-dev 2003-12-13 08:34:05 UTC
actually there is now ...
you can use per-package USE flags ... see Bug 13616
Comment 6 Nicholas Jones (RETIRED) gentoo-dev 2003-12-24 14:01:00 UTC
Merged vs non-existance --- Portage will never assume a merged package is
better if there is no live ebuild for it. You can get around this if you
really want to.

package.use is available in 2.0.50 and ~arch.