dependencies: trisquel: go back to apt (instead of packagekit).

In the commit 0f74569af0 ("dependencies:
switch arch, debian, fedora35, ubuntu2004 to packagekit"), the
Trisquel script was converted to use packagekit to then be able to
unify the dependency management between several distributions.

However GNU Boot doesn't build directly on Parabola, and the build is
completely untested on Fedora and Void, so the other scripts are less
important. In contrast building GNU Boot is regularely tested on
PureOS 10 (byzantium) and Trisquel 11 (aramo).

Since the Guix debootstrap package can be used to safely create
chroots of PureOS and Trisquel, it may be possible to use that to
build GNU Boot on any distributions.

However packagekit requires a daemon to work:
    # pkcon install guix
    Failed to contact PackageKit: Could not connect:
    No such file or directory

And in turn the /usr/libexec/packagekitd daemon requires dbus as shown
by the /lib/systemd/system/packagekit.service file:
    [Unit]
    Description=PackageKit Daemon
    # PK doesn't know how to do anything on ostree-managed systems;
    # currently the design is to have dedicated daemons like
    # eos-updater and rpm-ostree, and gnome-software talks to those.
    ConditionPathExists=!/run/ostree-booted
    Wants=network-online.target

    [Service]
    Type=dbus
    BusName=org.freedesktop.PackageKit
    User=root
    ExecStart=/usr/libexec/packagekitd

So reverting back to apt seems a safe choice for now.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
This commit is contained in:
Denis 'GNUtoo' Carikli 2024-11-22 23:14:33 +01:00 committed by Adrien 'neox' Bourmault
parent c7fb95844f
commit 3f85c3ff22
Signed by: neox
GPG Key ID: 57BC26A3687116F6
1 changed files with 2 additions and 7 deletions

View File

@ -30,13 +30,8 @@ install_packages()
{
to_install=""
# Users might run Trisquel in various languages, and it is easier to
# grep for 'Installed' in the language being used than properly setup
# everything to use the right locale for the given situation.
installed="$(pkcon resolve packagekit-tools | tail -n1 | awk '{print $1}')"
for package in $@ ; do
if pkcon resolve ${package} | grep "^${installed}" 2>&1>/dev/null ; then
if dpkg -l "${package}" | grep "^ii" 2>&1>/dev/null ; then
continue
else
to_install="${to_install} ${package}"
@ -44,7 +39,7 @@ install_packages()
done
if [ -n "${to_install}" ] ; then
pkcon -y --allow-reinstall install ${to_install}
apt install -y ${to_install}
fi
}