[UNSURE]Issues With Creating Featherspec Archives

François Perrad francois.perrad at gadz.org
Fri Oct 28 19:34:53 UTC 2011


2011/10/24 Kevin Polulak <kpolulak at gmail.com>:
> If any of you have been glancing at all the noise dalek has been making,
> then you'll know that lately I've been doing a lot of work on Plumage. I've
> got a lot of really great plans for it. I've designed a "real" package
> format that Plumage will use and can fetch these packages - called
> "feathers" - from a remote repository on parrot.org.
>
> A feather is very similar to LuaRocks' "rocks". It is essentially just a zip
> archive with a metadata file called a "featherspec". More details on
> feathers and the featherspec can be found in the docs/feathers directory on
> the soh-cah-toa/featherspec branch.
>
> However, I've run into a bit of a problem. Something as simple as creating a
> zip archive (or any compressed archive for that matter) has turned out to be
> a total pain in the neck. Since our Archive;Zip and Archive;Tar libraries
> are very incomplete, I've decided to go with using NCI to call into libzip.

1) both libraries are experimental (see ticket ???)
2) Archive;Zip has never work (except with the mode COMPRESSION_STORED)
3) Archive;Tar + Gzip dynamic PMC generate *.tar.gz files, for examples :
  a) with distutils :
       $ parrot setup.pir sdist
  b) the TAP library uses it, so you could generate&upload your smoke
reports to Smolder :
       $ parrot t/harness.pir --archive --send-to-smolder

François

>
> The problem I'm having is with recursively adding directories to an archive.
> The libzip library provides a function called zip_add_dir() that is supposed
> to do this. Unfortunately, it has no relation to the user's fileystem
> outside the archive. When you add a directory "foo", you are just creating
> an entry within the archive for a directory; you are not actually copying
> the "foo" directory from the user's filesystem. This means I have to iterate
> over the directory tree to add files. I even contacted the libzip mailing
> list and that is my only option apparently.
>
> I turned to Rosella for this and experimented with
> Rosella::FileSystem::Directory.walk(). However, it only walks through files
> and does not include directories in the resulting array so I can't do
> something like `if (is directory) { zip_add_dir() } else { zip_add() }`.
>
> Does anybody have an idea how I could fix this problem? Suggestions?
>
> --
> - Kevin Polulak (soh_cah_toa)
>
>
> _______________________________________________
> http://lists.parrot.org/mailman/listinfo/parrot-dev
>
>


More information about the parrot-dev mailing list