如何解决AppImage元数据验证失败的问题?

问题描述 投票:0回答:1

我在将

AppStream upstream metadata
添加到我的 AppImage 项目时遇到困难。

以下是我的AppImage项目的文件结构:

something.AppDir
  |__AppRun
  |__io.github.accountname.repositoryname.desktop
  |__icon.png
  |__usr
      |__share
           |__metainfo
                |__io.github.accountname.repositoryname.appdata.xml

在其文件

usr/share/metainfo/io.github.account.project.appdata.xml
中,存在以下与
.desktop
相关的语句:

<launchable type="desktop-id">io.github.accountname.repositoryname.desktop</launchable>

但是,发出命令后:

$ ./appimagetool-x86_64.AppImage something.AppDir

出现这些消息:

appimagetool, continuous build (commit 5735cc5), build <local dev build> built on 2023-03-08 22:52:04 UTC
Using architecture x86_64
/home/user/projects/something.AppDir should be packaged as something-x86_64.AppImage
AppStream upstream metadata found in usr/share/metainfo/io.github.accountname.repositoryname.appdata.xml
Trying to validate AppStream information with the appstreamcli tool
In case of issues, please refer to https://github.com/ximion/appstream
io.github.accountname.repositoryname.appdata.xml
  I: io.github.accountname.repositoryname:~: content-rating-missing
  W: io.github.accountname.repositoryname:~: desktop-file-not-found

✘ Validation failed: warnings: 1, infos: 1, pedantic: 4
run_external: subprocess exited with status 3Failed to validate AppStream information with appstreamcli

appstreamcli validate
成功时,我如何解决这些问题:

$ appstreamcli validate --pedantic something.AppDir/usr/share/metainfo/io.github.accountname.repositoryname.appdata.xml
P: io.github.accountname.repositoryname:22: screenshot-no-caption
P: io.github.accountname.repositoryname:~: releases-info-missing
I: io.github.accountname.repositoryname:~: content-rating-missing
P: io.github.accountname.repositoryname:19: screenshot-no-caption

✔ Validation was successful: infos: 1, pedantic: 3

io.github.account.project.appdata.xml
文件是使用推荐的在线工具

创建的

appimagetool-x86_64.AppImage
来自这里

appimage
1个回答
0
投票

我发现我的问题中提到的文件结构需要更改为:

something.AppDir
  |__AppRun
  |__|__io.github.accountname.repositoryname.desktop
  |__icon.png
  |__usr
      |__share
           |__metainfo
                |__io.github.accountname.repositoryname.appdata.xml
           |__applications
                 |__io.github.accountname.repositoryname.desktop

本质上,

io.github.accountname.repositoryname.desktop
的副本必须放置在新文件夹
something.AppDir/usr/share/applications
中。将此文件在
something.AppDir
中软链接到新的
applications
文件夹将不起作用。他的文件也无法从
something.AppDir
中删除。看起来很奇怪,这样的重复必须存在,但这是我发现的工作
appimagetool-x86_64.AppImage

© www.soinside.com 2019 - 2024. All rights reserved.