#include <apt-pkg/fileutl.h>
#include <apt-pkg/cachefile.h>
#include <apt-pkg/packagemanager.h>
-#include <apt-pkg/iprogress.h>
+#include <apt-pkg/install-progress.h>
#include <unistd.h>
#include <stdlib.h>
{
pkgname = APT::String::Strip(list[2]);
action = APT::String::Strip(list[1]);
-
- // this is what we support in the processing stage
- if(action != "install" && action != "configure" &&
- action != "remove" && action != "purge" && action != "purge")
- {
- if (Debug == true)
- std::clog << "ignoring processing action: '" << action
- << "'" << std::endl;
- return;
- }
}
// "status" has the form: "status: pkg: state"
// with state in ["half-installed", "unpacked", "half-configured",
// action
const char *translation = _(states[PackageOpsDone[pkg]].str);
std::string msg;
- strprintf(msg, translation, i18n_pkgname.c_str());
- d->progress->StatusChanged(pkgname, PackagesDone, PackagesTotal, msg);
-
+
// we moved from one dpkg state to a new one, report that
PackageOpsDone[pkg]++;
PackagesDone++;
+
+ strprintf(msg, translation, i18n_pkgname.c_str());
+ d->progress->StatusChanged(pkgname, PackagesDone, PackagesTotal, msg);
+
}
if (Debug == true)
std::clog << "(parsed from dpkg) pkg: " << short_pkgname
pkgCache::PkgIterator Pkg = Cache.FindPkg(pkgname);
if (unlikely(Pkg.end() == true))
return;
+
// the disappeared package was auto-installed - nothing to do
if ((Cache[Pkg].Flags & pkgCache::Flag::Auto) == pkgCache::Flag::Auto)
return;
{
if((*I).Pkg.end() == true)
continue;
- if (I->Op == Item::Configure && disappearedPkgs.find(I->Pkg.Name()) != disappearedPkgs.end())
+ if (I->Op == Item::Configure && disappearedPkgs.find(I->Pkg.FullName()) != disappearedPkgs.end())
continue;
// We keep this here to allow "smooth" transitions from e.g. multiarch dpkg/ubuntu to dpkg/debian
if (dpkgMultiArch == false && (I->Pkg.Arch() == nativeArch ||
CloseLog();
// dpkg is done at this point
- d->progress->StatusChanged("", PackagesDone, PackagesTotal, "");
d->progress->Stop();
if (pkgPackageManager::SigINTStop)