summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-inst/contrib/extracttar.cc4
-rw-r--r--apt-pkg/acquire.cc5
-rw-r--r--apt-pkg/contrib/cdromutl.cc3
-rw-r--r--apt-pkg/contrib/mmap.cc5
-rw-r--r--apt-pkg/deb/dpkgpm.cc4
-rw-r--r--apt-pkg/depcache.cc4
-rw-r--r--apt-pkg/indexcopy.cc2
-rw-r--r--apt-pkg/versionmatch.cc2
-rw-r--r--buildlib/apti18n.h.in2
-rw-r--r--buildlib/inttypes.h.in7
-rw-r--r--cmdline/apt-cache.cc2
-rw-r--r--cmdline/makefile12
-rw-r--r--configure.in2
-rw-r--r--debian/changelog38
-rw-r--r--doc/apt.conf.5.xml3
-rw-r--r--ftparchive/makefile2
-rw-r--r--methods/http.cc3
-rw-r--r--methods/https.cc2
-rw-r--r--methods/makefile20
-rw-r--r--po/apt-all.pot27
20 files changed, 104 insertions, 45 deletions
diff --git a/apt-inst/contrib/extracttar.cc b/apt-inst/contrib/extracttar.cc
index 68c871a5d..8338fd89d 100644
--- a/apt-inst/contrib/extracttar.cc
+++ b/apt-inst/contrib/extracttar.cc
@@ -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)
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc
index 6840ae120..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;
}
/*}}}*/
@@ -796,7 +797,7 @@ bool pkgAcquireStatus::Pulse(pkgAcquire *Owner)
// Compute the CPS
struct timeval NewTime;
gettimeofday(&NewTime,0);
- if (NewTime.tv_sec - Time.tv_sec == 6 && NewTime.tv_usec > Time.tv_usec ||
+ if ((NewTime.tv_sec - Time.tv_sec == 6 && NewTime.tv_usec > Time.tv_usec) ||
NewTime.tv_sec - Time.tv_sec > 6)
{
double Delta = NewTime.tv_sec - Time.tv_sec +
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 d8b4dc6d2..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");
}
}
@@ -1001,7 +1001,7 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
if(Pkg.Section() && ConfigValueInSubTree("APT::Never-MarkAuto-Sections", Pkg.Section()))
{
if(_config->FindB("Debug::pkgDepCache::AutoInstall",false) == true)
- std::clog << "Setting NOT as auto-installed (direct dep of pkg in APT::Never-MarkAuto-Section)" << std::endl;
+ std::clog << "Setting NOT as auto-installed (direct dep of pkg in APT::Never-MarkAuto-Sections)" << std::endl;
MarkInstall(InstPkg,true,Depth + 1, true);
}
else
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;
}
diff --git a/apt-pkg/versionmatch.cc b/apt-pkg/versionmatch.cc
index 4a426809c..5c25c2f7b 100644
--- a/apt-pkg/versionmatch.cc
+++ b/apt-pkg/versionmatch.cc
@@ -124,7 +124,7 @@ bool pkgVersionMatch::MatchVer(const char *A,string B,bool Prefix)
const char *Ae = Ab + strlen(A);
// Strings are not a compatible size.
- if ((unsigned)(Ae - Ab) != B.length() && Prefix == false ||
+ if (((unsigned)(Ae - Ab) != B.length() && Prefix == false) ||
(unsigned)(Ae - Ab) < B.length())
return false;
diff --git a/buildlib/apti18n.h.in b/buildlib/apti18n.h.in
index a5b91b1ee..e7beceb09 100644
--- a/buildlib/apti18n.h.in
+++ b/buildlib/apti18n.h.in
@@ -18,6 +18,8 @@
#else
// apt will not use any gettext
# define setlocale(a, b)
+# define textdomain(a)
+# define bindtextdomain(a, b)
# define _(x) x
# define N_(x) x
#endif
diff --git a/buildlib/inttypes.h.in b/buildlib/inttypes.h.in
index 3be720794..3b43b7672 100644
--- a/buildlib/inttypes.h.in
+++ b/buildlib/inttypes.h.in
@@ -4,6 +4,13 @@
#include <config.h>
+#undef int32_t
+#undef uint32_t
+#undef int16_t
+#undef uint16_t
+#undef int8_t
+#undef uint8_t
+
/* Generate the fixed bit size types */
#if SIZEOF_INT == 4
typedef int int32_t;
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index f10ea48be..5513fcc90 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -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;
diff --git a/cmdline/makefile b/cmdline/makefile
index 5820c2e0f..3260e375b 100644
--- a/cmdline/makefile
+++ b/cmdline/makefile
@@ -7,42 +7,42 @@ include ../buildlib/defaults.mak
# The apt-cache program
PROGRAM=apt-cache
-SLIBS = -lapt-pkg
+SLIBS = -lapt-pkg $(INTLLIBS)
LIB_MAKES = apt-pkg/makefile
SOURCE = apt-cache.cc
include $(PROGRAM_H)
# The apt-get program
PROGRAM=apt-get
-SLIBS = -lapt-pkg -lutil
+SLIBS = -lapt-pkg -lutil $(INTLLIBS)
LIB_MAKES = apt-pkg/makefile
SOURCE = apt-get.cc acqprogress.cc
include $(PROGRAM_H)
# The apt-config program
PROGRAM=apt-config
-SLIBS = -lapt-pkg
+SLIBS = -lapt-pkg $(INTLLIBS)
LIB_MAKES = apt-pkg/makefile
SOURCE = apt-config.cc
include $(PROGRAM_H)
# The apt-cdrom program
PROGRAM=apt-cdrom
-SLIBS = -lapt-pkg
+SLIBS = -lapt-pkg $(INTLLIBS)
LIB_MAKES = apt-pkg/makefile
SOURCE = apt-cdrom.cc
include $(PROGRAM_H)
# The apt-sortpkgs program
PROGRAM=apt-sortpkgs
-SLIBS = -lapt-pkg
+SLIBS = -lapt-pkg $(INTLLIBS)
LIB_MAKES = apt-pkg/makefile
SOURCE = apt-sortpkgs.cc
include $(PROGRAM_H)
# The apt-extracttemplates program
PROGRAM=apt-extracttemplates
-SLIBS = -lapt-pkg -lapt-inst
+SLIBS = -lapt-pkg -lapt-inst $(INTLLIBS)
LIB_MAKES = apt-pkg/makefile
SOURCE = apt-extracttemplates.cc
include $(PROGRAM_H)
diff --git a/configure.in b/configure.in
index a65c33e66..809bafca7 100644
--- a/configure.in
+++ b/configure.in
@@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib)
AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
dnl -- SET THIS TO THE RELEASE VERSION --
-AC_DEFINE_UNQUOTED(VERSION,"0.7.16")
+AC_DEFINE_UNQUOTED(VERSION,"0.7.17~exp2")
PACKAGE="apt"
AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
AC_SUBST(PACKAGE)
diff --git a/debian/changelog b/debian/changelog
index 40e1cc23d..566ed4324 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,12 @@
-apt (0.7.17) unstable; urgency=low
+apt (0.7.17~exp3) experimental; urgency=low
+
+ * apt-pkg/acquire-item.cc:
+ - fix a merge modification (done by me) that prevents the
+ fallback to the uncompressed 'Packages' to work correctly
+
+ -- 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:
@@ -7,8 +15,34 @@ apt (0.7.17) unstable; urgency=low
* 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
- -- Eugene V. Lyubimkin <jackyf.devel@gmail.com> Fri, 24 Oct 2008 23:45:17 +0300
+ [ Luca Bruno ]
+ * Fix typos:
+ - apt-pkg/depcache.cc
+ * Fix compilation warnings:
+ - apt-pkg/acquire.cc
+ - apt-pkg/versionmatch.cc
+ * Compilation fixes and portability improvement for compiling APT against non-GNU libc
+ (thanks to Martin Koeppe, closes: #392063):
+ - buildlib/apti18n.h.in:
+ + textdomain() and bindtextdomain() must not be visible when --disable-nls
+ - buildlib/inttypes.h.in: undefine standard int*_t types
+ - Append INTLLIBS to SLIBS:
+ + cmdline/makefile
+ + ftparchive/makefile
+ + methods/makefile
+ * doc/apt.conf.5.xml:
+ - clarify whether configuration items of apt.conf are case-sensitive
+ (thanks to Vincent McIntyre, closes: #345901)
+
+ -- Luca Bruno <lethalman88@gmail.com> Sat, 11 Oct 2008 09:17:46 +0200
apt (0.7.16) unstable; urgency=low
diff --git a/doc/apt.conf.5.xml b/doc/apt.conf.5.xml
index 64724f211..db8dfa7ce 100644
--- a/doc/apt.conf.5.xml
+++ b/doc/apt.conf.5.xml
@@ -75,6 +75,9 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";};
<filename>&docdir;examples/apt.conf</filename> &configureindex;
is a good guide for how it should look.</para>
+ <para>The names of the configuration items are not case-sensitive. So in the previous example
+ you could use <literal>dpkg::pre-install-pkgs</literal>.</para>
+
<para>Two specials are allowed, <literal>#include</literal> and <literal>#clear</literal>
<literal>#include</literal> will include the given file, unless the filename
ends in a slash, then the whole directory is included.
diff --git a/ftparchive/makefile b/ftparchive/makefile
index a965166a0..504ebf893 100644
--- a/ftparchive/makefile
+++ b/ftparchive/makefile
@@ -8,7 +8,7 @@ include ../buildlib/defaults.mak
# The apt-ftparchive program
ifdef BDBLIB
PROGRAM=apt-ftparchive
-SLIBS = -lapt-pkg -lapt-inst $(BDBLIB)
+SLIBS = -lapt-pkg -lapt-inst $(BDBLIB) $(INTLLIBS)
LIB_MAKES = apt-pkg/makefile apt-inst/makefile
SOURCE = apt-ftparchive.cc cachedb.cc writer.cc contents.cc override.cc \
multicompress.cc
diff --git a/methods/http.cc b/methods/http.cc
index 26d435dea..b3c791fa0 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -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
diff --git a/methods/https.cc b/methods/https.cc
index e53ba1a11..98dfeefa1 100644
--- a/methods/https.cc
+++ b/methods/https.cc
@@ -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;
}
diff --git a/methods/makefile b/methods/makefile
index 5794c84e7..d9481dbcc 100644
--- a/methods/makefile
+++ b/methods/makefile
@@ -12,70 +12,70 @@ APT_DOMAIN := libapt-pkg$(LIB_APT_PKG_MAJOR)
# The file method
PROGRAM=file
-SLIBS = -lapt-pkg
+SLIBS = -lapt-pkg $(INTLLIBS)
LIB_MAKES = apt-pkg/makefile
SOURCE = file.cc
include $(PROGRAM_H)
# The copy method
PROGRAM=copy
-SLIBS = -lapt-pkg
+SLIBS = -lapt-pkg $(INTLLIBS)
LIB_MAKES = apt-pkg/makefile
SOURCE = copy.cc
include $(PROGRAM_H)
# The gzip method
PROGRAM=gzip
-SLIBS = -lapt-pkg
+SLIBS = -lapt-pkg $(INTLLIBS)
LIB_MAKES = apt-pkg/makefile
SOURCE = gzip.cc
include $(PROGRAM_H)
# The gpgv method
PROGRAM=gpgv
-SLIBS = -lapt-pkg
+SLIBS = -lapt-pkg $(INTLLIBS)
LIB_MAKES = apt-pkg/makefile
SOURCE = gpgv.cc
include $(PROGRAM_H)
# The cdrom method
PROGRAM=cdrom
-SLIBS = -lapt-pkg
+SLIBS = -lapt-pkg $(INTLLIBS)
LIB_MAKES = apt-pkg/makefile
SOURCE = cdrom.cc
include $(PROGRAM_H)
# The http method
PROGRAM=http
-SLIBS = -lapt-pkg $(SOCKETLIBS)
+SLIBS = -lapt-pkg $(SOCKETLIBS) $(INTLLIBS)
LIB_MAKES = apt-pkg/makefile
SOURCE = http.cc rfc2553emu.cc connect.cc
include $(PROGRAM_H)
# The https method
PROGRAM=https
-SLIBS = -lapt-pkg -lcurl
+SLIBS = -lapt-pkg -lcurl $(INTLLIBS)
LIB_MAKES = apt-pkg/makefile
SOURCE = https.cc
include $(PROGRAM_H)
# The ftp method
PROGRAM=ftp
-SLIBS = -lapt-pkg $(SOCKETLIBS)
+SLIBS = -lapt-pkg $(SOCKETLIBS) $(INTLLIBS)
LIB_MAKES = apt-pkg/makefile
SOURCE = ftp.cc rfc2553emu.cc connect.cc
include $(PROGRAM_H)
# The rred method
PROGRAM=rred
-SLIBS = -lapt-pkg $(SOCKETLIBS)
+SLIBS = -lapt-pkg $(SOCKETLIBS) $(INTLLIBS)
LIB_MAKES = apt-pkg/makefile
SOURCE = rred.cc
include $(PROGRAM_H)
# The rsh method
PROGRAM=rsh
-SLIBS = -lapt-pkg
+SLIBS = -lapt-pkg $(INTLLIBS)
LIB_MAKES = apt-pkg/makefile
SOURCE = rsh.cc
include $(PROGRAM_H)
diff --git a/po/apt-all.pot b/po/apt-all.pot
index 922b9af1e..19e57536a 100644
--- a/po/apt-all.pot
+++ b/po/apt-all.pot
@@ -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 ""