From 90b65807ff85c3cf4acae227045ebaa377f083e5 Mon Sep 17 00:00:00 2001 From: Sebastien Luttringer Date: Wed, 21 Dec 2011 12:31:59 +0100 Subject: [PATCH] remove --force-offline repo option --no-sync as the same beneficts --- bin/is | 13 ++++--------- completion/bash/is | 4 ++-- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/bin/is b/bin/is index 7ac4382..5048bdb 100755 --- a/bin/is +++ b/bin/is @@ -46,13 +46,10 @@ def load_repositories(args): if args.repo_path is not None: repoman.register(RepositoryConfig(istools.smd5sum(args.repo_path)[:8], path=args.repo_path), temp=True, - nosync=args.no_sync, - offline=hasattr(args, "force_offline") and args.force_offline) + nosync=args.no_sync) # load repo configs from config for repoconf in RepoConfigFile(args.repo_config).repos: - repoman.register(repoconf, - nosync=args.no_sync, - offline=hasattr(args, "force_offline") and args.force_offline) + repoman.register(repoconf, nosync=args.no_sync) return repoman def split_repository_list(repolist, filter=None): @@ -424,9 +421,9 @@ def c_repo(args): ''' Get information about repositories ''' - # in cleaning mode we doesn't needs to get repositories + # in cleaning mode we doesn't needs to sync repositories if args.purge: - args.force_offline = True + args.no_sync = True repoman = load_repositories(args) for pattern in args.repository: if args.purge: @@ -687,8 +684,6 @@ def parser_init(): help="display repository url") p.add_argument("--purge", action="store_true", default=False, help="remove cache databases") - p.add_argument("--force-offline", action="store_true", default=False, - help="force repository to be offline") p.add_argument("repository", nargs='*', default=["*"], help="repository pattern") p.set_defaults(func=c_repo) # search command parser diff --git a/completion/bash/is b/completion/bash/is index c9ae2e9..835ad69 100644 --- a/completion/bash/is +++ b/completion/bash/is @@ -3,12 +3,12 @@ # list local repositories _local_repo() { - COMPREPLY=("${COMPREPLY[@]}" $(compgen -W "$(is --no-color repo --local --force-offline)" -- "$cur")) + COMPREPLY=("${COMPREPLY[@]}" $(compgen -W "$(is --no-color --no-sync repo --local)" -- "$cur")) } # list all defined repositories _repo() { - COMPREPLY=("${COMPREPLY[@]}" $(compgen -W "$(is --no-color repo --no-state --force-offline)" -- "$cur")) + COMPREPLY=("${COMPREPLY[@]}" $(compgen -W "$(is --no-color --no-sync repo)" -- "$cur")) } # list all images available in any online repositories -- GitLab