HaikuPorts
  • Login
  • Preferences
  • Help/Guide
  • Wiki
  • Timeline
  • Roadmap
  • View Tickets
  • Search
  • Port Log
  • Blog

Context Navigation

  • Back to Ticket #408

Ticket #408: xz.patch.2

File xz.patch.2, 955 bytes (added by jrabbit, 5 years ago)
Line 
1Index: haikuporter
2===================================================================
3--- haikuporter (revision 1221)
4+++ haikuporter (working copy)
5@@ -24,7 +24,7 @@
6 import hashlib
7 import shutil
8 import commands
9-from subprocess import check_call
10+from subprocess import check_call, Popen
11 from optparse import OptionParser
12 
13 # -- HaikuPorts options -------------------------------------------------------
14@@ -684,6 +684,14 @@
15                        zf = zipfile.ZipFile(self.downloadDir + "/" + self.src_local, 'r')
16                        zf.extractall(self.workDir)
17                        zf.close()
18+               elif archiveFullPath.split("/")[-1].split(".")[-1] is "xz":
19+                       Popen(['xz', '-d', archiveFullPath])
20+                       tar_unstruct = self.src_local.split(".")[:-1]
21+                       tar = tar_unstruct[0] + "." + tar_unstruct[1]
22+                       if tarfile.is_tarfile(tar):
23+                               tf = tarfile.open(self.downloadDir + "/" + tar, 'r')
24+                               tf.extractall(self.workDir)
25+                               tf.close()
26                else:
27                        sys.exit("Error: Unrecognized archive type.")
28 

Download in other formats:

  • Original Format

Trac Powered

Powered by Trac 0.13dev-r10686
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/