Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 455302

Summary: dispatch-conf broken: OSError: [Errno 21] Is a directory
Product: Portage Development Reporter: Evgeny <worklord>
Component: CoreAssignee: Portage team <dev-portage>
Status: RESOLVED DUPLICATE    
Severity: normal CC: njsg, patrick
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Evgeny 2013-02-03 16:05:08 UTC
dispatch-conf on my PC brokens. 

After start it shows next error:

# dispatch-conf 
Traceback (most recent call last):
  File "/usr/sbin/dispatch-conf", line 492, in <module>
    portage.settings.get('CONFIG_PROTECT', '')))
  File "/usr/sbin/dispatch-conf", line 247, in grind
    confs = [x for x in confs if f(x)]
  File "/usr/sbin/dispatch-conf", line 247, in <listcomp>
    confs = [x for x in confs if f(x)]
  File "/usr/sbin/dispatch-conf", line 166, in f
    mrgfail = portage.dispatch_conf.file_archive(archive, conf['current'], conf['new'], mrgconf)
  File "/usr/lib64/portage/pym/portage/dispatch_conf.py", line 151, in file_archive
    os.rename(archive + '.' + str(suf-1), archive + '.' + str(suf))
OSError: [Errno 21] Is a directory

My /etc/dispatch-conf.conf:

archive-dir=${EPREFIX}/etc/config-archive
use-rcs=no
diff="diff -Nu '%s' '%s'"
pager=""
less-opts="--no-init --QUIT-AT-EOF"
merge="sdiff --suppress-common-lines --output='%s' '%s' '%s'"
replace-cvs=yes
replace-wscomments=no
replace-unmodified=no
ignore-previously-merged=no


I tried to upgrade portage to 2.2 ver. but not result. strace do not shows to me anything.

emerge --info
Portage 2.1.11.31 (default/linux/amd64/10.0/desktop/gnome, gcc-4.6.3, glibc-2.15-r3, 3.6.11-gentoo x86_64)
=================================================================
System uname: Linux-3.6.11-gentoo-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9400_@_2.66GHz-with-gentoo-2.1
Timestamp of tree: Sat, 02 Feb 2013 10:45:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            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 xwing rion sabayon lcd-filtering stuff proaudio steam-overlay local
Installed sets: @fonts, @mygnome, @pulseaudio
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/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=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync metadata-transfer news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://gentoo.wheel.sk/pub/linux/gentoo/ http://ftp.rnl.ist.utl.pt/pub/gentoo/gentoo-distfiles/ http://mirror.yandex.ru/gentoo-distfiles/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
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="/var/lib/layman/xwing /var/lib/layman/rion /var/lib/layman/sabayon /var/lib/layman/lcd-filtering /var/lib/layman/stuff /var/lib/layman/pro-audio /var/lib/layman/steam /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 amr animgif ape apng ass bash-completion berkdb bluetooth bluray branding bzip2 cairo caps cdda cdr cli colord consolekit cracklib crypt cue cups curl cxx dbus device-mapper dga dirac dri dts dvb dvd dvdnav dvdr enca encode exif faac faad fam ffmpeg fftw firefox flac fluidsynth fontconfig fpm freerdp fuse g3dvl g729 gbm gd gdbm gdu geoip gif gles1 gles2 gnome gnome-online-accounts gnutls gphoto2 gpm gsm gtk gtk3 gtkstyle hddtemp iconv idn ipv6 jack jpeg jpeg2k latex lcdfilter lcms ldap libkms libnotify live llvm-gcc lm_sensors lvm mac mad mdnsresponder-compat midi mmx mmxext mng modules mp3 mp4 mpeg mudflap multilib musepacknvidia nautilus ncurses network nls notify nptl ogg opencl opencore-amr opengl openmp openrc osdmenu osmesa pam pango pcre pdf php png policykit ppds pulseaudio python python3 qemu qt3support radio readline rtc rubber schroedinger sdl session sndfile socialweb speex spell spice src srtp sse sse2 ssl ssse3 startup-notification svg tcpd teletext theora threads tiff timidity toolame truetype twolame udev udisks unicode upower usb vde vdpau vhook video vim-syntax virt-network vorbis wav wavpack wmf wxwidgets x264 xanim xcb xcomposite xml xpm xv xvid xvmc zlib" ABI_X86="64" ALSA_CARDS="hda-intel ctxfi" 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="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="ru" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby19" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Zac Medico gentoo-dev 2013-02-03 16:58:20 UTC
It looks like a file/directory name conflict in /etc/config-archive is triggering this, like bug 342171. You can temporarily move your old /etc/config-archive to a different location like this:

   mv /etc/config-archive /etc/config-archive.old

Then you should be able to run dispatch-conf successfully. Afterwards, you can manually merge the new directory with the old one (and please report any file/directory name conflict(s) that you find).
Comment 2 Evgeny 2013-02-03 17:22:38 UTC
(In reply to comment #1)
> It looks like a file/directory name conflict in /etc/config-archive is
> triggering this, like bug 342171. You can temporarily move your old
> /etc/config-archive to a different location like this:
> 
>    mv /etc/config-archive /etc/config-archive.old

Thank you. It resolve my problem.

> Then you should be able to run dispatch-conf successfully. Afterwards, you
> can manually merge the new directory with the old one (and please report any
> file/directory name conflict(s) that you find).

Sorry. After run dispatch-conf on clean config-archive and moving back from backup no error shows.
Comment 3 Patrick Lauer gentoo-dev 2013-06-25 03:31:04 UTC
I can reproduce - 

 /etc/portage/package.use was a file.
Something migrated it to a directory and left a package.use/package.use.old file

Tadaah. File-Directory mismatch!
Comment 4 Nuno Silva 2013-10-03 18:43:19 UTC
I could reproduce with an older version of portage. But, after upgrading portage, dispatch-conf did not crash anymore. Perhaps there was some fix somewhere?
Comment 5 Zac Medico gentoo-dev 2015-05-08 17:55:32 UTC

*** This bug has been marked as a duplicate of bug 342171 ***
Comment 6 Zac Medico gentoo-dev 2015-05-09 22:59:22 UTC

*** This bug has been marked as a duplicate of bug 256376 ***