On Tue, May 31, 2011 at 12:53:57PM -0500, Jonathan Nieder wrote:
> Some quick clarifications.
> 
> Osamu Aoki wrote:
> 
> >     I think you can do it in combination with dpkg-divert
> 
> Directories can't be diverted with dpkg-divert, probably because it is
> not immediately obvious what the right semantics would be when
> unpacking files within those directories (Bug#30126).

Oh, yes you are right.  I remember.  Besides, dpkg-divert is a command
we should try to avoid even if it can do directory.
 
> > I see.  It is interesting point.  bind mount is simpler and thus better
> > solution.  ("can be done" is not always the best thing to do.  KISS is
> > the golden rule.)
> >
> > 9.3.10. Expansion of usable storage space by mounting another partition
> >  --> add "bind mount" reference
> 
> I will try to come up with wording within the next week or so, though
> no promises (feel free to ping me if I seem to have forgotten, and I
> wouldn't be offended if someone else does it instead).

Thanks.  I am thinking along ...

Change titile of 9.3.10.to:

9.3.10. Expansion of usable storage space by mount(8)

... existing contents

If you have an empty directory on another partition with usable space,
you can mount(8) it with --bind option to a directory where you need
more space.

<EXAMPLE>
..
</EXAMLE>
 
> > 9.3.11. Expansion of usable storage space using symlink
> > --> add warning to /opt etc.  (It works until base-files are updated.)
> 
> It doesn't get stomped on by dpkg in that case, for two reasons:
> 
>  - dpkg does not distinguish between directories and symlinks to
>    directories;
> 
>  - base-files does not include /opt in its files list, anyway.
> 
> There is unfortunately a more subtle case where dpkg does remove the
> symlink.  Today, if I run
> 
>       dpkg -S /opt
> 
> I will find that no currently installed package ships any files under
> /opt.  If I install such a package (like the Acrobat Reader plugin,
> iirc), though, then dpkg will consider the /opt directory or symlink
> to be owned by that package.  Later, when the last such package is
> removed, if /opt is an empty directory or a symlink then it is removed
> (and not replaced by a directory; just missing).
> 
> Caveat: I haven't tested the above but am just summarizing what is
> said in Bug#182747.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=182747 (for DPKG)
Hmmm...

FYI:
$ cd /var/lib/dpkg/info
$ grep opt
...
base-files.postinst:  install_directory opt       755 root
base-files.postinst:  install_directory etc/opt   755 root
base-files.postinst:  install_directory var/opt   755 root
...

So it is created by base-files.

> > In general, random tweaking system provided files works until it get
> > updated.  
> 
> That's true, with a limited exceptions of replacing directories by
> symlinks.  A good approach might be to explain that exception along
> with limitations (Bug#182747, Bug#626338).

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=626338 (FOR POLICY)
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=182747 (for DPKG)

Maybe just tell user to use this trick only in  /home/<user>/ or /usr/local/

> > Similar case is changing permission of system file.  You need
> > dpkg-statoverride to do it.
> 
> Yes.
> 
> Regards,
> Jonathan



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to