0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-01-06 02:26:34 +00:00
termux-packages/packages/aptitude/0002-apt_2.1.19_compatibility.patch
Chongyun Lee a734bf2478 new package: aptitude
Co-Authored-By: kawanakaiku <80381779+kawanakaiku@users.noreply.github.com>
2024-01-08 06:55:43 +08:00

20 lines
665 B
Diff

Description: Fix FTBFS regression from StrToNum fixes in APT 2.1.19
Author: David Kalnischkies <david@kalnischkies.de>
Author: Axel Beckert <abe@debian.org>
Bug-Debian: https://bugs.debian.org/982716
--- a/src/generic/apt/aptitude_resolver.cc
+++ b/src/generic/apt/aptitude_resolver.cc
@@ -673,7 +673,10 @@
else
{
unsigned long score_tweak = 0;
- if(!StrToNum(action.c_str(), score_tweak, action.size()))
+ char * endptr;
+ errno = 0;
+ score_tweak = strtol(action.c_str(), &endptr, 10);
+ if (errno != 0 || *endptr != '\0')
{
// TRANSLATORS: actions ("approve", etc.) are keywords and should
// not be translated