View previous topic :: View next topic |
Author |
Message |
xanrer n00b
Joined: 18 Nov 2024 Posts: 23
|
Posted: Fri Nov 29, 2024 10:10 pm Post subject: A way to display required update count in notifications? |
|
|
Is there a command in Gentoo that shows how many updates available at that second, I don't mean the names of the packages I just need the exact number. If there is no command like that no problem either, I can just use `emerge -pv @system | grep Total` too but it wants sudo permissions and the implementation I found is outdated. What I want to do with this information is to send it through notify-send and when I press a certain key combination it just sent me the number. |
|
Back to top |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1935
|
Posted: Fri Nov 29, 2024 11:24 pm Post subject: |
|
|
Please don't use emerge -pv @system for any existing system as it is pointless.
If anything, one should use emerge -pvuDU @world, optionally with --getbinpkg=n if binpkgs are default on, to test for updates. |
|
Back to top |
|
|
xanrer n00b
Joined: 18 Nov 2024 Posts: 23
|
Posted: Fri Nov 29, 2024 11:56 pm Post subject: |
|
|
I got an interesting and really long output from `sudo emerge -pvuDU --getbinpkg=n @world | grep Total`
Firstly, `Total: 119 packages (5 upgrades, 1 downgrade, 109 new, 2 in new slots, 2 reinstalls), Size of downloads: 524498 KiB` it says here 109 and `sudo emerge --sync` doesn't update anything. I thought I made everything binary but seems I somehow failed to do that. I specifically added these 3 lines to `/etc/portage/make.conf`
Code: | FEATURES="getbinpkg"
FEATURES="binpkg-request-signature"
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --getbinpkg" |
Second, despite `| grep Total` it actually gives me the entire output. Which is probably due to me misunderstanding the usage of grep. |
|
Back to top |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1935
|
Posted: Sat Nov 30, 2024 1:29 am Post subject: |
|
|
I have to reconsider that --getbinpkg=n since it can pull in build-time dependencies that can otherwise be skipped. Omitting it should be OK. |
|
Back to top |
|
|
xanrer n00b
Joined: 18 Nov 2024 Posts: 23
|
Posted: Sat Nov 30, 2024 3:04 pm Post subject: |
|
|
Is there a sudo-less way that you are aware of? I don't think I can run a keyboard shortcut that requires sudo permissions. |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3470
|
Posted: Sat Nov 30, 2024 3:10 pm Post subject: |
|
|
emerge -p does not require root. If you run emerge without -p as a regular user, it even ask whether you want to add -p or abort. _________________ Make Computing Fun Again |
|
Back to top |
|
|
xanrer n00b
Joined: 18 Nov 2024 Posts: 23
|
Posted: Sat Nov 30, 2024 11:33 pm Post subject: |
|
|
[Administrator note: this post was originally a Report of the preceding post, but stripped of all the reporting information. As it seems clearly intended to be an ordinary response, I split it from the report thread and moved it here. -Hu]
When I run that command I get the following message: Code: | Permission denied: '/etc/portage/package.use/installkernel' | . When I checked the file I noticed that it's a binary and owned by root. I don't even know what that file does there. Should i chown it or delete it? |
|
Back to top |
|
|
|