* debian/rules:
authorMichael Vogt <mvo@debian.org>
Wed, 5 Nov 2008 12:20:25 +0000 (13:20 +0100)
committerMichael Vogt <mvo@debian.org>
Wed, 5 Nov 2008 12:20:25 +0000 (13:20 +0100)
  - Fixed lintian warnings "debian/rules ignores make errors".
* debian/control:
  - Substituted outdated "Source-Version" fields with "binary:Version".
  - Added 'python-apt' to Suggests, as apt-mark need it for work.
  - Drop Debian revision from 'doc-base' build dependency, this fixes
    appropriate lintian warning.
* debian/libapt-pkg-doc.doc-base.*:
  - Changed section: from old 'Devel' to 'Debian'. This fixes appropriate
    lintian warnings.
* debian/{postrm,prerm,preinst}:
  - Added 'set -e', fixes lintian warnings
    'maintainer-script-ignores-error'.
* dselect/makefile:
  - Removed unneeded 'LOCAL' entry. This allows cleaning rule to run smoothly.
* share/lintian-overrides:
  - Added with override of 'apt must depend on python'. Script 'apt-mark'
    needs apt-python for working and checks this on fly. We don't want
    python in most cases.
* cmdline/apt-key:
  - Added 'unset GREP_OPTIONS' to the script. This prevents 'apt-key update'
    failure when GREP_OPTIONS contains options that modify grep output.
    (Closes: #428752)
* apt-pkg/acquire-item.cc:
  - fix a merge mistake that prevents the fallback to the
    uncompressed 'Packages' to work correctly (closes: #409284)
* apt-pkg/acquire-item.cc:
  - Added fallback to uncompressed 'Packages' if neither 'bz2' nor 'gz'
    available. (Closes: #409284)
* apt-pkg/algorithm.cc:
  - Strip username and password from source URL in error message.
    (Closes: #425150)

* fix various -Wall warnings

13 files changed:
apt-inst/contrib/extracttar.cc
apt-pkg/acquire-item.cc
apt-pkg/acquire.cc
apt-pkg/contrib/cdromutl.cc
apt-pkg/contrib/mmap.cc
apt-pkg/deb/dpkgpm.cc
apt-pkg/depcache.cc
apt-pkg/indexcopy.cc
cmdline/apt-cache.cc
debian/changelog
methods/http.cc
methods/https.cc
po/apt-all.pot

index 68c871a..8338fd8 100644 (file)
@@ -208,14 +208,14 @@ bool ExtractTar::Go(pkgDirStream &Stream)
         Itm.Name = (char *)LastLongName.c_str();
       else
       {
-        Tar->Name[sizeof(Tar->Name)] = 0;
+        Tar->Name[sizeof(Tar->Name)-1] = 0;
         Itm.Name = Tar->Name;
       }      
       if (Itm.Name[0] == '.' && Itm.Name[1] == '/' && Itm.Name[2] != 0)
         Itm.Name += 2;
       
       // Grab the link target
-      Tar->Name[sizeof(Tar->LinkName)] = 0;
+      Tar->Name[sizeof(Tar->LinkName)-1] = 0;
       Itm.LinkTarget = Tar->LinkName;
 
       if (LastLongLink.empty() == false)
index ae8ff22..09ea5da 100644 (file)
@@ -718,6 +718,10 @@ void pkgAcqIndex::Done(string Message,unsigned long Size,string Hash,
    else if(compExt == "gz") 
       decompProg = "gzip";
    // flExtensions returns the full name if no extension is found
+   // this is why we have this complicated compare operation here
+   // FIMXE: add a new flJustExtension() that return "" if no
+   //        extension is found and use that above so that it can
+   //        be tested against ""
    else if(compExt == flNotDir(URI(Desc.URI).Path))
       decompProg = "copy";
    else {
index 80c2fee..38944bb 100644 (file)
@@ -444,8 +444,9 @@ bool pkgAcquire::Clean(string Dir)
         unlink(Dir->d_name);
    };
    
-   chdir(StartDir.c_str());
    closedir(D);
+   if (chdir(StartDir.c_str()) != 0)
+      return _error->Errno("chdir",_("Unable to change to %s"),StartDir.c_str());
    return true;   
 }
                                                                        /*}}}*/
index 6f00e14..b6524a1 100644 (file)
@@ -176,7 +176,8 @@ bool IdentCdrom(string CD,string &Res,unsigned int Version)
       Hash.Add(Dir->d_name);
    };
    
-   chdir(StartDir.c_str());
+   if (chdir(StartDir.c_str()) != 0)
+      return _error->Errno("chdir",_("Unable to change to %s"),StartDir.c_str());
    closedir(D);
    
    // Some stats from the fsys
index abcae46..eed4382 100644 (file)
@@ -192,7 +192,8 @@ DynamicMMap::~DynamicMMap()
    unsigned long EndOfFile = iSize;
    iSize = WorkSpace;
    Close(false);
-   ftruncate(Fd->Fd(),EndOfFile);
+   if(ftruncate(Fd->Fd(),EndOfFile) < 0)
+      _error->Errno("ftruncate", _("Failed to truncate file"));
 }  
                                                                        /*}}}*/
 // DynamicMMap::RawAllocate - Allocate a raw chunk of unaligned space  /*{{{*/
@@ -209,7 +210,7 @@ unsigned long DynamicMMap::RawAllocate(unsigned long Size,unsigned long Aln)
    // Just in case error check
    if (Result + Size > WorkSpace)
    {
-      _error->Error("Dynamic MMap ran out of room");
+      _error->Error(_("Dynamic MMap ran out of room"));
       return 0;
    }
 
index 4fad0fd..85cf4e1 100644 (file)
@@ -531,7 +531,7 @@ bool pkgDPkgPM::OpenLog()
       struct tm *tmp = localtime(&t);
       strftime(outstr, sizeof(outstr), "%F  %T", tmp);
       fprintf(term_out, "\nLog started: ");
-      fprintf(term_out, outstr);
+      fprintf(term_out, "%s", outstr);
       fprintf(term_out, "\n");
    }
    return true;
@@ -546,7 +546,7 @@ bool pkgDPkgPM::CloseLog()
       struct tm *tmp = localtime(&t);
       strftime(outstr, sizeof(outstr), "%F  %T", tmp);
       fprintf(term_out, "Log ended: ");
-      fprintf(term_out, outstr);
+      fprintf(term_out, "%s", outstr);
       fprintf(term_out, "\n");
       fclose(term_out);
    }
index 859e64e..2411bfe 100644 (file)
@@ -269,7 +269,7 @@ bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly)
         ostr.str(string(""));
         ostr << "Package: " << pkg.Name() 
              << "\nAuto-Installed: 1\n\n";
-        fprintf(OutFile,ostr.str().c_str());
+        fprintf(OutFile,"%s",ostr.str().c_str());
         fprintf(OutFile,"\n");
       }
    }
index b30777d..9e5c03e 100644 (file)
@@ -639,7 +639,7 @@ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector<string> &SigList,
       // Open the Release file and add it to the MetaIndex
       if(!MetaIndex->Load(*I+"Release"))
       {
-        _error->Error(MetaIndex->ErrorText.c_str());
+        _error->Error("%s",MetaIndex->ErrorText.c_str());
         return false;
       }
       
index f10ea48..5513fcc 100644 (file)
@@ -1272,7 +1272,7 @@ bool DisplayRecord(pkgCache::VerIterator V)
                                                                        /*}}}*/
 // Search - Perform a search                                           /*{{{*/
 // ---------------------------------------------------------------------
-/* This searches the package names and pacakge descriptions for a pattern */
+/* This searches the package names and package descriptions for a pattern */
 struct ExDescFile
 {
    pkgCache::DescFile *Df;
index 5775003..a1913da 100644 (file)
@@ -1,35 +1,6 @@
 apt (0.7.17) unstable; urgency=low
 
   [ Eugene V. Lyubimkin ]
-  * apt-pkg/acquire-item.cc:
-    - Added fallback to uncompressed 'Packages' if neither 'bz2' nor 'gz'
-      available. (Closes: #409284)
-  * apt-pkg/algorithm.cc:
-    - Strip username and password from source URL in error message.
-      (Closes: #425150)
-  * debian/rules:
-    - Fixed lintian warnings "debian/rules ignores make errors".
-  * debian/control:
-    - Substituted outdated "Source-Version" fields with "binary:Version".
-    - Added 'python-apt' to Suggests, as apt-mark need it for work.
-    - Drop Debian revision from 'doc-base' build dependency, this fixes
-      appropriate lintian warning.
-  * debian/libapt-pkg-doc.doc-base.*:
-    - Changed section: from old 'Devel' to 'Debian'. This fixes appropriate
-      lintian warnings.
-  * debian/{postrm,prerm,preinst}:
-    - Added 'set -e', fixes lintian warnings
-      'maintainer-script-ignores-error'.
-  * dselect/makefile:
-    - Removed unneeded 'LOCAL' entry. This allows cleaning rule to run smoothly.
-  * share/lintian-overrides:
-    - Added with override of 'apt must depend on python'. Script 'apt-mark'
-      needs apt-python for working and checks this on fly. We don't want
-      python in most cases.
-  * cmdline/apt-key:
-    - Added 'unset GREP_OPTIONS' to the script. This prevents 'apt-key update'
-      failure when GREP_OPTIONS contains options that modify grep output.
-      (Closes: #428752)
   * debian/control:
     - 'Vcs-Bzr' field is official, used it.
     - Bumped 'Standards-Version' to 3.8.0, no changes needed.
@@ -60,6 +31,61 @@ apt (0.7.17) unstable; urgency=low
     - Removed notice that ssh/rsh access cannot use password authentication
       from sources.list manpage. Thanks to Steffen Joeris. (Closes: #434894)
 
+ -- Michael Vogt <mvo@debian.org>  Wed, 05 Nov 2008 13:14:56 +0100
+
+apt (0.7.17~exp4) experimental; urgency=low
+
+  * debian/rules:
+    - Fixed lintian warnings "debian/rules ignores make errors".
+  * debian/control:
+    - Substituted outdated "Source-Version" fields with "binary:Version".
+    - Added 'python-apt' to Suggests, as apt-mark need it for work.
+    - Drop Debian revision from 'doc-base' build dependency, this fixes
+      appropriate lintian warning.
+  * debian/libapt-pkg-doc.doc-base.*:
+    - Changed section: from old 'Devel' to 'Debian'. This fixes appropriate
+      lintian warnings.
+  * debian/{postrm,prerm,preinst}:
+    - Added 'set -e', fixes lintian warnings
+      'maintainer-script-ignores-error'.
+  * dselect/makefile:
+    - Removed unneeded 'LOCAL' entry. This allows cleaning rule to run smoothly.
+  * share/lintian-overrides:
+    - Added with override of 'apt must depend on python'. Script 'apt-mark'
+      needs apt-python for working and checks this on fly. We don't want
+      python in most cases.
+  * cmdline/apt-key:
+    - Added 'unset GREP_OPTIONS' to the script. This prevents 'apt-key update'
+      failure when GREP_OPTIONS contains options that modify grep output.
+      (Closes: #428752)
+
+ -- Eugene V. Lyubimkin <jackyf.devel@gmail.com>  Fri, 24 Oct 2008 23:45:17 +0300
+
+apt (0.7.17~exp3) experimental; urgency=low
+
+  * apt-pkg/acquire-item.cc:
+    - fix a merge mistake that prevents the fallback to the 
+      uncompressed 'Packages' to work correctly (closes: #409284)
+
+ -- Michael Vogt <mvo@debian.org>  Wed, 29 Oct 2008 09:36:24 +0100
+
+apt (0.7.17~exp2) experimental; urgency=low
+
+  [ Eugene V. Lyubimkin ]
+  * apt-pkg/acquire-item.cc:
+    - Added fallback to uncompressed 'Packages' if neither 'bz2' nor 'gz'
+      available. (Closes: #409284)
+  * apt-pkg/algorithm.cc:
+    - Strip username and password from source URL in error message.
+      (Closes: #425150)
+  
+  [ Michael Vogt ]
+  * fix various -Wall warnings
+
+ -- Michael Vogt <mvo@debian.org>  Tue, 28 Oct 2008 18:06:38 +0100
+
+apt (0.7.17~exp1) experimental; urgency=low
+
   [ Luca Bruno ]
   * Fix typos:
     - apt-pkg/depcache.cc
@@ -79,7 +105,7 @@ apt (0.7.17) unstable; urgency=low
     - clarify whether configuration items of apt.conf are case-sensitive
       (thanks to Vincent McIntyre, closes: #345901)
 
- -- Eugene V. Lyubimkin <jackyf.devel@gmail.com>  Fri, 24 Oct 2008 23:45:17 +0300
+ -- Luca Bruno <lethalman88@gmail.com>  Sat, 11 Oct 2008 09:17:46 +0200
 
 apt (0.7.16) unstable; urgency=low
 
index 26d435d..b3c791f 100644 (file)
@@ -941,7 +941,8 @@ int HttpMethod::DealWithHeaders(FetchResult &Res,ServerState *Srv)
    if (Srv->StartPos >= 0)
    {
       Res.ResumePoint = Srv->StartPos;
-      ftruncate(File->Fd(),Srv->StartPos);
+      if (ftruncate(File->Fd(),Srv->StartPos) < 0)
+        _error->Errno("ftruncate", _("Failed to truncate file"));
    }
       
    // Set the start point
index e53ba1a..98dfeef 100644 (file)
@@ -249,7 +249,7 @@ bool HttpsMethod::Fetch(FetchItem *Itm)
    if(success != 0) 
    {
       unlink(File->Name().c_str());
-      _error->Error(curl_errorstr);
+      _error->Error("%s", curl_errorstr);
       Fail();
       return true;
    }
index 922b9af..19e5753 100644 (file)
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-10-28 16:44+0100\n"
+"POT-Creation-Date: 2008-10-28 18:12+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -1663,7 +1663,7 @@ msgstr ""
 msgid "Unable to accept connection"
 msgstr ""
 
-#: methods/ftp.cc:864 methods/http.cc:959 methods/rsh.cc:303
+#: methods/ftp.cc:864 methods/http.cc:960 methods/rsh.cc:303
 msgid "Problem hashing file"
 msgstr ""
 
@@ -1855,15 +1855,19 @@ msgstr ""
 msgid "Error reading from server"
 msgstr ""
 
-#: methods/http.cc:1104
+#: methods/http.cc:945 apt-pkg/contrib/mmap.cc:196
+msgid "Failed to truncate file"
+msgstr ""
+
+#: methods/http.cc:1105
 msgid "Bad header data"
 msgstr ""
 
-#: methods/http.cc:1121 methods/http.cc:1176
+#: methods/http.cc:1122 methods/http.cc:1177
 msgid "Connection failed"
 msgstr ""
 
-#: methods/http.cc:1228
+#: methods/http.cc:1229
 msgid "Internal error"
 msgstr ""
 
@@ -1876,6 +1880,10 @@ msgstr ""
 msgid "Couldn't make mmap of %lu bytes"
 msgstr ""
 
+#: apt-pkg/contrib/mmap.cc:213
+msgid "Dynamic MMap ran out of room"
+msgstr ""
+
 #: apt-pkg/contrib/strutl.cc:1014
 #, c-format
 msgid "Selection %s not found"
@@ -1992,12 +2000,13 @@ msgstr ""
 msgid "Unable to stat the mount point %s"
 msgstr ""
 
-#: apt-pkg/contrib/cdromutl.cc:146 apt-pkg/acquire.cc:424 apt-pkg/clean.cc:40
+#: apt-pkg/contrib/cdromutl.cc:146 apt-pkg/contrib/cdromutl.cc:180
+#: apt-pkg/acquire.cc:424 apt-pkg/acquire.cc:449 apt-pkg/clean.cc:40
 #, c-format
 msgid "Unable to change to %s"
 msgstr ""
 
-#: apt-pkg/contrib/cdromutl.cc:187
+#: apt-pkg/contrib/cdromutl.cc:188
 msgid "Failed to stat the cdrom"
 msgstr ""
 
@@ -2274,12 +2283,12 @@ msgstr ""
 
 #. only show the ETA if it makes sense
 #. two days
-#: apt-pkg/acquire.cc:827
+#: apt-pkg/acquire.cc:828
 #, c-format
 msgid "Retrieving file %li of %li (%s remaining)"
 msgstr ""
 
-#: apt-pkg/acquire.cc:829
+#: apt-pkg/acquire.cc:830
 #, c-format
 msgid "Retrieving file %li of %li"
 msgstr ""