From 9b5d79ec68d5380f26b92cd0d9cb7af6a19ac849 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 5 Aug 2008 10:52:09 +0200 Subject: fix various -Wall warnings --- apt-pkg/indexcopy.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/indexcopy.cc') diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc index b30777d8d..9e5c03e0b 100644 --- a/apt-pkg/indexcopy.cc +++ b/apt-pkg/indexcopy.cc @@ -639,7 +639,7 @@ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector &SigList, // Open the Release file and add it to the MetaIndex if(!MetaIndex->Load(*I+"Release")) { - _error->Error(MetaIndex->ErrorText.c_str()); + _error->Error("%s",MetaIndex->ErrorText.c_str()); return false; } -- cgit v1.2.3 From 8d357c5290f737e0f47f1ad62b1256586aade860 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sat, 9 Aug 2008 00:21:41 +0200 Subject: * apt-pkg/indexcopy.cc: - support having CDs with no Packages file (just a Packages.gz) by not forcing a verification on non-existing files (LP: #255545) --- apt-pkg/indexcopy.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'apt-pkg/indexcopy.cc') diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc index 9e5c03e0b..b1e75e30f 100644 --- a/apt-pkg/indexcopy.cc +++ b/apt-pkg/indexcopy.cc @@ -522,6 +522,15 @@ bool SigVerify::Verify(string prefix, string file, indexRecords *MetaIndex) { const indexRecords::checkSum *Record = MetaIndex->Lookup(file); + // we skip non-existing files in the verifcation to support a cdrom + // with no Packages file (just a Package.gz), see LP: #255545 + // (non-existing files are not considered a error) + if(!FileExists(prefix+file)) + { + _error->Warning("Skipping non-exisiting file %s", string(prefix+file).c_str()); + return true; + } + if (!Record) { _error->Warning("Can't find authentication record for: %s",file.c_str()); -- cgit v1.2.3 From 7efdcd3a5553349c4082da17494bb53715ec2e08 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 28 Oct 2008 20:38:02 +0100 Subject: apt-pkg/indexcopy.cc: discard errors after Verify() --- apt-pkg/indexcopy.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'apt-pkg/indexcopy.cc') diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc index b1e75e30f..5a92c79b7 100644 --- a/apt-pkg/indexcopy.cc +++ b/apt-pkg/indexcopy.cc @@ -660,6 +660,7 @@ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector &SigList, if(!Verify(prefix,*I, MetaIndex)) { // something went wrong, don't copy the Release.gpg // FIXME: delete any existing gpg file? + _error->Discard(); continue; } } -- cgit v1.2.3