Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 180825 - emerge fails on checking manifests containing files with space in names
Summary: emerge fails on checking manifests containing files with space in names
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-04 09:11 UTC by Piotr Stachura
Modified: 2007-06-04 09: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 Piotr Stachura 2007-06-04 09:11:26 UTC
Hi I accidentialy found that "bug".
When I put (in my case) directory into files dir (in ebuild structure) and that dir contain files with spaces, this makes ebuild to fail.

Reproducible: Always

Steps to Reproduce:
1. In local layout, in any ebuild directory, into "files" dir, create next directory
2. In that created dir put some files with spaces (my case "Katalog domowy.desktop)
3. Try to emerge package that is reffering to that ebuild directory
4. Example:
./wxGTK
./wxGTK/files
./wxGTK/files/wxwidgets.eclass.patch
./wxGTK/files/digest-wxGTK-2.8.0
./wxGTK/files/socketfix.patch
./wxGTK/files/digest-wxGTK-2.8.3.0
./wxGTK/files/Desktop
./wxGTK/files/Desktop/Katalog domowy.desktop
./wxGTK/wxGTK-2.8.0.ebuild
./wxGTK/Manifest
./wxGTK/wxGTK-2.8.3.0.ebuild

Actual Results:  
ebuild result is:
Traceback (most recent call last):
  File "/usr/bin/ebuild", line 143, in ?
    debug=debug, tree=mytree)
  File "/usr/lib64/portage/pym/portage.py", line 3630, in doebuild
    mf = Manifest(mysettings["O"], mysettings["DISTDIR"])
  File "/usr/lib64/portage/pym/portage_manifest.py", line 122, in __init__
    self._read()
  File "/usr/lib64/portage/pym/portage_manifest.py", line 178, in _read
    self._readManifest(self.getFullname(), myhashdict=self.fhashdict)
  File "/usr/lib64/portage/pym/portage_manifest.py", line 166, in _readManifest
    self._parseDigests(fd, myhashdict=myhashdict, **kwargs)
  File "/usr/lib64/portage/pym/portage_manifest.py", line 200, in _parseDigests
    for myentry in self._parseManifestLines(mylines):
  File "/usr/lib64/portage/pym/portage_manifest.py", line 190, in _parseManifestLines
    myentry = parser(mysplit)
  File "/usr/lib64/portage/pym/portage_manifest.py", line 49, in parseManifest2
    mysize = int(mysplit[2])
ValueError: invalid literal for int(): domowy.desktop

that means, ebuild isn't prepared for files with spaces?

Expected Results:  
Such human mistake shouldn't disturb ebuild properity work.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-06-04 09:20:37 UTC
Attach the ebuild here and post emerge --info
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-06-04 09:27:05 UTC
Nevermind; reproduced this myself w/ portage-2.1.2.9 after I've re-read the description a couple of times. :) AFAICT this used to work before.
Comment 3 Piotr Stachura 2007-06-04 09:36:53 UTC
Hmm, sorry, I didn't make it clear. Actually it's not ebuild releated problem, but emerge script.
I believe that applies to any ebuild.
When in any of ebuild directory there is additional file with space in it's name, and I want to emerge that ebuild (it this case wxGTK) emerge perhaps search whole structure and fails when it finds that specyfic file.
As I can tell from ebuild fail log:
ValueError: invalid literal for int(): domowy.desktop
it reffering to file domowy.desktop, but that file doesn't exist but file "Katalog domowy.desktop" do exist.

emerge --info:

Portage 2.1.2.9 (default-linux/amd64/2006.1, gcc-4.1.2, glibc-2.5-r1, 2.6.21-gentoo x86_64)
=================================================================
System uname: 2.6.21-gentoo x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System release 2.0.0_alpha3
Timestamp of tree: Mon, 04 Jun 2007 08:00:01 +0000
ccache version 2.4 [disabled]
dev-java/java-config: 1.3.7, 2.0.31-r7
dev-lang/python:     2.3.5-r2, 2.4.4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
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
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.20-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -mfpmath=sse -pipe -funswitch-loops"
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/kde/3.8//env /usr/kde/3.8//share/config /usr/kde/3.8//shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=k8 -O2 -mfpmath=sse -pipe -funswitch-loops"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="pl_PL.UTF8"
LC_ALL="pl_PL.UTF-8"
LDFLAGS="-Wl,-z,now"
LINGUAS="pl"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/initng /usr/portage/local/layman/xeffects /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="7zip X a52 aac acl acpi alsa amarok amd64 amr arts audiofile automount avahi avi berkdb bidi bitmap-fonts bonobo branding browserplugin bzip2 cairo caps cdparanoia cdr cjk cli cracklib crypt css ctype cups dbus dga directfb djvu dlloader dri dts dvd dvdr dvdread emul-linux-x86 enca encode esd exif extraicons extramodules fam fame fbcon ffmpeg firefox flac fontconfig fortran gdbm gif gimp gimpprint gnutls gphoto2 graphviz gs gtk gtk2 hal howl iconv id3 imagemagick imlib ipv6 isdnlog jack java javascript jce jikes jpeg jpeg2k kde kdeenablefinal kdehiddenvisibility kdexdeltas kerberos keverbose kipi lame latex lcms libg++ lm_sensors logitech-mouse lzo mad matroska midi mikmod mime mjpeg mmap mng mono motif mozcalendar mp3 mp4 mp4live mpeg mpeg2 mplayer mudflap musepack musicbrainz nautilus ncurses nfs nls noamazon nptl nptlonly nsplugin nvidia objc objc++ objc-gc ogg oggvorbis openal openexr opengl openmp pcre pdf perl player playlist png postgres ppds pppd pulseaudio python qt qt3 qt3support qt4 readline reflection rtc sandbox sdl sensord session slp sndfile speex spell spl splash sqlite ssl ssltcltk svg symbol_visibility symlink symlinks tcpd tetex tga theora tiff truetype truetype-fonts type1-fonts unicode usb utf8 vcd vorbis wav wma wmf wxwindows x264 xattr xcomposite xml xml2 xorg xscreensaver xv xvid xvmc zeroconf zlib" ALSA_CARDS="intel8x0" 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" CAMERAS="ptp2 sonydscf1" ELIBC="glibc" INITNG_PLUGINS="also bash_launcher chdir chroot conflict cpout critical cron daemon dev dllaunch envparser find fstat history idleprobe initctl interactive iparser last limit logfile netprobe ngc4 pause pidfile reload renice rlparser simple_launcher stcmd stdout suid syncron syslog unneeded provide dbus_event" INPUT_DEVICES="keyboard mouse evdev vmmouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl" USERLAND="GNU" VIDEO_CARDS="vga nvidia vmware"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

If you want to reproduce it try following steps (in any of ebuild/package directory):

venice files # mkdir Desktop
venice files # cd Desktop/
venice Desktop # touch "Katalog domowy.desktop"
venice Desktop # cd ../..
venice kuroo-svn # ebuild kuroo-svn-0.81.ebuild digest
>>> Creating Manifest for /usr/local/portage/app-portage/kuroo-svn
venice kuroo-svn # emerge -av kuroo-svn

These are the packages that would be merged, in order:

Calculating dependencies  ... done!
Traceback (most recent call last):
  File "/usr/bin/emerge", line 5547, in ?
    retval = emerge_main()
  File "/usr/bin/emerge", line 5542, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/bin/emerge", line 4903, in action_build
    mydepgraph.display(
  File "/usr/bin/emerge", line 2623, in display
    debug=self.edebug)
  File "/usr/lib64/portage/pym/portage.py", line 5986, in getfetchsizes
    mf = Manifest(pkgdir, self.mysettings["DISTDIR"])
  File "/usr/lib64/portage/pym/portage_manifest.py", line 122, in __init__
    self._read()
  File "/usr/lib64/portage/pym/portage_manifest.py", line 178, in _read
    self._readManifest(self.getFullname(), myhashdict=self.fhashdict)
  File "/usr/lib64/portage/pym/portage_manifest.py", line 166, in _readManifest
    self._parseDigests(fd, myhashdict=myhashdict, **kwargs)
  File "/usr/lib64/portage/pym/portage_manifest.py", line 200, in _parseDigests
    for myentry in self._parseManifestLines(mylines):
  File "/usr/lib64/portage/pym/portage_manifest.py", line 190, in _parseManifestLines
    myentry = parser(mysplit)
  File "/usr/lib64/portage/pym/portage_manifest.py", line 49, in parseManifest2
    mysize = int(mysplit[2])
ValueError: invalid literal for int(): domowy.desktop
Comment 4 Marius Mauch (RETIRED) gentoo-dev 2007-06-04 09:50:05 UTC
We don't support filenames containing spaces within the tree.