[Exherbo-dev] unpack

Bo Ørsted Andresen zlin at exherbo.org
Wed Jul 20 01:42:14 BST 2011

unpack is really stupid at the moment for a number of reasons.

Sometimes you have an archive that contains another archive which also need to 
be unpacked. The way to do that is to cd to the directory you want it 
extracted to. Then you run unpack ./${relative_path_to_archive}. There's no 
way to use an absolute path to the archive. There's no way to tell it to 
extract to somewhere other than the current directory. unpack ../foo.tar.gz 
does not work, but unpack ./../foo.tar.gz does.

If you have an archive with a non-standard suffix such as .txz there's no way 
to tell unpack how to extract it short of renaming the archive or creating a 
symlink to the archive.

There's no way to tell unpack to extract all archives except one. gcc 
currently uses unpack --if-compressed ${ARCHIVES//ecj-4.5.jar} to avoid 
extracting a .jar file. That's quite messy. Other ways to solve the issue 
involve iterating over all archives in a for loop or listing all other 
archives explicitly.

- How do we make it easier to extract an archive that isn't in ${FETCHEDDIR}?
- Do we want unpack --directory "${WORK}"/foo/ foo.tar.gz?
- Do we want unpack --pretend-the-suffix-is .tar.xz foo.txz?
- Do we want unpack --exclude ecj-4.5.jar ${ARCHIVES}?

Maybe it would be nicer if there was a way to tell it that the .txz is a 
.tar.xz so you can call unpack only once passing all ${ARCHIVES} to it and 
have the non-standard archive extracted?


Bo Andresen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.exherbo.org/pipermail/exherbo-dev/attachments/20110720/65491678/attachment.pgp>

More information about the Exherbo-dev mailing list