Comments (7)
( Obviously neither number is perfect on its own, but having a high-water and a low-water mark can greatly accelerate working out the bulk of the most important values )
from gentoo-scripts.
This shouldn't be to difficult to implement. You're are right, i'm using git log
to calculate the age and thanks to git it's really easy to add that information.
Is it ok for you to add another 2 columns, something like that:
5|01826|00356|7|00121|00013|-|dev-perl/CPAN-Changes|CPAN-Changes-0.400.2(2015-09-07)|CPAN-Changes-0.400.2-r1(2020-05-08)|[email protected]
The third column would represent the days since last modification for the old ebuild.
The sixt column would represent the days since last modification for the new ebuild.
from gentoo-scripts.
Is it ok for you to add another 2 columns, something like that:
Yeah, my internal "map columns to fields" is flexible, designed in mind with the assumption keys may change or key orders might change.
for my $line (@lines) {
my %rec;
@rec{
qw(old_eapi old_age new_eapi new_age has_bugs cat_pn old_ebuild new_ebuild maintainers junk)
} = split /\|/, $line;
@rec{qw(cat pn)} = split q[/], $rec{cat_pn};
$rec{maintainers} = [ split /:/, $rec{maintainers} ];
for (qw( old new )) {
my $ebuild = delete $rec{ $_ . '_ebuild' };
$ebuild =~ /\A(.*?)\(([^)]+)\)\z/;
$rec{$_} = {
eapi => delete $rec{ $_ . '_eapi' },
age => delete $rec{ $_ . '_age' },
ebuild => "$1",
date => "$2",
};
if ( $rec{$_}->{ebuild} =~ /\A\Q$rec{pn}\E-(.*?)\z/ ) {
$rec{$_}->{version} = "$1";
}
}
$rec{age_gap} = $rec{old}->{age} - $rec{new}->{age};
push @recs, \%rec;
}
from gentoo-scripts.
Well, after toying around a bit I realized it's not so easy to update the script after all.
The problem is not to get the value, but it's more like a performance issue. I already cheat a bit with the current script to calculate the age of the ebuilds (this is why i include the date in brackets - it's easier to calculate the age with that date instead of calculating it each day with git log
, which is unfortunately quite slow...
There are now a few possibilities how to improve that. But before working around to get a solution i'll prefer to improve the script as a whole. I already have something in my mind, but i need a bit more time to work out the changes.
Also, since i was mentioned the date in the brackets - do you actually need this? As i said this is rather a hack to improve the calculations and if possible i would get rid of it. However in case you need them i could keep them.
I'll keep you updated.
from gentoo-scripts.
I don't need them as such, just the formatting as-is enticed me into parsing it out and putting it in its own field :)
Having the actual dates is helpful, because sometimes the relative dates aren't so obvious, but logically, if you can calculate the age, then you can calculate the date from that, as long as you know what "now" is. ( Though obviously, "now" is not "now", but "when the data was last calculated" )
from gentoo-scripts.
Ok, i finally could update my script. The output now look something like this:
5|01549|00160|7|00004|-----|-|dev-perl/File-Tempdir|File-Tempdir-0.20.0-r1|File-Tempdir-0.20.0-r2|[email protected]
5|01549|00160|7|00003|-----|-|dev-perl/File-Type|File-Type-0.220.0-r1|File-Type-0.220.0-r2|[email protected]
5|01549|01290|7|00330|00275|+|dev-perl/Fuse|Fuse-0.16.1|Fuse-0.16.1-r1|[email protected]
5|01549|00275|7|00013|-----|-|dev-perl/PerlIO-Layers|PerlIO-Layers-0.11.0|PerlIO-Layers-0.11.0-r1|[email protected]:[email protected]
5|01549|00213|6|00974|00504|+|dev-perl/Sys-CPU|Sys-CPU-0.610.0|Sys-CPU-0.610.0-r1|[email protected]
5|01549|00160|6|00422|-----|-|dev-perl/Tk-CursorControl|Tk-CursorControl-0.400.0-r1|Tk-CursorControl-0.400.0-r3|[email protected]
5|01549|00160|6|00906|00169|+|dev-perl/Unicode-Map8|Unicode-Map8-0.130.0|Unicode-Map8-0.130.0-r1|[email protected]
5|01549|00160|6|00898|00169|+|dev-perl/X11-Protocol|X11-Protocol-0.560.0-r1|X11-Protocol-0.560.0-r2|[email protected]
This should be live tomorrow. Also, -----
means that this ebuild wasn't modified yet. If there some changes you would like to have, please let me know. Also, as mentioned, i removed the date in the brackets but could be added again anytime.
I hope this helps you.
from gentoo-scripts.
I'm going to close this, please open another issue if you need some other changes.
from gentoo-scripts.
Related Issues (20)
- FR: check for git:// usage HOT 1
- FR: high profile QA issues. HOT 7
- FR: lists sorted by number HOT 4
- FR: detailed EAC-STA-ebuild_obsolete_eapi breakdown HOT 5
- EAPI-7 ideas HOT 1
- FR: live ebuilds not on latest EAPI HOT 4
- Repo request: abendbrot HOT 1
- FR: Checks when BDEPEND should be used instead HOT 1
- Deptree for eclasses? HOT 4
- FR: implicit eclass inheritance HOT 4
- FR: breakdown of cmake-multilib usage by maintainer/etc HOT 2
- FR: SRC_URI="${P}.tar.gz" HOT 1
- FR: docinto without any followup dodoc
- Website should indicate some sort of contact details (github, dev names, etc) HOT 2
- EAC-STA-ebuild_stable_candidates is confusing and broken looking HOT 4
- date math confused by reverts of older revision HOT 4
- FR: Non-HTML index format for machine consumption (JSON?) HOT 3
- Consider running scripts for GURU overlay HOT 2
- eclassusage.sh false positives HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gentoo-scripts.