summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/cdrom.cc4
-rw-r--r--apt-pkg/indexcopy.cc26
-rw-r--r--debian/changelog4
3 files changed, 26 insertions, 8 deletions
diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc
index f5c19a4d6..d9ecdf4f6 100644
--- a/apt-pkg/cdrom.cc
+++ b/apt-pkg/cdrom.cc
@@ -68,12 +68,11 @@ bool pkgCdrom::FindPackages(string CD,
if (RealFileExists(".aptignr") == true)
return true;
-
/* Check _first_ for a signature file as apt-cdrom assumes that all files
under a Packages/Source file are in control of that file and stops
the scanning
*/
- if (RealFileExists("Release.gpg") == true)
+ if (RealFileExists("Release.gpg") == true || RealFileExists("InRelease") == true)
{
SigList.push_back(CD);
}
@@ -718,6 +717,7 @@ bool pkgCdrom::Add(pkgCdromStatus *log) /*{{{*/
DropRepeats(List,"Packages");
DropRepeats(SourceList,"Sources");
DropRepeats(SigList,"Release.gpg");
+ DropRepeats(SigList,"InRelease");
DropRepeats(TransList,"");
if(log != NULL) {
msg.str("");
diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc
index e38fe3e45..f6457aa39 100644
--- a/apt-pkg/indexcopy.cc
+++ b/apt-pkg/indexcopy.cc
@@ -638,13 +638,19 @@ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector<string> &SigList,
string const releasegpg = *I+"Release.gpg";
string const release = *I+"Release";
+ string const inrelease = *I+"InRelease";
+ bool useInRelease = true;
// a Release.gpg without a Release should never happen
- if(RealFileExists(release) == false)
+ if (RealFileExists(inrelease) == true)
+ ;
+ else if(RealFileExists(release) == false || RealFileExists(releasegpg) == false)
{
delete MetaIndex;
continue;
}
+ else
+ useInRelease = false;
pid_t pid = ExecFork();
if(pid < 0) {
@@ -652,11 +658,16 @@ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector<string> &SigList,
return false;
}
if(pid == 0)
- RunGPGV(release, releasegpg);
+ {
+ if (useInRelease == true)
+ RunGPGV(inrelease, inrelease);
+ else
+ RunGPGV(release, releasegpg);
+ }
if(!ExecWait(pid, "gpgv")) {
_error->Warning("Signature verification failed for: %s",
- releasegpg.c_str());
+ (useInRelease ? inrelease.c_str() : releasegpg.c_str()));
// something went wrong, don't copy the Release.gpg
// FIXME: delete any existing gpg file?
continue;
@@ -686,8 +697,13 @@ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector<string> &SigList,
delete MetaIndex;
// everything was fine, copy the Release and Release.gpg file
- CopyMetaIndex(CDROM, Name, prefix, "Release");
- CopyMetaIndex(CDROM, Name, prefix, "Release.gpg");
+ if (useInRelease == true)
+ CopyMetaIndex(CDROM, Name, prefix, "InRelease");
+ else
+ {
+ CopyMetaIndex(CDROM, Name, prefix, "Release");
+ CopyMetaIndex(CDROM, Name, prefix, "Release.gpg");
+ }
}
return true;
diff --git a/debian/changelog b/debian/changelog
index a401d61a0..3e4a8fa3c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -31,8 +31,10 @@ apt (0.8.16~exp9) UNRELEASED; urgency=low
- dump the APT::Compressor settings correctly and completely
* apt-pkg/contrib/fileutl.{h,cc}:
- implement a ModificationTime method for FileFd
+ * apt-pkg/cdrom.cc:
+ - support InRelease files on cdrom
- -- David Kalnischkies <kalnischkies@gmail.com> Sat, 10 Dec 2011 20:02:29 +0100
+ -- David Kalnischkies <kalnischkies@gmail.com> Sun, 11 Dec 2011 01:30:12 +0100
apt (0.8.16~exp8) experimental; urgency=low