summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/contrib/cdromutl.cc10
-rw-r--r--apt-pkg/deb/dpkgpm.cc2
-rw-r--r--apt-pkg/init.cc3
-rw-r--r--apt-pkg/init.h2
4 files changed, 15 insertions, 2 deletions
diff --git a/apt-pkg/contrib/cdromutl.cc b/apt-pkg/contrib/cdromutl.cc
index 6dce82fe1..129e4a9f6 100644
--- a/apt-pkg/contrib/cdromutl.cc
+++ b/apt-pkg/contrib/cdromutl.cc
@@ -157,6 +157,16 @@ bool IdentCdrom(string CD,string &Res,unsigned int Version)
{
MD5Summation Hash;
+ // if we are on a writable medium (like a usb-stick) that is just
+ // used like a cdrom don't use "." as it will constantly change,
+ // use .disk instead
+ if (access(CD.c_str(), W_OK) == 0 && DirectoryExists(CD+string("/.disk"))) {
+ CD = CD+string("/.disk");
+ if (_config->FindB("Debug::aptcdrom",false) == true)
+ std::clog << "Found writable cdrom, using alternative path: "
+ << CD.c_str() << std::endl;
+ }
+
string StartDir = SafeGetCWD();
if (chdir(CD.c_str()) != 0)
return _error->Errno("chdir",_("Unable to change to %s"),CD.c_str());
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index 395c3fb1a..0d4a52c2f 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -1264,7 +1264,7 @@ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg)
string::size_type pos;
FILE *report;
- if (_config->FindB("Dpkg::ApportFailureReport", false) == false)
+ if (_config->FindB("Dpkg::ApportFailureReport", true) == false)
{
std::clog << "configured to not write apport reports" << std::endl;
return;
diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc
index f0bad78df..e031cbb94 100644
--- a/apt-pkg/init.cc
+++ b/apt-pkg/init.cc
@@ -84,6 +84,9 @@ bool pkgInitConfig(Configuration &Cnf)
Cnf.Set("Dir::Ignore-Files-Silently::", "\\.disabled$");
Cnf.Set("Dir::Ignore-Files-Silently::", "\\.bak$");
Cnf.Set("Dir::Ignore-Files-Silently::", "\\.dpkg-[a-z]+$");
+ // ubuntu specific
+ Cnf.Set("Dir::Ignore-Files-Silently::", "\\.distUpgrade$");
+ Cnf.Set("Dir::Ignore-Files-Silently::", "\\.save$");
// Translation
Cnf.Set("APT::Acquire::Translation", "environment");
diff --git a/apt-pkg/init.h b/apt-pkg/init.h
index 15a1165b9..6d3ef953c 100644
--- a/apt-pkg/init.h
+++ b/apt-pkg/init.h
@@ -21,7 +21,7 @@
// reverse-dependencies of libapt-pkg against the new SONAME.
// Non-ABI-Breaks should only increase RELEASE number.
// See also buildlib/libversion.mak
-#define APT_PKG_MAJOR 4
+#define APT_PKG_MAJOR 4
#define APT_PKG_MINOR 10
#define APT_PKG_RELEASE 1