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:
```
$ slpkg update --only=sbo,msb,slacky
$ slpkg update --repositories=sbo,msb,slacky
```
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...}
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>

View file

@ -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]

View file

@ -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: