Fix repacking with 7z
This commit is contained in:
parent
7f07ae5aa5
commit
f25df56733
|
@ -1,6 +1,7 @@
|
|||
1.1 "" (released xx.xx.2013)
|
||||
|
||||
* Add support for zopfli, Googles new zlib compressor.
|
||||
* Fix an error repacking compressed tar archives with 7z.
|
||||
|
||||
|
||||
1.0 "Robot and Frank" (released 1.3.2013)
|
||||
|
|
|
@ -15,14 +15,24 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
"""Archive commands for the 7z program."""
|
||||
|
||||
def extract_7z (archive, compression, cmd, verbosity, outdir):
|
||||
def extract_7z(archive, compression, cmd, verbosity, outdir):
|
||||
"""Extract a 7z archive."""
|
||||
return [cmd, 'x', '-o%s' % outdir, '--', archive]
|
||||
|
||||
def extract_7z_singlefile(archive, compression, cmd, verbosity, outdir):
|
||||
"""Extract a singlefile archive (eg. gzip or bzip2) with '7z e'.
|
||||
This makes sure a single file and no subdirectories are created,
|
||||
which would cause errors with patool repack."""
|
||||
return [cmd, 'e', '-o%s' % outdir, '--', archive]
|
||||
|
||||
extract_bzip2 = \
|
||||
extract_gzip = \
|
||||
extract_zip = \
|
||||
extract_compress = \
|
||||
extract_xz = \
|
||||
extract_lzma = \
|
||||
extract_7z_singlefile
|
||||
|
||||
extract_zip = \
|
||||
extract_rar = \
|
||||
extract_cab = \
|
||||
extract_arj = \
|
||||
|
@ -30,8 +40,6 @@ extract_bzip2 = \
|
|||
extract_rpm = \
|
||||
extract_deb = \
|
||||
extract_iso = \
|
||||
extract_xz = \
|
||||
extract_lzma = \
|
||||
extract_7z
|
||||
|
||||
def list_7z (archive, compression, cmd, verbosity):
|
||||
|
|
Loading…
Reference in New Issue