Uploaded image for project: 'Funtoo Linux'
  1. Funtoo Linux
  2. FL-9609

metatools: tag_gen ignores "rc" releases

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Normal Normal
    • None
    • None

      the `tag_gen()` function in github.py looks for tags using a regex:
      match = re.search('([0-9.]+)', tag_data['name'])
      if match:
      yield match.groups()[0], tag_data

      what this does is ignore versions like "251rc1" and changes them to "251", leaving a mismatched ebuild <-> package versions, causing failures.

      Replacing those three lines above with the following three lines:
      version = packaging.version.parse(tag_data['name'])
      if version:
      yield version, tag_data

      This results in an accurate version parsing for tag_data. Note that the return function would then be simply:

      return max(versions_and_tag_elements)

      Patch attached.

      Use case: This would now enable e.g. the systemd-tmpfiles package to use the tag_gen() command instead of creating its own tags searcher function

            Unassigned Unassigned
            seemant seemant
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: