<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/completions, branch main</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=main</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2026-02-17T10:35:22Z</updated>
<entry>
<title>bash-complete search patterns for more commands</title>
<updated>2026-02-17T10:35:22Z</updated>
<author>
<name>Ville Skyttä</name>
<email>ville.skytta@iki.fi</email>
</author>
<published>2026-01-06T11:32:07Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=7b2673ace64d70a056041c487480d087f19030a8'/>
<id>urn:sha1:7b2673ace64d70a056041c487480d087f19030a8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>completion: history</title>
<updated>2026-01-05T21:23:52Z</updated>
<author>
<name>Christopher Bock</name>
<email>christopher@bocki.com</email>
</author>
<published>2025-10-02T13:53:33Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=2aa2677ab9ad63252acc1ddea20119101d92eb45'/>
<id>urn:sha1:2aa2677ab9ad63252acc1ddea20119101d92eb45</id>
<content type='text'>
 * complete command history-(list|info|undo|redo|rollback).
   complete the history-id for all but commands but history-list.
   set complet -o nosort to get the history-ids in a reverse order.
</content>
</entry>
<entry>
<title>bash-complete basic list search patterns</title>
<updated>2026-01-05T21:22:11Z</updated>
<author>
<name>Ville Skyttä</name>
<email>ville.skytta@iki.fi</email>
</author>
<published>2025-12-02T23:10:30Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=d25b2b2fa51631ff324fc296b925f896c7fdad5e'/>
<id>urn:sha1:d25b2b2fa51631ff324fc296b925f896c7fdad5e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>completion: apt why/why-not</title>
<updated>2025-08-16T16:34:25Z</updated>
<author>
<name>Christopher Bock</name>
<email>christopher@bocki.com</email>
</author>
<published>2025-08-16T16:34:25Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=704742352e53a44a38dfe09e4be4c6494cfa7fdc'/>
<id>urn:sha1:704742352e53a44a38dfe09e4be4c6494cfa7fdc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>completion: Add modernize-sources </title>
<updated>2025-02-07T08:09:15Z</updated>
<author>
<name>Christopher Bock</name>
<email>christopher@bocki.com</email>
</author>
<published>2025-02-07T08:09:15Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=9e109b5d895a9c118309c1ffce7906e7bb9b12ce'/>
<id>urn:sha1:9e109b5d895a9c118309c1ffce7906e7bb9b12ce</id>
<content type='text'>
Closes: #1094904
</content>
</entry>
<entry>
<title>Initial implementation of the 3.0 solver</title>
<updated>2024-05-14T09:56:18Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2024-05-06T13:34:33Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=89dcc342e17dd2439d97a5d27200cf5c26ba35bc'/>
<id>urn:sha1:89dcc342e17dd2439d97a5d27200cf5c26ba35bc</id>
<content type='text'>
This is a simple backtracking brute-force solver with heurisitcs,
this initial version has the following known gaps:

- Errors are not kept from branches, the error reporting after
  backtracking isn't particularly useful.
- We cannot show automatically removed packages
- We cannot replace packages with others
- We do not have conflict-driven clause learning yet

Untested:

- Multi-arch

This solver is fundamentally different in key aspects:

- It solves smaller dependency groups before larger ones, leading
  us to avoid installing A in A|B if B is installed more often and
  more consistently.

- It only keeps the automatic packages reachable via the strongest
  path. Currently it only implements autoremoval, but not display
  of autoremoval as we simply enqueue all automatically installed
  packages at the end when not doing automatic removal.

  This will need some translation where we Solve() first, and then
  Solve() again with the automatically installed packages added such
  that we can mark them as Garbage for display purposes.

- It does not remove manually installed packages.

Hook the solver in via the EDSP framework, this allows us to achieve
easy initial integration without lots of issues.

A lot of this work was planned and executed in my free time and then
some leaked into work time I suppose.

Implementation notes:

- Restore the full backlog of items

  The annoying thing is that we record only when an item was enqueued
  and not the level at which it was installed, so when going back a
  decision level we might have to reinstall packages that were queued
  at an earlier decision level because they were only installed at a
  later decision level.

- When picking one version, reject the others

- Propagate conflicts up to reverse dependencies

  This will recursively mark every reverse dependency that can
  no longer be satisfied as MUSTNOT.

  Also make sure to recursively call Reject(Ver) from Reject(Pkg)
  to make sure we trigger the Rejections there.

  This means we now end up having Recursion in the algorithm. An
  alternative approach would be to push *reject* items to the heap
  and then do them, but this is not entirely straight forward and
  it may simply not be necessary.

-  Sort upgrades before other optional installs containing subsets

  If I want to upgrade a package A, I schedule A3|A2|A1; if another
  thing depends specifically on A1; we'd not be installed. Hence we
  need to sort upgrades first.

  This only is needed for optional packages; manual packages will
  figure this out naturally.

- Rescoring is lazily implemented. Instead of calling make_heap()
  after rescoring items, we just mark the items as dirty and reinsert
  them. We also only rescore from the main solve loop, Reject() marks
  the heap as needing a rescore due to a Conflict (as some versions will
  no longer be installable), and RescoreWorkIfNeeded() then will do the
  rescoring.

- Recursive unit propagation: Install() and Reject() recursively call
  each other to promote decisions across single-version dependencies
  (or across not-anymore satisfiable reverse-depends).

- Make Reason constructors explicit, this enhances readability

  This makes calls like the one in here be

    Reject(object, Reason(otherObject))

  Ensuring that it's clear that the 2nd argument is a reason at the
  caller side.

- Split Decision into Decision and Hint vs. first draft

  When branching/deciding, we do not want to override SHOULD and MAY.
  We do not actually use them yet, and we do actually clean them when
  backtracking, but let's at least keep the data structure correct.

  Convert the enum to a 16-bit integer so we can still fit in the same
  space as before.
</content>
</entry>
<entry>
<title>Columnar output for package lists similar to 'ls'</title>
<updated>2024-04-12T13:56:56Z</updated>
<author>
<name>Christian Blichmann</name>
<email>mail@blichmann.eu</email>
</author>
<published>2022-02-01T19:59:57Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=690993b1b9b4a932ca5bf5374c59e4cf88f18732'/>
<id>urn:sha1:690993b1b9b4a932ca5bf5374c59e4cf88f18732</id>
<content type='text'>
This change makes it a bit easier to quickly grasp the changes
about to be performed by apt.

It displays package lists in a columnar format by default,
similar to what `ls` produces for files.

A new long option `--no-list-columns` and an associated
`APT::Get::List-Columns` config setting control the behavior.

Usage example, with 60 column wide terminal:

```
$ sudo apt upgrade                                          |
Reading package lists... Done                               |
Building dependency tree... Done                            |
Reading state information... Done                           |
Calculating upgrade... Done                                 |
The following packages were automatically installed and are |
no longer required:                                         |
  libappindicator1 libindicator7                            |
  libdbusmenu-gtk4 linux-image-5.14.0-4-amd64               |
Use 'sudo apt autoremove' to remove them.                   |
The following packages have been kept back:                 |
  criu        linux-headers-amd64 nvidia-settings           |
  libxnvctrl0 nvidia-modprobe     xwayland                  |
0 upgraded, 0 newly installed, 0 to remove and 6 not upgrade|
d.                                                          |
```

The effect becomes more pronounced with more packages (e.g. when
doing a dist-upgrade).
</content>
</entry>
<entry>
<title>Merge branch 'dont-bash-complete-pkgs-before-cmd' into 'main'</title>
<updated>2022-02-22T16:35:02Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2022-02-22T16:35:02Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=647847769adca37a0b036c64cc0fad06b49bd99c'/>
<id>urn:sha1:647847769adca37a0b036c64cc0fad06b49bd99c</id>
<content type='text'>
Don’t bash-complete package names before the command word

See merge request apt-team/apt!221</content>
</entry>
<entry>
<title>Don’t bash-complete package names before the command word</title>
<updated>2022-02-04T16:26:04Z</updated>
<author>
<name>Jörn-Thorben Hinz</name>
<email>11910-jth@users.noreply.salsa.debian.org</email>
</author>
<published>2022-02-03T22:23:27Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=19ffda1489858d132551a267fccdf7ab03b5e103'/>
<id>urn:sha1:19ffda1489858d132551a267fccdf7ab03b5e103</id>
<content type='text'>
Previously, package names would get suggested at the cursor position `_`
for a command line like this:
```
~# apt _ install git vim
```
</content>
</entry>
<entry>
<title>bash-completion: Use the correct index range when looking for the command word</title>
<updated>2022-02-04T16:25:08Z</updated>
<author>
<name>Jörn-Thorben Hinz</name>
<email>11910-jth@users.noreply.salsa.debian.org</email>
</author>
<published>2022-02-03T22:16:30Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=5599b21c5fa6ceffa1be24b2974a4d402d06bf7a'/>
<id>urn:sha1:5599b21c5fa6ceffa1be24b2974a4d402d06bf7a</id>
<content type='text'>
$words[0] contains the first word on the command-line, the name of the
program: apt. Also, the last word already typed on the command-line
might be the command, don’t ignore it.
</content>
</entry>
</feed>
