diff -Naur catalyst/modules/catalyst_support.py catalyst-xz/modules/catalyst_support.py --- catalyst/modules/catalyst_support.py 2013-12-13 21:24:46.000000000 -0500 +++ catalyst-xz/modules/catalyst_support.py 2013-12-13 20:53:14.898398000 -0500 @@ -72,6 +72,8 @@ _ = 'tar-tvz' elif file.endswith('.tbz2') or file.endswith('.tar.bz2'): _ = 'tar-tvj' + elif file.endswith('.xz') or file.endswith('.tar.xz'): + _ = 'tar-tvJ' elif file.endswith('.tar'): _ = 'tar-tv' @@ -109,6 +111,7 @@ "tar-tv":[calc_contents,"tar tvf %(file)s"], "tar-tvz":[calc_contents,"tar tvzf %(file)s"], "tar-tvj":[calc_contents,"tar -I lbzip2 -tvf %(file)s"], + "tar-tvJ":[calc_contents,"tar -I pixz -tvf %(file)s"], "isoinfo-l":[calc_contents,"isoinfo -l -i %(file)s"], # isoinfo-f should be a last resort only "isoinfo-f":[calc_contents,"isoinfo -f -i %(file)s"], diff -Naur catalyst/modules/generic_stage_target.py catalyst-xz/modules/generic_stage_target.py --- catalyst/modules/generic_stage_target.py 2013-12-13 21:24:45.000000000 -0500 +++ catalyst-xz/modules/generic_stage_target.py 2013-12-13 20:53:14.923843000 -0500 @@ -295,7 +295,7 @@ def set_target_path(self): self.settings["target_path"]=normpath(self.settings["storedir"]+\ - "/builds/"+self.settings["target_subpath"]+".tar.bz2") + "/builds/"+self.settings["target_subpath"]+".tar.xz") if "AUTORESUME" in self.settings\ and os.path.exists(self.settings["autoresume_path"]+\ "setup_target_path"): @@ -381,7 +381,10 @@ "/tmp/"+self.settings["source_subpath"]+"/") else: self.settings["source_path"]=normpath(self.settings["storedir"]+\ - "/builds/"+self.settings["source_subpath"]+".tar.bz2") + "/builds/"+self.settings["source_subpath"]+".tar.xz") + if not os.path.isfile(self.settings["source_path"]): + self.settings["source_path"]=normpath(self.settings["storedir"]+\ + "/builds/"+self.settings["source_subpath"]+".tar.bz2") if os.path.isfile(self.settings["source_path"]): # XXX: Is this even necessary if the previous check passes? if os.path.exists(self.settings["source_path"]): @@ -395,7 +398,7 @@ print "\tseedcache in the options of catalyst.conf the source path" print "\twill then be "+\ normpath(self.settings["storedir"]+"/builds/"+\ - self.settings["source_subpath"]+".tar.bz2\n") + self.settings["source_subpath"]+".tar.xz\n") def set_dest_path(self): if "root_path" in self.settings: @@ -653,9 +656,13 @@ self.settings["source_path"]+"\nto "+\ self.settings["chroot_path"]+\ " (This may take some time) ...\n" - if "bz2" == self.settings["chroot_path"][-3:]: + print "fuck this file"+self.settings["source_path"] + if "bz2" == self.settings["source_path"][-3:]: unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\ self.settings["chroot_path"] + elif "xz" == self.settings["source_path"][-2:]: + unpack_cmd="tar -I pixz -xpf "+self.settings["source_path"]+" -C "+\ + self.settings["chroot_path"] else: unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\ self.settings["chroot_path"] @@ -668,9 +675,12 @@ self.settings["source_path"]+"\nto "+\ self.settings["chroot_path"]+\ " (This may take some time) ...\n" - if "bz2" == self.settings["chroot_path"][-3:]: + if "bz2" == self.settings["source_path"][-3:]: unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\ self.settings["chroot_path"] + elif "xz" == self.settings["source_path"][-2:]: + unpack_cmd="tar -I pixz -xpf "+self.settings["source_path"]+" -C "+\ + self.settings["chroot_path"] else: unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\ self.settings["chroot_path"] @@ -770,8 +780,10 @@ read_from_clst(self.settings["snapshot_cache_path"]+\ "catalyst-hash") destdir=self.settings["snapshot_cache_path"] - if "bz2" == self.settings["chroot_path"][-3:]: + if "bz2" == self.settings["snapshot_path"][-3:]: unpack_cmd="tar -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+destdir + elif "xz" == self.settings["snapshot_path"][-3:]: + unpack_cmd="tar -I pixz -xpf "+self.settings["snapshot_path"]+" -C "+destdir else: unpack_cmd="tar xpf "+self.settings["snapshot_path"]+" -C "+destdir unpack_errmsg="Error unpacking snapshot" @@ -789,9 +801,12 @@ cleanup_errmsg="Error removing existing snapshot directory." cleanup_msg=\ "Cleaning up existing portage tree (This can take a long time)..." - if "bz2" == self.settings["chroot_path"][-3:]: + if "bz2" == self.settings["snapshot_path"][-3:]: unpack_cmd="tar -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+\ self.settings["chroot_path"]+"/usr" + elif "xz" == self.settings["snapshot_path"][-3:]: + unpack_cmd="tar -I pixz -xpf "+self.settings["snapshot_path"]+" -C "+\ + self.settings["chroot_path"]+"/usr" else: unpack_cmd="tar xpf "+self.settings["snapshot_path"]+" -C "+\ self.settings["chroot_path"]+"/usr" @@ -1215,7 +1230,7 @@ print "Creating stage tarball..." - cmd("tar -I lbzip2 -cpf "+self.settings["target_path"]+" -C "+\ + cmd("tar -I pixz -cpf "+self.settings["target_path"]+" -C "+\ self.settings["stage_path"]+" .",\ "Couldn't create stage tarball",env=self.env) diff -Naur catalyst/modules/livecd_stage2_target.py catalyst-xz/modules/livecd_stage2_target.py --- catalyst/modules/livecd_stage2_target.py 2013-12-13 21:24:45.000000000 -0500 +++ catalyst-xz/modules/livecd_stage2_target.py 2013-12-13 20:53:14.886987000 -0500 @@ -33,7 +33,7 @@ file_locate(self.settings, ["cdtar","controller_file"]) def set_source_path(self): - self.settings["source_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.bz2") + self.settings["source_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.xz") if os.path.isfile(self.settings["source_path"]): self.settings["source_path_hash"]=generate_hash(self.settings["source_path"]) else: diff -Naur catalyst/modules/snapshot_target.py catalyst-xz/modules/snapshot_target.py --- catalyst/modules/snapshot_target.py 2013-12-13 21:24:44.000000000 -0500 +++ catalyst-xz/modules/snapshot_target.py 2013-12-13 20:53:14.922792000 -0500 @@ -19,7 +19,7 @@ self.settings["target_subpath"]="portage" st=self.settings["storedir"] self.settings["snapshot_path"]=normpath(st+"/snapshots/portage-"+self.settings["version_stamp"]\ - +".tar.bz2") + +".tar.xz") self.settings["tmp_path"]=normpath(st+"/tmp/"+self.settings["target_subpath"]) def setup(self): @@ -50,7 +50,7 @@ self.settings["portdir"]+"/ "+mytmp+"/portage/","Snapshot failure",env=self.env) print "Compressing Portage snapshot tarball..." - cmd("tar -I lbzip2 -cf "+self.settings["snapshot_path"]+" -C "+mytmp+" portage",\ + cmd("tar -I pixz -cf "+self.settings["snapshot_path"]+" -C "+mytmp+" portage",\ "Snapshot creation failure",env=self.env) self.gen_contents_file(self.settings["snapshot_path"]) diff -Naur catalyst/modules/stage2_target.py catalyst-xz/modules/stage2_target.py --- catalyst/modules/stage2_target.py 2013-12-13 21:24:44.000000000 -0500 +++ catalyst-xz/modules/stage2_target.py 2013-12-13 20:53:14.887345000 -0500 @@ -19,7 +19,7 @@ if "SEEDCACHE" in self.settings and os.path.isdir(normpath(self.settings["storedir"]+"/tmp/"+self.settings["source_subpath"]+"/tmp/stage1root/")): self.settings["source_path"]=normpath(self.settings["storedir"]+"/tmp/"+self.settings["source_subpath"]+"/tmp/stage1root/") else: - self.settings["source_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.bz2") + self.settings["source_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.xz") if os.path.isfile(self.settings["source_path"]): if os.path.exists(self.settings["source_path"]): # XXX: Is this even necessary if the previous check passes? @@ -28,7 +28,7 @@ print "Source path set to "+self.settings["source_path"] if os.path.isdir(self.settings["source_path"]): print "\tIf this is not desired, remove this directory or turn of seedcache in the options of catalyst.conf" - print "\tthe source path will then be "+normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.bz2\n") + print "\tthe source path will then be "+normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.xz\n") # XXX: How do these override_foo() functions differ from the ones in # generic_stage_target and why aren't they in stage3_target?