From 0c5bc15b2d8158f4eeec5db6718246e6924243ec Mon Sep 17 00:00:00 2001 From: Jaywalker Date: Tue, 6 Feb 2018 23:51:41 -0600 Subject: Added required patches --- apt-pkg/contrib/fileutl.cc | 1 + apt-pkg/contrib/srvrec.cc | 1 + apt-pkg/contrib/string_view.h | 1 + apt-pkg/deb/dpkgpm.cc | 4 ++-- apt-pkg/tagfile.cc | 8 ++++++++ apt-pkg/tagfile.h | 3 ++- ftparchive/byhash.cc | 4 ++++ ftparchive/cachedb.cc | 1 + 8 files changed, 20 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 #include #include +#include #include #include 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 #include #include +#include #include #include 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 +#include #include #include 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 diff --git a/ftparchive/byhash.cc b/ftparchive/byhash.cc index b24f6158e..5af0ef163 100644 --- a/ftparchive/byhash.cc +++ b/ftparchive/byhash.cc @@ -18,6 +18,10 @@ #include #include "byhash.h" +#ifdef __APPLE__ +#define st_mtim st_mtimespec +#endif + #include #include diff --git a/ftparchive/cachedb.cc b/ftparchive/cachedb.cc index 1890c28d0..8496f44c1 100644 --- a/ftparchive/cachedb.cc +++ b/ftparchive/cachedb.cc @@ -21,6 +21,7 @@ #include #include #include +#include #include #include // htonl, etc -- cgit v1.2.3