Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 40659 - portage-2.0.50 - FAILED to update counter
Summary: portage-2.0.50 - FAILED to update counter
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: High blocker
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-06 16:47 UTC by Carsten Lohrke (RETIRED)
Modified: 2005-02-27 23:50 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 Carsten Lohrke (RETIRED) gentoo-dev 2004-02-06 16:47:53 UTC
* Update configs using 'etc-update' please. Maintaining current configs
 * for portage and other system packages is fairly important for the
 * continued health of your system.

Recalculating the counter... FAILED to update counter.
!!! This is a problem.
ccache

emerge info, etc-update - I only get "nice" tracebacks

I wonder why it installs stuff to  /usr/lib/python2.2/
--- /usr/lib/python2.2/
--- /usr/lib/python2.2/site-packages/
>>> /usr/lib/python2.2/site-packages/missingos.so

even though I have 2.2 and 2.3 installed
Comment 1 Dale K Dicks 2004-02-07 06:19:08 UTC
I got this error as well, and I can not use portage at all any more because of it.

So basically my Gentoo installed is hosed... This needs to be fixed _today_.
Comment 2 Whit Blauvelt 2004-02-07 10:43:14 UTC
Also got the:

Recalculating the counter... FAILED to update counter.
!!! This is a problem.

message. Then:

# emerge -up system
Traceback (most recent call last):
  File "/usr/bin/emerge", line 14, in ?
    import portage
  File "/usr/lib/portage/pym/portage.py", line 6377, in ?
    for y in db["/"]["porttree"].dbapi.xmatch("match-all", x):
  File "/usr/lib/portage/pym/portage.py", line 4688, in xmatch
    myval=match_from_list(mydep,self.cp_list(mykey))
  File "/usr/lib/portage/pym/portage.py", line 3531, in match_from_list
    raise KeyError, "Specific key requires an operator (%s) (try adding an '=')" % (mydep)
KeyError: "Specific key requires an operator (media-video/nvidia-kernel-1.0.4496-r1) (try adding an '=')"

Um, isn't portage the one thing that should never be updated beyond stability??
Comment 3 Carsten Lohrke (RETIRED) gentoo-dev 2004-02-07 11:13:29 UTC
>Um, isn't portage the one thing that should never be updated beyond stability??
Theoretically yes, practically... 

Read /usr/portage/sys-apps/portage/files/README.RESCUE carefully to go back to a previous version and don't forget to 'emerge ~portage-2.0.49' afterwards, if you need portage asap. To block portage to update to the latest version do the following: echo =sys-apps/portage-2.0.50 >> /etc/portage/package.mask
Comment 4 Whit Blauvelt 2004-02-08 10:50:28 UTC
Carlo,

README.RESCUE needs to be written more carefully. Following it literally leads to:

# emerge portage
Calculating dependencies ...done!
>>> emerge (1 of 1) sys-apps/portage-2.0.50 to /
>>> md5 ;-) portage-2.0.50.tar.bz2
>>> Unpacking source...
>>> Unpacking portage-2.0.50.tar.bz2 to /var/tmp/portage/portage-2.0.50/work
>>> Source unpacked.
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/tmp/sandbox-portage-2.0.50-24716.log"

open_wr:   /etc/group
open_wr:   /etc/passwd
--------------------------------------------------------------------------------

Granted you're saying to emerge an earlier portage than the buggy 2.0.50 - but that's not what the README.RESCUE instructs, so thought I'd try it that way first. And this is a new problem - not the blocker before. Are there COMPLETE instructions on what to do when portage really eats it somewhere? Why aren't they in README.RESCUE? Why isn't README.RESCUE referenced in portage's own install scripts and displayed once the process has gone wrong? And why is portage stuff also in the tree under apps-portage, without something there to redirect people to sys-apps/portage just in case they'd expect to actually find portage in the more-obvious (because lower in the tree) place?

Oh, and:

# emerge ./portage-2.0.49-r21.ebuild 
Calculating dependencies ...done!
>>> emerge (1 of 1) sys-apps/portage-2.0.49-r21 to /
>>> md5 ;-) portage-2.0.49-r21.tar.bz2
>>> Unpacking source...
>>> Unpacking portage-2.0.49-r21.tar.bz2 to /var/tmp/portage/portage-2.0.49-r21/work
>>> Source unpacked.
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/tmp/sandbox-portage-2.0.49-r21-24821.log"

open_wr:   /etc/group
open_wr:   /etc/passwd
--------------------------------------------------------------------------------

So when will this be fixed? I can understand other Gentoo packages taking a few days, but this is the core of the system?
Comment 5 Masatomo Nakano (RETIRED) gentoo-dev 2004-02-08 16:29:31 UTC
Whit,
I guess there is problem in your /etc/portage/package.unmask.
Can you show me 'grep media-video/nvidia-kernel /etc/portage/package.unmask'?

But if so, emerge should detect it and display good error messages..
Comment 6 Carsten Lohrke (RETIRED) gentoo-dev 2004-02-09 02:12:16 UTC
Masamoto: Moving /etc/portage to /etc/_portage temporary fixed the install problem for me.

Is this warning of interest? 
...
copying build/lib.linux-i686-2.2/missingos.so -> /var/tmp/portage/portage-2.0.50/image/usr/lib/python2.2/site-packages
doexe: warning, skipping directory functions
rm -f libsandbox.so sandbox
...
Comment 7 Whit Blauvelt 2004-02-09 10:05:33 UTC
Masatomo,

# grep media-video/nvidia-kernel /etc/portage/package.unmask
media-video/nvidia-kernel-1.0.4496-r1
Comment 8 Whit Blauvelt 2004-02-09 10:14:19 UTC
Masatomo,

Yup. Removing /etc/portage/package.unmask (in which that was the only line) has unblocked portage. Thanks!

Comment 9 Whit Blauvelt 2004-02-09 10:37:13 UTC
BUT ...

Can't emerge anything. For instance:

# emerge -u system
Calculating system dependencies ...done!
>>> emerge (1 of 20) sys-kernel/linux-headers-2.4.21 to /
>>> md5 ;-) linux-2.4.21.tar.bz2
>>> Unpacking source...
>>> Unpacking linux-2.4.21.tar.bz2 to /var/tmp/portage/linux-headers-2.4.21/work
ACCESS DENIED  open_wr:   /etc/passwd
ACCESS DENIED  open_wr:   /etc/group

and then at the end a failure with ACCESS VIOLATIONs
Comment 10 Hai Pham 2004-02-09 11:42:59 UTC
Whit:

I had the exact same problem as you did when I tried to update my computer last weekend.  Emerge croaked after I issued:

emerge-webrsync
emerge -uD portage

I ended up with a bunch of python errors and emerge refused to do anything.  I then tried to recover by following the instructions at /usr/portage/sys-apps/portage/files/README.RESCUE

I could then run 'emerge-webrsync' but trying to do 'emerge portage' or 'emerge ~portage-2.0.49' would crap out with ACCESS VIOLATIONS to /etc/passwd and /etc/group

I fiddled some more this morning and managed to restore some sense of sanity.  I think the problem was caused when emerge updated python to 2.3 but failed to run python-updater (this sounds like a bug to me), which likely caused a series of failures that ended up with portage being broken.

Anyway, I think I've fixed my problem by doing:

FEATURES="-sandbox" emerge ~portage-2.0.49
/usr/sbin/python-updater
emerge portage

I'm not convinced that everything is back to normal just yet, but at least I'm now making progress and it seemed to have sucessfully emerged some other additional packages.

Comment 11 Chetan Sarva 2004-02-11 15:50:38 UTC
I had the same problem as Whit in comment #2 except it fails with: 

KeyError: "Specific key requires an operator (dev-perl/mod_perl-1.99.10) (try adding an '=')"

I have a copy of dev-perl/mod_perl-1.99.10 in /usr/local/portage and I suspect that Whit has a copy of nvidia-kernel there as well. 

FEATURES="-sandbox" emerge ~portage-2.0.49

does indeed work to restore a working copy of portage.
Comment 12 Jason Stubbs (RETIRED) gentoo-dev 2004-04-10 01:49:19 UTC
portage-2.0.50-r3 is the current stable version which fixes many bugs from the 2.0.49 series. The problem most of you seem to be having with .50 is due to your /etc/portage/package.{mask,unmask}. For example, comment #7 has "media-video/nvidia-kernel-1.0.4496-r1" whereas it should be "=media-video/nvidia-kernel-1.0.4496-r1".

This is in the documentation, although it is not straight-forward to find it. man 5 portage points to man 5 ebuild which then has under "Atom Versions":

    It  is  nice to be more specific and say that only
    certain versions of atoms  are  acceptable.   Note
    that  versions must be combined with a prefix (see
    below).

If any of you are experiencing this problem and have an up-to-date portage tree and moving /etc/portage doesn't fix it, check your /var/cache/edb/world file for the same thing. Otherwise, please post the trace-back that is occuring.
Comment 13 Chetan Sarva 2004-04-10 11:42:18 UTC
Jason, that's all well and good, but shouldn't portage be a little more resilient to such problems? A quick check for well-formed inputs and a warning message if there are any problems would solve this nicely. At the very least, portage should never dump a stacktrace for any reason.
Comment 14 Brian Harring (RETIRED) gentoo-dev 2005-02-27 23:50:12 UTC
original issue was fixed...
additionally, portage is a bit more 'resilient' to the issues you leveled in the last comment.  Now it tells you your /etc/portage/* files/entries are horked (if they are).