The next step is to actually make this work correctly - right now the API isn't actually exposed from libapt-private.
And then rewrite the reporting. For each step of the implication graph, we need to look back up the original Dependency in the cache and then render one per line.
And this will become the error reporting format too so you get error messages like
I'm going to say writing a SAT solver sure seems easier than a red-black tree. This is all pretty straightforward compared to you know, moving trees around.
The 2-literals-learning bit I almost independently rediscovered if I hadn't read a wiki page about it. I was going "huh I don't really care how many unassigned literals are in this clause only if I have less than 2." a lot (it's even easier in dependency form, A->D1|...|Dn, only watch one D; we only ever see clauses once A is true)
OK so I mentioned all the issues earlier, what I did now, I got to 1418 packages upgrade in the test case, it all looks correct, the old solver only did 1416.
Order dependencies by
New install
Anything else
Contains obsolete package
Move obsolete choices in the alternatives to the back
Also removed the dynamic sizing code, so we can use watched literals instead now I suppose.
This is how the dependencies/clauses to be solved are broadly ordered:
// Brief group of the work
enum class Group : uint8_t
{
HoldOrDelete,
NewUnsatRecommends,
SatisfyNew,
Satisfy,
SatisfyObsolete,
UpgradeManual,
InstallManual,
ObsoleteManual,
UpgradeAuto,
KeepAuto,
ObsoleteAuto
};
There are some more details: Non-optional clauses with 1 or zero solutions get moved ahead, and more checks for packages in one group
Basically what you do is you weight your solution, then you flip one variable, check if the weight is lower and then continue or you try a different one.
APT meanwhile always just weighted pairwise packages rather than the whole solution which made it awkward.
See I just realized I'm writing a local-search incomplete partial (weighted) maxsat solver in effect.
But also I could do conflict-driven maxsat to solve the upgrade problem. So you go enqueue all upgrades. You get a conflict, you remove the conflicting upgrade.
The problem otherwise is as mentioned before; we can end up skipping some updates because we see dependencies in the wrong order and hence get libfoo1 whereas other upgrades require libfoo1t64.
OK to be fair we can upgrade all easily, but that breaks Recommends and switches potentially to different packages where we don't want it.
Like we said before if I have X Depends A=2|B and A=2 is not ready, we should hold back X rather than install B.
Stalwart mail server is Affero GPL licensed. Can you legally use it? Remember that you need to point each client at the specific source code the binary was built from.
This provision isn't restricted to protocols intended for humans. You need to advertise the source code location to everyone connecting over JMAP, SMTP,IMAP,POP3 - whatever protocols you use.
If the protocol has no means to advertise the source code, you are fucked. You have no way to be compliant.
So basically you always have to run a non-AGPL proxy server in front of AGPL servers on protocols without server greetings like HTTP such that user connections only reach the AGPL server once they send a request such that you could include the corresponding source code offer in a response.
@GyrosGeier It is very easy to comply with if process allows and the build process embeds the source in the output so it can reproduce its own source code when asked.
Comparative analysis of the stress tracking yesterday and today. I had a terrible night but night time recovery 2 week average of course still is about the same.
Daytime recovery increased and day time stress load decreased.
To understand why let's look at the map. It clearly shows, the lower the stress the more recovery you need. Basically I think the presentation isn't useful so far.
You see every half hour is categorised as stressed/engaged/relaxed/recovered. Daytime stress going down obviously leaves more time you should aim to recover in which means you need a higher recovery score.
Like it seems they measure the recovery score as time recovered / (time in day - time stressed) rather than absolute numbers?
Also tbh, Hessen is the high German name, it's not clear to me why the English version Hesse is basically the Hessian dialect version of it (folks drop consonants at the end; ok Hessen is also the plural of Hesse, in terms of "people from Hesse(n)").
Working on an interesting problem like this solver is very taxing. I couldn't fall asleep until like 2am and woke up at like 6:30 realising how to fix the problem I had remaining. 😫
What happened? You see in the upgrade test cases we had a lot of libfoo1 to libfoo1t64 upgrades, but there were also plenty of NBS libbar1, i.e. binaries from older source versions no longer built in the new version.
The solver tried to upgrade libbar1 and that held back installing libfoo1.
The answer of course is: Upgrade by source package. This also significantly reduces backtracking. Mark libfoo1? Mark all other binaries of the same source version the same, in the same decision level.