rename command re-create to upgrade

This commit is contained in:
Dimitris Zlatanidis 2015-02-22 16:31:19 +02:00
parent 48b6d0fcce
commit 808e2ec6e9
6 changed files with 21 additions and 18 deletions

View file

@ -1,8 +1,11 @@
Version 2.2.4-dev Version 2.2.4-dev
21-2-2015 21-2-2015
[Updated] - Fix Error-prone [Updated] - Fix Error-prone.
- Rename variable name 'VERSION' to 'RELEASE' in configuration file.
- Merge functions and fix __metadata__ complexity.
- Update slackbulid and install script.
- Rename command 're-create' to 'upgrade'.
Version 2.2.3 Version 2.2.3
16-2-2015 16-2-2015

View file

@ -231,7 +231,7 @@ Command Line Tool Usage
Commands: Commands:
update update all package lists update update all package lists
re-create recreate package lists upgrade upgrade package lists
repo-add [repository name] [URL] add custom repository repo-add [repository name] [URL] add custom repository
repo-remove [repository] remove custom repository repo-remove [repository] remove custom repository
repo-list list all repositories repo-list list all repositories

View file

@ -16,7 +16,7 @@
Slpkg is a user-friendly package manager for Slackware installations Slpkg is a user-friendly package manager for Slackware installations
.SH SYNOPSIS .SH SYNOPSIS
Usage: slpkg Commands: Usage: slpkg Commands:
[update] [re-create] [repo-add [repository name] [URL]] [update] [upgrade] [repo-add [repository name] [URL]]
[repo-remove [repository]] [repo-list] [repo-remove [repository]] [repo-list]
[repo-info [repository]] [update [slpkg]] [repo-info [repository]] [update [slpkg]]
@ -43,7 +43,7 @@ Slpkg is a user-friendly package manager for Slackware installations
Commands: Commands:
update update all package lists update update all package lists
re-create recreate package lists upgrade upgrade package lists
repo-add [repository name] [URL] add custom repository repo-add [repository name] [URL] add custom repository
repo-remove [repository] remove custom repository repo-remove [repository] remove custom repository
repo-list list all repositories repo-list list all repositories
@ -130,11 +130,11 @@ The following commands are available.
Used to re-synchronize the package lists and create some important files. Used to re-synchronize the package lists and create some important files.
This command must run every new repository is added or new updates is available. This command must run every new repository is added or new updates is available.
.SS re-create, recreate packages list .SS upgrade, recreate packages list
\fBslpkg\fP \fBre-create\fP \fBslpkg\fP \fBupgrade\fP
.PP .PP
It is sometimes useful to create all of the base file from the beginning so this It is sometimes useful to create all of the base file from the beginning so this
command deletes all the packages lists and re-created. command delete all the package lists and recreated.
.SS repo-add, add custom repository .SS repo-add, add custom repository
\fBslpkg\fP \fBrepo-add\fP <\fIrepository name\fP> <\fIURL\fP> \fBslpkg\fP \fBrepo-add\fP <\fIrepository name\fP> <\fIURL\fP>

View file

@ -35,7 +35,7 @@ def options():
"Commands:", "Commands:",
" update update all package " " update update all package "
"lists", "lists",
" re-create recreate package lists", " upgrade upgrade package lists",
" repo-add [repository name] [URL] add custom repository", " repo-add [repository name] [URL] add custom repository",
" repo-remove [repository] remove custom repository", " repo-remove [repository] remove custom repository",
" repo-list list all repositories", " repo-list list all repositories",
@ -91,7 +91,7 @@ def usage(repo):
"\nslpkg - version {0} | set: {1}\n".format(_m.__version__, "\nslpkg - version {0} | set: {1}\n".format(_m.__version__,
_m.slack_rel), _m.slack_rel),
"Usage: slpkg Commands:", "Usage: slpkg Commands:",
" [update] [re-create] [repo-add [repository name] [URL]]", " [update] [upgrade] [repo-add [repository name] [URL]]",
" [repo-remove [repository]] [repo-list]", " [repo-remove [repository]] [repo-list]",
" [repo-info [repository]] [update [slpkg]]\n", " [repo-info [repository]] [update [slpkg]]\n",
" Optional arguments:", " Optional arguments:",
@ -108,7 +108,7 @@ def usage(repo):
" [-n] [-f [...]] [-i [...]] [-u [...]]", " [-n] [-f [...]] [-i [...]] [-u [...]]",
" [-o [...]] [-r [...]] [-d [...]]\n", " [-o [...]] [-r [...]] [-d [...]]\n",
error_repo, error_repo,
"For more information try 'slpkg -h or --help' or view manpage\n" "For more information try 'slpkg -h, --help' or view manpage\n"
] ]
for usg in view: for usg in view:
print(usg) print(usg)

View file

@ -549,7 +549,7 @@ class Initialization(object):
FILELIST_TXT = URL(args[9]).reading() FILELIST_TXT = URL(args[9]).reading()
self.write_file(args[3], args[8], FILELIST_TXT) self.write_file(args[3], args[8], FILELIST_TXT)
def re_create(self): def upgrade(self):
''' '''
Remove all package lists with changelog and checksums files Remove all package lists with changelog and checksums files
and create lists again and create lists again

View file

@ -47,8 +47,8 @@ from __metadata__ import MetaData as _m
from pkg.build import BuildPackage from pkg.build import BuildPackage
from pkg.manager import PackageManager from pkg.manager import PackageManager
from sbo.check import sbo_upgrade
from sbo.views import SBoNetwork from sbo.views import SBoNetwork
from sbo.check import sbo_upgrade
from sbo.slackbuild import SBoInstall from sbo.slackbuild import SBoInstall
from slack.patches import Patches from slack.patches import Patches
@ -80,7 +80,7 @@ class ArgParse(object):
# checking if repositories exists # checking if repositories exists
if len(self.args) > 1 and self.args[0] not in [ if len(self.args) > 1 and self.args[0] not in [
'-h', '--help', '-v', '--version', 're-create', 'repo-list', '-h', '--help', '-v', '--version', 'upgrade', 'repo-list',
'repo-add', 'repo-remove', 'update', 'update-slpkg', '-g' 'repo-add', 'repo-remove', 'update', 'update-slpkg', '-g'
]: ]:
check_exists_repositories() check_exists_repositories()
@ -129,10 +129,10 @@ class ArgParse(object):
else: else:
usage('') usage('')
def command_re_create(self): def command_upgrade(self):
""" re create repositories package lists """ """ re create repositories package lists """
if len(self.args) == 1 and self.args[0] == 're-create': if len(self.args) == 1 and self.args[0] == 'upgrade':
Initialization().re_create() Initialization().upgrade()
else: else:
usage('') usage('')
@ -370,11 +370,11 @@ def main():
'-v': argparse.help_version, '-v': argparse.help_version,
'--version': argparse.help_version, '--version': argparse.help_version,
'update': argparse.command_update, 'update': argparse.command_update,
'upgrade': argparse.command_upgrade,
'update-slpkg': argparse.command_update_slpkg, 'update-slpkg': argparse.command_update_slpkg,
'repo-list': argparse.command_repo_list, 'repo-list': argparse.command_repo_list,
'repo-add': argparse.command_repo_add, 'repo-add': argparse.command_repo_add,
'repo-remove': argparse.command_repo_remove, 'repo-remove': argparse.command_repo_remove,
're-create': argparse.command_re_create,
'repo-info': argparse.command_repo_info, 'repo-info': argparse.command_repo_info,
'-a': argparse.auto_build, '-a': argparse.auto_build,
'-l': argparse.pkg_list, '-l': argparse.pkg_list,