diff --git a/bin/is b/bin/is index e43f496d5b2c2c1153175708ceae207b6e2afc92..0890c48ab9f8dd52137dcefe7bda7fa5a07fe3fb 100755 --- a/bin/is +++ b/bin/is @@ -456,12 +456,12 @@ def c_unprepare_chroot(args): ''' istools.unprepare_chroot(args.path, mount=not args.no_umount) -def c_upgrade_db(args): +def c_upgrade(args): ''' - Upgrade repository's database to the current database version + Upgrade repository's to the last version ''' repoman = load_repositories(args) - repoman[args.repository].upgrade_db() + repoman[args.repository].upgrade() def c_version(args): ''' @@ -747,10 +747,10 @@ def arg_parser_init(): p.add_argument("path") p.set_defaults(func=c_unprepare_chroot) # upgrade_db command parser - p = subparser.add_parser("upgrade_db", - help=c_upgrade_db.__doc__.lower()) + p = subparser.add_parser("upgrade", + help=c_upgrade.__doc__.lower()) p.add_argument("repository", help="repository to upgrade") - p.set_defaults(func=c_upgrade_db) + p.set_defaults(func=c_upgrade) # version command parser p = subparser.add_parser("version", help=c_version.__doc__.lower()) p.set_defaults(func=c_version) diff --git a/completion/bash/is b/completion/bash/is index 34fef885e4a519f5eb4fcb09c73c94ff200a00ac..70cda20c6ab8af9440bde6e791f68c452c38de8a 100644 --- a/completion/bash/is +++ b/completion/bash/is @@ -188,7 +188,7 @@ _is() { [[ "$cur" == -* ]] && _opt '-h --help -m --no-mount' && return 0 _filedir -d ;; - upgrade_db) + upgrade) [[ "$cur" == -* ]] && _opt '-h --help' && return 0 _count_args (( args == 2 )) && _local_repo diff --git a/completion/zsh/_installsystems b/completion/zsh/_installsystems index c992a120829a84d3edee590c23592b506bcffa40..968470127c19b225f4648ceb1e02b4064d12386f 100644 --- a/completion/zsh/_installsystems +++ b/completion/zsh/_installsystems @@ -320,7 +320,7 @@ _is() { '1:path:_files -/' ) ;; - (upgrade_db) + (upgrade) args+=( '1:repo:_installsystems_local_repo' ) diff --git a/doc/is.1.rst b/doc/is.1.rst index 138427f485c3773e173d269701bbebc32eccc6f4..cd908f6a52e283a43f3ecfcbd3833be18a4c5d20 100644 --- a/doc/is.1.rst +++ b/doc/is.1.rst @@ -350,8 +350,8 @@ unprepare_chroot [-h] [-m] *path* disable unmouting of /{proc,dev,sys} -upgrade_db [-h] *repository* - Upgrade repository's database to the current database version +upgrade [-h] *repository* + Upgrade repository's to the last version version [-h] diff --git a/installsystems/repository.py b/installsystems/repository.py index d9a76de174905425445613a0d542c28a130bdf0c..368cab7ecbb8d4e37fe322aba318d35316c6cc8a 100644 --- a/installsystems/repository.py +++ b/installsystems/repository.py @@ -155,8 +155,8 @@ class Repository(object): because repository is not initialized ''' config = object.__getattribute__(self, "config") - # config, init, local and upgrade_db are always accessible - if name in ("init", "config", "local", "upgrade_db"): + # config, init, local and upgrade are always accessible + if name in ("init", "config", "local", "upgrade"): return object.__getattribute__(self, name) # if no db (not init or not accessible) raise error if config.offline: @@ -537,9 +537,9 @@ class Repository(object): (a[0],)).fetchall() return [ a[0] ] + [ x[0] for x in b ] - def upgrade_db(self): + def upgrade(self): if self.version == Database.version: - info("Database already up-to-date (%s)" % self.version) + info("Repository already up-to-date (%s)" % self.version) return else: arrow("Start repository upgrade")