本文整理汇总了Python中gitbuildsys.log.LOGGER.warn方法的典型用法代码示例。如果您正苦于以下问题:Python LOGGER.warn方法的具体用法?Python LOGGER.warn怎么用?Python LOGGER.warn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gitbuildsys.log.LOGGER
的用法示例。
在下文中一共展示了LOGGER.warn方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: export_sources
# 需要导入模块: from gitbuildsys.log import LOGGER [as 别名]
# 或者: from gitbuildsys.log.LOGGER import warn [as 别名]
def export_sources(repo, commit, export_dir, spec, args, create_tarball=True):
"""
Export packaging files using git-buildpackage
"""
tmp = utils.Temp(prefix='gbp_', dirn=configmgr.get('tmpdir', 'general'),
directory=True)
gbp_args = create_gbp_export_args(repo, commit, export_dir, tmp.path,
spec, args, force_native=False,
create_tarball=create_tarball)
try:
ret = gbp_build(gbp_args)
if ret == 2 and not is_native_pkg(repo, args):
errmsg = ("Generating upstream tarball and/or generating patches "
"failed. GBS tried this as you have upstream branch in "
"you git tree. Fix the problem by either:\n"
" 1. Update your upstream branch and/or fix the spec "
"file. Also, check the upstream tag format.\n"
" 2. Remove or rename the upstream branch (change the "
"package to native)\n"
"See https://source.tizen.org/documentation/reference/"
"git-build-system/upstream-package for more details.")
fallback = configmgr.get_arg_conf(args, 'fallback_to_native')
if config_is_true(fallback):
# Try falling back to old logic of one monolithic tarball
log.warn(errmsg)
log.info("Falling back to native, i.e. creating source archive "
"directly from exported commit, without any patches.")
gbp_args = create_gbp_export_args(repo, commit, export_dir,
tmp.path, spec, args,
force_native=True,
create_tarball=create_tarball)
ret = gbp_build(gbp_args)
else:
log.error(errmsg)
if ret:
raise GbsError("Failed to export packaging files from git tree")
except GitRepositoryError, excobj:
raise GbsError("Repository error: %s" % excobj)