[Aptitude-devel] Bug#931543: Bug#915246: Bug#931536: aptitude update fails to cope with changed release info

David Kalnischkies david at kalnischkies.de
Tue Jul 9 17:20:26 BST 2019

On Sun, Jul 07, 2019 at 03:54:04PM +0200, Axel Beckert wrote:
> I hope that Manuel (CCc'ed) can provide a fix which we then can also
> apply to aptitude in Buster in the first minor update which is
> expected in about a month.

It was two years ago, so my memory was spotty, but now that I am looking
into extending the reporting let me add some implementation hints:
(Note that this is against apt/master which has some API changes, but in
that case that means ABI-compat classes where folded into another, so
backports should be rather trivial – adding virtual methods is ABI
breaking, so in buster the class to derive from has the creative name
pkgAcquireStatus2 as it is itself derived from pkgAcquireStatus)

libapt has a pkgAcquireStatus class which gained a new virtual method:
ReleaseInfoChanges – kinda similar to the existing MediaChange. aptitude
subclasses this a few times, just pick the right one I guess.

See apt{,-get}s implementation:

I guess you want to work directly with the parameter
std::vector<ReleaseInfoChange> &&Changes rather than do the trickery to
make "proper" apt error messages out of it and then print them directly
by wrap-calling the default implementation I did there – aka it is
probably simpler for you.

See the doc for the struct in the method in the header:

And the code generating the messages you can reuse via the struct:

If I could make a wish I would suggest featuring the messages which
don't need confirmation (in apt N: lines) not too prominently – as in
don't make them a popup dialog with an OK button (while the other type
is a popup dialog with yes and no buttons). 😉

I can't speak for aptitude folks and I am not too good with aptitude
code, but if I would be that might be a good bug for tagging +newcomer.
Happy to help in case there are {lib,}apt questions in any case – although
I have insane reply delays currently.

Best regards

David "breaking the world one feature at a time" Kalnischkies
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/aptitude-devel/attachments/20190709/8633b2c8/attachment-0004.sig>

More information about the Aptitude-devel mailing list