This is the mail archive of the
cygwin-apps-cvs
mailing list for the cygwin-apps project.
[calm - Cygwin server-side packaging maintenance script] branch master, updated. 20171204-3-ga01b40b
- From: jturney at sourceware dot org
- To: cygwin-apps-cvs at sourceware dot org
- Date: 12 Jan 2018 16:13:34 -0000
- Subject: [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20171204-3-ga01b40b
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=a01b40b06b2623becbffb4e65c32981060801290
commit a01b40b06b2623becbffb4e65c32981060801290
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Thu Oct 5 12:23:19 2017 +0100
Add a disable-check: key in pvr.hint to disable certain checks
Add a disable-check: key in pvr.hint to disable certain checks, to gradually
supersede the static list in past_mistakes (which needs calm restarting to
re-read)
disable-check: contains a list of tokens, which indicates which checks are
to be downgraded from errors to warnings
in pvr.hint, disable-check: can contain:
empty-obsolete
check that if a binary package is empty and has no source package, it
is marked obsolete
unique-version
check that this binary package has the same version as all other
packages made from the same source package
These disable-check:s end up being applied to new versions when something is
split out from an existing source. That kind of suggests something is not
quite right about the test we are doing here. But we are limited because we
don't have a source-centric view of things due to source packages not really
being a thing yet...
Diff:
---
calm/hint.py | 7 +++----
calm/package.py | 8 +++++---
calm/past_mistakes.py | 6 ++++++
3 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/calm/hint.py b/calm/hint.py
index 2f4b8f4..7e30913 100755
--- a/calm/hint.py
+++ b/calm/hint.py
@@ -81,10 +81,9 @@ hintkeys[pvr] = merge_dicts(commonkeys, {
'depends': 'optval',
'build-depends': 'optval',
'obsoletes': 'optval',
- # mark the package as a test version
- 'test': 'noval',
- # version override
- 'version': 'val',
+ 'test': 'noval', # mark the package as a test version
+ 'version': 'val', # version override
+ 'disble-check': 'val',
})
hintkeys[override] = merge_dicts(versionkeys, overridekeys)
diff --git a/calm/package.py b/calm/package.py
index 48da76b..1d808bf 100755
--- a/calm/package.py
+++ b/calm/package.py
@@ -641,7 +641,8 @@ def validate_packages(args, packages):
if ('source' not in packages[p].vermap[vr]) and ('external-source' not in packages[p].version_hints[vr]):
if 'install' in packages[p].vermap[vr]:
if packages[p].tar(vr, 'install').is_empty:
- if p in past_mistakes.empty_but_not_obsolete:
+ if ((p in past_mistakes.empty_but_not_obsolete) or
+ ('empty-obsolete' in packages[p].version_hints.get('disable-check', ''))):
lvl = logging.DEBUG
else:
lvl = logging.ERROR
@@ -731,8 +732,9 @@ def validate_packages(args, packages):
if re.match(r'^lib.*\d', install_p):
continue
- # ignore specific packages
- if install_p in past_mistakes.nonunique_versions:
+ # ignore specific packages we disable this check for
+ if ((install_p in past_mistakes.nonunique_versions) or
+ ('unique-version' in packages[install_p].version_hints[packages[install_p].best_version].get('disable-check', ''))):
continue
versions[packages[install_p].best_version].append(install_p)
diff --git a/calm/past_mistakes.py b/calm/past_mistakes.py
index 09ca445..25da561 100644
--- a/calm/past_mistakes.py
+++ b/calm/past_mistakes.py
@@ -104,6 +104,8 @@ self_source = [
# these are packages which currently have versions different to all the other
# install packages from the same source package
+#
+# don't add to this list, use 'disable-check: unique-version' in pvr.hint instead
nonunique_versions = [
'bzr-debuginfo', # debuginfo from NMU needs to age out
'cgdb-debuginfo', # debuginfo from NMU needs to age out
@@ -152,12 +154,16 @@ nonunique_versions = [
]
# packages with an empty install file, no source, but aren't obsolete
+#
+# don't add to this list, use 'disable-check: empty-obsolete' in pvr.hint instead
empty_but_not_obsolete = [
'libpopt0', # version 1.16-1 was empty
'libpopt-devel', # version 1.16-1 was empty (x86_64)
]
# packages with timestamp anomalies
+#
+# don't add to this list, use 'disable-check: curr-most-recent' in override.hint instead
mtime_anomalies = [
'gcc-java',
'gcc-tools-epoch2-autoconf',