Permalink
Browse files

Handle new txz format https://sourceforge.net/tracker/index.php?func=…

  • Loading branch information...
1 parent 2b33119 commit 2f333360d85c2fb3a80a66c9cbeebcffd9413c75 @jcameron jcameron committed Apr 15, 2012
Showing with 7 additions and 2 deletions.
  1. +7 −2 software/slackware-lib.pl
@@ -203,7 +203,12 @@ sub is_package
{
local $count;
local $qm = quotemeta($_[0]);
-&open_execute_command(TAR, "gunzip -c $qm | tar tf - 2>&1", 1, 1);
+if ($_[0] =~ /\.txz$/) {
+ &open_execute_command(TAR, "tar tf $qm 2>&1", 1, 1);
+ }
+else {
+ &open_execute_command(TAR, "gunzip -c $qm | tar tf - 2>&1", 1, 1);
+ }
while(<TAR>) {
$count++ if (/^[^\/\s]\S+/);
}
@@ -216,7 +221,7 @@ sub is_package
# package description
sub file_packages
{
-if ($_[0] !~ /^(.*)\/(([^\/]+)(\.tgz|\.tar\.gz))$/) {
+if ($_[0] !~ /^(.*)\/(([^\/]+)(\.tgz|\.txz|\.tar\.gz))$/) {
return "$_[0] $text{'slack_unknown'}";
}
local ($dir, $file, $base) = ($1, $2, $3);

0 comments on commit 2f33336

Please sign in to comment.