Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Lachu:SystemServices
PackageKit
n-0099-aptcc-Fix-emission-of-package-IDs-if-the...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File n-0099-aptcc-Fix-emission-of-package-IDs-if-there-is-just-o.patch of Package PackageKit
From f1b905cf2d0c6ebbad2c7ed12e24b19268fbef63 Mon Sep 17 00:00:00 2001 From: Matthias Klumpp <matthias@tenstral.net> Date: Tue, 22 Feb 2022 23:35:02 +0100 Subject: [PATCH 099/102] aptcc: Fix emission of package IDs if there is just one candidate available The previous loop was not emitting the resolved package ID if the candidate list was already at its end, even if there was a package available. The new loop will emit a package in all (sensible) cases. Resolves: #534 diff --git a/backends/aptcc/apt-cache-file.cpp b/backends/aptcc/apt-cache-file.cpp index c5bbc07c5..03ea03113 100644 --- a/backends/aptcc/apt-cache-file.cpp +++ b/backends/aptcc/apt-cache-file.cpp @@ -380,13 +380,16 @@ PkgInfo AptCacheFile::resolvePkgID(const gchar *packageId) strcmp(ver.VerStr(), parts[PK_PACKAGE_ID_VERSION]) == 0) return PkgInfo(ver, piAction); - const pkgCache::VerIterator &candidateVer = findCandidateVer(pkg); // check to see if the provided package isn't virtual too // also iterate through all the available versions - for (auto candidate = candidateVer; !candidate.end(); candidate++) { - if (strcmp(candidate.VerStr(), parts[PK_PACKAGE_ID_VERSION]) == 0) { - return PkgInfo(ver, piAction); - } + auto candidateVer = findCandidateVer(pkg); + while (true) { + if (strcmp(candidateVer.VerStr(), parts[PK_PACKAGE_ID_VERSION]) == 0) + return PkgInfo(candidateVer, piAction); + + if (candidateVer.end()) + break; + candidateVer++; } return PkgInfo(ver, piAction); -- 2.35.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor