~jr/ubuntu/oneiric/apt/bzr-get-rename

« back to all changes in this revision

Viewing changes to apt-pkg/vendor.cc

  • Committer: Bazaar Package Importer
  • Author(s): Matt Zimmerman
  • Date: 2005-03-07 20:08:33 UTC
  • Revision ID: james.westby@ubuntu.com-20050307200833-0lxdgg2cb4oculdv
Tags: 0.6.35
* Merge apt--mvo--0 (incorporates 0.6.34ubuntu1):
  - Implement MaxSize and MaxAge in apt.cron.daily, to prevent the cache
    from growing too large (Ubuntu #6761)
  - some comments about the pkgAcqMetaSig::Custom600Headers() added
  - use gpg --with-colons
  - commented the ftp no_proxy unseting in methods/ftp.cc
  - added support for "Acquire::gpgv::options" in methods/gpgv.cc
* Merge bubulle@debian.org--2005/apt--main--0
  - Make capitalization more consistent
  - Un-fuzzy translations resulting from capitalization changes
  - Italian translation update

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifdef __GNUG__
 
2
#pragma implementation "apt-pkg/vendor.h"
 
3
#endif
 
4
 
 
5
#include <iostream>
 
6
#include <apt-pkg/error.h>
 
7
#include <apt-pkg/vendor.h>
 
8
#include <apt-pkg/configuration.h>
 
9
 
 
10
Vendor::Vendor(std::string VendorID,
 
11
               std::string Origin,
 
12
               std::vector<struct Vendor::Fingerprint *> *FingerprintList)
 
13
{
 
14
   this->VendorID = VendorID;
 
15
   this->Origin = Origin;
 
16
   for (std::vector<struct Vendor::Fingerprint *>::iterator I = FingerprintList->begin();
 
17
        I != FingerprintList->end(); I++)
 
18
   {
 
19
      if (_config->FindB("Debug::Vendor", false))
 
20
         std::cerr << "Vendor \"" << VendorID << "\": Mapping \""
 
21
                   << (*I)->Print << "\" to \"" << (*I)->Description << '"' << std::endl;
 
22
      Fingerprints[(*I)->Print] = (*I)->Description;
 
23
   }
 
24
   delete FingerprintList;
 
25
}
 
26
 
 
27
const string Vendor::LookupFingerprint(string Print) const
 
28
{
 
29
   std::map<string,string>::const_iterator Elt = Fingerprints.find(Print);
 
30
   if (Elt == Fingerprints.end())
 
31
      return "";
 
32
   else
 
33
      return (*Elt).second;
 
34
}
 
35
 
 
36
bool Vendor::CheckDist(string Dist)
 
37
{
 
38
   return true;
 
39
}