Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
A way to display required update count in notifications?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
xanrer
n00b
n00b


Joined: 18 Nov 2024
Posts: 23

PostPosted: Fri Nov 29, 2024 10:10 pm    Post subject: A way to display required update count in notifications? Reply with quote

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
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1935

PostPosted: Fri Nov 29, 2024 11:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
xanrer
n00b
n00b


Joined: 18 Nov 2024
Posts: 23

PostPosted: Fri Nov 29, 2024 11:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1935

PostPosted: Sat Nov 30, 2024 1:29 am    Post subject: Reply with quote

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
View user's profile Send private message
xanrer
n00b
n00b


Joined: 18 Nov 2024
Posts: 23

PostPosted: Sat Nov 30, 2024 3:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3470

PostPosted: Sat Nov 30, 2024 3:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
xanrer
n00b
n00b


Joined: 18 Nov 2024
Posts: 23

PostPosted: Sat Nov 30, 2024 11:33 pm    Post subject: Reply with quote

[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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum