From 12a5375f25d6a7be5a5741c728a8f9b8168761a4 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 22 Feb 2018 13:45:16 +0200 Subject: Document new rep-list and rep-remove, update rep-add and rep-fetch --- bpkg/bpkg.cli | 18 ++++++++++++------ bpkg/rep-add.cli | 11 ++++++----- bpkg/rep-fetch.cli | 19 +++++++++++++------ bpkg/rep-list.cli | 46 ++++++++++++++++++++++++++++++++++++++++++++++ bpkg/rep-remove.cli | 44 ++++++++++++++++++++++++++++++++++++++++++++ doc/cli.sh | 4 ++-- 6 files changed, 123 insertions(+), 19 deletions(-) create mode 100644 bpkg/rep-list.cli create mode 100644 bpkg/rep-remove.cli diff --git a/bpkg/bpkg.cli b/bpkg/bpkg.cli index ffeb84a..c1109d0 100644 --- a/bpkg/bpkg.cli +++ b/bpkg/bpkg.cli @@ -167,6 +167,16 @@ namespace bpkg "\l{bpkg-rep-add(1)} \- add repository to configuration" } + bool rep-remove|remove + { + "\l{bpkg-rep-remove(1)} \- remove repository from configuration" + } + + bool rep-list|list + { + "\l{bpkg-rep-list(1)} \- list repositories in configuration" + } + bool rep-fetch|fetch { "\l{bpkg-rep-fetch(1)} \- fetch list of available packages" @@ -174,9 +184,7 @@ namespace bpkg bool rep-create { - "[]", - "\l{bpkg-rep-create(1)} \- create repository", - "" + "\l{bpkg-rep-create(1)} \- create repository" } bool pkg-status|status @@ -221,9 +229,7 @@ namespace bpkg bool pkg-verify { - "", - "\l{bpkg-pkg-verify(1)} \- verify package archive", - "" + "\l{bpkg-pkg-verify(1)} \- verify package archive" } bool pkg-fetch diff --git a/bpkg/rep-add.cli b/bpkg/rep-add.cli index ff202a5..827e745 100644 --- a/bpkg/rep-add.cli +++ b/bpkg/rep-add.cli @@ -13,17 +13,18 @@ include ; namespace bpkg { { - " ", + " ", "\h|SYNOPSIS| - \c{\b{bpkg rep-add}|\b{add} [] } + \c{\b{bpkg rep-add}|\b{add} [] ...} \h|DESCRIPTION| - The \cb{rep-add} command adds the specified package repository to the - configuration. The repository location is a URL or a directory - path. + The \cb{rep-add} command adds the specified package repositories to the + configuration. The repository location is a URL or a directory path. If a + repository with the same name already exists in the configuration, then + its location is replaced with the specified. Note that this command doesn't fetch the list of available packages for the newly added repository. For that, use the \l{bpkg-rep-fetch(1)} diff --git a/bpkg/rep-fetch.cli b/bpkg/rep-fetch.cli index ce41d5c..9ec1de7 100644 --- a/bpkg/rep-fetch.cli +++ b/bpkg/rep-fetch.cli @@ -11,18 +11,25 @@ include ; namespace bpkg { { - "", + " ", "\h|SYNOPSIS| - \c{\b{bpkg rep-fetch}|\b{fetch} []} + \c{\b{bpkg rep-fetch}|\b{fetch} [] [(|)...]} \h|DESCRIPTION| - The \cb{rep-fetch} command fetches the list of available packages for all - the repositories that were previously added with the \l{bpkg-rep-add(1)} - command as well as all their complement and prerequisite repositories, - recursively." + The \cb{rep-fetch} command fetches the list of available packages for the + specified repositories as well as all their complement and prerequisite + repositories, recursively. If no repositories were specified, then all + the repositories previously added (\l{bpkg-rep-add(1)}) to the + configuration are fetched. + + The repository to fetch can be specified either as a repository name or + as a repository location (URL or a directory path; see + \l{bpkg-rep-add(1)} for details). In the latter case, the repository + location is added/replaced as if by first executing the \cb{rep-add} + command." } class rep_fetch_options: configuration_options diff --git a/bpkg/rep-list.cli b/bpkg/rep-list.cli new file mode 100644 index 0000000..f25a947 --- /dev/null +++ b/bpkg/rep-list.cli @@ -0,0 +1,46 @@ +// file : bpkg/rep-list.cli +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +include ; + +include ; + +"\section=1" +"\name=bpkg-rep-list" +"\summary=list repositories in configuration" + +namespace bpkg +{ + { + "", + + "\h|SYNOPSIS| + + \c{\b{bpkg rep-list}|\b{list} []} + + \h|DESCRIPTION| + + The \cb{rep-list} command lists the repositories in the configuration. + + For each repository a line containing the repository name and location is + printed to \cb{STDOUT}. If the \cb{--complements|-c} and/or + \cb{--prerequisites|-p} options are specified, then it is followed by + the list of complement and/or prerequisite repositories, recursively." + } + + class rep_list_options: configuration_options + { + "\h|REP-LIST OPTIONS|" + + bool --complements|-c + { + "List complement repositories." + } + + bool --prerequisites|-p + { + "List prerequisite repositories." + } + }; +} diff --git a/bpkg/rep-remove.cli b/bpkg/rep-remove.cli new file mode 100644 index 0000000..3662b2b --- /dev/null +++ b/bpkg/rep-remove.cli @@ -0,0 +1,44 @@ +// file : bpkg/rep-remove.cli +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +include ; + +include ; + +"\section=1" +"\name=bpkg-rep-remove" +"\summary=remove repository from configuration" + +namespace bpkg +{ + { + " ", + + "\h|SYNOPSIS| + + \c{\b{bpkg rep-remove}|\b{remove} [] (|)... | + (--all|-a)} + + \h|DESCRIPTION| + + The \cb{rep-remove} command removes the specified package repositories + from the configuration. The repository to remove can be specified either + as a repository name or as a repository location (URL or a directory + path). + + Alternatively, the \cb{--all|-a} option can be used to remove all the + repositories that were previously added (\l{bpkg-rep-add(1)}) to the + configuration." + } + + class rep_remove_options: configuration_options + { + "\h|REP-REMOVE OPTIONS|" + + bool --all|-a + { + "Remove all the repositories." + } + }; +} diff --git a/doc/cli.sh b/doc/cli.sh index 13a94af..bb910ba 100755 --- a/doc/cli.sh +++ b/doc/cli.sh @@ -58,8 +58,8 @@ compile "bpkg" $o --output-prefix "" --suppress-undocumented --class-doc bpkg::c pages="cfg-create help pkg-build pkg-clean pkg-configure pkg-disfigure \ pkg-drop pkg-fetch pkg-checkout pkg-install pkg-purge pkg-status pkg-test \ -pkg-uninstall pkg-unpack pkg-update pkg-verify rep-add rep-create rep-fetch \ -rep-info repository-signing" +pkg-uninstall pkg-unpack pkg-update pkg-verify rep-add rep-remove rep-list \ +rep-create rep-fetch rep-info repository-signing" for p in $pages; do compile $p $o -- cgit v1.1