Skip to content

Commit

Permalink
Merge pull request openSUSE#382 from b1-systems/changelog2spec-obs_sc…
Browse files Browse the repository at this point in the history
…m-fix

changelog2spec: prefer _service:.*:.*.changes
  • Loading branch information
adrianschroeter authored Nov 22, 2017
2 parents 21e93de + 393c490 commit c83eac0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion changelog2spec
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ if (@ARGV == 2 && $ARGV[0] eq '--file') {
opendir(D, $dir) || die("$dir: $!\n");
my @changes = grep {/\.changes$/} readdir(D);
closedir(D);
@changes = sort {length($a) <=> length($b) || $a cmp $b} @changes;
# support _service: prefixes, they need to be stripped
$file =~ s/^_service:.*://;
my %changes = map {/^((?:_service:.*:)?(.*?))$/ ? ($2, $1) : ($_, $_)} @changes;
@changes = keys %changes;
@changes = sort {length($a) <=> length($b) || $a cmp $b} @changes;
exit(1) unless @changes; # nothing to do
if (@changes > 1) {
while ($file ne '') {
Expand Down

0 comments on commit c83eac0

Please sign in to comment.