#78 Add StreamLookasideCache specific get_download_url method
Merged a year ago by tdawson. Opened a year ago by antbob.
centos/ antbob/centpkg develop  into  develop

@@ -64,6 +64,12 @@ 

              hashtype, download_url, upload_url,

              client_cert=client_cert, ca_cert=ca_cert)

  

+     def get_download_url(self, name, filename, hash, hashtype=None, **kwargs):

+         _name = utils.get_repo_name(name) if is_dist_git(os.getcwd()) else name

+ 

+         return super(StreamLookasideCache, self).get_download_url(

+                 _name, filename, hash, hashtype=hashtype, **kwargs)

+ 

      def remote_file_exists(self, name, filename, hashstr):

          """

          Check if a remote file exists.

Currently the 'pre-push-check' and 'push' fails on a fork because its trying to use the fork namespace for lookaside files uploaded with 'upload/new-sources' prior. Adding StreamLookasideCache specific get_download_url method makes the 'pre-push-check' and 'push' use the correct namespace for lookaside files as it is invoked from the rpkg pre_push_check remote_file_exists_head method.

Pull-Request has been merged by tdawson

a year ago
Metadata