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