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