[Tfug] fhs on /var/cache (debian)

John Gruenenfelder johng at as.arizona.edu
Mon Jul 24 10:58:52 MST 2006


>> the package manager, dpkg, and as such is not a "critical" component.  dpkg
>> does not appear to have any data under /var/cache.
>
>i use apt-get and aptitude for most things, and only drop down to dpkg
>when i can't do something without it.  if you know how to emulate
>apt-get with dpkg, complete with dependencies, i will try that and let
>you know.
>
>the claim to attempt to comply with fhs is not contingent on the
>criticality of the component that i know of.  can you point to where
>it is?  (no need to look it up; just a rough recollection will do.)

Well, what I meant was that since /var/cache is full of transitory data, a
critical system component cannot rely entirely on it.  That is, if you axe
that directory, the system should not be in an unrecoverable state.

In this case, this system is not broken.  You can continue to use dpkg to
manage packages.  And apt's data can be regenerated by apt itself.  The only
major loss is your debconf choices.

As for managing without apt/aptitude... you can't really use just dpkg for
that.  All dependency handling is intact, but dpkg doesn't actually download
any data; it only uses data currently available.

That's why, save for the debconf stuff, you don't necessarily need to back up
/var/cache.  It can be easily recreated if necessary.  Contrast that with
/var/lib/dpkg, for example.  If you hose that, your system is well and truly
broken and you'll definitely need to fetch it from a backup.

>> Looking at my system's /var/cache I see only /var/cache/apt and
>> /var/cache/debconf which have anything to do with packages.
>
>good point about dpkg, but i think most users use front ends to dpkg.
>for that matter, many users with backup media constraints will believe
>the fhs promise to be enough and not back up /var/cache.  should they
>be so trusting?  clearly not, but they will be.

Again, save for the debconf data, I don't really think there is any problem.
If you didn't back it up to begin with, you can just have apt fetch it again
for you.

>again, i'd be interested in doing the equivalent of apt-get update;
>apt-get upgrade (or aptitude upgrade) without apt, if you know how.
>i.e. with the identical results.  i wonder if somebody has written a
>shell script.

None that I know of... but apt's dependencies are quite small and it is hard
to break in most situations so you're unlikely to need to go without it.  To
achieve identical results with some non-apt program, you're essentially
looking at another implementation of a front end.  A shell script is unlikely
to be able to handle it since the dependency database will need to be parsed.

>> As for /var/cache/apt, that is entirely transitory data.  Doing an "apt-get
>> update" should be enough to regenerate it, I believe.  Of course, that
>> doesn't
>> mean it's okay to bomb horribly when those files are missing...
>
>oh, and the tools do bomb, one by one.  seems like the programming
>ethic of checking for stuff before doing things that depend strongly
>on that stuff to even bomb reasonably isn't quite as strong as we
>might like for basic system tools.  (by "bomb reasonably" i mean
>giving the user more than "segmentation exception".)  the developers
>had higher priorities, i guess.

Definitely not cool.  Did you submit a bug report?  Despite its heavy use, you
can still find some rough edges on occasion...   If you follow
debian/unstable, there was a period a few months back where aptitude just
barfed when doing an update.  Fortunately, plain apt's handling was a bit
better and it didn't die.

>> --John Gruenenfelder    Research Assistant, UMass Amherst student
>>                         Systems Manager, MKS Imaging Technology, LLC.
>
>remote student or remote tfugger?

Now I'm a remote tfugger.  I lived in Tucson up until last September.  TFUG's
list is just too useful to give up.  Usually.  :)


-- 
--John Gruenenfelder    Research Assistant, UMass Amherst student
                        Systems Manager, MKS Imaging Technology, LLC.
Try Weasel Reader for PalmOS  --  http://gutenpalm.sf.net
"This is the most fun I've had without being drenched in the blood
of my enemies!"
        --Sam of Sam & Max




More information about the tfug mailing list