diff --git a/check_source.pl b/check_source.pl index fe403e46..bd998bbf 100644 --- a/check_source.pl +++ b/check_source.pl @@ -247,45 +247,4 @@ for my $rpmlint (glob("$dir/*rpmlintrc")) { } } -exit($ret) if $ret; - -# now check if the change is small enough to warrent a review-by-mail -exit(0) unless -d $old; - -sub prepare_package($) { - - my $files = shift; - - unlink glob "*.changes"; # ignore changes - unlink glob "*.tar.*"; # we can't diff them anyway - unlink glob "*.zip"; - - # restore original spec file - for my $spec (glob("*.beforeurlstrip")) { - my $oldname = $spec; - $oldname =~ s/.beforeurlstrip//; - rename($spec, $oldname); - } - - for my $spec (glob("*.spec")) { - open(SPEC, "/usr/lib/obs/service/format_spec_file.files/prepare_spec $spec | grep -v '^#' |"); - my @lines = ; - close(SPEC); - open(SPEC, ">", $spec); - print SPEC join('', @lines); - close(SPEC); - } -} - -# move it back so we also diff the service file -if (-f "$dir/_service.bak") { - rename("$dir/_service.bak", "$dir/_service") || die "rename failed"; -} - -my %files; -chdir($old); -prepare_package(\%files); -chdir($odir2); -chdir($dir); -prepare_package(\%files); -exit(0); +exit($ret); diff --git a/check_source.py b/check_source.py index 978d17e4..33b53caf 100755 --- a/check_source.py +++ b/check_source.py @@ -283,8 +283,8 @@ class CheckSource(ReviewBot.ReviewBot): self.review_messages[ 'declined'] = f"Services are only allowed if their mode is one of {allowed}. Please change the mode of $name and use `osc service localrun/disabledrun`." return False - # move it away to have full service from source validator - os.rename(servicefile, servicefile + '.bak') + # remove it away to have full service from source validator + os.unlink(servicefile) return True def source_has_correct_maintainers(self, source_project):