[matter] add soft-blocker parameter support
This commit is contained in:
@@ -313,6 +313,16 @@ class PackageBuilder(object):
|
||||
# list of _emerge.Package.Package objects
|
||||
package_queue = graph.altlist()
|
||||
|
||||
allow_soft_blocker = self._params['soft-blocker'] == "yes"
|
||||
if not allow_soft_blocker:
|
||||
blockers = [x for x in package_queue if isinstance(x, Blocker)]
|
||||
if blockers:
|
||||
# sorry, we're not allowed to have soft-blockers
|
||||
print_warning("the following soft-blockers were found:")
|
||||
print_warning("\n ".join([x.atom for x in blockers]))
|
||||
print_warning("but 'soft-blocker: no' in config, aborting")
|
||||
return None
|
||||
|
||||
# filter out blockers
|
||||
real_queue = [x for x in package_queue if not isinstance(
|
||||
x, Blocker)]
|
||||
|
||||
@@ -185,6 +185,13 @@ class MatterSpec(GenericSpecFunctions):
|
||||
'desc': "Allow compiling packages even if they "
|
||||
"are not \n\tactually installed on the System? (yes/no)",
|
||||
},
|
||||
'soft-blocker': {
|
||||
'cb': self.valid_yes_no,
|
||||
've': self.ve_string_stripper,
|
||||
'default': "yes",
|
||||
'desc': "Allow soft-blockers in the merge queue?\n "
|
||||
"Packages will be unmerged if yes. (yes/no)",
|
||||
},
|
||||
'pkgpre': {
|
||||
'cb': self.not_none,
|
||||
've': self.ve_string_open_file_read,
|
||||
|
||||
@@ -46,6 +46,11 @@ spm-repository-change-if-upstreamed: yes
|
||||
# Default is: no
|
||||
not-installed: no
|
||||
|
||||
# Allow soft-blockers in the merge queue? Packages will be unmerged if yes.
|
||||
# Valid values are either "yes" or "no"
|
||||
# Default is: yes
|
||||
soft-blocker: yes
|
||||
|
||||
# Allow dependencies to be pulled in?
|
||||
# Valid values are either "yes" or "no"
|
||||
# Default is: no
|
||||
|
||||
@@ -27,6 +27,11 @@ spm-repository-change: yes
|
||||
# Default is: no
|
||||
not-installed: yes
|
||||
|
||||
# Allow soft-blockers in the merge queue? Packages will be unmerged if yes.
|
||||
# Valid values are either "yes" or "no"
|
||||
# Default is: yes
|
||||
soft-blocker: yes
|
||||
|
||||
# Allow dependencies to be pulled in?
|
||||
# Valid values are either "yes" or "no"
|
||||
# Default is: no
|
||||
|
||||
@@ -34,6 +34,11 @@ spm-repository-change-if-upstreamed: yes
|
||||
# Default is: no
|
||||
not-installed: no
|
||||
|
||||
# Allow soft-blockers in the merge queue? Packages will be unmerged if yes.
|
||||
# Valid values are either "yes" or "no"
|
||||
# Default is: yes
|
||||
soft-blocker: yes
|
||||
|
||||
# Allow dependencies to be pulled in?
|
||||
# Valid values are either "yes" or "no"
|
||||
# Default is: no
|
||||
|
||||
@@ -34,6 +34,11 @@ spm-repository-change-if-upstreamed: yes
|
||||
# Default is: no
|
||||
not-installed: no
|
||||
|
||||
# Allow soft-blockers in the merge queue? Packages will be unmerged if yes.
|
||||
# Valid values are either "yes" or "no"
|
||||
# Default is: yes
|
||||
soft-blocker: yes
|
||||
|
||||
# Allow dependencies to be pulled in?
|
||||
# Valid values are either "yes" or "no"
|
||||
# Default is: no
|
||||
|
||||
Reference in New Issue
Block a user