On Fri, Sep 03, 2010 at 01:53:09PM -0700, Shawn Walker wrote:
> This was done intentionally because we essentially have no way to
> guarantee that the target directory isn't being used for something
> else or that continuing with the operation won't cause loss of data
> or other unexpected behaviour.
> 
> I really didn't want to have to verify that the target directory was
> really empty although I could be convinced that approach is valid.

At least in the case of a mountpoint, it seems excessive to require
creation a subdirectory just to add a pkg repository.  Having one
filesystem per repo is a model that would be easy to administer through
ZFS.

It should be relatively easy to see if a directory is empty or not,
though.

if len(os.listdir(repodir)) > 0:
        raise DirectoryNotEmptyError

or something similar, would work nicely.

-j
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to