Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
emerge progress info (package count)
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
Small_Penguin
Tux's lil' helper
Tux's lil' helper


Joined: 27 May 2005
Posts: 146

PostPosted: Thu Aug 29, 2024 8:31 am    Post subject: emerge progress info (package count) Reply with quote

When emerging packages, the progress is written as 'emerge (3 of 1400)'. Are these numbers available as environment variables that I can use e.g. in /etc/portage/bashrc?
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3687
Location: Rasi, Finland

PostPosted: Thu Aug 29, 2024 10:19 am    Post subject: Reply with quote

Looks like you cannot access those numbers from portage's bashrc.

Portage's bashrc is more targeted to perform actions inside package functions, not in the emerge process (which runs the former).

So basically we're looking at emerge here to provide these values.

Then there's a hacky way to tail -F /var/log/emerge.log and parse it on-the-fly. qlop does parse emerge.log. Does it already provide what you need?
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Small_Penguin
Tux's lil' helper
Tux's lil' helper


Joined: 27 May 2005
Posts: 146

PostPosted: Thu Aug 29, 2024 11:44 am    Post subject: Reply with quote

Pity, but I've already expected it. I am already using qlop to get the average time to merge a package, notifying me of merges that will take longer than a few minutes via ntfy.sh. I can probably hook in another call to qlop in there, it's a fine tool btw, better than genlop which I've been using for a long time.
Back to top
View user's profile Send private message
eeckwrk99
Apprentice
Apprentice


Joined: 14 Mar 2021
Posts: 231
Location: Gentoo forums

PostPosted: Thu Aug 29, 2024 12:02 pm    Post subject: Reply with quote

Small_Penguin wrote:
Pity, but I've already expected it. I am already using qlop to get the average time to merge a package, notifying me of merges that will take longer than a few minutes via ntfy.sh. I can probably hook in another call to qlop in there, it's a fine tool btw, better than genlop which I've been using for a long time.

app-portage/emlop is really good as well.
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