summaryrefslogtreecommitdiff
path: root/apt-pkg/policy.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2007-04-20 17:42:06 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2007-04-20 17:42:06 +0200
commit1c62ab240a76122afb95c6df7de19ec5ba5cee1a (patch)
tree91a6af73d37b55d6eb661d564770d2931dc86467 /apt-pkg/policy.cc
parentc03462c6fed27e26b2bab4b3b34589fa8bf464f8 (diff)
* apt-pkg/policy.cc:
- allow multiple packages (thanks to David Foerster)
Diffstat (limited to 'apt-pkg/policy.cc')
-rw-r--r--apt-pkg/policy.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc
index d8b8825c2..35a50425b 100644
--- a/apt-pkg/policy.cc
+++ b/apt-pkg/policy.cc
@@ -36,6 +36,7 @@
#include <apti18n.h>
#include <iostream>
+#include <sstream>
/*}}}*/
using namespace std;
@@ -300,7 +301,13 @@ bool ReadPinFile(pkgPolicy &Plcy,string File)
continue;
}
- Plcy.CreatePin(Type,Name,string(Word,End),priority);
+ istringstream s(Name);
+ string pkg;
+ while(!s.eof())
+ {
+ s >> pkg;
+ Plcy.CreatePin(Type, pkg, string(Word,End),priority);
+ };
}
Plcy.InitDefaults();