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