[02:03] <arraybolt3[m]> Whew! Finished the GUI hookups, and working on making the "repair interrupted installation" part allow a config file to be overwritten. I think this is almost ready for testing!
[03:22] <arraybolt3[m]> Well, shoot. I can't make even this fix perfect, though it's close. Sadly, while apt_client.upgrade_system() provides the config-file-conflict interface, apt_client.fix_incomplete_install() does not. Even though dpkg --configure -a provides a config file prompt. Unless they're using different terminology here (which is possible but seems to me unlikely), there's no way to make the worst case scenario here end up with the
[03:22] <arraybolt3[m]> proper config file in place. It does, however, allow the user to unbreak their system after a failed upgrade and force-reboot.
[03:25] <arraybolt3[m]> And I'm not seeing an "other config-file-conflict" anywhere in the help manual. So... I guess that means that's as far as we can get. Not ideal, but way, way better than what we had before, and about on par with the default behavior of Discover. (Actually this is a bit better than Discover since it seems that Discover just says "no, keep the original config file, don't overwrite" no matter what, and Lubuntu's upgrader only does
[03:25] <arraybolt3[m]> that in the event it has to fix a busted upgrade.)
[03:27] <arraybolt3[m]> Dan Simmons: I'm going to package this up, get together SRU backports, and then in the interest of time, I think I should just upload it to Lunar immediately and begin the SRU process, at which point things will get plenty of peer review. (I do have to backport it to Focal, I think, so I'm still a good deal away from uploading.) Does that seem like a good idea to you? If you have time, I can put this somewhere you can see it while
[03:27] <arraybolt3[m]> I'm doing the rest of everything.
[03:36] <arraybolt3[m]> ...I can't create a pull request in Gitea?
[03:37] <arraybolt3[m]> Welp, whatever. Here's the code. https://git.lubuntu.me/Lubuntu/lubuntu-update-notifier/compare/ubuntu/lunar...arraybolt3/upgrade_repair <-- Dan Simmons 
[03:38] <arraybolt3[m]> (Took me an embarrassingly long amount of time to finally get that done, but I guess I was working with a mostly unfamiliar codebase and tools.)
 "Dan Simmons: I'm going to..." <- I actually won't upload this without peer review, given the fact that this *is* mostly unfamiliar to me and the changes I made were on the rather complex side, I think that's actually a bad idea.
[03:46] <arraybolt3[m]> And last but not least, a PPA with the hopefully finished updater: https://launchpad.net/~arraybolt3/+archive/ubuntu/lubuntu-upgrader-test2/+packages
[03:47] <arraybolt3[m]> (I just uploaded that, so give it a good while before trying to use it from there.)
[03:47] <arraybolt3[m]> (The one that's already there is an earlier iteration.)
[03:57] <arraybolt3[m]> teward: If you want to review the latest chaos of this, I'd welcome your input and coffee too.
 "Well, shoot. I can't make even..." <- fix_incomplete_install() returns an ActTransaction object which can be connected appropriately
[04:46] <arraybolt3[m]> tsimonq2: Well, even when connected, it didn't actually call the function.
[04:47] <arraybolt3[m]> I basically had `self.trans3.connect("config-file-conflict", self.config_file_conflict))`, it executed the script just fine but never showed the window.
[04:48] <arraybolt3[m]> (And I did make sure that self.config_file_conflict was compatible with the fix_incomplete_install transaction, which required a very slight tweak, so it should have worked.)
[04:48] <tsimonq2> Did you set the correct debconf frontend? Perhaps it's assuming no such frontend exists to prompt the user
[04:49] <arraybolt3[m]> I forgot to do that!
[04:49] <tsimonq2> See line 373
[04:49] <tsimonq2> Willing to bet things will work after that :)
[04:49] <arraybolt3[m]> You're right, you set a debconf frontend in the upgrade() function. I noticed that and intended to do that, then forgot.
[04:49]  * arraybolt3[m] tests
[04:58] <arraybolt3[m]> Simon Quigley: Sadly, it's still skipping over that part silently, it looks like.
[04:58]  * arraybolt3[m] sent a code block: https://libera.ems.host/_matrix/media/v3/download/libera.chat/fe79f442a8bbf5d4dc1100646bf01fb340bf4e4c
[04:58] <arraybolt3[m]> That's my code.
[05:00] <tsimonq2> It's in two separate lines :)
[05:01] <arraybolt3[m]> (I do have the except clause, I just forgot to paste it :P)
[05:01] <arraybolt3[m]> tsimonq2: ? I only see the one in the original code.
[05:01] <tsimonq2> I need some sleep, figured I'd pop my head in though. I'll give you a more thoughtful response over the weekend, for now I'll leave reviewing to Dan and Thomas :)
[05:01] <arraybolt3[m]> 👍️, sounds good!
[05:03] <tsimonq2> arraybolt3[m]: Lines 7 + 10 in the code you just pasted lol
[05:03] <tsimonq2> ¯\_(ツ)_/¯
[05:03] <tsimonq2> Anyway good night for real
[05:05] <arraybolt3[m]> Still missing something, but I'm sure we'll figure it out later. See you soon!
[05:06] <arraybolt3[m]> Oh now I see it. Lol. Alright, that explains something.
[16:39] <teward> why was i pinged for code review again?
[16:39] <teward> *yawns*
[16:41] <arraybolt3> teward: Simon's gone, you and Dan are the only other Lubuntu developers other than me, who needed code review :P
[16:43] <RikMills> teward: the ChatGPT bot was busy?
[16:44]  * RikMills runs
[16:44] <arraybolt3> RikMills: SHHHH, don't tell him how I wrote that!
[16:55] <teward> lol
[16:56] <teward> arraybolt3: what exactly needs reviewed, i'm lazy and don't want to scroll back :p
[16:56] <teward> note i'm at work in the office today so completely different dynamic as a result today for how availabel I am
[17:29] <arraybolt3> teward: One moment...
[17:30] <arraybolt3[m]> teward: https://git.lubuntu.me/Lubuntu/lubuntu-update-notifier/compare/ubuntu/lunar...arraybolt3/upgrade_repair
[17:31] <arraybolt3[m]> Note that the "config-file-conflict" feature in the repair_install() function doesn't actually work - I think it's a limitation of aptd, but hopefully it can be made to work somehow. (The config-file-conflict feature of the upgrade() function in Simon's code works just fine.)
[17:39] <teward> i'll let smeone else audit the code, i'm not as familiar with the GUI side of things :P
[17:39] <teward> so kc2bez is up
[17:39] <teward> or ytou can wait for SImon who seems to be active doing bug work right now
[17:39] <teward> *points at bug mail*
[17:39] <teward> in the meantime
[17:39] <teward> lunch
[18:09]  * tsimonq2 pops in for like 5 minutes\
[18:10] <tsimonq2> I needed to do something to wake up this morning that was code related to get my mind in gear :P
[18:10] <tsimonq2> also
[18:10] <tsimonq2> I think the best step forward may just be to look at other implementations of the debconf frontend
[18:10] <tsimonq2> Specifically to see how they handle such a case
[18:11] <tsimonq2> So, looking at update-manager to see if they support recovering an interrupted install, and if they do, how they plug that frontend in
[18:11] <tsimonq2> That's certainly not an easy task
[18:11] <tsimonq2> BUT
[18:11] <tsimonq2> it should give us a step forward
[18:40] <teward> no rush i can force SImon to look at it later :P
[18:40] <teward> muahahahahah
[19:36] <arraybolt3[m]> I don't think debconf and the config file conflict are related...
[19:36] <arraybolt3[m]> I mean when I see a debconf message, it shows up in a TUI with "buttons" and stuff, not a prompt that waits for the user to make a choice by pressing a key.
[19:40] <arraybolt3[m]> I suppose it would be worth looking at the aptd code to see how it behaves differently (perhaps they also made a "eh, we'll implement this feature later" decision?).
[19:45]  * arraybolt3[m] looks through aptd code and is somewhat perplexed by how many "tunnels" these commands seem to have to go through
[19:46] <arraybolt3[m]> Ugh, because it has to talk over DBus with this miserably complicated set of info. Sheesh, why not just use a UNIX socket?!
[19:47]  * arraybolt3[m] doesn't even understand why DBus exists, but whatever
[19:59] <arraybolt3[m]> Alright, finally found it. And as I feared, it appears this is an aptd limitation.
[20:00] <arraybolt3[m]> In aptdaemon-0.43/aptdaemon/progress.py:... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/6be4a22bc6566e91628463ac842442d888683e83>)
[20:00] <arraybolt3[m]>  * In aptdaemon-0.43/aptdaemon/progress.py:... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/f51e6a9b024b70a0b978dac4901723af438bb2fc>)
[20:00] <arraybolt3[m]> Now later, in the same file:... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/ab921b8c38a9b4c71a427d97bb5ffe4f8058440e>)
[20:01] <arraybolt3[m]> This is the class that appears to handle installation and upgrades, if I'm not mistaken. Notice lines 41-45, that's where it handles config file conflicts, again, if I'm understanding correctly.
[20:01] <arraybolt3[m]> Then, just after that:... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/784d6f3cb2e542a52190671bdbe69d7d2a6252ad>)
[20:02] <arraybolt3[m]> That's what handles the fix_incomplete_install() call. And... guess what --force-confdef --force-confold does. Yep, it handles answering those prompts automatically and doesn't display them to the user.
[20:02] <arraybolt3[m]> (That's in line 10.)
[20:03] <arraybolt3[m]> So, basically, aptd does not provide a config-file-conflict interface that works for the transaction given by a fix_incomplete_install() call.
[20:04] <arraybolt3[m]>  * In aptdaemon-0.43/aptdaemon/progress . py:... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/732a195c5172bf89389d836f87918265e62bb6f2>)
[20:04] <arraybolt3> BTW this looks like utter chaos in IRC. View it on Matrix if at all possible.
[20:06] <arraybolt3[m]> So now the question is... can we add functionality to aptd too? I think the answer is no - just the changes to lubuntu-update-notifier are pushing the boundaries of what is acceptable for an SRU. If we start hacking aptd's guts too, I think we're going to get the SRU rejected, since this could come with a high regression risk.
[20:06] <arraybolt3[m]> (And depending on whether aptd requires a script to fully set up or not, it might not even be technically possible to modify it as well, though I haven't checked that.)
[20:21] <arraybolt3[m]> It appears that AptDaemon is GPL-2 code, so for log readers, the code pasted above is GPL-2 licensed.