summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Barker <pbarker@konsulko.com>2021-02-05 11:26:08 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-02-10 23:48:16 +0000
commit44176bd3858286f09bc4872efad4616dcdc5ff2b (patch)
treeedb8a536d529c2a0d739db2503079c9dbea5908c
parent3b559bb16df9c178401be49c9cb8130b7d7568fd (diff)
downloadpoky-44176bd3858286f09bc4872efad4616dcdc5ff2b.tar.gz
bitbake: hashserv: Support upstream command line argument
The hashserv server already implements support for pulling hash data from another "upstream" server. Add the -u/--upstream argument to the bitbake-hashserv app to expose this functionality to users. (Bitbake rev: 8de510f1de35e581bcd5858edf23619c6a4cf923) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xbitbake/bin/bitbake-hashserv3
1 files changed, 2 insertions, 1 deletions
diff --git a/bitbake/bin/bitbake-hashserv b/bitbake/bin/bitbake-hashserv
index 2669bbd130..ab71f4e6c4 100755
--- a/bitbake/bin/bitbake-hashserv
+++ b/bitbake/bin/bitbake-hashserv
@@ -33,6 +33,7 @@ def main():
33 parser.add_argument('--bind', default=DEFAULT_BIND, help='Bind address (default "%(default)s")') 33 parser.add_argument('--bind', default=DEFAULT_BIND, help='Bind address (default "%(default)s")')
34 parser.add_argument('--database', default='./hashserv.db', help='Database file (default "%(default)s")') 34 parser.add_argument('--database', default='./hashserv.db', help='Database file (default "%(default)s")')
35 parser.add_argument('--log', default='WARNING', help='Set logging level') 35 parser.add_argument('--log', default='WARNING', help='Set logging level')
36 parser.add_argument('-u', '--upstream', help='Upstream hashserv to pull hashes from')
36 parser.add_argument('-r', '--read-only', action='store_true', help='Disallow write operations from clients') 37 parser.add_argument('-r', '--read-only', action='store_true', help='Disallow write operations from clients')
37 38
38 args = parser.parse_args() 39 args = parser.parse_args()
@@ -48,7 +49,7 @@ def main():
48 console.setLevel(level) 49 console.setLevel(level)
49 logger.addHandler(console) 50 logger.addHandler(console)
50 51
51 server = hashserv.create_server(args.bind, args.database, read_only=args.read_only) 52 server = hashserv.create_server(args.bind, args.database, upstream=args.upstream, read_only=args.read_only)
52 server.serve_forever() 53 server.serve_forever()
53 return 0 54 return 0
54 55