Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Does not read MediaBaseUrl field in DEP-11 files #70
Comments
|
So, the reasons I'm not particularly happy about MediaBaseUrl are the following:
|
Still, in case I want to rewrite the URL, I would have to go through the whole file, know the previous URL and string-replace it with the new URL. By having MediaBaseUrl, I just have to change one field.
No sure what you mean here... Thing is: If there is a MediaBaseUrl field in the document, all remote URLs are relative to the url. So if MediaBaseUrl is "http://example.org", a screenshot "url" will be "a/ab/abcde.desktop/image.png" and the baseurl will just be added to that.
Why would you want to merge files? We don't do that with DEP-11 data, so it's kind of irrelevant. And yes, you would remove the MediaBaseUrl from the resulting file on a merge and use full URLs, which isn't a problem, since the default case is non-merged, "pure" DEP-11 YAML documents, and not merged ones.
Yes - didn't I state that already? Although, right now, remote icons aren't used, so this mainly affects screenshots.
Why? When I implemented this in libappstream, it didn't impact parsing speed at all, since it's just a string to hold in memory, and a couple of extra string concatenantions if the string is found to be non-NULL when reading remote media.
That will happen in future, probably (e.g. by having a list of mirrors in the header). It's more to have an extensible specification from the beginning. |
|
This is fixed now, thanks Robert! |
ximion commentedDec 16, 2015
Hi!
The
MediaBaseUrlfield in DEP-11 files is used as a "prefix" for media URLs, i.e. URLs of screenshots or icons of theremotetype.See the specification: http://www.freedesktop.org/software/appstream/docs/sect-AppStream-DEP11.html#spec-dep11-general
It fills in the same role
Originalready has, and allows for easily switching the server which serves the media, which is a desired feature at Debian for derivatives as well as it will become useful in a setup where multiple mirrors exist for media content.With the current implementation, asglib prevents GNOME-Software from showing any screenshots at all on Debian.
reference files for testing: ftp://ftp.debian.org/debian/dists/sid/main/dep11/
Cheers,
Matthias