Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 37823 - using `emerge -b <pkg>` causes newer version to be auto-cleaned in portage 2.0.49-r21
Summary: using `emerge -b <pkg>` causes newer version to be auto-cleaned in portage 2....
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2004-01-10 13:37 UTC by Pablo De Nápoli
Modified: 2004-02-07 14:58 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge -b gentoolkit output (emerge-output.txt,7.06 KB, text/plain)
2004-01-10 13:40 UTC, Pablo De Nápoli
Details
fix-db.pl output (fix-db.pl.output,114 bytes, text/plain)
2004-01-10 14:51 UTC, Pablo De Nápoli
Details
fix-db.py output (fix-db.py.output,68.17 KB, text/plain)
2004-01-10 14:51 UTC, Pablo De Nápoli
Details
rejected hunk from patch (portage.py.rej,912 bytes, text/plain)
2004-01-11 18:36 UTC, Pablo De Nápoli
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pablo De Nápoli 2004-01-10 13:37:06 UTC
The current vesion of portage has a serious bug that can leave your system in unusable state. In fact, removing the old version of a package and replacing it for a newer one is not handled in a safe way, since it may happend that you end with no version of the package installed.

For example, I had version 1.0.37 of gentoolkit installed. I've updated to version 1.0.38 and I had end with no version installed. 

The worst of it, is that this happend to me with portage itself, so I had to reinstall it by hand (from a .tar.bz2 file)

To see the problem I'm sending to you the output of

emerge -b gentoolkit

when gentoolkit 1.0.38 was alredy installed. As you can see, the same files that are installed, get removed after that, so you end with no file installled.

Please FIX THIS SERIOUS BUG SOON or many Gentoo users will end up with a system in unsable state and will have to reinstall it from scratch.





Reproducible: Always
Steps to Reproduce:
1.emerge -b gentoolkit
2.(when gentoolkit is already installed)
3.
Actual Results:  
You end up with no gentoolkit installed 

Expected Results:  
It should recompile and install gentoolkit
Comment 1 Pablo De Nápoli 2004-01-10 13:40:03 UTC
Created attachment 23566 [details]
emerge -b gentoolkit output
Comment 2 Marius Mauch (RETIRED) gentoo-dev 2004-01-10 14:29:24 UTC
try /usr/lib/portage/bin/fix-db.py or fix-db.pl and see if that fixes it.
Comment 3 Pablo De Nápoli 2004-01-10 14:51:01 UTC
Created attachment 23569 [details]
fix-db.pl output
Comment 4 Pablo De Nápoli 2004-01-10 14:51:58 UTC
Created attachment 23570 [details]
fix-db.py output
Comment 5 Pablo De Nápoli 2004-01-10 14:55:11 UTC
Using fix-db.pl and fix-db.py as suggested did NOT fix the problem.
fix-db.pl ran with out errors. On the other hand fix-db.py output some anoying messages saying the counter is corrupt (I don't understand what do they mean)
What are these scripts supposed to do? What is the difference between them?

Is there some documentation about the portage internals? (for example: what are these counters?)
Comment 6 Nicholas Jones (RETIRED) gentoo-dev 2004-01-11 17:45:59 UTC
Here's my current solution. This will end up on 2.0.50's next pre.

http://gentoo.twobit.net/portage/portage.py-counterfix-040111.diff
Comment 7 Pablo De Nápoli 2004-01-11 18:34:59 UTC
The patch in comment #6 did fixed this problem.
Thank you !
I've test it against portage-2.0.50_pre12. However 
hunk #7 was rejected by patch

Comment 8 Pablo De Nápoli 2004-01-11 18:36:36 UTC
Created attachment 23650 [details]
rejected hunk from patch
Comment 9 Pablo De Nápoli 2004-02-07 14:58:18 UTC
Now that portage-2.0.50 is stable, we can close this bug
(since the bug-fix is included)