Package: cupt
Version: 2.0.0
Severity: normal

APT recently switched to using InRelease files when
available instead of Release files. This causes cupt
to fail when used in combination with APT:

  E: unable to open release file 
'//var/lib/apt/lists/localhost:3142_debian_dists_sid_Release': No such file or 
directory
  W: skipped the index file 
'//var/lib/apt/lists/localhost:3142_debian_dists_sid_main_binary-amd64_Packages'

APT 0.8.14 now also renames InRelease files to Release
files if their verification fails, which won't work either,
as seen in my hacked cupt version (see below):

  W: no vendor specified in release file 
'//var/lib/apt/lists/localhost:3142_debian_dists_sid_InRelease'
  W: no archive specified in release file 
'//var/lib/apt/lists/localhost:3142_debian_dists_sid_InRelease'


cupt needs to:
  * Use an InRelease file if one exists
  * Skip the first section in Release files if it does
    not contain the data needed (it contains the GPG
    signature)

-- My hack:

This is just a hack to read an InRelease file instead of an
Release file if it exists, for testing purposes. The most
important problem is actually CacheImpl::getDownloadUriOfReleaseList(),
as there are now two options for its return value.

diff --git a/cpp/lib/src/internal/cacheimpl.cpp 
b/cpp/lib/src/internal/cacheimpl.cpp
index 8654d99..370ceac 100644
--- a/cpp/lib/src/internal/cacheimpl.cpp
+++ b/cpp/lib/src/internal/cacheimpl.cpp
@@ -373,7 +373,10 @@ string CacheImpl::getPathOfIndexList(const IndexEntry& 
entry) const
 
 string CacheImpl::getPathOfReleaseList(const IndexEntry& entry) const
 {
-       return getPathOfIndexEntry(entry) + "_Release";
+       auto release = getPathOfIndexEntry(entry) + "_Release";
+       auto inRelease = getPathOfIndexEntry(entry) + "_InRelease";
+
+       return fs::fileExists(inRelease) ? inRelease : release;
 }
 
 string CacheImpl::getDownloadUriOfReleaseList(const IndexEntry& entry) const



-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (250, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.38-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages cupt depends on:
ii  libboost-program-options1.42. 1.42.0-4   program options library for C++
ii  libc6                         2.11.2-13  Embedded GNU C Library: Shared lib
ii  libcupt2-0                    2.0.0      alternative front-end for dpkg -- 
ii  libgcc1                       1:4.6.0-3  GCC support library
ii  libstdc++6                    4.6.0-3    The GNU Standard C++ Library v3

cupt recommends no packages.

Versions of packages cupt suggests:
ii  libreadline6                  6.1-3      GNU readline and history libraries
ii  sensible-utils                0.0.6      Utilities for sensible alternative

-- no debconf information

-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.

Attachment: pgpEKpGhfiABA.pgp
Description: PGP signature

Reply via email to