Add debcargo unacceptable predicate fixer.
This commit is contained in:
parent
3f27ddb97c
commit
3daeee51b5
1 changed files with 11 additions and 0 deletions
|
@ -111,6 +111,9 @@ from buildlog_consultant.common import (
|
||||||
NeedPgBuildExtUpdateControl,
|
NeedPgBuildExtUpdateControl,
|
||||||
MissingPerlFile,
|
MissingPerlFile,
|
||||||
)
|
)
|
||||||
|
from buildlog_consultant.sbuild import (
|
||||||
|
DebcargoUnacceptablePredicate,
|
||||||
|
)
|
||||||
|
|
||||||
from .build import (
|
from .build import (
|
||||||
DetailedDebianBuildFailure,
|
DetailedDebianBuildFailure,
|
||||||
|
@ -427,6 +430,13 @@ def fix_missing_makefile_pl(error, phase, context):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
def coerce_unaccpetable_predicate(error, phase, context):
|
||||||
|
from debmutate.debcargo import DebcargoEditor
|
||||||
|
with DebcargoEditor(context.abspath('debian/debcargo.toml')) as editor:
|
||||||
|
editor['allow_prerelease_deps'] = True
|
||||||
|
return context.commit('Enable allow_prerelease_deps.')
|
||||||
|
|
||||||
|
|
||||||
class SimpleBuildFixer(BuildFixer):
|
class SimpleBuildFixer(BuildFixer):
|
||||||
def __init__(self, packaging_context, problem_cls: Type[Problem], fn):
|
def __init__(self, packaging_context, problem_cls: Type[Problem], fn):
|
||||||
self.context = packaging_context
|
self.context = packaging_context
|
||||||
|
@ -479,6 +489,7 @@ def versioned_package_fixers(session, packaging_context, apt):
|
||||||
packaging_context, MissingConfigStatusInput, fix_missing_config_status_input
|
packaging_context, MissingConfigStatusInput, fix_missing_config_status_input
|
||||||
),
|
),
|
||||||
SimpleBuildFixer(packaging_context, MissingPerlFile, fix_missing_makefile_pl),
|
SimpleBuildFixer(packaging_context, MissingPerlFile, fix_missing_makefile_pl),
|
||||||
|
SimpleBuildFixer(packaging_context, DebcargoUnacceptablePredicate, coerce_unaccpetable_predicate),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue