summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:53:46 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:53:46 +0000
commite42eb508e01f4de6def088fe941344d3ca733fa5 (patch)
treeeda5792fdb010c11ca64341ae560f0d1c9fb879d /cmdline
parent73c2c61beb6b2fb4a7685f04d2b0e17d5a934504 (diff)
downloadapt-e42eb508e01f4de6def088fe941344d3ca733fa5.tar.gz
Fixed cd stuff and some minor bugs
Author: jgg Date: 1999-05-23 05:45:12 GMT Fixed cd stuff and some minor bugs
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-config.cc15
-rw-r--r--cmdline/apt-get.cc6
2 files changed, 18 insertions, 3 deletions
diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc
index 3a2a4d9ca..c626a1ee0 100644
--- a/cmdline/apt-config.cc
+++ b/cmdline/apt-config.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: apt-config.cc,v 1.4 1999/03/29 19:28:52 jgg Exp $
+// $Id: apt-config.cc,v 1.5 1999/05/23 05:45:12 jgg Exp $
/* ######################################################################
APT Config - Program to manipulate APT configuration files
@@ -31,8 +31,19 @@ bool DoShell(CommandLine &CmdL)
{
for (const char **I = CmdL.FileList + 1; *I != 0; I += 2)
{
- if (I[1] == 0)
+ if (I[1] == 0 || strlen(I[1]) == 0)
return _error->Error("Arguments not in pairs");
+
+ // Check if the caller has requested a directory path
+ if (I[1][strlen(I[1])-1] == '/')
+ {
+ char S[300];
+ strcpy(S,I[1]);
+ S[strlen(S)-1] = 0;
+ if (_config->Exists(S) == true)
+ cout << *I << "=\"" << _config->FindDir(S) << '"' << endl;
+ }
+
if (_config->Exists(I[1]) == true)
cout << *I << "=\"" << _config->Find(I[1]) << '"' << endl;
}
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index ea56e4c22..043cc35bc 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: apt-get.cc,v 1.59 1999/05/20 05:53:38 jgg Exp $
+// $Id: apt-get.cc,v 1.60 1999/05/23 05:45:12 jgg Exp $
/* ######################################################################
apt-get - Cover for dpkg
@@ -614,7 +614,11 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true,bool Saftey =
}
if (_config->FindB("APT::Get::Download-Only",false) == true)
+ {
+ if (Failed == false && _config->FindB("APT::Get::Fix-Missing",false) == false)
+ return _error->Error("Some files failed to download");
return true;
+ }
if (Failed == true && _config->FindB("APT::Get::Fix-Missing",false) == false)
{