Directories aren't included?
Matthew Seaman
m.seaman at infracaninophile.co.uk
Wed Jun 18 05:11:19 UTC 2014
On 18/06/2014 00:46, Sean Fagan wrote:
> Given this manifest file:
>
> {
> "name" : "mypkg",
> "version" : "1.0",
> "origin" : "system/test",
> "comment" : "foo",
> "maintainer" : "me",
> "prefix" : "/",
> "www" : "http://www.example.com/",
> "licenselogic" : "single",
> "desc" : "bar",
> "dirs" : {
> "./dir1",
> "./dir1/dir2",
> },
> "files" : {
> "./dir1/test_file" : "-",
> },
> }
>
> and this layout:
>
> dir1
>
> ./dir1:
> dir2 test_file
>
> ./dir1/dir2:
>
> The tar file it creates does not have "dir2" in it:
>
> tar tvf badpkg-1.0.txz
> -rw-r--r-- 0 root wheel 214 Dec 31 1969 +COMPACT_MANIFEST
> -rw-r--r-- 0 root wheel 310 Dec 31 1969 +MANIFEST
> -rw-r--r-- 0 sef sef 29 Jun 17 16:17 ./dir1/test_file
>
>
> In other words, it is not adding empty directories to the package.
>
> Am I creating it incorrectly?
>
> If I put "./dir2" in the "files" section, it puts it in the tarball, but I'm not sure that is correct.
>
> This is pkg 1.2.7_2; I have't tried with a newer version yet, for which I apologise.
I don't think pkg-1.2 is going to handle relative paths properly -- if
you look at a sample package from the repos, you'll see all the paths
are fully qualified from the root. In fact, I'd hope pkg would complain
about wrongly specified paths, but I suspect it doesn't
Directories may not appear as separate items in the tar archive part of
the package. Hmmm... not sure if this is a hold-over from the old
pkg_tools (which can't handle directories like that at all). pkg(8)
certainly should be creating directories as first-class items, in the
way you're expecting. However, this is different to the way ports has
worked historically so this code path doesn't get much, if any, testing.
What happens if you try and install your package?
Cheers,
Matthew
--
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey
JID: matthew at infracaninophile.co.uk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1036 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-pkg/attachments/20140618/299b8a5d/attachment.sig>
More information about the freebsd-pkg
mailing list