Commit 90b65807 authored by Sebastien Luttringer's avatar Sebastien Luttringer
Browse files

remove --force-offline repo option

--no-sync as the same beneficts
parent 16784add
Loading
Loading
Loading
Loading
+4 −9
Original line number Diff line number Diff line
@@ -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
+2 −2
Original line number Diff line number Diff line
@@ -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