Skip to content

Commit

Permalink
Good feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Johnny Bieren <[email protected]>
  • Loading branch information
johnbieren committed Jan 4, 2018
1 parent 6fc055e commit 897f582
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion JenkinsfileTrigger
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ node('master') {
# If $? -eq 0, we care about package
if [ $CHKR_RC -eq 0 ]; then
valid=1
# If $? -eq 2, upstream package list didnt exist so use legacy method to check
# If $? -eq 2, upstream package list didn't exist so use legacy method to check
elif [ $CHKR_RC -eq 2 ]; then
for package in $(cat ${PROJECT_REPO}/config/package_list); do
if [ "${package}" = "${fed_repo}" ]; then
Expand Down
11 changes: 6 additions & 5 deletions utils/package_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import sys
import os.path

# Exit 2 if upstream package list doesnt exist
# Exit 1 if file exists, but package isnt in the list
# Exit 2 if upstream package list doesn't exist
# Exit 1 if file exists, but package isn't in the list

jsonpath = 'fedora-atomic/fedora-atomic-host-base.json'

Expand All @@ -13,15 +13,16 @@
print("Could not find upstream package json file")
sys.exit(2)

jsonfile = open(jsonpath, 'r').read()
atomicjson = json.loads(jsonfile)
mypackage = sys.argv[1]

with open(jsonpath, 'r') as f:
atomicjson = json.load(f)

# Check if package exists in the json file
# Check both all packages and x86_64 specific packages
if mypackage in atomicjson["packages"] or mypackage in atomicjson["packages-x86_64"]:
print ("Package of interest!")
sys.exit(0)

# Fail if not
sys.exit(1)

0 comments on commit 897f582

Please sign in to comment.