Author: jgg
Date: 1999-12-09 05:22:33 GMT
Fixed --no-download
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acquire.cc,v 1.43 1999/10/27 22:34:29 jgg Exp $
+// $Id: acquire.cc,v 1.44 1999/12/09 05:22:33 jgg Exp $
/* ######################################################################
Acquire - File Acquiration
/* ######################################################################
Acquire - File Acquiration
/* Remove an item from the acquire list. This is usually not used.. */
void pkgAcquire::Remove(Item *Itm)
{
/* Remove an item from the acquire list. This is usually not used.. */
void pkgAcquire::Remove(Item *Itm)
{
for (vector<Item *>::iterator I = Items.begin(); I < Items.end(); I++)
{
if (*I == Itm)
for (vector<Item *>::iterator I = Items.begin(); I < Items.end(); I++)
{
if (*I == Itm)
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: packagemanager.cc,v 1.22 1999/10/22 05:58:54 jgg Exp $
+// $Id: packagemanager.cc,v 1.23 1999/12/09 05:22:33 jgg Exp $
/* ######################################################################
Package Manager - Abstacts the package manager
/* ######################################################################
Package Manager - Abstacts the package manager
if (List->IsMissing(Pkg) == true)
{
if (Debug == true)
if (List->IsMissing(Pkg) == true)
{
if (Debug == true)
- clog << "Sequence completed at" << Pkg.Name() << endl;
+ clog << "Sequence completed at " << Pkg.Name() << endl;
if (DoneSomething == false)
{
_error->Error("Internal Error, ordering was unable to handle the media swap");
if (DoneSomething == false)
{
_error->Error("Internal Error, ordering was unable to handle the media swap");
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: apt-get.cc,v 1.91 1999/11/28 01:03:28 jgg Exp $
+// $Id: apt-get.cc,v 1.92 1999/12/09 05:22:33 jgg Exp $
/* ######################################################################
apt-get - Cover for dpkg
/* ######################################################################
apt-get - Cover for dpkg
// ---------------------------------------------------------------------
/* This displays the informative messages describing what is going to
happen and then calls the download routines */
// ---------------------------------------------------------------------
/* This displays the informative messages describing what is going to
happen and then calls the download routines */
-bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true,bool Saftey = true)
+bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true,
+ bool Saftey = true)
{
if (_config->FindB("APT::Get::Purge",false) == true)
{
{
if (_config->FindB("APT::Get::Purge",false) == true)
{
- if (_config->FindB("APT::Get::No-Download",false) == false)
- if (Fetcher.Run() == pkgAcquire::Failed)
- return false;
+ bool Transient = false;
+ if (_config->FindB("APT::Get::No-Download",false) == true)
+ {
+ for (pkgAcquire::Item **I = Fetcher.ItemsBegin(); I < Fetcher.ItemsEnd();)
+ {
+ if ((*I)->Local == true)
+ {
+ I++;
+ continue;
+ }
+
+ // Close the item and check if it was found in cache
+ (*I)->Finished();
+ if ((*I)->Complete == false)
+ Transient = true;
+
+ // Clear it out of the fetch list
+ delete *I;
+ I = Fetcher.ItemsBegin();
+ }
+ }
+
+ if (Fetcher.Run() == pkgAcquire::Failed)
+ return false;
// Print out errors
bool Failed = false;
// Print out errors
bool Failed = false;
- bool Transient = false;
for (pkgAcquire::Item **I = Fetcher.ItemsBegin(); I != Fetcher.ItemsEnd(); I++)
{
if ((*I)->Status == pkgAcquire::Item::StatDone &&
for (pkgAcquire::Item **I = Fetcher.ItemsBegin(); I != Fetcher.ItemsEnd(); I++)
{
if ((*I)->Status == pkgAcquire::Item::StatDone &&
// Failed = true;
continue;
}
// Failed = true;
continue;
}
cerr << "Failed to fetch " << (*I)->DescURI() << endl;
cerr << " " << (*I)->ErrorText << endl;
Failed = true;
}
cerr << "Failed to fetch " << (*I)->DescURI() << endl;
cerr << " " << (*I)->ErrorText << endl;
Failed = true;
}
- /* If we are in no download mode and missing files then there were
+ /* If we are in no download mode and missing files and there were
'failures' then the user must specify -m. Furthermore, there
is no such thing as a transient error in no-download mode! */
'failures' then the user must specify -m. Furthermore, there
is no such thing as a transient error in no-download mode! */
- if (Transient == true &&
+ if (Transient == true &&
_config->FindB("APT::Get::No-Download",false) == true)
{
Transient = false;
_config->FindB("APT::Get::No-Download",false) == true)
{
Transient = false;
cerr << "Unable to correct missing packages." << endl;
return _error->Error("Aborting Install.");
}
cerr << "Unable to correct missing packages." << endl;
return _error->Error("Aborting Install.");
}
Cache.ReleaseLock();
pkgPackageManager::OrderResult Res = PM.DoInstall();
if (Res == pkgPackageManager::Failed || _error->PendingError() == true)
Cache.ReleaseLock();
pkgPackageManager::OrderResult Res = PM.DoInstall();
if (Res == pkgPackageManager::Failed || _error->PendingError() == true)
// Diff only mode only fetches .diff files
if (_config->FindB("APT::Get::Diff-Only",false) == true ||
// Diff only mode only fetches .diff files
if (_config->FindB("APT::Get::Diff-Only",false) == true ||
- _config->FindB("APT::Get::Tar-Only",false) == true)
+ _config->FindB("APT::Get::Tar-Only",false) == true ||
+ Dsc[I].Dsc.empty() == true)
// See if the package is already unpacked
struct stat Stat;
if (stat(Dir.c_str(),&Stat) == 0 &&
// See if the package is already unpacked
struct stat Stat;
if (stat(Dir.c_str(),&Stat) == 0 &&
+apt (0.3.15.1) unstable; urgency=low
+
+ * Made --no-download work.
+
+ -- Jason Gunthorpe <jgg@debian.org> Sat, 4 Dec 1999 21:17:24 -0800
+
apt (0.3.15) unstable; urgency=low
* Added DSelect::WaitAfterDownload Closes: #49549
apt (0.3.15) unstable; urgency=low
* Added DSelect::WaitAfterDownload Closes: #49549
Ignore missing packages; If packages cannot be retrieved or fail the
integrity check after retrieval (corrupted package files), hold back
those packages and handle the result. Use of this option together with
Ignore missing packages; If packages cannot be retrieved or fail the
integrity check after retrieval (corrupted package files), hold back
those packages and handle the result. Use of this option together with
--f may produce an error in some situations. Configuration Item: bf(ignore-missing).
+-f may produce an error in some situations. If a package is selected for
+installation (particularly if it is mentioned on the command line) and it
+could not be downloaded then it will be silently held back.
+Configuration Item: bf(APT::Get::ignore-missing).
dit(bf(--no-download))
Disables downloading of packages. This is best used with --ignore-missing to
force APT to use only the .debs it has already downloaded.
dit(bf(--no-download))
Disables downloading of packages. This is best used with --ignore-missing to
force APT to use only the .debs it has already downloaded.
+Configuration Item: bf(APT::Get::No-Download).
dit(bf(-q, --quiet))
Quiet; produces output suitable for logging, omitting progress indicators.
dit(bf(-q, --quiet))
Quiet; produces output suitable for logging, omitting progress indicators.
dit(bf(-b, --compile, --build))
Compile source packages after downloading them.
dit(bf(-b, --compile, --build))
Compile source packages after downloading them.
+Configuration Item: bf(APT::Get::Compile).
dit(bf(--ignore-hold))
Ignore package Holds; This causes bf(apt-get) to ignore a hold placed on
dit(bf(--ignore-hold))
Ignore package Holds; This causes bf(apt-get) to ignore a hold placed on
dit(bf(--purge))
Use purge instead of remove for anything that would be removed.
dit(bf(--purge))
Use purge instead of remove for anything that would be removed.
+Configuration Item: bf(APT::Get::Purge).
dit(bf(--reinstall))
Re-Install packages that are already installed and at the newest version.
dit(bf(--reinstall))
Re-Install packages that are already installed and at the newest version.
If any packages are to be removed apt-get immediately aborts without
prompting. Configuration Item: bf(APT::Get::No-Remove)
If any packages are to be removed apt-get immediately aborts without
prompting. Configuration Item: bf(APT::Get::No-Remove)
-dit(bf(--diff-only), bd(--tar-only))
+dit(bf(--diff-only), bf(--tar-only))
Download only the diff or tar file of a source archive.
Configuration Item: bf(APT::Get::Diff-Only)
Download only the diff or tar file of a source archive.
Configuration Item: bf(APT::Get::Diff-Only)