From 2ec1674d7d0c0cd77fb385d16bf8db98968e3e84 Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Sat, 11 Oct 2008 09:22:43 +0200 Subject: Fix compilation warning in apt-pkg/acquire.cc. New experimental release --- apt-pkg/acquire.cc | 2 +- debian/changelog | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 6840ae120..80c2fee0f 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -796,7 +796,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/debian/changelog b/debian/changelog index 0bb4fcdde..9f73c25cc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +apt (0.7.17~exp1) UNRELEASED; urgency=low + + [ Luca Bruno ] + * apt-pkg/acquire.cc: + - fix a compilation warning + + -- Luca Bruno Sat, 11 Oct 2008 09:17:46 +0200 + apt (0.7.16) unstable; urgency=low [ Luca Bruno ] -- cgit v1.2.3 From d320fdc3539f686e690a4ae0cb3f941b0e1a0456 Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Sat, 11 Oct 2008 09:42:17 +0200 Subject: Fix another compilation warning in apt-pkg/versionmatch.cc --- apt-pkg/versionmatch.cc | 2 +- debian/changelog | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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/debian/changelog b/debian/changelog index 9f73c25cc..b88df66a9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ apt (0.7.17~exp1) UNRELEASED; urgency=low [ Luca Bruno ] - * apt-pkg/acquire.cc: - - fix a compilation warning + * Fix compilation warnings: + - apt-pkg/acquire.cc + - apt-pkg/versionmatch.cc -- Luca Bruno Sat, 11 Oct 2008 09:17:46 +0200 -- cgit v1.2.3 From 8cd53bd4fe839c3135696ecbdca45909130a2dd9 Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Sat, 11 Oct 2008 10:00:50 +0200 Subject: * Compilation fixes and portability improvement for compiling APT against non-GNU libc --- buildlib/apti18n.h.in | 2 ++ buildlib/inttypes.h.in | 7 +++++++ cmdline/makefile | 12 ++++++------ debian/changelog | 9 +++++++++ ftparchive/makefile | 2 +- methods/makefile | 20 ++++++++++---------- 6 files changed, 35 insertions(+), 17 deletions(-) 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 +#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/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/debian/changelog b/debian/changelog index b88df66a9..72b743a48 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,15 @@ apt (0.7.17~exp1) UNRELEASED; urgency=low * 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 -- Luca Bruno Sat, 11 Oct 2008 09:17:46 +0200 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/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) -- cgit v1.2.3 From fb3b7ef0a6c7b599d5d17f4cf7d98b182ec26e06 Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Sat, 11 Oct 2008 10:31:18 +0200 Subject: Clarify whether configuration items of apt.conf are case-sensitive --- debian/changelog | 3 +++ doc/apt.conf.5.xml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 72b743a48..e0fd3be8c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,9 @@ apt (0.7.17~exp1) UNRELEASED; urgency=low + 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 Sat, 11 Oct 2008 09:17:46 +0200 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";}; &docdir;examples/apt.conf &configureindex; is a good guide for how it should look. + The names of the configuration items are not case-sensitive. So in the previous example + you could use dpkg::pre-install-pkgs. + Two specials are allowed, #include and #clear #include will include the given file, unless the filename ends in a slash, then the whole directory is included. -- cgit v1.2.3 From f8b1274722522826650a37f87bf9e743b5bca337 Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Sat, 11 Oct 2008 10:48:59 +0200 Subject: Fix typo in apt-pkg/depcache.cc --- apt-pkg/depcache.cc | 2 +- debian/changelog | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index d8b4dc6d2..859e64ea1 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -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/debian/changelog b/debian/changelog index e0fd3be8c..afce50000 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ apt (0.7.17~exp1) UNRELEASED; urgency=low [ Luca Bruno ] + * Fix typos: + - apt-pkg/depcache.cc * Fix compilation warnings: - apt-pkg/acquire.cc - apt-pkg/versionmatch.cc -- cgit v1.2.3