New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFE: implement fast mode for getting EVR #392
Comments
@n3npq believe me, it is slowest part in my tool ;)
diff --git a/src/main.rs b/src/main.rs
index 4b0f2ff..9306517 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -79,6 +79,7 @@ fn run(opt: &Opt) -> Result<(), Error> {
let atime = author.when();
let datetime =
FixedOffset::east(atime.offset_minutes() * 3600 / 60).timestamp(atime.seconds(), 0);
+ /*
let output = Command::new("rpmspec")
.args(&[
"--srpm",
@@ -92,6 +93,7 @@ fn run(opt: &Opt) -> Result<(), Error> {
workdir.join(&spec).to_str().unwrap(),
])
.output()?;
+ */
let mut chlog_header = format!(
"* {} {} <{}>",
@@ -99,11 +101,13 @@ fn run(opt: &Opt) -> Result<(), Error> {
author.name().unwrap_or("Nobody"),
author.email().unwrap_or("nobody@fedoraproject.org"),
);
+ /*
if output.status.success() {
chlog_header.push_str(&format!(" - {}", String::from_utf8_lossy(&output.stdout)));
} else {
eprintln!("{}", String::from_utf8_lossy(&output.stderr));
}
+ */
let chlog_entry = format!("- {}", commit.summary().unwrap());
Ok(Some(format!("{}\n{}", chlog_header, chlog_entry)))
|
@n3npq it's not single spec.. Its 4000+ different specs. What I wrote there if you run |
That's exactly what it does. |
If I would be querying them sequentially, then it would take hour or so |
yup, wontfix. |
rpmspec is quite slow because it needs to parse whole spec and so on. Would be nice if there would be some flag to turn off
%include
, parsing of all sections and just give me stupid EVR. It won't check spec for correctness and such, but it would be very fast.Just to give some background, I'm writing tool which is generating RPM changelogs out of git history and rpmspec is slowest part in there.
The text was updated successfully, but these errors were encountered: