0.5.15cnc6-alt15
- apt-pkg/sourcelist.cc: Added support for multiple fingerprints for the same vendor name
This commit is contained in:
parent
62c21c20e1
commit
3cda23c1f9
160
apt-0.5.15cnc6-alt-vendor.patch
Normal file
160
apt-0.5.15cnc6-alt-vendor.patch
Normal file
@ -0,0 +1,160 @@
|
||||
diff -Naurp apt-0.5.15cnc6.orig/apt-pkg/acquire-item.cc apt-0.5.15cnc6/apt-pkg/acquire-item.cc
|
||||
--- apt-0.5.15cnc6.orig/apt-pkg/acquire-item.cc 2005-07-08 15:02:30 +0400
|
||||
+++ apt-0.5.15cnc6/apt-pkg/acquire-item.cc 2005-07-08 16:14:04 +0400
|
||||
@@ -476,14 +476,29 @@ void pkgAcqIndexRel::Done(string Message
|
||||
return;
|
||||
}
|
||||
|
||||
- // Match fingerprint of Release file
|
||||
- if (Repository->Vendor->FingerPrint != FingerPrint)
|
||||
+ bool found = false;
|
||||
+ for (vector<string>::const_iterator I = Repository->Vendor->FingerPrint.begin();
|
||||
+ I != Repository->Vendor->FingerPrint.end(); I++)
|
||||
+ {
|
||||
+ // Match fingerprint of Release file
|
||||
+ if ((*I) == FingerPrint)
|
||||
+ {
|
||||
+ found = true;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!found)
|
||||
{
|
||||
Status = StatError;
|
||||
- ErrorText = _("Signature fingerprint of Release file does not match (expected ")
|
||||
- +Repository->Vendor->FingerPrint+_(", got ")+FingerPrint+")";
|
||||
+ ErrorText = _("Signature fingerprint of Release file does not match (expected ");
|
||||
+ for (vector<string>::const_iterator I = Repository->Vendor->FingerPrint.begin();
|
||||
+ I != Repository->Vendor->FingerPrint.end(); I++)
|
||||
+ ErrorText += "\n"+(*I);
|
||||
+ ErrorText += _(", got ")+FingerPrint+")";
|
||||
return;
|
||||
}
|
||||
+
|
||||
}
|
||||
|
||||
// Done, move it into position
|
||||
diff -Naurp apt-0.5.15cnc6.orig/apt-pkg/sourcelist.cc apt-0.5.15cnc6/apt-pkg/sourcelist.cc
|
||||
--- apt-0.5.15cnc6.orig/apt-pkg/sourcelist.cc 2003-12-10 14:56:28 +0300
|
||||
+++ apt-0.5.15cnc6/apt-pkg/sourcelist.cc 2005-07-08 17:20:32 +0400
|
||||
@@ -145,7 +145,7 @@ pkgSourceList::~pkgSourceList()
|
||||
{
|
||||
for (const_iterator I = SrcList.begin(); I != SrcList.end(); I++)
|
||||
delete *I;
|
||||
- for (vector<Vendor const *>::const_iterator I = VendorList.begin();
|
||||
+ for (vector<Vendor *>::iterator I = VendorList.begin();
|
||||
I != VendorList.end(); I++)
|
||||
delete *I;
|
||||
}
|
||||
@@ -169,38 +169,54 @@ bool pkgSourceList::ReadVendors()
|
||||
if (ReadConfigFile(Cnf,CnfFile,true) == false)
|
||||
return false;
|
||||
|
||||
- for (vector<Vendor const *>::const_iterator I = VendorList.begin();
|
||||
+ for (vector<Vendor *>::iterator I = VendorList.begin();
|
||||
I != VendorList.end(); I++)
|
||||
delete *I;
|
||||
VendorList.erase(VendorList.begin(),VendorList.end());
|
||||
-
|
||||
+
|
||||
// Process 'simple-key' type sections
|
||||
const Configuration::Item *Top = Cnf.Tree("simple-key");
|
||||
for (Top = (Top == 0?0:Top->Child); Top != 0; Top = Top->Next)
|
||||
{
|
||||
Configuration Block(Top);
|
||||
- Vendor *Vendor;
|
||||
+ Vendor *Vendor = 0;
|
||||
+ string Group = Block.Find("Group");
|
||||
+ bool New = true;
|
||||
|
||||
- Vendor = new pkgSourceList::Vendor;
|
||||
-
|
||||
- Vendor->VendorID = Top->Tag;
|
||||
- Vendor->FingerPrint = Block.Find("Fingerprint");
|
||||
- Vendor->Description = Block.Find("Name");
|
||||
+ for (vector<pkgSourceList::Vendor *>::iterator I = VendorList.begin();
|
||||
+ I != VendorList.end(); I++)
|
||||
+ {
|
||||
+ if ((*I)->VendorID == Group)
|
||||
+ {
|
||||
+ Vendor = *I;
|
||||
+ New = false;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!Vendor)
|
||||
+ {
|
||||
+ Vendor = new pkgSourceList::Vendor;
|
||||
+
|
||||
+ Vendor->Description = Block.Find("Name");
|
||||
+ Vendor->VendorID = Top->Tag;
|
||||
+ }
|
||||
+ string FingerPrint = Block.Find("Fingerprint");
|
||||
|
||||
// CNC:2002-08-15
|
||||
- char *buffer = new char[Vendor->FingerPrint.length()+1];
|
||||
+ char *buffer = new char[FingerPrint.length()+1];
|
||||
char *p = buffer;;
|
||||
- for (string::const_iterator I = Vendor->FingerPrint.begin();
|
||||
- I != Vendor->FingerPrint.end(); I++)
|
||||
+ for (string::const_iterator I = FingerPrint.begin();
|
||||
+ I != FingerPrint.end(); I++)
|
||||
{
|
||||
if (*I != ' ' && *I != '\t')
|
||||
*p++ = *I;
|
||||
}
|
||||
*p = 0;
|
||||
- Vendor->FingerPrint = buffer;
|
||||
+ Vendor->FingerPrint.push_back(string(buffer));
|
||||
delete [] buffer;
|
||||
|
||||
- if (Vendor->FingerPrint.empty() == true ||
|
||||
+ if (Vendor->FingerPrint.size() == 0 ||
|
||||
Vendor->Description.empty() == true)
|
||||
{
|
||||
_error->Error(_("Vendor block %s is invalid"), Vendor->VendorID.c_str());
|
||||
@@ -208,7 +225,8 @@ bool pkgSourceList::ReadVendors()
|
||||
continue;
|
||||
}
|
||||
|
||||
- VendorList.push_back(Vendor);
|
||||
+ if (New)
|
||||
+ VendorList.push_back(Vendor);
|
||||
}
|
||||
|
||||
/* XXX Process 'group-key' type sections
|
||||
@@ -350,7 +368,7 @@ bool pkgSourceList::ReadAppend(string Fi
|
||||
return _error->Error(_("Malformed line %u in source list %s (vendor id)"),CurLine,File.c_str());
|
||||
VendorID = string(VendorID,1,VendorID.size()-2);
|
||||
|
||||
- for (vector<Vendor const *>::const_iterator iter = VendorList.begin();
|
||||
+ for (vector<Vendor *>::iterator iter = VendorList.begin();
|
||||
iter != VendorList.end(); iter++)
|
||||
{
|
||||
if ((*iter)->VendorID == VendorID)
|
||||
diff -Naurp apt-0.5.15cnc6.orig/apt-pkg/sourcelist.h apt-0.5.15cnc6/apt-pkg/sourcelist.h
|
||||
--- apt-0.5.15cnc6.orig/apt-pkg/sourcelist.h 2003-03-03 23:15:04 +0300
|
||||
+++ apt-0.5.15cnc6/apt-pkg/sourcelist.h 2005-07-08 17:07:17 +0400
|
||||
@@ -48,8 +48,8 @@ class pkgSourceList
|
||||
struct Vendor
|
||||
{
|
||||
string VendorID;
|
||||
- string FingerPrint;
|
||||
+ vector<string> FingerPrint;
|
||||
string Description;
|
||||
|
||||
/* Lets revisit these..
|
||||
bool MatchFingerPrint(string FingerPrint);
|
||||
@@ -87,8 +88,8 @@ class pkgSourceList
|
||||
protected:
|
||||
|
||||
vector<pkgIndexFile *> SrcList;
|
||||
- vector<Vendor const *> VendorList;
|
||||
-
|
||||
+ vector<Vendor *> VendorList;
|
||||
+
|
||||
public:
|
||||
|
||||
bool ReadMainList();
|
8
apt.spec
8
apt.spec
@ -2,7 +2,7 @@
|
||||
|
||||
Name: apt
|
||||
Version: 0.5.15cnc6
|
||||
Release: alt14
|
||||
Release: alt15
|
||||
|
||||
Summary: Debian's Advanced Packaging Tool with RPM support
|
||||
Summary(ru_RU.KOI8-R): Debian APT - õÓÏ×ÅÒÛÅÎÓÔ×Ï×ÁÎÎÏÅ ÓÒÅÄÓÔ×Ï ÕÐÒÁ×ÌÅÎÉÑ ÐÁËÅÔÁÍÉ Ó ÐÏÄÄÅÒÖËÏÊ RPM
|
||||
@ -50,6 +50,7 @@ Patch36: apt-0.5.15cnc6-alt-lsgroup.patch
|
||||
Patch37: apt-0.5.15cnc6-alt-apt-shell-dl.patch
|
||||
Patch38: apt-0.5.15cnc6-alt-dash-cmd.patch
|
||||
Patch39: apt-0.5.15cnc6-alt-apt-pipe.patch
|
||||
Patch40: apt-0.5.15cnc6-alt-vendor.patch
|
||||
|
||||
# Normally not applied, but useful.
|
||||
Patch101: apt-0.5.4cnc9-alt-getsrc-debug.patch
|
||||
@ -241,6 +242,7 @@ This package contains method 'rsync' for APT.
|
||||
%patch37 -p1
|
||||
%patch38 -p1
|
||||
%patch39 -p1
|
||||
%patch40 -p1
|
||||
|
||||
find -type f -name \*.orig -delete -print
|
||||
|
||||
@ -356,6 +358,10 @@ fi
|
||||
# Probably %%doc with README.rsync?
|
||||
|
||||
%changelog
|
||||
* Fri Jul 08 2005 Kachalov Anton <mouse@altlinux.ru> 0.5.15cnc6-alt15
|
||||
- apt-pkg/sourcelist.cc:
|
||||
Added support for multiple fingerprints for the same vendor name
|
||||
|
||||
* Mon Jun 27 2005 Sergey Bolshakov <sbolshakov@altlinux.ru> 0.5.15cnc6-alt14
|
||||
- apt-shell: #5401 fixed (rider@)
|
||||
- apt-pipe: race during shutting down fixed
|
||||
|
Loading…
Reference in New Issue
Block a user