Bug#407701: dh_desktop: please generate the ${Mime-Types} variable
Le lundi 09 avril 2007 à 19:22 -0400, Joey Hess a écrit : Josselin Mouette wrote: No. If you really think it deserves a debate, I can ask somewhere, but I wonder where would be a suitable place. I'm more interested in whether it's going to be used and who plans to use it. I plan to use it in nautilus (or probably a nautilus plugin), to propose package installations for handling files with recognized MIME types but no installed application handling them. The debhelper-side implementation is not optimal because it requires modifying the control file to add this field, but I'm not aware of any way to automatically add a field. -- .''`. : :' : We are debian.org. Lower your prices, surrender your code. `. `' We will add your hardware and software distinctiveness to `-our own. Resistance is futile.
Bug#407701: dh_desktop: please generate the ${Mime-Types} variable
Le mardi 10 avril 2007 à 09:10 +0200, Josselin Mouette a écrit : The debhelper-side implementation is not optimal because it requires modifying the control file to add this field, but I'm not aware of any way to automatically add a field. Come to think of it, I could extract this information periodically from a mirror and include it directly in a package. Far from optimal either, as the package would need periodic uploads. -- .''`. : :' : We are debian.org. Lower your prices, surrender your code. `. `' We will add your hardware and software distinctiveness to `-our own. Resistance is futile. signature.asc Description: Ceci est une partie de message numériquement signée
Bug#407701: dh_desktop: please generate the ${Mime-Types} variable
Josselin Mouette wrote: The attached patch to dh_desktop creates a ${Mime-Types} substitution variable, containing the list of supported MIME types in the shipped .desktop files. The goal is to create for packages a new field: XB-Mime-Types: ${Mime-Types} In the end, it could be used by Debian-specific tools to look for an application supporting a specific MIME type. Has this been discussed somewhere already? -- see shy jo signature.asc Description: Digital signature
Bug#407701: dh_desktop: please generate the ${Mime-Types} variable
Le lundi 09 avril 2007 à 15:53 -0400, Joey Hess a écrit : Josselin Mouette wrote: The attached patch to dh_desktop creates a ${Mime-Types} substitution variable, containing the list of supported MIME types in the shipped .desktop files. The goal is to create for packages a new field: XB-Mime-Types: ${Mime-Types} In the end, it could be used by Debian-specific tools to look for an application supporting a specific MIME type. Has this been discussed somewhere already? No. If you really think it deserves a debate, I can ask somewhere, but I wonder where would be a suitable place. -- .''`. : :' : We are debian.org. Lower your prices, surrender your code. `. `' We will add your hardware and software distinctiveness to `-our own. Resistance is futile. signature.asc Description: Ceci est une partie de message numériquement signée
Bug#407701: dh_desktop: please generate the ${Mime-Types} variable
Josselin Mouette wrote: No. If you really think it deserves a debate, I can ask somewhere, but I wonder where would be a suitable place. I'm more interested in whether it's going to be used and who plans to use it. -- see shy jo signature.asc Description: Digital signature
Bug#407701: dh_desktop: please generate the ${Mime-Types} variable
Package: debhelper Severity: wishlist Tags: patch The attached patch to dh_desktop creates a ${Mime-Types} substitution variable, containing the list of supported MIME types in the shipped .desktop files. The goal is to create for packages a new field: XB-Mime-Types: ${Mime-Types} In the end, it could be used by Debian-specific tools to look for an application supporting a specific MIME type. Furthermore, it doesn't create the postinst/postrm scripts when no MIME types are supported, as in this case they are not necessary. -- .''`. : :' : We are debian.org. Lower your prices, surrender your code. `. `' We will add your hardware and software distinctiveness to `-our own. Resistance is futile. --- /usr/bin/dh_desktop 2006-01-04 02:20:51.0 +0100 +++ dh_desktop 2007-01-20 17:53:39.0 +0100 @@ -32,8 +32,15 @@ # usr/share/applications and thus might need # update-desktop-database be called. Other desktop # files don't. - my $desktop_files = `find $tmp/usr/share/applications -type f -name \\*.desktop -printf '%p\n'`; - if ($desktop_files ! $dh{NOSCRIPTS}) { + my $do_scripts = 0; + + foreach my $file (split /\n/, `find $tmp/usr/share/applications -type f -name \\*.desktop -printf '%p\n'`) { + foreach my $type (split /\;/, `sed -n s/^MimeType=//p $file`) { +$do_scripts = 1; +addsubstvar($package, Mime-Types, $type); + } + } + if ($do_scripts ! $dh{NOSCRIPTS}) { autoscript($package,postinst,postinst-desktop); autoscript($package,postrm,postrm-desktop); } signature.asc Description: Ceci est une partie de message numériquement signée