From d34e1ce051ce15d6a550ec84865e38cb784454abd6eb8edfa6142c522dacea74 Mon Sep 17 00:00:00 2001 From: Christophe Giboudeaux Date: Wed, 12 Jan 2022 09:43:19 +0000 Subject: [PATCH 1/3] Add regression fix OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/frameworkintegration?expand=0&rev=268 --- ...g-of-KNSCore-Engine-configSearchLoca.patch | 46 +++++++++++++++++++ frameworkintegration.changes | 2 + frameworkintegration.spec | 2 + 3 files changed, 50 insertions(+) create mode 100644 0001-Fix-wrong-porting-of-KNSCore-Engine-configSearchLoca.patch diff --git a/0001-Fix-wrong-porting-of-KNSCore-Engine-configSearchLoca.patch b/0001-Fix-wrong-porting-of-KNSCore-Engine-configSearchLoca.patch new file mode 100644 index 0000000..11432ac --- /dev/null +++ b/0001-Fix-wrong-porting-of-KNSCore-Engine-configSearchLoca.patch @@ -0,0 +1,46 @@ +From 675802e706a737c008aa74600ac804b06db52140 Mon Sep 17 00:00:00 2001 +From: Alexander Lohnau +Date: Tue, 11 Jan 2022 06:42:03 +0100 +Subject: [PATCH] Fix wrong porting of KNSCore::Engine::configSearchLocations + +The `KNSCore::Engine::availableConfigFiles` method returns the file names, but +the code still assumed that the directories where the file is contained is returned. +Consequently the knsrc files would never be found. + +BUG: 448237 +--- + src/kpackage-install-handlers/kns/main.cpp | 15 +++++++-------- + 1 file changed, 7 insertions(+), 8 deletions(-) + +diff --git a/src/kpackage-install-handlers/kns/main.cpp b/src/kpackage-install-handlers/kns/main.cpp +index 9978844..a2b530e 100644 +--- a/src/kpackage-install-handlers/kns/main.cpp ++++ b/src/kpackage-install-handlers/kns/main.cpp +@@ -70,17 +70,16 @@ int main(int argc, char **argv) + Q_ASSERT(url.scheme() == QLatin1String("kns")); + + QString knsname; +- for (const auto &location : KNSCore::Engine::availableConfigFiles()) { +- QString candidate = location + QLatin1Char('/') + url.host(); +- if (QFile::exists(candidate)) { +- knsname = candidate; +- break; +- } +- } ++ const QStringList availableConfigFiles = KNSCore::Engine::availableConfigFiles(); ++ auto knsNameIt = std::find_if(availableConfigFiles.begin(), availableConfigFiles.end(), [&url](const QString &availableFile) { ++ return availableFile.endsWith(QLatin1String("/") + url.host()); ++ }); + +- if (knsname.isEmpty()) { ++ if (knsNameIt == availableConfigFiles.end()) { + qWarning() << "couldn't find knsrc file for" << url.host(); + return 1; ++ } else { ++ knsname = *knsNameIt; + } + + const auto pathParts = url.path().split(QLatin1Char('/'), Qt::SkipEmptyParts); +-- +2.34.1 + diff --git a/frameworkintegration.changes b/frameworkintegration.changes index 99fb6e2..0067a57 100644 --- a/frameworkintegration.changes +++ b/frameworkintegration.changes @@ -8,6 +8,8 @@ Mon Jan 3 12:47:11 UTC 2022 - Christophe Giboudeaux - Changes since 5.89.0: * Fix clazy warning * Make it compiles against kf5.89 +- Add upstream change to fix a regression in 5.90.0 + * 0001-Fix-wrong-porting-of-KNSCore-Engine-configSearchLoca.patch ------------------------------------------------------------------- Sat Dec 4 22:56:16 UTC 2021 - Christophe Giboudeaux diff --git a/frameworkintegration.spec b/frameworkintegration.spec index 7cfffb2..173fb7f 100644 --- a/frameworkintegration.spec +++ b/frameworkintegration.spec @@ -36,6 +36,8 @@ Source: %{name}-%{version}.tar.xz Source1: %{name}-%{version}.tar.xz.sig Source2: frameworks.keyring %endif +# PATCH-FIX-UPSTREAM +Patch0: 0001-Fix-wrong-porting-of-KNSCore-Engine-configSearchLoca.patch BuildRequires: extra-cmake-modules >= %{_kf5_bugfix_version} BuildRequires: fdupes BuildRequires: kf5-filesystem From 19465f44e31c1c72b3109de28f9a4c52a4b4202a3576d3e6102228f0530bf371 Mon Sep 17 00:00:00 2001 From: Christophe Giboudeaux Date: Wed, 12 Jan 2022 09:47:05 +0000 Subject: [PATCH 2/3] OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/frameworkintegration?expand=0&rev=269 --- frameworkintegration.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frameworkintegration.changes b/frameworkintegration.changes index 0067a57..765495b 100644 --- a/frameworkintegration.changes +++ b/frameworkintegration.changes @@ -8,7 +8,7 @@ Mon Jan 3 12:47:11 UTC 2022 - Christophe Giboudeaux - Changes since 5.89.0: * Fix clazy warning * Make it compiles against kf5.89 -- Add upstream change to fix a regression in 5.90.0 +- Add upstream change to fix a regression in 5.90.0 (kde#448237) * 0001-Fix-wrong-porting-of-KNSCore-Engine-configSearchLoca.patch ------------------------------------------------------------------- From 67ca08254722da453a1838e1b54f9494914bf25940d7f66360ec2b890a1768af Mon Sep 17 00:00:00 2001 From: Christophe Giboudeaux Date: Wed, 12 Jan 2022 14:17:50 +0000 Subject: [PATCH 3/3] OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/frameworkintegration?expand=0&rev=270 --- frameworkintegration.changes | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frameworkintegration.changes b/frameworkintegration.changes index 765495b..d766480 100644 --- a/frameworkintegration.changes +++ b/frameworkintegration.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jan 12 14:17:20 UTC 2022 - Christophe Giboudeaux + +- Add upstream change to fix a regression in 5.90.0 (kde#448237) + * 0001-Fix-wrong-porting-of-KNSCore-Engine-configSearchLoca.patch + ------------------------------------------------------------------- Mon Jan 3 12:47:11 UTC 2022 - Christophe Giboudeaux @@ -8,8 +14,6 @@ Mon Jan 3 12:47:11 UTC 2022 - Christophe Giboudeaux - Changes since 5.89.0: * Fix clazy warning * Make it compiles against kf5.89 -- Add upstream change to fix a regression in 5.90.0 (kde#448237) - * 0001-Fix-wrong-porting-of-KNSCore-Engine-configSearchLoca.patch ------------------------------------------------------------------- Sat Dec 4 22:56:16 UTC 2021 - Christophe Giboudeaux