diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2022-11-05 18:14:50 +0300 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2022-11-26 19:16:04 +0300 |
commit | 5310473529e6f46de886d2b8f1a7976225ca8bf4 (patch) | |
tree | 688aa59d3b67047c71874d1e225227f39d847e26 | |
parent | cba451e483733c806b386b49ac6bd9c6f2ee1c80 (diff) |
Reject uploads to x86/
-rw-r--r-- | calm/common_constants.py | 3 | ||||
-rw-r--r-- | calm/uploads.py | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/calm/common_constants.py b/calm/common_constants.py index 906a56a..69d7baf 100644 --- a/calm/common_constants.py +++ b/calm/common_constants.py @@ -60,6 +60,9 @@ ORPHANMAINT = '/'.join([ # architectures we support ARCHES = ['x86', 'x86_64'] +# architectures we no longer support +ARCHIVED_ARCHES = ['x86'] + # base directory for HTML output HTDOCS = '/www/sourceware/htdocs/cygwin/' diff --git a/calm/uploads.py b/calm/uploads.py index 2f98fe5..ba18217 100644 --- a/calm/uploads.py +++ b/calm/uploads.py @@ -253,6 +253,13 @@ def scan(scandir, m, all_packages, arch, args): files.remove(f) continue + # ignore uploads for archived arches + if arch in common_constants.ARCHIVED_ARCHES: + logging.warning("discarding %s, %s architecture is archived and read-only" % (fn, arch)) + files.remove(f) + remove.append(fn) + continue + # does file already exist in release area? dest = os.path.join(args.rel_area, relpath, f) if os.path.isfile(dest): |