Why can't pkg-plist list directories?

Sam Lawrance boris at brooknet.com.au
Thu Apr 28 03:01:46 PDT 2005


On Thu, 2005-04-28 at 18:03 +1000, Edwin Groothuis wrote:
> On Thu, Apr 28, 2005 at 12:08:41AM +1000, Sam Lawrance wrote:
> > Aside from the fact that the pkg_* tools don't currently support it, is
> > there a reason why we use @dirrm in packing lists rather than just
> > listing the directories?
> 
> Foolproofing.
> 
> If I copy a file to etc/foo where foo is a directory, but I forgot
> to create the directory first I end up with the file foo in etc/.
> Having the pkg-plist explicitely stating it as a directory, it will
> throw an error and the maintainer (and eeeeeeverybody else) will
> know he made a mistake.

But if the packing list contained, for example

	etc/foo/somefile

and either

	@dirrm etc/foo

or just 

	etc/foo

Then etc/foo/somefile would not be found and the error would be known in
either case.  Although, I do in part see your point... there's less
ambiguity with @dirrm.

In which case, perhaps pkg_create could be modified to add directories
listed with @dirrm to the tarball so empty dirs, permissions and modes
are preserved.







More information about the freebsd-ports mailing list