GNOME Bugzilla – Bug 797330
Remove duplication in source URLs from common providers
Last modified: 2018-10-24 12:17:49 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.
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.
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.
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
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