summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/cdrom.cc2
-rw-r--r--apt-pkg/contrib/fileutl.cc18
-rw-r--r--apt-pkg/contrib/fileutl.h4
-rw-r--r--apt-pkg/deb/dpkgpm.cc15
-rw-r--r--cmdline/apt-get.cc6
-rw-r--r--debian/changelog15
6 files changed, 53 insertions, 7 deletions
diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc
index 93deb49c4..e3e0027fc 100644
--- a/apt-pkg/cdrom.cc
+++ b/apt-pkg/cdrom.cc
@@ -383,7 +383,7 @@ bool pkgCdrom::WriteDatabase(Configuration &Cnf)
Out.close();
- rename(DFile.c_str(),string(DFile + '~').c_str());
+ link(DFile.c_str(),string(DFile + '~').c_str());
if (rename(NewFile.c_str(),DFile.c_str()) != 0)
return _error->Errno("rename","Failed to rename %s.new to %s",
DFile.c_str(),DFile.c_str());
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc
index 49b2f3828..2a3b8a87d 100644
--- a/apt-pkg/contrib/fileutl.cc
+++ b/apt-pkg/contrib/fileutl.cc
@@ -700,6 +700,24 @@ bool FileFd::Open(string FileName,OpenMode Mode, unsigned long Perms)
SetCloseExec(iFd,true);
return true;
}
+
+bool FileFd::OpenDescriptor(int Fd, OpenMode Mode, bool AutoClose)
+{
+ Close();
+ Flags = (AutoClose) ? FileFd::AutoClose : 0;
+ iFd = Fd;
+ if (Mode == ReadOnlyGzip) {
+ gz = gzdopen (iFd, "r");
+ if (gz == NULL) {
+ if (AutoClose)
+ close (iFd);
+ return _error->Errno("gzdopen",_("Could not open file descriptor %d"),
+ Fd);
+ }
+ }
+ this->FileName = "";
+ return true;
+}
/*}}}*/
// FileFd::~File - Closes the file /*{{{*/
// ---------------------------------------------------------------------
diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h
index 0f70ab722..62705478d 100644
--- a/apt-pkg/contrib/fileutl.h
+++ b/apt-pkg/contrib/fileutl.h
@@ -28,6 +28,9 @@
#include <zlib.h>
+/* Define this for python-apt */
+#define APT_HAS_GZIP 1
+
using std::string;
class FileFd
@@ -60,6 +63,7 @@ class FileFd
unsigned long Tell();
unsigned long Size();
bool Open(string FileName,OpenMode Mode,unsigned long Perms = 0666);
+ bool OpenDescriptor(int Fd, OpenMode Mode, bool AutoClose=false);
bool Close();
bool Sync();
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index 67291063c..aa0b04bd5 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -675,17 +675,22 @@ bool pkgDPkgPM::OpenLog()
for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++)
{
if (Cache[I].NewInstall())
- install += I.Name() + string(" (") + Cache[I].CandVersion + string("), ");
+ {
+ install += I.FullName(false) + string(" (") + Cache[I].CandVersion;
+ if (Cache[I].Flags & pkgCache::Flag::Auto)
+ install+= ", automatic";
+ install += string("), ");
+ }
else if (Cache[I].Upgrade())
- upgrade += I.Name() + string(" (") + Cache[I].CurVersion + string(", ") + Cache[I].CandVersion + string("), ");
+ upgrade += I.FullName(false) + string(" (") + Cache[I].CurVersion + string(", ") + Cache[I].CandVersion + string("), ");
else if (Cache[I].Downgrade())
- downgrade += I.Name() + string(" (") + Cache[I].CurVersion + string(", ") + Cache[I].CandVersion + string("), ");
+ downgrade += I.FullName(false) + string(" (") + Cache[I].CurVersion + string(", ") + Cache[I].CandVersion + string("), ");
else if (Cache[I].Delete())
{
if ((Cache[I].iFlags & pkgDepCache::Purge) == pkgDepCache::Purge)
- purge += I.Name() + string(" (") + Cache[I].CurVersion + string("), ");
+ purge += I.FullName(false) + string(" (") + Cache[I].CurVersion + string("), ");
else
- remove += I.Name() + string(" (") + Cache[I].CurVersion + string("), ");
+ remove += I.FullName(false) + string(" (") + Cache[I].CurVersion + string("), ");
}
}
if (_config->Exists("Commandline::AsString") == true)
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index eaa982856..c0e74b37b 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -25,6 +25,9 @@
##################################################################### */
/*}}}*/
// Include Files /*{{{*/
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+
#include <apt-pkg/error.h>
#include <apt-pkg/cmndline.h>
#include <apt-pkg/init.h>
@@ -63,6 +66,9 @@
#include <regex.h>
#include <sys/wait.h>
#include <sstream>
+
+#define statfs statfs64
+#define statvfs statvfs64
/*}}}*/
#define RAMFS_MAGIC 0x858458f6
diff --git a/debian/changelog b/debian/changelog
index b836aaab8..49f8bce46 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,18 @@
apt (0.7.26~exp11) experimental; urgency=low
+ [ Julian Andres Klode ]
+ * apt-pkg/deb/dpkgpm.cc:
+ - Write architecture information to history file.
+ - Add to history whether a change was automatic or not.
+ * apt-pkg/contrib/fileutl.cc:
+ - Add FileFd::OpenDescriptor() (needed for python-apt's #383617).
+ * cmdline/apt-get.cc:
+ - Support large filesystems by using statvfs64() instead of statvfs()
+ and statfs64() instead of statfs() (Closes: #590513).
+ * apt-pkg/cdrom.cc:
+ - Use link() instead of rename() for creating the CD database backup;
+ otherwise there would be a short time without any database.
+
[ David Kalnischkies ]
* apt-pkg/depcache.cc:
- handle "circular" conflicts for "all" packages correctly
@@ -19,7 +32,7 @@ apt (0.7.26~exp11) experimental; urgency=low
breaking the or group (Closes: #590438)
- configure also the replacement before remove by adding Immediate flag
- -- David Kalnischkies <kalnischkies@gmail.com> Thu, 29 Jul 2010 12:24:49 +0200
+ -- David Kalnischkies <kalnischkies@gmail.com> Mon, 26 Jul 2010 12:40:44 +0200
apt (0.7.26~exp10) experimental; urgency=low