From 9c87820c7f826edd08a2d1232016498c53aa2802 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Tue, 22 Jan 2019 21:54:03 +0100 Subject: [PATCH] Rename flag --only to --repositories Signed-off-by: Dimitris Zlatanidis --- EXAMPLES.md | 2 +- man/slpkg.8 | 12 ++++++------ slpkg/arguments.py | 8 ++++---- slpkg/main.py | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/EXAMPLES.md b/EXAMPLES.md index 75b392b5..d2d9be86 100644 --- a/EXAMPLES.md +++ b/EXAMPLES.md @@ -117,7 +117,7 @@ Update repository [msb] ... Done Update specifically repositories: ``` -$ slpkg update --only=sbo,msb,slacky +$ slpkg update --repositories=sbo,msb,slacky ``` Also you can check ChangeLog.txt for changes, like: diff --git a/man/slpkg.8 b/man/slpkg.8 index e7c0e8ba..c2ffb1b3 100644 --- a/man/slpkg.8 +++ b/man/slpkg.8 @@ -18,8 +18,8 @@ Slpkg is a user-friendly package manager for Slackware installations Usage: slpkg [COMMANDS|OPTIONS] {repository|package...} Commands: - [update, --only=[...]] - [upgrade, --only=[...]] + [update, --repositories=[...]] + [upgrade, --repositories=[...]] [repo-add [repository name] [URL]] [repo-remove [repository]] [repo-enable] @@ -75,24 +75,24 @@ Print the version of program and exit. The following commands are available. .SS update, create and update packages list -\fBslpkg\fP \fBupdate\fP, \fB--only=[repositories...]\fP +\fBslpkg\fP \fBupdate\fP, \fB--repositories=[repositories...]\fP .PP 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. .PP Additional options: .PP -\fB--only=[repositories...]\fP : Update at specifically repositories separate by comma. +\fB--repositories=[repositories...]\fP : Update at specifically repositories separate by comma. .SS upgrade, recreate packages list -\fBslpkg\fP \fBupgrade\fP, \fB--only=[repositories...]\fP +\fBslpkg\fP \fBupgrade\fP, \fB--repositories=[repositories...]\fP .PP It is sometimes useful to create all of the base file from the beginning so this command delete all the package lists and recreated. .PP Additional options: .PP -\fB--only=[repositories...]\fP : Update at specifically repositories separate by comma. +\fB--repositories=[repositories...]\fP : Update at specifically repositories separate by comma. .SS repo-add, add custom repository \fBslpkg\fP \fBrepo-add\fP <\fIrepository name\fP> <\fIURL\fP> diff --git a/slpkg/arguments.py b/slpkg/arguments.py index 6efb116b..a61ebaf1 100644 --- a/slpkg/arguments.py +++ b/slpkg/arguments.py @@ -48,10 +48,10 @@ Usage: slpkg [COMMANDS|OPTIONS] {repository|package...} _Slackware package manager_______ Commands: - update, --only=[...] Run this command to update all + update, --repositories=[...] Run this command to update all the packages lists. - upgrade, --only=[...] Delete and recreate all packages + upgrade, --repositories=[...] Delete and recreate all packages lists. repo-add [repository name] [URL] Add custom repository. @@ -175,8 +175,8 @@ def usage(repo): """Usage: slpkg [COMMANDS|OPTIONS] {repository|package...} Commands: - [update, --only=[...]] - [upgrade, --only=[...]] + [update, --repositories=[...]] + [upgrade, --repositories=[...]] [repo-add [repository name] [URL]] [repo-remove [repository]] [repo-enable] diff --git a/slpkg/main.py b/slpkg/main.py index b9bdfa7b..af65d78b 100644 --- a/slpkg/main.py +++ b/slpkg/main.py @@ -124,7 +124,7 @@ class ArgParse(object): if len(self.args) == 1 and self.args[0] == "update": Update().repository(only="") elif (len(self.args) == 2 and self.args[0] == "update" and - self.args[1].startswith("--only=")): + self.args[1].startswith("--repositories=")): repos = self.args[1].split("=")[-1].split(",") for rp in repos: if rp not in self.meta.repositories: @@ -180,7 +180,7 @@ class ArgParse(object): if len(self.args) == 1 and self.args[0] == "upgrade": Initialization(False).upgrade(only="") elif (len(self.args) == 2 and self.args[0] == "upgrade" and - self.args[1].startswith("--only=")): + self.args[1].startswith("--repositories=")): repos = self.args[1].split("=")[-1].split(",") for rp in repos: if rp not in self.meta.repositories: