On Sat, 11 Nov 2017 12:31:15 -0500
Michael Orlitzky <m...@gentoo.org> wrote:


> Essentially,we have two commands to create a directory, "dodir" and
> "do-empty-dir" (which we call "keepdir"). The latter is only necessary
> due to an implementation detail, so it doesn't belong in the user
> interface -- the PM should figure out what to do.
> 
> As far as the actual implementation goes, I'm not sure that
> automatically-generated ".keep" files are better than having the
> package manager maintain its own database. The latter would be more
> complex, but would avoid littering everyone's filesystems with
> ".keep" files.
> 

Well, for:

1) using .keepdir files makes this package manager non-specific, ie:
using a different PM would mean it too sees that it is suppose to be
kept.

2) Most ebuilds don't need/or use .keepdir, so I doubt there are that
   many littering up your filesystem.

3) There already is a database of the files installed by a package.
   But, how does it know which other packages might need to install to
   that directory.  So, what does it do on unmerge of the package.
   Typically, the package manager will refuse to remove a non-empty
   directory after the files it is removing are removed.

4) Creating a single database for these will make the system more
   vulnerable to corruption and data loss.  It would save on disk usage
   and number of inodes used.  But there is a tradeoff between space and
   robustness.  If one .keepdir is lost, it may only affect a few
   packages.  If the database becomes corrupted.  It could potentially
   mean the loss of much more of your installed pkg data. Spanning a
   great deal of the installed pkgs.  In this case simplicity
   of .keepdir is in my opinion, much better than a single db.

-- 
Brian Dolbec <dolsen>


Reply via email to