Add default value for component patches
If no patches are specified for particular component, we now look for them in conf/patches/<component_name>/<section>, where section is 'download' or 'package'. Change-Id: Iee40ef1eee13783650929525d478195cc0428170 Fixes: bug 1194187
This commit is contained in:
parent
b504addad5
commit
c939d48904
@ -16,6 +16,7 @@ from anvil.components import base
|
|||||||
from anvil import downloader as down
|
from anvil import downloader as down
|
||||||
from anvil import log as logging
|
from anvil import log as logging
|
||||||
from anvil import patcher
|
from anvil import patcher
|
||||||
|
from anvil import settings
|
||||||
from anvil import shell as sh
|
from anvil import shell as sh
|
||||||
from anvil import trace as tr
|
from anvil import trace as tr
|
||||||
from anvil import utils
|
from anvil import utils
|
||||||
@ -66,7 +67,8 @@ class PkgInstallComponent(base.Component):
|
|||||||
def list_patches(self, section):
|
def list_patches(self, section):
|
||||||
what_patches = self.get_option('patches', section)
|
what_patches = self.get_option('patches', section)
|
||||||
if not what_patches:
|
if not what_patches:
|
||||||
what_patches = []
|
what_patches = [sh.joinpths(settings.CONFIG_DIR, 'patches',
|
||||||
|
self.name, section)]
|
||||||
canon_what_patches = []
|
canon_what_patches = []
|
||||||
for path in what_patches:
|
for path in what_patches:
|
||||||
if sh.isdir(path):
|
if sh.isdir(path):
|
||||||
|
Loading…
Reference in New Issue
Block a user