On Wed, Apr 15, 1998 at 07:20:37PM +0100, Ian Jackson wrote: > However, I disagree with the proposed syntax for the extrafiles > control area file. I think the file should contain plain glob > patterns a la fnmatch(3) (with * matching /).
I have a couple of concerns with this.
- Having * match through directories seems odd to me. In particular,
when used in the shell, a/*.c won't match a/b/*.c; whereas in the
extrafiles control file it would.
I'm not sure this creates an actual problem -- it only effects things
where
dir/*.ext
is owned by one package, while
dir/subdir/*.ext
is owned by another. I suspect in most cases this looks more along the
lines of
/usr/lib/package/main/* (for the main package)
vs /usr/lib/package/auxiliary/* (for an `auxiliary' extension)
Python is one program which doesn't appear to do things this way --
/usr/lib/python/*.py[oc] are created by python, while
/usr/lib/python/dpkg/*.pw[oc] are created by dpkg-python.
- My other much more minor concern was that while fnmatch() provides a
standard implementation for (in effect) dpkg's -S functionality, the
related glob() function does *not* (afaict) provide a way of getting
dpkg's -L functionality. (it'll do everything except match through
directories)
(As an aside, fnmatch's FNM_PATHNAME option doesn't appear to work; so
there doesn't seem to be a way to get fnmatch and glob work in the same
way.)
> The patterns should all start with /.
Yup.
> Should dpkg --purge automatically remove such files, as it does for
> conffiles ? I think not.
I agree, under the philosophy that if the package created them, the
package should delete them.
In reponse to Manoj's comment (that there should be a tool that will
remove any extrafiles left on the system if the sysadmin wishes it), cruft
will (if this is adopted) report any leftover extrafiles of packages that
have been removed from the system -- checking through its list should give
a good idea about needs to be deleted, and what doesn't.
Cheers,
aj
--
Anthony Towns <[EMAIL PROTECTED]> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. PGP encrypted mail preferred.
``It's not a vision, or a fear. It's just a thought.''
pgpkYaRQZuOjq.pgp
Description: PGP signature

