summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2023-07-12 15:07:49 +0000
committerJulian Andres Klode <jak@debian.org>2023-07-12 15:07:49 +0000
commit67192e897a42b555f2e3f527eda8240f94b9e6f5 (patch)
treefa2d8af7c69f7460bed3e6cde8ea5b791e734662 /apt-pkg
parentf26a15a3f9b020dcd5c5203bd73133c8d647c99c (diff)
parent5dcb36e7af4bd65211ac4937e5e7feac8c85683c (diff)
Merge branch 'pu/snapshot-fixes' into 'main'
Fix snapshot crashes See merge request apt-team/apt!301
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/deb/debmetaindex.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc
index 744a5cab7..3fef976e9 100644
--- a/apt-pkg/deb/debmetaindex.cc
+++ b/apt-pkg/deb/debmetaindex.cc
@@ -1158,6 +1158,8 @@ class APT_HIDDEN debSLTypeDebian : public pkgSourceList::Type /*{{{*/
std::transform(Options.begin(), Options.end(), std::back_inserter(ret),
[](auto &&O) { return O.first; });
std::sort(ret.begin(), ret.end());
+ auto r = std::remove(ret.begin(), ret.end(), "SHADOWED");
+ ret.erase(r, ret.end());
return ret;
}
@@ -1315,7 +1317,7 @@ class APT_HIDDEN debSLTypeDebian : public pkgSourceList::Type /*{{{*/
std::string filename;
// The Release file and config based on that should be the ultimate source of truth.
- if (ReleaseFileName(Deb, filename))
+ if (Deb && ReleaseFileName(Deb, filename))
{
auto OldDeb = dynamic_cast<debReleaseIndex *>(Deb->UnloadedClone());
if (not OldDeb->Load(filename, nullptr))