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/versionmatch.h>
20 #include <apt-pkg/pkgrecords.h>
21 #include <apt-pkg/policy.h>
22 #include <apt-pkg/cacheiterators.h>
23 #include <apt-pkg/configuration.h>
24 #include <apt-pkg/depcache.h>
25 #include <apt-pkg/macros.h>
26 #include <apt-pkg/pkgcache.h>
39 // FromTask - Return all packages in the cache from a specific task /*{{{*/
40 bool PackageContainerInterface::FromTask(PackageContainerInterface
* const pci
, pkgCacheFile
&Cache
, std::string pattern
, CacheSetHelper
&helper
) {
41 size_t const archfound
= pattern
.find_last_of(':');
42 std::string arch
= "native";
43 if (archfound
!= std::string::npos
) {
44 arch
= pattern
.substr(archfound
+1);
45 pattern
.erase(archfound
);
48 if (pattern
[pattern
.length() -1] != '^')
50 pattern
.erase(pattern
.length()-1);
52 if (unlikely(Cache
.GetPkgCache() == 0 || Cache
.GetDepCache() == 0))
55 bool const wasEmpty
= pci
->empty();
57 pci
->setConstructor(TASK
);
60 pkgRecords
Recs(Cache
);
62 // build regexp for the task
65 snprintf(S
, sizeof(S
), "^Task:.*[, ]%s([, ]|$)", pattern
.c_str());
66 if(regcomp(&Pattern
,S
, REG_EXTENDED
| REG_NOSUB
| REG_NEWLINE
) != 0) {
67 _error
->Error("Failed to compile task regexp");
72 for (pkgCache::GrpIterator Grp
= Cache
->GrpBegin(); Grp
.end() == false; ++Grp
) {
73 pkgCache::PkgIterator Pkg
= Grp
.FindPkg(arch
);
74 if (Pkg
.end() == true)
76 pkgCache::VerIterator ver
= Cache
[Pkg
].CandidateVerIter(Cache
);
80 pkgRecords::Parser
&parser
= Recs
.Lookup(ver
.FileList());
81 const char *start
, *end
;
82 parser
.GetRec(start
,end
);
83 unsigned int const length
= end
- start
;
84 if (unlikely(length
== 0))
87 strncpy(buf
, start
, length
);
89 if (regexec(&Pattern
, buf
, 0, 0, 0) != 0)
93 helper
.showTaskSelection(Pkg
, pattern
);
99 helper
.canNotFindTask(pci
, Cache
, pattern
);
100 pci
->setConstructor(UNKNOWN
);
104 if (wasEmpty
== false && pci
->getConstructor() != UNKNOWN
)
105 pci
->setConstructor(UNKNOWN
);
110 // FromRegEx - Return all packages in the cache matching a pattern /*{{{*/
111 bool PackageContainerInterface::FromRegEx(PackageContainerInterface
* const pci
, pkgCacheFile
&Cache
, std::string pattern
, CacheSetHelper
&helper
) {
112 static const char * const isregex
= ".?+*|[^$";
113 if (pattern
.find_first_of(isregex
) == std::string::npos
)
116 bool const wasEmpty
= pci
->empty();
117 if (wasEmpty
== true)
118 pci
->setConstructor(REGEX
);
120 size_t archfound
= pattern
.find_last_of(':');
121 std::string arch
= "native";
122 if (archfound
!= std::string::npos
) {
123 arch
= pattern
.substr(archfound
+1);
124 if (arch
.find_first_of(isregex
) == std::string::npos
)
125 pattern
.erase(archfound
);
130 if (unlikely(Cache
.GetPkgCache() == 0))
133 APT::CacheFilter::PackageNameMatchesRegEx
regexfilter(pattern
);
136 for (pkgCache::GrpIterator Grp
= Cache
.GetPkgCache()->GrpBegin(); Grp
.end() == false; ++Grp
) {
137 if (regexfilter(Grp
) == false)
139 pkgCache::PkgIterator Pkg
= Grp
.FindPkg(arch
);
140 if (Pkg
.end() == true) {
141 if (archfound
== std::string::npos
) {
142 std::vector
<std::string
> archs
= APT::Configuration::getArchitectures();
143 for (std::vector
<std::string
>::const_iterator a
= archs
.begin();
144 a
!= archs
.end() && Pkg
.end() != true; ++a
)
145 Pkg
= Grp
.FindPkg(*a
);
147 if (Pkg
.end() == true)
152 helper
.showRegExSelection(Pkg
, pattern
);
156 if (found
== false) {
157 helper
.canNotFindRegEx(pci
, Cache
, pattern
);
158 pci
->setConstructor(UNKNOWN
);
162 if (wasEmpty
== false && pci
->getConstructor() != UNKNOWN
)
163 pci
->setConstructor(UNKNOWN
);
168 // FromFnmatch - Returns the package defined by this fnmatch /*{{{*/
170 PackageContainerInterface::FromFnmatch(PackageContainerInterface
* const pci
,
173 CacheSetHelper
&helper
)
175 static const char * const isfnmatch
= ".?*[]!";
176 if (pattern
.find_first_of(isfnmatch
) == std::string::npos
)
179 bool const wasEmpty
= pci
->empty();
180 if (wasEmpty
== true)
181 pci
->setConstructor(FNMATCH
);
183 size_t archfound
= pattern
.find_last_of(':');
184 std::string arch
= "native";
185 if (archfound
!= std::string::npos
) {
186 arch
= pattern
.substr(archfound
+1);
187 if (arch
.find_first_of(isfnmatch
) == std::string::npos
)
188 pattern
.erase(archfound
);
193 if (unlikely(Cache
.GetPkgCache() == 0))
196 APT::CacheFilter::PackageNameMatchesFnmatch
filter(pattern
);
199 for (pkgCache::GrpIterator Grp
= Cache
.GetPkgCache()->GrpBegin(); Grp
.end() == false; ++Grp
) {
200 if (filter(Grp
) == false)
202 pkgCache::PkgIterator Pkg
= Grp
.FindPkg(arch
);
203 if (Pkg
.end() == true) {
204 if (archfound
== std::string::npos
) {
205 std::vector
<std::string
> archs
= APT::Configuration::getArchitectures();
206 for (std::vector
<std::string
>::const_iterator a
= archs
.begin();
207 a
!= archs
.end() && Pkg
.end() != true; ++a
)
208 Pkg
= Grp
.FindPkg(*a
);
210 if (Pkg
.end() == true)
215 #if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
216 helper
.showFnmatchSelection(Pkg
, pattern
);
218 helper
.showRegExSelection(Pkg
, pattern
);
223 if (found
== false) {
224 #if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
225 helper
.canNotFindFnmatch(pci
, Cache
, pattern
);
227 helper
.canNotFindRegEx(pci
, Cache
, pattern
);
229 pci
->setConstructor(UNKNOWN
);
233 if (wasEmpty
== false && pci
->getConstructor() != UNKNOWN
)
234 pci
->setConstructor(UNKNOWN
);
239 // FromName - Returns the package defined by this string /*{{{*/
240 pkgCache::PkgIterator
PackageContainerInterface::FromName(pkgCacheFile
&Cache
,
241 std::string
const &str
, CacheSetHelper
&helper
) {
242 std::string pkg
= str
;
243 size_t archfound
= pkg
.find_last_of(':');
245 if (archfound
!= std::string::npos
) {
246 arch
= pkg
.substr(archfound
+1);
247 pkg
.erase(archfound
);
250 if (Cache
.GetPkgCache() == 0)
251 return pkgCache::PkgIterator(Cache
, 0);
253 pkgCache::PkgIterator
Pkg(Cache
, 0);
254 if (arch
.empty() == true) {
255 pkgCache::GrpIterator Grp
= Cache
.GetPkgCache()->FindGrp(pkg
);
256 if (Grp
.end() == false)
257 Pkg
= Grp
.FindPreferredPkg();
259 Pkg
= Cache
.GetPkgCache()->FindPkg(pkg
, arch
);
261 if (Pkg
.end() == true)
262 return helper
.canNotFindPkgName(Cache
, str
);
266 // FromGroup - Returns the package defined by this string /*{{{*/
267 bool PackageContainerInterface::FromGroup(PackageContainerInterface
* const pci
, pkgCacheFile
&Cache
,
268 std::string pkg
, CacheSetHelper
&helper
) {
269 if (unlikely(Cache
.GetPkgCache() == 0))
272 size_t const archfound
= pkg
.find_last_of(':');
274 if (archfound
!= std::string::npos
) {
275 arch
= pkg
.substr(archfound
+1);
276 pkg
.erase(archfound
);
277 if (arch
== "all" || arch
== "native")
278 arch
= _config
->Find("APT::Architecture");
281 pkgCache::GrpIterator Grp
= Cache
.GetPkgCache()->FindGrp(pkg
);
282 if (Grp
.end() == false) {
283 if (arch
.empty() == true) {
284 pkgCache::PkgIterator Pkg
= Grp
.FindPreferredPkg();
285 if (Pkg
.end() == false)
292 // for 'linux-any' return the first package matching, for 'linux-*' return all matches
293 bool const isGlobal
= arch
.find('*') != std::string::npos
;
294 APT::CacheFilter::PackageArchitectureMatchesSpecification
pams(arch
);
295 for (pkgCache::PkgIterator Pkg
= Grp
.PackageList(); Pkg
.end() == false; Pkg
= Grp
.NextPkg(Pkg
)) {
296 if (pams(Pkg
) == false)
300 if (isGlobal
== false)
308 pkgCache::PkgIterator Pkg
= helper
.canNotFindPkgName(Cache
, pkg
);
309 if (Pkg
.end() == true)
316 // FromString - Return all packages matching a specific string /*{{{*/
317 bool PackageContainerInterface::FromString(PackageContainerInterface
* const pci
, pkgCacheFile
&Cache
, std::string
const &str
, CacheSetHelper
&helper
) {
319 _error
->PushToStack();
321 if (FromGroup(pci
, Cache
, str
, helper
) == false &&
322 FromTask(pci
, Cache
, str
, helper
) == false &&
323 #if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
324 FromFnmatch(pci
, Cache
, str
, helper
) == false)
326 FromRegEx(pci
, Cache
, str
, helper
) == false)
328 helper
.canNotFindPackage(pci
, Cache
, str
);
333 _error
->RevertToStack();
335 _error
->MergeWithStack();
339 // FromCommandLine - Return all packages specified on commandline /*{{{*/
340 bool PackageContainerInterface::FromCommandLine(PackageContainerInterface
* const pci
, pkgCacheFile
&Cache
, const char **cmdline
, CacheSetHelper
&helper
) {
342 for (const char **I
= cmdline
; *I
!= 0; ++I
)
343 found
|= PackageContainerInterface::FromString(pci
, Cache
, *I
, helper
);
347 // FromModifierCommandLine - helper doing the work for PKG:GroupedFromCommandLine /*{{{*/
348 bool PackageContainerInterface::FromModifierCommandLine(unsigned short &modID
, PackageContainerInterface
* const pci
,
349 pkgCacheFile
&Cache
, const char * cmdline
,
350 std::list
<Modifier
> const &mods
, CacheSetHelper
&helper
) {
351 std::string str
= cmdline
;
352 unsigned short fallback
= modID
;
353 bool modifierPresent
= false;
354 for (std::list
<Modifier
>::const_iterator mod
= mods
.begin();
355 mod
!= mods
.end(); ++mod
) {
356 size_t const alength
= strlen(mod
->Alias
);
358 case Modifier::POSTFIX
:
359 if (str
.compare(str
.length() - alength
, alength
,
360 mod
->Alias
, 0, alength
) != 0)
362 str
.erase(str
.length() - alength
);
365 case Modifier::PREFIX
:
370 modifierPresent
= true;
373 if (modifierPresent
== true) {
374 bool const errors
= helper
.showErrors(false);
375 pkgCache::PkgIterator Pkg
= FromName(Cache
, cmdline
, helper
);
376 helper
.showErrors(errors
);
377 if (Pkg
.end() == false) {
383 return FromString(pci
, Cache
, str
, helper
);
386 // FromModifierCommandLine - helper doing the work for VER:GroupedFromCommandLine /*{{{*/
387 bool VersionContainerInterface::FromModifierCommandLine(unsigned short &modID
,
388 VersionContainerInterface
* const vci
,
389 pkgCacheFile
&Cache
, const char * cmdline
,
390 std::list
<Modifier
> const &mods
,
391 CacheSetHelper
&helper
) {
392 Version select
= NEWEST
;
393 std::string str
= cmdline
;
394 if (unlikely(str
.empty() == true))
396 bool modifierPresent
= false;
397 unsigned short fallback
= modID
;
398 for (std::list
<Modifier
>::const_iterator mod
= mods
.begin();
399 mod
!= mods
.end(); ++mod
) {
400 if (modID
== fallback
&& mod
->ID
== fallback
)
401 select
= mod
->SelectVersion
;
402 size_t const alength
= strlen(mod
->Alias
);
404 case Modifier::POSTFIX
:
405 if (str
.length() <= alength
||
406 str
.compare(str
.length() - alength
, alength
, mod
->Alias
, 0, alength
) != 0)
408 str
.erase(str
.length() - alength
);
410 select
= mod
->SelectVersion
;
412 case Modifier::PREFIX
:
417 modifierPresent
= true;
420 if (modifierPresent
== true) {
421 bool const errors
= helper
.showErrors(false);
422 bool const found
= VersionContainerInterface::FromString(vci
, Cache
, cmdline
, select
, helper
, true);
423 helper
.showErrors(errors
);
429 return FromString(vci
, Cache
, str
, select
, helper
);
432 // FromCommandLine - Return all versions specified on commandline /*{{{*/
433 bool VersionContainerInterface::FromCommandLine(VersionContainerInterface
* const vci
,
434 pkgCacheFile
&Cache
, const char **cmdline
,
435 Version
const &fallback
, CacheSetHelper
&helper
) {
437 for (const char **I
= cmdline
; *I
!= 0; ++I
)
438 found
|= VersionContainerInterface::FromString(vci
, Cache
, *I
, fallback
, helper
);
442 // FromString - Returns all versions spedcified by a string /*{{{*/
443 bool VersionContainerInterface::FromString(VersionContainerInterface
* const vci
,
444 pkgCacheFile
&Cache
, std::string pkg
,
445 Version
const &fallback
, CacheSetHelper
&helper
,
446 bool const onlyFromName
) {
448 bool verIsRel
= false;
449 size_t const vertag
= pkg
.find_last_of("/=");
450 if (vertag
!= std::string::npos
) {
451 ver
= pkg
.substr(vertag
+1);
452 verIsRel
= (pkg
[vertag
] == '/');
456 if (onlyFromName
== false)
457 PackageContainerInterface::FromString(&pkgset
, Cache
, pkg
, helper
);
459 pkgset
.insert(PackageContainerInterface::FromName(Cache
, pkg
, helper
));
463 if (pkgset
.getConstructor() != PackageSet::UNKNOWN
)
464 errors
= helper
.showErrors(false);
467 for (PackageSet::const_iterator P
= pkgset
.begin();
468 P
!= pkgset
.end(); ++P
) {
469 if (vertag
== std::string::npos
) {
470 found
|= VersionContainerInterface::FromPackage(vci
, Cache
, P
, fallback
, helper
);
473 pkgCache::VerIterator V
;
474 if (ver
== "installed")
475 V
= getInstalledVer(Cache
, P
, helper
);
476 else if (ver
== "candidate")
477 V
= getCandidateVer(Cache
, P
, helper
);
478 else if (ver
== "newest") {
479 if (P
->VersionList
!= 0)
482 V
= helper
.canNotFindNewestVer(Cache
, P
);
484 pkgVersionMatch
Match(ver
, (verIsRel
== true ? pkgVersionMatch::Release
:
485 pkgVersionMatch::Version
));
487 if (V
.end() == true) {
488 if (verIsRel
== true)
489 _error
->Error(_("Release '%s' for '%s' was not found"),
490 ver
.c_str(), P
.FullName(true).c_str());
492 _error
->Error(_("Version '%s' for '%s' was not found"),
493 ver
.c_str(), P
.FullName(true).c_str());
499 helper
.showSelectedVersion(P
, V
, ver
, verIsRel
);
503 if (pkgset
.getConstructor() != PackageSet::UNKNOWN
)
504 helper
.showErrors(errors
);
508 // FromPackage - versions from package based on fallback /*{{{*/
509 bool VersionContainerInterface::FromPackage(VersionContainerInterface
* const vci
,
511 pkgCache::PkgIterator
const &P
,
512 Version
const &fallback
,
513 CacheSetHelper
&helper
) {
514 pkgCache::VerIterator V
;
519 if (P
->VersionList
!= 0)
520 for (V
= P
.VersionList(); V
.end() != true; ++V
)
521 found
|= vci
->insert(V
);
523 helper
.canNotFindAllVer(vci
, Cache
, P
);
526 found
|= vci
->insert(getInstalledVer(Cache
, P
, helper
));
527 found
|= vci
->insert(getCandidateVer(Cache
, P
, helper
));
530 found
|= vci
->insert(getCandidateVer(Cache
, P
, helper
));
533 found
|= vci
->insert(getInstalledVer(Cache
, P
, helper
));
536 showErrors
= helper
.showErrors(false);
537 V
= getCandidateVer(Cache
, P
, helper
);
539 V
= getInstalledVer(Cache
, P
, helper
);
540 helper
.showErrors(showErrors
);
541 if (V
.end() == false)
542 found
|= vci
->insert(V
);
544 helper
.canNotFindInstCandVer(vci
, Cache
, P
);
547 showErrors
= helper
.showErrors(false);
548 V
= getInstalledVer(Cache
, P
, helper
);
550 V
= getCandidateVer(Cache
, P
, helper
);
551 helper
.showErrors(showErrors
);
552 if (V
.end() == false)
553 found
|= vci
->insert(V
);
555 helper
.canNotFindInstCandVer(vci
, Cache
, P
);
558 if (P
->VersionList
!= 0)
559 found
|= vci
->insert(P
.VersionList());
561 helper
.canNotFindNewestVer(Cache
, P
);
567 // getCandidateVer - Returns the candidate version of the given package /*{{{*/
568 pkgCache::VerIterator
VersionContainerInterface::getCandidateVer(pkgCacheFile
&Cache
,
569 pkgCache::PkgIterator
const &Pkg
, CacheSetHelper
&helper
) {
570 pkgCache::VerIterator Cand
;
571 if (Cache
.IsPolicyBuilt() == true || Cache
.IsDepCacheBuilt() == false) {
572 if (unlikely(Cache
.GetPolicy() == 0))
573 return pkgCache::VerIterator(Cache
);
574 Cand
= Cache
.GetPolicy()->GetCandidateVer(Pkg
);
576 Cand
= Cache
[Pkg
].CandidateVerIter(Cache
);
578 if (Cand
.end() == true)
579 return helper
.canNotFindCandidateVer(Cache
, Pkg
);
583 // getInstalledVer - Returns the installed version of the given package /*{{{*/
584 pkgCache::VerIterator
VersionContainerInterface::getInstalledVer(pkgCacheFile
&Cache
,
585 pkgCache::PkgIterator
const &Pkg
, CacheSetHelper
&helper
) {
586 if (Pkg
->CurrentVer
== 0)
587 return helper
.canNotFindInstalledVer(Cache
, Pkg
);
588 return Pkg
.CurrentVer();
592 // canNotFindPkgName - handle the case no package has this name /*{{{*/
593 pkgCache::PkgIterator
CacheSetHelper::canNotFindPkgName(pkgCacheFile
&Cache
,
594 std::string
const &str
) {
595 if (ShowError
== true)
596 _error
->Insert(ErrorType
, _("Unable to locate package %s"), str
.c_str());
597 return pkgCache::PkgIterator(Cache
, 0);
600 // canNotFindTask - handle the case no package is found for a task /*{{{*/
601 void CacheSetHelper::canNotFindTask(PackageContainerInterface
* const /*pci*/, pkgCacheFile
&/*Cache*/, std::string pattern
) {
602 if (ShowError
== true)
603 _error
->Insert(ErrorType
, _("Couldn't find task '%s'"), pattern
.c_str());
606 // canNotFindRegEx - handle the case no package is found by a regex /*{{{*/
607 void CacheSetHelper::canNotFindRegEx(PackageContainerInterface
* const /*pci*/, pkgCacheFile
&/*Cache*/, std::string pattern
) {
608 if (ShowError
== true)
609 _error
->Insert(ErrorType
, _("Couldn't find any package by regex '%s'"), pattern
.c_str());
611 #if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
612 // canNotFindFnmatch - handle the case no package is found by a fnmatch /*{{{*/
613 void CacheSetHelper::canNotFindFnmatch(PackageContainerInterface
* const pci
, pkgCacheFile
&Cache
, std::string pattern
) {
614 if (ShowError
== true)
615 _error
->Insert(ErrorType
, _("Couldn't find any package by glob '%s'"), pattern
.c_str());
618 // canNotFindPackage - handle the case no package is found from a string/*{{{*/
619 APT_CONST
void CacheSetHelper::canNotFindPackage(PackageContainerInterface
* const /*pci*/, pkgCacheFile
&/*Cache*/, std::string
const &/*str*/) {
622 // canNotFindAllVer /*{{{*/
623 void CacheSetHelper::canNotFindAllVer(VersionContainerInterface
* const /*vci*/, pkgCacheFile
&/*Cache*/,
624 pkgCache::PkgIterator
const &Pkg
) {
625 if (ShowError
== true)
626 _error
->Insert(ErrorType
, _("Can't select versions from package '%s' as it is purely virtual"), Pkg
.FullName(true).c_str());
629 // canNotFindInstCandVer /*{{{*/
630 void CacheSetHelper::canNotFindInstCandVer(VersionContainerInterface
* const /*vci*/, pkgCacheFile
&/*Cache*/,
631 pkgCache::PkgIterator
const &Pkg
) {
632 if (ShowError
== true)
633 _error
->Insert(ErrorType
, _("Can't select installed nor candidate version from package '%s' as it has neither of them"), Pkg
.FullName(true).c_str());
636 // canNotFindInstCandVer /*{{{*/
637 void CacheSetHelper::canNotFindCandInstVer(VersionContainerInterface
* const /*vci*/, pkgCacheFile
&/*Cache*/,
638 pkgCache::PkgIterator
const &Pkg
) {
639 if (ShowError
== true)
640 _error
->Insert(ErrorType
, _("Can't select installed nor candidate version from package '%s' as it has neither of them"), Pkg
.FullName(true).c_str());
643 // canNotFindNewestVer /*{{{*/
644 pkgCache::VerIterator
CacheSetHelper::canNotFindNewestVer(pkgCacheFile
&Cache
,
645 pkgCache::PkgIterator
const &Pkg
) {
646 if (ShowError
== true)
647 _error
->Insert(ErrorType
, _("Can't select newest version from package '%s' as it is purely virtual"), Pkg
.FullName(true).c_str());
648 return pkgCache::VerIterator(Cache
, 0);
651 // canNotFindCandidateVer /*{{{*/
652 pkgCache::VerIterator
CacheSetHelper::canNotFindCandidateVer(pkgCacheFile
&Cache
,
653 pkgCache::PkgIterator
const &Pkg
) {
654 if (ShowError
== true)
655 _error
->Insert(ErrorType
, _("Can't select candidate version from package %s as it has no candidate"), Pkg
.FullName(true).c_str());
656 return pkgCache::VerIterator(Cache
, 0);
659 // canNotFindInstalledVer /*{{{*/
660 pkgCache::VerIterator
CacheSetHelper::canNotFindInstalledVer(pkgCacheFile
&Cache
,
661 pkgCache::PkgIterator
const &Pkg
) {
662 if (ShowError
== true)
663 _error
->Insert(ErrorType
, _("Can't select installed version from package %s as it is not installed"), Pkg
.FullName(true).c_str());
664 return pkgCache::VerIterator(Cache
, 0);
667 // showTaskSelection /*{{{*/
668 APT_CONST
void CacheSetHelper::showTaskSelection(pkgCache::PkgIterator
const &/*pkg*/,
669 std::string
const &/*pattern*/) {
672 // showRegExSelection /*{{{*/
673 APT_CONST
void CacheSetHelper::showRegExSelection(pkgCache::PkgIterator
const &/*pkg*/,
674 std::string
const &/*pattern*/) {
677 #if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
678 // showFnmatchSelection /*{{{*/
679 APT_CONST
void CacheSetHelper::showFnmatchSelection(pkgCache::PkgIterator
const &pkg
,
680 std::string
const &pattern
) {
684 // showSelectedVersion /*{{{*/
685 APT_CONST
void CacheSetHelper::showSelectedVersion(pkgCache::PkgIterator
const &/*Pkg*/,
686 pkgCache::VerIterator
const /*Ver*/,
687 std::string
const &/*ver*/,
688 bool const /*verIsRel*/) {