mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-30 22:11:59 -09:00
utils/check-package: check files in board/
When a SysV init script is inside package/ it doesn't need to be executable. However, when an init script is inside a fs_overlay, it *does* need to be executable. Therefore, skip the NotExecutable test for init scripts. We detect them based on the directory /etc/init.d Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> [Arnout: update .checkpackageignore] Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
This commit is contained in:
committed by
Arnout Vandecappelle
parent
d775b2ac05
commit
29d6f319a0
@@ -21,6 +21,9 @@ class Indent(_CheckFunction):
|
||||
|
||||
|
||||
class NotExecutable(checkpackagelib.tool.NotExecutable):
|
||||
def ignore(self):
|
||||
return 'etc/init.d/' in self.filename
|
||||
|
||||
def hint(self):
|
||||
return ", just make sure you use '$(INSTALL) -D -m 0755' in the .mk file"
|
||||
|
||||
|
||||
@@ -4,7 +4,12 @@ from checkpackagelib.base import _Tool
|
||||
|
||||
|
||||
class NotExecutable(_Tool):
|
||||
def ignore(self):
|
||||
return False
|
||||
|
||||
def run(self):
|
||||
if self.ignore():
|
||||
return
|
||||
if os.access(self.filename, os.X_OK):
|
||||
return ["{}:0: This file does not need to be executable{}".format(self.filename, self.hint())]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user