Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 124980 - Ebuilds which scan and modify files on system create orphaned files (upgrading GCC is a good example)
Summary: Ebuilds which scan and modify files on system create orphaned files (upgradin...
Status: RESOLVED DUPLICATE of bug 71265
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-04 10:24 UTC by Wiebe Cazemier
Modified: 2006-03-04 20:17 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 Wiebe Cazemier 2006-03-04 10:24:25 UTC
I don't know exactly what category this is, because it kind of applies to a lot, so I've left it unspecified.

Ebuilds which scan files on your filesytem for things like inconsistencies, and modify them to correct for the mistake, create orphaned files on your filesystem. Upgrading GCC is a very good example. When you upgrade it, it scans for .la files with hardcoded filepaths and corrects them to match the new GCC libs. You see messages like this:

FIXING: /usr/kde/3.4/lib/libkdeui.la ...[v]

But, when doing so, it doesn't correct the mtimes and md5sums which are stored in the installed-package DB (/var/db/pkg). When you check a package for integrity, it says things like:

# equery check =kdelibs-3.4.1-r1
!!! /usr/kde/3.4/lib/kde3/kabc_net.la has incorrect md5sum
!!! /usr/kde/3.4/lib/kde3/kimg_xcf.la has incorrect md5sum
!!! /usr/kde/3.4/lib/kde3/kio_ftp.la has incorrect md5sum
!!! /usr/kde/3.4/lib/kde3/kio_http.la has incorrect md5sum
!!! /usr/kde/3.4/lib/libknewstuff.la has incorrect md5sum
!!! /usr/kde/3.4/lib/kde3/kdeprint_ext.la has incorrect md5sum
!!! /usr/kde/3.4/lib/kde3/kded_kdeprintd.la has incorrect md5sum
blablabla

Unmerging the package which containes the files in question consequently results in the files not being unmerged, because the mtime doesn't match anymore. During unmerge, you see this:

--- !mtime obj /usr/kde/3.4/lib/kde3/kio_atlantik.la

It results in having loads and loads of orphaned files on your system.

When any ebuild makes such changes to any files in "/" (meaning, which already have been merged, either by the current or other e-builds), the mtime and md5sum have to be corrected in the package-DB (of course, only of those files who still have the correct mtime and md5sum stored, to avoid assigning orphaned files to packages).

Perhaps the best way to go about this is to have some kind of API included in portage (if that's possible), which allows an ebuild to set the mtime and md5sum of any file, and let portage determine if the change is allowed or not (it is not allowed, for example, when the file you are setting doesn't have matching mtimes and/or md5sums to begin with). But, I'm not a Gentoo dev, it's only a thought :)

I realise this is quite difficult, but in my opinion necessary for having an operating system which doesn't require reinstallation every <timeperiod>. For me, reinstallation is a "priviledge" reserved for commercial OS'es from Redmond.
Comment 1 Gerte Hoogewerf 2006-03-04 13:42:55 UTC
I really don't like fix_libtool_files.sh. I second this bug.
Comment 2 SpanKY gentoo-dev 2006-03-04 20:17:16 UTC

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