[Aptitude-devel] Bug #498239: aptitude: warnings, status printed twice

Boris Egorov jightuse at gmail.com
Thu Feb 27 19:48:22 UTC 2014

On 02/28/2014 01:26 AM, Boris Egorov wrote:
> Hello folks.
> I found a problem which triggers bug #498239. You can see it in 
> src/cmdline/cmdline_do_action.cc:307 or at this long path: 
> https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=aptitude/aptitude.git;a=blob;f=src/cmdline/cmdline_do_action.cc;h=8d0883797daee17666eb63f253e65bd841409c74;hb=0a2795f113e2588fc4c6b4091cf32ccff49e4974#l307
> We do a two runs over all the packages if we have auto-install turned 
> on (see comment). So we call function cmdline_applyaction from 
> src/cmdline/cmdline_action.cc:221 twice (if we have one action as in 
> bug inputs). This function at line 375 and overloaded one at line 582 
> triggers the bug.
> How it should be fixed? All overloaded functions cmdline_applyaction 
> has argument allow_auto which set to true if current iteration is not 
> first. I think we can not to print warnings if allow_auto is true. 
> What do you think?
> Sorry if I'm doing something wrong, I haven't contributed to debian 
> before. I found the bug thanks to how-can-i-help and want to fix it.
Double printing can appear in many cases, for example this command 
triggers it too:
# aptitude markauto 'lib'
This one can generate lots of duplicated output:
# aptitude markauto 'liblap'

Attached patch can solve parts of the problem mentioned above and in the 
bug report. Should we change all the conditions when warnings printed? 
Does it break something?

Best regards,
Boris Egorov

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 2996 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/aptitude-devel/attachments/20140228/f23d2c29/attachment.diff>

More information about the Aptitude-devel mailing list