Browse Source

Fix MIME detection of Python scripts

Christoph Biedl 8 years ago
parent
commit
127c702ba2

+ 25 - 0
debian/patches/cherry-pick.FILE5_24-26-ge92eb5c.python-mime.patch

@@ -0,0 +1,25 @@
+Subject: bump the strength so that we beat the generic script magic
+Origin: FILE5_24-26-ge92eb5c
+Upstream-Author: Christos Zoulas <christos@zoulas.com>
+Date: Tue Sep 8 13:59:44 2015 +0000
+
+--- a/magic/Magdir/python
++++ b/magic/Magdir/python
+@@ -26,12 +26,16 @@
+ 0	belong		0xee0c0d0a	python 3.4 byte-compiled
+ 
+ 0	search/1/w	#!\ /usr/bin/python	Python script text executable
++!:strength + 10
+ !:mime text/x-python
+ 0	search/1/w	#!\ /usr/local/bin/python	Python script text executable
++!:strength + 10
+ !:mime text/x-python
+ 0	search/1	#!/usr/bin/env\ python	Python script text executable
++!:strength + 10
+ !:mime text/x-python
+-0	search/1	#!\ /usr/bin/env\ python	Python script text executable
++0	search/10	#!\ /usr/bin/env\ python	Python script text executable
++!:strength + 10
+ !:mime text/x-python
+ 
+ 

+ 1 - 0
debian/patches/series

@@ -11,3 +11,4 @@
 0012-lxt.patch
 cherry-pick.FILE5_24-22-g27b4e34.parameter-1.patch
 cherry-pick.FILE5_24-23-g4ddb783.parameter-2.patch
+cherry-pick.FILE5_24-26-ge92eb5c.python-mime.patch