diff options
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/contrib/fileutl.cc | 1 | ||||
-rw-r--r-- | apt-pkg/contrib/srvrec.cc | 1 | ||||
-rw-r--r-- | apt-pkg/contrib/string_view.h | 1 | ||||
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 4 | ||||
-rw-r--r-- | apt-pkg/tagfile.cc | 8 | ||||
-rw-r--r-- | apt-pkg/tagfile.h | 3 |
6 files changed, 15 insertions, 3 deletions
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index f0a36613c..73e738959 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -27,6 +27,7 @@ #include <apt-pkg/pkgsystem.h> #include <apt-pkg/sptr.h> #include <apt-pkg/strutl.h> +#include <apt-pkg/endian.h> #include <cstdio> #include <cstdlib> diff --git a/apt-pkg/contrib/srvrec.cc b/apt-pkg/contrib/srvrec.cc index e190ec08d..c0fc5dd8f 100644 --- a/apt-pkg/contrib/srvrec.cc +++ b/apt-pkg/contrib/srvrec.cc @@ -13,6 +13,7 @@ #include <arpa/nameser.h> #include <arpa/inet.h> #include <netinet/in.h> +#include <apt-pkg/nameser_compat.h> #include <resolv.h> #include <time.h> diff --git a/apt-pkg/contrib/string_view.h b/apt-pkg/contrib/string_view.h index 1cca0c17c..aee49f1a7 100644 --- a/apt-pkg/contrib/string_view.h +++ b/apt-pkg/contrib/string_view.h @@ -12,6 +12,7 @@ #if !defined(APT_STRINGVIEW_H) && defined(APT_PKG_EXPOSE_STRING_VIEW) #define APT_STRINGVIEW_H #include <apt-pkg/macros.h> +#include <apt-pkg/missing.h> #include <string> #include <string.h> diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index ab9fbd87f..50af6c7b8 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -1731,7 +1731,7 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress) bool dpkgMultiArch = debSystem::SupportsMultiArch(); // start pty magic before the loop - StartPtyMagic(); + //StartPtyMagic(); or not... // Tell the progress that its starting and fork dpkg d->progress->Start(d->master); @@ -2152,7 +2152,7 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress) } } // dpkg is done at this point - StopPtyMagic(); + //StopPtyMagic(); CloseLog(); if (d->dpkg_error.empty() == false) diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc index 14f89f797..1c747fddc 100644 --- a/apt-pkg/tagfile.cc +++ b/apt-pkg/tagfile.cc @@ -336,6 +336,14 @@ void pkgTagSection::TrimRecord(bool BeforeRecord, const char*& End, bool Support } } /*}}}*/ +// TagSection::Trim - Trim off any trailing garbage /*{{{*/ +// --------------------------------------------------------------------- +/* There should be exactly 1 newline at the end of the buffer, no more. */ +void pkgTagSection::Trim() +{ + for (; Stop > Section + 2 && (Stop[-2] == '\n' || Stop[-2] == '\r'); Stop--); +} + // TagSection::Exists - return True if a tag exists /*{{{*/ bool pkgTagSection::Exists(StringView Tag) const { diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h index 73341389b..a96262e34 100644 --- a/apt-pkg/tagfile.h +++ b/apt-pkg/tagfile.h @@ -138,9 +138,10 @@ class pkgTagSection * @return \b true if section end was found, \b false otherwise. * Beware that internal state will be inconsistent if \b false is returned! */ - APT_MUSTCHECK bool Scan(const char *Start, unsigned long MaxLength, bool const SupportComments); + APT_MUSTCHECK bool Scan(const char *Start, unsigned long MaxLength, bool const SupportComments = true); inline unsigned long size() const {return Stop - Section;}; + void Trim(); void TrimRecord(bool BeforeRecord, const char* &End, bool SupportComments); /** \brief amount of Tags in the current section |