Encoding is deprecated

Bug #117180 reported by Siegfried Gevatter on 2007-05-27
6
Affects Status Importance Assigned to Milestone
desktop-file-utils
Invalid
Wishlist
desktop-file-utils (Ubuntu)
Wishlist
Unassigned

Bug Description

There is a new version of desktop-file-utils that includes many deprecations and new categories on FreeDesktop's repository. It would be good to update the package to that new one.

Emmet Hikory (persia) on 2007-05-27
Changed in desktop-file-utils:
importance: Undecided → Wishlist
status: Unconfirmed → Confirmed
Siegfried Gevatter (rainct) wrote :

The problem is in file src/validate.c on lines 950-955.

Changed in desktop-file-utils:
status: Confirmed → Unconfirmed
assignee: nobody → rainct
status: Unconfirmed → In Progress
Siegfried Gevatter (rainct) wrote :

Here is a patch that commentes the lines displaying the message out.

Siegfried Gevatter (rainct) wrote :

Sorry, the last patch was wrong.

Here is a working patch (compiled and tested it). It is commenting out all "missing Encoding" stuff, and prints a warning message when it find a Encoding item.

Changed in desktop-file-utils:
assignee: rainct → nobody
status: In Progress → Confirmed
Martin Peeks (martinp23) on 2007-05-27
Changed in desktop-file-utils:
assignee: nobody → martinp23
Martin Peeks (martinp23) on 2007-05-27
Changed in desktop-file-utils:
status: Confirmed → In Progress
Emmet Hikory (persia) on 2007-05-27
Changed in desktop-file-utils:
assignee: martinp23 → rainct
Martin Peeks (martinp23) on 2007-05-27
Changed in desktop-file-utils:
assignee: rainct → nobody
status: In Progress → Confirmed
status: Confirmed → In Progress
Emmet Hikory (persia) on 2007-05-28
Changed in desktop-file-utils:
assignee: nobody → rainct
Emmet Hikory (persia) wrote :

Thanks for the patch. A few notes:

1) It's probably a good idea to add a comment around line 456 that Encoding is deprecated (see other comments in the area. Check the spec to see in which version it was deprecated.

2) You don't need to note the deprecation in the check. Try to more closely mirror the other deprecations

3) As a result of 2), Consider just wrapping lines 729 to 742 in a comment. When you send it upstream, they may consider removing it.

Siegfried Gevatter (rainct) wrote :

Okay, here you have the new one (generated a .deb and tested it, should be working fine).

Changed in desktop-file-utils:
assignee: rainct → nobody
status: In Progress → Confirmed
Emmet Hikory (persia) wrote :

This patch applies cleanly, but I still don't believe it accomplishes the goal of modifying validate.c so that encoding matches the other deprecations. As far as I can see, for other cases where a specific entry is deprecated, the upstream authors have removed the entire handlers for those sections from the source. As we try not to have significantly invasive patches in Ubuntu, I recommend that instead of deleting these sections, you either wrap the entire section in a comment, or prevent compilation if an #ifdef 0 .. #endif construction. You no longer need the child functions, as you have defined TRUE for the Encoding defnition (with { "Encoding", validate_string, TRUE }, /* 0.9.5: deprecated */). This applies to both the section starting at line 729 and the section starting at line 936.

Siegfried Gevatter (rainct) wrote :

Following additional categories were missing (added them):

Publishing Printing Chat TelephonyTools VideoConference ArtificialIntelligence ComputerScience DataVisualization Economy Electricity Geography Geoscience History ImageProcessing Literature NumericalAnalysis Robotics Sports ParallelComputing Compression Documentation

Siegfried Gevatter (rainct) wrote :

Deprecated keys:
 Encoding, FilePattern, Actions, SwallowTitle, SwallowExec

Only for KDE keys:
 Dev, FSType, MountPoint, ReadOnly, UnmountIcon, SortOrder

Siegfried Gevatter (rainct) wrote :

The utility desktop-file-validator has many deprecated entries (like "Encoding"), and some categories are missing.

* http://standards.freedesktop.org/desktop-entry-spec/latest/apc.html

Created an attachment (id=10163)
A fix marking deprecations and adding missing categories

Emmet Hikory (persia) wrote :

Thank you for the continued work to improve desktop-file-validate. This patch applies cleanly, and seems to do many of the right things, but the resulting package does not compile for me. Separately, a few notes:

1) Line 741 of the resulting file compresses an else statement to a single line. Is there a strong reason for this? The typical GNOME practice is to use a separate line excepting when using an else if construction.

2) You probably don't need the definition of fix_encoding around line 924

Siegfried Gevatter (rainct) wrote :

Can you verify with the code that is in cvs? Basically, the validator has been rewritten, so it's very likely that this is already fixed.

Siegfried Gevatter (rainct) wrote :
Siegfried Gevatter (rainct) wrote :
Emmet Hikory (persia) wrote :

This patch looks great. Thanks a lot.

The next step is to get this applied upstream. Please open a bug on http://bugzilla.gnome.org, assign to the desktop-file-utils product, and attach your patch.

It seems the new one is ok, thanks.

Changed in desktop-file-utils:
status: Unknown → Needs Info
Daniel Holbach (dholbach) wrote :

Question from Upstream developers:

------- Comment #2 From Vincent Untz 2007-06-03 12:41:54 PST [reply] -------

Can you verify with the code that is in cvs? Basically, the validator has been
rewritten, so it's very likely that this is already fixed.

Changed in desktop-file-utils:
status: Confirmed → Needs Info
Siegfried Gevatter (rainct) wrote :

This issue is fixed in a new upstream version in CVS, I'll try to package it myself if that's ok.

description: updated
Changed in desktop-file-utils:
assignee: nobody → rainct
status: Needs Info → In Progress
Changed in desktop-file-utils:
status: Needs Info → Rejected
Daniel Holbach (dholbach) wrote :

Sure, let me know if you have something up for review.

Siegfried Gevatter (rainct) wrote :

Fixed with the new release.

desktop-file-utils (0.13-0ubuntu1) gutsy; urgency=low

  * New upstream release

 -- Baptiste Mille-Mathias <email address hidden> Mon, 11 Jun 2007 08:58:58 +0200

Changed in desktop-file-utils:
assignee: rainct → nobody
status: In Progress → Fix Released
Changed in desktop-file-utils:
importance: Unknown → Wishlist
Changed in desktop-file-utils:
importance: Wishlist → Unknown
Changed in desktop-file-utils:
importance: Unknown → Wishlist
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.