Issues With Creating Featherspec Archives
Jonathan "Duke" Leto
jonathan at leto.net
Mon Oct 24 21:28:36 UTC 2011
Howdy,
Featherspec sounds awesome! I like the concept of "feathers". Where is
the spec file format defined?
I am not much help for your issue, but keep on tryin'.
Duke
On Mon, Oct 24, 2011 at 11:51 AM, Kevin Polulak <kpolulak at gmail.com> wrote:
> 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.
>
> 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
>
>
--
Jonathan "Duke" Leto <jonathan at leto.net>
Leto Labs LLC
209.691.DUKE // http://labs.leto.net
NOTE: Personal email is only checked twice a day at 10am/2pm PST,
please call/text for time-sensitive matters.
More information about the parrot-dev
mailing list