View Issue Details

IDProjectCategoryView StatusLast Update
0036627FPCMiscpublic2020-01-26 14:47
ReporterAnton Kavalenka Assigned ToMichael Van Canneyt  
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Product Version3.3.1 
Summary0036627: mime: FPC packages on Linux/UNIX do not register .pp extension mime type as text/x-pascal
DescriptionGenerally it is not FPC but packaging problem and mostly organizational.

xdg-mime query filetype existing_file.pas
text/x-pascal

xdg-mime query filetype existing_file.pas
text/plain

This somewhat confuses utilities that rely on mime-database for syntax highlight etc.

Standard UNIX utility file --mime existing_file.pas treats .pas an .pp as text/plain
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget-
Attached Files

Activities

Anton Kavalenka

2020-01-25 08:45

reporter   ~0120727

sorry, typo in description, please update
xdg-mime query filetype existing_file.pp
text/plain

Michael Van Canneyt

2020-01-25 09:07

administrator   ~0120728

Following debian policy (as noted in /etc/mime.types) packages may not register mime types themselves.
Mime types should be submitted with a bugreport for mime-support.
I have filed the following report to debian:
-------
Dear Maintainer,

The /etc/mime.types file contains a line

text/x-pascal p pas

Since well over 20 years, the Free Pascal compiler (available as a debian package)
uses the extension .pp (Pascal Program) for it's sources.

Please consider changing the registration of text/x-pascal to

text/x-pascal p pas pp

I'm sening this request because the Free Pascal bugtracker contains the
following report by our users, for your reference:
https://bugs.freepascal.org/view.php?id=36627


Following the comments in the /etc/mime.types file,
I submit this bugreport in order to modify the line in order to add the pp extension.

Feel free to contact me for any additional information you need.

Michael.

Anton Kavalenka

2020-01-25 09:33

reporter   ~0120729

Last edited: 2020-01-25 09:44

View 3 revisions

Actually there is global mime database /etc/mime.types (it is maintained by distributive)
and the XDG-specified mime-description which installed into /usr/share/mime/
where types provided by package registered.
These modification are made by following debhelpers in debian:
debian/packagename.sharedmimeinfo
debian/packagename.mime

Other Linux/UNUX flavors whilst conformed to XDG specifications do it in similar way.
https://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec/

Michael Van Canneyt

2020-01-25 10:12

administrator   ~0120730

I assume the file /usr/share/mime/text/x-pascal.xml needs to be updated, and that this must be done by the distribution.

In each case, I consider this a distribution maintainer's job.
We'll see what they answer.

Marco van de Voort

2020-01-25 15:42

manager   ~0120734

- Maybe dpk, lpk, dpr, .lpr too ?
- With pp we might face the "Puppet" problem again that we also had on Ohloh.

Apparently some build tool "Puppet" also uses .pp

Michael Van Canneyt

2020-01-26 00:00

administrator   ~0120746

The other extensions should be handled by the Lazarus team.
I don't think we should do .dpk or .dpr. Embarcadero supports linux, they should handle that.

Marco van de Voort

2020-01-26 14:47

manager   ~0120758

I agree on the .dpk, .dpr.

However won't it be smarter so simply send one request instead of two? And the FPC svn contains 103 lpr and 6 dprs.
's.s.

Issue History

Date Modified Username Field Change
2020-01-25 08:39 Anton Kavalenka New Issue
2020-01-25 08:45 Anton Kavalenka Note Added: 0120727
2020-01-25 09:07 Michael Van Canneyt Assigned To => Michael Van Canneyt
2020-01-25 09:07 Michael Van Canneyt Status new => feedback
2020-01-25 09:07 Michael Van Canneyt FPCTarget => -
2020-01-25 09:07 Michael Van Canneyt Note Added: 0120728
2020-01-25 09:33 Anton Kavalenka Note Added: 0120729
2020-01-25 09:33 Anton Kavalenka Status feedback => assigned
2020-01-25 09:43 Anton Kavalenka Note Edited: 0120729 View Revisions
2020-01-25 09:44 Anton Kavalenka Note Edited: 0120729 View Revisions
2020-01-25 10:12 Michael Van Canneyt Note Added: 0120730
2020-01-25 15:42 Marco van de Voort Note Added: 0120734
2020-01-26 00:00 Michael Van Canneyt Note Added: 0120746
2020-01-26 14:47 Marco van de Voort Note Added: 0120758