]> git.saurik.com Git - apt.git/commitdiff
* apt-pkg/orderlist.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Thu, 29 Jul 2010 12:29:26 +0000 (14:29 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Thu, 29 Jul 2010 12:29:26 +0000 (14:29 +0200)
  - try to install another or-group member in DepRemove before
    breaking the or group (Closes: #590438)
  - configure also the replacement before remove by adding Immediate flag

apt-pkg/cdrom.cc
apt-pkg/contrib/fileutl.cc
apt-pkg/contrib/fileutl.h
apt-pkg/deb/dpkgpm.cc
cmdline/apt-get.cc
debian/changelog

index 93deb49c48086794d3c0b829d4bafc3c80521ce1..e3e0027fcadfad9004388322b613643d93ccde13 100644 (file)
@@ -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());
index 49b2f3828f325ed6ad244775c9422efcf1f4ccbf..2a3b8a87daa0b062ea484f1b5d432a121e86658a 100644 (file)
@@ -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                                     /*{{{*/
 // ---------------------------------------------------------------------
index 0f70ab722c83f59e730051cc7673916fed987786..62705478def3b8789fe1e291092c90e8a0510cd1 100644 (file)
@@ -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();
    
index 67291063c52d565d199eba2556f30247f0f0c084..aa0b04bd5a9ab0eac5c7a814d0783039e61e8f6b 100644 (file)
@@ -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)
index eaa982856c4a29b5c6a7ba79975f10c048006e91..c0e74b37b1601efae83d5540566ab0a8cdd91246 100644 (file)
@@ -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
index b836aaab873d7564532498da92bed4e5ca875261..49f8bce4659ce03d4065fc8370b7750b6fb806ff 100644 (file)
@@ -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