Просмотр исходного кода

Fixed a few minor dpkg settings
Author: jgg
Date: 1999-01-31 08:55:53 GMT
Fixed a few minor dpkg settings

Arch Librarian лет назад: 22
Родитель
Сommit
cf544e1458
3 измененных файлов с 14 добавлено и 6 удалено
  1. 5 3
      apt-pkg/deb/dpkgpm.cc
  2. 7 2
      doc/apt.conf.5.yo
  3. 2 1
      doc/examples/apt.conf

+ 5 - 3
apt-pkg/deb/dpkgpm.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
-// $Id: dpkgpm.cc,v 1.6 1999/01/31 08:49:39 jgg Exp $
+// $Id: dpkgpm.cc,v 1.7 1999/01/31 08:55:53 jgg Exp $
 /* ######################################################################
 
    DPKG Package Manager - Provide an interface to dpkg
@@ -140,7 +140,7 @@ bool pkgDPkgPM::RunScripts(const char *Cnf)
       {
 	 Count -= 100;
 	 for (; Opts != 0 && Count != 1; Opts = Opts->Next, Count--);
-	 _error->Error("Probablem executing scripts %s '%s'",Cnf,Opts->Value.c_str());
+	 _error->Error("Problem executing scripts %s '%s'",Cnf,Opts->Value.c_str());
       }
       
       return _error->Error("Sub-process returned an error code");
@@ -213,6 +213,8 @@ bool pkgDPkgPM::Go()
       {
 	 for (;I != J && Size < 1024; I++)
 	 {
+	    if (I->File[0] != '/')
+	       return _error->Error("Internal Error, Pathname to install is not absolute '%s'",I->File.c_str());
 	    Args[n++] = I->File.c_str();
 	    Size += strlen(Args[n-1]);
 	 }
@@ -262,7 +264,7 @@ bool pkgDPkgPM::Go()
 	 signal(SIGCONT,SIG_DFL);
 	 signal(SIGTSTP,SIG_DFL);
 	 
-	 if (chdir(_config->FindDir("Dir::Cache::Archives").c_str()) != 0)
+	 if (chdir(_config->FindDir("DPkg::Run-Directory","/").c_str()) != 0)
 	    _exit(100);
 	 
 	 // Close all of our FDs - just in case

+ 7 - 2
doc/apt.conf.5.yo

@@ -165,8 +165,13 @@ This is a list of options to pass to dpkg. The options must be specified
 using the list notation and each list item is passed as a single arugment
 to dpkg.
 
-dit(bf(Pre-Invoke))
-This is a list of shell commands to run before invoking dpkg. 
+dit(bf(Pre-Invoke, (bf(Post-Invoke))
+This is a list of shell commands to run before/after invoking dpkg. Like 
+bf(Options) this must be specified in list notation. The commands
+are invoked in order using /bin/sh, should any fail APT will abort.
+
+dit(bf(Run-Directory))
+APT chdirs to this directory before invoking dpkg, the default is /.
 
 enddit()
 

+ 2 - 1
doc/examples/apt.conf

@@ -1,4 +1,4 @@
-// $Id: apt.conf,v 1.23 1999/01/31 08:49:39 jgg Exp $
+// $Id: apt.conf,v 1.24 1999/01/31 08:55:53 jgg Exp $
 /* This file is an index of all APT configuration directives. It should
    NOT actually be used as a real config file, though it is a completely
    valid file.
@@ -120,6 +120,7 @@ DPkg {
    Options {"--force-downgrade";}
    Pre-Invoke {"mount -o remount,rw /usr";};
    Post-Invoke {"mount -o remount,ro /usr";};
+   Run-Direcotry "/";
 }
 
 /* Options you can set to see some debugging text They corrispond to names