Michael Vogt лет назад: 19
Родитель
Сommit
4b7c5a3fe8
5 измененных файлов с 8 добавлено и 10 удалено
  1. 2 2
      apt-pkg/cdrom.cc
  2. 1 1
      apt-pkg/contrib/configuration.cc
  3. 1 4
      apt-pkg/deb/dpkgpm.cc
  4. 3 3
      apt-pkg/deb/dpkgpm.h
  5. 1 0
      test/pre-upload-check.py

+ 2 - 2
apt-pkg/cdrom.cc

@@ -668,8 +668,8 @@ bool pkgCdrom::Add(pkgCdromStatus *log)
    DropRepeats(TransList,"");
    DropRepeats(TransList,"");
    if(log) {
    if(log) {
       msg.str("");
       msg.str("");
-      ioprintf(msg, _("Found %i package indexes, %i source indexes, "
-		      "%i translation indexes and %i signatures\n"), 
+      ioprintf(msg, _("Found %lu package indexes, %lu source indexes, "
+		      "%lu translation indexes and %lu signatures\n"), 
 	       List.size(), SourceList.size(), TransList.size(),
 	       List.size(), SourceList.size(), TransList.size(),
 	       SigList.size());
 	       SigList.size());
       log->Update(msg.str(), STEP_SCAN);
       log->Update(msg.str(), STEP_SCAN);

+ 1 - 1
apt-pkg/contrib/configuration.cc

@@ -507,7 +507,7 @@ bool ReadConfigFile(Configuration &Conf,const string &FName,bool AsSectional,
       CurLine++;
       CurLine++;
       // This should be made to work instead, but this is better than looping
       // This should be made to work instead, but this is better than looping
       if (F.fail() && !F.eof())
       if (F.fail() && !F.eof())
-         return _error->Error(_("Line %d too long (max %u)"), CurLine, sizeof(Buffer));
+         return _error->Error(_("Line %d too long (max %lu)"), CurLine, sizeof(Buffer));
 
 
       _strtabexpand(Buffer,sizeof(Buffer));
       _strtabexpand(Buffer,sizeof(Buffer));
       _strstrip(Buffer);
       _strstrip(Buffer);

+ 1 - 4
apt-pkg/deb/dpkgpm.cc

@@ -43,7 +43,7 @@ using namespace std;
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* */
 /* */
 pkgDPkgPM::pkgDPkgPM(pkgDepCache *Cache) 
 pkgDPkgPM::pkgDPkgPM(pkgDepCache *Cache) 
-   : pkgPackageManager(Cache), dpkgbuf_pos(0), PackagesTotal(0), PackagesDone(0)
+   : pkgPackageManager(Cache), dpkgbuf_pos(0), PackagesDone(0), PackagesTotal(0)
 {
 {
 }
 }
 									/*}}}*/
 									/*}}}*/
@@ -770,9 +770,6 @@ bool pkgDPkgPM::Go(int OutStatusFd)
       int _dpkgin = fd[0];
       int _dpkgin = fd[0];
       close(fd[1]);                        // close the write end of the pipe
       close(fd[1]);                        // close the write end of the pipe
 
 
-      // the read buffers for the communication with dpkg
-      char buf[2] = {0,0};
-      
       // the result of the waitpid call
       // the result of the waitpid call
       int res;
       int res;
       close(slave);
       close(slave);

+ 3 - 3
apt-pkg/deb/dpkgpm.h

@@ -43,10 +43,10 @@ class pkgDPkgPM : public pkgPackageManager
    // the dpkg states that are already done; the string is the package
    // the dpkg states that are already done; the string is the package
    // the int is the state that is already done (e.g. a package that is
    // the int is the state that is already done (e.g. a package that is
    // going to be install is already in state "half-installed")
    // going to be install is already in state "half-installed")
-   map<string,int> PackageOpsDone;
+   map<string,unsigned int> PackageOpsDone;
    // progress reporting
    // progress reporting
-   int PackagesDone;
-   int PackagesTotal;
+   unsigned int PackagesDone;
+   unsigned int PackagesTotal;
   
   
    struct Item
    struct Item
    {
    {

+ 1 - 0
test/pre-upload-check.py

@@ -110,6 +110,7 @@ class testAptInstall(unittest.TestCase):
                      "installing %s failed (got %s)" % (self.pkg, res))
                      "installing %s failed (got %s)" % (self.pkg, res))
 
 
 if __name__ == "__main__":
 if __name__ == "__main__":
+    print "Runing simple testsuit on current apt-get and libapt"
     if len(sys.argv) > 1 and sys.argv[1] == "-v":
     if len(sys.argv) > 1 and sys.argv[1] == "-v":
         stdout = sys.stdout
         stdout = sys.stdout
         stderr = sys.stderr
         stderr = sys.stderr