[matter] add soft-blocker parameter support

This commit is contained in:
Fabio Erculiani
2013-01-05 12:36:01 +00:00
parent 0288622c7c
commit dda574e080
6 changed files with 37 additions and 0 deletions
+10
View File
@@ -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)]
+7
View File
@@ -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,
+5
View File
@@ -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
+5
View File
@@ -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
+5
View File
@@ -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
+5
View File
@@ -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