Skip to content
Snippets Groups Projects
Commit 7e02d4c9 authored by ale's avatar ale
Browse files

Resolve the --keep-last / "keep" asymmetry

parent 0329614c
No related branches found
No related tags found
No related merge requests found
Pipeline #58626 passed with warnings
...@@ -103,6 +103,10 @@ This will allow you to use, on your host, a command such as: ...@@ -103,6 +103,10 @@ This will allow you to use, on your host, a command such as:
and have your packages automatically added to the repository at and have your packages automatically added to the repository at
/var/repo/NAME/. /var/repo/NAME/.
Note that when urepo is run as a SSH forced command, some command-line
options are not available for security reasons (most importantly
*--root*).
### Bundle format ### Bundle format
On the wire, a bundle is just a tar file of .deb packages, without On the wire, a bundle is just a tar file of .deb packages, without
...@@ -116,7 +120,7 @@ Instead of always specifying release metadata options such as ...@@ -116,7 +120,7 @@ Instead of always specifying release metadata options such as
configuration file named *.urepo.conf* in the repository directory. configuration file named *.urepo.conf* in the repository directory.
This should be a YAML-encoded file where you can specify most of the This should be a YAML-encoded file where you can specify most of the
Release attributes: release metadata attributes:
* *origin* * *origin*
* *suite* * *suite*
...@@ -124,14 +128,14 @@ Release attributes: ...@@ -124,14 +128,14 @@ Release attributes:
* *label* * *label*
* *description* * *description*
In addition two attributes control the behavior of urepo itself: In addition, two attributes control the behavior of urepo itself:
* *keep* (equivalent to the *--keep-last* command-line option), number * *keep* (equivalent to the *--keep* command-line option), number of
of old package versions to keep old versions of each package to keep
* *private-key* (equivalent to the *--private-key* command-line * *private-key* (equivalent to the *--private-key* command-line
option), path to the armored GPG secret key to be used for signing option), path to the armored GPG secret key to be used for signing
(without passphrase) (without passphrase)
Urepo will look for such configuration in a file named *.urepo.conf* Urepo will look for such configuration in a file named *.urepo.conf*
in the repository directory, as well as in *~/.urepo.conf* (useful to in the repository directory, as well as in *~/.urepo/config* (useful
set a site-wide GPG secret key, for instance). to set a site-wide GPG secret key, for instance).
...@@ -75,7 +75,7 @@ func loadConfig(path string, cfg *repoConfig) error { ...@@ -75,7 +75,7 @@ func loadConfig(path string, cfg *repoConfig) error {
} }
func (c *repoConfig) setFlags(f *flag.FlagSet) { func (c *repoConfig) setFlags(f *flag.FlagSet) {
f.IntVar(&c.Keep, "keep-last", c.Keep, "old package `versions` to keep") f.IntVar(&c.Keep, "keep", c.Keep, "old package `versions` to keep")
f.StringVar(&c.Origin, "origin", c.Origin, "repository `origin`") f.StringVar(&c.Origin, "origin", c.Origin, "repository `origin`")
f.StringVar(&c.Suite, "suite", c.Suite, "repository `suite`") f.StringVar(&c.Suite, "suite", c.Suite, "repository `suite`")
f.StringVar(&c.Codename, "codename", c.Codename, "repository `codename` (defaults to the value of --repository)") f.StringVar(&c.Codename, "codename", c.Codename, "repository `codename` (defaults to the value of --repository)")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment