volitank / nala

Nala is a front-end for libapt-pkg.
GNU General Public License v3.0
1.32k stars 49 forks source link

Nala can't resolve dependencies from file glob, refuses to install LibreOffice from disk #45

Open leogott opened 1 month ago

leogott commented 1 month ago

I attempted to install LibreOffice 24.2, by first downloading the release, and then running sudo nala install *.deb, which I expected to be equivalent to sudo dpkg -i *.deb, as nala advertises itself as a wrapper to a wrapper to dpkg.

Nala was not able to resolve the dependencies and returned a helpful error.

Fold out full command output

```console user@computer:~/Downloads$ sudo nala install LibreOffice_24.2.3_Linux_x86-64_deb/LibreOffice_24.2.3.2_Linux_x86-64_deb/DEBS/*.deb libobasis24.2-base └── Hängt ab von: ├── libobasis24.2-core (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-core (<= 24.2.3.2-2), aber es ist nicht im Cache libobasis24.2-calc └── Hängt ab von: ├── libobasis24.2-core (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-core (<= 24.2.3.2-2), aber es ist nicht im Cache libobasis24.2-core └── Hängt ab von: ├── libreoffice24.2-ure (>= 24.2.3.2), aber es ist nicht im Cache ├── libreoffice24.2-ure (<= 24.2.3.2-2), aber es ist nicht im Cache ├── libobasis24.2-ooofonts (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-ooofonts (<= 24.2.3.2-2), aber es ist nicht im Cache libobasis24.2-draw └── Hängt ab von: ├── libobasis24.2-core (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-core (<= 24.2.3.2-2), aber es ist nicht im Cache libobasis24.2-en-us └── Hängt ab von: ├── libobasis24.2-core (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-core (<= 24.2.3.2-2), aber es ist nicht im Cache libobasis24.2-extension-beanshell-script-provider └── Hängt ab von: ├── libobasis24.2-core (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-core (<= 24.2.3.2-2), aber es ist nicht im Cache libobasis24.2-extension-javascript-script-provider └── Hängt ab von: ├── libobasis24.2-core (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-core (<= 24.2.3.2-2), aber es ist nicht im Cache libobasis24.2-extension-mediawiki-publisher └── Hängt ab von: ├── libobasis24.2-core (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-core (<= 24.2.3.2-2), aber es ist nicht im Cache libobasis24.2-extension-nlpsolver └── Hängt ab von: ├── libobasis24.2-core (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-core (<= 24.2.3.2-2), aber es ist nicht im Cache libobasis24.2-extension-pdf-import └── Hängt ab von: ├── libobasis24.2-core (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-core (<= 24.2.3.2-2), aber es ist nicht im Cache libobasis24.2-extension-report-builder └── Hängt ab von: ├── libobasis24.2-core (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-core (<= 24.2.3.2-2), aber es ist nicht im Cache libobasis24.2-firebird └── Hängt ab von: └── libobasis24.2-core, aber es ist nicht im Cache libobasis24.2-gnome-integration └── Hängt ab von: ├── libobasis24.2-core (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-core (<= 24.2.3.2-2), aber es ist nicht im Cache libobasis24.2-graphicfilter └── Hängt ab von: ├── libobasis24.2-core (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-core (<= 24.2.3.2-2), aber es ist nicht im Cache libobasis24.2-images └── Hängt ab von: ├── libobasis24.2-core (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-core (<= 24.2.3.2-2), aber es ist nicht im Cache libobasis24.2-impress └── Hängt ab von: ├── libobasis24.2-core (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-core (<= 24.2.3.2-2), aber es ist nicht im Cache libobasis24.2-kde-integration └── Hängt ab von: ├── libobasis24.2-core (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-core (<= 24.2.3.2-2), aber es ist nicht im Cache libobasis24.2-librelogo └── Hängt ab von: ├── libobasis24.2-pyuno (>= 24.2.3.2), aber es ist nicht im Cache ├── libobasis24.2-pyuno (<= 24.2.3.2-2), aber es ist nicht im Cache ├── libobasis24.2-writer (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-writer (<= 24.2.3.2-2), aber es ist nicht im Cache libobasis24.2-libreofficekit-data └── Hängt ab von: ├── libobasis24.2-core (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-core (<= 24.2.3.2-2), aber es ist nicht im Cache libobasis24.2-math └── Hängt ab von: ├── libobasis24.2-core (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-core (<= 24.2.3.2-2), aber es ist nicht im Cache libobasis24.2-ogltrans └── Hängt ab von: ├── libobasis24.2-impress (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-impress (<= 24.2.3.2-2), aber es ist nicht im Cache libobasis24.2-onlineupdate └── Hängt ab von: ├── libobasis24.2-core (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-core (<= 24.2.3.2-2), aber es ist nicht im Cache libobasis24.2-ooolinguistic └── Hängt ab von: ├── libobasis24.2-core (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-core (<= 24.2.3.2-2), aber es ist nicht im Cache libobasis24.2-postgresql-sdbc └── Hängt ab von: ├── libobasis24.2-base (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-base (<= 24.2.3.2-2), aber es ist nicht im Cache libobasis24.2-python-script-provider └── Hängt ab von: ├── libobasis24.2-core (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-core (<= 24.2.3.2-2), aber es ist nicht im Cache libobasis24.2-pyuno └── Hängt ab von: ├── libobasis24.2-core (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-core (<= 24.2.3.2-2), aber es ist nicht im Cache libobasis24.2-writer └── Hängt ab von: ├── libobasis24.2-core (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-core (<= 24.2.3.2-2), aber es ist nicht im Cache libobasis24.2-xsltfilter └── Hängt ab von: ├── libobasis24.2-core (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-core (<= 24.2.3.2-2), aber es ist nicht im Cache libreoffice24.2 └── Hängt ab von: ├── libreoffice24.2-ure (>= 24.2.3.2), aber es ist nicht im Cache ├── libreoffice24.2-ure (<= 24.2.3.2-2), aber es ist nicht im Cache ├── libobasis24.2-core (>= 24.2.3.2), aber es ist nicht im Cache ├── libobasis24.2-core (<= 24.2.3.2-2), aber es ist nicht im Cache ├── libobasis24.2-images (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-images (<= 24.2.3.2-2), aber es ist nicht im Cache libreoffice24.2-base └── Hängt ab von: ├── libreoffice24.2 (>= 24.2.3.2), aber es ist nicht im Cache ├── libreoffice24.2 (<= 24.2.3.2-2), aber es ist nicht im Cache ├── libobasis24.2-base (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-base (<= 24.2.3.2-2), aber es ist nicht im Cache libreoffice24.2-calc └── Hängt ab von: ├── libreoffice24.2 (>= 24.2.3.2), aber es ist nicht im Cache ├── libreoffice24.2 (<= 24.2.3.2-2), aber es ist nicht im Cache ├── libobasis24.2-calc (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-calc (<= 24.2.3.2-2), aber es ist nicht im Cache libreoffice24.2-dict-en └── Hängt ab von: ├── libreoffice24.2-ure (>= 24.2.3.2), aber es ist nicht im Cache ├── libreoffice24.2-ure (<= 24.2.3.2-2), aber es ist nicht im Cache ├── libobasis24.2-core (>= 24.2.3.2), aber es ist nicht im Cache ├── libobasis24.2-core (<= 24.2.3.2-2), aber es ist nicht im Cache ├── libreoffice24.2 (>= 24.2.3.2), aber es ist nicht im Cache └── libreoffice24.2 (<= 24.2.3.2-2), aber es ist nicht im Cache libreoffice24.2-dict-es └── Hängt ab von: ├── libreoffice24.2-ure (>= 24.2.3.2), aber es ist nicht im Cache ├── libreoffice24.2-ure (<= 24.2.3.2-2), aber es ist nicht im Cache ├── libobasis24.2-core (>= 24.2.3.2), aber es ist nicht im Cache ├── libobasis24.2-core (<= 24.2.3.2-2), aber es ist nicht im Cache ├── libreoffice24.2 (>= 24.2.3.2), aber es ist nicht im Cache └── libreoffice24.2 (<= 24.2.3.2-2), aber es ist nicht im Cache libreoffice24.2-dict-fr └── Hängt ab von: ├── libreoffice24.2-ure (>= 24.2.3.2), aber es ist nicht im Cache ├── libreoffice24.2-ure (<= 24.2.3.2-2), aber es ist nicht im Cache ├── libobasis24.2-core (>= 24.2.3.2), aber es ist nicht im Cache ├── libobasis24.2-core (<= 24.2.3.2-2), aber es ist nicht im Cache ├── libreoffice24.2 (>= 24.2.3.2), aber es ist nicht im Cache └── libreoffice24.2 (<= 24.2.3.2-2), aber es ist nicht im Cache libreoffice24.2-draw └── Hängt ab von: ├── libreoffice24.2 (>= 24.2.3.2), aber es ist nicht im Cache ├── libreoffice24.2 (<= 24.2.3.2-2), aber es ist nicht im Cache ├── libobasis24.2-draw (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-draw (<= 24.2.3.2-2), aber es ist nicht im Cache libreoffice24.2-en-us └── Hängt ab von: ├── libreoffice24.2 (>= 24.2.3.2), aber es ist nicht im Cache ├── libreoffice24.2 (<= 24.2.3.2-2), aber es ist nicht im Cache ├── libobasis24.2-en-us (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-en-us (<= 24.2.3.2-2), aber es ist nicht im Cache libreoffice24.2-impress └── Hängt ab von: ├── libreoffice24.2 (>= 24.2.3.2), aber es ist nicht im Cache ├── libreoffice24.2 (<= 24.2.3.2-2), aber es ist nicht im Cache ├── libobasis24.2-impress (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-impress (<= 24.2.3.2-2), aber es ist nicht im Cache libreoffice24.2-math └── Hängt ab von: ├── libreoffice24.2 (>= 24.2.3.2), aber es ist nicht im Cache ├── libreoffice24.2 (<= 24.2.3.2-2), aber es ist nicht im Cache ├── libobasis24.2-math (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-math (<= 24.2.3.2-2), aber es ist nicht im Cache libreoffice24.2-writer └── Hängt ab von: ├── libreoffice24.2 (>= 24.2.3.2), aber es ist nicht im Cache ├── libreoffice24.2 (<= 24.2.3.2-2), aber es ist nicht im Cache ├── libobasis24.2-writer (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-writer (<= 24.2.3.2-2), aber es ist nicht im Cache Notiz: Die obigen Informationen können hilfreich sein Fehler: Sie haben beschädigte Pakete zurückgehalten ```

I expected nala to find all dependencies, even if they are installed at the same time as packages that depend on them. (I am also confused by the way upper+lower-bounded deps are displayed, and the amount of repetition.)

After installing libreoffice with dpkg I proceeded – or tried to – install the german langpak with nala:

Installing the Langpack (full command and output)

```console user@computer:~/Downloads/LibreOffice_24.2.3_Linux_x86-64_deb_langpack_de/LibreOffice_24.2.3.2_Linux_x86-64_deb_langpack_de/DEBS$ ls libobasis24.2-de_24.2.3.2-2_amd64.deb libreoffice24.2-de_24.2.3.2-2_amd64.deb libreoffice24.2-dict-de_24.2.3.2-2_amd64.deb user@computer:~/Downloads/LibreOffice_24.2.3_Linux_x86-64_deb_langpack_de/LibreOffice_24.2.3.2_Linux_x86-64_deb_langpack_de/DEBS$ sudo nala install *.deb Fixing Broken Packages... Es gibt beschädigte Pakete, die repariert werden müssen! Sie können --no-fix-broken verwenden, wenn Sie es versuchen möchten, ohne sie zu reparieren. ================================================================================ Entfernen ================================================================================ Paket: Version: Größe: libobasis24.2-de-help 24.2.3.2-2 35.2 MB ================================================================================ Zusammenfassung ================================================================================ Entfernen 1 Pakete Speicherplatz freizugeben 35.2 MB Möchtest du fortfahren? [J/n] j ╭─ Pakete installieren ────────────────────────────────────────────────────────╮ │Entferne: libobasis24.2-de-help (24.2.3.2-2) │ │╭────────────────────────────────────────────────────────────────────────────╮│ ││✔ Ausführen von dpkg … ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100.0% • 0:00:00 • 3/3││ │╰────────────────────────────────────────────────────────────────────────────╯│ ╰──────────────────────────────────────────────────────────────────────────────╯ Erfolgreich beendet user@computer:~/Downloads/LibreOffice_24.2.3_Linux_x86-64_deb_langpack_de/LibreOffice_24.2.3.2_Linux_x86-64_deb_langpack_de/DEBS$ sudo nala install *.deb libreoffice24.2-de └── Hängt ab von: ├── libobasis24.2-de (>= 24.2.3.2), aber es ist nicht im Cache └── libobasis24.2-de (<= 24.2.3.2-2), aber es ist nicht im Cache Notiz: Die obigen Informationen können hilfreich sein Fehler: Sie haben beschädigte Pakete zurückgehalten user@computer:~/Downloads/LibreOffice_24.2.3_Linux_x86-64_deb_langpack_de/LibreOffice_24.2.3.2_Linux_x86-64_deb_langpack_de/DEBS$ sudo dpkg -i *.deb Vormals nicht ausgewähltes Paket libobasis24.2-de wird gewählt. (Lese Datenbank ... 319884 Dateien und Verzeichnisse sind derzeit installiert.) Vorbereitung zum Entpacken von libobasis24.2-de_24.2.3.2-2_amd64.deb ... Entpacken von libobasis24.2-de (24.2.3.2-2) ... Vormals nicht ausgewähltes Paket libreoffice24.2-de wird gewählt. Vorbereitung zum Entpacken von libreoffice24.2-de_24.2.3.2-2_amd64.deb ... Entpacken von libreoffice24.2-de (24.2.3.2-2) ... Vormals nicht ausgewähltes Paket libreoffice24.2-dict-de wird gewählt. Vorbereitung zum Entpacken von libreoffice24.2-dict-de_24.2.3.2-2_amd64.deb ... Entpacken von libreoffice24.2-dict-de (24.2.3.2-2) ... libobasis24.2-de (24.2.3.2-2) wird eingerichtet ... libreoffice24.2-de (24.2.3.2-2) wird eingerichtet ... libreoffice24.2-dict-de (24.2.3.2-2) wird eingerichtet ... user@computer:~/Downloads/LibreOffice_24.2.3_Linux_x86-64_deb_langpack_de/LibreOffice_24.2.3.2_Linux_x86-64_deb_langpack_de/DEBS$ ```

In this case, I don't even know what's going on.

Lastly I installed the offline help, which succeeded, probably because it's just a single file.

edit: Version 0.11.1, sorry if that's ancient and the issue has been fixed since

volitank commented 1 week ago

0.11.1 is rather ancient, but this issue won't have been solved. And It's a lot of leg work to actually resolve it.

The issue comes from how python-apt works with local debs, when resolving dependencies they can't know about each other deb that is passed on the command line, it only considered dependencies that are in the Apt Cache. To solve this in Nala's current form would require me to resolve dependencies outside of how apt does it, and there is a lot of room for failure. Apt's dependency resolver is battle tested and developed for like 30 years or something. Mine would have many bugs that can probably break things.

The long term fix for this is when the rewrite for Nala in rust is completed. I have wrote the https://gitlab.com/volian/rust-apt library which has the ability to inject local debs into the apt cache for proper resolution.

At time of writing, nala-rs has implemented list, search, show, download, fetch and update commands. So development is well on its way, although slower than I would like.