Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 81947 - Upgrading perl gives wrong path to perl-cleaner
Summary: Upgrading perl gives wrong path to perl-cleaner
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-13 20:07 UTC by Ed Grimm
Modified: 2005-03-20 02:50 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 Ed Grimm 2005-02-13 20:07:47 UTC
I just upgraded from perl-5.8.5-r2 to perl-5.8.5-r4 and was told that, having just changed my perl version, I should run /var/tmp/portage-pkg/perl-5.8.5-r4/inf/files/perl-cleaner.  Only
problem is, there is no such file.  I did find /usr/portage/dev-lang/perl/files/perl-cleaner.  In
any event, emerge should give a real path to the script.  It certainly shouldn't report a temporary
file location that'll be purged before emerge exits.

Reproducible: Didn't try
Steps to Reproduce:
Comment 1 Michael Cummings (RETIRED) gentoo-dev 2005-02-17 10:32:23 UTC
That doesn't make sense...

perl-5.8.2-r2.ebuild:   eerror "${FILESDIR}/perl-cleaner "
perl-5.8.2-r3.ebuild:   eerror "${FILESDIR}/perl-cleaner "
perl-5.8.4-r2.ebuild:   eerror "${FILESDIR}/perl-cleaner "
perl-5.8.4-r3.ebuild:   eerror "${FILESDIR}/perl-cleaner "
perl-5.8.5-r3.ebuild:   eerror "${FILESDIR}/perl-cleaner "
perl-5.8.5-r4.ebuild:   eerror "${FILESDIR}/perl-cleaner "
perl-5.8.6-r2.ebuild:   eerror "${FILESDIR}/perl-cleaner "
perl-5.8.6-r3.ebuild:   eerror "${FILESDIR}/perl-cleaner "

and from man 5 ebuild:
FILESDIR = "${PORTDIR}/${CATEGORY}/${PN}/files"

where ${PORTDIR} is defined in your make.conf as being the location of your portage tree (in the vanilla scenario, /usr/portage/).
Comment 2 Michael Cummings (RETIRED) gentoo-dev 2005-02-17 10:32:42 UTC
plus i can in no way dup this - reports back the right path to $FILESDIR over here
Comment 3 Derek Berube 2005-03-03 10:36:48 UTC
I just re-emerged perl to use the ithreads use flag and got the same error message.

My make.conf has PORTDIR defined as being /usr/portage.  Here is the message that I get: 

* You have changed versions of perl. It is recommended
 * that you run
 * /var/tmp/portage-pkg/perl-5.8.6-r3/inf/files/perl-cleaner
 * to assist with this transition. This script is capable
 * of cleaning out old .ph files, rebuilding modules for
 * your new version of perl, as well as re-emerging
 * applications that compiled against your old libperl.so
 *
 * PLEASE DO NOT INTERRUPT THE RUNNING OF THIS SCRIPT.
 * Part of the rebuilding of applications compiled against
 * your old libperl involves temporarily unmerging
 * them - interruptions could leave you with unmerged
 * packages before they can be remerged.
 *
 * If you have run the rebuilder and a package still gives
 * you trouble, and re-emerging it fails to correct
 * the problem, please check http://bugs.gentoo.org/
 * for more information or to report a bug.
 *
 *


wildstar ~ # emerge info
Portage 2.0.51.18 (default-linux/x86/2005.0, gcc-3.4.3, glibc-2.3.4.20050125-r0, 2.6.10-gentoo-r7 i686)
=================================================================
System uname: 2.6.10-gentoo-r7 i686 Intel(R) Pentium(R) 4 Mobile CPU 2.00GHz
Gentoo Base System version 1.6.9
Python:              dev-lang/python-2.2.3-r5,dev-lang/python-2.3.5 [2.3.5 (#1, Feb 17 2005, 23:55:16)]
dev-lang/python:     2.2.3-r5, 2.3.5
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r4
sys-devel/libtool:   1.5.10-r5
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=i686 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=i686 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig buildpkg candy ccache distlocks sandbox sfperms"GENTOO_MIRRORS="ftp://gentoo.mirrors.pair.com/ http://www.gtlib.cc.gatech.edu/pub/gentoo ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo http://gentoo.mirrors.pair.com/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/bmg-main /usr/local/bmg-gnome-current"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X aalib alsa apm arts avi berkdb bitmap-fonts bonobo cdr crypt cups curl dvd emboss encode esd f77 fam flac foomaticdb fortran gdbm gif gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile imagemagick imlib ipv6 jack java jpeg junit kerberos krb4 ldap libg++ libwww mad mikmod motif mozilla mpeg mysql nas ncurses nls oggvorbis opengl oss pam pcmcia pdflib perl png postgres python quicktime readline samba scanner sdl slang spell ssl svga tcltk tcpd tiff truetype truetype-fonts type1-fonts usb xml xml2 xmms xv zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS
Comment 4 Ed Grimm 2005-03-16 23:27:12 UTC
My suspicion is that it's a consequence of how FEATURES="sandbox" is implemented - at the time that warning/eerror is produced, emerge is chrooted.  Michael, are you using sandbox?
Comment 5 Michael Cummings (RETIRED) gentoo-dev 2005-03-17 04:16:14 UTC
Sanbox is enabled over here. Don't suppose either of these are binary package installs? (suggestion from a portage dev)
Comment 6 TGL 2005-03-17 04:40:51 UTC
> Don't suppose either of these are binary package installs? 

I think that the 'buildpkg' and 'buildsyspkg' FEATURES, or the emerge '-b' option, are enough to trigger that issue. Basically, what happens is that the {pre,post}inst steps are done using the binary package that have just been created, hence the wrong $FILESDIR value. 

I can't think of any easy fix, I suggest you make your package actually install that script somewhere.

Anyway, it's probably a bad idea to reference anything in $FILESDIR but during the build steps, because you can't assume people will have this files (think of those using binary packages only).
Comment 7 Ed Grimm 2005-03-17 22:09:42 UTC
In response to comment #6,
I agree about the not using $FILESDIR.  I'll readily admit, my first reaction upon seeing the message
wasn't to wonder why the file was in /var/tmp; it was to wonder why this file was not installed as
part of the package - it should be /usr/bin/perl-cleaner, or /usr/share/doc/perl/perl-cleaner, or
something similar.

And yes, I do also have buildpkg turned on - I have several machines and don't want to recompile
everything on every machine, and further, I find it very useful for quick backouts for when Gentoo
decides to break things on me.
Comment 8 Michael Cummings (RETIRED) gentoo-dev 2005-03-20 02:50:50 UTC
Seems both of us are right (took this to the -dev list) - depending on how perl is being installed, say from binary pkg for instance, $FILESDIR can reflect an incorrect path. I've changed the post merge block to reference cat/pkg instead of attempting to pull it from a var. Sorry for the inconvenience,

-Mike