Re: How are directories managed.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 2011-04-12 03:56, Paul Elliott wrote:
>
> This may be a FAQ but I could not find the answer in the documentation:
>
> How are directories managed? When does a directory get deleted? What is the
> lifetime of a directory? Is a directory owned by a specific package?
>
> Which packages are alowed to deposit files in a specific directory? What exactly
> are the rules?
>
Hi
I think it is easier for us to answer your question if you can be a
little more specific on what you want to know/do. Depending on what you
are trying to do the answer may be covered by the Policy, FHS or/and the
interface of certain packages (e.g. like installing files into
/etc/apt/apt.conf.d/).
> If a package wants to put files in a directory, how does the package "know"
> that the directory will live longer than the file?
>
Assuming your question is something like:
"If pkgA installs a file A as /some/where/A, how can pkgA know that A
is not removed before pkgA is removed/uninstalled?"
If we take the very simple case for a moment, then this is given that A
will exist as long as pkgA is installed. dpkg will not remove
directories as long as a file exists in it.
Extending it a bit, the file A can legally be renamed using
dpkg-divert. If another package uses dpkg-divert to move A, then said
package is expected to provide a replacement for A that keeps pkgA
functional. Otherwise, the diversion can be done by the system
administrator; in this case the sysadmin is expected to know what he/she
is doing.
~Niels
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBCAAGBQJNpEGfAAoJEAVLu599gGRCpXcP/2jitRJoQ1kg7iszl04n9uau
XFjsXFQmq18gG9pO0S+33H39/LpNfodnW+Zx/F1L5VrEPpZBT3tnLQYf+enwfRur
+N1yjAL+HyU40HrhRWmm5t7GnUi0s3OVSyNb5TljXgaGdmgGAih7dLpMvzG8hugU
bc4/dswPFMltO/3l0AJE26GztKbnfwNyeSSToN1G9kb3pJcetZfvaeodzh8PRBzw
ByMdPEq3tq4TXuF+jhSBy2yNxeycG2HvcZdDXA8JagXoX8J150c8Vcj3nztvHnOU
WMP4VBrvQL0j6uT4a05m1Ey730lmogspOozSUiuH0MCS1RL54eXarZj++ZjLSkBz
7sykoUYcXDjtq8aFELMjc28Ih56lQZBB9aWrRwDDE4Bvb2Q9D3Vv8wjpSuQfEgSG
kfZYOt/CuyXou0gR/7HQThYI2K8BVaVy4pRm/d/oq4+yL8xZBrKRRK7MnphTtbiq
+jgIItQ5ZfEdyUv2jZHLX4TBYMqFwat3RWDSanCJNa4JFg2LbuGNCqP0WKgMvvJf
yFRjeC0dVdTgDHzNC9CqdmqD1NlaQnyGaCf/OVD3jDKW4Mp6TnNb88cefLSUcdNs
DSCUlBNJWekM2Ba1Ayz+jepCdwlAwh9+gKwDoscSx4cWrxkDmnMyWJTykIfcNwuz
YgrRkdqTsLmiuDTIr9v6
=q7Jh
-----END PGP SIGNATURE-----
Reply to: