When attempting to inject any package into portage using Portage 2.0.50 it returns with the error '!!! BAD COUNTER in <package-name>'. it seems to inject the package ok otherwise. Reproducible: Always Steps to Reproduce: 1. emerge --inject net-www/epiphany-1.0.7 Actual Results: emerge returns with: !!! BAD COUNTER in net-www/epiphany-1.0.7 >>> Injected net-www/epiphany-1.0.7. Expected Results: Should return with >>> Injected net-www/epiphany-1.0.7 I've checked the sources of ver. 2.0.50 against ver. 2.0.49-r21 and I think I've tracked down the problem. In file /usr/lib/portage/pym/portage.py : The function dbapi.counter_tick_core has this line (line 3808 in ver 2.0.50) old_counter = long(self.aux_get(x, ["COUNTER"])[0]) but aux_get() just returns None since there is no code in the function which raises an excepion and causes the error message. In version 2.0.49-rc2 the variable mycpv is None so this code is never called. By changing line 4000 from: counter=db[self.root]["vartree"].dbapi.counter_tick(self.root,mycpv) to: counter=db[self.root]["vartree"].dbapi.counter_tick(self.root) as it is in version 2.0.490-rc2, the error is eliminated. I'm not sure if somebody forgot to add the aux_get() code, if the mycpv variable was added by accident, or if this really is the correct result (I hope not because to users it seems like there is something very bad happening).
I noticed this too but I also discovered that although the injected pkg shows up in 'emerge search' etc, emerge will still try to install the old pkgs I was trying to skip. I've tried to use inject to stop 'emerge system/world' from trying to install devfsd and for other stuff but it doesn't work.
Okay, my mistake - I've found that it works but only if I inject the exact version of devfsd that emerge thinks should be installed.
Fixed in cvs
Can you change this bug's status to closed?
Done.