[Rule-list] vacuum example

Martin Stricker shugal at gmx.de
Sat Nov 30 02:10:01 EET 2002


Eugene Wong wrote:

> Just a comment on my choice of /var/db & /var/run: I don't know what
> the proper place is for the files, so I am open to suggestions, but
> I think that the nature of these files requires that they be placed
> in a /var subdirectory.

Definitely. Not yet sure where exactly under /var, I'd have to look at
the FHS http://www.pathname.org/fhs/ and where Red Hat puts their stuff.

> If there are no objections, suggestions or discussions, by the
> weekend, then I'll start bash-scripting according to the
> suggestions of Martin Stricker.

*blush* ;=D So I drop some more ideas below...

> [root at ew486 i386]# vacuum azerty

> [root at ew486 i386]# ls
> azerty  dvorak  fgGIod  include  qwerty  qwertz
> /* Notice that the files are still there. They will be deleted when
> we run "vacuum --empty" or whatever the script is called. */

So vacuum does just keep a list (/var/run/vacuum.tmp_lst) of things to
delete? I would prefer if it could move the files to some kind of
dustbin, so I can *test* what happenes when I delete the stuff before
actually deleting it.

> [root at ew486 run]# vacuum --empty; cat vacuum.tmp_lst
> [root at ew486 run]# cat /var/db/vacuum.db
> /usr/share/i18n/
> /lib/kbd/keymaps/i386/azerty/
> /lib/kbd/keymaps/i386/fgGIod/
> /lib/kbd/keymaps/i386/qwertz/
> /usr/lib/locale/
> /* Each line represents 1 execution of "vacuum". Also notice that
> /var/run/vacuum.tmp_lst is now empty, and /var/db/vacuum.db now
> contains all of the file names & directory names. In this example,
> I never vacuumed any files as I intended to, but hopefully you get
> the idea. */

Not really... So vacuum -e (like rpm -e) or --empty (it would be nice to
have both long and short options) deletes the files which have been
prevacuumed (hopefully to an interim directory like /var/spool/vacuum)
by processing /var/run/vacuum.tmp_lst. There should also be vacuum -r or
--restore to revert the prevacuuming.

And I have another idea/concern: Since Red Hat Linux and other distros
are based on RPM, the RPM database stores information about each file
installed by a RPM package. Wild vacuuming would make this database
inconsistent with reality. I don't know if it's possible to tell the RPM
database that some files have been deleted, but I think I would get
errors if I tried to rpm -e a package from which I vacuumed some files.
But that still doesn't prevent that dependency checks might go bad
because the package to be installed depends on a vacuumed file that it
believes to be still there... Oh well, so vacuum is for experienced
users...

Don't be worried too much, I have the habit to point to all the possible
problems early, so they are considered while developing... ;-)

> [root at ew486 run]# ls /usr/lib
> /* Pretend that locale/ is missing from /usr/lib */
> [root at ew486 run]# ls /usr/share
> awk   emacs          magic       man   openldap   ssl       vim
> dict  empty  info    magic.mgc   misc  pixmaps    tabset    zoneinfo
> doc   groff  locale  magic.mime  nmap  printconf  terminfo
> /* i18n/ is missing for the purposes of this illustration. In the
> real situation this directory would list properly. I just deleted
> the text for the sake of this sample, & didn't want to rearrange
> everything. */

Sorry, but I do not understand this. Could you please explain why you
removed the directory for illustration, but when using the *real* script
it should be there? Hrm, this sentence doesn't make much sense either -
time to go to bed! ;=D

Best regards,
Martin Stricker
-- 
Homepage: http://www.martin-stricker.de/
Linux Migration Project: http://www.linux-migration.org/
Red Hat Linux 7.3 for low memory: http://www.rule-project.org/
Registered Linux user #210635: http://counter.li.org/


_______________________________________________
Rule Project HOME PAGE:  http://www.rule-project.org/rule/
Original Rule Development Site http://savannah.gnu.org/projects/rule/
Original RULE mailing list: Rule-list at nongnu.org, hosted at http://mail.nongnu.org/mailman/listinfo/rule-list




This full static mirror of the Run Up to Date Linux Everywhere Project mailing list, originally hosted at http://lists.hellug.gr/mailman/listinfo/rule-list, is kept online by Free Software popularizer, researcher and trainer Marco Fioretti. To know how you can support this archive, and Marco's work in general, please click here