Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 455910 - dev-python/sphinx-1.1.3-r5 - cp: cannot create regular file '//usr/lib64/python3.2/site-packages/sphinx/pycode/Grammar3.2.pickle.backup': No such file or directory
Summary: dev-python/sphinx-1.1.3-r5 - cp: cannot create regular file '//usr/lib64/pyth...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-06 21:01 UTC by Jan Paesmans
Modified: 2013-02-13 22:01 UTC (History)
2 users (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 Jan Paesmans 2013-02-06 21:01:23 UTC
>>> Installing (1 of 4) dev-python/sphinx-1.1.3-r5
 * checking 1133 files for package collisions
1000 files checked ...
>>> Merging dev-python/sphinx-1.1.3-r5 to /
 * python3.2: running backup_pickle
'/var/tmp/portage/dev-python/sphinx-1.1.3-r5/image//usr/lib64/python3.2/site-packages/sphinx/pycode/Grammar3.2.pickle' -> '//usr/lib64/python3.2/site-packages/sphinx/pycode/Grammar3.2.pickle.backup'
cp: cannot create regular file '//usr/lib64/python3.2/site-packages/sphinx/pycode/Grammar3.2.pickle.backup': No such file or directory
 * ERROR: dev-python/sphinx-1.1.3-r5 failed (preinst phase):
 *   Unable to backup grammar pickle from overwriting
 * 
 * Call stack:
 *     ebuild.sh, line   93:  Called pkg_preinst
 *   environment, line 2806:  Called python_foreach_impl 'backup_pickle'
 *   environment, line 3133:  Called backup_pickle
 *   environment, line 2804:  Called die
 * The specific snippet of code:
 *               cp -p -v "${pickle_name[0]}" "${dest}" || die "Unable to backup grammar pickle from overwriting"


Reproducible: Always

Steps to Reproduce:
1. emerge -Nuv sphinx
2.
3.



emerge --info '=dev-python/sphinx-1.1.3-r5'
Portage 2.1.11.31 (default/linux/amd64/10.0/desktop, gcc-4.6.3, glibc-2.15-r3, 3.6.11-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.6.11-gentoo-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_5200+-with-gentoo-2.1
Timestamp of tree: Wed, 06 Feb 2013 18:15:01 +0000
ld GNU ld (GNU Binutils) 2.22
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.4.6, 2.5.4-r4, 2.6.8, 2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13::<unknown repository>, 2.69
sys-devel/automake:       1.4_p6-r1, 1.5-r1, 1.6.3-r1, 1.7.9-r2, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.4.7, 4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 sun-bcla-java-vm AdobeFlash-10 AdobeFlash-10.1 AdobeFlash-10.3 Oracle-BCLA-JavaSE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -msse3 -O3 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb /var/qmail/alias /var/qmail/control /var/spool/torque"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /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"
CXXFLAGS="-march=athlon64 -msse3 -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo/ ftp://trumpetti.atm.tut.fi/gentoo/ http://mirror.ovh.net/gentoo-distfiles/ ftp://mirror.ovh.net/gentoo-distfiles/ ftp://gentoo.imj.fr/pub/gentoo/ ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo ftp://ftp6.uni-muenster.de/pub/linux/distributions/gentoo http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ http://gentoo.mneisen.org/ http://de-mirror.org/distro/gentoo/ http://mirror.netcologne.de/gentoo/ ftp://mirror.netcologne.de/gentoo/ "
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif gpm gtk iconv ipv6 jpeg lcms ldap libnotify mad mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds qt3support qt4 readline sdl session spell sse sse2 ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="aica asihpi darla20 darla24 echo3g emi26 emu10k1 emu10k1x emu1212 emu1616 emu1820 gina20 gina24 hdsp hdspm ice1712 indigo indigoio korg1212 layla20 layla24 maestro3 mia mixart mona msnd-pinnacle pcxhr rme32 rme96 sbawe sb16 sscape usb-usx2y vx222 wavefront ymfpci" 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 asis auth_basic auth_digest authn_alias authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cern_meta cgi cgid charset_lite dav dav_fs dav_lock dbd deflate dir disk_cache dumpio env expires ext_filter file_cache filter headers ident imagemap include info log_config log_forensic logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http proxy_scgi reqtimeout rewrite setenvif so speling status substitute unique_id userdir usertrack version vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="adc65 agfa_cl20 aox ax203 barbie canon casio_qv clicksmart310 digigr8 digita dimagev dimera3500 directory enigma13 fuji gsmart300 hp215 iclick jamcam jd11 jl2005a jl2005c kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica konica_qm150 largan lg_gsm mars mustek panasonic_coolshot panasonic_dc1000 panasonic_dc1580 panasonic_l859 pccam300 pccam600 polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ptp2 ricoh ricoh_g3 samsung sierra sipix_blink sipix_blink2 sipix_web2 smal sonix sony_dscf1 sony_dscf55 soundvision spca50x sq905 st2205 stv0674 stv0680 sx330z template topfield toshiba_pdrm11 tp6801" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DVB_CARDS="af9005 bcm3510 cx18 cx231xx cx23885 dibusb-usb1 dibusb-usb2 mpc718 nxt200x opera1 or51132 or51211 pvrusb2 sp8870 sp887x tda10045 tda10046lifeview ttpci ttusb-dec usb-a800 usb-af9015 usb-bluebird usb-dib0700 usb-dtt200u usb-dw2104 usb-umt usb-vp702x usb-vp7045 usb-wt220u vp7041" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en nl" LIRC_DEVICES="hauppauge hauppauge_dvb mceusb mceusb2" OPENMPI_FABRICS="sctp" OPENMPI_RM="pbs" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" SANE_BACKENDS="abaton agfafocus apple artec artec_eplus48u as6e avision bh canon canon630u canon_dr canon_pp cardscan coolscan coolscan2 coolscan3 dc210 dc240 dc25 dell1600n_net dmc epjitsu epson epson2 fujitsu genesys gt68xx hp hp3500 hp3900 hp4200 hp5400 hp5590 hpljm1005 hpsj5s hs2p ibm kodak kvs1025 kvs20xx leo lexmark ma1509 magicolor matsushita microtek microtek2 mustek mustek_pp mustek_usb nec net niash p5 pie pixma plustek plustek_pp qcam ricoh rts8891 s9036 sceptre sharp sm3600 sm3840 snapscan sp15c st400 stv680 tamarack teco1 teco2 teco3 test u12 umax umax1220u umax_pp xerox_mfp" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 JTRiley 2013-02-06 22:51:03 UTC
Just ran into this myself. This error happens when you upgrade from an older version that did not previously install itself into one of the new PYTHON_TARGETS you have enabled. For example, if your previous sphinx install had only 2.7 and you're upgrading to 1.1.3-r5 with both 2.7 and 3.2 Python targets set you'll get this error given that sphinx was never installed in 3.2 to begin with.

Simply unmerging sphinx and re-emerging fixed the issue for me:

$ emerge -Ca sphinx
$ emerge -va1 sphinx # remove the -1 if you explicitly installed sphinx
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-02-07 14:41:07 UTC
Good symptoms but bad diagnosis. It is just a missing directory when trying to create the backup. I have fixed it by using mkdir. Although this is not strictly necessary, it is easier and safer this way.
Comment 3 JTRiley 2013-02-07 21:27:44 UTC
(In reply to comment #2)
> Good symptoms but bad diagnosis. It is just a missing directory when trying
> to create the backup. I have fixed it by using mkdir. Although this is not
> strictly necessary, it is easier and safer this way.

FWIW I don't believe it's bad diagnosis. The reason the directory is missing in the first place is because sphinx was not previously installed in a given PYTHON_TARGET. From what I can tell the purpose of the code in pkg_preinst is to back-up what's currently installed on the rootfs *before* sphinx is merged to the rootfs. If sphinx was already installed in all of the PYTHON_TARGETs before the new merge you wont get this error at all with the current 1.1.3-r5 ebuild - the Grammar*.pickle file and its parent directory (pycode) already exist in this case. If 

The reason the workaround of uninstalling and then reinstalling works is that the replacing_python_eclass function returns false on a fresh install given that a previous version is not being replaced and so the whole backup_pickle() business is never called on a PYTHON_TARGET that is missing a previous install of sphinx. I think a better fix than mkdir is to check whether the Grammar*.pickle file exists in the PYTHON_TARGET's site-packages in the first place before trying to back it up...

Anyhow, thanks for the fix!
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-02-13 22:01:51 UTC
*** Bug 457156 has been marked as a duplicate of this bug. ***