Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Package ownership of files
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
clacour
n00b
n00b


Joined: 19 Apr 2002
Posts: 59
Location: Dallas, Tx USA

PostPosted: Tue May 21, 2002 3:08 am    Post subject: Package ownership of files Reply with quote

There's one line in the Gentoo doc that has bothered me badly ever since I first saw it.

It was a warning saying that "the last package to install a file owns it, and if that package is uninstalled, the file will be deleted, regardless of who else might be using it."

That thing that raises my hackles is the idea that more than one package can own the same file.

In my opinion, if you have two packages which each need to address the same file, then a third package should be built that contains the file (or more commonly, files) that need to be shared, and both of the original packages depend on that third one. A very simple rule tells you when to split them (ok, it tells one set of circumstances under which they should be split -- there are lots of others), no file should ever exist in more than one package.

I realize that there are two downsides to this -- it increases the number of packages (perhaps quite a bit) and makes some of the packages almost absurdly small. (Conceivably, a package might consist of a single file.)

I think in the long haul it would pay off handsomely, because there would never be any issues with what order you installed things in, or having an uninstall of one package break another.

I'm also not sure that Portage in it's present incarnation allows for packages within packages. You can do much the same thing with dependencies, but that could make the list of packages to be installed for something like "emerge kde" right after the initial system build several pages long (several dozen pages?).

I'm looking for two or three kinds of comments:
technical feasibility (there could easily be technical reasons I don't know about that would make this impossibly difficult);
Ideas on how to split things up in an automated fashion (because doing all this by hand will be real painful (although I'd argue that sooner or later it's going to be a necessity.)
Thoughts on its utility -- am I making a mountain out of a molehill? I obviously don't think so, or I wouldn't have posted this, but I'm aware that I can sometimes be a bit biased in favor of my own ideas. :wink:



Another idea I want desperately would help a great deal with finding where packages need to be broken up.

I want a list, ordered by file name, of every file that could be on a gentoo system, and the package or packages it comes from.

I can get such a list from qpkg for the packages I've already installed, and I can even use it to find out what package a specific file came from.

Problem is, I have that functionality only after I've installed the package.

I ran into a situation the other day where I needed a particular file. I made several half-educated guesses at what packages the needed file might be in (all wrong) and finally gave up on the project. (Please don't ask what -- it's been too long and I've forgotten.)

I could search the tar.gz and tar.bz2 files, but that only tells me the source code files, not the ones that will end up on my working system.

Could we make it part of putting a package into "production" to install it somewhere, use "qpkg -l" to list all of it's files and then feed that into a master database?

(If there's already a method of finding this out and I've overlooked it, PLEASE tell me. I want this ability rather badly.)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum