You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

593 lines
19 KiB

  1. // -*- mode: cpp; mode: fold -*-
  2. // Description /*{{{*/
  3. /* ######################################################################
  4. Simple wrapper around a std::set to provide a similar interface to
  5. a set of cache structures as to the complete set of all structures
  6. in the pkgCache. Currently only Package is supported.
  7. ##################################################################### */
  8. /*}}}*/
  9. // Include Files /*{{{*/
  10. #include <config.h>
  11. #include <apt-pkg/aptconfiguration.h>
  12. #include <apt-pkg/cachefile.h>
  13. #include <apt-pkg/cachefilter.h>
  14. #include <apt-pkg/cacheset.h>
  15. #include <apt-pkg/error.h>
  16. #include <apt-pkg/strutl.h>
  17. #include <apt-pkg/versionmatch.h>
  18. #include <apt-pkg/pkgrecords.h>
  19. #include <apt-pkg/policy.h>
  20. #include <vector>
  21. #include <regex.h>
  22. #include <apti18n.h>
  23. /*}}}*/
  24. namespace APT {
  25. // FromTask - Return all packages in the cache from a specific task /*{{{*/
  26. bool PackageContainerInterface::FromTask(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern, CacheSetHelper &helper) {
  27. size_t const archfound = pattern.find_last_of(':');
  28. std::string arch = "native";
  29. if (archfound != std::string::npos) {
  30. arch = pattern.substr(archfound+1);
  31. pattern.erase(archfound);
  32. }
  33. if (pattern[pattern.length() -1] != '^')
  34. return false;
  35. pattern.erase(pattern.length()-1);
  36. if (unlikely(Cache.GetPkgCache() == 0 || Cache.GetDepCache() == 0))
  37. return false;
  38. bool const wasEmpty = pci->empty();
  39. if (wasEmpty == true)
  40. pci->setConstructor(TASK);
  41. // get the records
  42. pkgRecords Recs(Cache);
  43. // build regexp for the task
  44. regex_t Pattern;
  45. char S[300];
  46. snprintf(S, sizeof(S), "^Task:.*[, ]%s([, ]|$)", pattern.c_str());
  47. if(regcomp(&Pattern,S, REG_EXTENDED | REG_NOSUB | REG_NEWLINE) != 0) {
  48. _error->Error("Failed to compile task regexp");
  49. return false;
  50. }
  51. bool found = false;
  52. for (pkgCache::GrpIterator Grp = Cache->GrpBegin(); Grp.end() == false; ++Grp) {
  53. pkgCache::PkgIterator Pkg = Grp.FindPkg(arch);
  54. if (Pkg.end() == true)
  55. continue;
  56. pkgCache::VerIterator ver = Cache[Pkg].CandidateVerIter(Cache);
  57. if(ver.end() == true)
  58. continue;
  59. pkgRecords::Parser &parser = Recs.Lookup(ver.FileList());
  60. const char *start, *end;
  61. parser.GetRec(start,end);
  62. unsigned int const length = end - start;
  63. char buf[length];
  64. strncpy(buf, start, length);
  65. buf[length-1] = '\0';
  66. if (regexec(&Pattern, buf, 0, 0, 0) != 0)
  67. continue;
  68. pci->insert(Pkg);
  69. helper.showTaskSelection(Pkg, pattern);
  70. found = true;
  71. }
  72. regfree(&Pattern);
  73. if (found == false) {
  74. helper.canNotFindTask(pci, Cache, pattern);
  75. pci->setConstructor(UNKNOWN);
  76. return false;
  77. }
  78. if (wasEmpty == false && pci->getConstructor() != UNKNOWN)
  79. pci->setConstructor(UNKNOWN);
  80. return true;
  81. }
  82. /*}}}*/
  83. // FromRegEx - Return all packages in the cache matching a pattern /*{{{*/
  84. bool PackageContainerInterface::FromRegEx(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern, CacheSetHelper &helper) {
  85. static const char * const isregex = ".?+*|[^$";
  86. if (pattern.find_first_of(isregex) == std::string::npos)
  87. return false;
  88. bool const wasEmpty = pci->empty();
  89. if (wasEmpty == true)
  90. pci->setConstructor(REGEX);
  91. size_t archfound = pattern.find_last_of(':');
  92. std::string arch = "native";
  93. if (archfound != std::string::npos) {
  94. arch = pattern.substr(archfound+1);
  95. if (arch.find_first_of(isregex) == std::string::npos)
  96. pattern.erase(archfound);
  97. else
  98. arch = "native";
  99. }
  100. if (unlikely(Cache.GetPkgCache() == 0))
  101. return false;
  102. APT::CacheFilter::PackageNameMatchesRegEx regexfilter(pattern);
  103. bool found = false;
  104. for (pkgCache::GrpIterator Grp = Cache.GetPkgCache()->GrpBegin(); Grp.end() == false; ++Grp) {
  105. if (regexfilter(Grp) == false)
  106. continue;
  107. pkgCache::PkgIterator Pkg = Grp.FindPkg(arch);
  108. if (Pkg.end() == true) {
  109. if (archfound == std::string::npos) {
  110. std::vector<std::string> archs = APT::Configuration::getArchitectures();
  111. for (std::vector<std::string>::const_iterator a = archs.begin();
  112. a != archs.end() && Pkg.end() != true; ++a)
  113. Pkg = Grp.FindPkg(*a);
  114. }
  115. if (Pkg.end() == true)
  116. continue;
  117. }
  118. pci->insert(Pkg);
  119. helper.showRegExSelection(Pkg, pattern);
  120. found = true;
  121. }
  122. if (found == false) {
  123. helper.canNotFindRegEx(pci, Cache, pattern);
  124. pci->setConstructor(UNKNOWN);
  125. return false;
  126. }
  127. if (wasEmpty == false && pci->getConstructor() != UNKNOWN)
  128. pci->setConstructor(UNKNOWN);
  129. return true;
  130. }
  131. /*}}}*/
  132. // FromName - Returns the package defined by this string /*{{{*/
  133. pkgCache::PkgIterator PackageContainerInterface::FromName(pkgCacheFile &Cache,
  134. std::string const &str, CacheSetHelper &helper) {
  135. std::string pkg = str;
  136. size_t archfound = pkg.find_last_of(':');
  137. std::string arch;
  138. if (archfound != std::string::npos) {
  139. arch = pkg.substr(archfound+1);
  140. pkg.erase(archfound);
  141. }
  142. if (Cache.GetPkgCache() == 0)
  143. return pkgCache::PkgIterator(Cache, 0);
  144. pkgCache::PkgIterator Pkg(Cache, 0);
  145. if (arch.empty() == true) {
  146. pkgCache::GrpIterator Grp = Cache.GetPkgCache()->FindGrp(pkg);
  147. if (Grp.end() == false)
  148. Pkg = Grp.FindPreferredPkg();
  149. } else
  150. Pkg = Cache.GetPkgCache()->FindPkg(pkg, arch);
  151. if (Pkg.end() == true)
  152. return helper.canNotFindPkgName(Cache, str);
  153. return Pkg;
  154. }
  155. /*}}}*/
  156. // FromGroup - Returns the package defined by this string /*{{{*/
  157. bool PackageContainerInterface::FromGroup(PackageContainerInterface * const pci, pkgCacheFile &Cache,
  158. std::string pkg, CacheSetHelper &helper) {
  159. if (unlikely(Cache.GetPkgCache() == 0))
  160. return false;
  161. size_t const archfound = pkg.find_last_of(':');
  162. std::string arch;
  163. if (archfound != std::string::npos) {
  164. arch = pkg.substr(archfound+1);
  165. pkg.erase(archfound);
  166. if (arch == "all" || arch == "native")
  167. arch = _config->Find("APT::Architecture");
  168. }
  169. pkgCache::GrpIterator Grp = Cache.GetPkgCache()->FindGrp(pkg);
  170. if (Grp.end() == false) {
  171. if (arch.empty() == true) {
  172. pkgCache::PkgIterator Pkg = Grp.FindPreferredPkg();
  173. if (Pkg.end() == false)
  174. {
  175. pci->insert(Pkg);
  176. return true;
  177. }
  178. } else {
  179. bool found = false;
  180. // for 'linux-any' return the first package matching, for 'linux-*' return all matches
  181. bool const isGlobal = arch.find('*') != std::string::npos;
  182. APT::CacheFilter::PackageArchitectureMatchesSpecification pams(arch);
  183. for (pkgCache::PkgIterator Pkg = Grp.PackageList(); Pkg.end() == false; Pkg = Grp.NextPkg(Pkg)) {
  184. if (pams(Pkg) == false)
  185. continue;
  186. pci->insert(Pkg);
  187. found = true;
  188. if (isGlobal == false)
  189. break;
  190. }
  191. if (found == true)
  192. return true;
  193. }
  194. }
  195. pkgCache::PkgIterator Pkg = helper.canNotFindPkgName(Cache, pkg);
  196. if (Pkg.end() == true)
  197. return false;
  198. pci->insert(Pkg);
  199. return true;
  200. }
  201. /*}}}*/
  202. // FromString - Return all packages matching a specific string /*{{{*/
  203. bool PackageContainerInterface::FromString(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string const &str, CacheSetHelper &helper) {
  204. bool found = true;
  205. _error->PushToStack();
  206. if (FromGroup(pci, Cache, str, helper) == false &&
  207. FromTask(pci, Cache, str, helper) == false &&
  208. FromRegEx(pci, Cache, str, helper) == false)
  209. {
  210. helper.canNotFindPackage(pci, Cache, str);
  211. found = false;
  212. }
  213. if (found == true)
  214. _error->RevertToStack();
  215. else
  216. _error->MergeWithStack();
  217. return found;
  218. }
  219. /*}}}*/
  220. // FromCommandLine - Return all packages specified on commandline /*{{{*/
  221. bool PackageContainerInterface::FromCommandLine(PackageContainerInterface * const pci, pkgCacheFile &Cache, const char **cmdline, CacheSetHelper &helper) {
  222. bool found = false;
  223. for (const char **I = cmdline; *I != 0; ++I)
  224. found |= PackageContainerInterface::FromString(pci, Cache, *I, helper);
  225. return found;
  226. }
  227. /*}}}*/
  228. // FromModifierCommandLine - helper doing the work for PKG:GroupedFromCommandLine /*{{{*/
  229. bool PackageContainerInterface::FromModifierCommandLine(unsigned short &modID, PackageContainerInterface * const pci,
  230. pkgCacheFile &Cache, const char * cmdline,
  231. std::list<Modifier> const &mods, CacheSetHelper &helper) {
  232. std::string str = cmdline;
  233. unsigned short fallback = modID;
  234. bool modifierPresent = false;
  235. for (std::list<Modifier>::const_iterator mod = mods.begin();
  236. mod != mods.end(); ++mod) {
  237. size_t const alength = strlen(mod->Alias);
  238. switch(mod->Pos) {
  239. case Modifier::POSTFIX:
  240. if (str.compare(str.length() - alength, alength,
  241. mod->Alias, 0, alength) != 0)
  242. continue;
  243. str.erase(str.length() - alength);
  244. modID = mod->ID;
  245. break;
  246. case Modifier::PREFIX:
  247. continue;
  248. case Modifier::NONE:
  249. continue;
  250. }
  251. modifierPresent = true;
  252. break;
  253. }
  254. if (modifierPresent == true) {
  255. bool const errors = helper.showErrors(false);
  256. pkgCache::PkgIterator Pkg = FromName(Cache, cmdline, helper);
  257. helper.showErrors(errors);
  258. if (Pkg.end() == false) {
  259. pci->insert(Pkg);
  260. modID = fallback;
  261. return true;
  262. }
  263. }
  264. return FromString(pci, Cache, str, helper);
  265. }
  266. /*}}}*/
  267. // FromModifierCommandLine - helper doing the work for VER:GroupedFromCommandLine /*{{{*/
  268. bool VersionContainerInterface::FromModifierCommandLine(unsigned short &modID,
  269. VersionContainerInterface * const vci,
  270. pkgCacheFile &Cache, const char * cmdline,
  271. std::list<Modifier> const &mods,
  272. CacheSetHelper &helper) {
  273. Version select = NEWEST;
  274. std::string str = cmdline;
  275. bool modifierPresent = false;
  276. unsigned short fallback = modID;
  277. for (std::list<Modifier>::const_iterator mod = mods.begin();
  278. mod != mods.end(); ++mod) {
  279. if (modID == fallback && mod->ID == fallback)
  280. select = mod->SelectVersion;
  281. size_t const alength = strlen(mod->Alias);
  282. switch(mod->Pos) {
  283. case Modifier::POSTFIX:
  284. if (str.compare(str.length() - alength, alength,
  285. mod->Alias, 0, alength) != 0)
  286. continue;
  287. str.erase(str.length() - alength);
  288. modID = mod->ID;
  289. select = mod->SelectVersion;
  290. break;
  291. case Modifier::PREFIX:
  292. continue;
  293. case Modifier::NONE:
  294. continue;
  295. }
  296. modifierPresent = true;
  297. break;
  298. }
  299. if (modifierPresent == true) {
  300. bool const errors = helper.showErrors(false);
  301. bool const found = VersionContainerInterface::FromString(vci, Cache, cmdline, select, helper, true);
  302. helper.showErrors(errors);
  303. if (found == true) {
  304. modID = fallback;
  305. return true;
  306. }
  307. }
  308. return FromString(vci, Cache, str, select, helper);
  309. }
  310. /*}}}*/
  311. // FromCommandLine - Return all versions specified on commandline /*{{{*/
  312. bool VersionContainerInterface::FromCommandLine(VersionContainerInterface * const vci,
  313. pkgCacheFile &Cache, const char **cmdline,
  314. Version const &fallback, CacheSetHelper &helper) {
  315. bool found = false;
  316. for (const char **I = cmdline; *I != 0; ++I)
  317. found |= VersionContainerInterface::FromString(vci, Cache, *I, fallback, helper);
  318. return found;
  319. }
  320. /*}}}*/
  321. // FromString - Returns all versions spedcified by a string /*{{{*/
  322. bool VersionContainerInterface::FromString(VersionContainerInterface * const vci,
  323. pkgCacheFile &Cache, std::string pkg,
  324. Version const &fallback, CacheSetHelper &helper,
  325. bool const onlyFromName) {
  326. std::string ver;
  327. bool verIsRel = false;
  328. size_t const vertag = pkg.find_last_of("/=");
  329. if (vertag != std::string::npos) {
  330. ver = pkg.substr(vertag+1);
  331. verIsRel = (pkg[vertag] == '/');
  332. pkg.erase(vertag);
  333. }
  334. PackageSet pkgset;
  335. if (onlyFromName == false)
  336. PackageContainerInterface::FromString(&pkgset, Cache, pkg, helper);
  337. else {
  338. pkgset.insert(PackageContainerInterface::FromName(Cache, pkg, helper));
  339. }
  340. bool errors = true;
  341. if (pkgset.getConstructor() != PackageSet::UNKNOWN)
  342. errors = helper.showErrors(false);
  343. bool found = false;
  344. for (PackageSet::const_iterator P = pkgset.begin();
  345. P != pkgset.end(); ++P) {
  346. if (vertag == std::string::npos) {
  347. found |= VersionContainerInterface::FromPackage(vci, Cache, P, fallback, helper);
  348. continue;
  349. }
  350. pkgCache::VerIterator V;
  351. if (ver == "installed")
  352. V = getInstalledVer(Cache, P, helper);
  353. else if (ver == "candidate")
  354. V = getCandidateVer(Cache, P, helper);
  355. else if (ver == "newest") {
  356. if (P->VersionList != 0)
  357. V = P.VersionList();
  358. else
  359. V = helper.canNotFindNewestVer(Cache, P);
  360. } else {
  361. pkgVersionMatch Match(ver, (verIsRel == true ? pkgVersionMatch::Release :
  362. pkgVersionMatch::Version));
  363. V = Match.Find(P);
  364. if (V.end() == true) {
  365. if (verIsRel == true)
  366. _error->Error(_("Release '%s' for '%s' was not found"),
  367. ver.c_str(), P.FullName(true).c_str());
  368. else
  369. _error->Error(_("Version '%s' for '%s' was not found"),
  370. ver.c_str(), P.FullName(true).c_str());
  371. continue;
  372. }
  373. }
  374. if (V.end() == true)
  375. continue;
  376. helper.showSelectedVersion(P, V, ver, verIsRel);
  377. vci->insert(V);
  378. found = true;
  379. }
  380. if (pkgset.getConstructor() != PackageSet::UNKNOWN)
  381. helper.showErrors(errors);
  382. return found;
  383. }
  384. /*}}}*/
  385. // FromPackage - versions from package based on fallback /*{{{*/
  386. bool VersionContainerInterface::FromPackage(VersionContainerInterface * const vci,
  387. pkgCacheFile &Cache,
  388. pkgCache::PkgIterator const &P,
  389. Version const &fallback,
  390. CacheSetHelper &helper) {
  391. pkgCache::VerIterator V;
  392. bool showErrors;
  393. bool found = false;
  394. switch(fallback) {
  395. case ALL:
  396. if (P->VersionList != 0)
  397. for (V = P.VersionList(); V.end() != true; ++V)
  398. found |= vci->insert(V);
  399. else
  400. helper.canNotFindAllVer(vci, Cache, P);
  401. break;
  402. case CANDANDINST:
  403. found |= vci->insert(getInstalledVer(Cache, P, helper));
  404. found |= vci->insert(getCandidateVer(Cache, P, helper));
  405. break;
  406. case CANDIDATE:
  407. found |= vci->insert(getCandidateVer(Cache, P, helper));
  408. break;
  409. case INSTALLED:
  410. found |= vci->insert(getInstalledVer(Cache, P, helper));
  411. break;
  412. case CANDINST:
  413. showErrors = helper.showErrors(false);
  414. V = getCandidateVer(Cache, P, helper);
  415. if (V.end() == true)
  416. V = getInstalledVer(Cache, P, helper);
  417. helper.showErrors(showErrors);
  418. if (V.end() == false)
  419. found |= vci->insert(V);
  420. else
  421. helper.canNotFindInstCandVer(vci, Cache, P);
  422. break;
  423. case INSTCAND:
  424. showErrors = helper.showErrors(false);
  425. V = getInstalledVer(Cache, P, helper);
  426. if (V.end() == true)
  427. V = getCandidateVer(Cache, P, helper);
  428. helper.showErrors(showErrors);
  429. if (V.end() == false)
  430. found |= vci->insert(V);
  431. else
  432. helper.canNotFindInstCandVer(vci, Cache, P);
  433. break;
  434. case NEWEST:
  435. if (P->VersionList != 0)
  436. found |= vci->insert(P.VersionList());
  437. else
  438. helper.canNotFindNewestVer(Cache, P);
  439. break;
  440. }
  441. return found;
  442. }
  443. /*}}}*/
  444. // getCandidateVer - Returns the candidate version of the given package /*{{{*/
  445. pkgCache::VerIterator VersionContainerInterface::getCandidateVer(pkgCacheFile &Cache,
  446. pkgCache::PkgIterator const &Pkg, CacheSetHelper &helper) {
  447. pkgCache::VerIterator Cand;
  448. if (Cache.IsPolicyBuilt() == true || Cache.IsDepCacheBuilt() == false) {
  449. if (unlikely(Cache.GetPolicy() == 0))
  450. return pkgCache::VerIterator(Cache);
  451. Cand = Cache.GetPolicy()->GetCandidateVer(Pkg);
  452. } else {
  453. Cand = Cache[Pkg].CandidateVerIter(Cache);
  454. }
  455. if (Cand.end() == true)
  456. return helper.canNotFindCandidateVer(Cache, Pkg);
  457. return Cand;
  458. }
  459. /*}}}*/
  460. // getInstalledVer - Returns the installed version of the given package /*{{{*/
  461. pkgCache::VerIterator VersionContainerInterface::getInstalledVer(pkgCacheFile &Cache,
  462. pkgCache::PkgIterator const &Pkg, CacheSetHelper &helper) {
  463. if (Pkg->CurrentVer == 0)
  464. return helper.canNotFindInstalledVer(Cache, Pkg);
  465. return Pkg.CurrentVer();
  466. }
  467. /*}}}*/
  468. // canNotFindPkgName - handle the case no package has this name /*{{{*/
  469. pkgCache::PkgIterator CacheSetHelper::canNotFindPkgName(pkgCacheFile &Cache,
  470. std::string const &str) {
  471. if (ShowError == true)
  472. _error->Insert(ErrorType, _("Unable to locate package %s"), str.c_str());
  473. return pkgCache::PkgIterator(Cache, 0);
  474. }
  475. /*}}}*/
  476. // canNotFindTask - handle the case no package is found for a task /*{{{*/
  477. void CacheSetHelper::canNotFindTask(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern) {
  478. if (ShowError == true)
  479. _error->Insert(ErrorType, _("Couldn't find task '%s'"), pattern.c_str());
  480. }
  481. /*}}}*/
  482. // canNotFindRegEx - handle the case no package is found by a regex /*{{{*/
  483. void CacheSetHelper::canNotFindRegEx(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern) {
  484. if (ShowError == true)
  485. _error->Insert(ErrorType, _("Couldn't find any package by regex '%s'"), pattern.c_str());
  486. }
  487. /*}}}*/
  488. // canNotFindPackage - handle the case no package is found from a string/*{{{*/
  489. void CacheSetHelper::canNotFindPackage(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string const &str) {
  490. }
  491. /*}}}*/
  492. // canNotFindAllVer /*{{{*/
  493. void CacheSetHelper::canNotFindAllVer(VersionContainerInterface * const vci, pkgCacheFile &Cache,
  494. pkgCache::PkgIterator const &Pkg) {
  495. if (ShowError == true)
  496. _error->Insert(ErrorType, _("Can't select versions from package '%s' as it is purely virtual"), Pkg.FullName(true).c_str());
  497. }
  498. /*}}}*/
  499. // canNotFindInstCandVer /*{{{*/
  500. void CacheSetHelper::canNotFindInstCandVer(VersionContainerInterface * const vci, pkgCacheFile &Cache,
  501. pkgCache::PkgIterator const &Pkg) {
  502. if (ShowError == true)
  503. _error->Insert(ErrorType, _("Can't select installed nor candidate version from package '%s' as it has neither of them"), Pkg.FullName(true).c_str());
  504. }
  505. /*}}}*/
  506. // canNotFindInstCandVer /*{{{*/
  507. void CacheSetHelper::canNotFindCandInstVer(VersionContainerInterface * const vci, pkgCacheFile &Cache,
  508. pkgCache::PkgIterator const &Pkg) {
  509. if (ShowError == true)
  510. _error->Insert(ErrorType, _("Can't select installed nor candidate version from package '%s' as it has neither of them"), Pkg.FullName(true).c_str());
  511. }
  512. /*}}}*/
  513. // canNotFindNewestVer /*{{{*/
  514. pkgCache::VerIterator CacheSetHelper::canNotFindNewestVer(pkgCacheFile &Cache,
  515. pkgCache::PkgIterator const &Pkg) {
  516. if (ShowError == true)
  517. _error->Insert(ErrorType, _("Can't select newest version from package '%s' as it is purely virtual"), Pkg.FullName(true).c_str());
  518. return pkgCache::VerIterator(Cache, 0);
  519. }
  520. /*}}}*/
  521. // canNotFindCandidateVer /*{{{*/
  522. pkgCache::VerIterator CacheSetHelper::canNotFindCandidateVer(pkgCacheFile &Cache,
  523. pkgCache::PkgIterator const &Pkg) {
  524. if (ShowError == true)
  525. _error->Insert(ErrorType, _("Can't select candidate version from package %s as it has no candidate"), Pkg.FullName(true).c_str());
  526. return pkgCache::VerIterator(Cache, 0);
  527. }
  528. /*}}}*/
  529. // canNotFindInstalledVer /*{{{*/
  530. pkgCache::VerIterator CacheSetHelper::canNotFindInstalledVer(pkgCacheFile &Cache,
  531. pkgCache::PkgIterator const &Pkg) {
  532. if (ShowError == true)
  533. _error->Insert(ErrorType, _("Can't select installed version from package %s as it is not installed"), Pkg.FullName(true).c_str());
  534. return pkgCache::VerIterator(Cache, 0);
  535. }
  536. /*}}}*/
  537. // showTaskSelection /*{{{*/
  538. void CacheSetHelper::showTaskSelection(pkgCache::PkgIterator const &pkg,
  539. std::string const &pattern) {
  540. }
  541. /*}}}*/
  542. // showRegExSelection /*{{{*/
  543. void CacheSetHelper::showRegExSelection(pkgCache::PkgIterator const &pkg,
  544. std::string const &pattern) {
  545. }
  546. /*}}}*/
  547. // showSelectedVersion /*{{{*/
  548. void CacheSetHelper::showSelectedVersion(pkgCache::PkgIterator const &Pkg,
  549. pkgCache::VerIterator const Ver,
  550. std::string const &ver,
  551. bool const verIsRel) {
  552. }
  553. /*}}}*/
  554. }