Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/cygwin-apps/calm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2022-06-30 21:07:20 +0300
committerJon Turney <jon.turney@dronecode.org.uk>2022-07-01 14:52:58 +0300
commit78dc0051e7f53830f72c219c437a5b175906dfd2 (patch)
tree6f249b54e9ba4e6587d8f2f1ad721522ecc8c5aa
parenteca3a88d174516051883b5c7404f6985939d4b4e (diff)
Improve deprecated soversion expiry (again)
"unused" should mean "no packages from a different source package depend on it", not "no packages depend on it". e.g. 'bind' produces both 'libdns165', and 'libbind9_140' which depends on it. Both are eligible for expiry when they have no other rdepends outside of 'bind'.
-rwxr-xr-xcalm/package.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/calm/package.py b/calm/package.py
index 6370351..32b4d31 100755
--- a/calm/package.py
+++ b/calm/package.py
@@ -1451,15 +1451,17 @@ def stale_packages(packages):
# shouldn't retain anything.
#
# - shared library packages which don't come from the current version of
- # source (i.e. is superseded or removed), have no packages which depend
- # on them, and are over a certain age
+ # source (i.e. is superseded or removed), have no packages from a
+ # different source package which depend on them, and are over a certain
+ # age
#
mark = Freshness.fresh
if pn.endswith('-debuginfo'):
mark = Freshness.conditional
- if (len(po.rdepends) == 0) and re.match(common_constants.SOVERSION_PACKAGE_RE, pn):
- bv = po.best_version
- es = po.version_hints[bv].get('external-source', None)
+ bv = po.best_version
+ es = po.version_hints[bv].get('external-source', None)
+ if (re.match(common_constants.SOVERSION_PACKAGE_RE, pn) and
+ not any(packages[p].srcpackage(packages[p].best_version) != es for p in po.rdepends)):
if es and (packages[es].best_version != bv):
def dep_so_age_mark(v):
mtime = po.tar(v).mtime