abuild: add code for option extract-dir
It makes the unpack function extract to a file name dependent directory. It is useful to enable maintainer to work with archives that contain all files and directories in the root directory of the archives directly, instead of a subdirectory.
That'd enable me to remove all the custom unpack functions from the kopano-* packages. Other packages use them for the purpose of extracting to specific dirs, too.
The following packages do that:
- testing/font-fantasque-sans
- non-free/chromium-widevine
- main/docbook-xml
From a first glance, adding support for that directly would enable removal of the custom unpack function from those packages.
Merge request reports
Activity
mentioned in issue #10039
I'm not sure I understand why it is a problem extracting the files directly to srcdir? The example packages you mention seems to handle that just fine?
What about fixing this upstream, so they provide tarballs with files in a filename dependant subdirectory already?
Also, why do you strip the version number?
The whole thing feels hackish and wrong.
-
Because you can't figure out afterwards which files belong to which archive because they all extract to srcdir without creating their per-archive directories. So it's all jumbled together. No change to figure it out afterwards or to avoid file name collisions effectively mixing it all up.
-
I'm not upstream and you're not upstream.
-
Works fine without preserving it.
-
So you want custom unpack functions in packages? Because that's the alternative. And that's even worse.
-
So you want custom unpack functions in packages? Because that's the alternative. And that's even worse.
yes, that works fine and there's no issue with a custom unpack for these (very few) cases. all you need is to make the archives with the contents you don't want extracted e.g.
.tar.gz.noauto
, and then usedefault_unpack
and one additional line to manually unpack the 'bad' archive anywhere you want.- A deleted user
closed