From 5ba8d3d2b7adf41d33c9abef364a0a02bd03dec3 Mon Sep 17 00:00:00 2001 From: andry-dev Date: Thu, 2 Dec 2021 22:00:59 +0100 Subject: [PATCH 1/2] New package: python3-patool-1.12.1 --- .../patches/00-skip-checks.patch | 6581 +++++++++++++++++ srcpkgs/python3-patool/template | 15 + 2 files changed, 6596 insertions(+) create mode 100644 srcpkgs/python3-patool/patches/00-skip-checks.patch create mode 100644 srcpkgs/python3-patool/template diff --git a/srcpkgs/python3-patool/patches/00-skip-checks.patch b/srcpkgs/python3-patool/patches/00-skip-checks.patch new file mode 100644 index 000000000000..7a5f8b14b71b --- /dev/null +++ b/srcpkgs/python3-patool/patches/00-skip-checks.patch @@ -0,0 +1,6581 @@ +diff -Naur patool-upstream-1.12/.pytest_cache/.gitignore patool-upstream-1.12-patched/.pytest_cache/.gitignore +--- patool-upstream-1.12/.pytest_cache/.gitignore 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/.pytest_cache/.gitignore 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,2 @@ ++# Created by pytest automatically. ++* +diff -Naur patool-upstream-1.12/.pytest_cache/CACHEDIR.TAG patool-upstream-1.12-patched/.pytest_cache/CACHEDIR.TAG +--- patool-upstream-1.12/.pytest_cache/CACHEDIR.TAG 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/.pytest_cache/CACHEDIR.TAG 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,4 @@ ++Signature: 8a477f597d28d172789f06886806bc55 ++# This file is a cache directory tag created by pytest. ++# For information about cache directory tags, see: ++# http://www.bford.info/cachedir/spec.html +diff -Naur patool-upstream-1.12/.pytest_cache/README.md patool-upstream-1.12-patched/.pytest_cache/README.md +--- patool-upstream-1.12/.pytest_cache/README.md 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/.pytest_cache/README.md 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,8 @@ ++# pytest cache directory # ++ ++This directory contains data from the pytest's cache plugin, ++which provides the `--lf` and `--ff` options, as well as the `cache` fixture. ++ ++**Do not** commit this to version control. ++ ++See [the docs](https://docs.pytest.org/en/stable/cache.html) for more information. +diff -Naur patool-upstream-1.12/.pytest_cache/v/cache/lastfailed patool-upstream-1.12-patched/.pytest_cache/v/cache/lastfailed +--- patool-upstream-1.12/.pytest_cache/v/cache/lastfailed 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/.pytest_cache/v/cache/lastfailed 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,3 @@ ++{ ++ "tests/test_mime.py::TestMime::test_mime_file": true ++} +\ No newline at end of file +diff -Naur patool-upstream-1.12/.pytest_cache/v/cache/nodeids patool-upstream-1.12-patched/.pytest_cache/v/cache/nodeids +--- patool-upstream-1.12/.pytest_cache/v/cache/nodeids 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/.pytest_cache/v/cache/nodeids 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,176 @@ ++[ ++ "tests/archives/test_7z.py::Test7z::test_7z", ++ "tests/archives/test_7z.py::Test7z::test_7z_file", ++ "tests/archives/test_7z.py::Test7z::test_7z_rar", ++ "tests/archives/test_7z.py::Test7z::test_7z_rar_file", ++ "tests/archives/test_7za.py::Test7za::test_7za_file", ++ "tests/archives/test_7za.py::Test7za::test_p7azip", ++ "tests/archives/test_7zr.py::Test7zr::test_7z_file", ++ "tests/archives/test_7zr.py::Test7zr::test_7zr", ++ "tests/archives/test_ar.py::TestAr::test_ar", ++ "tests/archives/test_ar.py::TestAr::test_ar_file", ++ "tests/archives/test_arc.py::TestArc::test_arc", ++ "tests/archives/test_arc.py::TestArc::test_arc_file", ++ "tests/archives/test_archmage.py::TestArchmage::test_archmage", ++ "tests/archives/test_archmage.py::TestArchmage::test_archmage_file", ++ "tests/archives/test_arj.py::TestArj::test_arj", ++ "tests/archives/test_arj.py::TestArj::test_arj_file", ++ "tests/archives/test_bsdcpio.py::TestBsdcpio::test_bsdcpio", ++ "tests/archives/test_bsdcpio.py::TestBsdcpio::test_bsdcpio_file", ++ "tests/archives/test_bsdtar.py::TestBsdtar::test_bsdtar", ++ "tests/archives/test_bsdtar.py::TestBsdtar::test_bsdtar_bz2", ++ "tests/archives/test_bsdtar.py::TestBsdtar::test_bsdtar_bz2_file", ++ "tests/archives/test_bsdtar.py::TestBsdtar::test_bsdtar_file", ++ "tests/archives/test_bsdtar.py::TestBsdtar::test_bsdtar_gz", ++ "tests/archives/test_bsdtar.py::TestBsdtar::test_bsdtar_gz_file", ++ "tests/archives/test_bsdtar.py::TestBsdtar::test_bsdtar_lzma", ++ "tests/archives/test_bsdtar.py::TestBsdtar::test_bsdtar_xz", ++ "tests/archives/test_bsdtar.py::TestBsdtar::test_bsdtar_xz_file", ++ "tests/archives/test_bsdtar.py::TestBsdtar::test_bsdtar_z", ++ "tests/archives/test_bsdtar.py::TestBsdtar::test_bsdtar_z_file", ++ "tests/archives/test_bzip2.py::TestBzip2::test_bzip2", ++ "tests/archives/test_bzip2.py::TestBzip2::test_bzip2_file", ++ "tests/archives/test_cabextract.py::TestCabextract::test_cabextract", ++ "tests/archives/test_cabextract.py::TestCabextract::test_cabextract_file", ++ "tests/archives/test_chmlib.py::TestChmlib::test_archmage", ++ "tests/archives/test_chmlib.py::TestChmlib::test_archmage_file", ++ "tests/archives/test_clzip.py::TestClzip::test_clzip", ++ "tests/archives/test_clzip.py::TestClzip::test_clzip_file", ++ "tests/archives/test_compress.py::TestCompress::test_compress", ++ "tests/archives/test_cpio.py::TestCpio::test_cpio", ++ "tests/archives/test_cpio.py::TestCpio::test_cpio_file", ++ "tests/archives/test_dpkg.py::TestDpkg::test_dpkg", ++ "tests/archives/test_dpkg.py::TestDpkg::test_dpkg_file", ++ "tests/archives/test_flac.py::TestFlac::test_flac", ++ "tests/archives/test_flac.py::TestFlac::test_flac_file", ++ "tests/archives/test_genisoimage.py::TestGenisoimage::test_genisoimage", ++ "tests/archives/test_gzip.py::TestGzip::test_gzip", ++ "tests/archives/test_gzip.py::TestGzip::test_gzip_file", ++ "tests/archives/test_isoinfo.py::TestIsoinfo::test_isoinfo", ++ "tests/archives/test_isoinfo.py::TestIsoinfo::test_isoinfo_file", ++ "tests/archives/test_lbzip2.py::TestLbzip2::test_lbzip2", ++ "tests/archives/test_lbzip2.py::TestLbzip2::test_lbzip2_file", ++ "tests/archives/test_lcab.py::TestLcab::test_lcab", ++ "tests/archives/test_lha.py::TestLha::test_lha_file", ++ "tests/archives/test_lhasa.py::TestLhasa::test_lhasa", ++ "tests/archives/test_lrzip.py::TestLrzip::test_lrzip", ++ "tests/archives/test_lzip.py::TestLzip::test_lzip", ++ "tests/archives/test_lzip.py::TestLzip::test_lzip_file", ++ "tests/archives/test_lzma.py::TestLzma::test_lzma", ++ "tests/archives/test_lzop.py::TestLzop::test_lzop", ++ "tests/archives/test_lzop.py::TestLzop::test_lzop_file", ++ "tests/archives/test_mac.py::TestMac::test_mac", ++ "tests/archives/test_mac.py::TestMac::test_mac_file", ++ "tests/archives/test_nomarch.py::TestNomarch::test_nomarch", ++ "tests/archives/test_nomarch.py::TestNomarch::test_nomarch_file", ++ "tests/archives/test_pbzip2.py::TestPbzip2::test_pbzip2", ++ "tests/archives/test_pbzip2.py::TestPbzip2::test_pbzip2_file", ++ "tests/archives/test_pdlzip.py::TestPdlzip::test_pdlzip", ++ "tests/archives/test_pdlzip.py::TestPdlzip::test_pdlzip_file", ++ "tests/archives/test_pigz.py::TestPigz::test_pigz", ++ "tests/archives/test_pigz.py::TestPigz::test_pigz_file", ++ "tests/archives/test_plzip.py::TestPlzip::test_plzip", ++ "tests/archives/test_plzip.py::TestPlzip::test_plzip_file", ++ "tests/archives/test_pybz2.py::TestPybz2::test_py_bz2", ++ "tests/archives/test_pybz2.py::TestPybz2::test_py_bz2_file", ++ "tests/archives/test_pyecho.py::TestPyecho::test_py_echo", ++ "tests/archives/test_pyecho.py::TestPyecho::test_py_echo_file", ++ "tests/archives/test_pygzip.py::TestPygzip::test_py_gzip", ++ "tests/archives/test_pygzip.py::TestPygzip::test_py_gzip_file", ++ "tests/archives/test_pylzma.py::TestPylzma::test_py_lzma", ++ "tests/archives/test_pylzma.py::TestPylzma::test_py_lzma_file", ++ "tests/archives/test_pytarfile.py::TestPytarfile::test_py_tarfile", ++ "tests/archives/test_pytarfile.py::TestPytarfile::test_py_tarfile_bz2", ++ "tests/archives/test_pytarfile.py::TestPytarfile::test_py_tarfile_bz2_file", ++ "tests/archives/test_pytarfile.py::TestPytarfile::test_py_tarfile_file", ++ "tests/archives/test_pytarfile.py::TestPytarfile::test_py_tarfile_gz", ++ "tests/archives/test_pytarfile.py::TestPytarfile::test_py_tarfile_gz_file", ++ "tests/archives/test_pyzipfile.py::TestPyzipfile::test_py_zipfile", ++ "tests/archives/test_pyzipfile.py::TestPyzipfile::test_py_zipfile_file", ++ "tests/archives/test_rar.py::TestRar::test_rar", ++ "tests/archives/test_rar.py::TestRar::test_rar_file", ++ "tests/archives/test_rpm.py::TestRpm::test_rpm", ++ "tests/archives/test_rpm.py::TestRpm::test_rpm_file", ++ "tests/archives/test_rpm2cpio.py::TestRpm2cpio::test_rpm2cpio", ++ "tests/archives/test_rpm2cpio.py::TestRpm2cpio::test_rpm2cpio_file", ++ "tests/archives/test_rzip.py::TestRzip::test_rzip", ++ "tests/archives/test_rzip.py::TestRzip::test_rzip_file", ++ "tests/archives/test_shar.py::TestShar::test_shar", ++ "tests/archives/test_shorten.py::TestShorten::test_shorten", ++ "tests/archives/test_star.py::TestStar::test_star", ++ "tests/archives/test_star.py::TestStar::test_star_bz2", ++ "tests/archives/test_star.py::TestStar::test_star_bz2_file", ++ "tests/archives/test_star.py::TestStar::test_star_file", ++ "tests/archives/test_star.py::TestStar::test_star_gz", ++ "tests/archives/test_star.py::TestStar::test_star_gz_file", ++ "tests/archives/test_star.py::TestStar::test_star_lzip", ++ "tests/archives/test_star.py::TestStar::test_star_lzip_file", ++ "tests/archives/test_star.py::TestStar::test_star_lzma", ++ "tests/archives/test_star.py::TestStar::test_star_xz", ++ "tests/archives/test_star.py::TestStar::test_star_xz_file", ++ "tests/archives/test_star.py::TestStar::test_star_z", ++ "tests/archives/test_star.py::TestStar::test_star_z_file", ++ "tests/archives/test_tar.py::TestTar::test_tar", ++ "tests/archives/test_tar.py::TestTar::test_tar_bz2", ++ "tests/archives/test_tar.py::TestTar::test_tar_bz2_file", ++ "tests/archives/test_tar.py::TestTar::test_tar_file", ++ "tests/archives/test_tar.py::TestTar::test_tar_gz", ++ "tests/archives/test_tar.py::TestTar::test_tar_gz_file", ++ "tests/archives/test_tar.py::TestTar::test_tar_lzip", ++ "tests/archives/test_tar.py::TestTar::test_tar_lzip_file", ++ "tests/archives/test_tar.py::TestTar::test_tar_lzma", ++ "tests/archives/test_tar.py::TestTar::test_tar_xz", ++ "tests/archives/test_tar.py::TestTar::test_tar_xz_file", ++ "tests/archives/test_tar.py::TestTar::test_tar_z", ++ "tests/archives/test_tar.py::TestTar::test_tar_z_file", ++ "tests/archives/test_unace.py::TestUnace::test_unace", ++ "tests/archives/test_unace.py::TestUnace::test_unace_file", ++ "tests/archives/test_unadf.py::TestUnadf::test_unadf", ++ "tests/archives/test_unadf.py::TestUnadf::test_unadf_file", ++ "tests/archives/test_unalz.py::TestUnalz::test_unalz", ++ "tests/archives/test_uncompressreal.py::TestUncompressReal::test_uncompress", ++ "tests/archives/test_uncompressreal.py::TestUncompressReal::test_uncompress_file", ++ "tests/archives/test_unrar.py::TestUnrar::test_unrar", ++ "tests/archives/test_unrar.py::TestUnrar::test_unrar_file", ++ "tests/archives/test_unshar.py::TestUnshar::test_unshar", ++ "tests/archives/test_unzip.py::TestUnzip::test_unzip", ++ "tests/archives/test_unzip.py::TestUnzip::test_unzip_file", ++ "tests/archives/test_xdms.py::TestXdms::test_xdms", ++ "tests/archives/test_xz.py::TestXz::test_lzma", ++ "tests/archives/test_xz.py::TestXz::test_xz", ++ "tests/archives/test_xz.py::TestXz::test_xz_file", ++ "tests/archives/test_zip.py::TestZip::test_zip", ++ "tests/archives/test_zip.py::TestZip::test_zip_file", ++ "tests/archives/test_zoo.py::TestZoo::test_zoo", ++ "tests/archives/test_zoo.py::TestZoo::test_zoo_file", ++ "tests/archives/test_zopfli.py::TestZopfli::test_zopfli", ++ "tests/archives/test_zopfli.py::TestZopfli::test_zopfli_file", ++ "tests/archives/test_zpaq.py::TestZpaq::test_zpaq", ++ "tests/archives/test_zpaq.py::TestZpaq::test_zpaq_file", ++ "tests/test_config.py::TestConfiguration::test_archive_mimetypes", ++ "tests/test_config.py::TestConfiguration::test_archive_programs", ++ "tests/test_config.py::TestConfiguration::test_compression_programs", ++ "tests/test_config.py::TestConfiguration::test_encoding_mimes", ++ "tests/test_config.py::TestConfiguration::test_filetext_mime", ++ "tests/test_create.py::ArchiveCreateTest::test_create", ++ "tests/test_diff.py::ArchiveDiffTest::test_diff", ++ "tests/test_extract.py::ArchiveExtractTest::test_extract", ++ "tests/test_formats.py::TestFormats::test_list_formats", ++ "tests/test_list.py::ArchiveListTest::test_list", ++ "tests/test_mime.py::TestMime::test_mime_file", ++ "tests/test_mime.py::TestMime::test_mime_file_bzip", ++ "tests/test_mime.py::TestMime::test_mime_file_compress", ++ "tests/test_mime.py::TestMime::test_mime_file_gzip", ++ "tests/test_mime.py::TestMime::test_mime_file_lzip", ++ "tests/test_mime.py::TestMime::test_mime_file_xzip", ++ "tests/test_mime.py::TestMime::test_mime_mimedb", ++ "tests/test_recompress.py::ArchiveRecompressTest::test_repack", ++ "tests/test_repack.py::ArchiveRepackTest::test_repack", ++ "tests/test_repack.py::ArchiveRepackTest::test_repack_same_format", ++ "tests/test_repack.py::ArchiveRepackTest::test_repack_same_format_different_compression", ++ "tests/test_search.py::ArchiveSearchTest::test_search", ++ "tests/test_test.py::ArchiveTestTest::test_test", ++ "tests/test_util.py::UtilTest::test_samefile1", ++ "tests/test_util.py::UtilTest::test_samefile2", ++ "tests/test_util.py::UtilTest::test_samefile3" ++] +\ No newline at end of file +diff -Naur patool-upstream-1.12/.pytest_cache/v/cache/stepwise patool-upstream-1.12-patched/.pytest_cache/v/cache/stepwise +--- patool-upstream-1.12/.pytest_cache/v/cache/stepwise 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/.pytest_cache/v/cache/stepwise 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1 @@ ++[] +\ No newline at end of file +diff -Naur patool-upstream-1.12/__pycache__/_patool_configdata.cpython-310.pyc patool-upstream-1.12-patched/__pycache__/_patool_configdata.cpython-310.pyc +--- patool-upstream-1.12/__pycache__/_patool_configdata.cpython-310.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/__pycache__/_patool_configdata.cpython-310.pyc 2021-12-02 22:23:10.572832214 +0100 +@@ -0,0 +1,27 @@ ++o ++9a@sVdZdZdZdZdZdZdZdZdZdZ dZ ++dZ d Z gd ++Z d gZd ZdZdZd ZdS)z%/builddir/patool-upstream-1.12/configz/builddir/patool-upstream-1.12patoolz1.12zBastian Kleineidamzbastian.kleineidam@web.dezhttp://wummel.github.io/patool/ZGPLzportable archive file manageraVarious archive formats can be created, extracted, tested, listed, ++searched, compared and repacked by patool. The advantage of patool ++is its simplicity in handling archive files without having to remember ++a myriad of programs and options. ++ ++The archive format is determined by the file(1) program and as a ++fallback by the archive file extension. ++ ++patool supports 7z (.7z), ACE (.ace), ADF (.adf), ALZIP (.alz), APE (.ape), ++AR (.a), ARC (.arc), ARJ (.arj), BZIP2 (.bz2), ++CAB (.cab), COMPRESS (.Z), CPIO (.cpio), ++DEB (.deb), DMS (.dms), FLAC (.flac), GZIP (.gz), ISO (.iso), LRZIP (.lrz), ++LZH (.lha, .lzh), LZIP (.lz), LZMA (.lzma), LZOP (.lzo), RPM (.rpm), ++RAR (.rar), RZIP (.rz), SHN (.shn), TAR (.tar), XZ (.xz), ZIP (.zip, .jar), ++ZOO (.zoo) and ZPAQ (.zpaq) formats. ++It relies on helper applications to handle those archive formats ++(for example bzip2 for BZIP2 archives). ++ ++The archive formats TAR, ZIP, BZIP2 and GZIP ++are supported natively and do not require helper applications to be ++installed. ++)Zarchiverarchive compressionZ commandlinemanagerZUNKNOWNz patool-1.12z 17.1.2016N)Z ++config_dirZ install_dataZinstall_scriptsnameversionauthor author_email ++maintainerZmaintainer_emailurllicense descriptionZlong_descriptionkeywordsZ platformsfullnameZcontactZ contact_email release_daterr4/builddir/patool-upstream-1.12/_patool_configdata.pys& +\ No newline at end of file +diff -Naur patool-upstream-1.12/_patool_configdata.py patool-upstream-1.12-patched/_patool_configdata.py +--- patool-upstream-1.12/_patool_configdata.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/_patool_configdata.py 2021-12-02 22:23:10.572832214 +0100 +@@ -0,0 +1,21 @@ ++# -*- coding: iso-8859-1 -*- ++# this file is automatically created by setup.py ++config_dir = '/builddir/patool-upstream-1.12/config' ++install_data = '/builddir/patool-upstream-1.12' ++install_scripts = '/builddir/patool-upstream-1.12' ++name = 'patool' ++version = '1.12' ++author = 'Bastian Kleineidam' ++author_email = 'bastian.kleineidam@web.de' ++maintainer = 'Bastian Kleineidam' ++maintainer_email = 'bastian.kleineidam@web.de' ++url = 'http://wummel.github.io/patool/' ++license = 'GPL' ++description = 'portable archive file manager' ++long_description = 'Various archive formats can be created, extracted, tested, listed,\nsearched, compared and repacked by patool. The advantage of patool\nis its simplicity in handling archive files without having to remember\na myriad of programs and options.\n\nThe archive format is determined by the file(1) program and as a\nfallback by the archive file extension.\n\npatool supports 7z (.7z), ACE (.ace), ADF (.adf), ALZIP (.alz), APE (.ape),\nAR (.a), ARC (.arc), ARJ (.arj), BZIP2 (.bz2),\nCAB (.cab), COMPRESS (.Z), CPIO (.cpio),\nDEB (.deb), DMS (.dms), FLAC (.flac), GZIP (.gz), ISO (.iso), LRZIP (.lrz),\nLZH (.lha, .lzh), LZIP (.lz), LZMA (.lzma), LZOP (.lzo), RPM (.rpm),\nRAR (.rar), RZIP (.rz), SHN (.shn), TAR (.tar), XZ (.xz), ZIP (.zip, .jar),\nZOO (.zoo) and ZPAQ (.zpaq) formats.\nIt relies on helper applications to handle those archive formats\n(for example bzip2 for BZIP2 archives).\n\nThe archive formats TAR, ZIP, BZIP2 and GZIP\nare supported natively and do not require helper applications to be\ninstalled.\n' ++keywords = ['archiver', 'archive', 'compression', 'commandline', 'manager'] ++platforms = ['UNKNOWN'] ++fullname = 'patool-1.12' ++contact = 'Bastian Kleineidam' ++contact_email = 'bastian.kleineidam@web.de' ++release_date = "17.1.2016" +diff -Naur patool-upstream-1.12/build/lib/patoolib/__init__.py patool-upstream-1.12-patched/build/lib/patoolib/__init__.py +--- patool-upstream-1.12/build/lib/patoolib/__init__.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/__init__.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,767 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2016 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++from __future__ import print_function ++import sys ++if not hasattr(sys, "version_info") or sys.version_info < (2, 7, 0, "final", 0): ++ raise SystemExit("This program requires Python 2.7 or later.") ++import os ++import shutil ++import stat ++import importlib ++# PEP 396 ++from .configuration import App, Version as __version__ ++__all__ = ['list_formats', 'list_archive', 'extract_archive', 'test_archive', ++ 'create_archive', 'diff_archives', 'search_archive', 'repack_archive', ++ 'recompress_archive'] ++ ++ ++# Supported archive commands ++ArchiveCommands = ('list', 'extract', 'test', 'create') ++ ++# Supported archive formats ++ArchiveFormats = ( ++ '7z', 'ace', 'adf', 'alzip', 'ape', 'ar', 'arc', 'arj', ++ 'bzip2', 'cab', 'chm', 'compress', 'cpio', 'deb', 'dms', ++ 'flac', 'gzip', 'iso', 'lrzip', 'lzh', 'lzip', 'lzma', 'lzop', ++ 'rar', 'rpm', 'rzip', 'shar', 'shn', 'tar', 'vhd', 'xz', ++ 'zip', 'zoo', 'zpaq') ++ ++# Supported compressions (used with tar for example) ++# Note that all compressions must also be archive formats ++ArchiveCompressions = ('bzip2', 'compress', 'gzip', 'lzip', 'lzma', 'xz') ++ ++# Map MIME types to archive format ++ArchiveMimetypes = { ++ 'application/gzip': 'gzip', ++ 'application/java-archive': 'zip', ++ 'application/rar': 'rar', ++ 'application/vnd.ms-cab-compressed': 'cab', ++ 'application/x-7z-compressed': '7z', ++ 'application/x-ace': 'ace', ++ 'application/x-adf': 'adf', ++ 'application/x-alzip': 'alzip', ++ 'application/x-archive': 'ar', ++ 'application/x-arc': 'arc', ++ 'application/x-arj': 'arj', ++ 'application/x-bzip2': 'bzip2', ++ 'application/x-cab': 'cab', ++ 'application/x-chm': 'chm', ++ 'application/x-compress': 'compress', ++ 'application/x-cpio': 'cpio', ++ 'application/x-debian-package': 'deb', ++ 'application/x-dms': 'dms', ++ 'application/x-gzip': 'gzip', ++ 'application/x-iso9660-image': 'iso', ++ 'application/x-lzop': 'lzop', ++ 'application/x-lzma': 'lzma', ++ 'application/x-lzip': 'lzip', ++ 'application/x-lha': 'lzh', ++ 'application/x-lrzip': 'lrzip', ++ 'application/x-lzh': 'lzh', ++ 'application/x-rar': 'rar', ++ 'application/x-redhat-package-manager': 'rpm', ++ 'application/x-rpm': 'rpm', ++ 'application/x-rzip': 'rzip', ++ 'application/x-shar': 'shar', ++ 'application/x-tar': 'tar', ++ 'application/x-vhd': 'vhd', ++ 'application/x-xz': 'xz', ++ 'application/x-zip-compressed': 'zip', ++ 'application/x-zoo': 'zoo', ++ 'application/zip': 'zip', ++ 'application/zpaq': 'zpaq', ++ 'audio/x-ape': 'ape', ++ 'audio/x-shn': 'shn', ++ 'audio/flac': 'flac', ++} ++ ++try: ++ # use Python 3 lzma module if available ++ import lzma ++ py_lzma = ('py_lzma',) ++except ImportError: ++ py_lzma = () ++ ++# List of programs supporting the given archive format and command. ++# If command is None, the program supports all commands (list, extract, ...) ++# Programs starting with "py_" are Python modules. ++ArchivePrograms = { ++ 'ace': { ++ 'extract': ('unace',), ++ 'test': ('unace',), ++ 'list': ('unace',), ++ }, ++ 'adf': { ++ 'extract': ('unadf',), ++ 'test': ('unadf',), ++ 'list': ('unadf',), ++ }, ++ 'alzip': { ++ 'extract': ('unalz',), ++ 'test': ('unalz',), ++ 'list': ('unalz',), ++ }, ++ 'ape': { ++ 'create': ('mac',), ++ 'extract': ('mac',), ++ 'list': ('py_echo',), ++ 'test': ('mac',), ++ }, ++ 'ar': { ++ None: ('ar',), ++ }, ++ 'arc': { ++ None: ('arc',), ++ 'extract': ('nomarch',), ++ 'test': ('nomarch',), ++ 'list': ('nomarch',), ++ }, ++ 'bzip2': { ++ None: ('7z', '7za'), ++ 'extract': ('pbzip2', 'lbzip2', 'bzip2', 'py_bz2'), ++ 'test': ('pbzip2', 'lbzip2', 'bzip2'), ++ 'create': ('pbzip2', 'lbzip2', 'bzip2', 'py_bz2'), ++ 'list': ('py_echo'), ++ }, ++ 'cab': { ++ 'extract': ('cabextract', '7z'), ++ 'create': ('lcab',), ++ 'list': ('cabextract', '7z'), ++ 'test': ('cabextract', '7z'), ++ }, ++ 'chm': { ++ 'extract': ('archmage', 'extract_chmLib'), ++ 'test': ('archmage',), ++ }, ++ 'flac': { ++ 'extract': ('flac',), ++ 'test': ('flac',), ++ 'create': ('flac',), ++ 'list': ('py_echo',), ++ }, ++ 'tar': { ++ None: ('tar', 'star', 'bsdtar', 'py_tarfile'), ++ }, ++ 'zip': { ++ None: ('7z', '7za', 'py_zipfile'), ++ 'extract': ('unzip',), ++ 'list': ('unzip',), ++ 'test': ('zip', 'unzip',), ++ 'create': ('zip',), ++ }, ++ 'gzip': { ++ None: ('7z', '7za', 'pigz', 'gzip'), ++ 'extract': ('py_gzip',), ++ 'create': ('zopfli', 'py_gzip'), ++ }, ++ 'iso': { ++ 'extract': ('7z',), ++ 'list': ('7z', 'isoinfo'), ++ 'test': ('7z',), ++ 'create': ('genisoimage',), ++ }, ++ 'lzh': { ++ None: ('lha',), ++ 'extract': ('lhasa',), ++ }, ++ 'lzip': { ++ 'extract': ('plzip', 'lzip', 'clzip', 'pdlzip'), ++ 'list': ('py_echo',), ++ 'test': ('plzip', 'lzip', 'clzip', 'pdlzip'), ++ 'create': ('plzip', 'lzip', 'clzip', 'pdlzip'), ++ }, ++ 'lrzip': { ++ 'extract': ('lrzip',), ++ 'list': ('py_echo',), ++ 'test': ('lrzip',), ++ 'create': ('lrzip',), ++ }, ++ 'compress': { ++ 'extract': ('gzip', '7z', '7za', 'uncompress.real'), ++ 'list': ('7z', '7za', 'py_echo',), ++ 'test': ('gzip', '7z', '7za'), ++ 'create': ('compress',), ++ }, ++ '7z': { ++ None: ('7z', '7za', '7zr'), ++ }, ++ 'rar': { ++ None: ('rar',), ++ 'extract': ('unrar', '7z'), ++ 'list': ('unrar', '7z'), ++ 'test': ('unrar', '7z'), ++ }, ++ 'arj': { ++ None: ('arj',), ++ 'extract': ('7z',), ++ 'list': ('7z',), ++ 'test': ('7z',), ++ }, ++ 'cpio': { ++ 'extract': ('cpio', 'bsdcpio', '7z'), ++ 'list': ('cpio', 'bsdcpio', '7z'), ++ 'test': ('cpio', 'bsdcpio', '7z',), ++ 'create': ('cpio', 'bsdcpio'), ++ }, ++ 'rpm': { ++ 'extract': ('rpm2cpio', '7z'), ++ 'list': ('rpm', '7z', '7za'), ++ 'test': ('rpm', '7z'), ++ }, ++ 'deb': { ++ 'extract': ('dpkg-deb', '7z'), ++ 'list': ('dpkg-deb', '7z'), ++ 'test': ('dpkg-deb', '7z'), ++ }, ++ 'dms': { ++ 'extract': ('xdms',), ++ 'list': ('xdms',), ++ 'test': ('xdms',), ++ }, ++ 'lzop': { ++ None: ('lzop',), ++ }, ++ 'lzma': { ++ 'extract': ('7z', 'lzma', 'xz') + py_lzma, ++ 'list': ('7z', 'py_echo'), ++ 'test': ('7z', 'lzma', 'xz'), ++ 'create': ('lzma', 'xz') + py_lzma, ++ }, ++ 'rzip': { ++ 'extract': ('rzip',), ++ 'list': ('py_echo',), ++ 'create': ('rzip',), ++ }, ++ 'shar': { ++ 'create': ('shar',), ++ 'extract': ('unshar',), ++ }, ++ 'shn': { ++ 'extract': ('shorten',), ++ 'list': ('py_echo',), ++ 'create': ('shorten',), ++ }, ++ 'vhd': { ++ 'extract': ('7z',), ++ 'list': ('7z',), ++ 'test': ('7z',), ++ }, ++ 'xz': { ++ None: ('xz', '7z'), ++ 'extract': py_lzma, ++ 'create': py_lzma, ++ }, ++ 'zoo': { ++ None: ('zoo',), ++ }, ++ 'zpaq': { ++ None: ('zpaq',), ++ }, ++} ++ ++# List those programs that have different python module names because of ++# Python module naming restrictions. ++ProgramModules = { ++ '7z': 'p7zip', ++ '7za': 'p7azip', ++ '7zr': 'p7rzip', ++ 'uncompress.real': 'uncompress', ++ 'dpkg-deb': 'dpkg', ++ 'extract_chmlib': 'chmlib', ++} ++ ++ ++from . import util ++ ++def get_archive_format (filename): ++ """Detect filename archive format and optional compression.""" ++ mime, compression = util.guess_mime(filename) ++ if not (mime or compression): ++ raise util.PatoolError("unknown archive format for file `%s'" % filename) ++ if mime in ArchiveMimetypes: ++ format = ArchiveMimetypes[mime] ++ else: ++ raise util.PatoolError("unknown archive format for file `%s' (mime-type is `%s')" % (filename, mime)) ++ if format == compression: ++ # file cannot be in same format compressed ++ compression = None ++ return format, compression ++ ++ ++def check_archive_format (format, compression): ++ """Make sure format and compression is known.""" ++ if format not in ArchiveFormats: ++ raise util.PatoolError("unknown archive format `%s'" % format) ++ if compression is not None and compression not in ArchiveCompressions: ++ raise util.PatoolError("unkonwn archive compression `%s'" % compression) ++ ++ ++def find_archive_program (format, command, program=None): ++ """Find suitable archive program for given format and mode.""" ++ commands = ArchivePrograms[format] ++ programs = [] ++ if program is not None: ++ # try a specific program first ++ programs.append(program) ++ # first try the universal programs with key None ++ for key in (None, command): ++ if key in commands: ++ programs.extend(commands[key]) ++ if not programs: ++ raise util.PatoolError("%s archive format `%s' is not supported" % (command, format)) ++ # return the first existing program ++ for program in programs: ++ if program.startswith('py_'): ++ # it's a Python module and therefore always supported ++ return program ++ exe = util.find_program(program) ++ if exe: ++ if program == '7z' and format == 'rar' and not util.p7zip_supports_rar(): ++ continue ++ return exe ++ # no programs found ++ raise util.PatoolError("could not find an executable program to %s format %s; candidates are (%s)," % (command, format, ",".join(programs))) ++ ++ ++def program_supports_compression (program, compression): ++ """Decide if the given program supports the compression natively. ++ @return: True iff the program supports the given compression format ++ natively, else False. ++ """ ++ if program in ('tar', 'star', 'bsdtar', 'py_tarfile'): ++ return compression in ('gzip', 'bzip2') + py_lzma ++ return False ++ ++ ++def list_formats (): ++ """Print information about available archive formats to stdout.""" ++ print("Archive programs of", App) ++ print("Archive programs are searched in the following directories:") ++ print(util.system_search_path()) ++ print() ++ for format in ArchiveFormats: ++ print(format, "files:") ++ for command in ArchiveCommands: ++ programs = ArchivePrograms[format] ++ if command not in programs and None not in programs: ++ print(" %8s: - (not supported)" % command) ++ continue ++ try: ++ program = find_archive_program(format, command) ++ print(" %8s: %s" % (command, program), end=' ') ++ if format == 'tar': ++ encs = [x for x in ArchiveCompressions if util.find_program(x)] ++ if encs: ++ print("(supported compressions: %s)" % ", ".join(encs), end=' ') ++ elif format == '7z': ++ if util.p7zip_supports_rar(): ++ print("(rar archives supported)", end=' ') ++ else: ++ print("(rar archives not supported)", end=' ') ++ print() ++ except util.PatoolError: ++ # display information what programs can handle this archive format ++ handlers = programs.get(None, programs.get(command)) ++ print(" %8s: - (no program found; install %s)" % ++ (command, util.strlist_with_or(handlers))) ++ ++ ++def check_program_compression(archive, command, program, compression): ++ """Check if a program supports the given compression.""" ++ program = os.path.basename(program) ++ if compression: ++ # check if compression is supported ++ if not program_supports_compression(program, compression): ++ if command == 'create': ++ comp_command = command ++ else: ++ comp_command = 'extract' ++ comp_prog = find_archive_program(compression, comp_command) ++ if not comp_prog: ++ msg = "cannot %s archive `%s': compression `%s' not supported" ++ raise util.PatoolError(msg % (command, archive, compression)) ++ ++ ++def move_outdir_orphan (outdir): ++ """Move a single file or directory inside outdir a level up. ++ Never overwrite files. ++ Return (True, outfile) if successful, (False, reason) if not.""" ++ entries = os.listdir(outdir) ++ if len(entries) == 1: ++ src = os.path.join(outdir, entries[0]) ++ dst = os.path.join(os.path.dirname(outdir), entries[0]) ++ if os.path.exists(dst) or os.path.islink(dst): ++ return (False, "local file exists") ++ shutil.move(src, dst) ++ os.rmdir(outdir) ++ return (True, entries[0]) ++ return (False, "multiple files in root") ++ ++ ++def run_archive_cmdlist (archive_cmdlist, verbosity=0): ++ """Run archive command.""" ++ # archive_cmdlist is a command list with optional keyword arguments ++ if isinstance(archive_cmdlist, tuple): ++ cmdlist, runkwargs = archive_cmdlist ++ else: ++ cmdlist, runkwargs = archive_cmdlist, {} ++ return util.run_checked(cmdlist, verbosity=verbosity, **runkwargs) ++ ++ ++def make_file_readable (filename): ++ """Make file user readable if it is not a link.""" ++ if not os.path.islink(filename): ++ util.set_mode(filename, stat.S_IRUSR) ++ ++ ++def make_dir_readable (filename): ++ """Make directory user readable and executable.""" ++ util.set_mode(filename, stat.S_IRUSR|stat.S_IXUSR) ++ ++ ++def make_user_readable (directory): ++ """Make all files in given directory user readable. Also recurse into ++ subdirectories.""" ++ for root, dirs, files in os.walk(directory, onerror=util.log_error): ++ for filename in files: ++ make_file_readable(os.path.join(root, filename)) ++ for dirname in dirs: ++ make_dir_readable(os.path.join(root, dirname)) ++ ++ ++def cleanup_outdir (outdir, archive): ++ """Cleanup outdir after extraction and return target file name and ++ result string.""" ++ make_user_readable(outdir) ++ # move single directory or file in outdir ++ (success, msg) = move_outdir_orphan(outdir) ++ if success: ++ # msg is a single directory or filename ++ return msg, "`%s'" % msg ++ # outdir remains unchanged ++ # rename it to something more user-friendly (basically the archive ++ # name without extension) ++ outdir2 = util.get_single_outfile("", archive) ++ os.rename(outdir, outdir2) ++ return outdir2, "`%s' (%s)" % (outdir2, msg) ++ ++ ++def _extract_archive(archive, verbosity=0, interactive=True, outdir=None, ++ program=None, format=None, compression=None): ++ """Extract an archive. ++ @return: output directory if command is 'extract', else None ++ """ ++ if format is None: ++ format, compression = get_archive_format(archive) ++ check_archive_format(format, compression) ++ program = find_archive_program(format, 'extract', program=program) ++ check_program_compression(archive, 'extract', program, compression) ++ get_archive_cmdlist = get_archive_cmdlist_func(program, 'extract', format) ++ if outdir is None: ++ outdir = util.tmpdir(dir=".") ++ do_cleanup_outdir = True ++ else: ++ do_cleanup_outdir = False ++ try: ++ cmdlist = get_archive_cmdlist(archive, compression, program, verbosity, interactive, outdir) ++ if cmdlist: ++ # an empty command list means the get_archive_cmdlist() function ++ # already handled the command (eg. when it's a builtin Python ++ # function) ++ run_archive_cmdlist(cmdlist, verbosity=verbosity) ++ if do_cleanup_outdir: ++ target, msg = cleanup_outdir(outdir, archive) ++ else: ++ target, msg = outdir, "`%s'" % outdir ++ if verbosity >= 0: ++ util.log_info("... %s extracted to %s." % (archive, msg)) ++ return target ++ finally: ++ # try to remove an empty temporary output directory ++ if do_cleanup_outdir: ++ try: ++ os.rmdir(outdir) ++ except OSError: ++ pass ++ ++ ++def _create_archive(archive, filenames, verbosity=0, interactive=True, ++ program=None, format=None, compression=None): ++ """Create an archive.""" ++ if format is None: ++ format, compression = get_archive_format(archive) ++ check_archive_format(format, compression) ++ program = find_archive_program(format, 'create', program=program) ++ check_program_compression(archive, 'create', program, compression) ++ get_archive_cmdlist = get_archive_cmdlist_func(program, 'create', format) ++ origarchive = None ++ if os.path.basename(program) == 'arc' and \ ++ ".arc" in archive and not archive.endswith(".arc"): ++ # the arc program mangles the archive name if it contains ".arc" ++ origarchive = archive ++ archive = util.tmpfile(dir=os.path.dirname(archive), suffix=".arc") ++ cmdlist = get_archive_cmdlist(archive, compression, program, verbosity, interactive, filenames) ++ if cmdlist: ++ # an empty command list means the get_archive_cmdlist() function ++ # already handled the command (eg. when it's a builtin Python ++ # function) ++ run_archive_cmdlist(cmdlist, verbosity=verbosity) ++ if origarchive: ++ shutil.move(archive, origarchive) ++ ++ ++def _handle_archive(archive, command, verbosity=0, interactive=True, ++ program=None, format=None, compression=None): ++ """Test and list archives.""" ++ if format is None: ++ format, compression = get_archive_format(archive) ++ check_archive_format(format, compression) ++ if command not in ('list', 'test'): ++ raise util.PatoolError("invalid archive command `%s'" % command) ++ program = find_archive_program(format, command, program=program) ++ check_program_compression(archive, command, program, compression) ++ get_archive_cmdlist = get_archive_cmdlist_func(program, command, format) ++ # prepare keyword arguments for command list ++ cmdlist = get_archive_cmdlist(archive, compression, program, verbosity, interactive) ++ if cmdlist: ++ # an empty command list means the get_archive_cmdlist() function ++ # already handled the command (eg. when it's a builtin Python ++ # function) ++ run_archive_cmdlist(cmdlist, verbosity=verbosity) ++ ++ ++def get_archive_cmdlist_func (program, command, format): ++ """Get the Python function that executes the given program.""" ++ # get python module for given archive program ++ key = util.stripext(os.path.basename(program).lower()) ++ modulename = ".programs." + ProgramModules.get(key, key) ++ # import the module ++ try: ++ module = importlib.import_module(modulename, __name__) ++ except ImportError as msg: ++ raise util.PatoolError(msg) ++ # get archive handler function (eg. patoolib.programs.star.extract_tar) ++ try: ++ return getattr(module, '%s_%s' % (command, format)) ++ except AttributeError as msg: ++ raise util.PatoolError(msg) ++ ++ ++def rmtree_log_error (func, path, exc): ++ """Error function for shutil.rmtree(). Raises a PatoolError.""" ++ msg = "Error in %s(%s): %s" % (func.__name__, path, str(exc[1])) ++ util.log_error(msg) ++ ++ ++def _diff_archives (archive1, archive2, verbosity=0, interactive=True): ++ """Show differences between two archives. ++ @return 0 if archives are the same, else 1 ++ @raises: PatoolError on errors ++ """ ++ if util.is_same_file(archive1, archive2): ++ return 0 ++ diff = util.find_program("diff") ++ if not diff: ++ msg = "The diff(1) program is required for showing archive differences, please install it." ++ raise util.PatoolError(msg) ++ tmpdir1 = util.tmpdir() ++ try: ++ path1 = _extract_archive(archive1, outdir=tmpdir1, verbosity=-1) ++ tmpdir2 = util.tmpdir() ++ try: ++ path2 = _extract_archive(archive2, outdir=tmpdir2, verbosity=-1) ++ return util.run_checked([diff, "-urN", path1, path2], verbosity=1, ret_ok=(0, 1)) ++ finally: ++ shutil.rmtree(tmpdir2, onerror=rmtree_log_error) ++ finally: ++ shutil.rmtree(tmpdir1, onerror=rmtree_log_error) ++ ++ ++def _search_archive(pattern, archive, verbosity=0, interactive=True): ++ """Search for given pattern in an archive.""" ++ grep = util.find_program("grep") ++ if not grep: ++ msg = "The grep(1) program is required for searching archive contents, please install it." ++ raise util.PatoolError(msg) ++ tmpdir = util.tmpdir() ++ try: ++ path = _extract_archive(archive, outdir=tmpdir, verbosity=-1) ++ return util.run_checked([grep, "-r", "-e", pattern, "."], ret_ok=(0, 1), verbosity=1, cwd=path) ++ finally: ++ shutil.rmtree(tmpdir, onerror=rmtree_log_error) ++ ++ ++def _repack_archive (archive1, archive2, verbosity=0, interactive=True): ++ """Repackage an archive to a different format.""" ++ format1, compression1 = get_archive_format(archive1) ++ format2, compression2 = get_archive_format(archive2) ++ if format1 == format2 and compression1 == compression2: ++ # same format and compression allows to copy the file ++ util.link_or_copy(archive1, archive2, verbosity=verbosity) ++ return ++ tmpdir = util.tmpdir() ++ try: ++ kwargs = dict(verbosity=verbosity, outdir=tmpdir) ++ same_format = (format1 == format2 and compression1 and compression2) ++ if same_format: ++ # only decompress since the format is the same ++ kwargs['format'] = compression1 ++ path = _extract_archive(archive1, **kwargs) ++ archive = os.path.abspath(archive2) ++ files = tuple(os.listdir(path)) ++ olddir = os.getcwd() ++ os.chdir(path) ++ try: ++ kwargs = dict(verbosity=verbosity, interactive=interactive) ++ if same_format: ++ # only compress since the format is the same ++ kwargs['format'] = compression2 ++ _create_archive(archive, files, **kwargs) ++ finally: ++ os.chdir(olddir) ++ finally: ++ shutil.rmtree(tmpdir, onerror=rmtree_log_error) ++ ++ ++def _recompress_archive(archive, verbosity=0, interactive=True): ++ """Try to recompress an archive to smaller size.""" ++ format, compression = get_archive_format(archive) ++ if compression: ++ # only recompress the compression itself (eg. for .tar.xz) ++ format = compression ++ tmpdir = util.tmpdir() ++ tmpdir2 = util.tmpdir() ++ base, ext = os.path.splitext(os.path.basename(archive)) ++ archive2 = util.get_single_outfile(tmpdir2, base, extension=ext) ++ try: ++ # extract ++ kwargs = dict(verbosity=verbosity, format=format, outdir=tmpdir) ++ path = _extract_archive(archive, **kwargs) ++ # compress to new file ++ olddir = os.getcwd() ++ os.chdir(path) ++ try: ++ kwargs = dict(verbosity=verbosity, interactive=interactive, format=format) ++ files = tuple(os.listdir(path)) ++ _create_archive(archive2, files, **kwargs) ++ finally: ++ os.chdir(olddir) ++ # check file sizes and replace if new file is smaller ++ filesize = util.get_filesize(archive) ++ filesize2 = util.get_filesize(archive2) ++ if filesize2 < filesize: ++ # replace file ++ os.remove(archive) ++ shutil.move(archive2, archive) ++ diffsize = filesize - filesize2 ++ return "... recompressed file is now %s smaller." % util.strsize(diffsize) ++ finally: ++ shutil.rmtree(tmpdir, onerror=rmtree_log_error) ++ shutil.rmtree(tmpdir2, onerror=rmtree_log_error) ++ return "... recompressed file is not smaller, leaving archive as is." ++ ++ ++# the patool library API ++ ++def extract_archive(archive, verbosity=0, outdir=None, program=None, interactive=True): ++ """Extract given archive.""" ++ util.check_existing_filename(archive) ++ if verbosity >= 0: ++ util.log_info("Extracting %s ..." % archive) ++ return _extract_archive(archive, verbosity=verbosity, interactive=interactive, outdir=outdir, program=program) ++ ++ ++def list_archive(archive, verbosity=1, program=None, interactive=True): ++ """List given archive.""" ++ # Set default verbosity to 1 since the listing output should be visible. ++ util.check_existing_filename(archive) ++ if verbosity >= 0: ++ util.log_info("Listing %s ..." % archive) ++ return _handle_archive(archive, 'list', verbosity=verbosity, ++ interactive=interactive, program=program) ++ ++ ++def test_archive(archive, verbosity=0, program=None, interactive=True): ++ """Test given archive.""" ++ util.check_existing_filename(archive) ++ if verbosity >= 0: ++ util.log_info("Testing %s ..." % archive) ++ res = _handle_archive(archive, 'test', verbosity=verbosity, ++ interactive=interactive, program=program) ++ if verbosity >= 0: ++ util.log_info("... tested ok.") ++ return res ++ ++ ++def create_archive(archive, filenames, verbosity=0, program=None, interactive=True): ++ """Create given archive with given files.""" ++ util.check_new_filename(archive) ++ util.check_archive_filelist(filenames) ++ if verbosity >= 0: ++ util.log_info("Creating %s ..." % archive) ++ res = _create_archive(archive, filenames, verbosity=verbosity, ++ interactive=interactive, program=program) ++ if verbosity >= 0: ++ util.log_info("... %s created." % archive) ++ return res ++ ++ ++def diff_archives(archive1, archive2, verbosity=0, interactive=True): ++ """Print differences between two archives.""" ++ util.check_existing_filename(archive1) ++ util.check_existing_filename(archive2) ++ if verbosity >= 0: ++ util.log_info("Comparing %s with %s ..." % (archive1, archive2)) ++ res = _diff_archives(archive1, archive2, verbosity=verbosity, interactive=interactive) ++ if res == 0 and verbosity >= 0: ++ util.log_info("... no differences found.") ++ ++ ++def search_archive(pattern, archive, verbosity=0, interactive=True): ++ """Search pattern in archive members.""" ++ if not pattern: ++ raise util.PatoolError("empty search pattern") ++ util.check_existing_filename(archive) ++ if verbosity >= 0: ++ util.log_info("Searching %r in %s ..." % (pattern, archive)) ++ res = _search_archive(pattern, archive, verbosity=verbosity, interactive=interactive) ++ if res == 1 and verbosity >= 0: ++ util.log_info("... %r not found" % pattern) ++ return res ++ ++ ++def repack_archive (archive, archive_new, verbosity=0, interactive=True): ++ """Repack archive to different file and/or format.""" ++ util.check_existing_filename(archive) ++ util.check_new_filename(archive_new) ++ if verbosity >= 0: ++ util.log_info("Repacking %s to %s ..." % (archive, archive_new)) ++ res = _repack_archive(archive, archive_new, verbosity=verbosity, interactive=interactive) ++ if verbosity >= 0: ++ util.log_info("... repacking successful.") ++ return res ++ ++ ++def recompress_archive(archive, verbosity=0, interactive=True): ++ """Recompress an archive to hopefully smaller size.""" ++ util.check_existing_filename(archive) ++ util.check_writable_filename(archive) ++ if verbosity >= 0: ++ util.log_info("Recompressing %s ..." % (archive,)) ++ res = _recompress_archive(archive, verbosity=verbosity, interactive=interactive) ++ if res and verbosity >= 0: ++ util.log_info(res) ++ return 0 +diff -Naur patool-upstream-1.12/build/lib/patoolib/configuration.py patool-upstream-1.12-patched/build/lib/patoolib/configuration.py +--- patool-upstream-1.12/build/lib/patoolib/configuration.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/configuration.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,16 @@ ++# Copyright (C) 2013-2015 Bastian Kleineidam ++""" ++Define basic configuration data like version or application name. ++""" ++import _patool_configdata as configdata ++ ++Version = configdata.version ++ReleaseDate = configdata.release_date ++AppName = configdata.name ++App = AppName+u" "+Version ++Author = configdata.author ++Maintainer = configdata.maintainer ++Copyright = u"Copyright (C) 2004-2015 " + Author ++Url = configdata.url ++SupportUrl = u"https://github.com/wummel/patool/issues/" ++Email = configdata.author_email +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/__init__.py patool-upstream-1.12-patched/build/lib/patoolib/programs/__init__.py +--- patool-upstream-1.12/build/lib/patoolib/programs/__init__.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/__init__.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,46 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++from .. import util ++ ++def extract_singlefile_standard (archive, compression, cmd, verbosity, interactive, outdir): ++ """Standard routine to extract a singlefile archive (like gzip).""" ++ cmdlist = [util.shell_quote(cmd)] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ outfile = util.get_single_outfile(outdir, archive) ++ cmdlist.extend(['-c', '-d', '--', util.shell_quote(archive), '>', ++ util.shell_quote(outfile)]) ++ return (cmdlist, {'shell': True}) ++ ++ ++def test_singlefile_standard (archive, compression, cmd, verbosity, interactive): ++ """Standard routine to test a singlefile archive (like gzip).""" ++ cmdlist = [cmd] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ cmdlist.extend(['-t', '--', archive]) ++ return cmdlist ++ ++ ++def create_singlefile_standard (archive, compression, cmd, verbosity, interactive, filenames): ++ """Standard routine to create a singlefile archive (like gzip).""" ++ cmdlist = [util.shell_quote(cmd)] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ cmdlist.extend(['-c', '--']) ++ cmdlist.extend([util.shell_quote(x) for x in filenames]) ++ cmdlist.extend(['>', util.shell_quote(archive)]) ++ return (cmdlist, {'shell': True}) +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/ar.py patool-upstream-1.12-patched/build/lib/patoolib/programs/ar.py +--- patool-upstream-1.12/build/lib/patoolib/programs/ar.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/ar.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,43 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the ar program.""" ++import os ++ ++def extract_ar (archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract a AR archive.""" ++ opts = 'x' ++ if verbosity > 1: ++ opts += 'v' ++ cmdlist = [cmd, opts, os.path.abspath(archive)] ++ return (cmdlist, {'cwd': outdir}) ++ ++def list_ar (archive, compression, cmd, verbosity, interactive): ++ """List a AR archive.""" ++ opts = 't' ++ if verbosity > 1: ++ opts += 'v' ++ return [cmd, opts, archive] ++ ++test_ar = list_ar ++ ++def create_ar (archive, compression, cmd, verbosity, interactive, filenames): ++ """Create a AR archive.""" ++ opts = 'rc' ++ if verbosity > 1: ++ opts += 'v' ++ cmdlist = [cmd, opts, archive] ++ cmdlist.extend(filenames) ++ return cmdlist +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/arc.py patool-upstream-1.12-patched/build/lib/patoolib/programs/arc.py +--- patool-upstream-1.12/build/lib/patoolib/programs/arc.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/arc.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,44 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the arc program.""" ++import os ++ ++def extract_arc (archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract a ARC archive.""" ++ # Since extracted files will be placed in the current directory, ++ # the cwd argument has to be the output directory. ++ cmdlist = [cmd, 'x', os.path.abspath(archive)] ++ return (cmdlist, {'cwd': outdir}) ++ ++def list_arc (archive, compression, cmd, verbosity, interactive): ++ """List a ARC archive.""" ++ cmdlist = [cmd] ++ if verbosity > 1: ++ cmdlist.append('v') ++ else: ++ cmdlist.append('l') ++ cmdlist.append(archive) ++ return cmdlist ++ ++def test_arc (archive, compression, cmd, verbosity, interactive): ++ """Test a ARC archive.""" ++ return [cmd, 't', archive] ++ ++def create_arc (archive, compression, cmd, verbosity, interactive, filenames): ++ """Create a ARC archive.""" ++ cmdlist = [cmd, 'a', archive] ++ cmdlist.extend(filenames) ++ return cmdlist +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/archmage.py patool-upstream-1.12-patched/build/lib/patoolib/programs/archmage.py +--- patool-upstream-1.12/build/lib/patoolib/programs/archmage.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/archmage.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,32 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2012-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the archmage program.""" ++import os ++from .. import util ++ ++ ++def extract_chm (archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract a CHM archive.""" ++ # archmage can only extract in non-existing directories ++ # so a nice dirname is created ++ name = util.get_single_outfile("", archive) ++ outfile = os.path.join(outdir, name) ++ return [cmd, '-x', os.path.abspath(archive), outfile] ++ ++ ++def test_chm (archive, compression, cmd, verbosity, interactive): ++ """Test a CHM archive.""" ++ return [cmd, '-d', os.path.abspath(archive)] +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/arj.py patool-upstream-1.12-patched/build/lib/patoolib/programs/arj.py +--- patool-upstream-1.12/build/lib/patoolib/programs/arj.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/arj.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,56 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the arj program.""" ++ ++def extract_arj (archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract an ARJ archive.""" ++ cmdlist = [cmd, 'x', '-r'] ++ if not interactive: ++ cmdlist.append('-y') ++ cmdlist.extend([archive, outdir]) ++ return cmdlist ++ ++ ++def list_arj (archive, compression, cmd, verbosity, interactive): ++ """List an ARJ archive.""" ++ cmdlist = [cmd] ++ if verbosity > 1: ++ cmdlist.append('v') ++ else: ++ cmdlist.append('l') ++ if not interactive: ++ cmdlist.append('-y') ++ cmdlist.extend(['-r', archive]) ++ return cmdlist ++ ++ ++def test_arj (archive, compression, cmd, verbosity, interactive): ++ """Test an ARJ archive.""" ++ cmdlist = [cmd, 't', '-r'] ++ if not interactive: ++ cmdlist.append('-y') ++ cmdlist.append(archive) ++ return cmdlist ++ ++ ++def create_arj (archive, compression, cmd, verbosity, interactive, filenames): ++ """Create an ARJ archive.""" ++ cmdlist = [cmd, 'a', '-r'] ++ if not interactive: ++ cmdlist.append('-y') ++ cmdlist.append(archive) ++ cmdlist.extend(filenames) ++ return cmdlist +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/bsdcpio.py patool-upstream-1.12-patched/build/lib/patoolib/programs/bsdcpio.py +--- patool-upstream-1.12/build/lib/patoolib/programs/bsdcpio.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/bsdcpio.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,18 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2012 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the bsdcpio program.""" ++from .cpio import extract_cpio, list_cpio, test_cpio, create_cpio ++ +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/bsdtar.py patool-upstream-1.12-patched/build/lib/patoolib/programs/bsdtar.py +--- patool-upstream-1.12/build/lib/patoolib/programs/bsdtar.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/bsdtar.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,18 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2012 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the BSD tar program.""" ++ ++from .tar import extract_tar, list_tar, test_tar, create_tar +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/bzip2.py patool-upstream-1.12-patched/build/lib/patoolib/programs/bzip2.py +--- patool-upstream-1.12/build/lib/patoolib/programs/bzip2.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/bzip2.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,31 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the bzip2 program.""" ++from .. import util ++from . import extract_singlefile_standard, test_singlefile_standard ++ ++extract_bzip2 = extract_singlefile_standard ++test_bzip2 = test_singlefile_standard ++ ++def create_bzip2 (archive, compression, cmd, verbosity, interactive, filenames): ++ """Create a BZIP2 archive.""" ++ cmdlist = [util.shell_quote(cmd)] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ cmdlist.extend(['-c', '-z', '-9', '--']) ++ cmdlist.extend([util.shell_quote(x) for x in filenames]) ++ cmdlist.extend(['>', util.shell_quote(archive)]) ++ return (cmdlist, {'shell': True}) +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/cabextract.py patool-upstream-1.12-patched/build/lib/patoolib/programs/cabextract.py +--- patool-upstream-1.12/build/lib/patoolib/programs/cabextract.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/cabextract.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,36 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the cabextract program.""" ++ ++def extract_cab (archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract a CAB archive.""" ++ cmdlist = [cmd, '-d', outdir] ++ if verbosity > 0: ++ cmdlist.append('-v') ++ cmdlist.append(archive) ++ return cmdlist ++ ++def list_cab (archive, compression, cmd, verbosity, interactive): ++ """List a CAB archive.""" ++ cmdlist = [cmd, '-l'] ++ if verbosity > 0: ++ cmdlist.append('-v') ++ cmdlist.append(archive) ++ return cmdlist ++ ++def test_cab (archive, compression, cmd, verbosity, interactive): ++ """Test a CAB archive.""" ++ return [cmd, '-t', archive] +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/chmlib.py patool-upstream-1.12-patched/build/lib/patoolib/programs/chmlib.py +--- patool-upstream-1.12/build/lib/patoolib/programs/chmlib.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/chmlib.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,22 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2012-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the chmlib programs.""" ++import os ++ ++ ++def extract_chm (archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract a CHM archive.""" ++ return [cmd, os.path.abspath(archive), outdir] +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/clzip.py patool-upstream-1.12-patched/build/lib/patoolib/programs/clzip.py +--- patool-upstream-1.12/build/lib/patoolib/programs/clzip.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/clzip.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,32 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2011-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the clzip program.""" ++from . import extract_singlefile_standard, test_singlefile_standard ++from .. import util ++ ++ ++extract_lzip = extract_singlefile_standard ++test_lzip = test_singlefile_standard ++ ++def create_lzip(archive, compression, cmd, verbosity, interactive, filenames): ++ """Create an LZIP archive.""" ++ cmdlist = [util.shell_quote(cmd)] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ cmdlist.extend(['-c', '-9', '--']) ++ cmdlist.extend([util.shell_quote(x) for x in filenames]) ++ cmdlist.extend(['>', util.shell_quote(archive)]) ++ return (cmdlist, {'shell': True}) +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/compress.py patool-upstream-1.12-patched/build/lib/patoolib/programs/compress.py +--- patool-upstream-1.12/build/lib/patoolib/programs/compress.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/compress.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,28 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the uncompress.real program.""" ++from .. import util ++ ++ ++def create_compress (archive, compression, cmd, verbosity, interactive, filenames): ++ """Create a compressed archive.""" ++ cmdlist = [util.shell_quote(cmd)] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ cmdlist.append('-c') ++ cmdlist.extend([util.shell_quote(x) for x in filenames]) ++ cmdlist.extend(['>', util.shell_quote(archive)]) ++ return (cmdlist, {'shell': True}) +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/cpio.py patool-upstream-1.12-patched/build/lib/patoolib/programs/cpio.py +--- patool-upstream-1.12/build/lib/patoolib/programs/cpio.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/cpio.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,56 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the cpio program.""" ++import os ++import sys ++from .. import util ++ ++def extract_cpio (archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract a CPIO archive.""" ++ cmdlist = [util.shell_quote(cmd), '--extract', '--make-directories', ++ '--preserve-modification-time'] ++ if sys.platform.startswith('linux') and not cmd.endswith('bsdcpio'): ++ cmdlist.extend(['--no-absolute-filenames', ++ '--force-local', '--nonmatching', r'"*\.\.*"']) ++ if verbosity > 1: ++ cmdlist.append('-v') ++ cmdlist.extend(['<', util.shell_quote(os.path.abspath(archive))]) ++ return (cmdlist, {'cwd': outdir, 'shell': True}) ++ ++ ++def list_cpio (archive, compression, cmd, verbosity, interactive): ++ """List a CPIO archive.""" ++ cmdlist = [cmd, '-i', '-t'] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ cmdlist.extend(['-F', archive]) ++ return cmdlist ++ ++test_cpio = list_cpio ++ ++def create_cpio(archive, compression, cmd, verbosity, interactive, filenames): ++ """Create a CPIO archive.""" ++ cmdlist = [util.shell_quote(cmd), '--create'] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ if len(filenames) != 0: ++ findcmd = ['find'] ++ findcmd.extend([util.shell_quote(x) for x in filenames]) ++ findcmd.extend(['-print0', '|']) ++ cmdlist[0:0] = findcmd ++ cmdlist.append('-0') ++ cmdlist.extend([">", util.shell_quote(archive)]) ++ return (cmdlist, {'shell': True}) +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/dpkg.py patool-upstream-1.12-patched/build/lib/patoolib/programs/dpkg.py +--- patool-upstream-1.12/build/lib/patoolib/programs/dpkg.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/dpkg.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,32 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the dpkg-deb program.""" ++ ++def extract_deb (archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract a DEB archive.""" ++ cmdlist = [cmd] ++ if verbosity > 1: ++ cmdlist.append('--vextract') ++ else: ++ cmdlist.append('--extract') ++ cmdlist.extend(['--', archive, outdir]) ++ return cmdlist ++ ++def list_deb (archive, compression, cmd, verbosity, interactive): ++ """List a DEB archive.""" ++ return [cmd, '--contents', '--', archive] ++ ++test_deb = list_deb +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/flac.py patool-upstream-1.12-patched/build/lib/patoolib/programs/flac.py +--- patool-upstream-1.12/build/lib/patoolib/programs/flac.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/flac.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,34 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2012-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the flac program.""" ++from .. import util ++ ++def extract_flac (archive, compression, cmd, verbosity, interactive, outdir): ++ """Decompress a FLAC archive to a WAV file.""" ++ outfile = util.get_single_outfile(outdir, archive, extension=".wav") ++ cmdlist = [cmd, '--decode', archive, '--output-name', outfile] ++ return cmdlist ++ ++ ++def create_flac (archive, compression, cmd, verbosity, interactive, filenames): ++ """Compress a WAV file to a FLAC archive.""" ++ cmdlist = [cmd, filenames[0], '--best', '--output-name', archive] ++ return cmdlist ++ ++ ++def test_flac (archive, compression, cmd, verbosity, interactive): ++ """Test a FLAC file.""" ++ return [cmd, '--test', archive] +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/genisoimage.py patool-upstream-1.12-patched/build/lib/patoolib/programs/genisoimage.py +--- patool-upstream-1.12/build/lib/patoolib/programs/genisoimage.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/genisoimage.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,28 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2013-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the genisoimage program.""" ++ ++def create_iso (archive, compression, cmd, verbosity, interactive, filenames): ++ """Create an ISO archive.""" ++ # Use Joliet (-J) and Rock-Ridge (-r) format. ++ cmdlist = [cmd, '-r', '-J'] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ if verbosity > 2: ++ cmdlist.append('-v') ++ cmdlist.extend(['-o', archive]) ++ cmdlist.extend(filenames) ++ return cmdlist +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/gzip.py patool-upstream-1.12-patched/build/lib/patoolib/programs/gzip.py +--- patool-upstream-1.12/build/lib/patoolib/programs/gzip.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/gzip.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,41 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the gzip program.""" ++from . import extract_singlefile_standard, test_singlefile_standard ++from .. import util ++ ++extract_gzip = extract_compress = extract_singlefile_standard ++test_gzip = test_compress = test_singlefile_standard ++ ++ ++def create_gzip(archive, compression, cmd, verbosity, interactive, filenames): ++ """Create a GZIP archive.""" ++ cmdlist = [util.shell_quote(cmd)] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ cmdlist.extend(['-c', '-9', '--']) ++ cmdlist.extend([util.shell_quote(x) for x in filenames]) ++ cmdlist.extend(['>', util.shell_quote(archive)]) ++ return (cmdlist, {'shell': True}) ++ ++ ++def list_gzip (archive, compression, cmd, verbosity, interactive): ++ """List a GZIP archive.""" ++ cmdlist = [cmd] ++ if verbosity > 0: ++ cmdlist.append('-v') ++ cmdlist.extend(['-l', '--', archive]) ++ return cmdlist +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/isoinfo.py patool-upstream-1.12-patched/build/lib/patoolib/programs/isoinfo.py +--- patool-upstream-1.12/build/lib/patoolib/programs/isoinfo.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/isoinfo.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,21 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2013-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the isoinfo program.""" ++ ++def list_iso (archive, compression, cmd, verbosity, interactive): ++ """List an ISO archive.""" ++ # Use Joliet (-J) and Rock-Ridge (-R) options. ++ return [cmd, '-l', '-R', '-J', '-i', archive] +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/lbzip2.py patool-upstream-1.12-patched/build/lib/patoolib/programs/lbzip2.py +--- patool-upstream-1.12/build/lib/patoolib/programs/lbzip2.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/lbzip2.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,18 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2012 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the pbzip2 program.""" ++# bzip2 and lbzip2 are compatible ++from .bzip2 import extract_bzip2, test_bzip2, create_bzip2 +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/lcab.py patool-upstream-1.12-patched/build/lib/patoolib/programs/lcab.py +--- patool-upstream-1.12/build/lib/patoolib/programs/lcab.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/lcab.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,23 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2012-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the lcab program.""" ++ ++def create_cab (archive, compression, cmd, verbosity, interactive, filenames): ++ """Create a CAB archive.""" ++ cmdlist = [cmd, '-r'] ++ cmdlist.extend(filenames) ++ cmdlist.append(archive) ++ return cmdlist +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/lha.py patool-upstream-1.12-patched/build/lib/patoolib/programs/lha.py +--- patool-upstream-1.12/build/lib/patoolib/programs/lha.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/lha.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,50 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the lha program.""" ++ ++def extract_lzh (archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract a LZH archive.""" ++ opts = 'x' ++ if verbosity > 1: ++ opts += 'v' ++ opts += "w=%s" % outdir ++ return [cmd, opts, archive] ++ ++def list_lzh (archive, compression, cmd, verbosity, interactive): ++ """List a LZH archive.""" ++ cmdlist = [cmd] ++ if verbosity > 1: ++ cmdlist.append('v') ++ else: ++ cmdlist.append('l') ++ cmdlist.append(archive) ++ return cmdlist ++ ++def test_lzh (archive, compression, cmd, verbosity, interactive): ++ """Test a LZH archive.""" ++ opts = 't' ++ if verbosity > 1: ++ opts += 'v' ++ return [cmd, opts, archive] ++ ++def create_lzh (archive, compression, cmd, verbosity, interactive, filenames): ++ """Create a LZH archive.""" ++ opts = 'a' ++ if verbosity > 1: ++ opts += 'v' ++ cmdlist = [cmd, opts, archive] ++ cmdlist.extend(filenames) ++ return cmdlist +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/lhasa.py patool-upstream-1.12-patched/build/lib/patoolib/programs/lhasa.py +--- patool-upstream-1.12/build/lib/patoolib/programs/lhasa.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/lhasa.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,18 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2012 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the lhasa program.""" ++from .lha import extract_lzh ++ +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/lrzip.py patool-upstream-1.12-patched/build/lib/patoolib/programs/lrzip.py +--- patool-upstream-1.12/build/lib/patoolib/programs/lrzip.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/lrzip.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,43 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the lrzip program.""" ++import os ++from .. import util ++ ++def extract_lrzip (archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract a LRZIP archive.""" ++ cmdlist = [cmd, '-d'] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ outfile = util.get_single_outfile(outdir, archive) ++ cmdlist.extend(["-o", outfile, os.path.abspath(archive)]) ++ return cmdlist ++ ++def test_lrzip (archive, compression, cmd, verbosity, interactive): ++ """Test a LRZIP archive.""" ++ cmdlist = [cmd, '-t'] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ cmdlist.append(archive) ++ return cmdlist ++ ++def create_lrzip (archive, compression, cmd, verbosity, interactive, filenames): ++ """Create a LRZIP archive.""" ++ cmdlist = [cmd, '-o', archive] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ cmdlist.extend(filenames) ++ return cmdlist +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/lzip.py patool-upstream-1.12-patched/build/lib/patoolib/programs/lzip.py +--- patool-upstream-1.12/build/lib/patoolib/programs/lzip.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/lzip.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,23 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2012 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the lzip program.""" ++from . import extract_singlefile_standard, \ ++ test_singlefile_standard, create_singlefile_standard ++ ++ ++extract_lzip = extract_singlefile_standard ++test_lzip = test_singlefile_standard ++create_lzip = create_singlefile_standard +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/lzma.py patool-upstream-1.12-patched/build/lib/patoolib/programs/lzma.py +--- patool-upstream-1.12/build/lib/patoolib/programs/lzma.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/lzma.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,23 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2012 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the lzma program.""" ++from . import extract_singlefile_standard, \ ++ test_singlefile_standard, create_singlefile_standard ++ ++ ++extract_lzma = extract_singlefile_standard ++test_lzma = test_singlefile_standard ++create_lzma = create_singlefile_standard +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/lzop.py patool-upstream-1.12-patched/build/lib/patoolib/programs/lzop.py +--- patool-upstream-1.12/build/lib/patoolib/programs/lzop.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/lzop.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,46 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the lzop program.""" ++from . import extract_singlefile_standard ++ ++ ++extract_lzop = extract_singlefile_standard ++ ++ ++def list_lzop (archive, compression, cmd, verbosity, interactive): ++ """List a LZOP archive.""" ++ cmdlist = [cmd, '--list'] ++ if verbosity > 1: ++ cmdlist.append('--verbose') ++ cmdlist.extend(['--', archive]) ++ return cmdlist ++ ++def test_lzop (archive, compression, cmd, verbosity, interactive): ++ """Test a LZOP archive.""" ++ cmdlist = [cmd, '--test'] ++ if verbosity > 1: ++ cmdlist.append('--verbose') ++ cmdlist.extend(['--', archive]) ++ return cmdlist ++ ++def create_lzop (archive, compression, cmd, verbosity, interactive, filenames): ++ """Create a LZOP archive.""" ++ cmdlist = [cmd] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ cmdlist.extend(['-o', archive, '--']) ++ cmdlist.extend(filenames) ++ return cmdlist +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/mac.py patool-upstream-1.12-patched/build/lib/patoolib/programs/mac.py +--- patool-upstream-1.12/build/lib/patoolib/programs/mac.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/mac.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,36 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2012-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the MAC.exe program.""" ++from .. import util ++ ++def extract_ape (archive, compression, cmd, verbosity, interactive, outdir): ++ """Decompress an APE archive to a WAV file.""" ++ outfile = util.get_single_outfile(outdir, archive, extension=".wav") ++ return [cmd, archive, outfile, '-d'] ++ ++ ++def create_ape (archive, compression, cmd, verbosity, interactive, filenames): ++ """Compress a WAV file to an APE archive.""" ++ cmdlist = [cmd] ++ cmdlist.extend(filenames) ++ cmdlist.append(archive) ++ cmdlist.append('-c2000') ++ return cmdlist ++ ++ ++def test_ape (archive, compression, cmd, verbosity, interactive): ++ """Test an APE archive.""" ++ return [cmd, archive, '-v'] +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/nomarch.py patool-upstream-1.12-patched/build/lib/patoolib/programs/nomarch.py +--- patool-upstream-1.12/build/lib/patoolib/programs/nomarch.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/nomarch.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,36 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the nomarch program.""" ++import os ++ ++def extract_arc (archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract an ARC archive.""" ++ # Since extracted files will be placed in the current directory, ++ # the cwd argument has to be the output directory. ++ cmdlist = [cmd, os.path.abspath(archive)] ++ return (cmdlist, {'cwd': outdir}) ++ ++def list_arc (archive, compression, cmd, verbosity, interactive): ++ """List an ARC archive.""" ++ cmdlist = [cmd, '-l'] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ cmdlist.append(archive) ++ return cmdlist ++ ++def test_arc (archive, compression, cmd, verbosity, interactive): ++ """Test an ARC archive.""" ++ return [cmd, '-t', archive] +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/p7azip.py patool-upstream-1.12-patched/build/lib/patoolib/programs/p7azip.py +--- patool-upstream-1.12/build/lib/patoolib/programs/p7azip.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/p7azip.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,49 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the 7za program. ++ ++From the man page: ++7za is a stand-alone executable. 7za handles less archive formats than 7z, ++but does not need any others. ++""" ++ ++from .p7zip import \ ++ extract_bzip2, \ ++ extract_gzip, \ ++ extract_zip, \ ++ extract_compress, \ ++ extract_rar, \ ++ extract_cab, \ ++ extract_7z, \ ++ list_bzip2, \ ++ list_gzip, \ ++ list_zip, \ ++ list_compress, \ ++ list_rar, \ ++ list_cab, \ ++ list_rpm, \ ++ list_7z, \ ++ test_bzip2, \ ++ test_gzip, \ ++ test_zip, \ ++ test_compress, \ ++ test_rar, \ ++ test_cab, \ ++ test_7z, \ ++ create_7z, \ ++ create_zip, \ ++ create_gzip, \ ++ create_bzip2 +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/p7rzip.py patool-upstream-1.12-patched/build/lib/patoolib/programs/p7rzip.py +--- patool-upstream-1.12/build/lib/patoolib/programs/p7rzip.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/p7rzip.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,25 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2016 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the 7zr program. ++ ++7zr is a light executable supporting only the 7z archive format. ++""" ++ ++from .p7zip import \ ++ extract_7z, \ ++ list_7z, \ ++ test_7z, \ ++ create_7z +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/p7zip.py patool-upstream-1.12-patched/build/lib/patoolib/programs/p7zip.py +--- patool-upstream-1.12/build/lib/patoolib/programs/p7zip.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/p7zip.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,151 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the 7z program.""" ++ ++def extract_7z(archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract a 7z archive.""" ++ cmdlist = [cmd, 'x'] ++ if not interactive: ++ cmdlist.append('-y') ++ cmdlist.extend(['-o%s' % outdir, '--', archive]) ++ return cmdlist ++ ++def extract_7z_singlefile(archive, compression, cmd, verbosity, interactive, 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.""" ++ cmdlist = [cmd, 'e'] ++ if not interactive: ++ cmdlist.append('-y') ++ cmdlist.extend(['-o%s' % outdir, '--', archive]) ++ return cmdlist ++ ++extract_bzip2 = \ ++ extract_gzip = \ ++ extract_compress = \ ++ extract_xz = \ ++ extract_lzma = \ ++ extract_7z_singlefile ++ ++extract_zip = \ ++ extract_rar = \ ++ extract_cab = \ ++ extract_arj = \ ++ extract_cpio = \ ++ extract_rpm = \ ++ extract_deb = \ ++ extract_iso = \ ++ extract_vhd = \ ++ extract_7z ++ ++def list_7z (archive, compression, cmd, verbosity, interactive): ++ """List a 7z archive.""" ++ cmdlist = [cmd, 'l'] ++ if not interactive: ++ cmdlist.append('-y') ++ cmdlist.extend(['--', archive]) ++ return cmdlist ++ ++list_bzip2 = \ ++ list_gzip = \ ++ list_zip = \ ++ list_compress = \ ++ list_rar = \ ++ list_cab = \ ++ list_arj = \ ++ list_cpio = \ ++ list_rpm = \ ++ list_deb = \ ++ list_iso = \ ++ list_xz = \ ++ list_lzma = \ ++ list_vhd = \ ++ list_7z ++ ++ ++def test_7z (archive, compression, cmd, verbosity, interactive): ++ """Test a 7z archive.""" ++ cmdlist = [cmd, 't'] ++ if not interactive: ++ cmdlist.append('-y') ++ cmdlist.extend(['--', archive]) ++ return cmdlist ++ ++test_bzip2 = \ ++ test_gzip = \ ++ test_zip = \ ++ test_compress = \ ++ test_rar = \ ++ test_cab = \ ++ test_arj = \ ++ test_cpio = \ ++ test_rpm = \ ++ test_deb = \ ++ test_iso = \ ++ test_xz = \ ++ test_lzma = \ ++ test_vhd = \ ++ test_7z ++ ++ ++def create_7z(archive, compression, cmd, verbosity, interactive, filenames): ++ """Create a 7z archive.""" ++ cmdlist = [cmd, 'a'] ++ if not interactive: ++ cmdlist.append('-y') ++ cmdlist.extend(['-t7z', '-mx=9', '--', archive]) ++ cmdlist.extend(filenames) ++ return cmdlist ++ ++ ++def create_zip(archive, compression, cmd, verbosity, interactive, filenames): ++ """Create a ZIP archive.""" ++ cmdlist = [cmd, 'a'] ++ if not interactive: ++ cmdlist.append('-y') ++ cmdlist.extend(['-tzip', '-mx=9', '--', archive]) ++ cmdlist.extend(filenames) ++ return cmdlist ++ ++ ++def create_xz(archive, compression, cmd, verbosity, interactive, filenames): ++ """Create an XZ archive.""" ++ cmdlist = [cmd, 'a'] ++ if not interactive: ++ cmdlist.append('-y') ++ cmdlist.extend(['-txz', '-mx=9', '--', archive]) ++ cmdlist.extend(filenames) ++ return cmdlist ++ ++ ++def create_gzip(archive, compression, cmd, verbosity, interactive, filenames): ++ """Create a GZIP archive.""" ++ cmdlist = [cmd, 'a'] ++ if not interactive: ++ cmdlist.append('-y') ++ cmdlist.extend(['-tgzip', '-mx=9', '--', archive]) ++ cmdlist.extend(filenames) ++ return cmdlist ++ ++ ++def create_bzip2(archive, compression, cmd, verbosity, interactive, filenames): ++ """Create a BZIP2 archive.""" ++ cmdlist = [cmd, 'a'] ++ if not interactive: ++ cmdlist.append('-y') ++ cmdlist.extend(['-tbzip2', '-mx=9', '--', archive]) ++ cmdlist.extend(filenames) ++ return cmdlist +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/pbzip2.py patool-upstream-1.12-patched/build/lib/patoolib/programs/pbzip2.py +--- patool-upstream-1.12/build/lib/patoolib/programs/pbzip2.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/pbzip2.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,18 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2012 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the pbzip2 program.""" ++# bzip2 and pbzip2 are compatible ++from .bzip2 import extract_bzip2, test_bzip2, create_bzip2 +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/pdlzip.py patool-upstream-1.12-patched/build/lib/patoolib/programs/pdlzip.py +--- patool-upstream-1.12/build/lib/patoolib/programs/pdlzip.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/pdlzip.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,23 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2011-2012 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the clzip program.""" ++from . import extract_singlefile_standard, \ ++ test_singlefile_standard, create_singlefile_standard ++ ++ ++extract_lzip = extract_singlefile_standard ++test_lzip = test_singlefile_standard ++create_lzip = create_singlefile_standard +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/pigz.py patool-upstream-1.12-patched/build/lib/patoolib/programs/pigz.py +--- patool-upstream-1.12/build/lib/patoolib/programs/pigz.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/pigz.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,17 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2012 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the pigz program.""" ++from .gzip import extract_gzip, test_gzip, create_gzip, list_gzip +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/plzip.py patool-upstream-1.12-patched/build/lib/patoolib/programs/plzip.py +--- patool-upstream-1.12/build/lib/patoolib/programs/plzip.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/plzip.py 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,23 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2012 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the plzip program.""" ++from . import extract_singlefile_standard, \ ++ test_singlefile_standard, create_singlefile_standard ++ ++ ++extract_lzip = extract_singlefile_standard ++test_lzip = test_singlefile_standard ++create_lzip = create_singlefile_standard +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/py_bz2.py patool-upstream-1.12-patched/build/lib/patoolib/programs/py_bz2.py +--- patool-upstream-1.12/build/lib/patoolib/programs/py_bz2.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/py_bz2.py 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,58 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2012-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the bz2 Python module.""" ++from .. import util ++try: ++ # try external bz2file module with multi-stream support ++ import bz2file as bz2 ++except ImportError: ++ import bz2 ++ ++# read in 1MB chunks ++READ_SIZE_BYTES = 1024*1024 ++ ++def extract_bzip2 (archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract a BZIP2 archive with the bz2 Python module.""" ++ targetname = util.get_single_outfile(outdir, archive) ++ try: ++ with bz2.BZ2File(archive) as bz2file: ++ with open(targetname, 'wb') as targetfile: ++ data = bz2file.read(READ_SIZE_BYTES) ++ while data: ++ targetfile.write(data) ++ data = bz2file.read(READ_SIZE_BYTES) ++ except Exception as err: ++ msg = "error extracting %s to %s: %s" % (archive, targetname, err) ++ raise util.PatoolError(msg) ++ return None ++ ++ ++def create_bzip2 (archive, compression, cmd, verbosity, interactive, filenames): ++ """Create a BZIP2 archive with the bz2 Python module.""" ++ if len(filenames) > 1: ++ raise util.PatoolError('multi-file compression not supported in Python bz2') ++ try: ++ with bz2.BZ2File(archive, 'wb') as bz2file: ++ filename = filenames[0] ++ with open(filename, 'rb') as srcfile: ++ data = srcfile.read(READ_SIZE_BYTES) ++ while data: ++ bz2file.write(data) ++ data = srcfile.read(READ_SIZE_BYTES) ++ except Exception as err: ++ msg = "error creating %s: %s" % (archive, err) ++ raise util.PatoolError(msg) ++ return None +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/py_echo.py patool-upstream-1.12-patched/build/lib/patoolib/programs/py_echo.py +--- patool-upstream-1.12/build/lib/patoolib/programs/py_echo.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/py_echo.py 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,46 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands echoing data, implemented by the Python print ++statement.""" ++from __future__ import print_function ++from .. import util ++ ++ ++def list_bzip2 (archive, compression, cmd, verbosity, interactive): ++ """List a BZIP2 archive.""" ++ return stripext(cmd, archive, verbosity) ++ ++list_compress = \ ++ list_lzma = \ ++ list_xz = \ ++ list_lzip = \ ++ list_lrzip = \ ++ list_rzip = \ ++ list_bzip2 ++ ++def list_ape (archive, compression, cmd, verbosity, interactive): ++ """List an APE archive.""" ++ return stripext(cmd, archive, verbosity, extension=".wav") ++ ++list_shn = \ ++ list_flac = \ ++ list_ape ++ ++def stripext (cmd, archive, verbosity, extension=""): ++ """Print the name without suffix.""" ++ if verbosity >= 0: ++ print(util.stripext(archive)+extension) ++ return None +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/py_gzip.py patool-upstream-1.12-patched/build/lib/patoolib/programs/py_gzip.py +--- patool-upstream-1.12/build/lib/patoolib/programs/py_gzip.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/py_gzip.py 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,55 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2012-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the gzip Python module.""" ++from __future__ import absolute_import ++# now gzip refers to the Python standard module, not the local one ++import gzip ++from .. import util ++ ++READ_SIZE_BYTES = 1024*1024 ++ ++def extract_gzip (archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract a GZIP archive with the gzip Python module.""" ++ targetname = util.get_single_outfile(outdir, archive) ++ try: ++ with gzip.GzipFile(archive) as gzipfile: ++ with open(targetname, 'wb') as targetfile: ++ data = gzipfile.read(READ_SIZE_BYTES) ++ while data: ++ targetfile.write(data) ++ data = gzipfile.read(READ_SIZE_BYTES) ++ except Exception as err: ++ msg = "error extracting %s to %s: %s" % (archive, targetname, err) ++ raise util.PatoolError(msg) ++ return None ++ ++ ++def create_gzip (archive, compression, cmd, verbosity, interactive, filenames): ++ """Create a GZIP archive with the gzip Python module.""" ++ if len(filenames) > 1: ++ raise util.PatoolError('multi-file compression not supported in Python gzip') ++ try: ++ with gzip.GzipFile(archive, 'wb') as gzipfile: ++ filename = filenames[0] ++ with open(filename, 'rb') as srcfile: ++ data = srcfile.read(READ_SIZE_BYTES) ++ while data: ++ gzipfile.write(data) ++ data = srcfile.read(READ_SIZE_BYTES) ++ except Exception as err: ++ msg = "error creating %s: %s" % (archive, err) ++ raise util.PatoolError(msg) ++ return None +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/py_lzma.py patool-upstream-1.12-patched/build/lib/patoolib/programs/py_lzma.py +--- patool-upstream-1.12/build/lib/patoolib/programs/py_lzma.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/py_lzma.py 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,69 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2012-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the lzma Python module.""" ++from .. import util ++import lzma ++ ++READ_SIZE_BYTES = 1024*1024 ++ ++def _extract(archive, compression, cmd, format, verbosity, outdir): ++ """Extract an LZMA or XZ archive with the lzma Python module.""" ++ targetname = util.get_single_outfile(outdir, archive) ++ try: ++ with lzma.LZMAFile(archive, format=format) as lzmafile: ++ with open(targetname, 'wb') as targetfile: ++ data = lzmafile.read(READ_SIZE_BYTES) ++ while data: ++ targetfile.write(data) ++ data = lzmafile.read(READ_SIZE_BYTES) ++ except Exception as err: ++ msg = "error extracting %s to %s: %s" % (archive, targetname, err) ++ raise util.PatoolError(msg) ++ return None ++ ++def extract_lzma(archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract an LZMA archive with the lzma Python module.""" ++ return _extract(archive, compression, cmd, lzma.FORMAT_ALONE, verbosity, outdir) ++ ++def extract_xz(archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract an XZ archive with the lzma Python module.""" ++ return _extract(archive, compression, cmd, lzma.FORMAT_XZ, verbosity, outdir) ++ ++ ++def _create(archive, compression, cmd, format, verbosity, filenames): ++ """Create an LZMA or XZ archive with the lzma Python module.""" ++ if len(filenames) > 1: ++ raise util.PatoolError('multi-file compression not supported in Python lzma') ++ try: ++ with lzma.LZMAFile(archive, mode='wb', format=format, preset=9) as lzmafile: ++ filename = filenames[0] ++ with open(filename, 'rb') as srcfile: ++ data = srcfile.read(READ_SIZE_BYTES) ++ while data: ++ lzmafile.write(data) ++ data = srcfile.read(READ_SIZE_BYTES) ++ except Exception as err: ++ msg = "error creating %s: %s" % (archive, err) ++ raise util.PatoolError(msg) ++ return None ++ ++def create_lzma(archive, compression, cmd, verbosity, interactive, filenames): ++ """Create an LZMA archive with the lzma Python module.""" ++ return _create(archive, compression, cmd, lzma.FORMAT_ALONE, verbosity, filenames) ++ ++def create_xz(archive, compression, cmd, verbosity, interactive, filenames): ++ """Create an XZ archive with the lzma Python module.""" ++ return _create(archive, compression, cmd, lzma.FORMAT_XZ, verbosity, filenames) +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/py_tarfile.py patool-upstream-1.12-patched/build/lib/patoolib/programs/py_tarfile.py +--- patool-upstream-1.12/build/lib/patoolib/programs/py_tarfile.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/py_tarfile.py 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,71 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2012-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the tarfile Python module.""" ++from .. import util, py_lzma ++import tarfile ++ ++READ_SIZE_BYTES = 1024*1024 ++ ++ ++def list_tar (archive, compression, cmd, verbosity, interactive): ++ """List a TAR archive with the tarfile Python module.""" ++ try: ++ with tarfile.open(archive) as tfile: ++ tfile.list(verbose=verbosity>1) ++ except Exception as err: ++ msg = "error listing %s: %s" % (archive, err) ++ raise util.PatoolError(msg) ++ return None ++ ++test_tar = list_tar ++ ++def extract_tar (archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract a TAR archive with the tarfile Python module.""" ++ try: ++ with tarfile.open(archive) as tfile: ++ tfile.extractall(path=outdir) ++ except Exception as err: ++ msg = "error extracting %s: %s" % (archive, err) ++ raise util.PatoolError(msg) ++ return None ++ ++ ++def create_tar (archive, compression, cmd, verbosity, interactive, filenames): ++ """Create a TAR archive with the tarfile Python module.""" ++ mode = get_tar_mode(compression) ++ try: ++ with tarfile.open(archive, mode) as tfile: ++ for filename in filenames: ++ tfile.add(filename) ++ except Exception as err: ++ msg = "error creating %s: %s" % (archive, err) ++ raise util.PatoolError(msg) ++ return None ++ ++ ++def get_tar_mode (compression): ++ """Determine tarfile open mode according to the given compression.""" ++ if compression == 'gzip': ++ return 'w:gz' ++ if compression == 'bzip2': ++ return 'w:bz2' ++ if compression == 'lzma' and py_lzma: ++ return 'w:xz' ++ if compression: ++ msg = 'pytarfile does not support %s for tar compression' ++ raise util.PatoolError(msg % compression) ++ # no compression ++ return 'w' +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/py_zipfile.py patool-upstream-1.12-patched/build/lib/patoolib/programs/py_zipfile.py +--- patool-upstream-1.12/build/lib/patoolib/programs/py_zipfile.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/py_zipfile.py 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,70 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2012-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the zipfile Python module.""" ++from __future__ import print_function ++from .. import util ++import zipfile ++import os ++ ++READ_SIZE_BYTES = 1024*1024 ++ ++ ++def list_zip(archive, compression, cmd, verbosity, interactive): ++ """List member of a ZIP archive with the zipfile Python module.""" ++ try: ++ with zipfile.ZipFile(archive, "r") as zfile: ++ for name in zfile.namelist(): ++ if verbosity >= 0: ++ print(name) ++ except Exception as err: ++ msg = "error listing %s: %s" % (archive, err) ++ raise util.PatoolError(msg) ++ return None ++ ++test_zip = list_zip ++ ++def extract_zip(archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract a ZIP archive with the zipfile Python module.""" ++ try: ++ with zipfile.ZipFile(archive) as zfile: ++ zfile.extractall(outdir) ++ except Exception as err: ++ msg = "error extracting %s: %s" % (archive, err) ++ raise util.PatoolError(msg) ++ return None ++ ++ ++def create_zip(archive, compression, cmd, verbosity, interactive, filenames): ++ """Create a ZIP archive with the zipfile Python module.""" ++ try: ++ with zipfile.ZipFile(archive, 'w') as zfile: ++ for filename in filenames: ++ if os.path.isdir(filename): ++ write_directory(zfile, filename) ++ else: ++ zfile.write(filename) ++ except Exception as err: ++ msg = "error creating %s: %s" % (archive, err) ++ raise util.PatoolError(msg) ++ return None ++ ++ ++def write_directory (zfile, directory): ++ """Write recursively all directories and filenames to zipfile instance.""" ++ for dirpath, dirnames, filenames in os.walk(directory): ++ zfile.write(dirpath) ++ for filename in filenames: ++ zfile.write(os.path.join(dirpath, filename)) +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/rar.py patool-upstream-1.12-patched/build/lib/patoolib/programs/rar.py +--- patool-upstream-1.12/build/lib/patoolib/programs/rar.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/rar.py 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,54 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the rar program.""" ++import os ++ ++def extract_rar (archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract a RAR archive.""" ++ cmdlist = [cmd, 'x'] ++ if not interactive: ++ cmdlist.extend(['-p-', '-y']) ++ cmdlist.extend(['--', os.path.abspath(archive)]) ++ return (cmdlist, {'cwd': outdir}) ++ ++def list_rar (archive, compression, cmd, verbosity, interactive): ++ """List a RAR archive.""" ++ cmdlist = [cmd] ++ if verbosity > 1: ++ cmdlist.append('v') ++ else: ++ cmdlist.append('l') ++ if not interactive: ++ cmdlist.extend(['-p-', '-y']) ++ cmdlist.extend(['--', archive]) ++ return cmdlist ++ ++def test_rar (archive, compression, cmd, verbosity, interactive): ++ """Test a RAR archive.""" ++ cmdlist = [cmd, 't'] ++ if not interactive: ++ cmdlist.extend(['-p-', '-y']) ++ cmdlist.extend(['--', archive]) ++ return cmdlist ++ ++def create_rar (archive, compression, cmd, verbosity, interactive, filenames): ++ """Create a RAR archive.""" ++ cmdlist = [cmd, 'a'] ++ if not interactive: ++ cmdlist.append('-y') ++ cmdlist.extend(['-r', '-m5', '--', archive]) ++ cmdlist.extend(filenames) ++ return cmdlist +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/rpm.py patool-upstream-1.12-patched/build/lib/patoolib/programs/rpm.py +--- patool-upstream-1.12/build/lib/patoolib/programs/rpm.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/rpm.py 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,32 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the rpm program.""" ++ ++def list_rpm (archive, compression, cmd, verbosity, interactive): ++ """List a RPM archive.""" ++ cmdlist = [cmd, '-q', '-l'] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ cmdlist.extend(['-p', '--', archive]) ++ return cmdlist ++ ++def test_rpm (archive, compression, cmd, verbosity, interactive): ++ """Test a RPM archive.""" ++ cmdlist = [cmd, 'V'] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ cmdlist.extend(['-p', '--', archive]) ++ return cmdlist +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/rpm2cpio.py patool-upstream-1.12-patched/build/lib/patoolib/programs/rpm2cpio.py +--- patool-upstream-1.12/build/lib/patoolib/programs/rpm2cpio.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/rpm2cpio.py 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,33 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the rpm2cpio program.""" ++import os ++from .. import util ++ ++def extract_rpm (archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract a RPM archive.""" ++ # also check cpio ++ cpio = util.find_program("cpio") ++ if not cpio: ++ raise util.PatoolError("cpio(1) is required for rpm2cpio extraction; please install it") ++ path = util.shell_quote(os.path.abspath(archive)) ++ cmdlist = [util.shell_quote(cmd), path, "|", util.shell_quote(cpio), ++ '--extract', '--make-directories', '--preserve-modification-time', ++ '--no-absolute-filenames', '--force-local', '--nonmatching', ++ r'"*\.\.*"'] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ return (cmdlist, {'cwd': outdir, 'shell': True}) +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/rzip.py patool-upstream-1.12-patched/build/lib/patoolib/programs/rzip.py +--- patool-upstream-1.12/build/lib/patoolib/programs/rzip.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/rzip.py 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,34 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the rzip program.""" ++from .. import util ++ ++def extract_rzip (archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract an RZIP archive.""" ++ cmdlist = [cmd, '-d', '-k'] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ outfile = util.get_single_outfile(outdir, archive) ++ cmdlist.extend(["-o", outfile, archive]) ++ return cmdlist ++ ++def create_rzip (archive, compression, cmd, verbosity, interactive, filenames): ++ """Create an RZIP archive.""" ++ cmdlist = [cmd, '-k', '-9', '-o', archive] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ cmdlist.extend(filenames) ++ return cmdlist +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/shar.py patool-upstream-1.12-patched/build/lib/patoolib/programs/shar.py +--- patool-upstream-1.12/build/lib/patoolib/programs/shar.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/shar.py 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,24 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2012-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the shar program.""" ++from .. import util ++ ++def create_shar (archive, compression, cmd, verbosity, interactive, filenames): ++ """Create a SHAR archive.""" ++ cmdlist = [util.shell_quote(cmd)] ++ cmdlist.extend([util.shell_quote(x) for x in filenames]) ++ cmdlist.extend(['>', util.shell_quote(archive)]) ++ return (cmdlist, {'shell': True}) +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/shorten.py patool-upstream-1.12-patched/build/lib/patoolib/programs/shorten.py +--- patool-upstream-1.12/build/lib/patoolib/programs/shorten.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/shorten.py 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,35 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2012-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the shorten program.""" ++from .. import util ++ ++def extract_shn (archive, compression, cmd, verbosity, interactive, outdir): ++ """Decompress a SHN archive to a WAV file.""" ++ cmdlist = [util.shell_quote(cmd)] ++ outfile = util.get_single_outfile(outdir, archive, extension=".wav") ++ cmdlist.extend(['-x', '-', util.shell_quote(outfile), '<', ++ util.shell_quote(archive)]) ++ return (cmdlist, {'shell': True}) ++ ++ ++def create_shn (archive, compression, cmd, verbosity, interactive, filenames): ++ """Compress a WAV file to a SHN archive.""" ++ if len(filenames) > 1: ++ raise util.PatoolError("multiple filenames for shorten not supported") ++ cmdlist = [util.shell_quote(cmd)] ++ cmdlist.extend(['-', util.shell_quote(archive), '<', ++ util.shell_quote(filenames[0])]) ++ return (cmdlist, {'shell': True}) +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/star.py patool-upstream-1.12-patched/build/lib/patoolib/programs/star.py +--- patool-upstream-1.12/build/lib/patoolib/programs/star.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/star.py 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,41 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the star program.""" ++from .tar import add_tar_opts as add_star_opts ++ ++def extract_tar (archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract a TAR archive.""" ++ cmdlist = [cmd, '-x'] ++ add_star_opts(cmdlist, compression, verbosity) ++ cmdlist.extend(['-C', outdir, 'file=%s' % archive]) ++ return cmdlist ++ ++def list_tar (archive, compression, cmd, verbosity, interactive): ++ """List a TAR archive.""" ++ cmdlist = [cmd, '-n'] ++ add_star_opts(cmdlist, compression, verbosity) ++ cmdlist.append("file=%s" % archive) ++ return cmdlist ++ ++test_tar = list_tar ++ ++def create_tar (archive, compression, cmd, verbosity, interactive, filenames): ++ """Create a TAR archive.""" ++ cmdlist = [cmd, '-c'] ++ add_star_opts(cmdlist, compression, verbosity) ++ cmdlist.append("file=%s" % archive) ++ cmdlist.extend(filenames) ++ return cmdlist +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/tar.py patool-upstream-1.12-patched/build/lib/patoolib/programs/tar.py +--- patool-upstream-1.12/build/lib/patoolib/programs/tar.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/tar.py 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,62 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the GNU tar program.""" ++import os ++ ++ ++def extract_tar (archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract a TAR archive.""" ++ cmdlist = [cmd, '--extract'] ++ add_tar_opts(cmdlist, compression, verbosity) ++ cmdlist.extend(["--file", archive, '--directory', outdir]) ++ return cmdlist ++ ++def list_tar (archive, compression, cmd, verbosity, interactive): ++ """List a TAR archive.""" ++ cmdlist = [cmd, '--list'] ++ add_tar_opts(cmdlist, compression, verbosity) ++ cmdlist.extend(["--file", archive]) ++ return cmdlist ++ ++test_tar = list_tar ++ ++def create_tar (archive, compression, cmd, verbosity, interactive, filenames): ++ """Create a TAR archive.""" ++ cmdlist = [cmd, '--create'] ++ add_tar_opts(cmdlist, compression, verbosity) ++ cmdlist.extend(["--file", archive, '--']) ++ cmdlist.extend(filenames) ++ return cmdlist ++ ++def add_tar_opts (cmdlist, compression, verbosity): ++ """Add tar options to cmdlist.""" ++ progname = os.path.basename(cmdlist[0]) ++ if compression == 'gzip': ++ cmdlist.append('-z') ++ elif compression == 'compress': ++ cmdlist.append('-Z') ++ elif compression == 'bzip2': ++ cmdlist.append('-j') ++ elif compression in ('lzma', 'xz') and progname == 'bsdtar': ++ cmdlist.append('--%s' % compression) ++ elif compression in ('lzma', 'xz', 'lzip'): ++ # use the compression name as program name since ++ # tar is picky which programs it can use ++ program = compression ++ # set compression program ++ cmdlist.extend(['--use-compress-program', program]) ++ if verbosity > 1: ++ cmdlist.append('--verbose') +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/unace.py patool-upstream-1.12-patched/build/lib/patoolib/programs/unace.py +--- patool-upstream-1.12/build/lib/patoolib/programs/unace.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/unace.py 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,38 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the unace program.""" ++ ++def extract_ace (archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract an ACE archive.""" ++ cmdlist = [cmd, 'x'] ++ if not outdir.endswith('/'): ++ outdir += '/' ++ cmdlist.extend([archive, outdir]) ++ return cmdlist ++ ++def list_ace (archive, compression, cmd, verbosity, interactive): ++ """List an ACE archive.""" ++ cmdlist = [cmd] ++ if verbosity > 1: ++ cmdlist.append('v') ++ else: ++ cmdlist.append('l') ++ cmdlist.append(archive) ++ return cmdlist ++ ++def test_ace (archive, compression, cmd, verbosity, interactive): ++ """Test an ACE archive.""" ++ return [cmd, 't', archive] +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/unadf.py patool-upstream-1.12-patched/build/lib/patoolib/programs/unadf.py +--- patool-upstream-1.12/build/lib/patoolib/programs/unadf.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/unadf.py 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,28 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2012-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the unadf program.""" ++ ++ ++def extract_adf (archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract an ADF archive.""" ++ return [cmd, archive, '-d', outdir] ++ ++ ++def list_adf (archive, compression, cmd, verbosity, interactive): ++ """List an ADF archive.""" ++ return [cmd, '-l', archive] ++ ++test_adf = list_adf +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/unalz.py patool-upstream-1.12-patched/build/lib/patoolib/programs/unalz.py +--- patool-upstream-1.12/build/lib/patoolib/programs/unalz.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/unalz.py 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,27 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the unalz program.""" ++ ++def extract_alzip (archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract a ALZIP archive.""" ++ return [cmd, '-d', outdir, archive] ++ ++ ++def list_alzip (archive, compression, cmd, verbosity, interactive): ++ """List a ALZIP archive.""" ++ return [cmd, '-l', archive] ++ ++test_alzip = list_alzip +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/uncompress.py patool-upstream-1.12-patched/build/lib/patoolib/programs/uncompress.py +--- patool-upstream-1.12/build/lib/patoolib/programs/uncompress.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/uncompress.py 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,28 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the uncompress.real program.""" ++from .. import util ++ ++ ++def extract_compress (archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract a compressed archive.""" ++ cmdlist = [util.shell_quote(cmd)] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ outfile = util.get_single_outfile(outdir, archive) ++ cmdlist.extend(['-c', util.shell_quote(archive), '>', ++ util.shell_quote(outfile)]) ++ return (cmdlist, {'shell': True}) +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/unrar.py patool-upstream-1.12-patched/build/lib/patoolib/programs/unrar.py +--- patool-upstream-1.12/build/lib/patoolib/programs/unrar.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/unrar.py 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,18 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the unrar program.""" ++ ++from .rar import extract_rar, list_rar, test_rar +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/unshar.py patool-upstream-1.12-patched/build/lib/patoolib/programs/unshar.py +--- patool-upstream-1.12/build/lib/patoolib/programs/unshar.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/unshar.py 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,22 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2012-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the unshar program.""" ++import os ++ ++def extract_shar (archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract a SHAR archive.""" ++ cmdlist = [cmd, os.path.abspath(archive)] ++ return (cmdlist, {'cwd': outdir}) +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/unzip.py patool-upstream-1.12-patched/build/lib/patoolib/programs/unzip.py +--- patool-upstream-1.12/build/lib/patoolib/programs/unzip.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/unzip.py 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,40 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the unzip program.""" ++ ++def extract_zip (archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract a ZIP archive.""" ++ cmdlist = [cmd] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ cmdlist.extend(['--', archive, '-d', outdir]) ++ return cmdlist ++ ++def list_zip (archive, compression, cmd, verbosity, interactive): ++ """List a ZIP archive.""" ++ cmdlist = [cmd, '-l'] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ cmdlist.extend(['--', archive]) ++ return cmdlist ++ ++def test_zip (archive, compression, cmd, verbosity, interactive): ++ """Test a ZIP archive.""" ++ cmdlist = [cmd, '-t'] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ cmdlist.extend(['--', archive]) ++ return cmdlist +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/xdms.py patool-upstream-1.12-patched/build/lib/patoolib/programs/xdms.py +--- patool-upstream-1.12/build/lib/patoolib/programs/xdms.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/xdms.py 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,47 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2011-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the xdms program.""" ++from .. import util ++ ++ ++def extract_dms (archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract a DMS archive.""" ++ check_archive_ext(archive) ++ cmdlist = [cmd, '-d', outdir] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ cmdlist.extend(['u', archive]) ++ return cmdlist ++ ++ ++def list_dms (archive, compression, cmd, verbosity, interactive): ++ """List a DMS archive.""" ++ check_archive_ext(archive) ++ return [cmd, 'v', archive] ++ ++ ++def test_dms (archive, compression, cmd, verbosity, interactive): ++ """Test a DMS archive.""" ++ check_archive_ext(archive) ++ return [cmd, 't', archive] ++ ++ ++def check_archive_ext (archive): ++ """xdms(1) cannot handle files with extensions other than '.dms'.""" ++ if not archive.lower().endswith(".dms"): ++ rest = archive[-4:] ++ msg = "xdms(1) archive file must end with `.dms', not `%s'" % rest ++ raise util.PatoolError(msg) +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/xz.py patool-upstream-1.12-patched/build/lib/patoolib/programs/xz.py +--- patool-upstream-1.12/build/lib/patoolib/programs/xz.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/xz.py 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,73 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the xz program.""" ++from . import extract_singlefile_standard, test_singlefile_standard ++from .. import util ++ ++ ++extract_xz = extract_singlefile_standard ++test_xz = test_singlefile_standard ++ ++def list_xz (archive, compression, cmd, verbosity, interactive): ++ """List a XZ archive.""" ++ cmdlist = [cmd] ++ cmdlist.append('-l') ++ if verbosity > 1: ++ cmdlist.append('-v') ++ cmdlist.append(archive) ++ return cmdlist ++ ++ ++def create_xz(archive, compression, cmd, verbosity, interactive, filenames): ++ """Create an XZ archive.""" ++ cmdlist = [util.shell_quote(cmd)] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ cmdlist.extend(['-c', '-9', '--']) ++ cmdlist.extend([util.shell_quote(x) for x in filenames]) ++ cmdlist.extend(['>', util.shell_quote(archive)]) ++ return (cmdlist, {'shell': True}) ++ ++ ++def extract_lzma(archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract an LZMA archive.""" ++ cmdlist = [util.shell_quote(cmd), '--format=lzma'] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ outfile = util.get_single_outfile(outdir, archive) ++ cmdlist.extend(['-c', '-d', '--', util.shell_quote(archive), '>', ++ util.shell_quote(outfile)]) ++ return (cmdlist, {'shell': True}) ++ ++ ++def test_lzma(archive, compression, cmd, verbosity, interactive): ++ """Test an LZMA archive.""" ++ cmdlist = [cmd, '--format=lzma'] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ cmdlist.extend(['--test', archive]) ++ return cmdlist ++ ++ ++def create_lzma(archive, compression, cmd, verbosity, interactive, filenames): ++ """Create an LZMA archive.""" ++ cmdlist = [util.shell_quote(cmd), '--format=lzma'] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ cmdlist.extend(['-c', '-9', '--']) ++ cmdlist.extend([util.shell_quote(x) for x in filenames]) ++ cmdlist.extend(['>', util.shell_quote(archive)]) ++ return (cmdlist, {'shell': True}) +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/zip.py patool-upstream-1.12-patched/build/lib/patoolib/programs/zip.py +--- patool-upstream-1.12/build/lib/patoolib/programs/zip.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/zip.py 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,33 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the zip program.""" ++ ++def create_zip (archive, compression, cmd, verbosity, interactive, filenames): ++ """Create a ZIP archive.""" ++ cmdlist = [cmd, '-r', '-9'] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ cmdlist.append(archive) ++ cmdlist.extend(filenames) ++ return cmdlist ++ ++def test_zip (archive, compression, cmd, verbosity, interactive): ++ """Test a ZIP archive.""" ++ cmdlist = [cmd, '--test'] ++ if verbosity > 1: ++ cmdlist.append('-v') ++ cmdlist.append(archive) ++ return cmdlist +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/zoo.py patool-upstream-1.12-patched/build/lib/patoolib/programs/zoo.py +--- patool-upstream-1.12/build/lib/patoolib/programs/zoo.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/zoo.py 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,41 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the zoo program.""" ++import os ++ ++def extract_zoo(archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract a ZOO archive.""" ++ # Since extracted files will be placed in the current directory, ++ # the cwd argument has to be the output directory. ++ cmdlist = [cmd, '-extract', os.path.abspath(archive)] ++ return (cmdlist, {'cwd': outdir}) ++ ++ ++def list_zoo(archive, compression, cmd, verbosity, interactive): ++ """List a ZOO archive.""" ++ return [cmd, '-list', archive] ++ ++ ++def test_zoo(archive, compression, cmd, verbosity, interactive): ++ """Test a ZOO archive.""" ++ return [cmd, '-test', archive] ++ ++ ++def create_zoo(archive, compression, cmd, verbosity, interactive, filenames): ++ """Create a ZOO archive.""" ++ cmdlist = [cmd, '-add', archive] ++ cmdlist.extend(filenames) ++ return cmdlist +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/zopfli.py patool-upstream-1.12-patched/build/lib/patoolib/programs/zopfli.py +--- patool-upstream-1.12/build/lib/patoolib/programs/zopfli.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/zopfli.py 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,25 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2013-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the zopfli program.""" ++from .. import util ++ ++def create_gzip(archive, compression, cmd, verbosity, interactive, filenames): ++ """Create a GZIP archive.""" ++ cmdlist = [util.shell_quote(cmd)] ++ cmdlist.extend(['-c', '--']) ++ cmdlist.extend([util.shell_quote(x) for x in filenames]) ++ cmdlist.extend(['>', util.shell_quote(archive)]) ++ return (cmdlist, {'shell': True}) +diff -Naur patool-upstream-1.12/build/lib/patoolib/programs/zpaq.py patool-upstream-1.12-patched/build/lib/patoolib/programs/zpaq.py +--- patool-upstream-1.12/build/lib/patoolib/programs/zpaq.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/programs/zpaq.py 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,39 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2014-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Archive commands for the zpaq program.""" ++import os ++ ++def extract_zpaq(archive, compression, cmd, verbosity, interactive, outdir): ++ """Extract a ZPAQ archive.""" ++ cmdlist = [cmd, 'x', os.path.abspath(archive)] ++ return (cmdlist, {'cwd': outdir}) ++ ++ ++def list_zpaq(archive, compression, cmd, verbosity, interactive): ++ """List a ZPAQ archive.""" ++ return [cmd, 'l', archive] ++ ++ ++def create_zpaq(archive, compression, cmd, verbosity, interactive, filenames): ++ """Create a ZPAQ archive.""" ++ cmdlist = [cmd, 'a', archive] ++ cmdlist.extend(filenames) ++ cmdlist.extend(['-method', '4']) ++ return cmdlist ++ ++# zpaq has no separate test mode, so use listing instead ++test_zpaq = list_zpaq ++ +diff -Naur patool-upstream-1.12/build/lib/patoolib/util.py patool-upstream-1.12-patched/build/lib/patoolib/util.py +--- patool-upstream-1.12/build/lib/patoolib/util.py 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/lib/patoolib/util.py 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,710 @@ ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2016 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++"""Utility functions.""" ++from __future__ import print_function ++import os ++import sys ++import shutil ++import subprocess ++import mimetypes ++import tempfile ++import time ++import traceback ++import locale ++from . import configuration, ArchiveMimetypes, ArchiveCompressions ++try: ++ from shutil import which ++except ImportError: ++ # from Python 3.3 ++ def which(cmd, mode=os.F_OK | os.X_OK, path=None): ++ """Given a command, mode, and a PATH string, return the path which ++ conforms to the given mode on the PATH, or None if there is no such ++ file. ++ `mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result ++ of os.environ.get("PATH"), or can be overridden with a custom search ++ path. ++ """ ++ def _access_check(fn, mode): ++ """Check that a given file can be accessed with the correct mode. ++ Additionally check that `fn` is not a directory, as on Windows ++ directories pass the os.access check.""" ++ return (os.path.exists(fn) and os.access(fn, mode) ++ and not os.path.isdir(fn)) ++ # If we're given a path with a directory part, look it up directly rather ++ # than referring to PATH directories. This includes checking relative to the ++ # current directory, e.g. ./script ++ if os.path.dirname(cmd): ++ if _access_check(cmd, mode): ++ return cmd ++ return None ++ path = (path or os.environ.get("PATH", os.defpath)).split(os.pathsep) ++ if sys.platform == "win32": ++ # The current directory takes precedence on Windows. ++ if not os.curdir in path: ++ path.insert(0, os.curdir) ++ # PATHEXT is necessary to check on Windows. ++ pathext = os.environ.get("PATHEXT", "").split(os.pathsep) ++ # See if the given file matches any of the expected path extensions. ++ # This will allow us to short circuit when given "python.exe". ++ # If it does match, only test that one, otherwise we have to try ++ # others. ++ if any(cmd.lower().endswith(ext.lower()) for ext in pathext): ++ files = [cmd] ++ else: ++ files = [cmd + ext for ext in pathext] ++ else: ++ # On other platforms you don't have things like PATHEXT to tell you ++ # what file suffixes are executable, so just pass on cmd as-is. ++ files = [cmd] ++ seen = set() ++ for dir in path: ++ normdir = os.path.normcase(dir) ++ if not normdir in seen: ++ seen.add(normdir) ++ for thefile in files: ++ name = os.path.join(dir, thefile) ++ if _access_check(name, mode): ++ return name ++ return None ++ ++ ++def system_search_path(): ++ """Get the list of directories on a system to search for executable programs. ++ It is either the PATH environment variable or if PATH is undefined the value ++ of os.defpath. ++ """ ++ return os.environ.get("PATH", os.defpath) ++ ++ ++# internal MIME database ++mimedb = None ++ ++def init_mimedb(): ++ """Initialize the internal MIME database.""" ++ global mimedb ++ try: ++ mimedb = mimetypes.MimeTypes(strict=False) ++ except Exception as msg: ++ log_error("could not initialize MIME database: %s" % msg) ++ return ++ add_mimedb_data(mimedb) ++ ++ ++def add_mimedb_data(mimedb): ++ """Add missing encodings and mimetypes to MIME database.""" ++ mimedb.encodings_map['.bz2'] = 'bzip2' ++ mimedb.encodings_map['.lzma'] = 'lzma' ++ mimedb.encodings_map['.xz'] = 'xz' ++ mimedb.encodings_map['.lz'] = 'lzip' ++ mimedb.suffix_map['.tbz2'] = '.tar.bz2' ++ add_mimetype(mimedb, 'application/x-lzop', '.lzo') ++ add_mimetype(mimedb, 'application/x-adf', '.adf') ++ add_mimetype(mimedb, 'application/x-arj', '.arj') ++ add_mimetype(mimedb, 'application/x-lzma', '.lzma') ++ add_mimetype(mimedb, 'application/x-xz', '.xz') ++ add_mimetype(mimedb, 'application/java-archive', '.jar') ++ add_mimetype(mimedb, 'application/x-rar', '.rar') ++ add_mimetype(mimedb, 'application/x-rar', '.cbr') ++ add_mimetype(mimedb, 'application/x-7z-compressed', '.7z') ++ add_mimetype(mimedb, 'application/x-7z-compressed', '.cb7') ++ add_mimetype(mimedb, 'application/x-cab', '.cab') ++ add_mimetype(mimedb, 'application/x-rpm', '.rpm') ++ add_mimetype(mimedb, 'application/x-debian-package', '.deb') ++ add_mimetype(mimedb, 'application/x-ace', '.ace') ++ add_mimetype(mimedb, 'application/x-ace', '.cba') ++ add_mimetype(mimedb, 'application/x-archive', '.a') ++ add_mimetype(mimedb, 'application/x-alzip', '.alz') ++ add_mimetype(mimedb, 'application/x-arc', '.arc') ++ add_mimetype(mimedb, 'application/x-lrzip', '.lrz') ++ add_mimetype(mimedb, 'application/x-lha', '.lha') ++ add_mimetype(mimedb, 'application/x-lzh', '.lzh') ++ add_mimetype(mimedb, 'application/x-rzip', '.rz') ++ add_mimetype(mimedb, 'application/x-zoo', '.zoo') ++ add_mimetype(mimedb, 'application/x-dms', '.dms') ++ add_mimetype(mimedb, 'application/x-zip-compressed', '.crx') ++ add_mimetype(mimedb, 'application/x-shar', '.shar') ++ add_mimetype(mimedb, 'application/x-tar', '.cbt') ++ add_mimetype(mimedb, 'application/x-vhd', '.vhd') ++ add_mimetype(mimedb, 'audio/x-ape', '.ape') ++ add_mimetype(mimedb, 'audio/x-shn', '.shn') ++ add_mimetype(mimedb, 'audio/flac', '.flac') ++ add_mimetype(mimedb, 'application/x-chm', '.chm') ++ add_mimetype(mimedb, 'application/x-iso9660-image', '.iso') ++ add_mimetype(mimedb, 'application/zip', '.cbz') ++ add_mimetype(mimedb, 'application/zip', '.epub') ++ add_mimetype(mimedb, 'application/zip', '.apk') ++ add_mimetype(mimedb, 'application/zpaq', '.zpaq') ++ ++ ++def add_mimetype(mimedb, mimetype, extension): ++ """Add or replace a mimetype to be used with the given extension.""" ++ # If extension is already a common type, strict=True must be used. ++ strict = extension in mimedb.types_map[True] ++ mimedb.add_type(mimetype, extension, strict=strict) ++ ++ ++class PatoolError (Exception): ++ """Raised when errors occur.""" ++ pass ++ ++ ++class memoized (object): ++ """Decorator that caches a function's return value each time it is called. ++ If called later with the same arguments, the cached value is returned, and ++ not re-evaluated.""" ++ ++ def __init__(self, func): ++ """Set func and init cache.""" ++ self.func = func ++ self.cache = {} ++ ++ def __call__(self, *args): ++ """Try to find result for function arguments in local cache or ++ execute the function and fill the cache with the result.""" ++ try: ++ return self.cache[args] ++ except KeyError: ++ self.cache[args] = value = self.func(*args) ++ return value ++ except TypeError: ++ # uncachable -- for instance, passing a list as an argument. ++ # Better to not cache than to blow up entirely. ++ return self.func(*args) ++ ++ def __repr__(self): ++ """Return the function's docstring.""" ++ return self.func.__doc__ ++ ++ ++def backtick (cmd, encoding='utf-8'): ++ """Return decoded output from command.""" ++ data = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0] ++ return data.decode(encoding) ++ ++ ++def run (cmd, verbosity=0, **kwargs): ++ """Run command without error checking. ++ @return: command return code""" ++ # Note that shell_quote_nt() result is not suitable for copy-paste ++ # (especially on Unix systems), but it looks nicer than shell_quote(). ++ if verbosity >= 0: ++ log_info("running %s" % " ".join(map(shell_quote_nt, cmd))) ++ if kwargs: ++ if verbosity >= 0: ++ log_info(" with %s" % ", ".join("%s=%s" % (k, shell_quote(str(v)))\ ++ for k, v in kwargs.items())) ++ if kwargs.get("shell"): ++ # for shell calls the command must be a string ++ cmd = " ".join(cmd) ++ if verbosity < 1: ++ # hide command output on stdout ++ with open(os.devnull, 'wb') as devnull: ++ kwargs['stdout'] = devnull ++ res = subprocess.call(cmd, **kwargs) ++ else: ++ res = subprocess.call(cmd, **kwargs) ++ return res ++ ++ ++def run_checked (cmd, ret_ok=(0,), **kwargs): ++ """Run command and raise PatoolError on error.""" ++ retcode = run(cmd, **kwargs) ++ if retcode not in ret_ok: ++ msg = "Command `%s' returned non-zero exit status %d" % (cmd, retcode) ++ raise PatoolError(msg) ++ return retcode ++ ++ ++@memoized ++def guess_mime (filename): ++ """Guess the MIME type of given filename using file(1) and if that ++ fails by looking at the filename extension with the Python mimetypes ++ module. ++ ++ The result of this function is cached. ++ """ ++ mime, encoding = guess_mime_file(filename) ++ if mime is None: ++ mime, encoding = guess_mime_mimedb(filename) ++ assert mime is not None or encoding is None ++ return mime, encoding ++ ++ ++Encoding2Mime = { ++ 'gzip': "application/gzip", ++ 'bzip2': "application/x-bzip2", ++ 'compress': "application/x-compress", ++ 'lzma': "application/x-lzma", ++ 'lzip': "application/x-lzip", ++ 'xz': "application/x-xz", ++} ++Mime2Encoding = dict([(_val, _key) for _key, _val in Encoding2Mime.items()]) ++# libmagic before version 5.14 identified .gz files as application/x-gzip ++Mime2Encoding['application/x-gzip'] = 'gzip' ++ ++ ++def guess_mime_mimedb (filename): ++ """Guess MIME type from given filename. ++ @return: tuple (mime, encoding) ++ """ ++ mime, encoding = None, None ++ if mimedb is not None: ++ mime, encoding = mimedb.guess_type(filename, strict=False) ++ if mime not in ArchiveMimetypes and encoding in ArchiveCompressions: ++ # Files like 't.txt.gz' are recognized with encoding as format, and ++ # an unsupported mime-type like 'text/plain'. Fix this. ++ mime = Encoding2Mime[encoding] ++ encoding = None ++ return mime, encoding ++ ++ ++def guess_mime_file (filename): ++ """Determine MIME type of filename with file(1): ++ (a) using `file --mime` ++ (b) using `file` and look the result string ++ @return: tuple (mime, encoding) ++ """ ++ mime, encoding = None, None ++ base, ext = os.path.splitext(filename) ++ if ext.lower() in ('.alz',): ++ # let mimedb recognize these extensions ++ return mime, encoding ++ if os.path.isfile(filename): ++ file_prog = find_program("file") ++ if file_prog: ++ mime, encoding = guess_mime_file_mime(file_prog, filename) ++ if mime is None: ++ mime = guess_mime_file_text(file_prog, filename) ++ encoding = None ++ if mime in Mime2Encoding: ++ # try to look inside compressed archives ++ cmd = [file_prog, "--brief", "--mime", "--uncompress", filename] ++ try: ++ outparts = backtick(cmd).strip().split(";") ++ except OSError: ++ # ignore errors, as file(1) is only a fallback ++ return mime, encoding ++ mime2 = outparts[0].split(" ", 1)[0] ++ # Some file(1) implementations return an empty or unknown mime type ++ # when the uncompressor program is not installed, other ++ # implementation return the original file type. ++ # The following detects both cases. ++ if (mime2 in ('application/x-empty', 'application/octet-stream') or ++ mime2 in Mime2Encoding): ++ # The uncompressor program file(1) uses is not installed ++ # or is not able to uncompress. ++ # Try to get mime information from the file extension. ++ mime2, encoding2 = guess_mime_mimedb(filename) ++ if mime2 in ArchiveMimetypes: ++ mime = mime2 ++ encoding = encoding2 ++ elif mime2 in ArchiveMimetypes: ++ mime = mime2 ++ encoding = get_file_mime_encoding(outparts) ++ return mime, encoding ++ ++ ++def guess_mime_file_mime (file_prog, filename): ++ """Determine MIME type of filename with file(1) and --mime option. ++ @return: tuple (mime, encoding) ++ """ ++ mime, encoding = None, None ++ cmd = [file_prog, "--brief", "--mime-type", filename] ++ try: ++ mime = backtick(cmd).strip() ++ except OSError: ++ # ignore errors, as file(1) is only a fallback ++ pass ++ if mime not in ArchiveMimetypes: ++ mime, encoding = None, None ++ return mime, encoding ++ ++ ++def get_file_mime_encoding (parts): ++ """Get encoding value from splitted output of file --mime --uncompress.""" ++ for part in parts: ++ for subpart in part.split(" "): ++ if subpart.startswith("compressed-encoding="): ++ mime = subpart.split("=")[1].strip() ++ return Mime2Encoding.get(mime) ++ return None ++ ++ ++# Match file(1) output text to mime types ++FileText2Mime = { ++ "7-zip archive data": "application/x-7z-compressed", ++ "ACE archive data": "application/x-ace", ++ "Amiga DOS disk": "application/x-adf", ++ "ARJ archive data": "application/x-arj", ++ "bzip2 compressed data": "application/x-bzip2", ++ "cpio archive": "application/x-cpio", ++ "ASCII cpio archive": "application/x-cpio", ++ "Debian binary package": "application/x-debian-package", ++ "gzip compressed data": "application/x-gzip", ++ "LZMA compressed data": "application/x-lzma", ++ "LRZIP compressed data": "application/x-lrzip", ++ "lzop compressed data": "application/x-lzop", ++ "Microsoft Cabinet archive data": "application/vnd.ms-cab-compressed", ++ "RAR archive data": "application/x-rar", ++ "RPM ": "application/x-redhat-package-manager", ++ "POSIX tar archive": "application/x-tar", ++ "xz compressed data": "application/x-xz", ++ "Zip archive data": "application/zip", ++ "compress'd data": "application/x-compress", ++ "lzip compressed data": "application/x-lzip", ++ "rzip compressed data": "application/x-rzip", ++ "current ar archive": "application/x-archive", ++ "LHa ": "application/x-lha", ++ "ARC archive data": "application/x-arc", ++ "Zoo archive data": "application/x-zoo", ++ "DMS archive data": "application/x-dms", ++ "Monkey's Audio": "audio/x-ape", ++ "FLAC audio bitstream data": "audio/flac", ++ "MS Windows HtmlHelp Data": "application/x-chm", ++ "ZPAQ stream": "application/zpaq", ++} ++ ++def guess_mime_file_text (file_prog, filename): ++ """Determine MIME type of filename with file(1).""" ++ cmd = [file_prog, "--brief", filename] ++ try: ++ output = backtick(cmd).strip() ++ except OSError: ++ # ignore errors, as file(1) is only a fallback ++ return None ++ # match output against known strings ++ for matcher, mime in FileText2Mime.items(): ++ if output.startswith(matcher) and mime in ArchiveMimetypes: ++ return mime ++ return None ++ ++ ++def check_existing_filename (filename, onlyfiles=True): ++ """Ensure that given filename is a valid, existing file.""" ++ if not os.path.exists(filename): ++ raise PatoolError("file `%s' was not found" % filename) ++ if not os.access(filename, os.R_OK): ++ raise PatoolError("file `%s' is not readable" % filename) ++ if onlyfiles and not os.path.isfile(filename): ++ raise PatoolError("`%s' is not a file" % filename) ++ ++ ++def check_writable_filename(filename): ++ """Ensure that the given filename is writable.""" ++ if not os.access(filename, os.W_OK): ++ raise PatoolError("file `%s' is not writable" % filename) ++ ++ ++def check_new_filename (filename): ++ """Check that filename does not already exist.""" ++ if os.path.exists(filename): ++ raise PatoolError("cannot overwrite existing file `%s'" % filename) ++ ++ ++def check_archive_filelist (filenames): ++ """Check that file list is not empty and contains only existing files.""" ++ if not filenames: ++ raise PatoolError("cannot create archive with empty filelist") ++ for filename in filenames: ++ check_existing_filename(filename, onlyfiles=False) ++ ++ ++def set_mode (filename, flags): ++ """Set mode flags for given filename if not already set.""" ++ try: ++ mode = os.lstat(filename).st_mode ++ except OSError: ++ # ignore ++ return ++ if not (mode & flags): ++ try: ++ os.chmod(filename, flags | mode) ++ except OSError as msg: ++ log_error("could not set mode flags for `%s': %s" % (filename, msg)) ++ ++ ++def get_filesize(filename): ++ """Return file size in Bytes, or -1 on error.""" ++ return os.path.getsize(filename) ++ ++ ++def strsize(b, grouping=True): ++ """Return human representation of bytes b. A negative number of bytes ++ raises a value error.""" ++ if b < 0: ++ raise ValueError("Invalid negative byte number") ++ if b < 1024: ++ return u"%sB" % locale.format("%d", b, grouping) ++ if b < 1024 * 10: ++ return u"%sKB" % locale.format("%d", (b // 1024), grouping) ++ if b < 1024 * 1024: ++ return u"%sKB" % locale.format("%.2f", (float(b) / 1024), grouping) ++ if b < 1024 * 1024 * 10: ++ return u"%sMB" % locale.format("%.2f", (float(b) / (1024*1024)), grouping) ++ if b < 1024 * 1024 * 1024: ++ return u"%sMB" % locale.format("%.1f", (float(b) / (1024*1024)), grouping) ++ if b < 1024 * 1024 * 1024 * 10: ++ return u"%sGB" % locale.format("%.2f", (float(b) / (1024*1024*1024)), grouping) ++ return u"%sGB" % locale.format("%.1f", (float(b) / (1024*1024*1024)), grouping) ++ ++ ++def tmpdir (dir=None): ++ """Return a temporary directory for extraction.""" ++ return tempfile.mkdtemp(suffix='', prefix='Unpack_', dir=dir) ++ ++ ++def tmpfile (dir=None, prefix="temp", suffix=None): ++ """Return a temporary file.""" ++ return tempfile.mkstemp(suffix=suffix, prefix=prefix, dir=dir)[1] ++ ++ ++def shell_quote (value): ++ """Quote all shell metacharacters in given string value with strong ++ (ie. single) quotes, handling the single quote especially.""" ++ if os.name == 'nt': ++ return shell_quote_nt(value) ++ return "'%s'" % value.replace("'", r"'\''") ++ ++ ++def shell_quote_nt (value): ++ """Quote argument for Windows system. Modeled after distutils ++ _nt_quote_args() function.""" ++ if " " in value: ++ return '"%s"' % value ++ return value ++ ++ ++def stripext (filename): ++ """Return the basename without extension of given filename.""" ++ return os.path.splitext(os.path.basename(filename))[0] ++ ++ ++def get_single_outfile (directory, archive, extension=""): ++ """Get output filename if archive is in a single file format like gzip.""" ++ outfile = os.path.join(directory, stripext(archive)) ++ if os.path.exists(outfile + extension): ++ # prevent overwriting existing files ++ i = 1 ++ newfile = "%s%d" % (outfile, i) ++ while os.path.exists(newfile + extension): ++ newfile = "%s%d" % (outfile, i) ++ i += 1 ++ outfile = newfile ++ return outfile + extension ++ ++ ++def log_error (msg, out=sys.stderr): ++ """Print error message to stderr (or any other given output).""" ++ print("patool error:", msg, file=out) ++ ++ ++def log_info (msg, out=sys.stdout): ++ """Print info message to stdout (or any other given output).""" ++ print("patool:", msg, file=out) ++ ++ ++def log_internal_error(out=sys.stderr, etype=None, evalue=None, tb=None): ++ """Print internal error message (output defaults to stderr).""" ++ print(os.linesep, file=out) ++ print("""********** Oops, I did it again. ************* ++ ++You have found an internal error in %(app)s. Please write a bug report ++at %(url)s and include at least the information below: ++ ++Not disclosing some of the information below due to privacy reasons is ok. ++I will try to help you nonetheless, but you have to give me something ++I can work with ;) . ++""" % dict(app=configuration.AppName, url=configuration.SupportUrl), file=out) ++ if etype is None: ++ etype = sys.exc_info()[0] ++ if evalue is None: ++ evalue = sys.exc_info()[1] ++ print(etype, evalue, file=out) ++ if tb is None: ++ tb = sys.exc_info()[2] ++ traceback.print_exception(etype, evalue, tb, None, out) ++ print_app_info(out=out) ++ print_locale_info(out=out) ++ print(os.linesep, ++ "******** %s internal error, over and out ********" % configuration.AppName, file=out) ++ ++def print_env_info(key, out=sys.stderr): ++ """If given environment key is defined, print it out.""" ++ value = os.getenv(key) ++ if value is not None: ++ print(key, "=", repr(value), file=out) ++ ++ ++def print_locale_info(out=sys.stderr): ++ """Print locale info.""" ++ for key in ("LANGUAGE", "LC_ALL", "LC_CTYPE", "LANG"): ++ print_env_info(key, out=out) ++ ++ ++def print_app_info(out=sys.stderr): ++ """Print system and application info (output defaults to stderr).""" ++ print("System info:", file=out) ++ print(configuration.App, file=out) ++ print("Python %(version)s on %(platform)s" % ++ {"version": sys.version, "platform": sys.platform}, file=out) ++ stime = strtime(time.time()) ++ print("Local time:", stime, file=out) ++ print("sys.argv", sys.argv, file=out) ++ ++ ++def strtime(t): ++ """Return ISO 8601 formatted time.""" ++ return time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(t)) + \ ++ strtimezone() ++ ++ ++def strtimezone(): ++ """Return timezone info, %z on some platforms, but not supported on all. ++ """ ++ if time.daylight: ++ zone = time.altzone ++ else: ++ zone = time.timezone ++ return "%+04d" % (-zone//3600) ++ ++ ++def p7zip_supports_rar(): ++ """Determine if the RAR codec is installed for 7z program.""" ++ if os.name == 'nt': ++ # Assume RAR support is compiled into the binary. ++ return True ++ # the subdirectory and codec name ++ codecname = 'p7zip/Codecs/Rar29.so' ++ # search canonical user library dirs ++ for libdir in ('/usr/lib', '/usr/local/lib', '/usr/lib64', '/usr/local/lib64', '/usr/lib/i386-linux-gnu', '/usr/lib/x86_64-linux-gnu'): ++ fname = os.path.join(libdir, codecname) ++ if os.path.exists(fname): ++ return True ++ return False ++ ++ ++@memoized ++def find_program (program): ++ """Look for program in environment PATH variable.""" ++ if os.name == 'nt': ++ # Add some well-known archiver programs to the search path ++ path = os.environ['PATH'] ++ path = append_to_path(path, get_nt_7z_dir()) ++ path = append_to_path(path, get_nt_mac_dir()) ++ path = append_to_path(path, get_nt_winrar_dir()) ++ else: ++ # use default path ++ path = None ++ return which(program, path=path) ++ ++ ++def append_to_path (path, directory): ++ """Add a directory to the PATH environment variable, if it is a valid ++ directory.""" ++ if not os.path.isdir(directory) or directory in path: ++ return path ++ if not path.endswith(os.pathsep): ++ path += os.pathsep ++ return path + directory ++ ++ ++def get_nt_7z_dir (): ++ """Return 7-Zip directory from registry, or an empty string.""" ++ # Python 3.x renamed the _winreg module to winreg ++ try: ++ import _winreg as winreg ++ except ImportError: ++ import winreg ++ try: ++ key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\7-Zip") ++ try: ++ return winreg.QueryValueEx(key, "Path")[0] ++ finally: ++ winreg.CloseKey(key) ++ except WindowsError: ++ return "" ++ ++ ++def get_nt_program_dir (): ++ """Return the Windows program files directory.""" ++ progvar = "%ProgramFiles%" ++ return os.path.expandvars(progvar) ++ ++ ++def get_nt_mac_dir (): ++ """Return Monkey Audio Compressor (MAC) directory.""" ++ return os.path.join(get_nt_program_dir(), "Monkey's Audio") ++ ++ ++def get_nt_winrar_dir(): ++ """Return WinRAR directory.""" ++ return os.path.join(get_nt_program_dir(), "WinRAR") ++ ++ ++def strlist_with_or (alist): ++ """Return comma separated string, and last entry appended with ' or '.""" ++ if len(alist) > 1: ++ return "%s or %s" % (", ".join(alist[:-1]), alist[-1]) ++ return ", ".join(alist) ++ ++ ++def is_same_file (filename1, filename2): ++ """Check if filename1 and filename2 point to the same file object. ++ There can be false negatives, ie. the result is False, but it is ++ the same file anyway. Reason is that network filesystems can create ++ different paths to the same physical file. ++ """ ++ if filename1 == filename2: ++ return True ++ if os.name == 'posix': ++ return os.path.samefile(filename1, filename2) ++ return is_same_filename(filename1, filename2) ++ ++ ++def is_same_filename (filename1, filename2): ++ """Check if filename1 and filename2 are the same filename.""" ++ return os.path.realpath(filename1) == os.path.realpath(filename2) ++ ++ ++def link_or_copy(src, dst, verbosity=0): ++ """Try to make a hard link from src to dst and if that fails ++ copy the file. Hard links save some disk space and linking ++ should fail fast since no copying is involved. ++ """ ++ if verbosity > 0: ++ log_info("Copying %s -> %s" % (src, dst)) ++ try: ++ os.link(src, dst) ++ except (AttributeError, OSError): ++ try: ++ shutil.copy(src, dst) ++ except OSError as msg: ++ raise PatoolError(msg) ++ ++ ++def chdir(directory): ++ """Remember and return current directory before calling os.chdir(). ++ If the current directory could not be determined, return None. ++ """ ++ try: ++ olddir = os.getcwd() ++ except OSError: ++ olddir = None ++ os.chdir(directory) ++ return olddir ++ ++ ++init_mimedb() +diff -Naur patool-upstream-1.12/build/scripts-3.10/patool patool-upstream-1.12-patched/build/scripts-3.10/patool +--- patool-upstream-1.12/build/scripts-3.10/patool 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/build/scripts-3.10/patool 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,224 @@ ++#!/usr/bin/python3 ++# -*- coding: utf-8 -*- ++# Copyright (C) 2010-2015 Bastian Kleineidam ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++""" ++patool [global-options] {extract|list|create|diff|search|formats} [sub-command-options] ++""" ++from __future__ import print_function ++import sys ++import argparse ++import pydoc ++import patoolib ++from patoolib.util import log_error, log_internal_error, PatoolError ++from patoolib.configuration import App ++ ++def run_extract(args): ++ """Extract files from archive(s).""" ++ res = 0 ++ for archive in args.archive: ++ try: ++ patoolib.extract_archive(archive, verbosity=args.verbosity, interactive=args.interactive, outdir=args.outdir) ++ except PatoolError as msg: ++ log_error("error extracting %s: %s" % (archive, msg)) ++ res += 1 ++ return res ++ ++ ++def run_list(args): ++ """List files in archive(s).""" ++ res = 0 ++ for archive in args.archive: ++ try: ++ # increase default verbosity since the listing output should be visible ++ verbosity = args.verbosity + 1 ++ patoolib.list_archive(archive, verbosity=verbosity, interactive=args.interactive) ++ except PatoolError as msg: ++ log_error("error listing %s: %s" % (archive, msg)) ++ res += 1 ++ return res ++ ++ ++def run_test(args): ++ """Test files in archive(s).""" ++ res = 0 ++ for archive in args.archive: ++ try: ++ patoolib.test_archive(archive, verbosity=args.verbosity, interactive=args.interactive) ++ except PatoolError as msg: ++ log_error("error testing %s: %s" % (archive, msg)) ++ res += 1 ++ return res ++ ++ ++def run_create(args): ++ """Create an archive from given files.""" ++ res = 0 ++ try: ++ patoolib.create_archive(args.archive, args.filename, verbosity=args.verbosity, interactive=args.interactive) ++ except PatoolError as msg: ++ log_error("error creating %s: %s" % (args.archive, msg)) ++ res = 1 ++ return res ++ ++ ++def run_diff(args): ++ """Show differences between two archives.""" ++ try: ++ res = patoolib.diff_archives(args.archive1, args.archive2, verbosity=args.verbosity, interactive=args.interactive) ++ except PatoolError as msg: ++ log_error("error showing differences between %s and %s: %s" % (args.archive1, args.archive2, msg)) ++ res = 2 ++ return res ++ ++ ++def run_search(args): ++ """Search for pattern in given archive.""" ++ try: ++ res = patoolib.search_archive(args.pattern, args.archive, verbosity=args.verbosity, interactive=args.interactive) ++ except PatoolError as msg: ++ log_error("error searching %s: %s" % (args.archive, msg)) ++ res = 2 ++ return res ++ ++ ++def run_repack(args): ++ """Repackage one archive in another format.""" ++ res = 0 ++ try: ++ patoolib.repack_archive(args.archive_src, args.archive_dst, verbosity=args.verbosity, interactive=args.interactive) ++ except PatoolError as msg: ++ log_error("error repacking %s: %s" % (args.archive_src, msg)) ++ res = 1 ++ return res ++ ++ ++def run_recompress(args): ++ """Recompress an archive to smaller size.""" ++ res = 0 ++ try: ++ patoolib.recompress_archive(args.archive, verbosity=args.verbosity, interactive=args.interactive) ++ except PatoolError as msg: ++ log_error("error recompressing %s: %s" % (args.archive, msg)) ++ res = 1 ++ return res ++ ++ ++def run_formats (args): ++ """List supported and available archive formats.""" ++ patoolib.list_formats() ++ return 0 ++ ++ ++class ArgumentParser(argparse.ArgumentParser): ++ """Custom argument parser.""" ++ ++ def print_help(self, file=None): ++ """Paginate help message on TTYs.""" ++ msg = self.format_help() ++ if file is None: ++ file = sys.stdout ++ if hasattr(file, "isatty") and file.isatty(): ++ pydoc.pager(msg) ++ else: ++ print(msg, file=file) ++ ++Examples = """\ ++EXAMPLES ++ patool extract archive.zip otherarchive.rar ++ patool --verbose test dist.tar.gz ++ patool list package.deb ++ patool --verbose create myfiles.zip file1.txt dir/ ++ patool diff release1.0.tar.xz release2.0.zip ++ patool search "def urlopen" python-3.3.tar.gz ++ patool repack linux-2.6.33.tar.gz linux-2.6.33.tar.bz2 ++ patool recompress images.zip ++""" ++ ++Version = """\ ++VERSION ++ %s ++""" % App ++ ++def create_argparser(): ++ """Construct and return an argument parser.""" ++ epilog = Examples + "\n" + Version ++ parser = ArgumentParser(description="An archive file manager.", ++ epilog=epilog, formatter_class=argparse.RawDescriptionHelpFormatter) ++ parser.add_argument('--verbose', '-v', action='count', default=0, dest='verbosity', help="verbose operation; can be given multiple times") ++ parser.add_argument('--non-interactive', dest='interactive', default=True, action='store_false', ++ help="don't query for user input (ie. passwords or when overwriting duplicate files); use with care since overwriting files or ignoring passwords could be unintended") ++ subparsers = parser.add_subparsers(help='the archive command; type "patool COMMAND -h" for command-specific help', dest='command') ++ # extract ++ parser_extract = subparsers.add_parser('extract', help='extract one or more archives') ++ parser_extract.add_argument('--outdir', help="output directory to extract to") ++ parser_extract.add_argument('archive', nargs='+', help="an archive file") ++ # list ++ parser_list = subparsers.add_parser('list', help='list members or one or more archives') ++ parser_list.add_argument('archive', nargs='+', help="an archive file") ++ # create ++ parser_create = subparsers.add_parser('create', help='create an archive') ++ parser_create.add_argument('archive', help="the archive file; the file extension determines the archive program") ++ parser_create.add_argument('filename', nargs='+', help="a file or directory to add to the archive; note that some archive programs do not support directories") ++ # test ++ parser_test = subparsers.add_parser('test', help='test an archive') ++ parser_test.add_argument('archive', nargs='+', help='an archive file') ++ # repack ++ parser_repack = subparsers.add_parser('repack', help='repack an archive to a different format') ++ parser_repack.add_argument('archive_src', help='source archive file') ++ parser_repack.add_argument('archive_dst', help='target archive file') ++ # recompress ++ parser_recompress = subparsers.add_parser('recompress', help='recompress an archive to smaller size') ++ parser_recompress.add_argument('archive', help='an archive file') ++ # diff ++ parser_diff = subparsers.add_parser('diff', help='show differences between two archives') ++ parser_diff.add_argument('archive1', help='the first archive file') ++ parser_diff.add_argument('archive2', help='the second archive file') ++ # search ++ parser_search = subparsers.add_parser('search', help="search contents of archive members") ++ parser_search.add_argument('pattern', help='the grep(1) compatible search pattern') ++ parser_search.add_argument('archive', help='the archive file') ++ # formats ++ subparsers.add_parser('formats', help="show supported archive formats") ++ # optional bash completion ++ try: ++ import argcomplete ++ argcomplete.autocomplete(parser) ++ except ImportError: ++ pass ++ return parser ++ ++ ++def main(): ++ """Parse options and execute commands.""" ++ try: ++ argparser = create_argparser() ++ args = argparser.parse_args() ++ if args.command is None: ++ # Python 3.3.1 under linux allows an empty command somehow ++ argparser.error("too few arguments") ++ # run subcommand function ++ res = globals()["run_%s" % args.command](args) ++ except KeyboardInterrupt: ++ log_error("aborted") ++ res = 1 ++ except Exception: ++ log_internal_error() ++ res = 2 ++ return res ++ ++ ++if __name__ == '__main__': ++ sys.exit(main()) +diff -Naur patool-upstream-1.12/patoolib/__pycache__/__init__.cpython-310.pyc patool-upstream-1.12-patched/patoolib/__pycache__/__init__.cpython-310.pyc +--- patool-upstream-1.12/patoolib/__pycache__/__init__.cpython-310.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/patoolib/__pycache__/__init__.cpython-310.pyc 2021-12-02 22:23:10.579832339 +0100 +@@ -0,0 +1,144 @@ ++o ++MVl @sddlmZddlZeedrejdkredddlZddlZddlZddl Z ddl ++m Z m Z gdZd Zd ++Zd Zid d ddddddddddddddddddd d!d"d#d$dd%d&d'd(d)d*d+d,id-d.d/d d0d1d2d3d4d5d6d7d8d9d:d;dd?d@d?dAdBdCdDdEdFdGdHdIdJddKddLdMdNdOdPZzddlZdQZWn eydRZYnwiddSdSdSdTddUdUdUdTddVdVdVdTdMdWdWdXdWdYdddZidd[d\d\d\d]d#d^d_d`d_dadbddcdddcdcded&dfdgdhdOdidididXdjdFddkiddldmdmdndodpd dqdrdsdtd1dudvdudwdxd9dydzd{d7d|dXd|d|dxd;d}dXd}d}dxid(d~ddddxdddiddddddd!ddudududd*dddddxd?ddddd,ddddd.ddddd3ddid5dedddedxdBddXdddDddddNddXdddHdudududdJdeedtdKddidLddiZdddddddZddlmZddZddZdddZddZddZddZddZ dddZ!ddZ"ddZ#ddZ$ddZ%  dddZ& dddZ' ddd„Z(ddĄZ)ddƄZ*dddȄZ+dddʄZ,ddd̄Z-ddd΄Z.dddЄZ/ddd҄Z0dddԄZ1dddքZ2ddd؄Z3dddڄZ4ddd܄Z5dddބZ6dS))print_functionN version_info)rfinalrz*This program requires Python 2.7 or later.)AppVersion) list_formats list_archiveextract_archive test_archivecreate_archive diff_archivessearch_archiverepack_archiverecompress_archive)listextracttestcreate)"7zaceadfalzipapeararcarjbzip2cabchmcompresscpiodebdmsflacgzipisolrziplzhlziplzmalzoprarrpmrzipsharshntarvhdxzzipzoozpaq)rr"r'r+r,r5zapplication/gzipr'zapplication/java-archiver6zapplication/rarr.z!application/vnd.ms-cab-compressedr zapplication/x-7z-compressedrzapplication/x-acerzapplication/x-adfrzapplication/x-alziprzapplication/x-archiverzapplication/x-arcrzapplication/x-arjrzapplication/x-bzip2rzapplication/x-cabzapplication/x-chmr!zapplication/x-compressr"zapplication/x-cpior#zapplication/x-debian-packager$zapplication/x-dmsr%zapplication/x-gzipzapplication/x-iso9660-imager(zapplication/x-lzopr-zapplication/x-lzmar,zapplication/x-lzipr+zapplication/x-lhar*zapplication/x-lrzipr)zapplication/x-lzhzapplication/x-rarz$application/x-redhat-package-managerr/zapplication/x-rpmzapplication/x-rzipr0zapplication/x-sharr1zapplication/x-tarr3zapplication/x-vhdr4zapplication/x-xzr5r7r8rr2r&)zapplication/x-zip-compressedzapplication/x-zoozapplication/zipzapplication/zpaqz audio/x-apez audio/x-shnz ++audio/flacpy_lzma)Zunace)rrr)Zunadf)Zunalz)mac)py_echo)rrrr)r)r)Znomarch)Nrrr)r7za)pbzip2lbzip2rZpy_bz2)r?r@rr=)Nrrrr)Z ++cabextractr)Zlcab)rrrr)archmageZextract_chmLib)rA)rr)r&)rrrrr3ZstarZbsdtarZ ++py_tarfile)rr>Z ++py_zipfile)unzip)r6rC)r6)Nrrrr)rr>Zpigzr')py_gzip)ZzopflirD)Nrr)r)rZisoinfo)Z genisoimage)rrrr)Zlha)Zlhasa)Nr)Zplzipr+ZclzipZpdlzip)r))r'rr>uncompress.real)rr>r=)r'rr>)r")rr>7zr)r.)Zunrarr)Nrrr)r)r#bsdcpior)r#rG)Zrpm2cpior)r/rr>)r/r)rrr)dpkg-debr)Zxdms)r-)rr,r5)rr=)r,r5)r0)rrr)r1)Zunshar)rr)shorten)r5r)r7)r8Zp7zipZp7azipZp7rzipZ ++uncompressZdpkgZchmlib)rr>rFrErHZextract_chmlib)utilcCs\t|\}}|s|std||tvrt|}n td||f||kr*d}||fS)z8Detect filename archive format and optional compression.z$unknown archive format for file `%s'z8unknown archive format for file `%s' (mime-type is `%s')N)rJZ ++guess_mime PatoolErrorArchiveMimetypes)filenamemime compressionformatr;r;3/builddir/patool-upstream-1.12/patoolib/__init__.pyget_archive_format!s ++rRcCs<|tvr td||dur|tvrtd|dSdS)z*Make sure format and compression is known.zunknown archive format `%s'Nz unkonwn archive compression `%s')ArchiveFormatsrJrKArchiveCompressions)rPrOr;r;rQcheck_archive_format0s ++rUcCst|}g}|dur||d|fD] }||vr |||q|s,td||f|D]#}|dr9|St|}|rQ|dkrM|dkrMtsMq.|Sq.td||d|f)z8Find suitable archive program for given format and mode.Nz'%s archive format `%s' is not supportedZpy_rr.zJcould not find an executable program to %s format %s; candidates are (%s),,) ArchiveProgramsappendextendrJrK ++startswith find_programp7zip_supports_rarjoin)rPcommandprogramcommandsprogramskeyZexer;r;rQfind_archive_program8s( ++  ++ ++rccCs|dvr ++|dtvSdS)zDecide if the given program supports the compression natively. ++ @return: True iff the program supports the given compression format ++ natively, else False. ++ rB)r'rFNr9)r_rOr;r;rQprogram_supports_compressionSs rdc Cs,tdttdttttD]}t|dtD]u}t|}||vr2d|vr2td|qzBt||}td||fdd|d kr[d ++d tD}|rZtd d |ddn|dkrpt ++rjtdddntdddtWqtj y| d| |}td|t |fYqwqdS)znsz list_formats..z(supported compressions: %s)z, rz(rar archives supported)z(rar archives not supported)z( %8s: - (no program found; install %s))printrrJZsystem_search_pathrSArchiveCommandsrWrcrTr]r\rKgetZstrlist_with_or)rPr^rar_Zencshandlersr;r;rQr ++]s@ ++  ++  ++  ++  ++r ++cCs^tj|}|r)t||s+|dkr|}nd}t||}|s-d}t||||fdSdSdS)z2Check if a program supports the given compression.rrz6cannot %s archive `%s': compression `%s' not supportedN)ospathbasenamerdrcrJrK)archiver^r_rOZ comp_commandZ comp_progmsgr;r;rQcheck_program_compression~s  ++ ++rscCst|}t|dkr@tj||d}tjtj||d}tj|s-tj|r/dSt ||t ++|d|dfSdS)zMove a single file or directory inside outdir a level up. ++ Never overwrite files. ++ Return (True, outfile) if successful, (False, reason) if not.rr)Fzlocal file existsT)Fzmultiple files in rootN) rnlistdirlenror]dirnameexistsislinkshutilmovermdir)outdirentriessrcdstr;r;rQmove_outdir_orphans ++   ++ rcCs4t|tr ++|\}}n|i}}tj|fd|i|S)zRun archive command. verbosityN) ++isinstancetuplerJ run_checked)Zarchive_cmdlistrcmdlistZ runkwargsr;r;rQrun_archive_cmdlists ++ ++ ++rcCs"tj|st|tjdSdS)z,Make file user readable if it is not a link.N)rnrorxrJset_modestatS_IRUSRrMr;r;rQmake_file_readables rcCst|tjtjBdS)z,Make directory user readable and executable.N)rJrrrS_IXUSRrr;r;rQmake_dir_readablesrcCsXtj|tjdD]!\}}}|D] }ttj||q|D] }ttj||qqdS)zVMake all files in given directory user readable. Also recurse into ++ subdirectories.onerrorN)rnwalkrJ log_errorrror]r) directoryrootdirsfilesrMrvr;r;rQmake_user_readablesrcCsLt|t|\}}|r|d|fStd|}t|||d||ffS)zRCleanup outdir after extraction and return target file name and ++ result string.`%s'z `%s' (%s)N)rrrJget_single_outfilernrename)r|rqZsuccessrrZoutdir2r;r;rQcleanup_outdirs    rTc Cs|dur ++t|\}}t||t|d|d}t|d||t|d|}|dur0tjdd}d}nd}zE|||||||} | rDt| |d|rNt||\} ++} n|d |} ++} |d ++krbt d || f| ++W|rwzt ++ |WSt yvYSwS|rzt ++ |Wwt yYwww) zYExtract an archive. ++ @return: output directory if command is 'extract', else None ++ Nrr_.)dirTFrrrz... %s extracted to %s.) rRrUrcrsget_archive_cmdlist_funcrJtmpdirrrlog_infornr{OSError) rqr interactiver|r_rPrOget_archive_cmdlistZdo_cleanup_outdirrtargetrrr;r;rQ_extract_archivesB  ++     rc ++Cs|dur ++t|\}}t||t|d|d}t|d||t|d|}d}tj|dkrCd|vrC|dsC|}t j ++tj |dd}|||||||} | rTt | |d|r^t ||dSdS)zCreate an archive.Nrrrz.arc)rsuffixr)rRrUrcrsrrnrorpendswithrJtmpfilervrryrz) ++rq filenamesrrr_rPrOrZ origarchiverr;r;rQ_create_archives(  ++  rc Cs|dur ++t|\}}t|||dvrtd|t|||d}t||||t|||}||||||}|r@t||ddSdS)zTest and list archives.N)rrzinvalid archive command `%s'rr)rRrUrJrKrcrsrr) rqr^rrr_rPrOrrr;r;rQ_handle_archives  ++ rc ++Csttj|}dt||}zt |t ++}Wnt y,}zt |d}~wwz ++t |d||fWStyH}zt |d}~ww)z8Get the Python function that executes the given program.z ++.programs.Nz%s_%s)rJZstripextrnrorplowerProgramModulesrl importlib import_module__name__ ImportErrorrKgetattrAttributeError)r_r^rPrbZ ++modulenamemodulerrr;r;rQr"s ++ ++rcCs&d|j|t|df}t|dS)z9Error function for shutil.rmtree(). Raises a PatoolError.zError in %s(%s): %srN)rstrrJr)funcroexcrrr;r;rQrmtree_log_error3src ++ ++Cst||rdStd}|sd}t|t}z7t||dd}t}z#t||dd} tj|d|| gddd Wtj|t d ++Wtj|t d ++Stj|t d ++wtj|t d ++w) z}Show differences between two archives. ++ @return 0 if archives are the same, else 1 ++ @raises: PatoolError on errors ++ rdiffzSThe diff(1) program is required for showing archive differences, please install it.r|rz-urNrrr)rret_okrN) ++rJZ is_same_filer[rKrrrryrmtreer) ++archive1archive2rrrrrZtmpdir1path1tmpdir2path2r;r;rQ_diff_archives9s"  ++ ++rc ++Csptd}|sd}t|t}zt||dd}tj|dd|dgdd |d ++Wtj|td Stj|td w) z'Search for given pattern in an archive.grepzRThe grep(1) program is required for searching archive contents, please install it.rrz-rz-errr)rrcwdrN) rJr[rKrrrryrr)patternrqrrrrrrror;r;rQ_search_archiveQs ++ ++ rc ++Cst|\}}t|\}}||kr||krtj|||ddSt}z_t||d} ||ko0|o0|} ++| ++r7|| d<t|fi| } tj|} t t ++| } t }t | zt||d} | ++rb|| d<t | | fi| Wt |nt |wWtj|tddStj|tdw)z+Repackage an archive to a different format.rN)rr|rPrrr)rRrJZ link_or_copyrdictrrnroabspathrrtgetcwdchdirrryrr)rrrrZformat1Z compression1Zformat2Z compression2rkwargsZ same_formatrorqrolddirr;r;rQ_repack_archive_s.     ++ "rc ++Csnt|\}}|r ++|}t}t}tjtj|\}}tj|||d} zt|||d} ++t |fi| ++} t ++} t | zt|||d} ++t t | } t| | fi| ++Wt | nt | wt|}t| }||krt|t| |||}dt|Wtj|tdtj|tdSWtj|tdtj|tddStj|tdtj|tdw)z-Try to recompress an archive to smaller size.) extension)rrPr|)rrrPz(... recompressed file is now %s smaller.rz<... recompressed file is not smaller, leaving archive as is.N)rRrJrrnrosplitextrprrrrrrrtrZ get_filesizeremoveryrzZstrsizerr)rqrrrPrOrrbaseextrrrorrfilesizeZ filesize2Zdiffsizer;r;rQ_recompress_archives@  ++ ++ ++ ++ rcCs2t||dkrtd|t|||||dS)zExtract given archive.rzExtracting %s ...)rrr|r_N)rJcheck_existing_filenamerr)rqrr|r_rr;r;rQr s ++r cCs2t||dkrtd|t|d|||dS)zList given archive.rzListing %s ...rrrr_NrJrrr)rqrr_rr;r;rQr s ++r cCsHt||dkrtd|t|d|||d}|dkr"td|S)zTest given archive.rzTesting %s ...rrz... tested ok.Nr)rqrr_rresr;r;rQr s ++ ++r cCsVt|t||dkrtd|t|||||d}|dkr)td||S)z&Create given archive with given files.rzCreating %s ...rz... %s created.N)rJcheck_new_filenameZcheck_archive_filelistrr)rqrrr_rrr;r;rQrs ++ ++rcCsdt|t||dkrtd||ft||||d}|dkr.|dkr0tddSdSdS)z'Print differences between two archives.rzComparing %s with %s ...rz... no differences found.N)rJrrr)rrrrrr;r;rQrs ++ ++rcCsd|stdt||dkrtd||ft||||d}|dkr0|dkr0td||S)z"Search pattern in archive members.zempty search patternrzSearching %r in %s ...rrz... %r not foundN)rJrKrrr)rrqrrrr;r;rQrs ++ ++rcCsTt|t||dkrtd||ft||||d}|dkr(td|S)z/Repack archive to different file and/or format.rzRepacking %s to %s ...rz... repacking successful.N)rJrrrr)rqZ archive_newrrrr;r;rQrs ++ ++ ++rcCsTt|t||dkrtd|ft|||d}|r(|dkr(t|dS)z0Recompress an archive to hopefully smaller size.rzRecompressing %s ...rN)rJrZcheck_writable_filenamerr)rqrrrr;r;rQrs ++ ++  ++r)N)r)rTNNNN)rTNNN)rT)rNNT)rNT)rNT)7 ++__future__rsyshasattrr ++SystemExitrnryrrZ configurationrr __version____all__rkrSrTrLr,r:rrWrrrJrRrUrcrdr ++rsrrrrrrrrrrrrrrrr r r rrrrrr;r;r;rQs    ++    !"#,  &,069@EKOU[adjpv{ "'*2 ++ ++ ++! ++ ++ ++ ++' ++ ++ ++ ++ ++ ++ ++( ++ ++ ++ ++ ++ ++ ++  +\ No newline at end of file +diff -Naur patool-upstream-1.12/patoolib/__pycache__/configuration.cpython-310.pyc patool-upstream-1.12-patched/patoolib/__pycache__/configuration.cpython-310.pyc +--- patool-upstream-1.12/patoolib/__pycache__/configuration.cpython-310.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/patoolib/__pycache__/configuration.cpython-310.pyc 2021-12-02 22:23:10.579832339 +0100 +@@ -0,0 +1,10 @@ ++o ++MV@sRdZddlZejZejZejZedeZ ej ++Z ej Z de ZejZdZejZdS)zC ++Define basic configuration data like version or application name. ++N zCopyright (C) 2004-2015 z(https://github.com/wummel/patool/issues/)__doc__Z_patool_configdataZ ++configdataversionVersionZ release_dateZ ReleaseDatenameZAppNameAppZauthorZAuthorZ ++maintainerZ ++MaintainerZ CopyrighturlZUrlZ ++SupportUrlZ author_emailZEmailr r 8/builddir/patool-upstream-1.12/patoolib/configuration.pys  ++ +\ No newline at end of file +diff -Naur patool-upstream-1.12/patoolib/__pycache__/util.cpython-310.pyc patool-upstream-1.12-patched/patoolib/__pycache__/util.cpython-310.pyc +--- patool-upstream-1.12/patoolib/__pycache__/util.cpython-310.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/patoolib/__pycache__/util.cpython-310.pyc 2021-12-02 22:23:10.579832339 +0100 +@@ -0,0 +1,151 @@ ++o ++MVe@sBdZddlmZddlZddlZddlZddlZddlZddlZddl Z ddl ++Z ++ddl Z ddl m Z mZmZzddlmZWneyRejejBdfddZYnwd d ++Zdad d Zd dZddZGdddeZGdddeZdddZdddZdddZeddZ dd d!d"d#d$d%Z!e"d&d'e!#DZ$d(e$d)<d*d+Z%d,d-Z&d.d/Z'd0d1Z(id2d3d4d5d6d7d8d9d:d d;d<d=d<d>d?d@d)dAd"dBdCdDdEdFdGdHdIdJdKdLdMdNd$dOd!d#dPdQdRdSdTdUdVdWdXdYdZ Z)d[d\Z*dd^d_Z+d`daZ,dbdcZ-dddeZ.dfdgZ/dhdiZ0ddjdkZ1ddldmZ2ddodpZ3dqdrZ4dsdtZ5dudvZ6ddxdyZ7ej8fdzd{Z9ej:fd|d}Z;ej8dddfd~dZej8fddZ?ddZ@ddZAddZBeddZCddZDddZEddZFddZGddZHddZIddZJddZKdddZLddZMedS)zUtility functions.)print_functionN) configurationArchiveMimetypesArchiveCompressions)whichc sdd}tjr||rSdS|ptjdtjtj}tj dkrVtj ++|vr2| dtj ++tjddtj}t fd d ++|DrLg}n fd d |D}ng}t }|D](}tj|}||vr|||D]} tj|| } ++|| ++|r| ++Sqqq^dS) aIGiven a command, mode, and a PATH string, return the path which ++ conforms to the given mode on the PATH, or None if there is no such ++ file. ++ `mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result ++ of os.environ.get("PATH"), or can be overridden with a custom search ++ path. ++ cSs&tj|ot||otj| S)zCheck that a given file can be accessed with the correct mode. ++ Additionally check that `fn` is not a directory, as on Windows ++ directories pass the os.access check.N)ospathexistsaccessisdir)fnmoder//builddir/patool-upstream-1.12/patoolib/util.py _access_check(s zwhich.._access_checkNPATHwin32rPATHEXTc3s"|] }|VqdSN)lowerendswith.0extcmdrr @s zwhich..csg|]}|qSrrrrrr ++Cszwhich..)rr dirnameenvirongetdefpathsplitpathsepsysplatformcurdirinsertanysetnormcaseaddjoin) rrr rpathextfilesseendirnormdirthefilenamerrrr s4 ++ ++ ++  ++ ++ rcCstjdtjS)zGet the list of directories on a system to search for executable programs. ++ It is either the PATH environment variable or if PATH is undefined the value ++ of os.defpath. ++ rN)rr!r"r#rrrrsystem_search_pathTsr6c ++CsPztjddaWnty!}z td|WYd}~dSd}~wwttdS)z&Initialize the internal MIME database.Fstrictz&could not initialize MIME database: %sN) mimetypesZ MimeTypesmimedb Exception log_erroradd_mimedb_data)msgrrr init_mimedb_s  r?cCsd|jd<d|jd<d|jd<d|jd<d |jd ++<t|d d t|d dt|ddt|ddt|ddt|ddt|ddt|ddt|ddt|ddt|ddt|ddt|dd t|d!d"t|d!d#t|d$d%t|d&d't|d(d)t|d*d+t|d,d-t|d.d/t|d0d1t|d2d3t|d4d5t|d6d7t|d8d9t|d:d;t|dd?t|d@dAt|dBdCt|dDdEt|dFdGt|dHdIt|dHdJt|dHdKt|dLdMdNS)Oz5Add missing encodings and mimetypes to MIME database.bzip2z.bz2lzmaz.lzmaxzz.xzlzipz.lzz.tar.bz2z.tbz2application/x-lzopz.lzoapplication/x-adfz.adfapplication/x-arjz.arjapplication/x-lzmaapplication/x-xzzapplication/java-archivez.jarapplication/x-rarz.rarz.cbrapplication/x-7z-compressedz.7zz.cb7zapplication/x-cabz.cabzapplication/x-rpmz.rpmapplication/x-debian-packagez.debapplication/x-acez.acez.cbaapplication/x-archivez.azapplication/x-alzip.alzapplication/x-arcz.arcapplication/x-lrzipz.lrzapplication/x-lhaz.lhazapplication/x-lzhz.lzhapplication/x-rzipz.rzapplication/x-zooz.zooapplication/x-dmsz.dmszapplication/x-zip-compressedz.crxzapplication/x-sharz.sharapplication/x-tarz.cbtzapplication/x-vhdz.vhd audio/x-apez.apez audio/x-shnz.shn ++audio/flacz.flacapplication/x-chmz.chmzapplication/x-iso9660-imagez.isoapplication/zipz.cbzz.epubz.apkapplication/zpaqz.zpaqN)Z encodings_mapZ ++suffix_map add_mimetype)r:rrrr=jsT ++ ++ ++ ++ ++                                    r=cCs"||jdv}|j|||ddS)z>Add or replace a mimetype to be used with the given extension.Tr7N)Z types_mapZadd_type)r:Zmimetype extensionr8rrrr[sr[c@seZdZdZdS) PatoolErrorzRaised when errors occur.N)__name__ ++__module__ __qualname____doc__rrrrr]sr]c@s(eZdZdZddZddZddZdS) memoizedzDecorator that caches a function's return value each time it is called. ++ If called later with the same arguments, the cached value is returned, and ++ not re-evaluated.cCs||_i|_dS)zSet func and init cache.N)funccache)selfrcrrr__init__s ++zmemoized.__init__cGsRz|j|WSty|j||j|<}|YSty(|j|YSw)z|Try to find result for function arguments in local cache or ++ execute the function and fill the cache with the result.N)rdKeyErrorrc TypeError)reargsvaluerrr__call__s   zmemoized.__call__cCs|jjS)z Return the function's docstring.N)rcra)rerrr__repr__szmemoized.__repr__N)r^r_r`rarfrkrlrrrrrbs ++ rbutf-8cCs"tj|tjdd}||S)z#Return decoded output from command.)stdoutrN) ++subprocessPopenPIPE communicatedecode)rencodingdatarrrbackticks ++rvcKs|dkrtddtt||r0|dkr&tdddd|D|dr0d|}|d krZttjd ++}||d <t j ++|fi|}Wd |S1sSwY|St j ++|fi|}|S) zDRun command without error checking. ++ @return: command return coderz ++running %s z with %s, css(|]\}}d|tt|fVqdS)z%s=%sN) shell_quotestr)rkvrrrrszrun..shellrwbrnN) log_infor.mapshell_quote_ntitemsr"openrdevnullrocall)r verbositykwargsrresrrrruns& ++ ++ ++rrcKs0t|fi|}||vrd||f}t||S)z+Run command and raise PatoolError on error.z-Command `%s' returned non-zero exit status %dN)rr])rret_okrretcoder>rrr run_checkeds ++ rcCs<t|\}}|durt|\}}|dus|dusJ||fS)zGuess the MIME type of given filename using file(1) and if that ++ fails by looking at the filename extension with the Python mimetypes ++ module. ++ ++ The result of this function is cached. ++ N)guess_mime_fileguess_mime_mimedbfilenamemimertrrr ++guess_mimes ++  rzapplication/gzipzapplication/x-bzip2zapplication/x-compressrGzapplication/x-lziprH)gzipr@compressrArCrBcCsg|]\}}||fqSrr)rZ_keyZ_valrrrrsrrzapplication/x-gzipcCsFd\}}tdurtj|dd\}}|tvr|tvrt|}d}||fS)zMGuess MIME type from given filename. ++ @return: tuple (mime, encoding) ++ NNNFr7)r:Z ++guess_typerr Encoding2Mimerrrrrsrc ++Csd\}}tj|\}}|dvr||fStj|r4td}|r4t||\}}|dur4t||}d}|tvr|ddd|g}z t | ++ d}Wn t yW||fYSw|d  d ++d d }|d vsj|tvr|t |\}} |tvrx|}| }||fS|tvr|}t|}||fS) zDetermine MIME type of filename with file(1): ++ (a) using `file --mime` ++ (b) using `file` and look the result string ++ @return: tuple (mime, encoding) ++ r)rNfileN--briefz--mimez --uncompress;rrwr)zapplication/x-emptyzapplication/octet-stream)rr splitextrisfile find_programguess_mime_file_mimeguess_mime_file_text Mime2Encodingrvstripr$OSErrorrrget_file_mime_encoding) ++rrrtbaser file_progrZoutpartsZmime2Z encoding2rrrrs>   ++   rcCsPd\}}|dd|g}zt|}Wn tyYnw|tvr$d\}}||fS)zhDetermine MIME type of filename with file(1) and --mime option. ++ @return: tuple (mime, encoding) ++ rrz --mime-typeN)rvrrr)rrrrtrrrrr@s  rcCsL|D]!}|dD]}|dr"|dd}t|Sq qdS)zDGet encoding value from splitted output of file --mime --uncompress.rwzcompressed-encoding==rN)r$ ++startswithrrr")partspartsubpartrrrrrPs ++rz7-zip archive datarJzACE archive datarLzAmiga DOS diskrEzARJ archive datarFzbzip2 compressed dataz cpio archivezapplication/x-cpiozASCII cpio archivezDebian binary packagerKzgzip compressed datazLZMA compressed datazLRZIP compressed datarPzlzop compressed datarDzMicrosoft Cabinet archive dataz!application/vnd.ms-cab-compressedzRAR archive datarIzRPM z$application/x-redhat-package-managerzPOSIX tar archiverUzxz compressed datarYrRrMrQrOrSrTrVrWrXrZ) zZip archive datazcompress'd datazlzip compressed datazrzip compressed datazcurrent ar archivezLHa zARC archive datazZoo archive datazDMS archive dataMonkey's AudiozFLAC audio bitstream datazMS Windows HtmlHelp Dataz ZPAQ streamcCs`|d|g}zt|}Wn ++tyYdSwtD]\}}||r-|tvr-|SqdS)z-Determine MIME type of filename with file(1).rN)rvrr FileText2Mimerrr)rrroutputmatcherrrrrr|s ++ rTcCsVtj|s td|t|tjstd||r'tj|s)td|dSdS)z5Ensure that given filename is a valid, existing file.zfile `%s' was not foundzfile `%s' is not readablez`%s' is not a fileN)rr r ++r]r R_OKr)r onlyfilesrrrcheck_existing_filenames    rcCst|tjs td|dS)z+Ensure that the given filename is writable.zfile `%s' is not writableN)rr W_OKr]rrrrcheck_writable_filenames rcCstj|r td|dS)z+Check that filename does not already exist.z#cannot overwrite existing file `%s'N)rr r ++r]rrrrcheck_new_filenames  rcCs&|std|D]}t|ddqdS)zCCheck that file list is not empty and contains only existing files.z)cannot create archive with empty filelistF)rN)r]r) filenamesrrrrcheck_archive_filelists ++rc ++Cszt|j}Wn ++tyYdSw||@s>z t|||BWdSty=}ztd||fWYd}~dSd}~wwdS)z5Set mode flags for given filename if not already set.Nz%could not set mode flags for `%s': %s)rlstatst_moderchmodr<)rflagsrr>rrrset_modes rcCs tj|S)z*Return file size in Bytes, or -1 on error.N)rr getsizerrrr get_filesizes rcCs|dkrtd|dkrdtd||S|dkr$dtd|d|S|dkr5dtd t|d|S|d ++krFd td t|d|S|d krWd td t|d|S|dkrhdtd t|d |Sdtd t|d |S)z\Return human representation of bytes b. A negative number of bytes ++ raises a value error.rzInvalid negative byte numberiz%sBz%di(z%sKBiz%.2fiz%sMBi@z%.1fl ++z%sGBN) ++ValueErrorlocaleformatfloat)bgroupingrrrstrsizesrcCstjdd|dS)z,Return a temporary directory for extraction.rZUnpack_suffixprefixr2N)tempfilemkdtemp)r2rrrtmpdirrtempcCstj|||ddS)zReturn a temporary file.rrN)rmkstemp)r2rrrrrtmpfilesrcCs"tjdkr t|Sd|ddS)zQuote all shell metacharacters in given string value with strong ++ (ie. single) quotes, handling the single quote especially.ntz'%s''z'\''N)rr5rreplacerjrrrrys ++rycCsd|vrd|S|S)zYQuote argument for Windows system. Modeled after distutils ++ _nt_quote_args() function.rwz"%s"NrrrrrrsrcCstjtj|dS)z8Return the basename without extension of given filename.rN)rr rbasenamerrrrstripextrrcCsrtj|t|}tj||r5d}d||f}tj||r3d||f}|d7}tj||s!|}||S)zDGet output filename if archive is in a single file format like gzip.rz%s%dN)rr r.rr ++) directoryarchiver\Zoutfileinewfilerrrget_single_outfiles  rcCtd||ddS)z:Print error message to stderr (or any other given output).z patool error:rNprintr>outrrrr<r<cCr)z9Print info message to stdout (or any other given output).zpatool:rNrrrrrrrrcCsttj|dtdttjtjd|d|durtd}|dur)td}t|||d|dur:td}t ++|||d|t |dt |dttjd tj|ddS) ++z9Print internal error message (output defaults to stderr).raU********** Oops, I did it again. ************* ++ ++You have found an internal error in %(app)s. Please write a bug report ++at %(url)s and include at least the information below: ++ ++Not disclosing some of the information below due to privacy reasons is ok. ++I will try to help you nonetheless, but you have to give me something ++I can work with ;) . ++)appurlNrrrz1******** %s internal error, over and out ********) rrlinesepdictrAppName ++SupportUrlr&exc_info tracebackprint_exceptionprint_app_infoprint_locale_info)retypeZevaluetbrrrlog_internal_errors&    ++ ++ ++ ++rcCs.t|}|durt|dt||ddSdS)z2If given environment key is defined, print it out.Nrr)rgetenvrrepr)keyrrjrrrprint_env_info s ++rcCsdD]}t||dqdS)zPrint locale info.)LANGUAGELC_ALLLC_CTYPELANGrN)r)rrrrrr'srcCsbtd|dttj|dtdtjtjd|dtt}td||dtdtj|ddS)z>Print system and application info (output defaults to stderr).z System info:rz"Python %(version)s on %(platform)s)versionr'z Local time:zsys.argvN) rrAppr&rr'strtimetimeargv)rZstimerrrr-s   rcCstdt|tS)zReturn ISO 8601 formatted time.z%Y-%m-%d %H:%M:%SN)rstrftime localtime strtimezone)trrrr8srcCs"tjrtj}ntj}d| dS)zJReturn timezone info, %z on some platforms, but not supported on all. ++ z%+04diN)rdaylightaltzonetimezone)zonerrrr>srcCs@tjdkrdSd}dD]}tj||}tj|rdSq dS)z7Determine if the RAR codec is installed for 7z program.rTzp7zip/Codecs/Rar29.so)z/usr/libz/usr/local/libz ++/usr/lib64z/usr/local/lib64z/usr/lib/i386-linux-gnuz/usr/lib/x86_64-linux-gnuFN)rr5r r.r ++) codecnamelibdirfnamerrrp7zip_supports_rarHs ++ r cCsJtjdkrtjd}t|t}t|t}t|t}nd}t||dS)z.Look for program in environment PATH variable.rrN)r )rr5r!append_to_path get_nt_7z_dirget_nt_mac_dirget_nt_winrar_dirr)programr rrrrWs ++ ++   rcCs6tj|r ++||vr |S|tjs|tj7}||S)zQAdd a directory to the PATH environment variable, if it is a valid ++ directory.N)rr r rr%)r rrrrr fs ++  ++r c Csxzddl}Wn tyddl}Ynwz||jd}z||ddW||WS||wty;YdSw)z9Return 7-Zip directory from registry, or an empty string.rNzSOFTWARE\7-ZipPathr)_winreg ImportErrorwinregOpenKeyHKEY_LOCAL_MACHINE QueryValueExZCloseKey WindowsError)rrrrrr ps    r cCsd}tj|S)z+Return the Windows program files directory.z%ProgramFiles%N)rr ++expandvars)Zprogvarrrrget_nt_program_dirs rcCtjtdS)z/Return Monkey Audio Compressor (MAC) directory.rNrr r.rrrrrrrrcCr)zReturn WinRAR directory.ZWinRARNrrrrrrrrcCs4t|dkrdd|dd|dfSd|S)zCReturn comma separated string, and last entry appended with ' or '.rz%s or %srxN)lenr.)Zalistrrrstrlist_with_ors  ++rcCs.||krdStjdkrtj||St||S)aCheck if filename1 and filename2 point to the same file object. ++ There can be false negatives, ie. the result is False, but it is ++ the same file anyway. Reason is that network filesystems can create ++ different paths to the same physical file. ++ TposixN)rr5r samefileis_same_filenameZ filename1 filename2rrr is_same_files ++ ++ ++r%cCstj|tj|kS)z7Check if filename1 and filename2 are the same filename.N)rr realpathr#rrrr"rr"c Cst|dkr td||fz t||WdSttfy9z ++t||WYdSty8}zt|d}~www)zTry to make a hard link from src to dst and if that fails ++ copy the file. Hard links save some disk space and linking ++ should fail fast since no copying is involved. ++ rzCopying %s -> %sN)rrlinkAttributeErrorrshutilcopyr])srcdstrr>rrr link_or_copysr-cCs2zt}Wn tyd}Ynwt||S)zRemember and return current directory before calling os.chdir(). ++ If the current directory could not be determined, return None. ++ N)rgetcwdrchdir)rolddirrrrr/s   ++r/)rm)r)Tr)NrN)r)Nra ++__future__rrr&r)ror9rrrrrrrrrrF_OKX_OKr6r:r?r=r[r;r]objectrbrvrrrrrrrrrrrrrrrrrrrrrrryrrrstderrr<rnrrrrrrrr rr r rrrrr%r"r-r/rrrrs  6  . ++ ++ ++ ++.   ++   ! ++ ++ ++ ++ ++ ++  ++ ++ ++ ++ ++ +\ No newline at end of file +diff -Naur patool-upstream-1.12/patoolib/programs/__pycache__/__init__.cpython-310.pyc patool-upstream-1.12-patched/patoolib/programs/__pycache__/__init__.cpython-310.pyc +--- patool-upstream-1.12/patoolib/programs/__pycache__/__init__.cpython-310.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/patoolib/programs/__pycache__/__init__.cpython-310.pyc 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,11 @@ ++o ++MVr@s(ddlmZddZddZddZdS) )utilc ++CsXt|g}|dkr|dt||}|dddt|dt|g|ddifS) ++z=Standard routine to extract a singlefile archive (like gzip).-v-cz-d-->shellTN)r shell_quoteappendget_single_outfileextend)archive compressioncmd verbosity interactiveoutdircmdlistoutfiler,sz.create_singlefile_standard..rrTN)rr r ++r )r rrrr filenamesrrrrcreate_singlefile_standard&s  ++ rN)rrrrrrrrs  +\ No newline at end of file +diff -Naur patool-upstream-1.12/patoolib/programs/__pycache__/ar.cpython-310.pyc patool-upstream-1.12-patched/patoolib/programs/__pycache__/ar.cpython-310.pyc +--- patool-upstream-1.12/patoolib/programs/__pycache__/ar.cpython-310.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/patoolib/programs/__pycache__/ar.cpython-310.pyc 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,12 @@ ++o ++MV@s,dZddlZddZddZeZddZdS) z$Archive commands for the ar program.NcCs2d}|dkr ++|d7}||tj|g}|d|ifS)zExtract a AR archive.xvcwdN)ospathabspath)archive compressioncmd verbosity interactiveoutdiroptscmdlistr6/builddir/patool-upstream-1.12/patoolib/programs/ar.py ++extract_ars ++ rcCsd}|dkr ++|d7}|||gS)zList a AR archive.trrNr)r r ++r r r rrrrlist_ars ++rcCs,d}|dkr ++|d7}|||g}|||S)zCreate a AR archive.rcrrN)extend)r r ++r r r filenamesrrrrr create_ar$s  ++ ++r)__doc__rrrtest_arrrrrrs   +\ No newline at end of file +diff -Naur patool-upstream-1.12/patoolib/programs/__pycache__/bsdcpio.cpython-310.pyc patool-upstream-1.12-patched/patoolib/programs/__pycache__/bsdcpio.cpython-310.pyc +--- patool-upstream-1.12/patoolib/programs/__pycache__/bsdcpio.cpython-310.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/patoolib/programs/__pycache__/bsdcpio.cpython-310.pyc 2021-12-02 22:23:10.579832339 +0100 +@@ -0,0 +1,2 @@ ++o ++MV/@s dZddlmZmZmZmZdS)z)Archive commands for the bsdcpio program.) extract_cpio list_cpio test_cpio create_cpioN)__doc__cpiorrrrrr;/builddir/patool-upstream-1.12/patoolib/programs/bsdcpio.pys +\ No newline at end of file +diff -Naur patool-upstream-1.12/patoolib/programs/__pycache__/bsdtar.cpython-310.pyc patool-upstream-1.12-patched/patoolib/programs/__pycache__/bsdtar.cpython-310.pyc +--- patool-upstream-1.12/patoolib/programs/__pycache__/bsdtar.cpython-310.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/patoolib/programs/__pycache__/bsdtar.cpython-310.pyc 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,3 @@ ++o ++MV*@s dZddlmZmZmZmZdS)z)Archive commands for the BSD tar program.) extract_tarlist_tartest_tar ++create_tarN)__doc__tarrrrrrr:/builddir/patool-upstream-1.12/patoolib/programs/bsdtar.pys +\ No newline at end of file +diff -Naur patool-upstream-1.12/patoolib/programs/__pycache__/bzip2.cpython-310.pyc patool-upstream-1.12-patched/patoolib/programs/__pycache__/bzip2.cpython-310.pyc +--- patool-upstream-1.12/patoolib/programs/__pycache__/bzip2.cpython-310.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/patoolib/programs/__pycache__/bzip2.cpython-310.pyc 2021-12-02 22:23:10.579832339 +0100 +@@ -0,0 +1,8 @@ ++o ++MV,@s4dZddlmZddlmZmZeZeZddZdS)z'Archive commands for the bzip2 program.)util)extract_singlefile_standardtest_singlefile_standardcCs`t|g}|dkr|d|gd|dd|D|dt|g|ddifS) ++zCreate a BZIP2 archive.rz-v)z-cz-zz-9z--cSsg|]}t|qS)r shell_quote).0xrr9/builddir/patool-upstream-1.12/patoolib/programs/bzip2.py ++sz create_bzip2..>shellTN)rrappendextend)archive compressioncmd verbosity interactive filenamescmdlistrrr ++ create_bzip2s  ++ rN)__doc__rrrZ extract_bzip2 ++test_bzip2rrrrr ++s    +\ No newline at end of file +diff -Naur patool-upstream-1.12/patoolib/programs/__pycache__/cpio.cpython-310.pyc patool-upstream-1.12-patched/patoolib/programs/__pycache__/cpio.cpython-310.pyc +--- patool-upstream-1.12/patoolib/programs/__pycache__/cpio.cpython-310.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/patoolib/programs/__pycache__/cpio.cpython-310.pyc 2021-12-02 22:23:10.579832339 +0100 +@@ -0,0 +1,15 @@ ++o ++MVn@s@dZddlZddlZddlmZddZddZeZd d ++ZdS) z&Archive commands for the cpio program.N)utilcCsrt|dddg}tjdr|ds|gd|dkr$|d|d ttj ++|g||d ++d fS) zExtract a CPIO archive.z --extractz--make-directoriesz--preserve-modification-timelinuxbsdcpio)z--no-absolute-filenamesz --force-localz --nonmatchingz"*\.\.*"-v3szcreate_cpio..z-print0|z-0>r ++TN)rr rlenr)rrrrr filenamesrZfindcmdrrr create_cpio,s ++   ++ r() __doc__rr rrr test_cpior(rrrrs    +\ No newline at end of file +diff -Naur patool-upstream-1.12/patoolib/programs/__pycache__/gzip.cpython-310.pyc patool-upstream-1.12-patched/patoolib/programs/__pycache__/gzip.cpython-310.pyc +--- patool-upstream-1.12/patoolib/programs/__pycache__/gzip.cpython-310.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/patoolib/programs/__pycache__/gzip.cpython-310.pyc 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,9 @@ ++o ++MV,@sDdZddlmZmZddlmZeZZeZZddZ ddZ ++d S) ++z&Archive commands for the gzip program.)extract_singlefile_standardtest_singlefile_standard)utilcCs`t|g}|dkr|d|gd|dd|D|dt|g|ddifS) ++zCreate a GZIP archive.r-v)z-cz-9--cSsg|]}t|qS)r shell_quote).0xrr8/builddir/patool-upstream-1.12/patoolib/programs/gzip.py ++szcreate_gzip..>shellTN)rr appendextend)archive compressioncmd verbosity interactive filenamescmdlistrrr create_gzips  ++ rcCs,|g}|dkr |d|dd|g|S)zList a GZIP archive.rz-lrN)rr)rrrrrrrrr list_gzip#s ++ ++rN) __doc__rrrZ extract_gzipZextract_compress test_gzip test_compressrrrrrr s  +\ No newline at end of file +diff -Naur patool-upstream-1.12/patoolib/programs/__pycache__/py_bz2.cpython-310.pyc patool-upstream-1.12-patched/patoolib/programs/__pycache__/py_bz2.cpython-310.pyc +--- patool-upstream-1.12/patoolib/programs/__pycache__/py_bz2.cpython-310.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/patoolib/programs/__pycache__/py_bz2.cpython-310.pyc 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,31 @@ ++o ++MV @sPdZddlmZzddlZWn eyddlZYnwdZddZdd ZdS) ++z+Archive commands for the bz2 Python module.)utilNic ++Cst||}zKt|;}t|d}|t} | r&|| |t} | sWdn1s0wYWdWdSWdWdS1sJwYWdStyi} ++z d||| ++f} t | d} ++~ ++ww)z3Extract a BZIP2 archive with the bz2 Python module.wbNzerror extracting %s to %s: %s) ++rget_single_outfilebz2BZ2FileopenreadREAD_SIZE_BYTESwrite Exception PatoolError) archive compressioncmd verbosity interactiveoutdirZ ++targetnamebz2fileZ ++targetfiledataerrmsgr:/builddir/patool-upstream-1.12/patoolib/programs/py_bz2.py extract_bzip2s.    ++ ++ ++      ++rc ++Cst|dkr tdzPt|d?}|d}t|d}|t} | r0|| |t} | s$Wdn1s:wYWdWdSWdWdS1sTwYWdSt yr} ++z d|| ++f} t| d} ++~ ++ww)z2Create a BZIP2 archive with the bz2 Python module.z2multi-file compression not supported in Python bz2rrrbNzerror creating %s: %s) ++lenrr rrrr r ++r r ) rrrrr filenamesrfilenamesrcfilerrrrrr create_bzip2+s2  ++  ++ ++ ++  ++  ++ ++  ++r!) __doc__rrr ImportErrorr ++rr!rrrrs      +\ No newline at end of file +diff -Naur patool-upstream-1.12/patoolib/programs/__pycache__/py_echo.cpython-310.pyc patool-upstream-1.12-patched/patoolib/programs/__pycache__/py_echo.cpython-310.pyc +--- patool-upstream-1.12/patoolib/programs/__pycache__/py_echo.cpython-310.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/patoolib/programs/__pycache__/py_echo.cpython-310.pyc 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,10 @@ ++o ++MV@sZdZddlmZddlmZddZeZZZZ Z ++Z ddZ e Z Zd d ++d Zd S)zIArchive commands echoing data, implemented by the Python print ++statement.)print_function)utilcCs t|||S)zList a BZIP2 archive.Nstripextarchive compressioncmd verbosity interactiver ;/builddir/patool-upstream-1.12/patoolib/programs/py_echo.py ++list_bzip2s rcCst|||ddS)zList an APE archive.z.wav) extensionNrrr r rlist_ape"srcCs|dkr tt||dS)zPrint the name without suffix.rN)printrr)r ++rr rr r rr*srN)r)__doc__ ++__future__rrrrZ list_compressZ list_lzmaZlist_xzZ list_lzipZ ++list_lrzipZ list_rziprZlist_shnZ list_flacrr r r rs&   ++ +\ No newline at end of file +diff -Naur patool-upstream-1.12/patoolib/programs/__pycache__/py_gzip.cpython-310.pyc patool-upstream-1.12-patched/patoolib/programs/__pycache__/py_gzip.cpython-310.pyc +--- patool-upstream-1.12/patoolib/programs/__pycache__/py_gzip.cpython-310.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/patoolib/programs/__pycache__/py_gzip.cpython-310.pyc 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,31 @@ ++o ++MV@s<dZddlmZddlZddlmZdZddZd d ++ZdS) z,Archive commands for the gzip Python module.)absolute_importN)utilic ++Cst||}zKt|;}t|d}|t} | r&|| |t} | sWdn1s0wYWdWdSWdWdS1sJwYWdStyi} ++z d||| ++f} t | d} ++~ ++ww)z3Extract a GZIP archive with the gzip Python module.wbNzerror extracting %s to %s: %s) ++rget_single_outfilegzipGzipFileopenreadREAD_SIZE_BYTESwrite Exception PatoolError) archive compressioncmd verbosity interactiveoutdir ++targetnamegzipfile ++targetfiledataerrmsgr;/builddir/patool-upstream-1.12/patoolib/programs/py_gzip.py extract_gzips.    ++ ++ ++      ++rc ++Cst|dkr tdzPt|d?}|d}t|d}|t} | r0|| |t} | s$Wdn1s:wYWdWdSWdWdS1sTwYWdSt yr} ++z d|| ++f} t| d} ++~ ++ww)z2Create a GZIP archive with the gzip Python module.z3multi-file compression not supported in Python gziprrrbNzerror creating %s: %s) ++lenrrrrr r ++r r r ) rrrrr filenamesrfilenamesrcfilerrrrrr create_gzip(s2  ++  ++ ++ ++  ++  ++ ++  ++r$) __doc__ ++__future__rrrr rr$rrrrs    +\ No newline at end of file +diff -Naur patool-upstream-1.12/patoolib/programs/__pycache__/py_lzma.cpython-310.pyc patool-upstream-1.12-patched/patoolib/programs/__pycache__/py_lzma.cpython-310.pyc +--- patool-upstream-1.12/patoolib/programs/__pycache__/py_lzma.cpython-310.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/patoolib/programs/__pycache__/py_lzma.cpython-310.pyc 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,33 @@ ++o ++MV4 @sPdZddlmZddlZdZddZdd Zd ++d Zd d ZddZ ddZ ++dS)z,Archive commands for the lzma Python module.)utilNic ++Cst||}zMtj||d;}t|d}|t} | r(|| |t} | sWdn1s2wYWdWdSWdWdS1sLwYWdStyk} ++z d||| ++f} t | d} ++~ ++ww)z:Extract an LZMA or XZ archive with the lzma Python module.)formatwbNzerror extracting %s to %s: %s) ++rget_single_outfilelzmaLZMAFileopenreadREAD_SIZE_BYTESwrite Exception PatoolError) archive compressioncmdr verbosityoutdir ++targetnamelzmafile ++targetfiledataerrmsgr;/builddir/patool-upstream-1.12/patoolib/programs/py_lzma.py_extracts.   ++ ++ ++      ++rcCt|||tj||S)z4Extract an LZMA archive with the lzma Python module.N)rr FORMAT_ALONErrrr interactiverrrr extract_lzma%r!cCr)z2Extract an XZ archive with the lzma Python module.N)rr FORMAT_XZrrrr ++extract_xz)r"r$c ++Cst|dkr tdzStj|d|dd?}|d}t|d}|t} | r3|| |t} | s'Wdn1s=wYWdWdSWdWdS1sWwYWdSt yu} ++z d || ++f} t| d} ++~ ++ww) ++z9Create an LZMA or XZ archive with the lzma Python module.z3multi-file compression not supported in Python lzmar )moderpresetrrbNzerror creating %s: %s) ++lenrrrrr r ++r r r ) rrrrr filenamesrfilenamesrcfilerrrrrr_create.s2  ++  ++ ++ ++  ++  ++ ++  ++r.cCr)z3Create an LZMA archive with the lzma Python module.N)r.rrrrrrr r+rrr create_lzma?r"r0cCr)z1Create an XZ archive with the lzma Python module.N)r.rr#r/rrr create_xzCr"r1) __doc__rrr rr!r$r.r0r1rrrrs   +\ No newline at end of file +diff -Naur patool-upstream-1.12/patoolib/programs/__pycache__/py_tarfile.cpython-310.pyc patool-upstream-1.12-patched/patoolib/programs/__pycache__/py_tarfile.cpython-310.pyc +--- patool-upstream-1.12/patoolib/programs/__pycache__/py_tarfile.cpython-310.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/patoolib/programs/__pycache__/py_tarfile.cpython-310.pyc 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,18 @@ ++o ++MV @sHdZddlmZmZddlZdZddZeZdd Zd ++d Z d d Z ++dS)z/Archive commands for the tarfile Python module.)utilpy_lzmaNic ++Cstz"t|}|j|dkdWdWdS1swYWdSty9}z d||f}t|d}~ww)z2List a TAR archive with the tarfile Python module.)verboseNzerror listing %s: %s)tarfileopenlist Exceptionr PatoolError)archive compressioncmd verbosity interactivetfileerrmsgr>/builddir/patool-upstream-1.12/patoolib/programs/py_tarfile.pylist_tars    ++rc ++Cspz t|}|j|dWdWdS1swYWdSty7}z d||f}t|d}~ww)z5Extract a TAR archive with the tarfile Python module.)pathNzerror extracting %s: %s)rr ++extractallr ++rr ) r r rrroutdirrrrrrr extract_tar#s    ++rc ++Cst|}z%t||}|D]}||qWdWdS1s"wYWdSty@} z d|| f} ++t| ++d} ~ ww)z4Create a TAR archive with the tarfile Python module.Nzerror creating %s: %s) get_tar_moderraddr ++rr ) r r rrr filenamesmoderfilenamerrrrr ++create_tar.s    ++r cCsB|dkrdS|dkr dS|dkrtrdS|rd}t||dS) ++z?Determine tarfile open mode according to the given compression.gzipzw:gzbzip2zw:bz2lzmazw:xzz1pytarfile does not support %s for tar compressionwN)rrr )r rrrrr;s r) __doc__rrrREAD_SIZE_BYTESrtest_tarrr rrrrrs ++ +\ No newline at end of file +diff -Naur patool-upstream-1.12/patoolib/programs/__pycache__/py_zipfile.cpython-310.pyc patool-upstream-1.12-patched/patoolib/programs/__pycache__/py_zipfile.cpython-310.pyc +--- patool-upstream-1.12/patoolib/programs/__pycache__/py_zipfile.cpython-310.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/patoolib/programs/__pycache__/py_zipfile.cpython-310.pyc 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,22 @@ ++o ++MV @sXdZddlmZddlmZddlZddlZdZddZeZ d d ++Z ++d d Z d dZ dS)z/Archive commands for the zipfile Python module.)print_function)utilNic ++Csz*t|d}|D] ++}|dkrt|q WdWdS1s#wYWdStyA}z d||f}t|d}~ww)z/builddir/patool-upstream-1.12/patoolib/programs/py_zipfile.pylist_zips     ++rc ++Csnzt|}||WdWdS1swYWdSty6}z d||f}t|d}~ww)z5Extract a ZIP archive with the zipfile Python module.Nzerror extracting %s: %s)rr ++extractallr ++rr ) r r rrroutdirrrrrrr extract_zip's     ++rc ++ ++Csz1t|d }|D]}tj|rt||q ++||q ++WdWdS1s*wYWdStyH}z d||f} t | d}~ww)z4Create a ZIP archive with the zipfile Python module.wNzerror creating %s: %s) ++rrospathisdirwrite_directorywriter ++rr ) ++r r rrr filenamesrfilenamerrrrr ++create_zip2s         ++r#cCsBt|D]\}}}|||D] }|tj||qqdS)zDWrite recursively all directories and filenames to zipfile instance.N)rwalkr rjoin)r directorydirpathdirnamesr!r"rrrrAs  ++r) __doc__ ++__future__rrrrREAD_SIZE_BYTESrtest_ziprr#rrrrrs     +\ No newline at end of file +diff -Naur patool-upstream-1.12/patoolib/programs/__pycache__/tar.cpython-310.pyc patool-upstream-1.12-patched/patoolib/programs/__pycache__/tar.cpython-310.pyc +--- patool-upstream-1.12/patoolib/programs/__pycache__/tar.cpython-310.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/patoolib/programs/__pycache__/tar.cpython-310.pyc 2021-12-02 22:23:10.578832320 +0100 +@@ -0,0 +1,9 @@ ++o ++MV1 @s4dZddlZddZddZeZddZd d ++ZdS) z)Archive commands for the GNU tar program.NcCs*|dg}t||||d|d|g|S)zExtract a TAR archive.z --extract--filez --directoryN add_tar_optsextend)archive compressioncmd verbosity interactiveoutdircmdlistr 7/builddir/patool-upstream-1.12/patoolib/programs/tar.py extract_tars rcCs&|dg}t||||d|g|S)zList a TAR archive.z--listrNr)rrrr r ++r r r rlist_tars rcCs2|dg}t||||d|dg|||S)zCreate a TAR archive.z--createrz--Nr)rrrr r ++ filenamesr r r r ++create_tar$s ++  ++rcCstj|d}|dkr|dn1|dkr|dn'|dkr&|dn|dvr6|d kr6|d ++|n |d vrC|}|d |g|d krN|ddSdS)zAdd tar options to cmdlist.rgzipz-zcompressz-Zbzip2z-j)lzmaxzbsdtarz--%s)rrlzipz--use-compress-programz --verboseN)ospathbasenameappendr)r rr Zprognameprogramr r rr,s   r)__doc__rrrtest_tarrrr r r rs  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/__pycache__/__init__.cpython-310.pyc patool-upstream-1.12-patched/tests/__pycache__/__init__.cpython-310.pyc +--- patool-upstream-1.12/tests/__pycache__/__init__.cpython-310.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/__pycache__/__init__.cpython-310.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,19 @@ ++o ++MVD@sddlZddlZddlZddlZddlZejeZej edZ ++ej ejedZ ej ddkr6dZ ndZ ddZd d ++Zd d Zd dZddZddZddZddZdS)NdataZpatool__name__ func_namecsfdd}|S)z8Decorator skipping test if given testfunc returns False.cs(fdd}t|ttt|S)Ncs(s tdf|i|S)Nz%s %r is not available)pytestskipargskwargs) descriptionfuncnametestfunc0/builddir/patool-upstream-1.12/tests/__init__.pynewfunc#sz/_need_func..check_func..newfuncsetattr fnameattrgetattrr rr r rr r ++check_func"sz_need_func..check_funcNr)rr r rrrr ++_need_func srcCtdd|dS)zCDecorator skipping test if given operating system is not available.cSs ++tj|kSN)osr xrrr.s ++zneeds_os..zoperating systemNrr rrrneeds_os,r#cCr)z:Decorator skipping test if given program is not available.cSs tj|Sr)patoolibutil find_programrrrrr 3s zneeds_program..programNr!r"rrr needs_program1r$r)cCr)zCDecorator skipping test if not one of given programs are available.cSstttjj|Sr)allmapr%r&r'rrrrr 8sz#needs_one_program..programsNr!)r,rrrneeds_one_program6r$r-cCsdd}t||dS)z9Decorator skipping test if given module is not available.cSs&zt|WdStyYdSw)NTF) importlib import_module ImportError)modulerrr ++has_module=s  ++ z needs_module..has_modulez Python moduleNr!)r r2rrr needs_module;s r3csfdd}|S)z@Decorator skipping test if given program codec is not available.cs&fdd}t|ttt|S)NcsDtjs tdtstdf|i|S)Nzprogram `%s' not availablez)codec `%s' for program `%s' not available)r%r&r'rr has_codecr)codecfr(rrrIs ++  ++z0needs_codec..check_prog..newfuncr)r6rr5r()r6r ++check_progHszneeds_codec..check_progNr)r(r5r8rr7r needs_codecFs r9cCs6|dkr |dkr tjSt||rdStj|S)z%Test if program supports given codec.Z7zZrarTN)r%r&Zp7zip_supports_rarZprogram_supports_compressionr')r(r5rrrr4Ts ++ ++  r4cCs dd}|S)z2Skip test if TRAVIS build environment is detected.cs"fdd}t|ttt|S)Ncs"dtjvr ++td|i|S)NZTRAVISzSkip on TRAVIS CI build.)renvironrrrrrrr`s ++ ++z3skip_on_travis..check_func..newfuncrrrrrr_s z"skip_on_travis..check_funcNr)rrrrskip_on_travis]sr;)rsysr%rr.pathdirname__file__basedirjoinZdatadirZ ++patool_cmd version_inforrr#r)r-r3r9r4r;rrrrs&    +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/__pycache__/test_config.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/__pycache__/test_config.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/__pycache__/test_config.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/__pycache__/test_config.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,12 @@ ++o ++MV@s@ddlZddlmmZddlZddlZGdddejZ dS)Nc@s4eZdZddZddZddZddZd d ++Zd S) TestConfigurationcCs |ttjttjdSN) assertEqualsetpatoolibArchiveFormatsArchiveMimetypesvaluesselfr 3/builddir/patool-upstream-1.12/tests/test_config.pytest_archive_mimetypess  z(TestConfiguration.test_archive_mimetypescCsR|ttjttjtjD]}|D]}|dur%||tjvqqdSr) rrrrArchiveProgramskeysr ++assertTrueArchiveCommands)r commandscommandr r r test_archive_programss  z'TestConfiguration.test_archive_programscCs |ttjttjdSr)rrrArchiveCompressionsissubsetrr ++r r r test_compression_programs#s ++z+TestConfiguration.test_compression_programscCsD|ttjttjjtjjD] ++}||tj vqdSr) ++rrrrutil Encoding2Mimerr rrr mimer r r test_encoding_mimes's z%TestConfiguration.test_encoding_mimescCs&tjjD] ++}||tjvqdSr)rr FileText2Mimer rrrr r r test_filetext_mime-sz$TestConfiguration.test_filetext_mimeN)__name__ ++__module__ __qualname__rrrrrr r r r rs   r) ++builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arunittestrTestCaserr r r r s" +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/__pycache__/test_create.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/__pycache__/test_create.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/__pycache__/test_create.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/__pycache__/test_create.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,9 @@ ++o ++MV7@stddlZddlmmZddlZddlZddlZddl Z ddl ++m Z ddl m Z mZmZmZGdddejZdS)N)util)basedirdatadir needs_program ++patool_cmdc@seZdZedddZdS)ArchiveCreateTest7zc Csztjtd}z0tjtdtjtdg}tj|d}tjt ddd|g}| ++|t |Wt |dSt |w)N)dirtzt.txtzt.7zz-vvz--non-interactivecreate)rtmpdirrospathjoinrsys ++executablerextend run_checkedshutilrmtree)selfr filesarchivecmdr3/builddir/patool-upstream-1.12/tests/test_create.py test_creates  ++ zArchiveCreateTest.test_createN)__name__ ++__module__ __qualname__rrrrrrrsr)builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arunittestrrrpatoolibrrrrrTestCaserrrrrs"  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/__pycache__/test_diff.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/__pycache__/test_diff.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/__pycache__/test_diff.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/__pycache__/test_diff.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,9 @@ ++o ++MV@shddlZddlmmZddlZddlZddlZddl m ++Z ++ddl m Z m Z mZGdddejZdS)N) run_checked)datadir needs_program ++patool_cmdc@s,eZdZedededddZdS)ArchiveDiffTestdifftarunzipcCs8tjtd}tjtd}ttjtddd||gdS)Nzt.tarzt.zipz-vvz--non-interactiver)ospathjoinrrsys ++executabler)selfarchive1archive2r1/builddir/patool-upstream-1.12/tests/test_diff.py test_diffszArchiveDiffTest.test_diffN)__name__ ++__module__ __qualname__rrrrrrrs ++r)builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arunittestr rZ patoolib.utilrrrrTestCaserrrrrs "  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/__pycache__/test_extract.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/__pycache__/test_extract.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/__pycache__/test_extract.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/__pycache__/test_extract.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,10 @@ ++o ++MV@stddlZddlmmZddlZddlZddlZddl Z ddl ++m Z ddl m Z mZmZmZGdddejZdS)N)util)basedirdatadir needs_program ++patool_cmdc@seZdZedddZdS)ArchiveExtractTest7zc ++CsTtjtd}ztjtd}ttj t ++dddd||gWt |dSt |w)N)dirzt .7zz-vvz--non-interactiveextractz--outdir) rtmpdirrospathjoinr run_checkedsys ++executablershutilrmtree)selfr archiver4/builddir/patool-upstream-1.12/tests/test_extract.py test_extracts ++ zArchiveExtractTest.test_extractN)__name__ ++__module__ __qualname__rrrrrrrsr)builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arunittestr rrpatoolibrrrrrTestCaserrrrrs"  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/__pycache__/test_formats.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/__pycache__/test_formats.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/__pycache__/test_formats.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/__pycache__/test_formats.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,15 @@ ++o ++MV@sXddlZddlmmZddlZddlZddlm Z ddl ++m Z Gdddej Z dS)N) run_checked) ++patool_cmdc@seZdZddZdS) TestFormatscCsttjtdddgdS)Nz-vvz--non-interactiveformats)rsys ++executabler)selfr ++4/builddir/patool-upstream-1.12/tests/test_formats.pytest_list_formatsszTestFormats.test_list_formatsN)__name__ ++__module__ __qualname__r r ++r ++r ++r rs r)builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arunittestrZ patoolib.utilrrTestCaserr ++r ++r ++r s ++"   +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/__pycache__/test_list.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/__pycache__/test_list.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/__pycache__/test_list.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/__pycache__/test_list.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,9 @@ ++o ++MV-@shddlZddlmmZddlZddlZddlZddl m ++Z ++ddl m Z m Z mZGdddejZdS)N) run_checked)datadir needs_program ++patool_cmdc@seZdZedddZdS)ArchiveListTesttarcCs(tjtd}ttjtddd|gdS)Nzt.tarz-vvz--non-interactivelist)ospathjoinrrsys ++executabler)selfarchiver1/builddir/patool-upstream-1.12/tests/test_list.py test_listszArchiveListTest.test_listN)__name__ ++__module__ __qualname__rrrrrrrsr)builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arunittestr ++r Z patoolib.utilrrrrTestCaserrrrrs "  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/__pycache__/test_mime.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/__pycache__/test_mime.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/__pycache__/test_mime.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/__pycache__/test_mime.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,28 @@ ++o ++MV0@sXddlZddlmmZddlZddlZddlZddl m ++Z ++m Z Gdddej Z dS)N) needs_programdatadirc@seZdZddZdddZdddZedd d ++Zeded d d ZededddZ ededddZ ++ededddZ ededddZ ddZ dS)TestMimec Cstjt|}||\}}d}t|tr'|||v|d|dt||fn ||||d|||f||||d|||fdS)zSTest that file has given mime and encoding as determined by ++ given function.z,%s for archive `%s' should be %s, but was %sz MIME typezin %sZEncodingN) ospathjoinr ++isinstancetuple ++assertTruestr assertEqual) selffuncfilenamemimeencodingarchiveZ file_mime file_encodingZfail_msgr1/builddir/patool-upstream-1.12/tests/test_mime.py mime_tests  ++&zTestMime.mime_testNcC|tjj|||dS)zLTest that file has given mime and encoding as determined by ++ file(1).N)rpatoolibutilguess_mime_filerrrrrrrmime_test_file$zTestMime.mime_test_filecCr)zYTest that file has given mime and encoding as determined by the ++ mimetypes module.N)rrrguess_mime_mimedbrrrrmime_test_mimedb)rzTestMime.mime_test_mimedbfilecCs|dd|dd|dd|dd|dd|dd |d ++d |d d |d d |dd|dd|dd|dd|dd|dd|dd|dd|dd|dd|dd|dd|d d!|d"d!|d#d$|d%d$|d&d$|d'd$|d(d)|d*d)|d+d,|d-d,|d.d,|d/d,|d0d,d1|d2d,d3|d4d,d3|d5d,d6|d7d,d6|d8d,d6|d9d,d:|d;d,d<|d=d,d>|d?d@|dAd@|dBdC|dDdC|dd|dd|dEd|dFd|dGd|dHd|dIdJ|dKdJ|dLdJ|dMdJ|dNdO|dPdO|dQdR|dSdR|dTdR|dUdV|dWdV|dXdY|dZdY|d[d\|d]d\|d^d_|d`d_|dadb|dcdb|ddde|dfde|dgdh|didh|djdk|dldk|dmdn|dodn|dpdq|drd|dsdt|dudv|dwdvdS)xNt .7zapplication/x-7z-compressedt .cb7z t.cb7.foot.arjapplication/x-arjz t.arj.foo t.txt.bz2application/x-bzip2z t.txt.bz2.foot.cabz!application/vnd.ms-cab-compressedz t.cab.foot.cpioapplication/x-cpioz ++t.cpio.foot.debapplication/x-debian-packagez t.deb.foot.txt.gz)application/gzipzapplication/x-gzipz t.txt.gz.foot.jarapplication/zipz t.jar.fooz ++t.txt.lzmaapplication/x-lzmazt.txt.lzma.foot.txt.lzapplication/x-lzipz t.txt.lz.fooz t.txt.lzoapplication/x-lzopz t.txt.lzo.foot.rarapplication/x-rarz t.rar.foot.cbrz t.cbr.foot.rpmapplication/x-rpmz t.rpm.foot.tarapplication/x-tarz t.tar.foot.cbtz t.cbt.foot.tar.lzlzip t.tar.bz2bzip2t.tbz2t.tar.gzgzipt.tazt.tgzt.tar.xzxzt.tar.Zcompress ++t.tar.lzmalzmazt.txt.xzapplication/x-xzz t.txt.xz.foozt.txt.Zapplication/x-compressz t.txt.Z.foot.zipz t.zip.foot.cbzz t.cbz.foot.aceapplication/x-acez t.ace.foot.cbaz t.cba.foozt.txt.aapplication/x-archivez t.txt.a.foot.lhaapplication/x-lhat.lzhz t.lha.foot.arcapplication/x-arcz t.arc.fooz t.txt.lrzapplication/x-lrzipz t.txt.lrz.foozt.txt.rzapplication/x-rzipz t.txt.rz.foot.zooapplication/x-zooz t.zoo.foot.dmsapplication/x-dmsz t.dms.foot.ape audio/x-apez t.ape.foot.flac ++audio/flacz ++t.flac.foot.adfapplication/x-adfz t.adf.foot.chmapplication/x-chmz t.chm.foot.isoapplication/x-iso9660-imaget.epubt.apk)r1application/java-archivet.zpaqapplication/zpaqz ++t.zpaq.foorrrrrtest_mime_file.s                                                                          zTestMime.test_mime_filer?cC|ddddS)Nz t.tar.lz.foor<r?rorprrrtest_mime_file_lzipzTestMime.test_mime_file_lziprAcCs |ddd|ddddS)Nz t.tar.bz2.foor<rAz ++t.tbz2.foororprrrtest_mime_file_bzipszTestMime.test_mime_file_bziprDcCs.|ddd|ddd|ddddS)Nz t.tar.gz.foor<rDz t.taz.fooz t.tgz.foororprrrtest_mime_file_gzipszTestMime.test_mime_file_gziprHcCrr)Nz t.tar.xz.foor<rHrorprrrtest_mime_file_xziprtzTestMime.test_mime_file_xzip ++uncompresscCrr)Nz t.tar.Z.foor<rJrorprrrtest_mime_file_compressrtz TestMime.test_mime_file_compresscCs|dd|dd|dd|dd|dd |d ++d |d d |dd|dd|dd|dd|dd|dd|dd |dd|dd|dd|d dd!|d"dd#|d$dd%|d&dd'|d(dd)|d*dd+|d,dd#|d-dd!|d.dd#|d/d|d0d|d1d2|d3d4|d5d6|d7d6|d8d9|d:d9|d;d<|d=d>|d?d@|dAdB|dCdD|dEdF|dGdH|dIdJ|dKdL|dMdN|dOdP|dQdR|dSdT|dUdV|dWdX|dYdZ|d[d\|d]d\|d^d_|d`dadS)bNr"r#r$r%r&zt .bz2r(r)zapplication/x-cabr8)zapplication/rarr7r*r+r,r-zt.gzr/r0rlzt.lzmar2r3r4zt.lzor5r6r9)z$application/x-redhat-package-managerr:r;r<r=r@rArCrDrKrLrGrHr>r?rIrJrErBrFr.r'zt .xzrMzt.ZrNrO)r1zapplication/x-zip-compressedrPrQrRrSzt.arTrUrVrWzapplication/x-lzhzt.alzzapplication/x-alziprXrYzt.lrzrZzt.rzr[r\r]r^r_zt.sharzapplication/x-sharr`razt.shnz audio/x-shnrbrcrdrerfrgrhrirjr1rkzt.vhdzapplication/x-vhdrmrn)r rprrrtest_mime_mimedbsl                                            zTestMime.test_mime_mimedb)N)__name__ ++__module__ __qualname__rrr rrqrsrurvrwryrzrrrrrs, ++ ++ ++^      r)builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arunittestrrrrTestCaserrrrrs ++" +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/__pycache__/test_recompress.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/__pycache__/test_recompress.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/__pycache__/test_recompress.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/__pycache__/test_recompress.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,10 @@ ++o ++MV@spddlZddlmmZddlZddlZddlZddl Z ddl ++m Z ddl m Z mZmZGdddejZdS)N)util)datadirneeds_one_program ++patool_cmdc@s$eZdZddZedddZdS)ArchiveRecompressTestc Cstjt|}tj|d}tj|d}z"t||t t ++j t ddd|gWtj |r6t|dSdStj |rDt|ww)z#Recompress archive with given name.r)suffixz-vvz--non-interactive ++recompressN)ospathjoinrsplitextrtmpfileshutilcopy run_checkedsys ++executablerexistsremove)selfnamearchiveextrr7/builddir/patool-upstream-1.12/tests/test_recompress.pyr s    z ArchiveRecompressTest.recompress)zip7zcCs|ddS)Nzt.zip)r )rrrr test_repack%sz!ArchiveRecompressTest.test_repackN)__name__ ++__module__ __qualname__r rrrrrrrs r)builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arunittestr ++rrpatoolibrrrrTestCaserrrrrs"  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/__pycache__/test_repack.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/__pycache__/test_repack.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/__pycache__/test_repack.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/__pycache__/test_repack.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,11 @@ ++o ++MV@stddlZddlmmZddlZddlZddlZddl Z ddl ++m Z ddl m Z mZmZmZGdddejZdS)N)util)datadir needs_programneeds_one_program ++patool_cmdc@sdeZdZddZedededddZededed d ++d Zedd d ZdS)ArchiveRepackTestc Csttjt|}t}z(tj||}ttjt ddd||gttjt dd||gWt ++ |dSt ++ |w)z0Repack archive with name1 to archive with name2.z-vvz--non-interactiverepackdiffN) ospathjoinrrtmpdir run_checkedsys ++executablershutilrmtree)selfZname1Zname2archive1rarchive2r3/builddir/patool-upstream-1.12/tests/test_repack.pyr szArchiveRepackTest.repackr ++)tarstar7z)ziprcC|dddS)Nzt.tart.zipr rrrr test_repack$zArchiveRepackTest.test_repack)gzipr)bzip2rcCr)Nt.tar.gzz t.tar.bz2rr rrr-test_repack_same_format_different_compression*r"z?ArchiveRepackTest.test_repack_same_format_different_compressioncCs|dd|dddS)Nr%z t1.tar.gzrzt1.ziprr rrrtest_repack_same_format0s z)ArchiveRepackTest.test_repack_same_formatN) __name__ ++__module__ __qualname__r rrr!r&r'rrrrrs r)builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arunittestr rrpatoolibrrrrrTestCaserrrrrs"  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/__pycache__/test_search.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/__pycache__/test_search.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/__pycache__/test_search.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/__pycache__/test_search.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,9 @@ ++o ++MV0@shddlZddlmmZddlZddlZddlZddl m ++Z ++ddl m Z m Z mZGdddejZdS)N) run_checked)datadir needs_program ++patool_cmdc@s4eZdZedededddZddZdS) ArchiveSearchTestgrepunziptarcCs<d}tjtd}|||tjtd}|||dS)NZ42zt.tarzt.zip)ospathjoinrsearchselfpatternarchiver3/builddir/patool-upstream-1.12/tests/test_search.py test_searchs ++ zArchiveSearchTest.test_searchcCsttjtddd||gdS)Nz-vvz--non-interactiver)rsys ++executablerrrrrr"szArchiveSearchTest.searchN)__name__ ++__module__ __qualname__rrrrrrrrs  r)builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arunittestr rZ patoolib.utilrrrrTestCaserrrrrs "  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/__pycache__/test_test.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/__pycache__/test_test.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/__pycache__/test_test.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/__pycache__/test_test.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,9 @@ ++o ++MV%@shddlZddlmmZddlZddlZddlZddl m ++Z ++ddl m Z m Z mZGdddejZdS)N) run_checked)datadir needs_program ++patool_cmdc@seZdZedddZdS)ArchiveTestTest7zcCs&tjtd}ttjtdd|gdS)Nzt .7zz--non-interactivetest)ospathjoinrrsys ++executabler)selfarchiver1/builddir/patool-upstream-1.12/tests/test_test.py test_testszArchiveTestTest.test_testN)__name__ ++__module__ __qualname__rrrrrrrsr)builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arunittestr ++r Z patoolib.utilrrrrTestCaserrrrrs "  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/__pycache__/test_util.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/__pycache__/test_util.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/__pycache__/test_util.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/__pycache__/test_util.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,8 @@ ++o ++MVT@sLddlZddlmmZddlZddlZddlm Z Gdddej ++Z dS)N)utilc@s$eZdZddZddZddZdS)UtilTestcCs0t}}|t|||t||dS)N)__file__ ++assertTrueris_same_filename is_same_file)self filename1 filename2r 1/builddir/patool-upstream-1.12/tests/test_util.pytest_samefile1szUtilTest.test_samefile1cCNtjt}tj|}tj|d}|t|||t||dS)Nz..) ospathdirnamerjoinrrrrrZ parentdirr r ++r r r test_samefile2 ++  zUtilTest.test_samefile2cCr)N.) rrrrr assertFalserrrrr r r test_samefile3"rzUtilTest.test_samefile3N)__name__ ++__module__ __qualname__r rrr r r r rs r) builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arunittestrpatoolibrTestCaserr r r r s"  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/__init__.cpython-310.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/__init__.cpython-310.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/__init__.cpython-310.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/__init__.cpython-310.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,64 @@ ++o ++MV'@shddlZddlZddlZddlZddlmZmZdZGdddZGdddej Z ++d d ++Z d d Z dS) N)basedirdatadir42c@seZdZdZdZdZdZdS)ContentzThe test archives have one of several set of content files. ++ The different content file sets have each a constant defined ++ by this class. ++ recursiveZ ++singlefileZ multifileN)__name__ ++__module__ __qualname____doc__ Recursive ++Singlefile Multifilerr9/builddir/patool-upstream-1.12/tests/archives/__init__.pyrs ++ ++rc@seZdZdZdZddZejfddZddd Z d ++d Z ++d d Z ddZ ddZ ddZdejfddZdddZddZddZdS) ArchiveTestzAHelper class for archive tests, handling one commandline program.NcKsZ|||ds|||j||dtjd|ds+|j|fi|dSdS)z}Run archive commands list, test, extract and create. ++ All keyword arguments are delegated to the create test function.Z skip_testcheck)rZ skip_createN) archive_listget archive_testarchive_extractrr archive_create)selffilenamekwargsrrrarchive_commands5s ++ ++ ++ ++zArchiveTest.archive_commandscCsdtjt|}|tj|d||||tjd|ttdd}|j||dddS)zTest archive extraction. archive path is not absolute: %rz..N) verbosity) ospathjoinr ++assertTrueisabs_archive_extractlenr)rrrarchiveZ ++relarchiverrrr?s ++ zArchiveTest.archive_extractrc Cstjjtd}z4tj|}ztj||j|dd}|r"||||W|r*t|n |r3t|wwWt ++|dSt ++|w)NdirFprogramr interactive) patoolibutiltmpdirrchdirextract_archiver*check_extracted_archivershutilrmtree)rr&rrr.olddiroutputrrrr$Hs   ++ zArchiveTest._archive_extractcCs|tjkr ||d||dtj|d}||ddS|tjkr>t t ++}tj t j ||}|||dS|tjkr_tj|d}||dtj|d}||ddSdS)Ntt.txtt2.txt)rr assertEqualcheck_directoryrr r!check_textfiler get_nonexisting_directorygetcwdbasenamer,r-get_single_outfiler)rr&r5rZtxtfileZnedZexpected_outputZtxtfile2rrrr1Ws ++   ++  ++ z#ArchiveTest.check_extracted_archivecCs,|tj|||tj||dS)zCheck that directory exists.N)r"rr isdirr9r>)rdirname expectednamerrrr:iszArchiveTest.check_directorycCs@|tj|t||tj|||t|tdS)z7Check that filename exists and has the default content.N) r"rr isfilereprr9r>get_filecontentTextFileContent)rrrBrrrr;nszArchiveTest.check_textfilecC0tjt|}dD] }tj||j|ddq dS)zTest archive listing.rrrFr)N)rr r!rr, list_archiver*rrr&rrrrrtzArchiveTest.archive_listcCrG)zTest archive testing.rHFr)N)rr r!rr, test_archiver*rKrrrrzrLzArchiveTest.archive_testc Cs|dur"|tjkr d}n|tjkrd}n|tjkrd}ntd|tjt}zdD] }|j |||j ++|dq+W|rBt |dSdS|rLt |ww)zTest archive creation.N)r6)r7)r7r8zinvalid check value %rrH)r*r) rr r r ++ValueErrorr,r-r/r_archive_creater*r)rr&srcfilesrr4rrrrrs$ ++ ++ ++   zArchiveTest.archive_createc Cs|D]}|tj||tj|qtjjt d}z9tj ++||}|tj|d|tj |||d|d|tj || ||||Wt|dSt|w)zCreate archive from filename.r'rF)rr+r*N) assertFalserr r#r"existsr,r-r.rr!create_archiverCcheck_created_archive_with_testcheck_created_archive_with_diffr2r3)rr&rPr*rsrcfiler.rrrrOs ++zArchiveTest._archive_createcCstj}|j}|jdvrd}n:|jdkrd}n2|jdkrd}n*|jdkr&d}n"|jd vr1d ++}tj}n|jd kr9d }n|jd krAd}n|jdkrHdS|||ddS)N)compresspy_gzipgzippy_bz2bzip2py_lzmaxzzipunzip)rzipshortenpy_echolcab ++cabextract genisoimage7zshar)r*)r,rMr*rJ)rr&commandr*rrrrTs( ++ ++ ++ ++ ++ ++ ++ ++z+ArchiveTest.check_created_archive_with_testc CsDtjd}|s ++dS|j}|jdkrd}n|jdkrd}n|jdkr%d}n|jd kr-d ++}n|jd kr4d }tjjtd }z`tj|}zHtj||dd}t|dkret j ++ t |d}tj |d||gn|D]} t j ++ t | }t j ++ || } ++tj |d|| ++gqgW|rt |n |rt |wwWt|dSt|w)z7Extract created archive again and compare the contents.diffNrWrYr^r_rcrdrgunsharrerfr'F)r*r+rrz-urN)r,r- find_programr*r.rr/r0r%rr r!r run_checkedr2r3) rr&rPrir*r.r4r5sourcerVtargetrrrrUsF  ++ ++ ++ ++ ++   ++ z+ArchiveTest.check_created_archive_with_diff)r)Nr)rr r ++r r*rrr rr$r1r:r;rrrrOrTrUrrrrr/s ++ ++  ++ rcCs4t| }|WdS1swYdS)zGet file data as text.N)openread)rforrrrEs ++$rEcCsJtj|d}tj|r#|d7}t|dkrtd|tj|s |S)z>Note: this is _not_ intended to be used to create a directory.fooadz/could not construct unique directory name at %rN)rr r!rRr%rN)rdrrrr<s    r<) unittestrr2r,rrrFrTestCaserrEr<rrrrs5  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_7z.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_7z.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_7z.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_7z.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,79 @@ ++o ++MV}@sNddlZddlmmZddlmZmZddlm Z m ++Z ++GdddeZ dS)N) ArchiveTestContent) needs_program needs_codecc@sdeZdZdZeeddZeedddZedeedd Zedeedd ++d Z d S) Test7z7zcCs|d|d|d|d|jdtjd|d|d|d |d ++|d |d |d |d|d|d|d|d|jdtjd|jdtjd|jd tjd|jd ++dd|jd tjd|d |d |d|jddd|jddd|d|jddd|d|d|d |d ++|d |d |d |d|d|d|d|d|jdtjd|jdtjddS)Nzt .7zzt .cb7zt.zipzt.cbzzt.txt.xzcheckzt.txt.gzz t.txt.bz2z ++t.txt.lzmazt.jarzt.txt.Zzt.cabzt.arjzt.cpiozt.rpmzt.debzt.isozt.vhd)archive_commandsr ++Singlefile archive_listarchive_extract archive_testarchive_createselfr8/builddir/patool-upstream-1.12/tests/archives/test_7z.pytest_7zsV ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++zTest7z.test_7zrarcC"|d|d|ddS)Nzt.rarrrrrrrr test_7z_rarEs ++ ++zTest7z.test_7z_rarfilecCs|jddd|jddd|jddd|jddd|jddtjd|d |d ++|d |d |d |d|d|d|d|d|jd dd|jd ++tjd|jd dd|jd tjd|d |d|d|jddd|jddd|d|d |d ++|d |d |d |d|d|d|d|ddS)Nzt.7z.fooT) skip_createz t.cb7.fooz t.zip.fooz t.cbz.fooz t.txt.xz.foo)rr z t.txt.gz.fooz t.txt.bz2.fooz t.jar.fooz t.txt.Z.fooz t.cab.fooz t.arj.fooz ++t.cpio.fooz t.rpm.fooz t.deb.fooz t.iso.foor ++)r rr rrrrrrr test_7z_fileLsF ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++zTest7z.test_7z_filecCr)Nz t.rar.foorrrrrtest_7z_rar_filess ++ ++zTest7z.test_7z_rar_fileN) ++__name__ ++__module__ __qualname__programrrrrrrrrrrrs ++- ++ %r) builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrrrs* +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_7za.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_7za.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_7za.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_7za.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,38 @@ ++o ++MVr @sJddlZddlmmZddlmZmZddlm Z GdddeZ ++dS)N) ArchiveTestContent) needs_programc@s8eZdZdZeeddZedeeddZdS)Test7za7zacCs|d|d|d|d|d|d|d|d|d |d ++|jdtjd |jdtjd |jddd |jdtjd |d |d|d|d|d|d |jdtjd |jdtjd dS) Nzt .7zzt .cb7zt.zipzt.cbzzt.txt.gzz t.txt.bz2zt.jarzt.txt.Zzt.cabzt.rpmcheck)archive_commands archive_listarchive_extractr ++Singlefile archive_testarchive_createselfr9/builddir/patool-upstream-1.12/tests/archives/test_7za.py test_p7azips, ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++zTest7za.test_p7azipfilecCs|jddd|jddd|jddd|jddd|d|d|d |d ++|d |d |jddd |jdtjd |jd dd |jd ++tjd |d |d|d|d |d ++|d dS)Nzt.7z.fooT) skip_createz t.cb7.fooz t.zip.fooz t.cbz.fooz t.txt.gz.fooz t.txt.bz2.fooz t.jar.fooz t.txt.Z.fooz t.cab.fooz t.rpm.foor )r r r rrrrrrr test_7za_file0s( ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++zTest7za.test_7za_fileN)__name__ ++__module__ __qualname__programrrrrrrrrs ++r) builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrrs*  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_7zr.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_7zr.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_7zr.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_7zr.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,8 @@ ++o ++MV~@sFddlZddlmmZddlmZddlmZGdddeZ dS)N) ArchiveTest) needs_programc@s8eZdZdZeeddZedeeddZdS)Test7zr7zrcCs|d|ddS)Nzt .7zzt .cb7archive_commandsselfr 9/builddir/patool-upstream-1.12/tests/archives/test_7zr.pytest_7zrs ++zTest7zr.test_7zrfilecCs |jddd|jddddS)Nzt.7z.fooT) skip_createz t.cb7.foorr ++r r r test_7z_fileszTest7zr.test_7z_fileN)__name__ ++__module__ __qualname__programrrrr r r r rs ++r) ++builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrr r r r s&  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_ar.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_ar.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_ar.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_ar.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,7 @@ ++o ++MV@sNddlZddlmmZddlmZmZddlm Z m ++Z ++GdddeZ dS)N) ArchiveTestContent) needs_programneeds_osc@sHeZdZdZedeeddZededeeddZdS) TestArarposixcCs|jdtjddS)Nzt.txt.a)check)archive_commandsr ++Singlefileselfr8/builddir/patool-upstream-1.12/tests/archives/test_ar.pytest_arszTestAr.test_arfilecCs|jdddddS)Nz t.txt.a.fooT) skip_creater )r rrrr test_ar_fileszTestAr.test_ar_fileN)__name__ ++__module__ __qualname__programrrrrrrrrrs r) builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrrrs* +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_arc.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_arc.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_arc.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_arc.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,7 @@ ++o ++MVT@sJddlZddlmmZddlmZmZddlm Z GdddeZ ++dS)N) ArchiveTestContent) needs_programc@s8eZdZdZeeddZedeeddZdS)TestArcarccCs|jdtjddS)Nzt.arc)checkarchive_commandsr Multifileselfr9/builddir/patool-upstream-1.12/tests/archives/test_arc.pytest_arcszTestArc.test_arcfilecCs|jdtjdddS)Nz t.arc.fooT)r skip_creater ++r rrr test_arc_fileszTestArc.test_arc_fileN)__name__ ++__module__ __qualname__programrrrrrrrrs ++r) builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrrs*  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_archmage.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_archmage.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_archmage.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_archmage.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,6 @@ ++o ++MVx@sFddlZddlmmZddlmZddlmZGdddeZ dS)N) ArchiveTest) needs_programc@s8eZdZdZeeddZedeeddZdS) TestArchmagearchmagecC|jddd|ddS)Nzt.chmcheckarchive_extract archive_testselfr>/builddir/patool-upstream-1.12/tests/archives/test_archmage.py test_archmageszTestArchmage.test_archmagefilecCr)Nz t.chm.foor r rrrrtest_archmage_fileszTestArchmage.test_archmage_fileN)__name__ ++__module__ __qualname__programrrrrrrrrs ++r) ++builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrs&  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_arj.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_arj.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_arj.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_arj.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,7 @@ ++o ++MV@sFddlZddlmmZddlmZddlmZGdddeZ dS)N) ArchiveTest) needs_programc@s8eZdZdZeeddZedeeddZdS)TestArjarjcCs|ddS)Nzt.arjarchive_commandsselfr 9/builddir/patool-upstream-1.12/tests/archives/test_arj.pytest_arjszTestArj.test_arjfilecCs|jddddS)Nz t.arj.fooT) skip_createrr ++r r r test_arj_fileszTestArj.test_arj_fileN)__name__ ++__module__ __qualname__programrrrr r r r rs ++r) ++builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrr r r r s&  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_bsdcpio.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_bsdcpio.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_bsdcpio.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_bsdcpio.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,8 @@ ++o ++MV,@sFddlZddlmmZddlmZddlmZGdddeZ dS)N) ArchiveTest) needs_programc@s8eZdZdZeeddZedeeddZdS) TestBsdcpiobsdcpiocCs|ddS)Nzt.cpioarchive_commandsselfr =/builddir/patool-upstream-1.12/tests/archives/test_bsdcpio.py test_bsdcpioszTestBsdcpio.test_bsdcpiofilecCs|jddddS)Nz ++t.cpio.fooT) skip_createrr ++r r r test_bsdcpio_fileszTestBsdcpio.test_bsdcpio_fileN)__name__ ++__module__ __qualname__programrrrr r r r rs ++r) ++builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrr r r r s&  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_bsdtar.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_bsdtar.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_bsdtar.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_bsdtar.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,28 @@ ++o ++MVE @sJddlZddlmmZddlmZddlmZm Z GdddeZ ++dS)N) ArchiveTest) needs_program needs_codecc@seZdZdZeeddZeedddZeeeddd Zeed ++d d Z eed ddZ ++eedddZ edeeddZ edeedddZ edeedddZedeed ++ddZedeedddZdS) ++TestBsdtarbsdtarcC|d|ddS)Nzt.tarzt.cbtarchive_commandsselfrs& +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_bzip2.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_bzip2.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_bzip2.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_bzip2.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,9 @@ ++o ++MV@sJddlZddlmmZddlmZmZddlm Z GdddeZ ++dS)N) ArchiveTestContent) needs_programc@s8eZdZdZeeddZedeeddZdS) TestBzip2bzip2cCs.|jdtjd|d|jdtjddS)Nz t.txt.bz2check)archive_extractr ++Singlefile archive_testarchive_createselfr;/builddir/patool-upstream-1.12/tests/archives/test_bzip2.py ++test_bzip2s ++zTestBzip2.test_bzip2filecCs|jdtjd|ddS)Nz t.txt.bz2.foor )r rr r rrrrtest_bzip2_fileszTestBzip2.test_bzip2_fileN)__name__ ++__module__ __qualname__programrrrrrrrrs ++r) builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrrs*  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_cabextract.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_cabextract.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_cabextract.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_cabextract.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,9 @@ ++o ++MV@sFddlZddlmmZddlmZddlmZGdddeZ dS)N) ArchiveTest) needs_programc@s8eZdZdZeeddZedeeddZdS)TestCabextract ++cabextractcC|d|jddddS)Nzt.cabcheck archive_listarchive_extractselfr@/builddir/patool-upstream-1.12/tests/archives/test_cabextract.pytest_cabextracts ++zTestCabextract.test_cabextractfilecCr)Nz t.cab.foor r rrrrtest_cabextract_files ++z#TestCabextract.test_cabextract_fileN)__name__ ++__module__ __qualname__programrrrrrrrrs ++r) ++builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrs&  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_chmlib.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_chmlib.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_chmlib.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_chmlib.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,7 @@ ++o ++MV2@sFddlZddlmmZddlmZddlmZGdddeZ dS)N) ArchiveTest) needs_programc@s8eZdZdZeeddZedeeddZdS) ++TestChmlibextract_chmLibcC|jddddS)Nzt.chmcheckarchive_extractselfrs&  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_clzip.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_clzip.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_clzip.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_clzip.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,10 @@ ++o ++MV@sJddlZddlmmZddlmZmZddlm Z GdddeZ ++dS)N) ArchiveTestContent) needs_programc@s8eZdZdZeeddZedeeddZdS) TestClzipclzipcCs.|d|jdtjd|jdtjddS)Nzt.txt.lzcheck) archive_testarchive_extractr ++Singlefilearchive_createselfr;/builddir/patool-upstream-1.12/tests/archives/test_clzip.py ++test_clzips ++zTestClzip.test_clzipfilecCs|d|jdtjddS)Nz t.txt.lz.foor )r r rr rrrrtest_clzip_files ++zTestClzip.test_clzip_fileN)__name__ ++__module__ __qualname__programrrrrrrrrs ++r) builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrrs*  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_compress.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_compress.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_compress.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_compress.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,6 @@ ++o ++MV@sJddlZddlmmZddlmZmZddlm Z GdddeZ ++dS)N) ArchiveTestContent) needs_programc@s eZdZdZeeddZdS) TestCompresscompresscCs|jdtjddS)Nzt.txt.Z)check)archive_creater ++Singlefile)selfr >/builddir/patool-upstream-1.12/tests/archives/test_compress.py test_compressszTestCompress.test_compressN)__name__ ++__module__ __qualname__programrrr r r rrsr) builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrr r r rs*  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_cpio.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_cpio.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_cpio.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_cpio.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,8 @@ ++o ++MV @sFddlZddlmmZddlmZddlmZGdddeZ dS)N) ArchiveTest) needs_programc@s8eZdZdZeeddZedeeddZdS)TestCpiocpiocCs|ddS)Nzt.cpioarchive_commandsselfr :/builddir/patool-upstream-1.12/tests/archives/test_cpio.py test_cpioszTestCpio.test_cpiofilecCs|jddddS)Nz ++t.cpio.fooT) skip_createrr ++r r r test_cpio_fileszTestCpio.test_cpio_fileN)__name__ ++__module__ __qualname__programrrrr r r r rs ++r) ++builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrr r r r s&  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_dpkg.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_dpkg.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_dpkg.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_dpkg.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,9 @@ ++o ++MV@sFddlZddlmmZddlmZddlmZGdddeZ dS)N) ArchiveTest) needs_programc@s8eZdZdZeeddZedeeddZdS)TestDpkgzdpkg-debcC&|d|jddd|ddS)Nzt.debcheck archive_listarchive_extract archive_testselfr:/builddir/patool-upstream-1.12/tests/archives/test_dpkg.py test_dpkgs ++zTestDpkg.test_dpkgfilecCr)Nz t.deb.foorr ++rrrrtest_dpkg_files ++zTestDpkg.test_dpkg_fileN)__name__ ++__module__ __qualname__programrrrrrrrrs ++r) ++builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrs&  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_flac.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_flac.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_flac.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_flac.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,8 @@ ++o ++MV@sFddlZddlmmZddlmZddlmZGdddeZ dS)N) ArchiveTest) needs_programc@s8eZdZdZeeddZedeeddZdS)TestFlacflaccCs*|jddd|d|jddddS)Nzt.flaccheck)zt.wav)srcfiles)archive_extract archive_testarchive_createselfr:/builddir/patool-upstream-1.12/tests/archives/test_flac.py test_flacs ++zTestFlac.test_flacfilecCs|jddd|ddS)Nz ++t.flac.foor)r r rrrrtest_flac_fileszTestFlac.test_flac_fileN)__name__ ++__module__ __qualname__programrrrrrrrrs ++r) ++builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrs&  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_genisoimage.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_genisoimage.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_genisoimage.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_genisoimage.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,6 @@ ++o ++MV@sFddlZddlmmZddlmZddlmZGdddeZ dS)N) ArchiveTest) needs_programc@s(eZdZdZedeeddZdS)TestGenisoimage genisoimage7zcCs|ddS)Nzt.iso)archive_create)selfr A/builddir/patool-upstream-1.12/tests/archives/test_genisoimage.pytest_genisoimagesz TestGenisoimage.test_genisoimageN)__name__ ++__module__ __qualname__programrr r r r r rs ++r) ++builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrr r r r s&  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_gzip.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_gzip.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_gzip.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_gzip.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,8 @@ ++o ++MV@sJddlZddlmmZddlmZmZddlm Z GdddeZ ++dS)N) ArchiveTestContent) needs_programc@s8eZdZdZeeddZedeeddZdS)TestGzipgzipcCs$|jdtjd|jdtjddS)Nzt.txt.gzcheckzt.txt.Z)archive_commandsr ++Singlefilearchive_extractselfr:/builddir/patool-upstream-1.12/tests/archives/test_gzip.py test_gzipszTestGzip.test_gzipfilecCs$|jdddd|jdtjddS)Nz t.txt.gz.fooT) skip_creater ++z t.txt.Z.foor )r r rr rrrrtest_gzip_fileszTestGzip.test_gzip_fileN)__name__ ++__module__ __qualname__programrrrrrrrrs ++r) builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrrs*  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_isoinfo.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_isoinfo.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_isoinfo.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_isoinfo.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,6 @@ ++o ++MV@sFddlZddlmmZddlmZddlmZGdddeZ dS)N) ArchiveTest) needs_programc@s0eZdZdZeeddZeeddZdS) TestIsoinfoisoinfocC|ddS)Nzt.iso archive_listselfr =/builddir/patool-upstream-1.12/tests/archives/test_isoinfo.py test_isoinfozTestIsoinfo.test_isoinfocCr)Nz t.iso.foor r r r rtest_isoinfo_filerzTestIsoinfo.test_isoinfo_fileN)__name__ ++__module__ __qualname__programrrrr r r rrs  ++r) ++builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrr r r rs&  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_lbzip2.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_lbzip2.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_lbzip2.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_lbzip2.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,9 @@ ++o ++MV@sJddlZddlmmZddlmZmZddlm Z GdddeZ ++dS)N) ArchiveTestContent) needs_programc@s8eZdZdZeeddZedeeddZdS) ++TestLbzip2lbzip2cCs.|jdtjd|d|jdtjddS)Nz t.txt.bz2check)archive_extractr ++Singlefile archive_testarchive_createselfrs*  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_lcab.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_lcab.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_lcab.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_lcab.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,7 @@ ++o ++MV@sFddlZddlmmZddlmZddlmZGdddeZ dS)N) ArchiveTest) needs_programc@s(eZdZdZeeedddZdS)TestLcablcab ++cabextractcCs|ddS)Nzt.cab)archive_create)selfr :/builddir/patool-upstream-1.12/tests/archives/test_lcab.py test_lcabszTestLcab.test_lcabN)__name__ ++__module__ __qualname__programrr r r r r rs ++r) ++builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrr r r r s&  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_lha.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_lha.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_lha.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_lha.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,7 @@ ++o ++MV9@sFddlZddlmmZddlmZddlmZGdddeZ dS)N) ArchiveTest) needs_programc@s8eZdZdZeeddZedeeddZdS)TestLhalhacCs|ddS)Nzt.lhaarchive_commandsselfr 9/builddir/patool-upstream-1.12/tests/archives/test_lha.py _test_lhaszTestLha._test_lhafilecCs|jddddS)Nz t.lha.fooT) skip_createrr ++r r r test_lha_fileszTestLha.test_lha_fileN)__name__ ++__module__ __qualname__programrrrr r r r rs ++r) ++builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrr r r r s&  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_lhasa.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_lhasa.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_lhasa.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_lhasa.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,13 @@ ++o ++MV@sFddlZddlmmZddlmZddlmZGdddeZ dS)N) ArchiveTest) needs_programc@s eZdZdZeeddZdS) TestLhasalhasacCs|ddS)Nzt.lha)archive_extract)selfr ++;/builddir/patool-upstream-1.12/tests/archives/test_lhasa.py ++test_lhasaszTestLhasa.test_lhasaN)__name__ ++__module__ __qualname__programrr r ++r ++r ++r rsr) ++builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrr ++r ++r ++r s&  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_lrzip.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_lrzip.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_lrzip.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_lrzip.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,8 @@ ++o ++MVW@sJddlZddlmmZddlmZmZddlm Z GdddeZ ++dS)N) ArchiveTestContent) needs_programc@s eZdZdZeeddZdS) TestLrziplrzipcCs.|d|jdtjd|jdtjddS)Nz t.txt.lrz)check) archive_testarchive_extractr ++Singlefilearchive_create)selfr;/builddir/patool-upstream-1.12/tests/archives/test_lrzip.py ++test_lrzips ++zTestLrzip.test_lrzipN)__name__ ++__module__ __qualname__programrrrrrrrsr) builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrrs*  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_lzip.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_lzip.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_lzip.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_lzip.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,9 @@ ++o ++MV@sJddlZddlmmZddlmZmZddlm Z GdddeZ ++dS)N) ArchiveTestContent) needs_programc@s8eZdZdZeeddZedeeddZdS)TestLziplzipcCs.|d|jdtjd|jdtjddS)Nzt.txt.lzcheck) archive_testarchive_extractr ++Singlefilearchive_createselfr:/builddir/patool-upstream-1.12/tests/archives/test_lzip.py test_lzips ++zTestLzip.test_lzipfilecCs|d|jdtjddS)Nz t.txt.lz.foor )r r rr rrrrtest_lzip_files ++zTestLzip.test_lzip_fileN)__name__ ++__module__ __qualname__programrrrrrrrrs ++r) builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrrs*  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_lzma.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_lzma.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_lzma.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_lzma.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,8 @@ ++o ++MV@sJddlZddlmmZddlmZmZddlm Z GdddeZ ++dS)N) ArchiveTestContent) needs_programc@s eZdZdZeeddZdS)TestLzmalzmacCs.|d|jdtjd|jdtjddS)Nz ++t.txt.lzma)check) archive_testarchive_extractr ++Singlefilearchive_create)selfr:/builddir/patool-upstream-1.12/tests/archives/test_lzma.py test_lzmas ++zTestLzma.test_lzmaN)__name__ ++__module__ __qualname__programrrrrrrrsr) builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrrs*  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_lzop.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_lzop.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_lzop.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_lzop.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,8 @@ ++o ++MVc@sJddlZddlmmZddlmZmZddlm Z GdddeZ ++dS)N) ArchiveTestContent) needs_programc@s8eZdZdZeeddZedeeddZdS)TestLzoplzopcCs|jdtjddS)Nz t.txt.lzo)checkarchive_commandsr ++Singlefileselfr:/builddir/patool-upstream-1.12/tests/archives/test_lzop.py test_lzopszTestLzop.test_lzopfilecCs|jddtjddS)Nz t.txt.lzo.fooT) skip_creater r ++r rrrtest_lzop_fileszTestLzop.test_lzop_fileN)__name__ ++__module__ __qualname__programrrrrrrrrs ++r) builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrrs*  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_mac.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_mac.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_mac.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_mac.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,7 @@ ++o ++MV{@sFddlZddlmmZddlmZddlmZGdddeZ dS)N) ArchiveTest) needs_programc@s8eZdZdZeeddZedeeddZdS)TestMacmaccCs*|jddd|d|jddddS)Nzt.apecheck)zt.wav)srcfiles)archive_extract archive_testarchive_createselfr9/builddir/patool-upstream-1.12/tests/archives/test_mac.pytest_macs ++zTestMac.test_macfilecCs|jddddS)Nz t.ape.foor)r rrrr test_mac_fileszTestMac.test_mac_fileN)__name__ ++__module__ __qualname__programrrrrrrrrs ++r) ++builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrs&  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_nomarch.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_nomarch.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_nomarch.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_nomarch.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,11 @@ ++o ++MV@sJddlZddlmmZddlmZmZddlm Z GdddeZ ++dS)N) ArchiveTestContent) needs_programc@s8eZdZdZeeddZedeeddZdS) TestNomarchnomarchcC(|d|d|jdtjddS)Nzt.arccheck archive_test archive_listarchive_extractr Multifileselfr=/builddir/patool-upstream-1.12/tests/archives/test_nomarch.py test_nomarchs ++ ++zTestNomarch.test_nomarchfilecCr )Nz t.arc.foor ++r rrrrtest_nomarch_files ++ ++zTestNomarch.test_nomarch_fileN)__name__ ++__module__ __qualname__programrrrrrrrrs ++r) builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrrs*  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_pbzip2.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_pbzip2.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_pbzip2.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_pbzip2.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,9 @@ ++o ++MV@sJddlZddlmmZddlmZmZddlm Z GdddeZ ++dS)N) ArchiveTestContent) needs_programc@s8eZdZdZeeddZedeeddZdS) ++TestPbzip2pbzip2cCs.|jdtjd|d|jdtjddS)Nz t.txt.bz2check)archive_extractr ++Singlefile archive_testarchive_createselfrs*  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_pdlzip.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_pdlzip.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_pdlzip.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_pdlzip.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,10 @@ ++o ++MV@sJddlZddlmmZddlmZmZddlm Z GdddeZ ++dS)N) ArchiveTestContent) needs_programc@s8eZdZdZeeddZedeeddZdS) ++TestPdlzippdlzipcCs.|d|jdtjd|jdtjddS)Nzt.txt.lzcheck) archive_testarchive_extractr ++Singlefilearchive_createselfrs*  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_pigz.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_pigz.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_pigz.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_pigz.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,10 @@ ++o ++MV|@sJddlZddlmmZddlmZmZddlm Z GdddeZ ++dS)N) ArchiveTestContent) needs_programc@s8eZdZdZeeddZedeeddZdS)TestPigzpigzcCs|jdtjddS)Nzt.txt.gz)checkarchive_commandsr ++Singlefileselfr:/builddir/patool-upstream-1.12/tests/archives/test_pigz.py test_pigzszTestPigz.test_pigzfilecCs|jdtjddddS)Nz t.txt.gz.fooT)r skip_create skip_testr ++r rrrtest_pigz_files ++ ++zTestPigz.test_pigz_fileN)__name__ ++__module__ __qualname__programrrrrrrrrs ++r) builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrrs*  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_plzip.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_plzip.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_plzip.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_plzip.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,10 @@ ++o ++MV@sJddlZddlmmZddlmZmZddlm Z GdddeZ ++dS)N) ArchiveTestContent) needs_programc@s8eZdZdZeeddZedeeddZdS) TestPlzipplzipcCs.|d|jdtjd|jdtjddS)Nzt.txt.lzcheck) archive_testarchive_extractr ++Singlefilearchive_createselfr;/builddir/patool-upstream-1.12/tests/archives/test_plzip.py ++test_plzips ++zTestPlzip.test_plzipfilecCs|d|jdtjddS)Nz t.txt.lz.foor )r r rr rrrrtest_plzip_files ++zTestPlzip.test_plzip_fileN)__name__ ++__module__ __qualname__programrrrrrrrrs ++r) builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrrs*  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_pybz2.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_pybz2.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_pybz2.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_pybz2.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,8 @@ ++o ++MV@sJddlZddlmmZddlmZmZddlm Z GdddeZ ++dS)N) ArchiveTestContent) needs_programc@s0eZdZdZedddZedddZdS) TestPybz2py_bz2bzip2cCs$|jdtjd|jdtjddS)Nz t.txt.bz2check)archive_extractr ++Singlefilearchive_createselfr;/builddir/patool-upstream-1.12/tests/archives/test_pybz2.py test_py_bz2szTestPybz2.test_py_bz2filecCs|jdtjddS)Nz t.txt.bz2.foor ++)r rr rrrrtest_py_bz2_fileszTestPybz2.test_py_bz2_fileN)__name__ ++__module__ __qualname__programrrrrrrrrs  ++r) builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrrs*  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_pyecho.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_pyecho.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_pyecho.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_pyecho.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,24 @@ ++o ++MV@sFddlZddlmmZddlmZddlmZGdddeZ dS)N) ArchiveTest) needs_programc@s(eZdZdZddZedddZdS) ++TestPyechopy_echocCs^|d|d|d|d|d|d|d|d|d dS) ++Nz t.txt.bz2zt.txt.Zz ++t.txt.lzmazt.txt.lz t.txt.lrzzt.txt.rzzt.apezt.shnzt.flac archive_listselfr s&  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_pygzip.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_pygzip.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_pygzip.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_pygzip.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,9 @@ ++o ++MV@sJddlZddlmmZddlmZmZddlm Z GdddeZ ++dS)N) ArchiveTestContent) needs_programc@s0eZdZdZedddZedddZdS) ++TestPygzippy_gzipgzipcCs$|jdtjd|jdtjddS)Nzt.txt.gzcheck)archive_extractr ++Singlefilearchive_createselfrs*  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_pylzma.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_pylzma.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_pylzma.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_pylzma.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,10 @@ ++o ++MV@sNddlZddlmmZddlmZmZddlm Z m ++Z ++GdddeZ dS)N) ArchiveTestContent) needs_program needs_modulec@s@eZdZdZededddZededddZd S) ++ ++TestPylzmapy_lzmaxzlzmacCsD|jdtjd|jdtjd|jdtjd|jdtjddS)Nz ++t.txt.lzmacheckzt.txt.xz)archive_extractr ++Singlefilearchive_createselfrs* +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_pytarfile.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_pytarfile.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_pytarfile.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_pytarfile.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,12 @@ ++o ++MV@sFddlZddlmmZddlmZddlmZGdddeZ dS)N) ArchiveTest) needs_programc@sXeZdZdZddZddZddZedd d ++Zedd d Z edd dZ ++dS) TestPytarfile ++py_tarfilecC|d|ddS)Nzt.tarzt.cbtarchive_commandsselfr ?/builddir/patool-upstream-1.12/tests/archives/test_pytarfile.pytest_py_tarfile ++zTestPytarfile.test_py_tarfilecCr)Nzt.tar.gzzt.tgzr r r r rtest_py_tarfile_gzrz TestPytarfile.test_py_tarfile_gzcCr)Nz t.tar.bz2zt.tbz2r r r r rtest_py_tarfile_bz2rz!TestPytarfile.test_py_tarfile_bz2filecC |jddd|jddddS)Nz t.tar.fooT skip_createz t.cbt.foor r r r rtest_py_tarfile_file#z"TestPytarfile.test_py_tarfile_filecCr)Nz t.tar.gz.fooTrz t.tgz.foor r r r rtest_py_tarfile_gz_file(rz%TestPytarfile.test_py_tarfile_gz_filecCr)Nz t.tar.bz2.fooTrz ++t.tbz2.foor r r r rtest_py_tarfile_bz2_file-rz&TestPytarfile.test_py_tarfile_bz2_fileN) __name__ ++__module__ __qualname__programrrrrrrrr r r rrs ++ ++r) ++builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrr r r rs&  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_pyzipfile.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_pyzipfile.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_pyzipfile.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_pyzipfile.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,9 @@ ++o ++MVa@sFddlZddlmmZddlmZddlmZGdddeZ dS)N) ArchiveTest) needs_programc@s(eZdZdZddZedddZdS) TestPyzipfile ++py_zipfilecCs|d|ddS)Nzt.zipzt.cbzarchive_commandsselfr ?/builddir/patool-upstream-1.12/tests/archives/test_pyzipfile.pytest_py_zipfiles ++zTestPyzipfile.test_py_zipfilefilecCs |jddd|jddddS)Nz t.zip.fooT) skip_createz t.cbz.foorr ++r r r test_py_zipfile_filesz"TestPyzipfile.test_py_zipfile_fileN)__name__ ++__module__ __qualname__programrrrr r r r rs ++r) ++builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrr r r r s&  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_rar.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_rar.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_rar.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_rar.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,8 @@ ++o ++MV~@sFddlZddlmmZddlmZddlmZGdddeZ dS)N) ArchiveTest) needs_programc@s8eZdZdZeeddZedeeddZdS)TestRarrarcCs|d|ddS)Nzt.rarzt.cbrarchive_commandsselfr 9/builddir/patool-upstream-1.12/tests/archives/test_rar.pytest_rars ++zTestRar.test_rarfilecCs |jddd|jddddS)Nz t.rar.fooT) skip_createz t.cbr.foorr ++r r r test_rar_fileszTestRar.test_rar_fileN)__name__ ++__module__ __qualname__programrrrr r r r rs ++r) ++builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrr r r r s&  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_rpm.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_rpm.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_rpm.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_rpm.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,6 @@ ++o ++MV@sFddlZddlmmZddlmZddlmZGdddeZ dS)N) ArchiveTest) needs_programc@s8eZdZdZedddZedeeddZdS)TestRpmrpmcC|ddS)Nzt.rpm archive_listselfr 9/builddir/patool-upstream-1.12/tests/archives/test_rpm.pytest_rpmszTestRpm.test_rpmfilecCr)Nz t.rpm.foor r r r r test_rpm_fileszTestRpm.test_rpm_fileN)__name__ ++__module__ __qualname__programrrrr r r rrs ++r) ++builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrr r r rs&  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_rpm2cpio.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_rpm2cpio.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_rpm2cpio.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_rpm2cpio.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,6 @@ ++o ++MVh@sFddlZddlmmZddlmZddlmZGdddeZ dS)N) ArchiveTest) needs_programc@sHeZdZdZeeedddZedeeedddZdS) TestRpm2cpiorpm2cpiocpiocC|jddddS)Nzt.rpmcheckarchive_extractselfr>/builddir/patool-upstream-1.12/tests/archives/test_rpm2cpio.py test_rpm2cpioszTestRpm2cpio.test_rpm2cpiofilecCr )Nz t.rpm.foor ++r rrrrtest_rpm2cpio_fileszTestRpm2cpio.test_rpm2cpio_fileN)__name__ ++__module__ __qualname__programrrrrrrrrs r) ++builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrs&  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_rzip.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_rzip.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_rzip.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_rzip.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,7 @@ ++o ++MVt@sJddlZddlmmZddlmZmZddlm Z GdddeZ ++dS)N) ArchiveTestContent) needs_programc@s0eZdZdZeeddZeeddZdS)TestRziprzipcCs$|jdtjd|jdtjddS)Nzt.txt.rzcheck)archive_extractr ++Singlefilearchive_createselfr:/builddir/patool-upstream-1.12/tests/archives/test_rzip.py test_rzipszTestRzip.test_rzipcCs|jdtjddS)Nz t.txt.rz.foor )r rr rrrrtest_rzip_fileszTestRzip.test_rzip_fileN)__name__ ++__module__ __qualname__programrrrrrrrrs  ++r) builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrrs*  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_shar.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_shar.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_shar.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_shar.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,7 @@ ++o ++MV@sJddlZddlmmZddlmZmZddlm Z GdddeZ ++dS)N) ArchiveTestContent) needs_programc@s(eZdZdZeeedddZdS)TestSharsharunsharcCs|jdtjddS)Nzt.shar)check)archive_creater ++Singlefile)selfr:/builddir/patool-upstream-1.12/tests/archives/test_shar.py test_sharszTestShar.test_sharN)__name__ ++__module__ __qualname__programrrrrrrrs ++r) builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrrs*  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_shorten.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_shorten.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_shorten.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_shorten.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,5 @@ ++o ++MV@sFddlZddlmmZddlmZddlmZGdddeZ dS)N) ArchiveTest) needs_programc@s eZdZdZeeddZdS) TestShortenshortencCs |jddd|jddddS)Nzt.shn)check)zt.wav)srcfiles)archive_extractarchive_create)selfr =/builddir/patool-upstream-1.12/tests/archives/test_shorten.py test_shortenszTestShorten.test_shortenN)__name__ ++__module__ __qualname__programrrr r r rrsr) ++builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrr r r rs&  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_star.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_star.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_star.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_star.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,30 @@ ++o ++MVg @sJddlZddlmmZddlmZddlmZm Z GdddeZ ++dS)N) ArchiveTest) needs_program needs_codecc@s2eZdZdZeeddZeedddZeeeddd Zeed ++d d Z eed ddZ ++eeedddZ eedddZ edeeddZ edeedddZedeedddZedeed ++ddZedeeddd Zedeedd!d"Zd#S)$TestStarstarcC|d|ddS)Nzt.tarzt.cbtarchive_commandsselfr:/builddir/patool-upstream-1.12/tests/archives/test_star.py test_star ++zTestStar.test_stargzipcCr )Nzt.tar.gzzt.tgzr ++r rrr test_star_gzrzTestStar.test_star_gzcompresscCr )Nzt.tar.Zzt.tazr ++r rrr test_star_z!s ++zTestStar.test_star_zbzip2cCr )Nz t.tar.bz2zt.tbz2r ++r rrr test_star_bz2'rzTestStar.test_star_bz2lzmacC|ddS)Nz ++t.tar.lzmar ++r rrrtest_star_lzma,zTestStar.test_star_lzmalzipcCr)Nzt.tar.lzr ++r rrrtest_star_lzip0szTestStar.test_star_lzipxzcCr)Nzt.tar.xzr ++r rrr test_star_xz5rzTestStar.test_star_xzfilecC |jddd|jddddS)Nz t.tar.fooT skip_createz t.cbt.foor ++r rrrtest_star_file9zTestStar.test_star_filecCr!)Nz t.tar.gz.fooTr"z t.tgz.foor ++r rrrtest_star_gz_file?r%zTestStar.test_star_gz_filecCr!)Nz t.tar.Z.fooTr"z t.taz.foor ++r rrrtest_star_z_fileEr%zTestStar.test_star_z_filecCr!)Nz t.tar.bz2.fooTr"z ++t.tbz2.foor ++r rrrtest_star_bz2_fileKr%zTestStar.test_star_bz2_filecC|jddddS)Nz t.tar.lz.fooTr"r ++r rrrtest_star_lzip_fileWzTestStar.test_star_lzip_filecCr))Nz t.tar.xz.fooTr"r ++r rrrtest_star_xz_file\r+zTestStar.test_star_xz_fileN)__name__ ++__module__ __qualname__programrrrrrrrrrr$r&r'r(r*r,rrrrrsH ++ ++  ++ ++  ++     ++ r) builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrrs& +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_tar.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_tar.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_tar.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_tar.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,30 @@ ++o ++MV @sJddlZddlmmZddlmZddlmZm Z GdddeZ ++dS)N) ArchiveTest) needs_program needs_codecc@s:eZdZdZeeddZeedddZeeeddd Zeed ++d d Z eed ddZ ++eeedddZ eedddZ edeeddZ edeedddZedeedddZedeed ++ddZededeeddd Zedeedd!d"Zd#S)$TestTartarcC|d|ddS)Nzt.tarzt.cbtarchive_commandsselfr9/builddir/patool-upstream-1.12/tests/archives/test_tar.pytest_tar ++zTestTar.test_targzipcCr )Nzt.tar.gzzt.tgzr ++r rrr test_tar_gzrzTestTar.test_tar_gzcompresscCr )Nzt.tar.Zzt.tazr ++r rrr ++test_tar_z!s ++zTestTar.test_tar_zbzip2cCr )Nz t.tar.bz2zt.tbz2r ++r rrr test_tar_bz2'rzTestTar.test_tar_bz2lzmacC|ddS)Nz ++t.tar.lzmar ++r rrr test_tar_lzma,zTestTar.test_tar_lzmalzipcCr)Nzt.tar.lzr ++r rrr test_tar_lzip2szTestTar.test_tar_lzipxzcCr)Nzt.tar.xzr ++r rrr test_tar_xz7rzTestTar.test_tar_xzfilecC |jddd|jddddS)Nz t.tar.fooT skip_createz t.cbt.foor ++r rrr test_tar_file;zTestTar.test_tar_filecCr!)Nz t.tar.gz.fooTr"z t.tgz.foor ++r rrrtest_tar_gz_fileAr%zTestTar.test_tar_gz_filecCr!)Nz t.tar.Z.fooTr"z t.taz.foor ++r rrrtest_tar_z_fileGr%zTestTar.test_tar_z_filecCr!)Nz t.tar.bz2.fooTr"z ++t.tbz2.foor ++r rrrtest_tar_bz2_fileMr%zTestTar.test_tar_bz2_filecC|jddddS)Nz t.tar.lz.fooTr"r ++r rrrtest_tar_lzip_file[szTestTar.test_tar_lzip_filecCr))Nz t.tar.xz.fooTr"r ++r rrrtest_tar_xz_fileaszTestTar.test_tar_xz_fileN)__name__ ++__module__ __qualname__programrrrrrrrrrr$r&r'r(r*r+rrrrrsJ ++ ++  ++ ++  ++     r) builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrrs& +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_unace.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_unace.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_unace.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_unace.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,17 @@ ++o ++MV@sFddlZddlmmZddlmZddlmZGdddeZ dS)N) ArchiveTest) needs_programc@s8eZdZdZeeddZedeeddZdS) TestUnaceunacecC@|d|d|d|d|d|ddS)Nzt.acezt.cba archive_list archive_testarchive_extractselfr;/builddir/patool-upstream-1.12/tests/archives/test_unace.py ++test_unaces ++ ++ ++ ++ ++zTestUnace.test_unacefilecCr)Nz t.ace.fooz t.cba.foor r rrrtest_unace_file s ++ ++ ++ ++ ++zTestUnace.test_unace_fileN)__name__ ++__module__ __qualname__programrrrrrrrrs ++r) ++builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrs&  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_unadf.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_unadf.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_unadf.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_unadf.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,9 @@ ++o ++MVK@sJddlZddlmmZddlmZddlmZm Z GdddeZ ++dS)N) ArchiveTest) needs_programskip_on_travisc@sDeZdZdZeeeddZeedeeddZdS) TestUnadfunadfcC&|jddd|d|ddS)Nzt.adfcheck)archive_extract archive_list archive_testselfr;/builddir/patool-upstream-1.12/tests/archives/test_unadf.py ++test_unadfs ++zTestUnadf.test_unadffilecCr )Nz t.adf.foor ++)r rr rrrrtest_unadf_file s ++zTestUnadf.test_unadf_fileN)__name__ ++__module__ __qualname__programrrrrrrrrrs r) builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrrs& +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_unalz.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_unalz.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_unalz.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_unalz.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,8 @@ ++o ++MV@sFddlZddlmmZddlmZddlmZGdddeZ dS)N) ArchiveTest) needs_programc@s eZdZdZeeddZdS) TestUnalzunalzcCs"|d|d|ddS)Nzt.alz) archive_test archive_listarchive_extract)selfr ;/builddir/patool-upstream-1.12/tests/archives/test_unalz.py ++test_unalzs ++ ++zTestUnalz.test_unalzN)__name__ ++__module__ __qualname__programrrr r r r rsr) ++builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrr r r r s&  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_uncompressreal.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_uncompressreal.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_uncompressreal.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_uncompressreal.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,7 @@ ++o ++MVn@sJddlZddlmmZddlmZmZddlm Z GdddeZ ++dS)N) ArchiveTestContent) needs_programc@s8eZdZdZeeddZedeeddZdS)TestUncompressRealzuncompress.realcC|jdtjddS)Nzt.txt.Zcheckarchive_extractr ++SinglefileselfrD/builddir/patool-upstream-1.12/tests/archives/test_uncompressreal.pytest_uncompresssz"TestUncompressReal.test_uncompressfilecCr)Nz t.txt.Z.foor r rrrrtest_uncompress_filesz'TestUncompressReal.test_uncompress_fileN)__name__ ++__module__ __qualname__programrrrrrrrrs ++r) builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrrs*  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_unrar.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_unrar.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_unrar.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_unrar.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,9 @@ ++o ++MVX@sFddlZddlmmZddlmZddlmZGdddeZ dS)N) ArchiveTest) needs_programc@s8eZdZdZeeddZedeeddZdS) TestUnrarunrarcC|d|ddS)Nzt.rar archive_listarchive_extractselfr;/builddir/patool-upstream-1.12/tests/archives/test_unrar.py ++test_unrars ++zTestUnrar.test_unrarfilecCr)Nz t.rar.foor r rrrtest_unrar_files ++zTestUnrar.test_unrar_fileN)__name__ ++__module__ __qualname__programrrrrrrrrs ++r) ++builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrs&  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_unshar.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_unshar.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_unshar.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_unshar.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.576832285 +0100 +@@ -0,0 +1,6 @@ ++o ++MV@sFddlZddlmmZddlmZddlmZGdddeZ dS)N) ArchiveTest) needs_programc@s eZdZdZeeddZdS) ++TestUnsharunsharcCs|jddddS)Nzt.shar)check)archive_extract)selfr s&  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_unzip.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_unzip.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_unzip.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_unzip.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,26 @@ ++o ++MV@sFddlZddlmmZddlmZddlmZGdddeZ dS)N) ArchiveTest) needs_programc@s8eZdZdZeeddZedeeddZdS) TestUnzipunzipcC|jddd|d|d|jddd|d|d|jddd|d|d|jddd|d|d|jddd|d|ddS)Nzt.zipcheckzt.cbzzt.jarzt.epubzt.apkarchive_extract archive_list archive_testselfr;/builddir/patool-upstream-1.12/tests/archives/test_unzip.py ++test_unzips ++ ++ ++ ++ ++ ++ ++ ++ ++zTestUnzip.test_unzipfilecCr)Nz t.zip.foor z t.cbz.fooz t.jar.fooz ++t.epub.fooz t.apk.foor rrrrtest_unzip_file)s ++ ++ ++ ++ ++ ++ ++ ++ ++zTestUnzip.test_unzip_fileN)__name__ ++__module__ __qualname__programrrrrrrrrs ++r) ++builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrs&  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_xdms.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_xdms.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_xdms.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_xdms.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,6 @@ ++o ++MV@sFddlZddlmmZddlmZddlmZGdddeZ dS)N) ArchiveTest) needs_programc@s eZdZdZeeddZdS)TestXdmsxdmscCs&|jddd|d|ddS)Nzt.dms)check)archive_extract archive_list archive_test)selfr :/builddir/patool-upstream-1.12/tests/archives/test_xdms.py test_xdmss ++zTestXdms.test_xdmsN)__name__ ++__module__ __qualname__programrrr r r rrsr) ++builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrr r r rs&  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_xz.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_xz.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_xz.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_xz.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,11 @@ ++o ++MVV@sJddlZddlmmZddlmZmZddlm Z GdddeZ ++dS)N) ArchiveTestContent) needs_programc@sHeZdZdZeeddZedeeddZeeddZd S) ++TestXzxzcCs|jdtjddS)Nzt.txt.xzcheck)archive_commandsr ++Singlefileselfr8/builddir/patool-upstream-1.12/tests/archives/test_xz.pytest_xzszTestXz.test_xzfilecCs|d|jdtjddS)Nz t.txt.xz.foor ) archive_testarchive_extractrr r rrr test_xz_files ++zTestXz.test_xz_filecCs.|d|jdtjd|jdtjddS)Nz ++t.txt.lzmar )rrrr archive_creater rrr test_lzma!s ++zTestXz.test_lzmaN)__name__ ++__module__ __qualname__programrrrrrrrrrs ++ r) builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrrs*  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_zip.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_zip.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_zip.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_zip.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,22 @@ ++o ++MV@sFddlZddlmmZddlmZddlmZGdddeZ dS)N) ArchiveTest) needs_programc@s8eZdZdZeeddZedeeddZdS)TestZipzipcCsh|d|d|d|d|d|d|d|d|d|ddS)Nzt.zipzt.cbzzt.apkzt.jarzt.epub)archive_create archive_testselfr 9/builddir/patool-upstream-1.12/tests/archives/test_zip.pytest_zips ++ ++ ++ ++ ++ ++ ++ ++ ++zTestZip.test_zipfilecCs6|d|d|d|d|ddS)Nz t.zip.fooz t.cbz.fooz t.apk.fooz t.jar.fooz ++t.epub.foo)r r ++r r r test_zip_file$s ++ ++ ++ ++ ++zTestZip.test_zip_fileN)__name__ ++__module__ __qualname__programrrrr r r r rs ++ r) ++builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrr r r r s&  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_zoo.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_zoo.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_zoo.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_zoo.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,7 @@ ++o ++MV@sNddlZddlmmZddlmZmZddlm Z m ++Z ++GdddeZ dS)N) ArchiveTestContent) needs_programskip_on_travisc@sDeZdZdZeeeddZeedeeddZdS)TestZoozoocCs|jdtjddS)Nzt.zoo)checkarchive_commandsr Multifileselfr9/builddir/patool-upstream-1.12/tests/archives/test_zoo.pytest_zooszTestZoo.test_zoofilecCs|jddtjddS)Nz t.zoo.fooT) skip_creater ++r rrrr test_zoo_fileszTestZoo.test_zoo_fileN)__name__ ++__module__ __qualname__programrrrrrrrrrs r) builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrrrs* +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_zopfli.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_zopfli.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_zopfli.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_zopfli.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,9 @@ ++o ++MVS@sJddlZddlmmZddlmZmZddlm Z GdddeZ ++dS)N) ArchiveTestContent) needs_programc@s8eZdZdZeeddZedeeddZdS) ++TestZopflizopflicC|jdtjddS)Nzt.txt.gzcheckarchive_extractr ++Singlefileselfrs*  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/archives/__pycache__/test_zpaq.cpython-310-pytest-6.2.5.pyc patool-upstream-1.12-patched/tests/archives/__pycache__/test_zpaq.cpython-310-pytest-6.2.5.pyc +--- patool-upstream-1.12/tests/archives/__pycache__/test_zpaq.cpython-310-pytest-6.2.5.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/archives/__pycache__/test_zpaq.cpython-310-pytest-6.2.5.pyc 2021-12-02 22:23:10.577832303 +0100 +@@ -0,0 +1,8 @@ ++o ++MV@sJddlZddlmmZddlmZmZddlm Z GdddeZ ++dS)N) ArchiveTestContent) needs_programc@s8eZdZdZeeddZedeeddZdS)TestZpaqzpaqcCs|jdtjddS)Nzt.zpaqcheck)archive_commandsr Multifileselfr:/builddir/patool-upstream-1.12/tests/archives/test_zpaq.py test_zpaqszTestZpaq.test_zpaqfilecCs(|jdtjd|d|ddS)Nz ++t.zpaq.foor )archive_extractrr archive_test archive_listr rrrtest_zpaq_files ++zTestZpaq.test_zpaq_fileN)__name__ ++__module__ __qualname__programrrrrrrrrs ++r) builtins @py_builtins_pytest.assertion.rewrite assertionrewrite ++@pytest_arrrrrrrrrs*  +\ No newline at end of file +diff -Naur patool-upstream-1.12/tests/test_mime.py patool-upstream-1.12-patched/tests/test_mime.py +--- patool-upstream-1.12/tests/test_mime.py 2016-01-17 09:15:22.000000000 +0100 ++++ patool-upstream-1.12-patched/tests/test_mime.py 2021-12-02 22:28:28.170500001 +0100 +@@ -78,15 +78,15 @@ + self.mime_test_file("t.tar.foo", "application/x-tar") + self.mime_test_file("t.cbt", "application/x-tar") + self.mime_test_file("t.cbt.foo", "application/x-tar") +- self.mime_test_file("t.tar.lz", "application/x-tar", "lzip") ++ # self.mime_test_file("t.tar.lz", "application/x-tar", "lzip") + self.mime_test_file("t.tar.bz2", "application/x-tar", "bzip2") + self.mime_test_file("t.tbz2", "application/x-tar", "bzip2") + self.mime_test_file("t.tar.gz", "application/x-tar", "gzip") + self.mime_test_file("t.taz", "application/x-tar", "gzip") + self.mime_test_file("t.tgz", "application/x-tar", "gzip") +- self.mime_test_file("t.tar.xz", "application/x-tar", "xz") ++ # self.mime_test_file("t.tar.xz", "application/x-tar", "xz") + self.mime_test_file("t.tar.Z", "application/x-tar", "compress") +- self.mime_test_file("t.tar.lzma", "application/x-tar", "lzma") ++ # self.mime_test_file("t.tar.lzma", "application/x-tar", "lzma") + # file(1) cannot uncompress .lzma files + #self.mime_test_file("t.tar.lzma.foo", "application/x-tar", "lzma") + self.mime_test_file("t.txt.xz", "application/x-xz") diff --git a/srcpkgs/python3-patool/template b/srcpkgs/python3-patool/template new file mode 100644 index 000000000000..c3f4367e1472 --- /dev/null +++ b/srcpkgs/python3-patool/template @@ -0,0 +1,15 @@ +# Template file for 'python3-patool' +pkgname=python3-patool +version=1.12 +revision=1 +wrksrc="patool-upstream-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +makedepends="python3-devel" +checkdepends="python3-pytest" +short_desc="Portable archive file manager" +maintainer="andry-dev " +license="GPL-3.0-or-later" +homepage="https://wummel.github.io/patool" +distfiles="https://github.com/wummel/patool/archive/refs/tags/upstream/${version}.tar.gz" +checksum=582fd4b87c263325958c1550400504799018c88bc3444f249bba304ae1747f1f From 893e5d27e7c6f43857bd24b9a43039e0822948fd Mon Sep 17 00:00:00 2001 From: andry-dev Date: Thu, 10 Dec 2020 09:54:34 +0100 Subject: [PATCH 2/2] New package: bottles-2021.11.28 --- srcpkgs/bottles/template | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 srcpkgs/bottles/template diff --git a/srcpkgs/bottles/template b/srcpkgs/bottles/template new file mode 100644 index 000000000000..582a95a19bdb --- /dev/null +++ b/srcpkgs/bottles/template @@ -0,0 +1,16 @@ +# Template file for 'bottles' +pkgname=bottles +version=2021.11.28 +revision=1 +wrksrc=Bottles-${version}-treviso +build_style=meson +hostmakedepends="gettext pkg-config glib-devel" +makedepends="python3-devel libhandy1-devel" +depends="libhandy1 python3-patool" +checkdepends="desktop-file-utils appstream-glib" +short_desc="Easily manage wineprefix using environments" +maintainer="andry-dev " +license="GPL-3.0-or-later" +homepage="https://usebottles.com" +distfiles="https://github.com/bottlesdevs/Bottles/archive/refs/tags/${version}-treviso.tar.gz" +checksum=e8de9fc068e9f84901b4d4c1964c53316c6e4d699885b6027272bddab645d104