packagemanager.cc 19 KB

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