diff options
author | Michael Vogt <mvo@debian.org> | 2008-11-05 13:20:25 +0100 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2008-11-05 13:20:25 +0100 |
commit | a530607f8ac4936402831d854f171fc8dc89ef4f (patch) | |
tree | 07c3d3ce6781af2b36837aa3ced198e47e83daca /apt-pkg | |
parent | 81c1659e78d9cae0ecdee331f16e86564adccf5d (diff) | |
parent | 1c8ab7200ec4527cd38d0b4d0ef847452f011915 (diff) |
* 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)
* 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
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/acquire-item.cc | 4 | ||||
-rw-r--r-- | apt-pkg/acquire.cc | 3 | ||||
-rw-r--r-- | apt-pkg/contrib/cdromutl.cc | 3 | ||||
-rw-r--r-- | apt-pkg/contrib/mmap.cc | 5 | ||||
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 4 | ||||
-rw-r--r-- | apt-pkg/depcache.cc | 2 | ||||
-rw-r--r-- | apt-pkg/indexcopy.cc | 2 |
7 files changed, 15 insertions, 8 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index ae8ff2205..09ea5da02 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -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 { diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 80c2fee0f..38944bbac 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -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; } /*}}}*/ diff --git a/apt-pkg/contrib/cdromutl.cc b/apt-pkg/contrib/cdromutl.cc index 6f00e1451..b6524a178 100644 --- a/apt-pkg/contrib/cdromutl.cc +++ b/apt-pkg/contrib/cdromutl.cc @@ -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 diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc index abcae46fe..eed438250 100644 --- a/apt-pkg/contrib/mmap.cc +++ b/apt-pkg/contrib/mmap.cc @@ -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; } diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 4fad0fd52..85cf4e119 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -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); } diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 859e64ea1..2411bfe89 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -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"); } } diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc index b30777d8d..9e5c03e0b 100644 --- a/apt-pkg/indexcopy.cc +++ b/apt-pkg/indexcopy.cc @@ -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; } |