Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 54669 - reemerging a *-bin package destroys the installation
Summary: reemerging a *-bin package destroys the installation
Status: RESOLVED DUPLICATE of bug 16162
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-21 10:57 UTC by Georgi Georgiev
Modified: 2005-10-07 09:23 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 Georgi Georgiev 2004-06-21 10:57:41 UTC
Portage tracks new files by their mtime and md5. However, if you install a *-bin package, the files a very often install with the mtime from the package. This means that a subsequent "removing the already installed version of the package" would remove the files that have just been installed.

Reproducible: Always
Steps to Reproduce:
1. emerge mozilla-firefox-bin
2. emerge mozilla-firefox-bin

Actual Results:  
Half of your mozilla-firefox-bin installation is lost.

Expected Results:  
Nothing should have been removed, as the packages are identical.

I guess, portage should make sure that files are installed with a present
timestamp (if this is when portage collects the timestamps) in $DISTDIR. This
means that installations like the one of mozilla-firefox-bin (quoting: "mv ${S}
${D}/opt/firefox"} should not happen, or, as an alternative and a better idea,
all files in ${DISTDIR} have to be "touch"ed before collecting timestamps and
md5sums.

I am curious if something similar happens when using "emerge -K".
Comment 1 Brian Harring (RETIRED) gentoo-dev 2004-06-21 11:14:54 UTC
Heh, that's a lovely one :)

I'm working on trying to centralize the CONTENTS data, which would avoid issues like this, and also deal w/ instances where a file is owned by multiple packages.  Not quite ready yet though.

Meanwhile, suggestions for an intermediate hack to block this behaviour would be appreciated :)
Comment 2 Georgi Georgiev 2004-06-21 11:18:27 UTC
I gave an intermediate workaround solution suggestion already: after src_install() is complete, a "find ${DISTDIR} -print0 | xargs -0 touch" is performed. That ought to do the trick.
Comment 3 SpanKY gentoo-dev 2004-06-21 22:42:22 UTC

*** This bug has been marked as a duplicate of 16162 ***