Happy new 2024 Marc, attached is my mini-howto - it's from January 2023 so be careful if things still fit.
Thanks. Best regards, -Sedat- On Wed, Dec 27, 2023 at 2:16 PM Sedat Dilek <sedat.di...@gmail.com> wrote: > > On Tue, Dec 26, 2023 at 11:27 PM Marc Haber <mh+debian-...@zugschlus.de> > wrote: > > > > Hi, > > > > on my new notebook I am trying to do more administrative tasks in > > graphical tools to be able to answer beginners' questions in the unix > > user group. That also means package management, which I usually do with > > apt on the command line. > > > > KDE Discover seems to not quite the package management tool I am looking > > for. It only says that my Debian unstable offers like 2000 packages for > > installation (the notebook alone has 2400 packages installed), it says > > that the installation only has 240 packages installed. And it cannot > > find the firefox browser. > > > > (1) Am I holding KDE Discover wrong? > > Hi Marc, > > there is some work to be done to get KDE/discover run properly and > update all the software catalogues while recognizing your > sources.list. > > This resulted in more MB to be downloaded for all my > repository-information - when using/checked with apt. > > But I never installed software via KDE/discover - just displayed what > software is available. > > Maybe, I can share my mini-howto when I am in front of my Debian system. > > IIRC apt-config-xxx and packagekit needs to be adapted. > > When I was using mobile network connection I disabled some settings in > apt-config-xxx to reduce the amount of (repository) data which is > required by KDE/discover to build the software-catalogues. > > > (2) If KDE Discover is not what I am looking for, what is the > > recommended way to do package management, install, deinstall, > > configure, purge Debian packages from the Debian archive > > on a KDE system? > > > > /me relies on good old apt for software-upgrades. > > BR, > -Sedat-
[ BACKGROUND ] Here on my system I use plasma-discover with PackageKit backend. DEP-11 meta-informations for the packages are managed via appstream. My system default localisation and KDE regional settings are German/Germany. On my Debian/unstable AMD64 system two APT mirrors are set up. I prefer to use apt-get for upgrades and `git diff` to check file changes. [ PROBLEMS ] This document descibes to solve issues with plasma-discover: 1. Internet connection issues fetching updates 2. No software catalog informations displayed for installed and available packages [ LINKS ] https://forum.kde.org/viewtopic.php?f=309&t=161739#p430783 [ APPSTREAM + PACKAGEKIT - (RE-)INSTALL ] root# apt-get update root# apt-cache search appstream | grep qt root# apt-cache search packagekit | grep qt root# apt-get install --reinstall appstream libappstreamqt2 packagekit libpackagekitqt5-1 plasma-discover -s root# apt-get install --reinstall appstream libappstreamqt2 packagekit libpackagekitqt5-1 plasma-discover -y NOTE: Relevant KDE/QT packages: appstream + libappstreamqt2 & packagekit + libpackagekitqt5-1 (of course plasma-discover) [ PACKAGEKIT - PROXY - RELICTS ] root# ll /var/lib/PackageKit/transactions.db -rw-r--r-- 1 root root 244K 14. Jan 01:12 /var/lib/PackageKit/transactions.db ERROR: No Internet connection - plasma-discover not able to fetch updates CHECK: Any relicts of proxy settings in transactions.db database? NOTE: For some time I used a proxy for my mobile Internet connection - currently I do not. [ DATABASE - PERMISSIONS (user) ] root# cp -av /var/lib/PackageKit/transactions.db /var/lib/PackageKit/transactions.db.orig root# cp -av /var/lib/PackageKit/transactions.db /tmp root# chown dileks: /tmp/transactions.db root# chmod go+w /tmp/transactions.db user$ ll /tmp/transactions.db -rw-rw-rw- 1 dileks dileks 244K 14. Jan 01:04 /tmp/transactions.db NOTE: Prepare the database storing proxy informations for changes as user [ PACKAGEKIT - DATABASE - SQLITEBROWSER ] root# apt-get update root# apt-get install sqlitebrowser user$ sqlitebrowser /tmp/transactions.db FIX: Search database > Table: proxy > Delete all lines with entries including "proxy" settings Save changes (database) NOTE: I deleted all lines in proxy table - for a proper start of plasma-discover I added one new line with empty entries [ DATABASE - PERMISSIONS (root) ] root# cp -av /tmp/transactions.db /var/lib/PackageKit/ root# chown root: /var/lib/PackageKit/transactions.db root# chmod go-w /var/lib/PackageKit/transactions.db [ PACKAGEKIT - RESTART SERVICE ] root# systemctl restart packagekit.service [ PLASMA-DISCOVER - UPDATES ] user$ plasma-discover CHECK: Up-to-date > Fetching updates [ APPSTREAM - DEP-11 (metadata) ] root# cp -av /etc/apt/apt.conf.d/50appstream /etc/apt/apt.conf.d/50appstream.dpkg-dist EDIT: /etc/apt/apt.conf.d/50appstream (see changes below) root# git diff /etc/apt/apt.conf.d/50appstream.dpkg-dist /etc/apt/apt.conf.d/50appstream diff --git a/etc/apt/apt.conf.d/50appstream.dpkg-dist b/etc/apt/apt.conf.d/50appstream index 720bb06..bdf0dca 100644 --- a/etc/apt/apt.conf.d/50appstream.dpkg-dist +++ b/etc/apt/apt.conf.d/50appstream @@ -10,7 +10,7 @@ Acquire::IndexTargets { KeepCompressed "true"; KeepCompressedAs "gz"; - DefaultEnabled "false"; + DefaultEnabled "true"; }; # Small icons for GUI components described in the DEP-11 NOTE: Enable DEP-11 for appstream (Debian's default: "false") [ APT - UPDATE ] root# apt-get update ... 44:Get:36 https://deb.debian.org/debian testing/main amd64 DEP-11 Metadata [4329 kB] 51:Get:40 https://ftp.debian.org/debian testing/main amd64 DEP-11 Metadata [4329 kB] 55:Get:44 https://deb.debian.org/debian unstable/main amd64 DEP-11 Metadata [4480 kB] 56:Get:45 https://ftp.debian.org/debian unstable/main amd64 DEP-11 Metadata [4480 kB] 57:Get:46 https://deb.debian.org/debian unstable/non-free amd64 DEP-11 Metadata [20.1 kB] 60:Get:49 https://ftp.debian.org/debian unstable/non-free amd64 DEP-11 Metadata [20.1 kB] 58:Get:47 https://deb.debian.org/debian unstable/contrib amd64 DEP-11 Metadata [15.8 kB] 59:Get:48 https://ftp.debian.org/debian unstable/contrib amd64 DEP-11 Metadata [15.8 kB] ... NOTE: DEP-11 means more Internet-traffic + more disc-usage (here: 2 APT mirrors - approx. 10M per mirror) [ APPSTREAM + DISCOVER - CACHES (move) ] root# mv /var/cache/swcatalog/cache /var/cache/swcatalog/cache.old user$ mv ~/.cache/appstream ~/.cache/appstream.old user$ mv ~/.cache/discover ~/.cache/discover.old user$ mv ~/.cache/discoverupdate ~/.cache/discoverupdate.old NOTE-1: Move all relevant appstream + discover cache directories NOTE-2: The old location of the catalog files was /var/cache/app-info. [ APPSTREAM - CACHES - USER (refresh) ] With each APT (DEP-11) update plasma-discover will update the catalog file(s) in the user's .cache directory. $ LC_ALL=C ll ~/.cache/appstream total 11M drwxr-xr-x 2 dileks dileks 4.0K Jan 15 13:54 . drwx------ 68 dileks dileks 4.0K Jan 15 11:58 .. -rw-r--r-- 1 dileks dileks 1.2M Jan 15 13:54 de_DE-local-metainfo.xb -rw-r--r-- 1 dileks dileks 9.7M Jan 15 13:54 de_DE-os-catalog.xb So, as user you do NOT need the catalog files in /var/cache/swcatalog/cache/. TEST: Removed all system and user catalog files and started plasma-discover as user (Check OK: ~/.cache/appstream/). NOTE: The catalog files fitting to your default regional setting will be updated (`apt-get update`) [ PLASMA-DISCOVER - ALL FIXED ] BEFORE: Restart PackageKit service! Run `apt-get update`. user$ plasma-discover NOTE: Starting plasma-discover from Start > Apps will use your system's locales (here: de_DE) TEST: plasma-discover uses en_US catalog files after changing regional settings (KDE systemsettings) to en_US XXX: TODO: Check if locales/language can be set explicitly in ~/.config/discoverrc (or in appstream-config?) [ PLASMA-DISCOVER - en_US ] user$ LC_ALL=en_US LANG=en_US appstreamcli refresh --force user$ LC_ALL=en_US LANG=en_US plasma-discover NOTE: I have added as second regional setting en_US in KDE systemsettings [ CLEANUP ] root# rm -r /var/cache/swcatalog/cache.old user$ ll ~/.cache/*.old user$ rm -r ~/.cache/*.old [ QUESTIONS ] [Q-1] What backends can be configured for plasma-discover - other than PackageKit? Enabling DEP-11 requires more disc-usage and causes more Internet traffic. [Q-2] Has Debian disabled DEP-11 for appstream by default - and why? [Q-3] PackageKit - really required? Check what GNOME is using for their (default) grahical package-manager. [Q-4] File-format XB? Inspectable? Files: de_DE-local-metainfo.xb and de_DE-os-catalog.xb (inspectable via appstreamcli?) -dileks // 15-Jan-2023: Replace en_EN by en_US; New QUESTIONS; Clarify on system and user catalog files -dileks // 14-Jan-2023: Initial release