[devel] q: file vs shared-mime-info

Yuri N. Sedunov aris на altlinux.org
Пт Мар 11 15:25:53 UTC 2011


В Птн, 11/03/2011 в 16:27 +0200, Michael Shigorin пишет:
> 	Здравствуйте.
> file -bi test.sh выдаёт test/x-shellscript, в то время как в
> /usr/share/mime/globs присутствует application/x-shellscript;
> в итоге приходится подставлять костыли вместо аккуратного
> преобразования.
> 
> Аналогично из уже найденного:
> application/x-bzip2 -- application/x-bzip
> text/x-c -- text/x-csrc
> text/x-diff -- text/x-patch
> text/x-shellscript -- application/x-shellscript
> 
> Кто-нить в курсе, за чем должен быть приоритет (если в принципе
> существует авторитетный источник)?  Пошёл было в b.fd.o, но решил
> переспросить -- вдруг неправ file.

Подобных примеров есть еще, -- file еще не любит XML, например.
$ test-mime /usr/share/gnome-games/swell-foop/*.js
File "/usr/share/gnome-games/swell-foop/About.js" has a mime-type of application/javascript
File "/usr/share/gnome-games/swell-foop/Board.js" has a mime-type of application/javascript
File "/usr/share/gnome-games/swell-foop/Light.js" has a mime-type of application/javascript
File "/usr/share/gnome-games/swell-foop/main.js" has a mime-type of application/javascript
File "/usr/share/gnome-games/swell-foop/Path.js" has a mime-type of application/javascript
File "/usr/share/gnome-games/swell-foop/Score.js" has a mime-type of application/javascript
File "/usr/share/gnome-games/swell-foop/Settings.js" has a mime-type of application/javascript
File "/usr/share/gnome-games/swell-foop/ThemeLoader.js" has a mime-type of application/javascript

[aris на arisbook PTLens]$ file -i /usr/share/gnome-games/swell-foop/*.js 
/usr/share/gnome-games/swell-foop/About.js:       text/x-c++ charset=us-ascii
/usr/share/gnome-games/swell-foop/Board.js:       text/x-c++ charset=us-ascii
/usr/share/gnome-games/swell-foop/Light.js:       text/x-c++ charset=us-ascii
/usr/share/gnome-games/swell-foop/main.js:        text/x-c++ charset=us-ascii
/usr/share/gnome-games/swell-foop/Path.js:        text/plain charset=us-ascii
/usr/share/gnome-games/swell-foop/Score.js:       text/x-c++ charset=us-ascii
/usr/share/gnome-games/swell-foop/Settings.js:    text/x-c++ charset=us-ascii
/usr/share/gnome-games/swell-foop/ThemeLoader.js: text/plain charset=us-ascii

-- 
Yuri N. Sedunov



Подробная информация о списке рассылки Devel