Feature request, --no-download for update
Hi,
I'm in the situation that I need to filter the Packages file
downloaded by apt-get update and then get apt-get to update its binary
caches without downloading fresh copies.
For this I made a small patch that reuses the --no-download option for
apt-get update as well.
Could this be added to current apt please.
MfG
Goswin
----------------------------------------------------------------------
diff -Nurd --ignore-all-space apt-0.5.28.6.debian/cmdline/apt-get.cc apt-0.5.28.6.mrvn/cmdline/apt-get.cc
--- apt-0.5.28.6.debian/cmdline/apt-get.cc 2005-02-10 09:52:34.000000000 +0100
+++ apt-0.5.28.6.mrvn/cmdline/apt-get.cc 2006-04-15 19:28:42.000000000 +0200
@@ -1248,6 +1248,9 @@
return _error->Error(_("Unable to lock the list directory"));
}
+ bool Failed = false;
+ if (_config->FindB("APT::Get::Download",true) == true)
+ {
// Create the download object
AcqTextStatus Stat(ScreenWidth,_config->FindI("quiet",0));
pkgAcquire Fetcher(&Stat);
@@ -1270,7 +1273,6 @@
if (Fetcher.Run() == pkgAcquire::Failed)
return false;
- bool Failed = false;
for (pkgAcquire::ItemIterator I = Fetcher.ItemsBegin(); I != Fetcher.ItemsEnd(); I++)
{
if ((*I)->Status == pkgAcquire::Item::StatDone)
@@ -1290,6 +1292,7 @@
Fetcher.Clean(_config->FindDir("Dir::State::lists") + "partial/") == false)
return false;
}
+ }
// Prepare the cache.
CacheFile Cache;
diff -Nurd --ignore-all-space apt-0.5.28.6.debian/debian/changelog apt-0.5.28.6.mrvn/debian/changelog
--- apt-0.5.28.6.debian/debian/changelog 2005-03-22 08:03:19.000000000 +0100
+++ apt-0.5.28.6.mrvn/debian/changelog 2006-04-15 19:16:07.000000000 +0200
@@ -1,3 +1,9 @@
+apt (0.5.28.6-0.mrvn.1) unstable; urgency=low
+
+ * Add support for --no-download on apt-get update
+
+ -- Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de> Sat, 15 Apr 2006 19:15:14 +0200
+
apt (0.5.28.6) unstable; urgency=low
* Merge bubulle@debian.org--2005/apt--sarge--0 again (patch-36)
Reply to: