Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 126038 - revdep-rebuild in app-portage/gentoolkit-0.2.2_pre3 ignores SEARCH_DIRS_MASK
Summary: revdep-rebuild in app-portage/gentoolkit-0.2.2_pre3 ignores SEARCH_DIRS_MASK
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords: InVCS
: 126998 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-03-13 03:25 UTC by Neil Bothwick
Modified: 2006-06-19 20:34 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
revdep-rebuild patch (revdep-rebuild.126038.patch,956 bytes, patch)
2006-03-21 07:31 UTC, Paul Varner (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Neil Bothwick 2006-03-13 03:25:59 UTC
The latest revdep-rebuild wants to rebuild openoffice-bin despite make.conf containing

SEARCH_DIRS_MASK="/usr/lib32/openoffice"

revdep-rebuild -vv shows

SEARCH_DIRS_MASK="/opt/opera/lib/opera/plugins /opt/opera/lib/opera/plugins /opt/opera/lib/opera/plugins"

which appears to be coming from /etc/env.d/90opera


Portage 2.1_pre5-r4 (default-linux/amd64/2006.0, gcc-3.4.5, glibc-2.4-r0, 2.6.15-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.15-gentoo-r7 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.12.0_pre16
ccache version 2.4 [enabled]
dev-lang/python:     2.4.2-r1
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r4
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe -fomit-frame-pointer -funit-at-a-time"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/env.d /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/init.d /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-march=athlon64 -O2 -pipe -fomit-frame-pointer -funit-at-a-time"
DISTDIR="/mnt/portage/distfiles"
EMERGE_DEFAULT_OPTS="--alphabetical"
FEATURES="autoconfig buildpkg ccache distlocks parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="ftp://gentoo.digimed.co.uk/ ftp://ftp.heanet.ie/pub/gentoo/ ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo/ ftp://ftp.easynet.nl/mirror/gentoo/"
LANG="en_GB"
LINGUAS="en_GB"
MAKEOPTS="-j2"
PKGDIR="/mnt/portage/packages/hactar"
PORTAGE_TMPDIR="/mnt/scratch"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/mnt/portage/local"
SYNC="rsync://desiato/gentoo"
USE="amd64 X aalib alsa apache2 artswrappersuid asf audiofile avi berkdb bitmap-fonts bluetooth bzip2 cddb cdr crypt cups curl dbus directfb divx4linux dri dv dvd dvdr dvdread encode exif fam ffmpeg flac foomaticdb gdbm gif gimpprint gphoto2 gpm gtk gtk2 hal ieee1394 imagemagick imlib jabber java jbig jpeg jpeg2k kde kdeenablefinal kipi lesstif libwww lirc lm_sensors lzw lzw-tiff mad mailwrapper mng mono mp3 mpeg musicbrainz mysql ncurses nptl nptlonly nsplugin offensive ogg oggvorbis opengl oss pdflib perl pic png ppds python qt quicktime readline samba scanner sdl slp spell ssl tcltk tcpd theora threads tiff truetype truetype-fonts type1-fonts udev usb v4l v4l2 vorbis xcomposite xfs xml2 xpm xprint xscreensaver xv xvid zlib zvbi elibc_glibc kernel_linux linguas_en_GB userland_GNU video_cards_nvidia"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-03-13 09:40:49 UTC
Such stuff belongs into /etc/revdep-rebuild/99revdep-rebuild, not into make.conf.
Comment 2 Neil Bothwick 2006-03-13 09:54:18 UTC
Not according to the man page

       ...
       SEARCH_DIRS_MASK - List of directories to not search

       These  variables  can be prepended to either by setting the variable
       in your environment prior to execution, or by placing  an  entry  in
       /etc/make.conf.
Comment 3 Neil Bothwick 2006-03-13 10:29:52 UTC
OK, /etc/revdep-rebuild/99revdep-rebuild works, but the docs still say make.conf, the previous versions worked with make.conf and the ebuild makes no mention of the change in its ewarn/einfo output.
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2006-03-20 12:36:52 UTC
*** Bug 126998 has been marked as a duplicate of this bug. ***
Comment 5 Paul Varner (RETIRED) gentoo-dev 2006-03-20 13:01:40 UTC
It's broken with portage-2.1, you are supposed to be able to override in /etc/make.conf
Comment 6 Paul Varner (RETIRED) gentoo-dev 2006-03-20 13:08:02 UTC
portage team:

portageq changed behavior sometime between 2.0.54 and 2.1.
I'm using the following code in revdep-rebuild:

PRELIMINARY_SEARCH_DIRS_MASK="$SEARCH_DIRS_MASK $(portageq envvar SEARCH_DIRS_MASK)"

That works with portage-2.0.54, but no longer returns a value with at least 2.1_pre6-r4, I haven't tested the earlier versions to see where the change occurred.

So is this the desired behavior going forward or is it a bug?
Comment 7 Zac Medico gentoo-dev 2006-03-20 14:11:56 UTC
(In reply to comment #6)
> PRELIMINARY_SEARCH_DIRS_MASK="$SEARCH_DIRS_MASK $(portageq envvar SEARCH_DIRS_MASK)"

The above should work, assuming that SEARCH_DIRS_MASK='' isn't exported in the environment.  If I do `portageq envvar SEARCH_DIRS_MASK` with 2.1_pre6-r5, it seems to correctly pull SEARCH_DIRS_MASK from make.conf.
Comment 8 Paul Varner (RETIRED) gentoo-dev 2006-03-20 15:01:22 UTC
I must be overtired from my 14 hour workday, because now it is working fine and I haven't changed anything.

Original reporters:
What do the following return:
$ grep SEARCH_DIRS_MASK /etc/revdep-rebuild/*
$ env | grep SEARCH_DIRS_MASK
$ revdep-rebuild -vv --ignore --pretend
Comment 9 Marius Mauch (RETIRED) gentoo-dev 2006-03-20 15:28:37 UTC
From what I understand the OP simply used to set SEARCH_DIR_MASK in make.conf, which stopped working when a package set it in /etc/env.d which is to be expected unless it is an incremental (which it isn't).
So at most I think this is outdated/wrong docs.
Comment 10 Neil Bothwick 2006-03-20 16:15:26 UTC
#  grep SEARCH_DIRS_MASK /etc/revdep-rebuild/*
/etc/revdep-rebuild/99revdep-rebuild:# SEARCH_DIRS_MASK - List of directories to not search
/etc/revdep-rebuild/99revdep-rebuild:SEARCH_DIRS_MASK="/usr/lib32/openoffice"

This was only added after reporting the bug.

#  env | grep SEARCH_DIRS_MASK
SEARCH_DIRS_MASK=/opt/opera/lib/opera/plugins

This is from /etc/env.d, added by the Opera ebuild. It would be a good idea if other binary ebuilds did this.

# revdep-rebuild -vv --ignore --pretend
Configuring search environment for revdep-rebuild

revdep-rebuild environment:
SEARCH_DIRS="/usr/qt/3/ /bin/ /sbin/ /usr/bin/ /usr/sbin/ /lib/ /lib32/ /lib64/ /libdirs/ /usr/lib/ /usr/lib32/ /usr/lib64/ /usr/libdirs/ /usr/libexec/ /opt/bin/ /usr/x86_64-pc-linux-gnu/gcc-bin/3.4.5/ /opt/blackdown-jdk-1.4.2.03/bin/ /opt/blackdown-jdk-1.4.2.03/jre/bin/ /usr/bin/ /usr/kde/3.5/sbin/ /usr/kde/3.5/bin/ /usr/qt/3/bin/ /opt/vmware/workstation/bin/ /lxf/bin/ ~nelz/bin/ /usr/local/bin/ /opt/bin/ /usr/x86_64-pc-linux-gnu/gcc-bin/3.4.5/ /opt/blackdown-jdk-1.4.2.03/bin/ /opt/blackdown-jdk-1.4.2.03/jre/bin/ /usr/bin/ /usr/kde/3.5/bin/ /usr/qt/3/bin/ /usr/games/bin/ /opt/vmware/workstation/bin/ /opt/limewire/ /lxf/bin/ ~nelz/bin/ /usr/local/bin/ /usr/local/lib/ //usr/lib32/opengl/nvidia/lib/ //usr/lib64/opengl/nvidia/lib/ /lib/ /usr/lib/ /usr/local/lib/ /lib32/ /usr/lib32/ /usr/local/lib32/ /lib64/ /usr/lib64/ /usr/local/lib64/ /usr/x86_64-pc-linux-gnu/lib/ /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.5/ /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.5/32/ /usr/lib/ /usr/lib/openmotif-2.2/ /opt/blackdown-jdk-1.4.2.03/jre/lib/amd64/ /opt/blackdown-jdk-1.4.2.03/jre/lib/amd64/native_threads/ /opt/blackdown-jdk-1.4.2.03/jre/lib/amd64/client/ /opt/blackdown-jdk-1.4.2.03/jre/lib/amd64/server/ /usr/lib/qt4/ /usr/lib32/qt4/ /usr/lib64/qt4/ /emul/linux/x86/usr/qt/2/lib/ /emul/linux/x86/usr/qt/3/lib/ /usr/kde/3.5/lib/ /usr/kde/3.5//lib64/ /usr/kde/3.5/lib32/ /usr/qt/3/lib/ /usr/qt/3/lib32/ /usr/qt/3/lib64/ /usr/opt/PageStream4/SoftLogik/lib/ /usr/lib/speech-tools/lib/ /emul/linux/x86/lib/ /emul/linux/x86/usr/lib/ /emul/linux/x86/lib/ /emul/linux/x86/usr/lib/ /usr/games/lib/ /usr/lib/libstdc++-v3/"
SEARCH_DIRS_MASK="/opt/opera/lib/opera/plugins /opt/opera/lib/opera/plugins /opt/opera/lib/opera/plugins /usr/lib32/openoffice"
LD_LIBRARY_MASK="libodbcinst.so libodbc.so libjava.so libjvm.so"
PORTAGE_ROOT="/"
CALLED_OPTIONS=""
EMERGE_OPTIONS="--pretend"

Looking at my emerge.log, it is possible that I updated both genkernel and opera since my last use of revdep-rebuild, so it is possible that the latest opera build caused the problem by overriding the setting in make.conf. Now you've moved the config to /etc/revdep-rebuild, this shouldn't be a problem again, provided you document it.
Comment 11 Paul Varner (RETIRED) gentoo-dev 2006-03-21 07:30:53 UTC
Users are not supposed to have to make changes to files in /etc/revdep-rebuild.  What is documented is supposed to work.  Now that I'm awake, I can see the issue. 

The issue is that the environment variable is overriding the entry in /etc/make.conf.

There are two bugs here.  The first is that placing SEARCH_DIRS_MASK in /etc/env.d is unsupported since it is not considered an incremental variable by env-update so the last variable read wins and overwrites the others. This is a bug with the opera ebuild.

The second bug is that I'm not clearing the environment before reading the value from /etc/make.conf using portageq, this is causing portageq to return the value from the environment and not what has been entered in /etc/make.conf.

I will attach a patch that fixes that behavior.
Comment 12 Paul Varner (RETIRED) gentoo-dev 2006-03-21 07:31:32 UTC
Created attachment 82783 [details, diff]
revdep-rebuild patch
Comment 13 Neil Bothwick 2006-03-21 07:42:23 UTC
OK, that works. Thanks.

However, you should also change the text at the top of /etc/revdep-rebuild/99revdep-rebuild if users are not supposed to edit this

"# revdep-rebuild no longer uses hardcoded paths. To change the default
 # behavior the following variables can be changed:"

implies that is exactly what they should do.
Comment 14 Paul Varner (RETIRED) gentoo-dev 2006-03-21 10:09:41 UTC
If a user wants to edit a file in /etc/revdep-rebuild to make a change, I have no issues with that.  However with that said, those files are not config protected, which means they will get overwritten and/or deleted, unless the user adds the directory to their CONFIG_PROTECT variable.  The design for revdep-rebuild is:

environment settings - one time changes by user
/etc/make.conf - permanent changes by user
/etc/revdep-rebuild/* - permananent changes by ebuild authors

revdep-rebuild processes the variables in that order with the higher levels taking precendence.

I will go ahead and make changes to the documentation to document better.
Comment 15 Paul Varner (RETIRED) gentoo-dev 2006-05-22 20:33:38 UTC
Fix was released in gentoolkit-0.2.2_pre4, updated man page will be released in gentoolkit-0.2.2_pre5
Comment 16 Paul Varner (RETIRED) gentoo-dev 2006-06-19 20:34:13 UTC
Released in gentoolkit-0.2.2