Control: found 2.7.6

Control: tags -1 patch


Patch available https://salsa.debian.org/apt-team/apt/-/merge_requests/308


Tianyu Chen @ deepin
From 74f31de1d980c28ba7ba509fc683ccca92db55b4 Mon Sep 17 00:00:00 2001
From: Tianyu Chen <sweetyf...@deepin.org>
Date: Fri, 13 Oct 2023 23:16:25 +0800
Subject: [PATCH] apt-pkg/cacheset.cc: set ShowErrors to true when no version
 matched

Enforce helper.canNotGetVersion to show error if no version matched.

Regression-of: 572810e9f321237873d1536c88991d7825c6f1db
Closes: #1053887
---
 apt-pkg/cacheset.cc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/apt-pkg/cacheset.cc b/apt-pkg/cacheset.cc
index e52f76272..ee0dcee28 100644
--- a/apt-pkg/cacheset.cc
+++ b/apt-pkg/cacheset.cc
@@ -491,10 +491,13 @@ bool VersionContainerInterface::FromString(VersionContainerInterface * const vci
 			V = Match.Find(P);
 			helper.setLastVersionMatcher(ver);
 			if (V.end()) {
+				bool errors = true;
+				errors = helper.showErrors(true);
 				if (verIsRel == true)
 					V = helper.canNotGetVersion(CacheSetHelper::RELEASE, Cache, P);
 				else
 					V = helper.canNotGetVersion(CacheSetHelper::VERSIONNUMBER, Cache, P);
+				helper.showErrors(errors);
 			}
 		}
 		if (V.end() == true)
-- 
2.33.1

Reply via email to