From: Marcin Krol Date: Wed, 3 Apr 2024 20:20:32 +0000 (+0200) Subject: - non-integer releases are ok in TLD X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=tld-ftp-admin.git - non-integer releases are ok in TLD --- diff --git a/modules/ftptree.py b/modules/ftptree.py index aa00e02..0266342 100644 --- a/modules/ftptree.py +++ b/modules/ftptree.py @@ -107,19 +107,6 @@ class Pkg(BasePkg): """ return file[-8:] == '.src.rpm' - # returns true if package build is integer - def is_release(self): - """ - To account Release tags with subver macros, we consider integer release - if it contains odd number of dots: - - 1 -> True - 0.1 -> False - 0.%{subver}.%{rel}, %{rel} = 1 -> 0.20010.1 -> True - 0.%{subver}.%{rel}, %{rel} = 0.1 -> 0.20010.0.1 -> False - """ - return self.release.count('.') % 2 == 0 - def mark4moving(self): if not self.marked4moving: # Only one pkg in this pool can be marked for moving @@ -317,7 +304,6 @@ class FtpTree(BaseFtpTree): self.__checksigns(dsttree, self.marked4moving, test = True) self.__checkforobsoletes(dsttree, self.marked4moving, test = True) - self.__checkforrelease(dsttree, self.marked4moving, test = True) if not self.treename.count("archive"): self.__rmolderfromsrc(test = True) @@ -558,15 +544,3 @@ class FtpTree(BaseFtpTree): p = findbyname(item) if p: pkg.warning('obsoletes %s (via %s) in dest tree, perhaps you want rmpkg' % (p,pn)) - - def __checkforrelease(self, tree, pkgs, test = False): - """ - Checks queue file if package release is non integer. - - """ - if test != True: - return - - for pkg in pkgs: - if not pkg.is_release(): - pkg.warning('non-integer release: %s' % pkg.release)