Only search for .desktop files if we have a DESKTOP_APP component
This commit is contained in:
parent
12ca9be289
commit
2a49f8c82c
@ -100,26 +100,20 @@ public:
|
|||||||
// otherwise, screenshots would only get updated if the actual metadata file was touched.
|
// otherwise, screenshots would only get updated if the actual metadata file was touched.
|
||||||
gres.updateComponentGCID (cpt, pkg.ver);
|
gres.updateComponentGCID (cpt, pkg.ver);
|
||||||
|
|
||||||
auto dfp = (cid in desktopFiles);
|
// if we have a desktop-application, find the .desktop file
|
||||||
|
// and merge its metadata with the metainfo file data.
|
||||||
|
// having no .desktop file present is a bug.
|
||||||
|
if (cpt.getKind () == ComponentKind.DESKTOP_APP) {
|
||||||
|
auto dfp = cid in desktopFiles;
|
||||||
if (dfp is null)
|
if (dfp is null)
|
||||||
dfp = (cid ~ ".desktop" in desktopFiles);
|
dfp = (cid ~ ".desktop") in desktopFiles;
|
||||||
if (dfp is null) {
|
if (dfp is null) {
|
||||||
// no .desktop file was found
|
// no .desktop file was found
|
||||||
// finalize GCID checksum and continue
|
// finalize GCID checksum and continue
|
||||||
gres.updateComponentGCID (cpt, data);
|
gres.updateComponentGCID (cpt, data);
|
||||||
|
|
||||||
if (cpt.getKind () == ComponentKind.DESKTOP_APP) {
|
|
||||||
// we have a DESKTOP_APP component, but no .desktop file. This is a bug.
|
|
||||||
gres.addHint (cpt.getId (), "missing-desktop-file");
|
gres.addHint (cpt.getId (), "missing-desktop-file");
|
||||||
continue;
|
// we have a DESKTOP_APP component, but no .desktop file. This is a bug.
|
||||||
}
|
|
||||||
|
|
||||||
// do a validation of the file. Validation is slow, so we allow
|
|
||||||
// the user to disable this feature.
|
|
||||||
if (conf.featureEnabled (GeneratorFeature.VALIDATE)) {
|
|
||||||
if (!dstore.metadataExists (dtype, gres.gcidForComponent (cpt)))
|
|
||||||
validateMetaInfoFile (cpt, gres, data);
|
|
||||||
}
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,6 +127,7 @@ public:
|
|||||||
|
|
||||||
// drop the .desktop file from the list, it has been handled
|
// drop the .desktop file from the list, it has been handled
|
||||||
desktopFiles.remove (cid);
|
desktopFiles.remove (cid);
|
||||||
|
}
|
||||||
|
|
||||||
// do a validation of the file. Validation is slow, so we allow
|
// do a validation of the file. Validation is slow, so we allow
|
||||||
// the user to disable this feature.
|
// the user to disable this feature.
|
||||||
|
Loading…
Reference in New Issue
Block a user