gentoo-perl / genlop Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v2.0
License: GNU General Public License v2.0
Often, the merge time of some packages differs massively between versions. For example, on one of my machines, it took 9 minutes and 30 seconds to merge llvm-3 and 32 minutes to merge llvm-14. I think it would be useful to compute the merge time of packages using the last logged merge time as an estimate, rather than averaging all logged merge times. Possibly, one could have a flag to switch between the two behaviours.
Beside the ETA for the current package it would be helpful to also display a percentage or progress bar.
Please add the following powerful feature in genlop -c:
Beside the single ETA for the current package please add the ETA for all the pending packages.
As one one of the core features of genlop is the ETA calculation based on the emerge.log, another interesting calculation would be the total ETA for all the pending packages, which could also be easily possible.
However I guess that the calculation only based on emerge.log could be quite expensive and running a watch -n1 -cd genlop -c
for some 50+ pending packages even more. Therefore a database replacing emerge.log could be required for such things.
Additionally I'm rotating and compressing my logs:
# cat /etc/logrotate.d/emerge
/var/log/emerge.log {
create 660 portage portage
rotate 2
size 2M
maxage 220
nodateext
compresscmd /bin/bzip2
uncompresscmd /bin/bunzip2
compressext .bz2
}
# type genlop
genlop is a function
genlop ()
{
local opts args;
for args in "$@";
do
opts+=("$args");
done;
for logfile in /var/log/emerge.log*;
do
if [[ -r "$logfile" ]]; then
opts+=(-f "$logfile");
fi;
done;
command genlop "${opts[@]}"
}
First:
$ genlop -c
Currently merging 1 out of 1
* sys-boot/grub-2.02_beta2-r3
current merge time: 7 minutes and 44 seconds.
ETA: 1 minute and 23 seconds.
Currently merging 473 out of 485
* sys-devel/gcc-4.8.4
current merge time: 1 hour, 53 minutes and 5 seconds.
ETA: any time now.
A little bit later:
$ genlop -c
Currently merging 473 out of 485
* sys-devel/gcc-4.8.4
current merge time: 1 hour, 56 minutes and 27 seconds.
ETA: 1 hour, 36 minutes and 33 seconds.
Currently merging 1 out of 1
* sys-boot/grub-2.02_beta2-r3
current merge time: 11 minutes and 11 seconds.
ETA: 1 hour, 39 minutes and 53 seconds.
If the project was adapted to gettext, I would take up Russian translation of it.
Instead of using watch -n1 -cd genlop -c
it could be interesting to add a --monitor mode doing the same thing.
I guess that genlop -c
always needs to parse the emerge.log, being an expensive call every 1s using watch.
Adding a --monitor mode could improve the calculation by only parsing once in a while.
This would make genlop be a real emerge monitor, adding ETA and progress calculations that emerge itself doesn't provide.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.