From fd70eebe454d74e6133caf1254d80a4efda2490a Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Tue, 29 Nov 2016 21:59:03 -0800 Subject: std::map from std::initializer_list is "explicit". --- apt-pkg/deb/debmetaindex.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/debmetaindex.h b/apt-pkg/deb/debmetaindex.h index f903617f7..879760934 100644 --- a/apt-pkg/deb/debmetaindex.h +++ b/apt-pkg/deb/debmetaindex.h @@ -34,8 +34,8 @@ class APT_HIDDEN debReleaseIndex : public metaIndex APT_HIDDEN std::string MetaIndexFile(const char *Types) const; APT_HIDDEN std::string MetaIndexURI(const char *Type) const; - debReleaseIndex(std::string const &URI, std::string const &Dist, std::map const &Options); - debReleaseIndex(std::string const &URI, std::string const &Dist, bool const Trusted, std::map const &Options); + debReleaseIndex(std::string const &URI, std::string const &Dist, std::map const &Options = std::map()); + debReleaseIndex(std::string const &URI, std::string const &Dist, bool const Trusted, std::map const &Options = std::map()); virtual ~debReleaseIndex(); virtual std::string ArchiveURI(std::string const &File) const APT_OVERRIDE {return URI + File;}; -- cgit v1.2.3 From 46ea89bf9aa2c814e803795cb29338d524389d4e Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Tue, 29 Nov 2016 22:03:35 -0800 Subject: unlinkat is way way too modern to not autoconf :/. --- apt-pkg/deb/dpkgpm.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 2e779ca8b..79c5f9bdf 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -1385,7 +1385,9 @@ static void cleanUpTmpDir(char * const tmpdir) /*{{{*/ if (unlikely(Ent->d_type != DT_LNK && Ent->d_type != DT_UNKNOWN)) continue; #endif - if (unlikely(unlinkat(dfd, Ent->d_name, 0) != 0)) + char path[strlen(tmpdir) + 1 + strlen(Ent->d_name) + 1]; + sprintf(path, "%s/%s", tmpdir, Ent->d_name); + if (unlikely(unlink(path) != 0)) break; } closedir(D); -- cgit v1.2.3 From a473295d01ed9c599926d9a8c212d4e1a404f78b Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Tue, 29 Nov 2016 22:40:20 -0800 Subject: Store tags in the cache (they are very useful :/). --- apt-pkg/deb/deblistparser.cc | 42 ++++++++++++++++++++++++++++++++++++++++++ apt-pkg/deb/deblistparser.h | 1 + 2 files changed, 43 insertions(+) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 0fc08d8fb..878170d00 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -244,6 +244,8 @@ bool debListParser::NewVersion(pkgCache::VerIterator &Ver) if (ParseProvides(Ver) == false) return false; + if (ParseTag(Ver) == false) + return false; return true; } @@ -950,6 +952,46 @@ bool debListParser::ParseProvides(pkgCache::VerIterator &Ver) return false; } } + return true; +} + /*}}}*/ +// ListParser::ParseTag - Parse the tag list /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool debListParser::ParseTag(pkgCache::VerIterator &Ver) +{ + const char *Start; + const char *Stop; + if (Section.Find("Tag",Start,Stop) == false) + return true; + + while (1) { + while (1) { + if (Start == Stop) + return true; + if (Stop[-1] != ' ' && Stop[-1] != '\t') + break; + --Stop; + } + + const char *Begin = Stop - 1; + while (Begin != Start && Begin[-1] != ' ' && Begin[-1] != ',') + --Begin; + + if (NewTag(Ver, Begin, Stop - Begin) == false) + return false; + + while (1) { + if (Begin == Start) + return true; + if (Begin[-1] == ',') + break; + --Begin; + } + + Stop = Begin - 1; + } + return true; } /*}}}*/ diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h index 3d5065953..840b48b8d 100644 --- a/apt-pkg/deb/deblistparser.h +++ b/apt-pkg/deb/deblistparser.h @@ -56,6 +56,7 @@ class APT_HIDDEN debListParser : public pkgCacheListParser bool ParseDepends(pkgCache::VerIterator &Ver, pkgTagSection::Key Key, unsigned int Type); bool ParseProvides(pkgCache::VerIterator &Ver); + bool ParseTag(pkgCache::VerIterator &Ver); #ifdef APT_PKG_EXPOSE_STRING_VIEW APT_HIDDEN static bool GrabWord(APT::StringView Word,const WordList *List,unsigned char &Out); -- cgit v1.2.3 From ef1e4dfd2853abb2e8900c26c1c17bf053863e85 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Tue, 29 Nov 2016 22:55:57 -0800 Subject: Most interfaces (Maemo) need a high-level name :/. --- apt-pkg/deb/deblistparser.cc | 9 +++++++++ apt-pkg/deb/debrecords.cc | 9 +++++++++ apt-pkg/deb/debrecords.h | 1 + 3 files changed, 19 insertions(+) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 878170d00..ec5787fb4 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -148,6 +148,15 @@ bool debListParser::NewVersion(pkgCache::VerIterator &Ver) const char *Start; const char *Stop; + if (Section.Find("Name",Start,Stop) == true) + { + Ver->Display = WriteString(Start, Stop - Start); + } + else if (Section.Find("Maemo-Display-Name",Start,Stop) == true) + { + Ver->Display = WriteString(Start, Stop - Start); + } + // Parse the section if (Section.Find(pkgTagSection::Key::Section,Start,Stop) == true) { diff --git a/apt-pkg/deb/debrecords.cc b/apt-pkg/deb/debrecords.cc index a132f34a6..6d642c7b8 100644 --- a/apt-pkg/deb/debrecords.cc +++ b/apt-pkg/deb/debrecords.cc @@ -74,6 +74,15 @@ string debRecordParserBase::Name() return Result; } /*}}}*/ +// RecordParserBase::Display - Return the package homepage /*{{{*/ +string debRecordParserBase::Display() +{ + string display(Section.FindS("Name")); + if (display.empty()) + display = Section.FindS("Maemo-Display-Name"); + return display; +} + /*}}}*/ // RecordParserBase::Homepage - Return the package homepage /*{{{*/ string debRecordParserBase::Homepage() { diff --git a/apt-pkg/deb/debrecords.h b/apt-pkg/deb/debrecords.h index 7fc82a88d..8f443c9a3 100644 --- a/apt-pkg/deb/debrecords.h +++ b/apt-pkg/deb/debrecords.h @@ -44,6 +44,7 @@ class APT_HIDDEN debRecordParserBase : public pkgRecords::Parser virtual std::string ShortDesc(std::string const &lang) APT_OVERRIDE; virtual std::string LongDesc(std::string const &lang) APT_OVERRIDE; virtual std::string Name() APT_OVERRIDE; + virtual std::string Display() APT_OVERRIDE; virtual std::string Homepage() APT_OVERRIDE; // An arbitrary custom field -- cgit v1.2.3 From 4e99adb0d3727c0ae41edc9b3f52448d0d5b7655 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Tue, 29 Nov 2016 23:58:01 -0800 Subject: Avoid wedging the entire system if recoverable :/. --- apt-pkg/deb/deblistparser.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index ec5787fb4..258344009 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -824,8 +824,10 @@ bool debListParser::ParseDepends(pkgCache::VerIterator &Ver, unsigned int Op; Start = ParseDepends(Start, Stop, Package, Version, Op, false, false, false); - if (Start == 0) - return _error->Error("Problem parsing dependency %zu",static_cast(Key)); // TODO + if (Start == 0) { + _error->Warning("Problem parsing dependency %zu",static_cast(Key)); // TODO + continue; + } size_t const found = Package.rfind(':'); if (found == string::npos) @@ -892,8 +894,10 @@ bool debListParser::ParseProvides(pkgCache::VerIterator &Ver) { Start = ParseDepends(Start,Stop,Package,Version,Op, false, false, false); const size_t archfound = Package.rfind(':'); - if (Start == 0) - return _error->Error("Problem parsing Provides line"); + if (Start == 0) { + _error->Warning("Problem parsing Provides line"); + continue; + } if (unlikely(Op != pkgCache::Dep::NoOp && Op != pkgCache::Dep::Equals)) { _error->Warning("Ignoring Provides line with non-equal DepCompareOp for package %s", Package.to_string().c_str()); } else if (archfound != string::npos) { -- cgit v1.2.3 From f3514c6d0f434e007266988edaed1c3d90c5676b Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Wed, 30 Nov 2016 00:39:04 -0800 Subject: The fastest way to get field values is as a range. --- apt-pkg/deb/debrecords.cc | 6 ++++++ apt-pkg/deb/debrecords.h | 1 + 2 files changed, 7 insertions(+) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/debrecords.cc b/apt-pkg/deb/debrecords.cc index 6d642c7b8..e7025d911 100644 --- a/apt-pkg/deb/debrecords.cc +++ b/apt-pkg/deb/debrecords.cc @@ -210,6 +210,12 @@ void debRecordParserBase::GetRec(const char *&Start,const char *&Stop) Section.GetSection(Start,Stop); } /*}}}*/ +// RecordParserBase::Find - Locate a tag /*{{{*/ +bool debRecordParserBase::Find(const char *Tag,const char *&Start, const char *&End) +{ + return Section.Find(Tag,Start,End); +} + /*}}}*/ debRecordParserBase::~debRecordParserBase() {} bool debDebFileRecordParser::LoadContent() diff --git a/apt-pkg/deb/debrecords.h b/apt-pkg/deb/debrecords.h index 8f443c9a3..b412dbaef 100644 --- a/apt-pkg/deb/debrecords.h +++ b/apt-pkg/deb/debrecords.h @@ -51,6 +51,7 @@ class APT_HIDDEN debRecordParserBase : public pkgRecords::Parser virtual std::string RecordField(const char *fieldName) APT_OVERRIDE; virtual void GetRec(const char *&Start,const char *&Stop) APT_OVERRIDE; + virtual bool Find(const char *Tag,const char *&Start, const char *&End) APT_OVERRIDE; debRecordParserBase(); virtual ~debRecordParserBase(); -- cgit v1.2.3 From dd47e21814291e965be6da73331f28dc695ce489 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Wed, 30 Nov 2016 01:07:59 -0800 Subject: I know this is "bad", but a "full wedge" is worse. --- apt-pkg/deb/dpkgpm.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 79c5f9bdf..bdef7b516 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -1759,6 +1759,7 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress) case Item::Remove: case Item::Purge: ADDARGC("--force-depends"); + ADDARGC("--force-remove-reinstreq"); if (std::any_of(I, J, ItemIsEssential)) ADDARGC("--force-remove-essential"); ADDARGC("--remove"); -- cgit v1.2.3 From 1e33fb4ac68db5c2630de72d222d9dc10eb93272 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Fri, 23 Dec 2016 01:29:49 -0800 Subject: Only check for valid Date if checking Valid-Until. --- apt-pkg/deb/debmetaindex.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index 8d84409a1..d5afab777 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -448,10 +448,7 @@ bool debReleaseIndex::Load(std::string const &Filename, std::string * const Erro std::string const StrDate = Section.FindS("Date"); if (RFC1123StrToTime(StrDate.c_str(), Date) == false) - { - _error->Warning( _("Invalid '%s' entry in Release file %s"), "Date", Filename.c_str()); Date = 0; - } bool CheckValidUntil = _config->FindB("Acquire::Check-Valid-Until", true); if (d->CheckValidUntil == metaIndex::TRI_NO) @@ -461,6 +458,9 @@ bool debReleaseIndex::Load(std::string const &Filename, std::string * const Erro if (CheckValidUntil == true) { + if (Date == 0) + _error->Warning( _("Invalid '%s' entry in Release file %s"), "Date", Filename.c_str()); + std::string const Label = Section.FindS("Label"); std::string const StrValidUntil = Section.FindS("Valid-Until"); -- cgit v1.2.3 From 3650e87b0cee98547024c2cb613c95f5e736971d Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sun, 25 Dec 2016 22:03:03 -0800 Subject: This is 2016 and APT already requires use of mmap. --- apt-pkg/deb/debmetaindex.cc | 4 ++-- apt-pkg/deb/debrecords.cc | 4 ++-- apt-pkg/deb/debsrcrecords.cc | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index d5afab777..dbe90e388 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -373,7 +373,7 @@ bool debReleaseIndex::Load(std::string const &Filename, std::string * const Erro if (OpenMaybeClearSignedFile(Filename, Fd) == false) return false; - pkgTagFile TagFile(&Fd, Fd.Size()); + pkgTagFile TagFile(&Fd); if (Fd.IsOpen() == false || Fd.Failed()) { if (ErrorText != NULL) @@ -801,7 +801,7 @@ bool debReleaseIndex::Merge(pkgCacheGenerator &Gen,OpProgress * /*Prog*/) const/ File->Size = Buf.st_size; File->mtime = Buf.st_mtime; - pkgTagFile TagFile(&Rel, Rel.Size()); + pkgTagFile TagFile(&Rel); pkgTagSection Section; if (Rel.IsOpen() == false || Rel.Failed() || TagFile.Step(Section) == false) return false; diff --git a/apt-pkg/deb/debrecords.cc b/apt-pkg/deb/debrecords.cc index e7025d911..04a2df4a5 100644 --- a/apt-pkg/deb/debrecords.cc +++ b/apt-pkg/deb/debrecords.cc @@ -35,7 +35,7 @@ using std::string; // RecordParser::debRecordParser - Constructor /*{{{*/ debRecordParser::debRecordParser(string FileName,pkgCache &Cache) : debRecordParserBase(), d(NULL), File(FileName, FileFd::ReadOnly, FileFd::Extension), - Tags(&File, std::max(Cache.Head().MaxVerFileSize, Cache.Head().MaxDescFileSize) + 200) + Tags(&File) { } /*}}}*/ @@ -232,7 +232,7 @@ bool debDebFileRecordParser::LoadContent() content << "\n\n"; controlContent = content.str(); - if (Section.Scan(controlContent.c_str(), controlContent.length()) == false) + if (Section.Scan(controlContent.c_str(), controlContent.length(), false) == false) return _error->Error(_("Unable to parse package file %s (%d)"), debFileName.c_str(), 3); return true; } diff --git a/apt-pkg/deb/debsrcrecords.cc b/apt-pkg/deb/debsrcrecords.cc index 5f0a75cd9..407b02d39 100644 --- a/apt-pkg/deb/debsrcrecords.cc +++ b/apt-pkg/deb/debsrcrecords.cc @@ -38,7 +38,7 @@ debSrcRecordParser::debSrcRecordParser(std::string const &File,pkgIndexFile cons if (File.empty() == false) { if (Fd.Open(File, FileFd::ReadOnly, FileFd::Extension)) - Tags.Init(&Fd, 102400); + Tags.Init(&Fd); } } std::string debSrcRecordParser::Package() const /*{{{*/ -- cgit v1.2.3 From 1242b3bdaf3d3682a945f10f0e537bdb3b0599d5 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 26 Dec 2016 03:36:30 -0800 Subject: Wreck validation until we can assess ecosystem :/. --- apt-pkg/deb/debmetaindex.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index dbe90e388..091b187a2 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -440,9 +440,9 @@ bool debReleaseIndex::Load(std::string const &Filename, std::string * const Erro bool AuthPossible = false; if(FoundHashSum == false) - _error->Warning(_("No Hash entry in Release file %s"), Filename.c_str()); + /*_error->Warning(_("No Hash entry in Release file %s"), Filename.c_str())*/; else if(FoundStrongHashSum == false) - _error->Warning(_("No Hash entry in Release file %s which is considered strong enough for security purposes"), Filename.c_str()); + /*_error->Warning(_("No Hash entry in Release file %s which is considered strong enough for security purposes"), Filename.c_str())*/; else AuthPossible = true; -- cgit v1.2.3 From 22c5f99a6119eeef30e1ddee3262bc942d055455 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Thu, 29 Dec 2016 21:22:25 -0800 Subject: In the C locale, let's avoid any crazy transforms. --- apt-pkg/deb/debrecords.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/debrecords.cc b/apt-pkg/deb/debrecords.cc index 04a2df4a5..696c55e6a 100644 --- a/apt-pkg/deb/debrecords.cc +++ b/apt-pkg/deb/debrecords.cc @@ -162,7 +162,7 @@ string debRecordParserBase::LongDesc(std::string const &lang) } char const * const codeset = nl_langinfo(CODESET); - if (strcmp(codeset,"UTF-8") != 0) { + if (strcmp(codeset,"US-ASCII") != 0 && strcmp(codeset,"UTF-8") != 0) { string dest; UTF8ToCodeset(codeset, orig, &dest); return dest; -- cgit v1.2.3 From cc51afda7080d6f3cc1cffe6f956d5376c4cb40e Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Fri, 30 Dec 2016 13:49:21 -0800 Subject: My "tolerance" patch was a tad bit overzealous :(. --- apt-pkg/deb/deblistparser.cc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 258344009..25d8e6f22 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -824,10 +824,8 @@ bool debListParser::ParseDepends(pkgCache::VerIterator &Ver, unsigned int Op; Start = ParseDepends(Start, Stop, Package, Version, Op, false, false, false); - if (Start == 0) { - _error->Warning("Problem parsing dependency %zu",static_cast(Key)); // TODO - continue; - } + if (Start == 0) + return _error->Warning("Problem parsing dependency %zu",static_cast(Key)); // TODO size_t const found = Package.rfind(':'); if (found == string::npos) @@ -894,10 +892,8 @@ bool debListParser::ParseProvides(pkgCache::VerIterator &Ver) { Start = ParseDepends(Start,Stop,Package,Version,Op, false, false, false); const size_t archfound = Package.rfind(':'); - if (Start == 0) { - _error->Warning("Problem parsing Provides line"); - continue; - } + if (Start == 0) + return _error->Warning("Problem parsing Provides line"); if (unlikely(Op != pkgCache::Dep::NoOp && Op != pkgCache::Dep::Equals)) { _error->Warning("Ignoring Provides line with non-equal DepCompareOp for package %s", Package.to_string().c_str()); } else if (archfound != string::npos) { -- cgit v1.2.3 From baec76f5f0f9fcbd71f6e2afaa7fc85543bd624c Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sun, 29 Jan 2017 15:01:00 -0800 Subject: The entire concept of PendingError() is flawed :/. --- apt-pkg/deb/debindexfile.cc | 3 +++ apt-pkg/deb/deblistparser.cc | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc index c55847305..6b162372d 100644 --- a/apt-pkg/deb/debindexfile.cc +++ b/apt-pkg/deb/debindexfile.cc @@ -134,6 +134,7 @@ pkgCacheListParser * debTranslationsIndex::CreateListParser(FileFd &Pkg) if (newError) { delete Parser; + _error->ReturnError(); return nullptr; } else @@ -168,6 +169,7 @@ pkgCacheListParser * debStatusIndex::CreateListParser(FileFd &Pkg) if (newError) { delete Parser; + _error->ReturnError(); return nullptr; } else @@ -250,6 +252,7 @@ pkgCacheListParser * debDebPkgFileIndex::CreateListParser(FileFd &Pkg) if (newError) { delete Parser; + _error->ReturnError(); return nullptr; } else diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 25d8e6f22..23048008b 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -76,7 +76,7 @@ string debListParser::Package() { std::transform(Result.begin(), Result.end(), Result.begin(), tolower_ascii); if(unlikely(Result.empty() == true)) - _error->Error("Encountered a section with no Package: header"); + _error->Warning("Encountered a section with no Package: header"); return Result; } /*}}}*/ -- cgit v1.2.3 From 2d71f8c24d490b5a3773821264124f0ed5c9a9d2 Mon Sep 17 00:00:00 2001 From: Jaywalker Date: Tue, 6 Feb 2018 23:51:41 -0600 Subject: Fixed system() using coolstar's patch and added other required patches --- apt-pkg/deb/deblistparser.cc | 1 + apt-pkg/deb/deblistparser.h | 2 ++ apt-pkg/deb/dpkgpm.cc | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 23048008b..17c283615 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -63,6 +63,7 @@ debListParser::debListParser(FileFd *File) : else forceEssential.emplace_back("apt"); forceImportant = _config->FindVector("pkgCacheGen::ForceImportant"); + Arch = _config->Find("APT::architecture"); } /*}}}*/ // ListParser::Package - Return the package name /*{{{*/ diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h index 840b48b8d..733ea0542 100644 --- a/apt-pkg/deb/deblistparser.h +++ b/apt-pkg/deb/deblistparser.h @@ -52,6 +52,8 @@ class APT_HIDDEN debListParser : public pkgCacheListParser pkgTagSection Section; map_filesize_t iOffset; + std::string Arch; + virtual bool ParseStatus(pkgCache::PkgIterator &Pkg,pkgCache::VerIterator &Ver); bool ParseDepends(pkgCache::VerIterator &Ver, pkgTagSection::Key Key, unsigned int Type); diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index bdef7b516..45ed66996 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -1698,7 +1698,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); @@ -2098,7 +2098,7 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress) } } // dpkg is done at this point - StopPtyMagic(); + //StopPtyMagic(); CloseLog(); if (d->dpkg_error.empty() == false) -- cgit v1.2.3