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

source-checker: handle add/remove changes files for patch diff check. #673

Merged

Conversation

@jberry-suse
Copy link
Contributor

jberry-suse commented Feb 8, 2017

See sr#455547 which now functions properly.

Before:

Output of check script:
No such file or directory: _old/u-boot-nanopineo.changes at /home/repochecker/src/osc-plugin-factory/source-checker.pl line 203.

After:

INFO:check_source.py:checking 455547
INFO:check_source.py:Base:System/u-boot@230 -> openSUSE:Factory/u-boot
INFO:check_source.py:POST https://api.opensuse.org/request/455547?by_group=None&cmd=addreview
INFO:check_source.py:POST https://api.opensuse.org/request/455547?cmd=addreview&by_user=factory-repo-checker                               
INFO:check_source.py:455547 accepted: Check script succeeded                                                                               
DEBUG:check_source.py:455547 review not changed
@jberry-suse jberry-suse requested a review from DimStar77 Feb 8, 2017
@coveralls

This comment has been minimized.

Copy link

coveralls commented Feb 8, 2017

Coverage Status

Coverage remained the same at 45.346% when pulling 7ae3111 on jberry-suse:source-checker-empty-changes into a782d74 on openSUSE:master.

if (! -e "$old/$changes") {
$diff = diff "/dev/null", "$dir/$changes";
}
elsif (! -e "$dir/$changes") {

This comment has been minimized.

Copy link
@DimStar77

DimStar77 Feb 8, 2017

Contributor

I doubt the new .changes file will ever be missing - as we do run over a glob of changes file in the new package

See sr#455547 which now functions properly.
@jberry-suse jberry-suse force-pushed the jberry-suse:source-checker-empty-changes branch from 7ae3111 to a1ef0c1 Feb 8, 2017
@coveralls

This comment has been minimized.

Copy link

coveralls commented Feb 8, 2017

Coverage Status

Coverage remained the same at 45.346% when pulling a1ef0c1 on jberry-suse:source-checker-empty-changes into a782d74 on openSUSE:master.

@@ -200,7 +200,13 @@ BEGIN
if (%patches) {
# parsing changes
for my $changes (@changes) {
my $diff = diff "$old/$changes", "$dir/$changes";
my $diff = "";

This comment has been minimized.

Copy link
@DimStar77

DimStar77 Feb 8, 2017

Contributor

That one is probably superfluous now - as there is no way we will not do a diff in the end... but that's just nagging around

This comment has been minimized.

Copy link
@jberry-suse

jberry-suse Feb 8, 2017

Author Contributor

The variable needs to be defined outside of condition scope otherwise the diff seems to see nothing. Perhaps an inline if or make a variable for old changes file and set to /dev/null.

@DimStar77 DimStar77 merged commit 1bd141a into openSUSE:master Feb 8, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@jberry-suse jberry-suse deleted the jberry-suse:source-checker-empty-changes branch Feb 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.