From e4919568ebef6c745fbd7ed6d96829018e563288 Mon Sep 17 00:00:00 2001 From: Marcus Huewe Date: Tue, 5 May 2015 23:39:58 +0200 Subject: [PATCH] - do_build: added --trust-all-projects option --trust-all-projects can be used to disable the trusted project check --- osc/build.py | 5 +++-- osc/commandline.py | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/osc/build.py b/osc/build.py index 05beb530..50aa8c85 100644 --- a/osc/build.py +++ b/osc/build.py @@ -765,8 +765,9 @@ def main(apiurl, opts, argv): enable_cpio = not opts.disable_cpio_bulk_download, cookiejar=cookiejar) - # implicitly trust the project we are building for - check_trusted_projects(apiurl, [ i for i in bi.projects.keys() if not i == prj ]) + if not opts.trust_all_projects: + # implicitly trust the project we are building for + check_trusted_projects(apiurl, [ i for i in bi.projects.keys() if not i == prj ]) # now update the package cache fetcher.run(bi) diff --git a/osc/commandline.py b/osc/commandline.py index 33e1a6a4..ff355b32 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -5579,6 +5579,8 @@ Please submit there instead, or use --nodevelproject to force direct submission. help=SUPPRESS_HELP) @cmdln.option('--host', metavar='HOST', help='perform the build on a remote server - user@server:~/remote/directory') + @cmdln.option('--trust-all-projects', action='store_true', + help='trust packages from all projects') def do_build(self, subcmd, opts, *args): """${cmd_name}: Build a package on your local machine