HCoop
/
ntk
/
apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix tight loop detection and temporary removes
[ntk/apt.git]
/
apt-pkg
/
init.cc
diff --git
a/apt-pkg/init.cc
b/apt-pkg/init.cc
index
a1c47c0
..
2416286
100644
(file)
--- a/
apt-pkg/init.cc
+++ b/
apt-pkg/init.cc
@@
-15,16
+15,18
@@
#include <apt-pkg/error.h>
#include <apt-pkg/pkgsystem.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/error.h>
#include <apt-pkg/pkgsystem.h>
#include <apt-pkg/configuration.h>
+#include <apt-pkg/macros.h>
+#include <string.h>
+#include <string>
#include <cstdlib>
#include <cstdlib>
-#include <sys/stat.h>
#include <apti18n.h>
/*}}}*/
#define Stringfy_(x) # x
#define Stringfy(x) Stringfy_(x)
#include <apti18n.h>
/*}}}*/
#define Stringfy_(x) # x
#define Stringfy(x) Stringfy_(x)
-const char *pkgVersion = VERSION;
+const char *pkgVersion =
PACKAGE_
VERSION;
const char *pkgLibVersion = Stringfy(APT_PKG_MAJOR) "."
Stringfy(APT_PKG_MINOR) "."
Stringfy(APT_PKG_RELEASE);
const char *pkgLibVersion = Stringfy(APT_PKG_MAJOR) "."
Stringfy(APT_PKG_MINOR) "."
Stringfy(APT_PKG_RELEASE);
@@
-44,16
+46,8
@@
bool pkgInitConfig(Configuration &Cnf)
Cnf.CndSet("APT::Install-Suggests", false);
Cnf.CndSet("Dir","/");
Cnf.CndSet("APT::Install-Suggests", false);
Cnf.CndSet("Dir","/");
- // State
+ // State
Cnf.CndSet("Dir::State","var/lib/apt/");
Cnf.CndSet("Dir::State","var/lib/apt/");
-
- /* Just in case something goes horribly wrong, we can fall back to the
- old /var/state paths.. */
- struct stat St;
- if (stat("/var/lib/apt/.",&St) != 0 &&
- stat("/var/state/apt/.",&St) == 0)
- Cnf.CndSet("Dir::State","var/state/apt/");
-
Cnf.CndSet("Dir::State::lists","lists/");
Cnf.CndSet("Dir::State::cdroms","cdroms.list");
Cnf.CndSet("Dir::State::mirrors","mirrors/");
Cnf.CndSet("Dir::State::lists","lists/");
Cnf.CndSet("Dir::State::cdroms","cdroms.list");
Cnf.CndSet("Dir::State::mirrors","mirrors/");
@@
-92,6
+86,7
@@
bool pkgInitConfig(Configuration &Cnf)
Cnf.Set("Dir::Ignore-Files-Silently::", "\\.dpkg-[a-z]+$");
Cnf.Set("Dir::Ignore-Files-Silently::", "\\.save$");
Cnf.Set("Dir::Ignore-Files-Silently::", "\\.orig$");
Cnf.Set("Dir::Ignore-Files-Silently::", "\\.dpkg-[a-z]+$");
Cnf.Set("Dir::Ignore-Files-Silently::", "\\.save$");
Cnf.Set("Dir::Ignore-Files-Silently::", "\\.orig$");
+ Cnf.Set("Dir::Ignore-Files-Silently::", "\\.distUpgrade$");
// Default cdrom mount point
Cnf.CndSet("Acquire::cdrom::mount", "/media/cdrom/");
// Default cdrom mount point
Cnf.CndSet("Acquire::cdrom::mount", "/media/cdrom/");
@@
-100,7
+95,7
@@
bool pkgInitConfig(Configuration &Cnf)
// Read an alternate config file
const char *Cfg = getenv("APT_CONFIG");
// Read an alternate config file
const char *Cfg = getenv("APT_CONFIG");
- if (Cfg != 0)
+ if (Cfg != 0
&& strlen(Cfg) != 0
)
{
if (RealFileExists(Cfg) == true)
Res &= ReadConfigFile(Cnf,Cfg);
{
if (RealFileExists(Cfg) == true)
Res &= ReadConfigFile(Cnf,Cfg);