! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
mismatched names between thunar.appdata.xml and thunar.desktop.
Status:
RESOLVED: FIXED

Comments

Description Maurizio Galli 2019-05-29 14:05:52 CEST
Created attachment 8597 
appdata.xml patch

I'd like to submit this patch that fixes a name "issue" for having a capital T in Thunar desktop file.

The patch renames Thunar.desktop to  thunar.desktop to solve potential installation system problems see: https://bugzilla.opensuse.org/show_bug.cgi?id=952324

We are currently using this in openSUSE but perhaps that it can be useful upstream also.
Comment 1 alexxcons editbugs 2019-05-30 22:41:40 CEST
Hmm, for <name>Thunar File Manager</name>, I am fine.
Though for <id type="desktop">thunar.desktop</id>, I am sceptic.  The current ID "org.xfce.Thunar" is not only used in appdata.xml, but as well in many others, as name of the dbus service and interface name. ( e.g. see org.xfce.Thunar.service.in or main.c:60)

I dont know much about AppStream. I just fear that it is more than a coincidence that both files use the same name/id.
Possibly you can point me to some documentation regarding the "id type" ?
Comment 2 Maurizio Galli 2019-05-31 03:45:49 CEST
sorry I made a mistake in explaining the problem. I what happens is org.xfce.thunar.appdata.xml.in vs org.xfce.Thunar, the latter not matching the appdata filename because of the capital T. 

The difference in name causes the backend of our package manager zypper to fail installing the package.

The origin of the patch is best explained in comments 1 and 11 of the link I provided

https://bugzilla.opensuse.org/show_bug.cgi?id=952324#c1

https://bugzilla.opensuse.org/show_bug.cgi?id=952324#c11

```
That one can be seen as a libzypp bug or a thunar bug; the fix is
certainly easier in Thunar.

The package provides:
  appdata(thunar.appdata.xml)
and
  application(Thunar.desktop)

Now, thunar does not really do anything 'invalid' there, as the
provided appdata.xml correctly references Thunar.desktop, but libzypp
falls on the nose with it.

For this error to disappear, the appdata file and the .desktop file
should use the same basename.

So the easiest fix is for Thunar to rename thunar.appdata.xml to
Thunar.appdata.xml; then the problem disappears (do not rename the
.desktop file, or you will need to patch the appdata.xml, which
references the .desktop file by name)

In the longer run, libzypp might need a fix to not be so pedantic about
it (the AppData standard does not mandate the names to be equal; but
from any upstream project PoV, it's good practice to reuse the naming
schemes throughout the project anyway).
```

> 
> I dont know much about AppStream. I just fear that it is more than a
> coincidence that both files use the same name/id.
> Possibly you can point me to some documentation regarding the "id type" ?

https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html
Comment 3 alexxcons editbugs 2019-05-31 23:13:21 CEST
Ok, just that I get it right, so you now propose to dont apply the patch above any more, but to just rename  thunar.appdata.xml instead ?

Since all other appdata and .desktop files I have on my system are starting with lower-case, I would rather rename "Thunar.desktop" to "thunar.desktop", together with patching "thunar.appdata.xml" accordingly.

... to be consistant, I than would as well rename "Thunar-bulk-rename.desktop" and "Thunar-folder-handler.desktop" accordingly.

I would push such a fix only to master, since it is not directly a bugfix for thunar itself, and there is the risk to break something for 1.8.7
Comment 4 Maurizio Galli 2019-06-01 06:44:53 CEST
(In reply to alexxcons from comment #3)
> Ok, just that I get it right, so you now propose to dont apply the patch
> above any more, but to just rename  thunar.appdata.xml instead ?

no I wasn't directly suggesting that although it is an option perhaps. I was just describing the issue. That patch I submitted is currently used in openSUSE to prevent the install errors. 

> Since all other appdata and .desktop files I have on my system are starting
> with lower-case, I would rather rename "Thunar.desktop" to "thunar.desktop",
> together with patching "thunar.appdata.xml" accordingly.
> 
> ... to be consistant, I than would as well rename
> "Thunar-bulk-rename.desktop" and "Thunar-folder-handler.desktop" accordingly.
> 
> I would push such a fix only to master, since it is not directly a bugfix
> for thunar itself, and there is the risk to break something for 1.8.7

Yes makes sense. We package git master as well as testing/development ground so I can help you test it
Comment 5 Andre Miranda editbugs 2019-06-01 21:15:52 CEST
Related to Bug 15394.
Comment 6 alexxcons editbugs 2019-06-04 00:15:47 CEST
Created attachment 8611 
rename to lower case

Attached a patch proposal to rename Thunar-*.desktop to thunar-*.desktop
Could you please give it a try ?

Note that the patch of Bug #15373 will be required as well, otherwise the bulk renamer desktop file will not work.

Note that you will need the pull the latest master, since I just dumped  Thunar-folder-handler.desktop (Bug #15467)
Comment 7 alexxcons editbugs 2019-06-04 10:27:31 CEST
Created attachment 8614 
rename to lower case

minor change: forgot to update the po/POTFILES.in
Comment 8 Maurizio Galli 2019-06-04 16:11:03 CEST
so far so good I think. I was able to install successfully and everything seems to be working.

The only thing is this: https://bugzilla.xfce.org/show_bug.cgi?id=15373#c5
Comment 9 alexxcons editbugs 2019-06-04 21:47:20 CEST
Thanks for testing !
Heh, for the first I did not want to save the world, but just fix this bug :)  .... further renaming possibly will be done later.
Comment 10 Git Bot editbugs 2019-06-04 21:58:22 CEST
Alexander Schwinn referenced this bugreport in commit 95676ef52e95c27a7b9db379d4f6218854bc3fb5

mismatched names between thunar.appdata.xml and thunar.desktop (Bug #15498)

https://git.xfce.org/xfce/thunar/commit?id=95676ef52e95c27a7b9db379d4f6218854bc3fb5
Comment 11 alexxcons editbugs 2019-06-04 21:59:57 CEST
fixed for master
Comment 12 Git Bot editbugs 2019-08-30 03:34:32 CEST
Alexander Schwinn referenced this bugreport in commit c1fa044ad44b673e7c4a75f13c9d4f3a523ba9fb

mismatched names between thunar.appdata.xml and thunar.desktop (Bug #15498)

https://git.xfce.org/xfce/thunar/commit?id=c1fa044ad44b673e7c4a75f13c9d4f3a523ba9fb
Comment 13 Andre Miranda editbugs 2019-08-30 03:38:30 CEST
*** Bug 13398 has been marked as a duplicate of this bug. ***

Bug #15498

Reported by:
Maurizio Galli
Reported on: 2019-05-29
Last modified on: 2019-08-30
Duplicates (1):
  • 13398 Some desktop files start with big letter some small

People

Assignee:
alexxcons
CC List:
3 users

Version

Version:
unspecified

Attachments

appdata.xml patch (615 bytes, text/plain)
2019-05-29 14:05 CEST , Maurizio Galli
no flags
rename to lower case (2.57 KB, patch)
2019-06-04 00:15 CEST , alexxcons
no flags
rename to lower case (3.06 KB, patch)
2019-06-04 10:27 CEST , alexxcons
no flags

Additional information