Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 256547 - sys-apps/portage-2.1.6.7: emaint -c binhost error if no no Packages file
Summary: sys-apps/portage-2.1.6.7: emaint -c binhost error if no no Packages file
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - External Interaction (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 288499
  Show dependency tree
 
Reported: 2009-01-27 19:40 UTC by Boney McCracker
Modified: 2009-10-14 01:09 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 Boney McCracker 2009-01-27 19:40:56 UTC
'emaint [ -c | -f ] [ binhost | all ]' fail with "IOError" if file "/usr/portage/packages/Packages" does not exist.

User who do not build packages may not have a /usr/portage/packages/ directory or a Packages file.

Reproducible: Always

Steps to Reproduce:
1. Using a system upon which binary packages have not been explicitly generated
2. Enter one of the following commands:

emaint -c binhost
emaint -c all
emaint -f binhost
emaint -f all


Actual Results:  
IOError.  Specifically:

# emaint -c binhost
Checking binhost for problems
Traceback (most recent call last):
  File "/usr/sbin/emaint", line 578, in <module>
    emaint_main(sys.argv[1:])
  File "/usr/sbin/emaint", line 551, in emaint_main
    inst = task()
  File "/usr/sbin/emaint", line 121, in __init__
    f = open(self._pkgindex_file, 'r')
IOError: [Errno 2] No such file or directory: '/usr/portage/packages/Packages'


Expected Results:  
In the cases of 'emaint -c all' or 'emaint -f all', the command should succeed, with the other checks implied by "all" being completed successfully.  Perhaps the binhost check should first confirm the existence of the Packages of file, and only perform that check if the file exists.

# emerge --info
Portage 2.1.6.7 (hardened/linux/x86/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r1, 2.6.28-hardened i686)
=================================================================
System uname: Linux-2.6.28-hardened-i686-Intel-R-_Pentium-R-_4_CPU_1400MHz-with-glibc2.1.3
Timestamp of tree: Tue, 27 Jan 2009 16:45:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p48
dev-lang/python:     2.5.4-r2
dev-util/ccache:     2.4-r8
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.2
sys-apps/sandbox:    1.3.2
sys-devel/autoconf:  2.63
sys-devel/automake:  1.10.2
sys-devel/binutils:  2.19
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -pipe -fforce-addr -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=pentium4 -pipe -fforce-addr -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.gtlib.gatech.edu/pub/gentoo http://gentoo.osuosl.org/ http://open-systems.ufl.edu/mirrors/gentoo "
LANG="en_US"
LC_ALL="en_US"
LDFLAGS="-Wl,-O1,--hash-style=gnu"
LINGUAS="en_US"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
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"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="acl berkdb bzip2 caps cli cracklib crypt dri gdbm gpm hardened iconv logrotate midi mmx mudflap ncurses nptl nptlonly openmp pam pcre perl pic python readline reflection session spl sse sse2 ssl sysfs threads urandom userlocales x86 xorg 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="keyboard mouse" KERNEL="linux" LINGUAS="en_US" USERLAND="GNU" VIDEO_CARDS="nv"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Thomas Beierlein gentoo-dev 2009-10-13 07:53:47 UTC
The problem still exist in stable portage 2.1.6.13 here an amd64.
Comment 2 Zac Medico gentoo-dev 2009-10-14 00:10:12 UTC
Thanks, this is fixed in portage-2.1.7.
Comment 3 Boney McCracker 2009-10-14 01:09:07 UTC
Thank you, Zac.