Andreas Beckmann <[email protected]> writes:
> On 2013-05-27 20:20, Russ Allbery wrote:

>> I'm switching as much as possible from gzip or bzip2 to xz compression
>> since it produces better compression ratios and is faster to
>> decompress.  Could you add support for xz-compressed tarballs to
>> module-assistant?

> That sounds like a good idea. Patches welcome. Or at least a testcase
> would be nice - any package already converted to use .xz. Just some
> branch in a Vcs would be fine (and a rather sane (easily discoverable or
> well documented) way to build a package from this branch).

Completely untested since I haven't had a chance to really look at this
yet, but I think it may be as simple adding to:

  echo Extracting the package tarball, $tarball, please wait...
  if [ ${tarball%gz} != $tarball ] ; then
      action tar --gzip -x -f $tarball
  elif [ ${tarball%bz2} != $tarball ] ; then
      action action tar --bzip2 -x -f $tarball
  else
      echo Unknown compression method, $tarball
      exit 1
  fi

in /usr/share/modass/packages/generic.sh the additional stanza:

  elif [ ${tarball%xz} != $tarball ] ; then
      action tar --xz -x -f $tarball

(although I'm not sure why the bzip2 case repeats action twice) and then
at:

   for suf in .tar.bz2 .tar.gz .tgz ; do

adding .tar.xz.

-- 
Russ Allbery ([email protected])               <http://www.eyrie.org/~eagle/>


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to