From 8a302e32154c84ee4a1c99645b500f4d6944c7e1 Mon Sep 17 00:00:00 2001 From: Henrik Triem <henrik.triem@icinga.com> Date: Sun, 9 Oct 2022 22:01:51 +0000 Subject: [PATCH] Require only a single .rpm file when uploading --- icinga-build-upload-aptly | 10 ++-------- icinga-build-upload-aptly-subscription | 8 +------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/icinga-build-upload-aptly b/icinga-build-upload-aptly index 0fbfbf6..731331f 100755 --- a/icinga-build-upload-aptly +++ b/icinga-build-upload-aptly @@ -31,16 +31,10 @@ def scan_dir(path, pattern): return found def detect_rpm(path): - source = scan_dir(path, '*.src.rpm') rpms = scan_dir(path, '*.rpm') - if len(source) == 0: + if len(rpms) == 0: return [] - elif len(source) != 1: - raise StandardError, 'There more than one source RPM in ' + path - - if len(rpms) < 2: - raise StandardError, 'There should be at least 2 RPMS in ' + path - + return rpms def detect_deb(path): diff --git a/icinga-build-upload-aptly-subscription b/icinga-build-upload-aptly-subscription index d63c388..7af00e1 100755 --- a/icinga-build-upload-aptly-subscription +++ b/icinga-build-upload-aptly-subscription @@ -31,15 +31,9 @@ def scan_dir(path, pattern): return found def detect_rpm(path): - source = scan_dir(path, '*.src.rpm') rpms = scan_dir(path, '*.rpm') - if len(source) == 0: + if len(rpms) == 0: return [] - elif len(source) != 1: - raise StandardError, 'There more than one source RPM in ' + path - - if len(rpms) < 2: - raise StandardError, 'There should be at least 2 RPMS in ' + path return rpms -- GitLab