]> TLD Linux GIT Repositories - tld-ftp-admin.git/commitdiff
- non-integer releases are ok in TLD master
authorMarcin Krol <hawk@tld-linux.org>
Wed, 3 Apr 2024 20:20:32 +0000 (22:20 +0200)
committerMarcin Krol <hawk@tld-linux.org>
Wed, 3 Apr 2024 20:20:32 +0000 (22:20 +0200)
modules/ftptree.py

index aa00e02f9d3c8e59f52a20a78820d3fbbeba9313..0266342aba810229170991c5215869b044616c1d 100644 (file)
@@ -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)