| |
@@ -30,6 +30,7 @@
|
| |
|
| |
"""
|
| |
program_name = os.path.basename(sys.argv[0])
|
| |
+ is_sig = program_name.endswith('-sig')
|
| |
|
| |
default_user_config_path = os.path.join(
|
| |
os.path.expanduser('~'), '.config', 'rpkg', '%s.conf' % program_name)
|
| |
@@ -45,6 +46,10 @@
|
| |
default='/etc/rpkg/%s.conf' % program_name)
|
| |
parser.add_argument('--user-config', help='Specify a user config file to use',
|
| |
default=default_user_config_path)
|
| |
+ parser.add_argument('--lookaside-structure',
|
| |
+ help='set the lookaside cache structure type use',
|
| |
+ choices=['branch', 'hash'],
|
| |
+ default='hash')
|
| |
|
| |
(args, other) = parser.parse_known_args()
|
| |
|
| |
@@ -57,9 +62,12 @@
|
| |
config = ConfigParser.SafeConfigParser()
|
| |
config.read(args.config)
|
| |
config.read(args.user_config)
|
| |
+ if is_sig:
|
| |
+ config[program_name]['lookaside_structure'] = args.lookaside_structure
|
| |
|
| |
- client = centpkg.cli.centpkgClient(config, name=program_name)
|
| |
+ client = centpkg.cli.centpkgClient(config, name=program_name)
|
| |
client.do_imports(site='centpkg')
|
| |
+ client.update_argparser(is_sig=is_sig)
|
| |
client.parse_cmdline()
|
| |
|
| |
# This is due to a difference argparse behavior to Python 2 version.
|
| |
Changes
--lookaside-structure
(centos-sig cli only) - defaults tohash
if not used