View previous topic :: View next topic |
Author |
Message |
Princess Firefly Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 21 Apr 2002 Posts: 80
|
Posted: Tue Mar 18, 2003 3:03 am Post subject: Rough, estimated time of completion and progbar for builds |
|
|
This topic has come up in a couple of different Places without really having anything done about it.
I've written a script that can be used to show you a progress bar and an estimated time of completion for a build. It does not require a database of compile times or any thing crazy like that. It simply looks at how many gcc or g++ commands are needed for a specific build and bases the time remaining on the speed of compilation so far. It's not exact but in all my tests it's more accurate than I thought it would be (within a few minutes). It certainly can indicate if you should shut off the monitor and go to bed or stay up and wait for the build to finish.
The reason I'm posting this in a new topic is because I've taken it about as far as my programming abilities/time to learn new stuff can go. I think nobody will notice this in the bottom of a 'gentoo chat' post and it seems to be a feature that some people really want.
Limits: I don't know how to integrate it with portage. It seems like it'd be an easy task but I don't know how to go about it. Also, the way it stands right now, it only works for one package. Someone with more portage knowledge could probably extend it to display info about a series of builds being done (like an update world).
Also, this is the first script I've ever written so the ASCII art is pretty bad. Someone could probably easily make this script better and take out the crappy 'clear' commands I have in there for the progress bar drawing.
I hope this or something like this gets into portage, it would make emerging stuff so much nicer.
Download script HERE |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
AlterEgo Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/173811519640c8947cd3c4d.gif)
Joined: 25 Apr 2002 Posts: 1619
|
Posted: Tue Mar 18, 2003 4:08 pm Post subject: |
|
|
This is an interesting approach. I appreciate your efforts.
I'll certainly try this one, if it's possible to integrate this into portage. A separate script and running a separate ./configure is just not practical enough for me. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Princess Firefly Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 21 Apr 2002 Posts: 80
|
Posted: Sun Mar 23, 2003 10:18 am Post subject: script updated |
|
|
I'm not sure if anyone is paying attention but if you are: I've updated the script. The output is a lot nicer, cleaner, and quicker and there are no more issues with standard error wrecking the nice output (figured out how to redirect it). The only thing I've got to do now is figure out how to integrate it the script into portage. Download it using the link in my first post. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
AlterEgo Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/173811519640c8947cd3c4d.gif)
Joined: 25 Apr 2002 Posts: 1619
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
nikai Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/3e63c1143da47227a2316.png)
Joined: 02 Oct 2002 Posts: 270 Location: Kitzbühel, Austria
|
Posted: Sun Mar 23, 2003 4:46 pm Post subject: |
|
|
I guess one place for adding your script to portage would be
/usr/lib/portage/bin/emake
So it would get executed every time that "emake" gets called.
However, not every ebuild uses "emake", and some more than once. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
xenon Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/101277991346af3f245582b.png)
Joined: 25 Dec 2002 Posts: 432 Location: Europe
|
Posted: Sun Mar 23, 2003 5:02 pm Post subject: |
|
|
It's a good idea, I hope it makes it to portage in an "official" way. ![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Princess Firefly Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 21 Apr 2002 Posts: 80
|
Posted: Mon Mar 24, 2003 8:18 am Post subject: integration |
|
|
thanks nikai for the advice about emake.
I've figured out how to get it to work for most ebuilds. There are some problems still I have to figure out. For example openssl does some really funky stuff in their config file soo this deosn't work that that package and I have no idea why. Try this out though, I'm loving it so far.
What happens is you are renaming make to make2. Every make call passes through this script. If it is initiated from /usr/tmmp/portage it is interpreted as a portage call and the progress bar is displaayed. Otherwise it just calls make2 as normal so technically this should only effect emerges not any other makes that you do.
To install: [as root]
- Rename make to make2 (cd /usr/bin; mv make make2)
- Save this script as make (cp /where/ever/you/dl/Progressbar.sh /usr/bin/make)
- Make executable (chmod a+x /usr/bin/make
That's it. Builds initiated from /var/tmp/portage (ie using emerge) will now display a progress bar for the make commands as well as estimated time of completion.
To uninstall:
- rm /usr/bin/make
- mv /usr/bin/make2 /usr/bin/make
There you have it. Remember this is my first script and my first attempt messing around with portage so, while I am grateful for bug reports and comments, don't cry to me if you break something. libghttp is a nice little test package, I'm trying it with various packages and everything is fine so far. Remember do not use this with openssl. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Princess Firefly Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 21 Apr 2002 Posts: 80
|
Posted: Wed Mar 26, 2003 7:19 am Post subject: problems |
|
|
well, it's working great for the majority of packages but for some (openssl, mozilla, xfree) it does something funky with make and for some reason the commands aren't getting through.
If I rename make to make2 and write a script called make and all it does is "make2 $*" it seems to me like it should work fine for every make call (all make calls passed to make2 with the same parameters...) For some reason it doesn't for a few packages.
Anyway, if you're playing with this script watch the output for errors cause I haven't figured this out yet.
xpfx |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
amne Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/117771253447ad6e0ae3631.gif)
Joined: 17 Nov 2002 Posts: 6378 Location: Graz / EU
|
Posted: Sat May 01, 2004 9:01 pm Post subject: |
|
|
Moving from Portage & Programming to Duplicate Threads. There are quite some threads about this topic and it seems to make most sense to me to ask everyone to redirect further comments to Emerge progress bar which seems to be the longest thread about this topic. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|