#521 Lookaside API method `get_download_url` doesn't return `hashtype` in URL
Closed: Fixed 4 years ago by onosek. Opened 4 years ago by sturivny.

Code example:

>>> import pyrpkg                                                                                                                                                                     

>>> lc = pyrpkg.lookaside.CGILookasideCache( download_url='https://src.fedoraproject.org/repo/pkgs', upload_url='https://src.fedoraproject.org/repo/pkgs/upload.cgi', hashtype='md5') 
>>> resp_url = lc.get_download_url(name='rpms/wget', filename='wget-1.20.3.tar.gz', hashtype='md5', hash='e8b82b40e270296228094a78d47f81580bdbdea9e6b93fd61b37dccb39430aeb9bda5397dc53a31c952a61629383c7e2a8c8abf414c8a4dd369af6ecf2717e6c')                                                                                                                                       
>>> print(resp_url)

'https://src.fedoraproject.org/repo/pkgs/rpms/wget/wget-1.20.3.tar.gz/md5/e8b82b40e270296228094a78d47f81580bdbdea9e6b93fd61b37dccb39430aeb9bda5397dc53a31c952a61629383c7e2a8c8abf414c8a4dd369af6ecf2717e6c/wget-1.20.3.tar.gz'

resp_url should contain hashtype but it doesn't

API documentation: https://docs.pagure.org/rpkg/api.html#lookaside


Discovered while working on DistroBaker; the workaround is to redefine the object's download_path, which is ugly.

Metadata Update from @onosek:
- Issue set to the milestone: 1.62

4 years ago

Log in to comment on this ticket.

Metadata