Control: tags 1021060 + pending X-Debbugs-CC: ales...@debian.org michael.v...@ubuntu.com
Dear maintainer, I've prepared an NMU for apt-clone (versioned as 0.4.3+nmu2) and uploaded it to DELAYED/14. Please feel free to tell me if I should delay it longer. Regards. diff -Nru apt-clone-0.4.3+nmu1/apt-clone apt-clone-0.4.3+nmu2/apt-clone --- apt-clone-0.4.3+nmu1/apt-clone 2021-09-20 16:21:48.000000000 -0400 +++ apt-clone-0.4.3+nmu2/apt-clone 2023-06-17 14:27:03.000000000 -0400 @@ -21,6 +21,7 @@ import argparse import os +import subprocess import sys from apt_clone import AptClone @@ -132,8 +133,12 @@ # packages because they are probably new defaults pkgs. If however # we are not yet on the new release its fine to remove installed # pkgs as part of the upgrade - import lsb_release - codename = lsb_release.get_os_release()["CODENAME"] + try: + import lsb_release + codename = lsb_release.get_os_release()["CODENAME"] + except ImportError: + codename = subprocess.getoutput("lsb_release --codename -- short") + if (args.new_distro_codename and args.new_distro_codename == codename): protect_installed = True else: diff -Nru apt-clone-0.4.3+nmu1/apt_clone.py apt-clone- 0.4.3+nmu2/apt_clone.py --- apt-clone-0.4.3+nmu1/apt_clone.py 2021-09-20 16:21:48.000000000 -0400 +++ apt-clone-0.4.3+nmu2/apt_clone.py 2023-06-17 14:27:03.000000000 -0400 @@ -26,7 +26,10 @@ import glob import hashlib import logging -import lsb_release +try: + import lsb_release +except ImportError: + lsb_release = None import os import re import shutil @@ -71,8 +74,10 @@ return (ret == 0) def debootstrap(self, targetdir, distro=None): - if distro is None: + if distro is None and lsb_release: distro = lsb_release.get_distro_information()['CODENAME'] + if distro is None: + distro = subprocess.getoutput("lsb_release --codename --short") ret = subprocess.call(["debootstrap", distro, targetdir]) return (ret == 0) @@ -187,7 +192,10 @@ cache = self._cache_cls(rootdir=sourcedir) s = "" foreign = "" - distro_id = lsb_release.get_distro_information()['ID'] + if lsb_release: + distro_id = lsb_release.get_distro_information()['ID'] + else: + distro_id = subprocess.getoutput("lsb_release --id --short") for pkg in cache: if pkg.is_installed: # a version identifies the pacakge diff -Nru apt-clone-0.4.3+nmu1/debian/changelog apt-clone- 0.4.3+nmu2/debian/changelog --- apt-clone-0.4.3+nmu1/debian/changelog 2021-09-20 16:21:48.000000000 -0400 +++ apt-clone-0.4.3+nmu2/debian/changelog 2023-06-17 14:27:03.000000000 -0400 @@ -1,3 +1,20 @@ +apt-clone (0.4.3+nmu2) unstable; urgency=medium + + * Non-maintainer upload. + + [ Dave Jones ] + * Apply PR #17 to have apt-clone call lsb_release as a command, instead of + importing the Python module which no longer exists (LP: #2007566) + + + [ Boyuan Yang ] + * Import Ubuntu patch to fix crashes caused by missing lsb_release + Python module. (Closes: #1021060) + * debian/control: Replace deprecated Priority: extra with Priority: + optional. + + -- Boyuan Yang <by...@debian.org> Sat, 17 Jun 2023 14:27:03 -0400 + apt-clone (0.4.3+nmu1) unstable; urgency=high * Non-maintainer upload. diff -Nru apt-clone-0.4.3+nmu1/debian/control apt-clone- 0.4.3+nmu2/debian/control --- apt-clone-0.4.3+nmu1/debian/control 2021-09-20 16:21:48.000000000 -0400 +++ apt-clone-0.4.3+nmu2/debian/control 2023-06-17 14:27:03.000000000 -0400 @@ -1,6 +1,6 @@ Source: apt-clone Section: admin -Priority: extra +Priority: optional Maintainer: Michael Vogt <michael.v...@ubuntu.com> Uploaders: Alessio Treglia <ales...@debian.org> Build-Depends: debhelper (>= 7.0.50~),
signature.asc
Description: This is a digitally signed message part