On 09/ 3/10 01:39 PM, Alan Steinberg wrote:
When we create new repositories, we first make a separate zfs filesystem
for the respository. This create the directory as well:

$ pfexec zfs create -o mountpoint=/var/pkg/testrepo tank/testrepo

When pkgrepo is run to turn it into a repository, pkgrepo warns that the
directory already exists:

It doesn't warn; it actually fails -- look at the exit code.

$ pfexec pkgrepo create file:///var/pkg/testrepo
pkgrepo: A package repository (or directory) already exists at
'/var/pkg/testrepo/'.

I know we can just ignore it, since it is just informational (though
someone might think it means it failed). But since I think it would be
very common to create a zfs mountpoint first, I'm wondering if the
message is necessary for an empty directory. Alternatively, maybe it can
be rephrased to make it more of a normal thing. Maybe something like:

pkgrepo: Creating package repository in existing directory
'/var/pkg/testrepo/'.

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.

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

Reply via email to