Your message dated Tue, 27 Dec 2022 23:25:10 +0000
with message-id <e1pajjm-00cclq...@fasolo.debian.org>
and subject line Bug#1027108: Removed package(s) from unstable
has caused the Debian Bug report #745480,
regarding [python2.7] Add support for lzma compressed tarballs
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
745480: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=745480
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: python2.7
Severity: wishlist
Tags: patch
Currently Debian patch tracker uses python 2 and fails to open
*.debian.tar.xz, see for example:
http://patch-tracker.debian.org/package/sbcl/2:1.1.15-1
I've made quick and dirty backport of tarfile from python3.
Tested only with patch tracker:
http://patches.osdyson.org/package/sbcl/2:1.1.15-1+dyson1
--- System information. ---
Architecture: amd64
Kernel: Linux 3.10-2-amd64
Debian Release: jessie/sid
500 unstable mirror.yandex.ru
500 testing security.debian.org
500 testing mirror.yandex.ru
500 stable sdkrepo.atlassian.com
--- Package information. ---
Depends (Version) | Installed
===================================-+-============
python2.7-minimal (= 2.7.6-5) | 2.7.6-5
libpython2.7-stdlib (= 2.7.6-5) | 2.7.6-5
mime-support | 3.54
Package's Recommends field is empty.
Suggests (Version) | Installed
============================-+-===========
python2.7-doc |
binutils | 2.24-5
--- /usr/lib/python2.7/tarfile.py.orig 2014-04-22 09:04:41.000000000 +0100
+++ /usr/lib/python2.7/tarfile.py 2014-04-22 09:10:53.000000000 +0100
@@ -440,6 +440,19 @@
else:
self.cmp = bz2.BZ2Compressor()
+ if comptype == "xz":
+ try:
+ import lzma
+ except ImportError:
+ raise CompressionError("lzma module is not available")
+ if mode == "r":
+ self.dbuf = b""
+ self.cmp = lzma.LZMADecompressor()
+ self.exception = lzma.LZMAError
+ else:
+ self.cmp = lzma.LZMACompressor()
+
+
def __del__(self):
if hasattr(self, "closed") and not self.closed:
self.close()
@@ -1759,11 +1772,37 @@
t._extfileobj = False
return t
+ @classmethod
+ def xzopen(cls, name, mode="r", fileobj=None, compresslevel=9, **kwargs):
+ """Open lzma compressed tar archive name for reading or writing.
+ Appending is not allowed.
+ """
+ if mode not in ("r", "w"):
+ raise ValueError("mode must be 'r' or 'w'")
+
+ try:
+ import lzma
+ except ImportError:
+ raise CompressionError("lzma module is not available")
+
+ fileobj = lzma.LZMAFile(fileobj or name, mode)
+
+ try:
+ t = cls.taropen(name, mode, fileobj, **kwargs)
+ except (lzma.LZMAError, EOFError):
+ fileobj.close()
+ raise ReadError("not an lzma file")
+ t._extfileobj = False
+ return t
+
+
# All *open() methods are registered here.
OPEN_METH = {
"tar": "taropen", # uncompressed tar
"gz": "gzopen", # gzip compressed tar
- "bz2": "bz2open" # bzip2 compressed tar
+ "bz2": "bz2open", # bzip2 compressed tar
+ "xz": "xzopen" # lzma compressed tar
+
}
#--------------------------------------------------------------------------
--- End Message ---
--- Begin Message ---
Version: 2.7.18-13.2+rm
Dear submitter,
as the package python2.7 has just been removed from the Debian archive
unstable we hereby close the associated bug reports. We are sorry
that we couldn't deal with your issue properly.
For details on the removal, please see https://bugs.debian.org/1027108
The version of this package that was in Debian prior to this removal
can still be found using https://snapshot.debian.org/.
Please note that the changes have been done on the master archive and
will not propagate to any mirrors until the next dinstall run at the
earliest.
This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
ftpmas...@ftp-master.debian.org.
Debian distribution maintenance software
pp.
Scott Kitterman (the ftpmaster behind the curtain)
--- End Message ---