#88 Fix --dist/--release option for 'master' %dist detection
Merged 7 years ago by cqi. Opened 7 years ago by praiskup.

file modified
+6 -4
@@ -192,6 +192,10 @@ 

                             'default method: %s' % e)

              super(Commands, self).load_user()

  

+     def _tag2version(self, dest_tag):

+         """ get the '26' part of 'f26-foo' string """

+         return dest_tag.split('-')[0].replace('f', '')

+ 

      # New functionality

      def _findmasterbranch(self):

          """Find the right "fedora" for master"""
@@ -199,8 +203,7 @@ 

          # If we already have a koji session, just get data from the source

          if self._kojisession:

              rawhidetarget = self.kojisession.getBuildTarget('rawhide')

-             desttag = rawhidetarget['dest_tag_name']

-             return desttag.split('-')[0].replace('f', '')

+             return self._tag2version(rawhidetarget['dest_tag_name'])

  

          # Create a list of "fedoras"

          fedoras = []
@@ -233,8 +236,7 @@ 

                  # We couldn't hit koji, bail.

                  raise pyrpkg.rpkgError('Unable to query koji to find rawhide \

                                         target')

-             desttag = rawhidetarget['dest_tag_name']

-             return desttag.replace('f', '')

+             return self._tag2version(rawhidetarget['dest_tag_name'])

  

      def _determine_runtime_env(self):

          """Need to know what the runtime env is, so we can unset anything

Fedpkg asks koji what's the actual fXX number for 'master' branch,
but koji changed it's return value.

Could you please sign-off on your commit? (git commit -s).

This serves as a confirmation that you have the right to submit your changes. See Developer Certificate of Origin for details.

Looks good to me. A similar change already happened in 293dc31, but was apparently incomplete.

rebased

7 years ago

rebased

7 years ago

@lsedlar simplified a bit, and "signed-off", PTAL

Ok, wait a sec, I'll try to do it properly ...

rebased

7 years ago

rebased

7 years ago

Is this required to be released soon?

I'm fine to with backport of upstream patch in local deployment (Red Hat Internal Copr builders) ... no need to hurry with deployment.

It would be nice to get it out, as it should fix #89 as well.

Pull-Request has been merged by cqi

7 years ago
Metadata