[Aptitude-devel] Bug#982716: Bug#982716: aptitude: FTBFS: tests failed

Axel Beckert abe at debian.org
Sun Feb 14 05:54:44 GMT 2021


Hi David,

Axel Beckert wrote:
> > So I guess what is intended here is more like:
> > | char * endptr;
> > | errno = 0;
> > | auto score_tweaks = strtol(action.c_str(), &endptr, 10);
> > | if (errno != 0 || *endptr != '\0')
> 
> I applied the following patch locally:
> 
> --- 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;
> +      auto score_tweaks = strtol(action.c_str(), &endptr, 10);
> +      if (errno != 0 || *endptr != '\0')
>  	{
>  	  // TRANSLATORS: actions ("approve", etc.) are keywords and should
>  	  // not be translated
> 
> The initially failing test indeed seems fixed, but now another test
> fails:

Thanks for the hint on being untested and written without copy &
paste. There was indeed a typo in there which was not detected by the
compiler: score_tweak vs score_tweaks (singular vs plural in variable
name). Fixing that and removing the leading "auto" variable
declaration seems the proper fix.

Thanks for the help nevertheless!

Will upload the fix soon.

		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <abe at debian.org>, https://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-    |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE



More information about the Aptitude-devel mailing list