From e8cdc56aaf6a12223fb9868784c18c8c0ada6315 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 19 Oct 2005 08:11:04 +0000 Subject: * added APT::Authentication::Trust-CDROM option Patches applied: * michael.vogt@ubuntu.com--2005/apt--trust-cdrom--0--base-0 tag of apt@packages.debian.org/apt--main--0--patch-79 * michael.vogt@ubuntu.com--2005/apt--trust-cdrom--0--patch-1 * implemented "TrustCDROM" mode * michael.vogt@ubuntu.com--2005/apt--trust-cdrom--0--patch-2 * added APT::Authentication::TrustCDROM to the configure-index --- apt-pkg/deb/debmetaindex.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'apt-pkg') diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index 526c8c0b2..ed5cb80d1 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -165,6 +165,10 @@ bool debReleaseIndex::IsTrusted() const string VerifiedSigFile = _config->FindDir("Dir::State::lists") + URItoFileName(MetaIndexURI("Release")) + ".gpg"; + if(_config->FindB("APT::Authentication::Trust-CDROM", false)) + if(URI.substr(0,strlen("cdrom:")) == "cdrom:") + return true; + if (FileExists(VerifiedSigFile)) return true; return false; -- cgit v1.2.3 From ed478d8cabf4abd695f2cacc50442e8c0e3ac770 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 19 Oct 2005 10:30:32 +0000 Subject: * sparc64 alignment fix --- apt-pkg/contrib/md5.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg') diff --git a/apt-pkg/contrib/md5.h b/apt-pkg/contrib/md5.h index 9e20f7cef..9447e9956 100644 --- a/apt-pkg/contrib/md5.h +++ b/apt-pkg/contrib/md5.h @@ -58,7 +58,7 @@ class MD5SumValue class MD5Summation { - unsigned char Buf[4*4]; + uint32_t Buf[4]; unsigned char Bytes[2*4]; unsigned char In[16*4]; bool Done; -- cgit v1.2.3 From 4e0ad446347b1f3d70a66001365382db4d8e45f3 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 20 Oct 2005 09:31:12 +0000 Subject: * renamed Trust-CDROM to TrustCDROM to make it consistent with ubuntu --- apt-pkg/deb/debmetaindex.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg') diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index ed5cb80d1..85e5b16b3 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -165,7 +165,7 @@ bool debReleaseIndex::IsTrusted() const string VerifiedSigFile = _config->FindDir("Dir::State::lists") + URItoFileName(MetaIndexURI("Release")) + ".gpg"; - if(_config->FindB("APT::Authentication::Trust-CDROM", false)) + if(_config->FindB("APT::Authentication::TrustCDROM", false)) if(URI.substr(0,strlen("cdrom:")) == "cdrom:") return true; -- cgit v1.2.3 From 960d4d245dfecab6fd41ab82b59b2e10c0a40946 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sat, 22 Oct 2005 21:48:27 +0000 Subject: * revert patch from patch-59, causes all sorts of trouble --- apt-pkg/pkgrecords.cc | 5 +---- apt-pkg/pkgrecords.h | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/pkgrecords.cc b/apt-pkg/pkgrecords.cc index 1d71d3e2f..9c2655d6a 100644 --- a/apt-pkg/pkgrecords.cc +++ b/apt-pkg/pkgrecords.cc @@ -42,9 +42,6 @@ pkgRecords::pkgRecords(pkgCache &Cache) : Cache(Cache), Files(0) if (Files[I->ID] == 0) return; } - // We store that to make sure that the destructor won't segfault, - // even if the Cache object was destructed before this instance. - PackageFileCount = Cache.HeaderP->PackageFileCount; } /*}}}*/ // Records::~pkgRecords - Destructor /*{{{*/ @@ -52,7 +49,7 @@ pkgRecords::pkgRecords(pkgCache &Cache) : Cache(Cache), Files(0) /* */ pkgRecords::~pkgRecords() { - for (unsigned I = 0; I != PackageFileCount; I++) + for (unsigned I = 0; I != Cache.HeaderP->PackageFileCount; I++) delete Files[I]; delete [] Files; } diff --git a/apt-pkg/pkgrecords.h b/apt-pkg/pkgrecords.h index f31e83afe..08f004414 100644 --- a/apt-pkg/pkgrecords.h +++ b/apt-pkg/pkgrecords.h @@ -33,7 +33,6 @@ class pkgRecords pkgCache &Cache; Parser **Files; - int PackageFileCount; public: -- cgit v1.2.3