Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 266376 - app-text/xpdf-3.02-r2 always thinks it needs recompiling
Summary: app-text/xpdf-3.02-r2 always thinks it needs recompiling
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High minor (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-16 13:20 UTC by Guenther Brunthaler
Modified: 2009-04-20 19:32 UTC (History)
1 user (show)

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


Attachments
Output from Portage's ELOG feature (xpdf_emerge.log,1.96 KB, text/plain)
2009-04-16 13:22 UTC, Guenther Brunthaler
Details
Contents of /var/db/pkg/app-text/xpdf-3.02-r2 directory after emerging (db_pkg.tgz,3.62 KB, text/plain)
2009-04-16 13:27 UTC, Guenther Brunthaler
Details
Contents of /var/db/pkg/app-text/xpdf-3.02-r2 directory after emerging (db_pkg.tgz,3.62 KB, application/octet-stream)
2009-04-16 13:29 UTC, Guenther Brunthaler
Details
My portage override for the package (xpdf,2.84 KB, text/plain)
2009-04-20 16:20 UTC, Guenther Brunthaler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Guenther Brunthaler 2009-04-16 13:20:07 UTC
When emerging app-text/xpdf-3.02-r2 on amd64 (with the "nodrm" USE flag set), it successfully emerges but at the next "emerge -avuDN world" it will be recompiled again, incorrectly assuming the "nodrm" USE flag had changed.


Reproducible: Always

Steps to Reproduce:
1.emerge the package
2.emerge with -uN again in order to check for necessary updating


Actual Results:  
Package will update again although nothing has changed

Expected Results:  
The package should realize it is already up-to-date


While the emerge operation itself successfully completes, a warning

!!! WARNING: Expected SLOT='0', got ''

is issues which might be connected to the cause of the actual problem. I also noticed that indeed no file /var/db/pkg/app-text/xpdf-3.02-r2/SLOT has been created by the emerge operation, although such a file is usually present for other sucessfully installed ebuilds. (On the other hand, the xpdf ebuild uses EAPI==2 and might therefore be installed somehow differently.)
Comment 1 Guenther Brunthaler 2009-04-16 13:22:02 UTC
Created attachment 188563 [details]
Output from Portage's ELOG feature

Note the "!!!"-Line - everything else seems to be how it should be.
Comment 2 Guenther Brunthaler 2009-04-16 13:23:31 UTC
Portage 2.1.6.7 (default/linux/amd64/2008.0/desktop, gcc-4.3.2, glibc-2.8_p20080602-r1, 2.6.27-gentoo-r8-xquad-9.27 x86_64)
=================================================================
System uname: Linux-2.6.27-gentoo-r8-xquad-9.27-x86_64-AMD_Phenom-tm-_9600_Quad-Core_Processor-with-glibc2.2.5
Timestamp of tree: Thu, 16 Apr 2009 11:45:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.7
dev-lang/python:     2.5.2-r7
dev-python/pycrypto: 2.0.1-r8
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -DNDEBUG -pipe -fno-stack-check"
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/local/etc /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/host-variants/ /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=k8 -O2 -DNDEBUG -pipe -fno-stack-check"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--nospinner --with-bdeps=y"
FEATURES="ccache distlocks fixpackages notitles prelink protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://lug.mtu.edu/gentoo/ ftp://gentoo.mirrors.tds.net/gentoo http://gentoo.mirrors.tds.net/gentoo http://gentoo.chem.wisc.edu/gentoo/ http://gentoo-euetib.upc.es/mirror/gentoo/ ftp://gentoo.chem.wisc.edu/gentoo/ ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ ftp://gentoo.in.th/ http://ftp.twaren.net/Linux/Gentoo/ ftp://ftp.twaren.net/Linux/Gentoo/"
LANG="de_AT.utf8"
LDFLAGS="-Wl,-O1"
LINGUAS="de"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_COMPRESS="lzma"
PORTAGE_COMPRESS_FLAGS="-9"
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"
PORTDIR_OVERLAY="/usr/portage/local/layman/mscgen /usr/portage/local/layman/xworld /usr/portage/local/layman/simplux /usr/portage/local/layman/xworld_attic /usr/portage/local/layman/xworld_serviced /usr/portage/local/layman/thirdparty /usr/portage/local/layman/hotfixes /usr/portage/local/overlay"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac aalib acpi alsa amd64 apache2 arts aspell audiofile bash-completion berkdb branding bzip2 cairo caps cddb cdr cleartype cli cracklib crypt css cups curl custom-cflags custom-cxxflags dbus dri dts dv dvd dvdr dvdread ecc emboss encode evo exif expat ffmpeg fftw firefox flac foomaticdb fortran freetype ftp fuse gd gdbm gif gimp glade glut gmp gphoto2 gpm gtk gtk2 hal iconv idea ieee1394 imagemagick imlib isdnlog jack java6 javascript jbig jp2 jpeg jpeg2k kde kdeenablefinal kdehiddenvisibility kdexdeltas kipi kpathsea lame lcms ldap libcaca libclamav libnotify libsamplerate logrotate lzma lzo mad matroska midi mikmod mmap mmx mmxext mng mp3 mpeg mudflap mule multilib musepack musicbrainz ncurses nls nodrm nptl nptlonly nsplugin oav ocamlopt odbc offensive ofx ogg openal opengl openmp pam pcre pdf perl pic png ppds pppd pulseaudio python qt qt3 qt3support qt4 quicktime readline reflection samba sasl screen sdl session sharedmem slang smartcard sndfile sox speex spell spl sqlite sse sse2 sse3 sse4a ssl startup-notification svg sysfs tcltk tetex theora threads threadsafe tiff tk truetype unicode usb userlocales utf8 vcd vde vorbis wxwindows x264 xft xml xorg xosd xpm xrandr xscreensaver xsl xulrunner xv xvid xvmc zlib" ALSA_CARDS="emu10k1" 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="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="evdev joystick keyboard mouse void" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="dummy radeon v4l vesa vga"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_RSYNC_EXTRA_OPTS

Comment 3 Guenther Brunthaler 2009-04-16 13:27:30 UTC
Created attachment 188564 [details]
Contents of /var/db/pkg/app-text/xpdf-3.02-r2 directory after emerging

$ LC_ALL=C tar -czvf db_pkg.tgz /var/db/pkg/app-text/xpdf-3.02-r2
tar: Removing leading `/' from member names
/var/db/pkg/app-text/xpdf-3.02-r2/
/var/db/pkg/app-text/xpdf-3.02-r2/PF
/var/db/pkg/app-text/xpdf-3.02-r2/USE
/var/db/pkg/app-text/xpdf-3.02-r2/EAPI
/var/db/pkg/app-text/xpdf-3.02-r2/SLOT
/var/db/pkg/app-text/xpdf-3.02-r2/CONTENTS
/var/db/pkg/app-text/xpdf-3.02-r2/CATEGORY
/var/db/pkg/app-text/xpdf-3.02-r2/xpdf-3.02-r2.ebuild
/var/db/pkg/app-text/xpdf-3.02-r2/FEATURES
/var/db/pkg/app-text/xpdf-3.02-r2/repository
/var/db/pkg/app-text/xpdf-3.02-r2/CXXFLAGS
/var/db/pkg/app-text/xpdf-3.02-r2/environment.bz2
/var/db/pkg/app-text/xpdf-3.02-r2/COUNTER
/var/db/pkg/app-text/xpdf-3.02-r2/CFLAGS
Comment 4 Guenther Brunthaler 2009-04-16 13:29:24 UTC
Created attachment 188566 [details]
Contents of /var/db/pkg/app-text/xpdf-3.02-r2 directory after emerging

(corrected MIME type of attachment)

$ LC_ALL=C tar -czvf db_pkg.tgz /var/db/pkg/app-text/xpdf-3.02-r2
tar: Removing leading `/' from member names
/var/db/pkg/app-text/xpdf-3.02-r2/
/var/db/pkg/app-text/xpdf-3.02-r2/PF
/var/db/pkg/app-text/xpdf-3.02-r2/USE
/var/db/pkg/app-text/xpdf-3.02-r2/EAPI
/var/db/pkg/app-text/xpdf-3.02-r2/SLOT
/var/db/pkg/app-text/xpdf-3.02-r2/CONTENTS
/var/db/pkg/app-text/xpdf-3.02-r2/CATEGORY
/var/db/pkg/app-text/xpdf-3.02-r2/xpdf-3.02-r2.ebuild
/var/db/pkg/app-text/xpdf-3.02-r2/FEATURES
/var/db/pkg/app-text/xpdf-3.02-r2/repository
/var/db/pkg/app-text/xpdf-3.02-r2/CXXFLAGS
/var/db/pkg/app-text/xpdf-3.02-r2/environment.bz2
/var/db/pkg/app-text/xpdf-3.02-r2/COUNTER
/var/db/pkg/app-text/xpdf-3.02-r2/CFLAGS
Comment 5 Guenther Brunthaler 2009-04-16 15:33:41 UTC
Except for this problem, my system is completely up-to date (stable) with regard to

$ emerge -avuDN --with-bdeps=y world
$ emerge -a --depclean
$ revdep-rebuild -- -a
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2009-04-20 15:52:52 UTC
Please attach your /etc/portage/env/app-text/xpdf to this bug report. It will very likely provide the solution to this problem.
Comment 7 Guenther Brunthaler 2009-04-20 16:20:52 UTC
Created attachment 188969 [details]
My portage override for the package

Actually, this "file" is only a symlink to the actual file

/etc/portage/env/heavily-optimized

which is used by dozens if not hundreds of my ebuilds as /etc/portage/env overrides.

It has always worked so far - this issue would the first case where it failed (if it really should turn out to be the overrides's fault).

To explain in more detail: My standard CFLAGS only include -O2 with no special further optimizations. This is OK for all packages where execution speed is not a concern, and it usually created somewhat smaller executables as such created with -O3 (due to loop unrolling and inlining, for instance).

Packages where speed is a concern, however, I use the env override script attached to this posting in order to modify CFLAGS, FEATURES etc. for heavyweight -O3 optimization.
Comment 8 Guenther Brunthaler 2009-04-20 16:25:49 UTC
(In reply to comment #6)
> Please attach your /etc/portage/env/app-text/xpdf to this bug report. It will
> very likely provide the solution to this problem.

Here it is - see the previous posting.

I have carefully written the script in order to minimize the possibility for name clashes, but it might turn out I made some mistake of course.
Comment 9 Guenther Brunthaler 2009-04-20 16:39:03 UTC
Explaining what my script does (or *should* do):

Firstly, if the USE flag for a package include "debug", it does not do anything by itself but sources another override script /etc/portage/env/debugging instead. This way I do not need to change the symlinks if I set the "debug" USE flag temporarily. However, this does not apply to this bug report, as I am not using the "debug" USE flag with this ebuild.

Secondly, all locally used variables should have been declared "local". For global names, all identifiers include a 128 bit UUID (encoded as base 35 ASCII strings) in order to minimize any chance for name clashes.

Thirdly, running the snippet should not leave any traces after it is done except for modifying $USE, $FEATURES etc. to the desired extent. This means any globally defined functions should have been removed when the script finishes.

For the operation of the script itself, it basically consists of 2 nested loops.

The outer loop is governed by local variable $S1 and represents the basic action to be processed yet.

The inner loop governed by local $S2 controls to which actual environment variable ($USE, $FEATURES etc) the action described by $S1 will actually apply.

The actions of $S1 breaks the modification down to phases like reading the variable, process it token by token, and writing it back at the end.
Comment 10 Guenther Brunthaler 2009-04-20 18:00:22 UTC
By carefully proofreading my script I actually *did* find a problem: It uselessly sets a variable $S3 to a value, although that variable is never be used again.

Although this has no effect on what the script does otherwise, it does "pollute" the global namespace with that variable.

I fixed that now - but no change.

I still get the following message during the install phase:

>>> Installing app-text/xpdf-3.02-r2
!!! WARNING: Expected SLOT='0', got ''
Comment 11 Guenther Brunthaler 2009-04-20 18:18:19 UTC
It finally occurred to me that it might be a good idea to try re-emerging the package without any portage override at all!

And ... shame on me ... it *worked* this time!

Which means, there must be *some* interaction going on between by override script and the ebuild - although I still have not the slightest idea *how*.

Or the ebuild does not like some of my optimization settings per se.

Anyway, I will examine that and will close the bug if it turns out that my override script is actually to take the blame. Ashes on my head, then!

On the other hand, the ebuild might still have some issues.

For instance, I noticed a vast difference in running time between my -O2 default flags and when using the -O3 override: Without the override, the ebuild ran through quite swiftly.

With the override, however, there is a remarkable delay just after applying the patch, and this takes a minute or where no visible output is generated.

It seems the ebuild is doing something lengthly in the configure phase, but I can't see a reason for the big timely difference in comparison to the override-less version.

Anyway, I'll investigate and post any findings here.

Perhaps this turns out to be some hidden Portage bug and is not directly related to kpdf at all. EAPI=2 seems not yet to be widely used anyway!
Comment 12 Guenther Brunthaler 2009-04-20 19:32:35 UTC
I have found the cause of the problem!

It is a quoting issue in my override script: This seems to be the first ebuild which puts a quoted string into $CFLAGS, which contains escaped quotes itself.

This made the shells substitutions go crazy in some way I still have to figure out; but it's clearly my fault.

I therefore fullheartedly want to apologize to all for bugging them with this phantom bug report - I'm really SORRY for wasting everyone's time.

On the plus side, I will make the fixed script available to the community in case someone else might want to use it. That way your effort may not not a complete waste!

Sorry again, and closing the bug as INVALID.