[Bug 1753091] [NEW] members of subdirs sources.list.d and trusted.gpg.d and extra-files are not restored

Jan Berghoff-Flüel 1753091 at bugs.launchpad.net
Sat Mar 3 13:22:22 UTC 2018


Public bug reported:

The members of the subdirectories "etc/apt/sources.list.d" and
"etc/apt/trusted.gpg.d" are not restored cause  the python method
"tarfile.extract()" only extracts the given member from the tar file,
which is only the (empty) directory itself but not recursively the
members of the directory.

Though the recursive extraction/restore of a directory has been
correctly implemented for "var/lib/apt-clone/debs/" using
tarfile.extractall(), it seems that is has been forgotten for the two
directories mentioned above.

Furthermore there is a bug (missing trailing slash in the "extra-files"
prefix string) preventing the extra files (specified with --extra-files
option) from being restored.

Please find attached patch for apt_clone.py fixing the bugs.

** Affects: apt-clone (Ubuntu)
     Importance: Undecided
         Status: New

** Patch added: "apt_clone.py.patch"
   https://bugs.launchpad.net/bugs/1753091/+attachment/5068044/+files/apt_clone.py.patch

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt-clone in Ubuntu.
https://bugs.launchpad.net/bugs/1753091

Title:
  members of subdirs sources.list.d and trusted.gpg.d and extra-files
  are not restored

Status in apt-clone package in Ubuntu:
  New

Bug description:
  The members of the subdirectories "etc/apt/sources.list.d" and
  "etc/apt/trusted.gpg.d" are not restored cause  the python method
  "tarfile.extract()" only extracts the given member from the tar file,
  which is only the (empty) directory itself but not recursively the
  members of the directory.

  Though the recursive extraction/restore of a directory has been
  correctly implemented for "var/lib/apt-clone/debs/" using
  tarfile.extractall(), it seems that is has been forgotten for the two
  directories mentioned above.

  Furthermore there is a bug (missing trailing slash in the "extra-
  files" prefix string) preventing the extra files (specified with
  --extra-files option) from being restored.

  Please find attached patch for apt_clone.py fixing the bugs.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt-clone/+bug/1753091/+subscriptions



More information about the foundations-bugs mailing list