summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2007-10-03 02:06:37 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2007-10-03 02:06:37 +0200
commit18a14a834e4068917d97467a3a52f17ed6055da3 (patch)
tree04001afdb2078ff74813ef4c97a09a4c65cf641b /apt-pkg
parent59d5cc74ef7c6ca820ed9d26a4d829b891214edf (diff)
parenta491fe600cdcf28ee9515d4fde02345be93a0f9c (diff)
- French updated
- Basque updated. Closes: #436425 - Fix the zh_CN translator's name in debian/changelog for 0.7.2 Closes: #423272 - Vietnamese updated. Closes: #440611 - Danish updated. Closes: #441102 - Thai added. Closes: #442833 * Add hash support to copy method. Thanks Anders Kaseorg by the patch (closes: #436055) * Reset curl options and timestamp between downloaded files. Thanks to Ryan Murray <rmurray@debian.org> for the patch (closes: #437150) * Add support to apt-key to export keys to stdout. Thanks to "Dwayne C. Litzenberger" <dlitz@dlitz.net> for the patch (closes: #441942) * Fix compilation warnings: - apt-pkg/indexfile.cc: conversion from string constant to 'char*'; - apt-pkg/acquire-item.cc: likewise; - apt-pkg/cdrom.cc: '%lu' expects 'long unsigned int', but argument has type 'size_t'; - apt-pkg/deb/dpkgpm.cc: initialization order and conversion from string constant to 'char*'; - methods/gpgv.cc: conversion from string constant to 'char*'; - methods/ftp.cc: likewise; - cmdline/apt-extracttemplates.cc: likewise; - apt-pkg/deb/debmetaindex.cc: comparison with string literal results in unspecified behaviour; * Applied patch from Aurelien Jarno <aurel32@debian.org> to fix wrong directory downloading on non-linux architectures (closes: #435597) * zh_CN.po: Updated by Kov Chai Closes: #416822
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc2
-rw-r--r--apt-pkg/acquire-worker.cc4
-rw-r--r--apt-pkg/cdrom.cc4
-rw-r--r--apt-pkg/contrib/configuration.cc2
-rw-r--r--apt-pkg/deb/debmetaindex.cc2
-rw-r--r--apt-pkg/deb/dpkgpm.cc6
-rw-r--r--apt-pkg/indexfile.cc4
7 files changed, 13 insertions, 11 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index a6d01e3bb..9c51184e6 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -704,7 +704,7 @@ void pkgAcqIndex::Done(string Message,unsigned long Size,string Hash,
Local = true;
string compExt = Desc.URI.substr(Desc.URI.size()-3);
- char *decompProg;
+ const char *decompProg;
if(compExt == "bz2")
decompProg = "bzip2";
else if(compExt == ".gz")
diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc
index 460f59961..739c9e32c 100644
--- a/apt-pkg/acquire-worker.cc
+++ b/apt-pkg/acquire-worker.cc
@@ -273,7 +273,9 @@ bool pkgAcquire::Worker::RunMessages()
if(!expectedHash.empty())
{
string hashTag = expectedHash.HashType()+"-Hash";
- RecivedHash = expectedHash.HashType() + ":" + LookupTag(Message, hashTag.c_str());
+ string hashSum = LookupTag(Message, hashTag.c_str());
+ if(!hashSum.empty())
+ RecivedHash = expectedHash.HashType() + ":" + hashSum;
if(_config->FindB("Debug::pkgAcquire::Auth", false) == true)
{
clog << "201 URI Done: " << Owner->DescURI() << endl
diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc
index 96106c7a9..b8f94e5b0 100644
--- a/apt-pkg/cdrom.cc
+++ b/apt-pkg/cdrom.cc
@@ -668,8 +668,8 @@ bool pkgCdrom::Add(pkgCdromStatus *log)
DropRepeats(TransList,"");
if(log) {
msg.str("");
- ioprintf(msg, _("Found %lu package indexes, %lu source indexes, "
- "%lu translation indexes and %lu signatures\n"),
+ ioprintf(msg, _("Found %u package indexes, %u source indexes, "
+ "%u translation indexes and %u signatures\n"),
List.size(), SourceList.size(), TransList.size(),
SigList.size());
log->Update(msg.str(), STEP_SCAN);
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc
index 7914bd07b..3109fd7a5 100644
--- a/apt-pkg/contrib/configuration.cc
+++ b/apt-pkg/contrib/configuration.cc
@@ -507,7 +507,7 @@ bool ReadConfigFile(Configuration &Conf,const string &FName,bool AsSectional,
CurLine++;
// This should be made to work instead, but this is better than looping
if (F.fail() && !F.eof())
- return _error->Error(_("Line %d too long (max %lu)"), CurLine, sizeof(Buffer));
+ return _error->Error(_("Line %d too long (max %u)"), CurLine, sizeof(Buffer));
_strtabexpand(Buffer,sizeof(Buffer));
_strstrip(Buffer);
diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc
index 94995798f..9ac659f78 100644
--- a/apt-pkg/deb/debmetaindex.cc
+++ b/apt-pkg/deb/debmetaindex.cc
@@ -224,7 +224,7 @@ class debSLTypeDebian : public pkgSourceList::Type
// This check insures that there will be only one Release file
// queued for all the Packages files and Sources files it
// corresponds to.
- if ((*I)->GetType() == "deb")
+ if (strcmp((*I)->GetType(), "deb") == 0)
{
debReleaseIndex *Deb = (debReleaseIndex *) (*I);
// This check insures that there will be only one Release file
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index b92d0118c..92f96620f 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -44,8 +44,8 @@ using namespace std;
// ---------------------------------------------------------------------
/* */
pkgDPkgPM::pkgDPkgPM(pkgDepCache *Cache)
- : pkgPackageManager(Cache), dpkgbuf_pos(0), PackagesDone(0),
- PackagesTotal(0), term_out(NULL)
+ : pkgPackageManager(Cache), dpkgbuf_pos(0),
+ term_out(NULL), PackagesDone(0), PackagesTotal(0)
{
}
/*}}}*/
@@ -770,7 +770,7 @@ bool pkgDPkgPM::Go(int OutStatusFd)
/* No Job Control Stop Env is a magic dpkg var that prevents it
from using sigstop */
- putenv("DPKG_NO_TSTP=yes");
+ putenv((char *)"DPKG_NO_TSTP=yes");
execvp(Args[0],(char **)Args);
cerr << "Could not exec dpkg!" << endl;
_exit(100);
diff --git a/apt-pkg/indexfile.cc b/apt-pkg/indexfile.cc
index cf238eb4a..b38596143 100644
--- a/apt-pkg/indexfile.cc
+++ b/apt-pkg/indexfile.cc
@@ -113,8 +113,8 @@ string pkgIndexFile::LanguageCode()
// we have a mapping of the language codes that contains all the language
// codes that need the country code as well
// (like pt_BR, pt_PT, sv_SE, zh_*, en_*)
- char *need_full_langcode[] = { "pt","sv","zh","en", NULL };
- for(char **s = need_full_langcode;*s != NULL; s++)
+ const char *need_full_langcode[] = { "pt","sv","zh","en", NULL };
+ for(const char **s = need_full_langcode;*s != NULL; s++)
if(lang.find(*s) == 0)
return lang.substr(0,5);