RaphaelRochet / arch-update

Update indicator for ArchLinux and Gnome-Shell
https://extensions.gnome.org/extension/1010/archlinux-updates-indicator/
GNU General Public License v3.0
232 stars 69 forks source link

[Feature request] Debian and apt #208

Closed Miccio-AN closed 7 months ago

Miccio-AN commented 1 year ago

Is there a way to adapt it to a Debian or derivative distribution that uses APT? Thanks!

RaphaelRochet commented 1 year ago

Hi, Yes it should be possible, although a bit of research may be needed to adjust settings :

Lythenas commented 1 year ago

I'm on Ubuntu 22.04. I used the following:

You need to install update-notifier-common (was already installed for me).

I can add this to the wiki, but would be good if someone validates it first. Possibly also on other debian(-based) distros.

RaphaelRochet commented 1 year ago

Indeed, folder monitoring change needs a restart. I shall fix this.

Miccio-AN commented 1 year ago

I can't find the command to list packages in Debian 12. Maybe can I use something like this?

/bin/apt-get dist-upgrade | grep -o "^[[:digit:]]+"

But: even without the "apt update" command ?

RaphaelRochet commented 1 year ago

Debian 12 does not have "update-notifier-common" package ?

Miccio-AN commented 1 year ago

Apparently not - Unfortunately that package doesn't exist in Debian

RaphaelRochet commented 1 year ago

Fact is, as a normal user yon can't update package list, so you need either something to check updates with no root access (under Arch this what we do) or check for updates in the background. Maybe look into unattended-upgrades package in debian ? It is meant for automatic updates but maybe it can update without installing ? Then something like apt list --upgradeable might be a start point to list upgrades (however it seems not script-friendly)

Lythenas commented 1 year ago

After searching a bit I found this: https://unix.stackexchange.com/a/105486 You might be able to run it without sudo because of the -s (simulate) flag. But not sure.

Although you need to change the output to match what this extension expects.

Miccio-AN commented 1 year ago

In fact, that's exactly what I tried to do. At the moment my system is up to date and it "seems" to work. As soon as I check when there are new updates I will let you know!