- // FIXME: make this a factory
- // select the right progress
- int status_fd = _config->FindI("APT::Status-Fd",-1);
-
- APT::Progress::PackageManager *progress = NULL;
- if (status_fd > 0)
- progress = new APT::Progress::PackageManagerProgressFd(status_fd);
- else if(_config->FindB("Dpkg::Progress-Fancy", false) == true)
- progress = new APT::Progress::PackageManagerFancy();
- else if (_config->FindB("Dpkg::Progress",
- _config->FindB("DpkgPM::Progress", false)) == true)
- progress = new APT::Progress::PackageManagerText();
- else
- progress = new APT::Progress::PackageManager();
+#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
+ APT::Progress::PackageManager *progress = APT::Progress::PackageManagerProgressFactory();