Code Monkey home page Code Monkey logo

Comments (13)

bbhtt avatar bbhtt commented on September 3, 2024 1

Yea, that's what I thought too and was asking questions for that.

from appstream.

bbhtt avatar bbhtt commented on September 3, 2024

Reproducer:

manifest
{
  "id": "io.qt.qtwebkit.BaseApp",
  "runtime": "org.kde.Platform",
  "sdk": "org.kde.Sdk",
  "runtime-version": "5.15-23.08",
  "modules": [
    {
      "name": "qtwebkit",
      "buildsystem": "simple",
      "build-commands": [
        "install -Dm644 io.qt.qtwebkit.BaseApp.metainfo.xml -t /app/share/metainfo"
      ],
      "sources": [
        {
          "type": "file",
          "path": "io.qt.qtwebkit.BaseApp.metainfo.xml"
        }
      ]
    }
  ]
}

Metainfo file attached: io.qt.qtwebkit.BaseApp.metainfo.txt

from appstream.

ximion avatar ximion commented on September 3, 2024

Can appstream at least put type=generic in them?

It doesn't have to, this is a valid MetaInfo file. The type attribute is optional, and in its absence, a generic component is assumed.
This is a bug in your parser, not in AppStream.

from appstream.

bbhtt avatar bbhtt commented on September 3, 2024

It doesn't have to, this is a valid MetaInfo file.

That's what it does for a regular application metadata file. So why not here?

from appstream.

ximion avatar ximion commented on September 3, 2024

It doesn't have to, this is a valid MetaInfo file.

That's what it does for a regular application metadata file. So why not here?

Sorry, what? You mean a type="desktop-application" component turns into a generic component in composed metadata? That should never happen...

from appstream.

bbhtt avatar bbhtt commented on September 3, 2024

I seem to have a loose memory of this application https://github.com/saturneric/GpgFrontend/blob/300b372df756e33dbcf65bbdf0f4bce03e42ec79/resource/appstream/com.bktus.gpgfrontend.appdata.xml#L2-L3 with a composed data of type=generic even if it didn't have a type in metainfo file.

Anyway I didn't know typeless metadata is allowed, which seems weird. What's the difference between typeless and type=generic?

from appstream.

ximion avatar ximion commented on September 3, 2024

Yes, but that is how this is supposed to be! A component without type is a generic component. This has been like this since AppStream was created.

from appstream.

ximion avatar ximion commented on September 3, 2024

What's the difference between typeless and type=generic?

There is none. They are the same.

from appstream.

bbhtt avatar bbhtt commented on September 3, 2024

A component without type is a generic component.

So just to clarify, you are saying appstream differs from as-glib by not putting type=generic in the composed catalogue data? (when metainfo file has no type)

If they are the same, is there an issue in putting that explicitly in catalogue data?

Right now catalogue, is split, because as-glib was putting type=generic in catalogue, while appstream is putting none.

from appstream.

ximion avatar ximion commented on September 3, 2024

If they are the same, is there an issue in putting that explicitly in catalogue data?

It's more data added for no reason other than to make a broken parser happy, which is not a good enough reason for me (and in fact, might just break something else if changed).
The appstream-glib parser should parse both variants fine as well, as this has been like this for basically forever.

from appstream.

bbhtt avatar bbhtt commented on September 3, 2024

The case here never came up before, so nobody thought of handling it. Anyway, thanks. It'll be fixed in the backend one way or the other.

from appstream.

ximion avatar ximion commented on September 3, 2024

It's just a "if nothing else defined, assume generic" statement in your parser, so definitely shouldn't be too bad. And then it will be compatible with all AppStream data, no matter the source :-) (well, at least in this particular point ^^).

from appstream.

bbhtt avatar bbhtt commented on September 3, 2024

flathub-infra/website#2633 will fix backend

from appstream.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.