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