After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 797330 - Remove duplication in source URLs from common providers
Remove duplication in source URLs from common providers
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: cerbero
unspecified
Other All
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-10-24 01:46 UTC by Nirbheek Chauhan
Modified: 2018-10-24 12:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
cerbero: Add a new version URL identifier %(maj_ver)s (1.79 KB, patch)
2018-10-24 01:46 UTC, Nirbheek Chauhan
committed Details | Review
Implement source url templating for recipes (36.62 KB, patch)
2018-10-24 01:46 UTC, Nirbheek Chauhan
committed Details | Review

Description Nirbheek Chauhan 2018-10-24 01:46:28 UTC
We've been duplicating code and using inconsistent download servers for sources downloaded from common providers such as GNOME, GNU, SourceForge, etc. This simplifies and consolidates them using templates.
Comment 1 Nirbheek Chauhan 2018-10-24 01:46:35 UTC
Created attachment 374016 [details] [review]
cerbero: Add a new version URL identifier %(maj_ver)s

For use in URLs that use the first two version components in the URL.
Comment 2 Nirbheek Chauhan 2018-10-24 01:46:40 UTC
Created attachment 374017 [details] [review]
Implement source url templating for recipes

GNOME, GNU, Savannah, Xiph, and SourceForge source URLs now use
templates. More templates can be added in the future. Currently, they
can be one of the following forms:

  scheme://

This will download a file called %(name)s-%(version)s.tar.xz from the
canonical place on the specified server. `scheme` can be: gnome, sf,
gnu, savannah.

  scheme://.tar.gz

For using the template but with the specified file extension instead
of .tar.xz

  scheme://some/path/to/name-version.tar.xz

For using the template only for the mirror domain and common sources
path.
Comment 3 Sebastian Dröge (slomo) 2018-10-24 08:51:45 UTC
Review of attachment 374016 [details] [review]:

::: cerbero/build/source.py
@@ +69,3 @@
             # gst-libav-1.0, etc is useless for substitution, convert to 'gst-libav'
             name = name[:-4]
+        maj_ver = '.'.join(self.version.split('.')[0:2])

Just wondering if we should be so lazy, or if we should write major out
Comment 4 Nirbheek Chauhan 2018-10-24 12:17:41 UTC
With `major_version` url lines were exceeding the line limit and wrapping in my terminal. :D

Attachment 374016 [details] pushed as cfaf102 - cerbero: Add a new version URL identifier %(maj_ver)s
Attachment 374017 [details] pushed as cb104a0 - Implement source url templating for recipes