0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-05-10 13:55:33 +00:00
Files
termux-packages/disabled-packages/aptitude/0002-apt_2.1.19_compatibility.patch
Ted Stein 47f0921d9e rmpkg(main/aptitude): Remove redundant/broken apt alternative
`aptitude`'s unique functionality is a TUI alternative to `apt`. It
hardcodes the belief that you must be root to change packages, and
attempting to make any changes prompts you to become root, which
obviously won't work for most users. I didn't try, but if it did work,
it would obviously do something bad.

Its `apt`-alike non-interactive use (`aptitude install`, etc) appears to
work fine without root, but looks to be basically identical to `apt`
proper.
2025-04-01 18:24:15 +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