Skip to content
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

changelog2spec: emailonly option for debian too #1020

Open
yvs2014 opened this issue Aug 12, 2024 · 0 comments
Open

changelog2spec: emailonly option for debian too #1020

yvs2014 opened this issue Aug 12, 2024 · 0 comments

Comments

@yvs2014
Copy link

yvs2014 commented Aug 12, 2024

Hi everyone,

with osc build and debian changelog there's a bit annoying messages from rpmlint like:

pingpath.src: W: no-version-in-last-changelog
The latest changelog entry doesn't contain a version. Please insert the
version that is coherent with the version of the package and rebuild it.

it comes from changelog2spec when it auto-detects changelog in debian format.
Following openSUSE/rpmlint-checks#37 it's connected with email address wrapped into < >
In this case parse_suse() emailonly option (https://github.com/openSUSE/obs-build/blob/master/changelog2spec#L133)
can be useful to avoid this warning for debian changelog too, something like

diff --git a/changelog2spec b/changelog2spec
index 863ec18..e03805b 100755
--- a/changelog2spec
+++ b/changelog2spec
@@ -130,7 +130,6 @@ sub parse_suse {
   $dt = lc($dt);
   $who =~ s/^\s+//;
   $who =~ s/^-\s*//;
-  $who = $1 if $emailonly && $who =~ /\<(.*)\>/;
   $dt =~ /([0-9][0-9][0-9][0-9])/;
   $dline = $_;
   my $year = $1;
@@ -260,6 +259,7 @@ while(defined($_)) {
   } elsif ($format eq 'debian') {
     ($_, $t, $dline, $who, $changes) = parse_debian($_);
   }
+  $who = $1 if $emailonly && $who =~ /\<(.*)\>/;
   if (defined($lastt) && $lastt < $t) {
     die("changes file not incremental: $dline\n") if $test;
     warn("changes file not incremental: $dline\n");

if there's another options how to avoid that warning I would appreciate for hints

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant