packagemanager.cc 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639
  1. // -*- mode: cpp; mode: fold -*-
  2. // Description /*{{{*/
  3. // $Id: packagemanager.cc,v 1.30 2003/04/27 03:04:15 doogie Exp $
  4. /* ######################################################################
  5. Package Manager - Abstacts the package manager
  6. More work is needed in the area of transitioning provides, ie exim
  7. replacing smail. This can cause interesing side effects.
  8. Other cases involving conflicts+replaces should be tested.
  9. ##################################################################### */
  10. /*}}}*/
  11. // Include Files /*{{{*/
  12. #include <apt-pkg/packagemanager.h>
  13. #include <apt-pkg/orderlist.h>
  14. #include <apt-pkg/depcache.h>
  15. #include <apt-pkg/error.h>
  16. #include <apt-pkg/version.h>
  17. #include <apt-pkg/acquire-item.h>
  18. #include <apt-pkg/algorithms.h>
  19. #include <apt-pkg/configuration.h>
  20. #include <apt-pkg/sptr.h>
  21. #include <apti18n.h>
  22. #include <iostream>
  23. /*}}}*/
  24. using namespace std;
  25. // PM::PackageManager - Constructor /*{{{*/
  26. // ---------------------------------------------------------------------
  27. /* */
  28. pkgPackageManager::pkgPackageManager(pkgDepCache *pCache) : Cache(*pCache)
  29. {
  30. FileNames = new string[Cache.Head().PackageCount];
  31. List = 0;
  32. Debug = _config->FindB("Debug::pkgPackageManager",false);
  33. }
  34. /*}}}*/
  35. // PM::PackageManager - Destructor /*{{{*/
  36. // ---------------------------------------------------------------------
  37. /* */
  38. pkgPackageManager::~pkgPackageManager()
  39. {
  40. delete List;
  41. delete [] FileNames;
  42. }
  43. /*}}}*/
  44. // PM::GetArchives - Queue the archives for download /*{{{*/
  45. // ---------------------------------------------------------------------
  46. /* */
  47. bool pkgPackageManager::GetArchives(pkgAcquire *Owner,pkgSourceList *Sources,
  48. pkgRecords *Recs)
  49. {
  50. if (CreateOrderList() == false)
  51. return false;
  52. if (List->OrderUnpack() == false)
  53. return _error->Error("Internal ordering error");
  54. for (pkgOrderList::iterator I = List->begin(); I != List->end(); I++)
  55. {
  56. PkgIterator Pkg(Cache,*I);
  57. FileNames[Pkg->ID] = string();
  58. // Skip packages to erase
  59. if (Cache[Pkg].Delete() == true)
  60. continue;
  61. // Skip Packages that need configure only.
  62. if (Pkg.State() == pkgCache::PkgIterator::NeedsConfigure &&
  63. Cache[Pkg].Keep() == true)
  64. continue;
  65. // Skip already processed packages
  66. if (List->IsNow(Pkg) == false)
  67. continue;
  68. new pkgAcqArchive(Owner,Sources,Recs,Cache[Pkg].InstVerIter(Cache),
  69. FileNames[Pkg->ID]);
  70. }
  71. return true;
  72. }
  73. /*}}}*/
  74. // PM::FixMissing - Keep all missing packages /*{{{*/
  75. // ---------------------------------------------------------------------
  76. /* This is called to correct the installation when packages could not
  77. be downloaded. */
  78. bool pkgPackageManager::FixMissing()
  79. {
  80. pkgDepCache::ActionGroup group(Cache);
  81. pkgProblemResolver Resolve(&Cache);
  82. List->SetFileList(FileNames);
  83. bool Bad = false;
  84. for (PkgIterator I = Cache.PkgBegin(); I.end() == false; I++)
  85. {
  86. if (List->IsMissing(I) == false)
  87. continue;
  88. // Okay, this file is missing and we need it. Mark it for keep
  89. Bad = true;
  90. Cache.MarkKeep(I, false, false);
  91. }
  92. // We have to empty the list otherwise it will not have the new changes
  93. delete List;
  94. List = 0;
  95. if (Bad == false)
  96. return true;
  97. // Now downgrade everything that is broken
  98. return Resolve.ResolveByKeep() == true && Cache.BrokenCount() == 0;
  99. }
  100. /*}}}*/
  101. // PM::CreateOrderList - Create the ordering class /*{{{*/
  102. // ---------------------------------------------------------------------
  103. /* This populates the ordering list with all the packages that are
  104. going to change. */
  105. bool pkgPackageManager::CreateOrderList()
  106. {
  107. if (List != 0)
  108. return true;
  109. delete List;
  110. List = new pkgOrderList(&Cache);
  111. bool NoImmConfigure = !_config->FindB("APT::Immediate-Configure",true);
  112. // Generate the list of affected packages and sort it
  113. for (PkgIterator I = Cache.PkgBegin(); I.end() == false; I++)
  114. {
  115. // Ignore no-version packages
  116. if (I->VersionList == 0)
  117. continue;
  118. // Mark the package and its dependends for immediate configuration
  119. if (((I->Flags & pkgCache::Flag::Essential) == pkgCache::Flag::Essential ||
  120. (I->Flags & pkgCache::Flag::Important) == pkgCache::Flag::Important) &&
  121. NoImmConfigure == false)
  122. {
  123. List->Flag(I,pkgOrderList::Immediate);
  124. // Look for other packages to make immediate configurea
  125. if (Cache[I].InstallVer != 0)
  126. for (DepIterator D = Cache[I].InstVerIter(Cache).DependsList();
  127. D.end() == false; D++)
  128. if (D->Type == pkgCache::Dep::Depends || D->Type == pkgCache::Dep::PreDepends)
  129. List->Flag(D.TargetPkg(),pkgOrderList::Immediate);
  130. // And again with the current version.
  131. if (I->CurrentVer != 0)
  132. for (DepIterator D = I.CurrentVer().DependsList();
  133. D.end() == false; D++)
  134. if (D->Type == pkgCache::Dep::Depends || D->Type == pkgCache::Dep::PreDepends)
  135. List->Flag(D.TargetPkg(),pkgOrderList::Immediate);
  136. }
  137. // Not interesting
  138. if ((Cache[I].Keep() == true ||
  139. Cache[I].InstVerIter(Cache) == I.CurrentVer()) &&
  140. I.State() == pkgCache::PkgIterator::NeedsNothing &&
  141. (Cache[I].iFlags & pkgDepCache::ReInstall) != pkgDepCache::ReInstall &&
  142. (I.Purge() != false || Cache[I].Mode != pkgDepCache::ModeDelete ||
  143. (Cache[I].iFlags & pkgDepCache::Purge) != pkgDepCache::Purge))
  144. continue;
  145. // Append it to the list
  146. List->push_back(I);
  147. }
  148. return true;
  149. }
  150. /*}}}*/
  151. // PM::DepAlwaysTrue - Returns true if this dep is irrelevent /*{{{*/
  152. // ---------------------------------------------------------------------
  153. /* The restriction on provides is to eliminate the case when provides
  154. are transitioning between valid states [ie exim to smail] */
  155. bool pkgPackageManager::DepAlwaysTrue(DepIterator D)
  156. {
  157. if (D.TargetPkg()->ProvidesList != 0)
  158. return false;
  159. if ((Cache[D] & pkgDepCache::DepInstall) != 0 &&
  160. (Cache[D] & pkgDepCache::DepNow) != 0)
  161. return true;
  162. return false;
  163. }
  164. /*}}}*/
  165. // PM::CheckRConflicts - Look for reverse conflicts /*{{{*/
  166. // ---------------------------------------------------------------------
  167. /* This looks over the reverses for a conflicts line that needs early
  168. removal. */
  169. bool pkgPackageManager::CheckRConflicts(PkgIterator Pkg,DepIterator D,
  170. const char *Ver)
  171. {
  172. for (;D.end() == false; D++)
  173. {
  174. if (D->Type != pkgCache::Dep::Conflicts &&
  175. D->Type != pkgCache::Dep::Obsoletes)
  176. continue;
  177. // The package hasnt been changed
  178. if (List->IsNow(Pkg) == false)
  179. continue;
  180. // Ignore self conflicts, ignore conflicts from irrelevent versions
  181. if (D.ParentPkg() == Pkg || D.ParentVer() != D.ParentPkg().CurrentVer())
  182. continue;
  183. if (Cache.VS().CheckDep(Ver,D->CompareOp,D.TargetVer()) == false)
  184. continue;
  185. if (EarlyRemove(D.ParentPkg()) == false)
  186. return _error->Error("Reverse conflicts early remove for package '%s' failed",
  187. Pkg.Name());
  188. }
  189. return true;
  190. }
  191. /*}}}*/
  192. // PM::ConfigureAll - Run the all out configuration /*{{{*/
  193. // ---------------------------------------------------------------------
  194. /* This configures every package. It is assumed they are all unpacked and
  195. that the final configuration is valid. */
  196. bool pkgPackageManager::ConfigureAll()
  197. {
  198. pkgOrderList OList(&Cache);
  199. // Populate the order list
  200. for (pkgOrderList::iterator I = List->begin(); I != List->end(); I++)
  201. if (List->IsFlag(pkgCache::PkgIterator(Cache,*I),
  202. pkgOrderList::UnPacked) == true)
  203. OList.push_back(*I);
  204. if (OList.OrderConfigure() == false)
  205. return false;
  206. // Perform the configuring
  207. for (pkgOrderList::iterator I = OList.begin(); I != OList.end(); I++)
  208. {
  209. PkgIterator Pkg(Cache,*I);
  210. if (Configure(Pkg) == false)
  211. return false;
  212. List->Flag(Pkg,pkgOrderList::Configured,pkgOrderList::States);
  213. }
  214. return true;
  215. }
  216. /*}}}*/
  217. // PM::SmartConfigure - Perform immediate configuration of the pkg /*{{{*/
  218. // ---------------------------------------------------------------------
  219. /* This routine scheduals the configuration of the given package and all
  220. of it's dependents. */
  221. bool pkgPackageManager::SmartConfigure(PkgIterator Pkg)
  222. {
  223. pkgOrderList OList(&Cache);
  224. if (DepAdd(OList,Pkg) == false)
  225. return false;
  226. if (OList.OrderConfigure() == false)
  227. return false;
  228. // Perform the configuring
  229. for (pkgOrderList::iterator I = OList.begin(); I != OList.end(); I++)
  230. {
  231. PkgIterator Pkg(Cache,*I);
  232. if (Configure(Pkg) == false)
  233. return false;
  234. List->Flag(Pkg,pkgOrderList::Configured,pkgOrderList::States);
  235. }
  236. // Sanity Check
  237. if (List->IsFlag(Pkg,pkgOrderList::Configured) == false)
  238. return _error->Error("Internal error, could not immediate configure %s",Pkg.Name());
  239. return true;
  240. }
  241. /*}}}*/
  242. // PM::DepAdd - Add all dependents to the oder list /*{{{*/
  243. // ---------------------------------------------------------------------
  244. /* This recursively adds all dependents to the order list */
  245. bool pkgPackageManager::DepAdd(pkgOrderList &OList,PkgIterator Pkg,int Depth)
  246. {
  247. if (OList.IsFlag(Pkg,pkgOrderList::Added) == true)
  248. return true;
  249. if (List->IsFlag(Pkg,pkgOrderList::Configured) == true)
  250. return true;
  251. if (List->IsFlag(Pkg,pkgOrderList::UnPacked) == false)
  252. return false;
  253. // Put the package on the list
  254. OList.push_back(Pkg);
  255. OList.Flag(Pkg,pkgOrderList::Added);
  256. Depth++;
  257. // Check the dependencies to see if they are all satisfied.
  258. bool Bad = false;
  259. for (DepIterator D = Cache[Pkg].InstVerIter(Cache).DependsList(); D.end() == false;)
  260. {
  261. if (D->Type != pkgCache::Dep::Depends && D->Type != pkgCache::Dep::PreDepends)
  262. {
  263. D++;
  264. continue;
  265. }
  266. // Grok or groups
  267. Bad = true;
  268. for (bool LastOR = true; D.end() == false && LastOR == true; D++)
  269. {
  270. LastOR = (D->CompareOp & pkgCache::Dep::Or) == pkgCache::Dep::Or;
  271. if (Bad == false)
  272. continue;
  273. SPtrArray<Version *> VList = D.AllTargets();
  274. for (Version **I = VList; *I != 0 && Bad == true; I++)
  275. {
  276. VerIterator Ver(Cache,*I);
  277. PkgIterator Pkg = Ver.ParentPkg();
  278. // See if the current version is ok
  279. if (Pkg.CurrentVer() == Ver && List->IsNow(Pkg) == true &&
  280. Pkg.State() == PkgIterator::NeedsNothing)
  281. {
  282. Bad = false;
  283. continue;
  284. }
  285. // Not the install version
  286. if (Cache[Pkg].InstallVer != *I ||
  287. (Cache[Pkg].Keep() == true && Pkg.State() == PkgIterator::NeedsNothing))
  288. continue;
  289. if (List->IsFlag(Pkg,pkgOrderList::UnPacked) == true)
  290. Bad = !DepAdd(OList,Pkg,Depth);
  291. if (List->IsFlag(Pkg,pkgOrderList::Configured) == true)
  292. Bad = false;
  293. }
  294. }
  295. if (Bad == true)
  296. {
  297. OList.Flag(Pkg,0,pkgOrderList::Added);
  298. OList.pop_back();
  299. Depth--;
  300. return false;
  301. }
  302. }
  303. Depth--;
  304. return true;
  305. }
  306. /*}}}*/
  307. // PM::EarlyRemove - Perform removal of packages before their time /*{{{*/
  308. // ---------------------------------------------------------------------
  309. /* This is called to deal with conflicts arising from unpacking */
  310. bool pkgPackageManager::EarlyRemove(PkgIterator Pkg)
  311. {
  312. if (List->IsNow(Pkg) == false)
  313. return true;
  314. // Already removed it
  315. if (List->IsFlag(Pkg,pkgOrderList::Removed) == true)
  316. return true;
  317. // Woops, it will not be re-installed!
  318. if (List->IsFlag(Pkg,pkgOrderList::InList) == false)
  319. return false;
  320. // Essential packages get special treatment
  321. bool IsEssential = false;
  322. if ((Pkg->Flags & pkgCache::Flag::Essential) != 0)
  323. IsEssential = true;
  324. /* Check for packages that are the dependents of essential packages and
  325. promote them too */
  326. if (Pkg->CurrentVer != 0)
  327. {
  328. for (DepIterator D = Pkg.RevDependsList(); D.end() == false &&
  329. IsEssential == false; D++)
  330. if (D->Type == pkgCache::Dep::Depends || D->Type == pkgCache::Dep::PreDepends)
  331. if ((D.ParentPkg()->Flags & pkgCache::Flag::Essential) != 0)
  332. IsEssential = true;
  333. }
  334. if (IsEssential == true)
  335. {
  336. if (_config->FindB("APT::Force-LoopBreak",false) == false)
  337. return _error->Error(_("This installation run will require temporarily "
  338. "removing the essential package %s due to a "
  339. "Conflicts/Pre-Depends loop. This is often bad, "
  340. "but if you really want to do it, activate the "
  341. "APT::Force-LoopBreak option."),Pkg.Name());
  342. }
  343. bool Res = SmartRemove(Pkg);
  344. if (Cache[Pkg].Delete() == false)
  345. List->Flag(Pkg,pkgOrderList::Removed,pkgOrderList::States);
  346. return Res;
  347. }
  348. /*}}}*/
  349. // PM::SmartRemove - Removal Helper /*{{{*/
  350. // ---------------------------------------------------------------------
  351. /* */
  352. bool pkgPackageManager::SmartRemove(PkgIterator Pkg)
  353. {
  354. if (List->IsNow(Pkg) == false)
  355. return true;
  356. List->Flag(Pkg,pkgOrderList::Configured,pkgOrderList::States);
  357. return Remove(Pkg,(Cache[Pkg].iFlags & pkgDepCache::Purge) == pkgDepCache::Purge);
  358. }
  359. /*}}}*/
  360. // PM::SmartUnPack - Install helper /*{{{*/
  361. // ---------------------------------------------------------------------
  362. /* This performs the task of handling pre-depends. */
  363. bool pkgPackageManager::SmartUnPack(PkgIterator Pkg)
  364. {
  365. // Check if it is already unpacked
  366. if (Pkg.State() == pkgCache::PkgIterator::NeedsConfigure &&
  367. Cache[Pkg].Keep() == true)
  368. {
  369. List->Flag(Pkg,pkgOrderList::UnPacked,pkgOrderList::States);
  370. if (List->IsFlag(Pkg,pkgOrderList::Immediate) == true)
  371. if (SmartConfigure(Pkg) == false)
  372. return _error->Error("Internal Error, Could not perform immediate configuration (1) on %s",Pkg.Name());
  373. return true;
  374. }
  375. /* See if this packages install version has any predependencies
  376. that are not met by 'now' packages. */
  377. for (DepIterator D = Cache[Pkg].InstVerIter(Cache).DependsList();
  378. D.end() == false; )
  379. {
  380. // Compute a single dependency element (glob or)
  381. pkgCache::DepIterator Start;
  382. pkgCache::DepIterator End;
  383. D.GlobOr(Start,End);
  384. while (End->Type == pkgCache::Dep::PreDepends)
  385. {
  386. // Look for possible ok targets.
  387. SPtrArray<Version *> VList = Start.AllTargets();
  388. bool Bad = true;
  389. for (Version **I = VList; *I != 0 && Bad == true; I++)
  390. {
  391. VerIterator Ver(Cache,*I);
  392. PkgIterator Pkg = Ver.ParentPkg();
  393. // See if the current version is ok
  394. if (Pkg.CurrentVer() == Ver && List->IsNow(Pkg) == true &&
  395. Pkg.State() == PkgIterator::NeedsNothing)
  396. {
  397. Bad = false;
  398. continue;
  399. }
  400. }
  401. // Look for something that could be configured.
  402. for (Version **I = VList; *I != 0 && Bad == true; I++)
  403. {
  404. VerIterator Ver(Cache,*I);
  405. PkgIterator Pkg = Ver.ParentPkg();
  406. // Not the install version
  407. if (Cache[Pkg].InstallVer != *I ||
  408. (Cache[Pkg].Keep() == true && Pkg.State() == PkgIterator::NeedsNothing))
  409. continue;
  410. Bad = !SmartConfigure(Pkg);
  411. }
  412. /* If this or element did not match then continue on to the
  413. next or element until a matching element is found */
  414. if (Bad == true)
  415. {
  416. // This triggers if someone make a pre-depends/depend loop.
  417. if (Start == End)
  418. return _error->Error("Couldn't configure pre-depend %s for %s, "
  419. "probably a dependency cycle.",
  420. End.TargetPkg().Name(),Pkg.Name());
  421. Start++;
  422. }
  423. else
  424. break;
  425. }
  426. if (End->Type == pkgCache::Dep::Conflicts ||
  427. End->Type == pkgCache::Dep::Obsoletes)
  428. {
  429. /* Look for conflicts. Two packages that are both in the install
  430. state cannot conflict so we don't check.. */
  431. SPtrArray<Version *> VList = End.AllTargets();
  432. for (Version **I = VList; *I != 0; I++)
  433. {
  434. VerIterator Ver(Cache,*I);
  435. PkgIterator Pkg = Ver.ParentPkg();
  436. // See if the current version is conflicting
  437. if (Pkg.CurrentVer() == Ver && List->IsNow(Pkg) == true)
  438. {
  439. if (EarlyRemove(Pkg) == false)
  440. return _error->Error("Internal Error, Could not early remove %s",Pkg.Name());
  441. }
  442. }
  443. }
  444. }
  445. // Check for reverse conflicts.
  446. if (CheckRConflicts(Pkg,Pkg.RevDependsList(),
  447. Cache[Pkg].InstVerIter(Cache).VerStr()) == false)
  448. return false;
  449. for (PrvIterator P = Cache[Pkg].InstVerIter(Cache).ProvidesList();
  450. P.end() == false; P++)
  451. CheckRConflicts(Pkg,P.ParentPkg().RevDependsList(),P.ProvideVersion());
  452. if (Install(Pkg,FileNames[Pkg->ID]) == false)
  453. return false;
  454. List->Flag(Pkg,pkgOrderList::UnPacked,pkgOrderList::States);
  455. // Perform immedate configuration of the package.
  456. if (List->IsFlag(Pkg,pkgOrderList::Immediate) == true)
  457. if (SmartConfigure(Pkg) == false)
  458. return _error->Error("Internal Error, Could not perform immediate configuration (2) on %s",Pkg.Name());
  459. return true;
  460. }
  461. /*}}}*/
  462. // PM::OrderInstall - Installation ordering routine /*{{{*/
  463. // ---------------------------------------------------------------------
  464. /* */
  465. pkgPackageManager::OrderResult pkgPackageManager::OrderInstall()
  466. {
  467. if (CreateOrderList() == false)
  468. return Failed;
  469. Reset();
  470. if (Debug == true)
  471. clog << "Begining to order" << endl;
  472. if (List->OrderUnpack(FileNames) == false)
  473. {
  474. _error->Error("Internal ordering error");
  475. return Failed;
  476. }
  477. if (Debug == true)
  478. clog << "Done ordering" << endl;
  479. bool DoneSomething = false;
  480. for (pkgOrderList::iterator I = List->begin(); I != List->end(); I++)
  481. {
  482. PkgIterator Pkg(Cache,*I);
  483. if (List->IsNow(Pkg) == false)
  484. {
  485. if (Debug == true)
  486. clog << "Skipping already done " << Pkg.Name() << endl;
  487. continue;
  488. }
  489. if (List->IsMissing(Pkg) == true)
  490. {
  491. if (Debug == true)
  492. clog << "Sequence completed at " << Pkg.Name() << endl;
  493. if (DoneSomething == false)
  494. {
  495. _error->Error("Internal Error, ordering was unable to handle the media swap");
  496. return Failed;
  497. }
  498. return Incomplete;
  499. }
  500. // Sanity check
  501. if (Cache[Pkg].Keep() == true &&
  502. Pkg.State() == pkgCache::PkgIterator::NeedsNothing &&
  503. (Cache[Pkg].iFlags & pkgDepCache::ReInstall) != pkgDepCache::ReInstall)
  504. {
  505. _error->Error("Internal Error, trying to manipulate a kept package (%s)",Pkg.Name());
  506. return Failed;
  507. }
  508. // Perform a delete or an install
  509. if (Cache[Pkg].Delete() == true)
  510. {
  511. if (SmartRemove(Pkg) == false)
  512. return Failed;
  513. }
  514. else
  515. if (SmartUnPack(Pkg) == false)
  516. return Failed;
  517. DoneSomething = true;
  518. }
  519. // Final run through the configure phase
  520. if (ConfigureAll() == false)
  521. return Failed;
  522. // Sanity check
  523. for (pkgOrderList::iterator I = List->begin(); I != List->end(); I++)
  524. {
  525. if (List->IsFlag(*I,pkgOrderList::Configured) == false)
  526. {
  527. _error->Error("Internal error, packages left unconfigured. %s",
  528. PkgIterator(Cache,*I).Name());
  529. return Failed;
  530. }
  531. }
  532. return Completed;
  533. }
  534. /*}}}*/
  535. // PM::DoInstall - Does the installation /*{{{*/
  536. // ---------------------------------------------------------------------
  537. /* This uses the filenames in FileNames and the information in the
  538. DepCache to perform the installation of packages.*/
  539. pkgPackageManager::OrderResult pkgPackageManager::DoInstall(int statusFd)
  540. {
  541. if(DoInstallPreFork() == Failed)
  542. return Failed;
  543. return DoInstallPostFork(statusFd);
  544. }
  545. /*}}}*/