#147 Use new src.fp.o anongiturl
Merged 6 years ago by cqi. Opened 6 years ago by cqi.
cqi/fedpkg use-new-anongiturl  into  master

@@ -3,7 +3,7 @@ 

  lookasidehash = sha512

  lookaside_cgi = https://src.stg.fedoraproject.org/repo/pkgs/upload.cgi

  gitbaseurl = ssh://%(user)s@pkgs.stg.fedoraproject.org/%(module)s

- anongiturl = git://pkgs.stg.fedoraproject.org/%(module)s

+ anongiturl = https://src.stg.fedoraproject.org/git/%(module)s

  branchre = f\d$|f\d\d$|el\d$|olpc\d$|master$

  kojiprofile = stg

  build_client = koji

file modified
+1 -1
@@ -3,7 +3,7 @@ 

  lookasidehash = sha512

  lookaside_cgi = https://src.fedoraproject.org/repo/pkgs/upload.cgi

  gitbaseurl = ssh://%(user)s@pkgs.fedoraproject.org/%(module)s

- anongiturl = git://pkgs.fedoraproject.org/%(module)s

+ anongiturl = https://src.fedoraproject.org/git/%(module)s

  branchre = f\d$|f\d\d$|el\d$|olpc\d$|master$

  kojiprofile = koji

  build_client = koji

file modified
+8
@@ -217,6 +217,14 @@ 

          in Koji.

          """

  

+     def construct_build_url(self):

+         """Override build URL for Fedora Koji build

+ 

+         In Fedora Koji, anonymous URL should have prefix "git+https://"

+         """

+         url = super(Commands, self).construct_build_url()

+         return 'git+{0}'.format(url)

+ 

      def retire(self, message):

          """Delete all tracked files and commit a new dead.package file

  

file modified
+14
@@ -329,3 +329,17 @@ 

  

          koji_session.getBuildTarget.assert_called_once_with('rawhide')

          self.assertEqual('28', result)

+ 

+ 

+ class TestOverrideBuildURL(CommandTestCase):

+     """Test Commands.construct_build_url"""

+ 

+     @patch('pyrpkg.Commands.construct_build_url')

+     def test_override(self, super_construct_build_url):

+         super_construct_build_url.return_value = 'https://localhost/rpms/pkg'

+         cmd = self.make_commands()

+ 

+         overrided_url = cmd.construct_build_url()

+         self.assertEqual(

+             'git+{0}'.format(super_construct_build_url.return_value),

+             overrided_url)

Looks good to me. This can be safely merged before the rpkg patch (it just won't do anything).

rebased onto 53757bf

6 years ago

Rebased. No changes to this patch.

Pull-Request has been merged by cqi

6 years ago