1 // -*- mode: cpp; mode: fold -*-
3 /* ######################################################################
5 Simple wrapper around a std::set to provide a similar interface to
6 a set of cache structures as to the complete set of all structures
7 in the pkgCache. Currently only Package is supported.
9 ##################################################################### */
11 // Include Files /*{{{*/
14 #include <apt-pkg/aptconfiguration.h>
15 #include <apt-pkg/cachefile.h>
16 #include <apt-pkg/cachefilter.h>
17 #include <apt-pkg/cacheset.h>
18 #include <apt-pkg/error.h>
19 #include <apt-pkg/strutl.h>
20 #include <apt-pkg/versionmatch.h>
21 #include <apt-pkg/pkgrecords.h>
22 #include <apt-pkg/policy.h>
31 // FromTask - Return all packages in the cache from a specific task /*{{{*/
32 bool PackageContainerInterface::FromTask(PackageContainerInterface
* const pci
, pkgCacheFile
&Cache
, std::string pattern
, CacheSetHelper
&helper
) {
33 size_t const archfound
= pattern
.find_last_of(':');
34 std::string arch
= "native";
35 if (archfound
!= std::string::npos
) {
36 arch
= pattern
.substr(archfound
+1);
37 pattern
.erase(archfound
);
40 if (pattern
[pattern
.length() -1] != '^')
42 pattern
.erase(pattern
.length()-1);
44 if (unlikely(Cache
.GetPkgCache() == 0 || Cache
.GetDepCache() == 0))
47 bool const wasEmpty
= pci
->empty();
49 pci
->setConstructor(TASK
);
52 pkgRecords
Recs(Cache
);
54 // build regexp for the task
57 snprintf(S
, sizeof(S
), "^Task:.*[, ]%s([, ]|$)", pattern
.c_str());
58 if(regcomp(&Pattern
,S
, REG_EXTENDED
| REG_NOSUB
| REG_NEWLINE
) != 0) {
59 _error
->Error("Failed to compile task regexp");
64 for (pkgCache::GrpIterator Grp
= Cache
->GrpBegin(); Grp
.end() == false; ++Grp
) {
65 pkgCache::PkgIterator Pkg
= Grp
.FindPkg(arch
);
66 if (Pkg
.end() == true)
68 pkgCache::VerIterator ver
= Cache
[Pkg
].CandidateVerIter(Cache
);
72 pkgRecords::Parser
&parser
= Recs
.Lookup(ver
.FileList());
73 const char *start
, *end
;
74 parser
.GetRec(start
,end
);
75 unsigned int const length
= end
- start
;
76 if (unlikely(length
== 0))
79 strncpy(buf
, start
, length
);
81 if (regexec(&Pattern
, buf
, 0, 0, 0) != 0)
85 helper
.showTaskSelection(Pkg
, pattern
);
91 helper
.canNotFindTask(pci
, Cache
, pattern
);
92 pci
->setConstructor(UNKNOWN
);
96 if (wasEmpty
== false && pci
->getConstructor() != UNKNOWN
)
97 pci
->setConstructor(UNKNOWN
);
102 // FromRegEx - Return all packages in the cache matching a pattern /*{{{*/
103 bool PackageContainerInterface::FromRegEx(PackageContainerInterface
* const pci
, pkgCacheFile
&Cache
, std::string pattern
, CacheSetHelper
&helper
) {
104 static const char * const isregex
= ".?+*|[^$";
105 if (pattern
.find_first_of(isregex
) == std::string::npos
)
108 bool const wasEmpty
= pci
->empty();
109 if (wasEmpty
== true)
110 pci
->setConstructor(REGEX
);
112 size_t archfound
= pattern
.find_last_of(':');
113 std::string arch
= "native";
114 if (archfound
!= std::string::npos
) {
115 arch
= pattern
.substr(archfound
+1);
116 if (arch
.find_first_of(isregex
) == std::string::npos
)
117 pattern
.erase(archfound
);
122 if (unlikely(Cache
.GetPkgCache() == 0))
125 APT::CacheFilter::PackageNameMatchesRegEx
regexfilter(pattern
);
128 for (pkgCache::GrpIterator Grp
= Cache
.GetPkgCache()->GrpBegin(); Grp
.end() == false; ++Grp
) {
129 if (regexfilter(Grp
) == false)
131 pkgCache::PkgIterator Pkg
= Grp
.FindPkg(arch
);
132 if (Pkg
.end() == true) {
133 if (archfound
== std::string::npos
) {
134 std::vector
<std::string
> archs
= APT::Configuration::getArchitectures();
135 for (std::vector
<std::string
>::const_iterator a
= archs
.begin();
136 a
!= archs
.end() && Pkg
.end() != true; ++a
)
137 Pkg
= Grp
.FindPkg(*a
);
139 if (Pkg
.end() == true)
144 helper
.showRegExSelection(Pkg
, pattern
);
148 if (found
== false) {
149 helper
.canNotFindRegEx(pci
, Cache
, pattern
);
150 pci
->setConstructor(UNKNOWN
);
154 if (wasEmpty
== false && pci
->getConstructor() != UNKNOWN
)
155 pci
->setConstructor(UNKNOWN
);
160 // FromFnmatch - Returns the package defined by this fnmatch /*{{{*/
162 PackageContainerInterface::FromFnmatch(PackageContainerInterface
* const pci
,
165 CacheSetHelper
&helper
)
167 static const char * const isfnmatch
= ".?*[]!";
168 if (pattern
.find_first_of(isfnmatch
) == std::string::npos
)
171 bool const wasEmpty
= pci
->empty();
172 if (wasEmpty
== true)
173 pci
->setConstructor(FNMATCH
);
175 size_t archfound
= pattern
.find_last_of(':');
176 std::string arch
= "native";
177 if (archfound
!= std::string::npos
) {
178 arch
= pattern
.substr(archfound
+1);
179 if (arch
.find_first_of(isfnmatch
) == std::string::npos
)
180 pattern
.erase(archfound
);
185 if (unlikely(Cache
.GetPkgCache() == 0))
188 APT::CacheFilter::PackageNameMatchesFnmatch
filter(pattern
);
191 for (pkgCache::GrpIterator Grp
= Cache
.GetPkgCache()->GrpBegin(); Grp
.end() == false; ++Grp
) {
192 if (filter(Grp
) == false)
194 pkgCache::PkgIterator Pkg
= Grp
.FindPkg(arch
);
195 if (Pkg
.end() == true) {
196 if (archfound
== std::string::npos
) {
197 std::vector
<std::string
> archs
= APT::Configuration::getArchitectures();
198 for (std::vector
<std::string
>::const_iterator a
= archs
.begin();
199 a
!= archs
.end() && Pkg
.end() != true; ++a
)
200 Pkg
= Grp
.FindPkg(*a
);
202 if (Pkg
.end() == true)
207 #if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
208 helper
.showFnmatchSelection(Pkg
, pattern
);
210 helper
.showRegExSelection(Pkg
, pattern
);
215 if (found
== false) {
216 #if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
217 helper
.canNotFindFnmatch(pci
, Cache
, pattern
);
219 helper
.canNotFindRegEx(pci
, Cache
, pattern
);
221 pci
->setConstructor(UNKNOWN
);
225 if (wasEmpty
== false && pci
->getConstructor() != UNKNOWN
)
226 pci
->setConstructor(UNKNOWN
);
231 // FromName - Returns the package defined by this string /*{{{*/
232 pkgCache::PkgIterator
PackageContainerInterface::FromName(pkgCacheFile
&Cache
,
233 std::string
const &str
, CacheSetHelper
&helper
) {
234 std::string pkg
= str
;
235 size_t archfound
= pkg
.find_last_of(':');
237 if (archfound
!= std::string::npos
) {
238 arch
= pkg
.substr(archfound
+1);
239 pkg
.erase(archfound
);
242 if (Cache
.GetPkgCache() == 0)
243 return pkgCache::PkgIterator(Cache
, 0);
245 pkgCache::PkgIterator
Pkg(Cache
, 0);
246 if (arch
.empty() == true) {
247 pkgCache::GrpIterator Grp
= Cache
.GetPkgCache()->FindGrp(pkg
);
248 if (Grp
.end() == false)
249 Pkg
= Grp
.FindPreferredPkg();
251 Pkg
= Cache
.GetPkgCache()->FindPkg(pkg
, arch
);
253 if (Pkg
.end() == true)
254 return helper
.canNotFindPkgName(Cache
, str
);
258 // FromGroup - Returns the package defined by this string /*{{{*/
259 bool PackageContainerInterface::FromGroup(PackageContainerInterface
* const pci
, pkgCacheFile
&Cache
,
260 std::string pkg
, CacheSetHelper
&helper
) {
261 if (unlikely(Cache
.GetPkgCache() == 0))
264 size_t const archfound
= pkg
.find_last_of(':');
266 if (archfound
!= std::string::npos
) {
267 arch
= pkg
.substr(archfound
+1);
268 pkg
.erase(archfound
);
269 if (arch
== "all" || arch
== "native")
270 arch
= _config
->Find("APT::Architecture");
273 pkgCache::GrpIterator Grp
= Cache
.GetPkgCache()->FindGrp(pkg
);
274 if (Grp
.end() == false) {
275 if (arch
.empty() == true) {
276 pkgCache::PkgIterator Pkg
= Grp
.FindPreferredPkg();
277 if (Pkg
.end() == false)
284 // for 'linux-any' return the first package matching, for 'linux-*' return all matches
285 bool const isGlobal
= arch
.find('*') != std::string::npos
;
286 APT::CacheFilter::PackageArchitectureMatchesSpecification
pams(arch
);
287 for (pkgCache::PkgIterator Pkg
= Grp
.PackageList(); Pkg
.end() == false; Pkg
= Grp
.NextPkg(Pkg
)) {
288 if (pams(Pkg
) == false)
292 if (isGlobal
== false)
300 pkgCache::PkgIterator Pkg
= helper
.canNotFindPkgName(Cache
, pkg
);
301 if (Pkg
.end() == true)
308 // FromString - Return all packages matching a specific string /*{{{*/
309 bool PackageContainerInterface::FromString(PackageContainerInterface
* const pci
, pkgCacheFile
&Cache
, std::string
const &str
, CacheSetHelper
&helper
) {
311 _error
->PushToStack();
313 if (FromGroup(pci
, Cache
, str
, helper
) == false &&
314 FromTask(pci
, Cache
, str
, helper
) == false &&
315 FromFnmatch(pci
, Cache
, str
, helper
) == false &&
316 FromRegEx(pci
, Cache
, str
, helper
) == false)
318 helper
.canNotFindPackage(pci
, Cache
, str
);
323 _error
->RevertToStack();
325 _error
->MergeWithStack();
329 // FromCommandLine - Return all packages specified on commandline /*{{{*/
330 bool PackageContainerInterface::FromCommandLine(PackageContainerInterface
* const pci
, pkgCacheFile
&Cache
, const char **cmdline
, CacheSetHelper
&helper
) {
332 for (const char **I
= cmdline
; *I
!= 0; ++I
)
333 found
|= PackageContainerInterface::FromString(pci
, Cache
, *I
, helper
);
337 // FromModifierCommandLine - helper doing the work for PKG:GroupedFromCommandLine /*{{{*/
338 bool PackageContainerInterface::FromModifierCommandLine(unsigned short &modID
, PackageContainerInterface
* const pci
,
339 pkgCacheFile
&Cache
, const char * cmdline
,
340 std::list
<Modifier
> const &mods
, CacheSetHelper
&helper
) {
341 std::string str
= cmdline
;
342 unsigned short fallback
= modID
;
343 bool modifierPresent
= false;
344 for (std::list
<Modifier
>::const_iterator mod
= mods
.begin();
345 mod
!= mods
.end(); ++mod
) {
346 size_t const alength
= strlen(mod
->Alias
);
348 case Modifier::POSTFIX
:
349 if (str
.compare(str
.length() - alength
, alength
,
350 mod
->Alias
, 0, alength
) != 0)
352 str
.erase(str
.length() - alength
);
355 case Modifier::PREFIX
:
360 modifierPresent
= true;
363 if (modifierPresent
== true) {
364 bool const errors
= helper
.showErrors(false);
365 pkgCache::PkgIterator Pkg
= FromName(Cache
, cmdline
, helper
);
366 helper
.showErrors(errors
);
367 if (Pkg
.end() == false) {
373 return FromString(pci
, Cache
, str
, helper
);
376 // FromModifierCommandLine - helper doing the work for VER:GroupedFromCommandLine /*{{{*/
377 bool VersionContainerInterface::FromModifierCommandLine(unsigned short &modID
,
378 VersionContainerInterface
* const vci
,
379 pkgCacheFile
&Cache
, const char * cmdline
,
380 std::list
<Modifier
> const &mods
,
381 CacheSetHelper
&helper
) {
382 Version select
= NEWEST
;
383 std::string str
= cmdline
;
384 bool modifierPresent
= false;
385 unsigned short fallback
= modID
;
386 for (std::list
<Modifier
>::const_iterator mod
= mods
.begin();
387 mod
!= mods
.end(); ++mod
) {
388 if (modID
== fallback
&& mod
->ID
== fallback
)
389 select
= mod
->SelectVersion
;
390 size_t const alength
= strlen(mod
->Alias
);
392 case Modifier::POSTFIX
:
393 if (str
.compare(str
.length() - alength
, alength
,
394 mod
->Alias
, 0, alength
) != 0)
396 str
.erase(str
.length() - alength
);
398 select
= mod
->SelectVersion
;
400 case Modifier::PREFIX
:
405 modifierPresent
= true;
408 if (modifierPresent
== true) {
409 bool const errors
= helper
.showErrors(false);
410 bool const found
= VersionContainerInterface::FromString(vci
, Cache
, cmdline
, select
, helper
, true);
411 helper
.showErrors(errors
);
417 return FromString(vci
, Cache
, str
, select
, helper
);
420 // FromCommandLine - Return all versions specified on commandline /*{{{*/
421 bool VersionContainerInterface::FromCommandLine(VersionContainerInterface
* const vci
,
422 pkgCacheFile
&Cache
, const char **cmdline
,
423 Version
const &fallback
, CacheSetHelper
&helper
) {
425 for (const char **I
= cmdline
; *I
!= 0; ++I
)
426 found
|= VersionContainerInterface::FromString(vci
, Cache
, *I
, fallback
, helper
);
430 // FromString - Returns all versions spedcified by a string /*{{{*/
431 bool VersionContainerInterface::FromString(VersionContainerInterface
* const vci
,
432 pkgCacheFile
&Cache
, std::string pkg
,
433 Version
const &fallback
, CacheSetHelper
&helper
,
434 bool const onlyFromName
) {
436 bool verIsRel
= false;
437 size_t const vertag
= pkg
.find_last_of("/=");
438 if (vertag
!= std::string::npos
) {
439 ver
= pkg
.substr(vertag
+1);
440 verIsRel
= (pkg
[vertag
] == '/');
444 if (onlyFromName
== false)
445 PackageContainerInterface::FromString(&pkgset
, Cache
, pkg
, helper
);
447 pkgset
.insert(PackageContainerInterface::FromName(Cache
, pkg
, helper
));
451 if (pkgset
.getConstructor() != PackageSet::UNKNOWN
)
452 errors
= helper
.showErrors(false);
455 for (PackageSet::const_iterator P
= pkgset
.begin();
456 P
!= pkgset
.end(); ++P
) {
457 if (vertag
== std::string::npos
) {
458 found
|= VersionContainerInterface::FromPackage(vci
, Cache
, P
, fallback
, helper
);
461 pkgCache::VerIterator V
;
462 if (ver
== "installed")
463 V
= getInstalledVer(Cache
, P
, helper
);
464 else if (ver
== "candidate")
465 V
= getCandidateVer(Cache
, P
, helper
);
466 else if (ver
== "newest") {
467 if (P
->VersionList
!= 0)
470 V
= helper
.canNotFindNewestVer(Cache
, P
);
472 pkgVersionMatch
Match(ver
, (verIsRel
== true ? pkgVersionMatch::Release
:
473 pkgVersionMatch::Version
));
475 if (V
.end() == true) {
476 if (verIsRel
== true)
477 _error
->Error(_("Release '%s' for '%s' was not found"),
478 ver
.c_str(), P
.FullName(true).c_str());
480 _error
->Error(_("Version '%s' for '%s' was not found"),
481 ver
.c_str(), P
.FullName(true).c_str());
487 helper
.showSelectedVersion(P
, V
, ver
, verIsRel
);
491 if (pkgset
.getConstructor() != PackageSet::UNKNOWN
)
492 helper
.showErrors(errors
);
496 // FromPackage - versions from package based on fallback /*{{{*/
497 bool VersionContainerInterface::FromPackage(VersionContainerInterface
* const vci
,
499 pkgCache::PkgIterator
const &P
,
500 Version
const &fallback
,
501 CacheSetHelper
&helper
) {
502 pkgCache::VerIterator V
;
507 if (P
->VersionList
!= 0)
508 for (V
= P
.VersionList(); V
.end() != true; ++V
)
509 found
|= vci
->insert(V
);
511 helper
.canNotFindAllVer(vci
, Cache
, P
);
514 found
|= vci
->insert(getInstalledVer(Cache
, P
, helper
));
515 found
|= vci
->insert(getCandidateVer(Cache
, P
, helper
));
518 found
|= vci
->insert(getCandidateVer(Cache
, P
, helper
));
521 found
|= vci
->insert(getInstalledVer(Cache
, P
, helper
));
524 showErrors
= helper
.showErrors(false);
525 V
= getCandidateVer(Cache
, P
, helper
);
527 V
= getInstalledVer(Cache
, P
, helper
);
528 helper
.showErrors(showErrors
);
529 if (V
.end() == false)
530 found
|= vci
->insert(V
);
532 helper
.canNotFindInstCandVer(vci
, Cache
, P
);
535 showErrors
= helper
.showErrors(false);
536 V
= getInstalledVer(Cache
, P
, helper
);
538 V
= getCandidateVer(Cache
, P
, helper
);
539 helper
.showErrors(showErrors
);
540 if (V
.end() == false)
541 found
|= vci
->insert(V
);
543 helper
.canNotFindInstCandVer(vci
, Cache
, P
);
546 if (P
->VersionList
!= 0)
547 found
|= vci
->insert(P
.VersionList());
549 helper
.canNotFindNewestVer(Cache
, P
);
555 // getCandidateVer - Returns the candidate version of the given package /*{{{*/
556 pkgCache::VerIterator
VersionContainerInterface::getCandidateVer(pkgCacheFile
&Cache
,
557 pkgCache::PkgIterator
const &Pkg
, CacheSetHelper
&helper
) {
558 pkgCache::VerIterator Cand
;
559 if (Cache
.IsPolicyBuilt() == true || Cache
.IsDepCacheBuilt() == false) {
560 if (unlikely(Cache
.GetPolicy() == 0))
561 return pkgCache::VerIterator(Cache
);
562 Cand
= Cache
.GetPolicy()->GetCandidateVer(Pkg
);
564 Cand
= Cache
[Pkg
].CandidateVerIter(Cache
);
566 if (Cand
.end() == true)
567 return helper
.canNotFindCandidateVer(Cache
, Pkg
);
571 // getInstalledVer - Returns the installed version of the given package /*{{{*/
572 pkgCache::VerIterator
VersionContainerInterface::getInstalledVer(pkgCacheFile
&Cache
,
573 pkgCache::PkgIterator
const &Pkg
, CacheSetHelper
&helper
) {
574 if (Pkg
->CurrentVer
== 0)
575 return helper
.canNotFindInstalledVer(Cache
, Pkg
);
576 return Pkg
.CurrentVer();
580 // canNotFindPkgName - handle the case no package has this name /*{{{*/
581 pkgCache::PkgIterator
CacheSetHelper::canNotFindPkgName(pkgCacheFile
&Cache
,
582 std::string
const &str
) {
583 if (ShowError
== true)
584 _error
->Insert(ErrorType
, _("Unable to locate package %s"), str
.c_str());
585 return pkgCache::PkgIterator(Cache
, 0);
588 // canNotFindTask - handle the case no package is found for a task /*{{{*/
589 void CacheSetHelper::canNotFindTask(PackageContainerInterface
* const pci
, pkgCacheFile
&Cache
, std::string pattern
) {
590 if (ShowError
== true)
591 _error
->Insert(ErrorType
, _("Couldn't find task '%s'"), pattern
.c_str());
594 // canNotFindRegEx - handle the case no package is found by a regex /*{{{*/
595 void CacheSetHelper::canNotFindRegEx(PackageContainerInterface
* const pci
, pkgCacheFile
&Cache
, std::string pattern
) {
596 if (ShowError
== true)
597 _error
->Insert(ErrorType
, _("Couldn't find any package by regex '%s'"), pattern
.c_str());
599 #if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
600 // canNotFindFnmatch - handle the case no package is found by a fnmatch /*{{{*/
601 void CacheSetHelper::canNotFindFnmatch(PackageContainerInterface
* const pci
, pkgCacheFile
&Cache
, std::string pattern
) {
602 if (ShowError
== true)
603 _error
->Insert(ErrorType
, _("Couldn't find any package by glob '%s'"), pattern
.c_str());
606 // canNotFindPackage - handle the case no package is found from a string/*{{{*/
607 void CacheSetHelper::canNotFindPackage(PackageContainerInterface
* const pci
, pkgCacheFile
&Cache
, std::string
const &str
) {
610 // canNotFindAllVer /*{{{*/
611 void CacheSetHelper::canNotFindAllVer(VersionContainerInterface
* const vci
, pkgCacheFile
&Cache
,
612 pkgCache::PkgIterator
const &Pkg
) {
613 if (ShowError
== true)
614 _error
->Insert(ErrorType
, _("Can't select versions from package '%s' as it is purely virtual"), Pkg
.FullName(true).c_str());
617 // canNotFindInstCandVer /*{{{*/
618 void CacheSetHelper::canNotFindInstCandVer(VersionContainerInterface
* const vci
, pkgCacheFile
&Cache
,
619 pkgCache::PkgIterator
const &Pkg
) {
620 if (ShowError
== true)
621 _error
->Insert(ErrorType
, _("Can't select installed nor candidate version from package '%s' as it has neither of them"), Pkg
.FullName(true).c_str());
624 // canNotFindInstCandVer /*{{{*/
625 void CacheSetHelper::canNotFindCandInstVer(VersionContainerInterface
* const vci
, pkgCacheFile
&Cache
,
626 pkgCache::PkgIterator
const &Pkg
) {
627 if (ShowError
== true)
628 _error
->Insert(ErrorType
, _("Can't select installed nor candidate version from package '%s' as it has neither of them"), Pkg
.FullName(true).c_str());
631 // canNotFindNewestVer /*{{{*/
632 pkgCache::VerIterator
CacheSetHelper::canNotFindNewestVer(pkgCacheFile
&Cache
,
633 pkgCache::PkgIterator
const &Pkg
) {
634 if (ShowError
== true)
635 _error
->Insert(ErrorType
, _("Can't select newest version from package '%s' as it is purely virtual"), Pkg
.FullName(true).c_str());
636 return pkgCache::VerIterator(Cache
, 0);
639 // canNotFindCandidateVer /*{{{*/
640 pkgCache::VerIterator
CacheSetHelper::canNotFindCandidateVer(pkgCacheFile
&Cache
,
641 pkgCache::PkgIterator
const &Pkg
) {
642 if (ShowError
== true)
643 _error
->Insert(ErrorType
, _("Can't select candidate version from package %s as it has no candidate"), Pkg
.FullName(true).c_str());
644 return pkgCache::VerIterator(Cache
, 0);
647 // canNotFindInstalledVer /*{{{*/
648 pkgCache::VerIterator
CacheSetHelper::canNotFindInstalledVer(pkgCacheFile
&Cache
,
649 pkgCache::PkgIterator
const &Pkg
) {
650 if (ShowError
== true)
651 _error
->Insert(ErrorType
, _("Can't select installed version from package %s as it is not installed"), Pkg
.FullName(true).c_str());
652 return pkgCache::VerIterator(Cache
, 0);
655 // showTaskSelection /*{{{*/
656 void CacheSetHelper::showTaskSelection(pkgCache::PkgIterator
const &pkg
,
657 std::string
const &pattern
) {
660 // showRegExSelection /*{{{*/
661 void CacheSetHelper::showRegExSelection(pkgCache::PkgIterator
const &pkg
,
662 std::string
const &pattern
) {
665 #if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
666 // showFnmatchSelection /*{{{*/
667 void CacheSetHelper::showFnmatchSelection(pkgCache::PkgIterator
const &pkg
,
668 std::string
const &pattern
) {
672 // showSelectedVersion /*{{{*/
673 void CacheSetHelper::showSelectedVersion(pkgCache::PkgIterator
const &Pkg
,
674 pkgCache::VerIterator
const Ver
,
675 std::string
const &ver
,
676 bool const verIsRel
) {