Remove diff preparations from check_source.pl

It's dead since #1073 but weren't removed with the actual diffing
This commit is contained in:
Stephan Kulow 2022-03-24 08:32:08 +01:00
parent 1e2565ce50
commit 3a497700f0
2 changed files with 3 additions and 44 deletions

View File

@ -247,45 +247,4 @@ for my $rpmlint (glob("$dir/*rpmlintrc")) {
} }
} }
exit($ret) if $ret; exit($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 = <SPEC>;
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);

View File

@ -283,8 +283,8 @@ class CheckSource(ReviewBot.ReviewBot):
self.review_messages[ 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`." '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 return False
# move it away to have full service from source validator # remove it away to have full service from source validator
os.rename(servicefile, servicefile + '.bak') os.unlink(servicefile)
return True return True
def source_has_correct_maintainers(self, source_project): def source_has_correct_maintainers(self, source_project):