[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[pkg-wine-party] Bug#848839: AppStream metadata for Wine



Thanks a lot Matthias!


On 01/12/2017 07:40 PM, Matthias Klumpp wrote:
>> There is a wine.desktop, but for other reasons we only ship it as an
>> example.  Still, other distros probably install it.  However that
>> .desktop file has "NoDisplay=true" so afaik it wouldn't be used for
>> AppStream anyway.
> 
> That's not necessarily the case - if a metainfo file is provided, a
> NoDisplay field is ignored.

Did you use "metainfo" generally here, or specifically for foo.metainfo.xml?


> "desktop" btw is an outdated name, to describe applications you can
> pick the component types "desktop-application" and
> "console-application"

Thanks, changed.

<component type="desktop"> is still widespread in the documentation
(tell me if I should file separate bugreports/submit patches somewhere):

https://www.freedesktop.org/software/appstream/docs/sect-Metadata-Application.html

⁠"Note that the XML root must have the type property set to desktop"
                                                           ^^^^^^^

"All tags defined in the generic component specification are valid for
desktop application components as well."
--> Suggestion: add "(and vice versa)"

https://www.freedesktop.org/software/appstream/docs/chap-Quickstart.html#sect-Quickstart-DesktopApps
"​<component type="desktop">"
                  ^^^^^^^

https://wiki.debian.org/AppStream/Guidelines
"you can tell by the XML root-node having a type="desktop" attribute"
                                                  ^^^^^^^

With appstream 0.10.5-1:
$ appstream-util appdata-from-desktop foo.desktop foo.appdata.xml"
--> type="desktop"



> For the example file:
> The validation fails with:
> 
> Could not parse XML data: Entity: line 2: parser error : Start tag expected, '<'
>     not found
>     <!-- Copyright 2017 Jens Reyer <jre.winesim@gmail.com> -->
>     ^
> 
> I assume this is due to the < being some other character, because
> rewriting the header worked well.

Ouch, thanks! These were 'ZERO WIDTH SPACE' (U+200B) characters. I had
seen "appstream-util validate" complaining, but had assumed I did the
test wrongly.

This was based on the example file from
https://www.freedesktop.org/software/appstream/docs/chap-Quickstart.html,
copied in Debian from firefox to emacs. If I copy to vim I indeed see
them. So I guess the homepage needs to be fixed.



> The icon types "cached", "remote" and "local" are not allowed in
> metainfo files (reminds me to add a validator test for that), only
> "stock" is fine.

Sounds as if you are referring explicitly to "foo.metainfo.xml" files
here. Should I use metainfo.xml or appdata.xml?


https://www.freedesktop.org/software/appstream/docs/chap-CollectionData.html
says "stock icons are loaded from stock."

I don't understand what this exactly means. Where is this stock, and how
is it created/what does it contain?  Do I as packager have any direct
influence on what it contains?


Even if I address all other issues and rename to metainfo.xml I still get:

$ appstream-util validate-relax org.winehq.wine.development.metainfo.xml
org.winehq.wine.development.metainfo.xml: FAILED:
• markup-invalid        : <id> does not have correct extension for kind
Validation of files failed

Is this critical? Can I ignore it or do I need to use type "generic" (I
want to see Wine in Gnome Software Center)?

What do you use to validate?



> Otherwise the file looks fine, a screenshot might be nice though.

Thanks. I'll discuss screenshots and generic release info with upstream,
once I submit it there.


> (Edited file is attached)

Thanks again!


> P.S: Let me know when an updated Wine is uploaded, this will be the
> only app I know which does not use the metainfo file to augment a
> .desktop file, and I am curious to see if the file is handled
> correctly.

Will do, maybe later today.

Greets!
jre
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2017 Jens Reyer <jre.winesim@gmail.com> -->
<component type="desktop-application">
  <id>org.winehq.wine.development</id>
  <metadata_license>FSFAP</metadata_license>
  <project_license>LGPL-2.1+</project_license>
  <name>Wine (development version)</name>
  <summary>Run Windows applications on Linux, BSD, Solaris and Mac OS X</summary>

  <description>
    <p>
      Wine (originally an acronym for "Wine Is Not an Emulator") is a compatibility
      layer capable of running Windows applications on several POSIX-compliant
      operating systems, such as Linux, Mac OSX, &amp; BSD. Instead of simulating
      internal Windows logic like a virtual machine or emulator, Wine translates
      Windows API calls into POSIX calls on-the-fly, eliminating the performance
      and memory penalties of other methods and allowing you to cleanly integrate
      Windows applications into your desktop.
    </p>
  </description>

  <icon type="stock">wine</icon>

  <url type="bugtracker">https://bugs.winehq.org/</url>
  <url type="faq">https://wiki.winehq.org/FAQ</url>
  <url type="help">https://wiki.winehq.org/</url>
  <url type="donation">https://www.winehq.org/donate</url>
  <url type="translate">https://wiki.winehq.org/Translating</url>

  <releases>
    <release version="2.0-rc4" date="2017-01-06">
      <description>
        <p>Bug fixes only, we are in code freeze.</p>
      </description>
    </release>
  </releases>

  <mimetypes>
    <mimetype>application/x-ms-dos-executable</mimetype>
    <mimetype>application/x-msi</mimetype>
    <mimetype>application/x-ms-shortcut</mimetype>
  </mimetypes>
</component>

Reply to: