Fix some deprecation warnings
authorMichael Spang <mspang@csclub.uwaterloo.ca>
Fri, 2 Sep 2011 00:05:11 +0000 (20:05 -0400)
committerMichael Spang <mspang@csclub.uwaterloo.ca>
Fri, 2 Sep 2011 00:05:11 +0000 (20:05 -0400)
Signed-off-by: Michael Spang <mspang@csclub.uwaterloo.ca>
inapt.cc

index 411c149..07d07f3 100644 (file)
--- a/inapt.cc
+++ b/inapt.cc
@@ -56,9 +56,11 @@ static bool run_install(pkgCacheFile &cache) {
    if (_error->PendingError())
        return _error->Error("Unable to lock the download directory");
 
+   pkgAcquire Fetcher;
+
    unsigned int width = 80;
    AcqTextStatus status (width, 0);
-   pkgAcquire Fetcher (&status);
+   Fetcher.Setup(&status);
 
    pkgSourceList List;
    if (List.ReadMainList() == false)
@@ -303,7 +305,7 @@ static void exec_actions(std::vector<inapt_package *> *final_actions) {
     OpTextProgress prog;
     pkgCacheFile cache;
 
-    if (cache.Open(prog) == false)
+    if (cache.Open(&prog, true) == false)
         return;
 
     pkgDepCache::ActionGroup group (cache);