Rename flag --only to --repositories

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2019-01-22 21:54:03 +01:00
parent 1231641fe2
commit 9c87820c7f
4 changed files with 13 additions and 13 deletions

View file

@ -117,7 +117,7 @@ Update repository [msb] ... Done
Update specifically repositories: Update specifically repositories:
``` ```
$ slpkg update --only=sbo,msb,slacky $ slpkg update --repositories=sbo,msb,slacky
``` ```
Also you can check ChangeLog.txt for changes, like: Also you can check ChangeLog.txt for changes, like:

View file

@ -18,8 +18,8 @@ Slpkg is a user-friendly package manager for Slackware installations
Usage: slpkg [COMMANDS|OPTIONS] {repository|package...} Usage: slpkg [COMMANDS|OPTIONS] {repository|package...}
Commands: Commands:
[update, --only=[...]] [update, --repositories=[...]]
[upgrade, --only=[...]] [upgrade, --repositories=[...]]
[repo-add [repository name] [URL]] [repo-add [repository name] [URL]]
[repo-remove [repository]] [repo-remove [repository]]
[repo-enable] [repo-enable]
@ -75,24 +75,24 @@ Print the version of program and exit.
The following commands are available. The following commands are available.
.SS update, create and update packages list .SS update, create and update packages list
\fBslpkg\fP \fBupdate\fP, \fB--only=[repositories...]\fP \fBslpkg\fP \fBupdate\fP, \fB--repositories=[repositories...]\fP
.PP .PP
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.
.PP .PP
Additional options: Additional options:
.PP .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 .SS upgrade, recreate packages list
\fBslpkg\fP \fBupgrade\fP, \fB--only=[repositories...]\fP \fBslpkg\fP \fBupgrade\fP, \fB--repositories=[repositories...]\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 delete all the package lists and recreated. command delete all the package lists and recreated.
.PP .PP
Additional options: Additional options:
.PP .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 .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

@ -48,10 +48,10 @@ Usage: slpkg [COMMANDS|OPTIONS] {repository|package...}
_Slackware package manager_______ _Slackware package manager_______
Commands: Commands:
update, --only=[...] Run this command to update all update, --repositories=[...] Run this command to update all
the packages lists. the packages lists.
upgrade, --only=[...] Delete and recreate all packages upgrade, --repositories=[...] Delete and recreate all packages
lists. lists.
repo-add [repository name] [URL] Add custom repository. repo-add [repository name] [URL] Add custom repository.
@ -175,8 +175,8 @@ def usage(repo):
"""Usage: slpkg [COMMANDS|OPTIONS] {repository|package...} """Usage: slpkg [COMMANDS|OPTIONS] {repository|package...}
Commands: Commands:
[update, --only=[...]] [update, --repositories=[...]]
[upgrade, --only=[...]] [upgrade, --repositories=[...]]
[repo-add [repository name] [URL]] [repo-add [repository name] [URL]]
[repo-remove [repository]] [repo-remove [repository]]
[repo-enable] [repo-enable]

View file

@ -124,7 +124,7 @@ class ArgParse(object):
if len(self.args) == 1 and self.args[0] == "update": if len(self.args) == 1 and self.args[0] == "update":
Update().repository(only="") Update().repository(only="")
elif (len(self.args) == 2 and self.args[0] == "update" and 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(",") repos = self.args[1].split("=")[-1].split(",")
for rp in repos: for rp in repos:
if rp not in self.meta.repositories: if rp not in self.meta.repositories:
@ -180,7 +180,7 @@ class ArgParse(object):
if len(self.args) == 1 and self.args[0] == "upgrade": if len(self.args) == 1 and self.args[0] == "upgrade":
Initialization(False).upgrade(only="") Initialization(False).upgrade(only="")
elif (len(self.args) == 2 and self.args[0] == "upgrade" and 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(",") repos = self.args[1].split("=")[-1].split(",")
for rp in repos: for rp in repos:
if rp not in self.meta.repositories: if rp not in self.meta.repositories: