Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
emerge corrupted [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
[n00b@localhost]
Apprentice
Apprentice


Joined: 30 Aug 2004
Posts: 266
Location: London, UK

PostPosted: Wed Feb 20, 2008 11:47 am    Post subject: emerge corrupted [solved] Reply with quote

I have managed to corrupt my portage installation. I was emerging something that started to hang so I ran kill -9 on each process spawned by emerge to stop it (CTRL^C wouldn't work). Now when I try any command other than emerge --sync, emerge --regen or emerge --metadata I get the following errors:
Code:
garyspc ~ # emerge -avtuDN world

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

Calculating world dependencies
Traceback (most recent call last):
  File "/usr/bin/emerge", line 6831, in ?
    retval = emerge_main()
  File "/usr/bin/emerge", line 6825, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/bin/emerge", line 6080, in action_build
    mydepgraph = depgraph(settings, trees, myopts, myparams, spinner)
  File "/usr/bin/emerge", line 1327, in __init__
    trees[myroot]["porttree"].dbapi)
  File "/usr/bin/emerge", line 1053, in __init__
    metadata = dict(izip(mykeys, real_dbapi.aux_get(cpv, mykeys)))
  File "/usr/lib64/portage/pym/portage.py", line 6450, in aux_get
    self._aux_cache = mypickle.load()
TypeError: ('argument list must be a tuple', 'KEYWORDS', 'alpha amd64 ~arm hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd')


The same error happens with the ebuild script. I have reinstalled portage manually but the error persists so I think it may be an issue with the files in /var/db/pkg (as that's where the metadata is being read from). I have compared the output of the files in this directory with the installation on my laptop and the files are the same.
Code:
garyspc ~ # emerge portage
Calculating dependencies
Traceback (most recent call last):
  File "/usr/bin/emerge", line 6831, in ?
    retval = emerge_main()
  File "/usr/bin/emerge", line 6825, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/bin/emerge", line 6090, in action_build
    mydepgraph = depgraph(settings, trees, myopts, myparams, spinner)
  File "/usr/bin/emerge", line 1327, in __init__
    trees[myroot]["porttree"].dbapi)
  File "/usr/bin/emerge", line 1053, in __init__
    metadata = dict(izip(mykeys, real_dbapi.aux_get(cpv, mykeys)))
  File "/usr/lib64/portage/pym/portage.py", line 6450, in aux_get
    self._aux_cache = mypickle.load()
TypeError: ('argument list must be a tuple', 'KEYWORDS', 'alpha amd64 ~arm hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd')
garyspc ~ # cat /var/db/pkg/sys-apps/portage-2.1.4.4/KEYWORDS
~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd
garyspc ~ # cat /var/db/pkg/sys-apps/portage-2.1.4.4/PROVIDE
virtual/portage
garyspc ~ # cat /var/db/pkg/sys-apps/portage-2.1.4.4/USE
amd64 elibc_glibc kernel_linux userland_GNU
Code:
gary@garyslaptop ~ $ cat /var/db/pkg/sys-apps/portage-2.1.4.4/KEYWORDS
~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd
gary@garyslaptop ~ $ cat /var/db/pkg/sys-apps/portage-2.1.4.4/PROVIDE
virtual/portage
gary@garyslaptop ~ $ cat /var/db/pkg/sys-apps/portage-2.1.4.4/USE
elibc_glibc kernel_linux userland_GNU x86

emerge --info
Code:
Portage 2.1.4 (default-linux/amd64/2007.0/desktop, gcc-4.2.3, glibc-2.7-r1, 2.6.24-tuxonice-r2 x86_64)
=================================================================
System uname: 2.6.24-tuxonice-r2 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4800+
Timestamp of tree: Wed, 20 Feb 2008 10:30:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.4
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.24
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -march=athlon64 -fforce-addr -fomit-frame-pointer -ftracer -pipe"
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/4.0/env /usr/kde/4.0/share/config /usr/kde/4.0/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O3 -march=athlon64 -fforce-addr -fomit-frame-pointer -ftracer -pipe -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="candy ccache distlocks fixpackages metadata-transfer parallel-fetch prelink sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/ http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/ ftp://mirrors.blueyonder.co.uk/mirrors/gentoo http://gentoo.blueyonder.co.uk/"
LC_ALL="en_GB.utf8"
LINGUAS="en_GB"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--timeout=180"
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"
PORTDIR_OVERLAY="/usr/portage/local/layman/java-overlay /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X a52 aac aalib accessibility acl acpi akode alsa amd64 amr apache2 ares arts audiofile avahi bash-completion bcmath berkdb bitmap-fonts bluetooth bzip2 cddb cdr cli cracklib crypt cups dbus dedicated dga directfb dri dts dvb dvd dvdr dvdread dxr3 eds emboss encode evo exif fam fbcon fftw firefox flac fortran ftp gd gdbm ggi gif gnutls gphoto2 gpm graphviz gs hal iconv idn ieee1394 imagemagick imap imlib ipv6 isdnlog jack java javascript jpeg kde kdeenablefinal kdexdeltas kerberos lcms ldap libcaca lirc lm_sensors mad midi mikmod mmap mmx mng modplug mp3 mpeg mudflap musicbrainz mysql mysqli ncurses nis nls nptl nptlonly nsplugin odbc ogg opengl openmp pam pcre pdf perl php png posix pppd python qt3 qt3support qt4 quicktime rdesktop readline reflection samba sasl scanner sdl session slp sndfile sockets speex spell spl sse sse2 ssl svg symlink tcpd theora threads tidy tiff truetype truetype-fonts type1-fonts unicode usb v4l vcd vorbis wifi wmf x264 xcomposite xine xinerama xinetd xml xorg xpm xsl xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS


Last edited by [n00b@localhost] on Thu Feb 21, 2008 11:43 pm; edited 1 time in total
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9523
Location: beyond the rim

PostPosted: Wed Feb 20, 2008 1:38 pm    Post subject: Reply with quote

Try
Code:
rm -rf /var/cache/edb/dep /usr/portage/metadata/cache
emerge --sync
Back to top
View user's profile Send private message
[n00b@localhost]
Apprentice
Apprentice


Joined: 30 Aug 2004
Posts: 266
Location: London, UK

PostPosted: Wed Feb 20, 2008 2:10 pm    Post subject: Reply with quote

Thanks. Tried that. Didn't work:
Code:
...
Parse Error reading PROVIDE and USE in '/var/db/pkg/net-misc/netkit-talk-0.17-r4'
Exception: ('argument list must be a tuple', 'KEYWORDS', 'alpha amd64 ~arm hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd')
...

For every package installed.
Back to top
View user's profile Send private message
Carlo
Developer
Developer


Joined: 12 Aug 2002
Posts: 3356

PostPosted: Wed Feb 20, 2008 5:17 pm    Post subject: Reply with quote

Portage has never been very error resilient wrt. a defective package db. Please check, if your filesystem isn't corrupted, first. When your fs is fine (or fixed) do rm -rf /var/db/pkg/net-misc/netkit-talk-0.17-r4 and run FEATURES=-collision-protect emerge -1 =netkit-talk-0.17-r4 afterwards.

I don't know if Genone and the other Portage devs are interested in test cases, so you may backup the /var/db/pkg/net-misc/netkit-talk-0.17-r4 directory before.
_________________
Please make sure that you have searched for an answer to a question after reading all the relevant docs.
Back to top
View user's profile Send private message
[n00b@localhost]
Apprentice
Apprentice


Joined: 30 Aug 2004
Posts: 266
Location: London, UK

PostPosted: Thu Feb 21, 2008 11:42 pm    Post subject: Reply with quote

I ran fsck.ext3 on all my disks last night (all 640GB - took some time) and although nothing was reported as broken emerge now works again. Don't know why this happened or why it's now fixed but glad that it is! Thanks for all your help.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum