Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 219866 - emerge --newuse forces unnecessary reinstallation
Summary: emerge --newuse forces unnecessary reinstallation
Status: RESOLVED INVALID
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: High normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-30 18:02 UTC by Marc Finet
Modified: 2008-05-12 11:06 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 Marc Finet 2008-04-30 18:02:57 UTC
emerge -vaN ncurses forces ncurses to be re-installed while 'new' flags are (forced) disabled.

Reproducible: Always

Steps to Reproduce:
1. equery u ncurses
2. emerge -vau ncurses


Actual Results:  
emerge -vau ncurses gives:
[ebuild   R   ] sys-libs/ncurses-5.6-r2  USE="gpm unicode -debug -doc -minimal -nocxx -profile -trace (-bootstrap%) (-build%)" 2,353 kB

While the two added USE flags are forced to be disabled, and 
equery u ncurses gives:
[ Found these USE variables for sys-libs/ncurses-5.6-r2 ]
 U I
 - - bootstrap : !!internal use only!! DO NOT SET THIS FLAG YOURSELF!, used during original system bootstrapping [make stage2]
 - - build     : !!internal use only!! DO NOT SET THIS FLAG YOURSELF!, used for creating build images and the first half of bootstrapping [make stage1]
 - - debug     : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see http://www.gentoo.org/proj/en/qa/backtraces.xml
 - - doc       : Adds extra documentation (API, Javadoc, etc)
 + + gpm       : Adds support for sys-libs/gpm (Console-based mouse driver)
 - - minimal   : Install a very minimal build (disables, for example, plugins, fonts, most drivers, non-critical features)
 - - nocxx     : Disable support for C++ (DON'T USE THIS UNLESS YOU KNOW WHAT YOU'RE DOING)
 - - profile   : Adds support for software performance analysis (will likely vary from ebuild to ebuild)
 - - trace     : Enable test trace() support in ncurses calls
 + + unicode   : Adds support for Unicode

Expected Results:  
emerge -vaN nurses should say no re-installation needed.

This might be linked to bug #116955 (as some comments suggest this case; but it  should be nice that to take this case into account while solving this bug).
Looking at code doesn't give me too much clues as i'm not used to python/portage hacking, hence i could not provide patch ;(.

What i found (i might be wrong) is that equery seems to use p.get_use_flags().split()  (equery:574) to know which USE-flags were used during install while emerge uses vardb.aux_get(cpv, ["IUSE"])[0] (emerge:2912).

During analysis/tracing, i did not understood why "installed" (emerge:2962) was not set though.
portage version: 2.1.5-r6
[emerge --info will follow], and FEATURES=python-trace  emerge -vaN --debug ncurses > emerge.-vaN.ncurses.debug 2>&1 take 151 Mo but could be "attached" if needed.
Comment 1 Marc Finet 2008-04-30 18:03:24 UTC
Portage 2.1.5_rc6 (default-linux/amd64/2006.0, gcc-4.2.3, glibc-2.7-r2, 2.6.25-gentoocyann x86_64)
=================================================================
System uname: 2.6.25-gentoocyann x86_64 AMD Sempron(tm) Processor 3000+
Timestamp of tree: Mon, 28 Apr 2008 21:16:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r4, 2.5.2-r2
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.2
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.62
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.25-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe -Wall"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=k8 -O2 -pipe -Wall"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig candy distlocks moo parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.switch.ch/mirror/gentoo/"
LANG="en_US"
LC_ALL="en_US"
LDFLAGS=""
LINGUAS="en_GB en_US en fr fr_FR"
PKGDIR="/usr/portage/packages"
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="/usr/portage/local/layman/pro-audio /usr/portage/local/layman/miro-overlay /usr/local/portage"
SYNC="rsync://rsync.fr.gentoo.org/gentoo-portage"
USE="X a52 aac aalib alsa amd64 bash-completion berkdb bitmap-fonts bzip2 cairo cdparanoia cli colordiff cracklib crypt cscope cups curl d dga directfb dri dvd dvdread emboss encode exif fbdev firefox flac foomaticdb fortran gif glitz gphoto2 gpm gstreamer gtk gtk2 hal iconv imlib ipv6 isdnlog jack jpeg kde ladspa libcaca lm_sensors lzw lzw-tiff mad matroska midi mp3 mpeg msn mudflap multiuser ncurses nethack nls nptl nptlonly nsplugin ntfs objc ogg oggvorbis opengl pam pcre pdf perl png pppd prediction python qt3 qt4 quicktime readline reflection sdl sensord session spell spl ssl svg tcpd theora threads tiff truetype truetype-fonts type1-fonts unicode usb userlocales vorbis wifi wxwindows x264 xorg xpm xv xvid xvmc 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 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 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" CAMERAS="canon ptp2" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB en_US en fr fr_FR" USERLAND="GNU" VIDEO_CARDS="vesa vga via fbdev"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 2 Zac Medico gentoo-dev 2008-04-30 18:42:11 UTC
(In reply to comment #0)
> [ebuild   R   ] sys-libs/ncurses-5.6-r2  USE="gpm unicode -debug -doc -minimal
> -nocxx -profile -trace (-bootstrap%) (-build%)" 2,353 kB

It's rebuilding because the "bootstrap" and "build" flags have been removed from IUSE. In similar cases there is often a valid reason to rebuild (though probably not in this particular case). There is a --reinstall=changed-use option that should behave more like you want.
Comment 3 Marc Finet 2008-05-12 11:06:16 UTC
(In reply to comment #2)
> It's rebuilding because the "bootstrap" and "build" flags have been removed
> from IUSE. In similar cases there is often a valid reason to rebuild (though
> probably not in this particular case). There is a --reinstall=changed-use
> option that should behave more like you want.
Exactly ! I saw this option while reading manual, but didn't thought such a complicated flag was needed ;D, but even if reasons to rebuild do not appears to me as 'obvious' i do definitely understand that it's safer.