Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 283541 - dispatch-conf from portage-2.2.00.14178 fails to find config-archive
Summary: dispatch-conf from portage-2.2.00.14178 fails to find config-archive
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
: 283553 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-09-02 18:05 UTC by Sven Schwyn (svoop)
Modified: 2009-09-08 20:40 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 Sven Schwyn (svoop) 2009-09-02 18:05:51 UTC
The dispatch-conf tool claims not to find a directory:

$ dispatch-conf
Traceback (most recent call last):
  File "/Gentoo/usr/sbin/dispatch-conf", line 425, in <module>
    d.grind (portage.settings ['CONFIG_PROTECT'])
  File "/Gentoo/usr/sbin/dispatch-conf", line 76, in grind
    self.options = portage.dispatch_conf.read_config(MANDATORY_OPTS)
  File "/Gentoo/usr/lib/portage/pym/portage/dispatch_conf.py", line 45, in read_config
    os.mkdir(opts['archive-dir'])
OSError: [Errno 2] No such file or directory: '"/Gentoo"/etc/config-archive'

But it's there - in fact since May 2008 :-)

$ ls "/Gentoo"/etc/config-archive
Gentoo


Reproducible: Always

Steps to Reproduce:
Comment 1 Sven Schwyn (svoop) 2009-09-02 18:06:47 UTC
Just in case...

Portage 2.2.00.14178-prefix (prefix/darwin/macos/10.5/x86, gcc-4.2.1, unavailable, 9.8.0 i386)
=================================================================
System uname: Darwin-9.8.0-i386-32bit
Timestamp of tree: Wed, 02 Sep 2009 17:48:49 +0000
distcc 2.18.5-Apple.1 i386-apple-darwin9.0 (protocols 1 and 2) (default port 3632) [disabled]
app-shells/bash:     4.0_p28-r00.1
dev-lang/python:     2.5.4-r2, 2.6.2-r01.1
dev-python/pycrypto: 2.0.1-r8
sys-devel/autoconf:  2.63-r01.1
sys-devel/automake:  1.10.2-r00.1, 1.11
sys-devel/gcc-config: 1.4.1-r00.2
sys-devel/libtool:   2.2.6a-r00.1
ACCEPT_KEYWORDS="~x86-macos"
CBUILD="i686-apple-darwin9"
CFLAGS="-O2 -pipe -march=nocona"
CHOST="i686-apple-darwin9"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=nocona"
DISTDIR="/Gentoo/usr/portage/distfiles"
FEATURES="assume-digests collision-protect distlocks fixpackages nostrip parallel-fetch preserve-libs protect-owned sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS=""
PKGDIR="/Gentoo/usr/portage/packages"
PORTAGE_CONFIGROOT="/Gentoo/"
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="/Gentoo/var/tmp"
PORTDIR="/Gentoo/usr/portage"
PORTDIR_OVERLAY="/Gentoo/usr/local/portage/layman/ruby /Gentoo/usr/local/portage/layman/bitcetera-prefix /Gentoo/usr/local/portage/local"
SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"
USE="aqua coreaudio cracklib mmx mmxext ncurses nls objc objc++ prefix readline sse sse2 ssl unicode x86-macos zlib" 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="Darwin" INPUT_DEVICES="keyboard mouse" KERNEL="Darwin" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-09-02 18:16:11 UTC
This one should be "easy" to bisect because 14160 works, something happened in the 18 commits. (Confirmed on amd64-linux)
Comment 3 Fabian Groffen gentoo-dev 2009-09-02 18:17:52 UTC
hmmm, that seems to be then even prefix-unrelated.

I would say that the double quotes in the output there are the culprit.  I'll take a look.
Comment 4 Fabian Groffen gentoo-dev 2009-09-02 18:33:43 UTC
can you try if removing the quotes from archive-dir in your dispatch-conf.conf (etc/dispatch-conf.conf) makes dispatch-conf functional again?
Comment 5 Fabian Groffen gentoo-dev 2009-09-02 18:37:43 UTC
quotes are indeed only removed from start and end, not from sub-parts, like bash would interpret it.  I fixed this in SVN to quote the entire string instead.
Comment 6 Sven Schwyn (svoop) 2009-09-02 18:38:45 UTC
(In reply to comment #4)
> can you try if removing the quotes from archive-dir in your dispatch-conf.conf
> (etc/dispatch-conf.conf) makes dispatch-conf functional again?

Yes, it does. No quotes, no trouble.
Comment 7 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-09-02 19:33:34 UTC
*** Bug 283553 has been marked as a duplicate of this bug. ***
Comment 8 Fabian Groffen gentoo-dev 2009-09-02 20:01:58 UTC
fix is in portage-2.2.00.14179

thanks all!
Comment 9 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-09-08 20:30:00 UTC
%% dispatch-conf 
Traceback (most recent call last):
  File "/home/jolexa/portage/linux-64/usr/sbin/dispatch-conf", line 425, in <module>
    d.grind (portage.settings ['CONFIG_PROTECT'])
  File "/home/jolexa/portage/linux-64/usr/sbin/dispatch-conf", line 76, in grind
    self.options = portage.dispatch_conf.read_config(MANDATORY_OPTS)
  File "/home/jolexa/portage/linux-64/usr/lib/portage/pym/portage/dispatch_conf.py", line 45, in read_config
    os.mkdir(opts['archive-dir'])
OSError: [Errno 2] No such file or directory: '"/home/jolexa/portage/linux-64"/etc/config-archive'
Comment 10 Fabian Groffen gentoo-dev 2009-09-08 20:36:20 UTC
use etc-update to update your dispatch-conf.conf, such that dispatch-conf works again.
Comment 11 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-09-08 20:40:23 UTC
sheesh, duh, you need to update the config file before it will work. Sorry for the noise!