]> git.saurik.com Git - apt.git/blame - apt-pkg/vendor.cc
merge patch from Daniel Hartwig to Show a error message if {,dist-}upgrade is used...
[apt.git] / apt-pkg / vendor.cc
CommitLineData
ea542140
DK
1#include<config.h>
2
b3d44315
MV
3#include <iostream>
4#include <apt-pkg/error.h>
5#include <apt-pkg/vendor.h>
6#include <apt-pkg/configuration.h>
7
8Vendor::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();
69c2ecbd 15 I != FingerprintList->end(); ++I)
b3d44315
MV
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
8f3ba4e8 25const std::string Vendor::LookupFingerprint(std::string Print) const
b3d44315 26{
8f3ba4e8 27 std::map<std::string,std::string>::const_iterator Elt = Fingerprints.find(Print);
b3d44315
MV
28 if (Elt == Fingerprints.end())
29 return "";
30 else
31 return (*Elt).second;
32}
33
8f3ba4e8 34bool Vendor::CheckDist(std::string Dist)
b3d44315
MV
35{
36 return true;
37}