X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/3c9b111f0fea7b57f1eebc2c03a057240e9b7a06..8d3489abd90a64715b92976a7c60b42a386a4c5c:/apt-pkg/packagemanager.h diff --git a/apt-pkg/packagemanager.h b/apt-pkg/packagemanager.h index da1f21e6c..efd2cfac6 100644 --- a/apt-pkg/packagemanager.h +++ b/apt-pkg/packagemanager.h @@ -23,13 +23,12 @@ #ifndef PKGLIB_PACKAGEMANAGER_H #define PKGLIB_PACKAGEMANAGER_H -#ifdef __GNUG__ -#pragma interface "apt-pkg/packagemanager.h" -#endif #include +#include #include #include +#include using std::string; @@ -49,8 +48,17 @@ class pkgPackageManager : protected pkgCache::Namespace pkgDepCache &Cache; pkgOrderList *List; bool Debug; - + + /** \brief saves packages dpkg let disappear + + This way APT can retreat from trying to configure these + packages later on and a frontend can choose to display a + notice to inform the user about these disappears. + */ + std::set disappearedPkgs; + bool DepAdd(pkgOrderList &Order,PkgIterator P,int Depth = 0); + void ImmediateAdd(PkgIterator P, bool UseInstallVer, unsigned const int &Depth = 0); virtual OrderResult OrderInstall(); bool CheckRConflicts(PkgIterator Pkg,DepIterator Dep,const char *Ver); bool CreateOrderList(); @@ -82,12 +90,7 @@ class pkgPackageManager : protected pkgCache::Namespace pkgRecords *Recs); // Do the installation - OrderResult DoInstall() { - if(DoInstallPreFork() == Failed) - return Failed; - - return DoInstallPostFork(); - } + OrderResult DoInstall(int statusFd=-1); // stuff that needs to be done before the fork() of a library that // uses apt @@ -97,20 +100,12 @@ class pkgPackageManager : protected pkgCache::Namespace }; // stuff that needs to be done after the fork - OrderResult DoInstallPostFork(int statusFd=-1) { - bool goResult = Go(statusFd); - if(goResult == false) - return Failed; - - // if all was fine update the state file - if(Res == Completed) - Cache.writeStateFile(NULL); + OrderResult DoInstallPostFork(int statusFd=-1); + bool FixMissing(); - return Res; - }; + /** \brief returns all packages dpkg let disappear */ + inline std::set GetDisappearedPackages() { return disappearedPkgs; }; - bool FixMissing(); - pkgPackageManager(pkgDepCache *Cache); virtual ~pkgPackageManager(); };