← Back to team overview

touch-packages team mailing list archive

[Bug 1503979] Re: ubuntu-support-status throws exeption No date tag found (regression)

 

Julian, sorry, but python-apt in get_release_filename_for_pkg()
hardcodes the string '_Release' to the path returned by the function
regardless of whether apt has downloaded a _Release or _InRelease file.
Here's a prototype patch I worked up to address that:

diff -Nru python-apt-1.0.1build1/apt/utils.py python-apt-1.0.1ubuntu0.1~test2/apt/utils.py
--- python-apt-1.0.1build1/apt/utils.py	2015-10-01 13:12:19.000000000 -0700
+++ python-apt-1.0.1ubuntu0.1~test2/apt/utils.py	2015-10-23 16:06:36.000000000 -0700
@@ -82,7 +82,9 @@
                     indexfile.describe == m.describe and
                     indexfile.is_trusted):
                 dirname = apt_pkg.config.find_dir("Dir::State::lists")
-                name = (apt_pkg.uri_to_filename(metaindex.uri) +
-                        "dists_%s_Release" % metaindex.dist)
-                return dirname + name
+                for relfile in ['Release', 'InRelease']:
+                    name = (apt_pkg.uri_to_filename(metaindex.uri) +
+                           "dists_%s_%s" % (metaindex.dist, relfile))
+                    if os.path.exists(dirname + name):
+                        return dirname + name
     return None

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to python-apt in Ubuntu.
https://bugs.launchpad.net/bugs/1503979

Title:
  ubuntu-support-status throws exeption No date tag found (regression)

Status in python-apt package in Ubuntu:
  Invalid
Status in update-manager package in Ubuntu:
  Incomplete

Bug description:
  Description:	Ubuntu 14.04.3 LTS
  Release:	14.04
  update-manager-core:  1:0.196.14

  Since the last update  ubuntu-support-status throws

  Traceback (most recent call last):
    File "/usr/bin/ubuntu-support-status", line 133, in <module>
      pkg.name, support_tag)
    File "/usr/bin/ubuntu-support-status", line 49, in get_maintenance_status
      raise Exception("No date tag found")
  Exception: No date tag found

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