On Fri, Sep 03, 2010 at 02:05:25PM -0700, Shawn Walker wrote:
> Yes, I'm aware it's simple to do, it just seemed somewhat wrong that
> given that a repository is a pre-defined set of directories that a
> creation operation wouldn't actually be the one to create that
> entire set.

Another possibility might be to give pkgrepo(1) the ability
to create a filesystem instead of a directory.   If you wanted stricter
checking about directory creation, you could use getmntent(3C)
to check if the directory that exists already is a mountpoint.  Both of
those are much more complicated solutions, however.

> We've also had feedback from users in the past that they were
> surprised when they pointed at a directory that wasn't a repository
> and pkg.depotd started putting things in it.

This is a bit more tricky, since some users are irritated when the
program doesn't do what was requested, but others demand psychic
behavior.  Getting -f into users fingers is usually self-defeating.  I
wonder if an option like -e, akin to open(2)'s O_EXCL option would be
useful here?

> As I said, I could be convinced that simply checking for an empty
> directory is reasonable.

That's all I was trying to do. :)

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

Reply via email to