From 1c62ab240a76122afb95c6df7de19ec5ba5cee1a Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 20 Apr 2007 17:42:06 +0200 Subject: * apt-pkg/policy.cc: - allow multiple packages (thanks to David Foerster) --- apt-pkg/policy.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'apt-pkg') 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 #include +#include /*}}}*/ 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(); -- cgit v1.2.3