[patch] create dirs

Panu Matilainen pmatilai at laiskiainen.org
Wed Jun 14 09:27:13 PDT 2006


On Wed, 2006-06-14 at 18:00 +0200, Ralf Corsepius wrote:
> On Wed, 2006-06-14 at 18:39 +0300, Panu Matilainen wrote:
> > On Wed, 2006-06-14 at 11:38 +0200, Ralf Corsepius wrote:
> > > Hi,
> > > 
> > > the patch below changes the configuration to create the systems dirs apt
> > > presumes to exist based on its configurations.
> > > 
> > > I presume this patch to be a bit controversial, be cause several of
> > > these dirs currently can be changed at run-time, while this approach
> > > assumes them to be hard-coded at configuration time.
> > 
> > No controversy here. This is one of those little things that has annoyed
> > me for ages (but haven't gotten around to do anything about it) :
> > "bootstrapping" apt from sources is way too cumbersome at the moment
> > when you have to create all those directories manually. Those playing
> > with oddball setups can create the directories by themselves, this
> > serves the majority of users very well I think.
> > 
> > This doesn't yet create a fully working setup though, cache and statedir
> > need more directories:
> > /var/cache/apt/
> >                archives/
> >                         partial/
> >                genpkglist/
> >                gensrclist/
> > /var/lib/apt/
> >              lists/
> >                    partial/
> >              
> > I extended your patch a bit and added those.
> Now we the controversy.
> 
> The idea behind what I am doing, is to hard-code the the "root" dirs and
> let the others be created at run-time.

Oh, creating the rest on run-time is fine as well. We'll just drop the
build-time creation of those when we add run-time dir creation, no big
deal.

> 
> Background: I had found the /var/cache/apt/archives hierarchy to be
> non-functional, when sharing caches across a network and when
> "dist-upgrading" (Consider using sharing /var/cache/apt between an FC4
> and an FC5 machine).
> 
> Therefore, I using separate "per-dist" subdirs
> /var/cache/apt/fedora/4/
> /var/cache/apt/fedora/5/
> [now extend this to different archs]

That's hardly the common case, but like said, I've nothing against
making apt create it's directories on run-time as needed, it's a bit
ridiculous that it doesn't do that.

> 
> >  Also I removed
> > the /etc/apt/gpg directory because that's not an "official" directory at
> > all, it's only used by the optional gpg-import script from contrib/ and
> > it's not a very good idea anyway (both the location and the way
> > gpg-import works, need to replace that with something saner some day). 
> Hmm, my plan was to make it "official" and to install these scripts by
> default - Remember, we don't care much about apt anymore, it's us to
> specify, what's official. 

gpg-checker itself is quite ok and could be added by default, but the
gpg-importer is ... nasty. GPG keys shouldn't be automatically imported
just like that, it should ask the user really. That would be possible to
do with apt itself but no way to do it from Synaptic. 

My longer term idea about this is to have the gpg key locations
specified in repository config, much like yum has, and add API to
libapt-pkg for handling those so that it can be made usable from
Synaptic etc. At that point there's no point in having a /etc/apt/gpg
directory at all.

> While we're at it: What about the plethora of lua scripts in apt's
> source-tree.
> 
> IMO, we should either drop them, or use them. ATM, none of them is used,
> they all are more or less semi-functional gradually rottening dead code.

Quite a few of the scripts aren't really generally useful, they only
apply to some specific cases and could (or perhaps should) be considered
as examples of using the lua-system. OTOH, there are some generally
useful bits:
- gpg-check (but not the importer :)
- log 
- apt-cron (but needs some love first I think)
- apt-groupinstall would be useful if was able to use repomd groups.xml
data, at the moment it's not really possible. So another needswork item.

It would be nice to have a way to install (selected) scripts from
contrib, that I fully agree with.

	- Panu -




More information about the Apt-Rpm mailing list