Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-tools.git;a=commitdiff;h=465f83e988db967df86ae19e3db89fce3daf2fae

commit 465f83e988db967df86ae19e3db89fce3daf2fae
Author: Miklos Vajna <vmik...@frugalware.org>
Date:   Mon Aug 23 21:43:43 2010 +0200

chkdep: use bsdtar instead of tarfile to handle xz-compressed fpms

diff --git a/chkdep b/chkdep
index 83697cb..2b4425b 100755
--- a/chkdep
+++ b/chkdep
@@ -21,7 +21,7 @@
#   USA.
#

-import tarfile, tempfile, shutil, os, stat, re, pacman, getopt, sys
+import subprocess, tempfile, shutil, os, stat, re, pacman, getopt, sys

from modulefinder import ModuleFinder

@@ -235,9 +235,11 @@ if "FAKEROOTKEY" in os.environ.keys():

if pkg:
fpmroot = tempfile.mkdtemp()
-       fpm = tarfile.TarFile.open(pkg, "r:bz2")
-       fpm.extractall(fpmroot)
-       fpm.close()
+       cwd = os.getcwd()
+       os.chdir(fpmroot)
+       if subprocess.call(["bsdtar", "xf", os.path.join(cwd, pkg)]) != 0:
+               raise Exception("bsdtar failed")
+       os.chdir(cwd)

if dir:
fpmroot = dir
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to