Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

appdata -> metainfo, add support for metainfo files #98

Closed

Conversation

Conan-Kudo
Copy link
Member

@Conan-Kudo Conan-Kudo commented Nov 15, 2016

These provides are specifically for packages providing AppStream files, which are either going to be *.appdata.xml or *.metainfo.xml files in /usr/share/appdata or /usr/share/metainfo.

The upstream AppStream specification mandates *.metainfo.xml files installed into /usr/share/metainfo, but there's still a large body of legacy AppStream files installed in the legacy location.

For now, let's support both under the new metainfo() Provides.

@dnf-bot
Copy link
Member

dnf-bot commented Nov 15, 2016

Can one of the admins verify this patch?

;;
*.metainfo.xml)
echo "appstream()"
echo "appstream(${instfile##*/metainfo/})"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for plugins it should not be same...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*.metainfo.xml is being used for everything now. You can see this in new KDE AppStream files, and GNOME ones as well. They aren't called *.appdata.xml anymore.

@mlschroe
Copy link
Contributor

Wait a sec, those files are appdata, not appstream. Appstream is the data included in repositories. Appdata is the data installed in /usr/share/appdata and /usr/share/metainfo.

@Conan-Kudo
Copy link
Member Author

@mlschroe That's not how @ximion explained it to me. He seemed to indicate that AppStream covers both aspects, and supersedes the old AppData spec.

@Conan-Kudo
Copy link
Member Author

Conan-Kudo commented Nov 15, 2016

Hmm, apparently there is or was a difference between *.appdata.xml and *.metainfo.xml... https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html

@ximion
Copy link

ximion commented Nov 15, 2016

@Conan-Kudo I understand this confusion, as in the early days AppStream was indeed "what distros ship" and the upstream metainfo files followed later, being part of AppStream and making the whole naming a mess. Since naming is especially important for a spec, this stuff is now sorted out properly:

  • Data shipped by upstream projects is called metainfo and stored in /usr/share/metainfo (or the legacy location /usr/share/appdata - whether the files are named .appdata.xml or .metainfo.xml doesn't matter, but convention is to name the metainfo files for applications .appdata.xml
  • Data shipped by distributors is called collection metadata and stored in /usr/(share|lib|cache)/app-info/<format>
  • The whole project and family of specs (which are 90% identical) is called AppStream

The spec uses this terminology consistently, if you find any place where it is misleading or ambiguous, please file a bug against AppStream :-)

So, IMHO either metainfo or appstream would be fine - metainfo would be very accurate, while appstream would indicate that this is metadata that is part of the AppStream spec in general, without telling which particular flavor it is.

@Conan-Kudo
Copy link
Member Author

@ximion Would as-metainfo work better as a name than appstream or metainfo? I want it to be clear what this actually is (a form of AppStream data).

@Conan-Kudo
Copy link
Member Author

I think I want to just leave it as appstream(), as then we won't get bitten again by changes in what actually bits of AppStream are called.

@ximion
Copy link

ximion commented Nov 18, 2016

The naming will never change again, unless we have a really really good reason for breakage (and I see none there).
as-metainfo would be fine if it fits the general style of these RPM names, appstream would also be okay - I don't really have preferences, take whatever you think is best.

@Conan-Kudo Conan-Kudo force-pushed the as_metainfo branch 2 times, most recently from 6d194ff to 3e02fef Compare November 18, 2016 13:26
@Conan-Kudo Conan-Kudo changed the title appdata -> appstream, add support for metainfo files appdata -> metainfo, add support for metainfo files Nov 18, 2016
@Conan-Kudo
Copy link
Member Author

@ximion I've elected to change everything to metainfo(), as it resembles what we did before with calling them appdata().

These provides are specifically for packages providing
AppStream files, which are either going to be *.appdata.xml
or *.metainfo.xml files in /usr/share/appdata or /usr/share/metainfo.

The upstream AppStream specification mandates *.metainfo.xml files
installed into /usr/share/metainfo, but there's still a large body
of legacy AppStream files installed in the legacy location.

For now, let's support both under the new metainfo() Provides.
@ffesti
Copy link
Contributor

ffesti commented Nov 18, 2016

Thanks for the patch! Merged.

@ffesti ffesti closed this Nov 18, 2016
@mlschroe
Copy link
Contributor

How about we remove the appdata provides generator from rpm? It's not used anymore anyway. The reason I added it was so I did not need to fetch the complete package filelist, as /usr/share/appdata is not included in primary.xml. That's why the original generator just added some provides for the file names.

It turned out that this approach wasn't very useful, as some packages used pretty much random filenames instead if the ids. So IMHO scrap the thing. Or replace it with some code that parses the xml data.

@Conan-Kudo Conan-Kudo deleted the as_metainfo branch November 18, 2016 13:42
@Conan-Kudo
Copy link
Member Author

@mlschroe I may come back later to make the generator a little smarter, but I wanted the name/path fixed first, as I rely on it for stuff myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants