xbps-create: new option -G, --source-revisions; mainly for xbps-src use.
This commit is contained in:
parent
ddca33b4a9
commit
d063e63bbb
@ -522,10 +522,11 @@ set_build_date(void)
|
|||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
const char *shortopts = "A:B:C:D:F:H:hl:M:m:n:P:pqR:S:s:V";
|
const char *shortopts = "A:B:C:D:F:G:H:hl:M:m:n:P:pqR:S:s:V";
|
||||||
const struct option longopts[] = {
|
const struct option longopts[] = {
|
||||||
{ "architecture", required_argument, NULL, 'A' },
|
{ "architecture", required_argument, NULL, 'A' },
|
||||||
{ "built-with", required_argument, NULL, 'B' },
|
{ "built-with", required_argument, NULL, 'B' },
|
||||||
|
{ "source-revisions", required_argument, NULL, 'G' },
|
||||||
{ "conflicts", required_argument, NULL, 'C' },
|
{ "conflicts", required_argument, NULL, 'C' },
|
||||||
{ "dependencies", required_argument, NULL, 'D' },
|
{ "dependencies", required_argument, NULL, 'D' },
|
||||||
{ "config-files", required_argument, NULL, 'F' },
|
{ "config-files", required_argument, NULL, 'F' },
|
||||||
@ -549,6 +550,7 @@ main(int argc, char **argv)
|
|||||||
const char *conflicts, *deps, *homepage, *license, *maint, *bwith;
|
const char *conflicts, *deps, *homepage, *license, *maint, *bwith;
|
||||||
const char *provides, *pkgver, *replaces, *desc, *ldesc;
|
const char *provides, *pkgver, *replaces, *desc, *ldesc;
|
||||||
const char *arch, *config_files, *mutable_files, *version;
|
const char *arch, *config_files, *mutable_files, *version;
|
||||||
|
const char *srcrevs = NULL;
|
||||||
char *pkgname, *binpkg, *tname, *p, cwd[PATH_MAX-1];
|
char *pkgname, *binpkg, *tname, *p, cwd[PATH_MAX-1];
|
||||||
bool quiet = false, preserve = false;
|
bool quiet = false, preserve = false;
|
||||||
int c, pkg_fd;
|
int c, pkg_fd;
|
||||||
@ -578,6 +580,9 @@ main(int argc, char **argv)
|
|||||||
case 'F':
|
case 'F':
|
||||||
config_files = optarg;
|
config_files = optarg;
|
||||||
break;
|
break;
|
||||||
|
case 'G':
|
||||||
|
srcrevs = optarg;
|
||||||
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
usage();
|
usage();
|
||||||
break;
|
break;
|
||||||
@ -677,6 +682,9 @@ main(int argc, char **argv)
|
|||||||
if (bwith)
|
if (bwith)
|
||||||
prop_dictionary_set_cstring_nocopy(pkg_propsd,
|
prop_dictionary_set_cstring_nocopy(pkg_propsd,
|
||||||
"packaged-with", bwith);
|
"packaged-with", bwith);
|
||||||
|
if (srcrevs)
|
||||||
|
prop_dictionary_set_cstring_nocopy(pkg_propsd,
|
||||||
|
"source-revisions", srcrevs);
|
||||||
if (preserve)
|
if (preserve)
|
||||||
prop_dictionary_set_bool(pkg_propsd, "preserve", true);
|
prop_dictionary_set_bool(pkg_propsd, "preserve", true);
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.Dd November 6, 2012
|
.Dd November 20, 2012
|
||||||
.Os Void Linux
|
.Os Void Linux
|
||||||
.Dt xbps-create 8
|
.Dt xbps-create 8
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -34,6 +34,9 @@ blank. Example:
|
|||||||
.It Fl F, Fl -config-files Ar list
|
.It Fl F, Fl -config-files Ar list
|
||||||
A list of configuration files this package provides, separated by a single
|
A list of configuration files this package provides, separated by a single
|
||||||
blank.
|
blank.
|
||||||
|
.It Fl G, Fl --source-revisions Ar string
|
||||||
|
This justs sets a string with the git revisions of the sourcepkg that
|
||||||
|
was used to build this binary package. It is set automatically by xbps-src.
|
||||||
.It Fl H, Fl -homepage Ar string
|
.It Fl H, Fl -homepage Ar string
|
||||||
The package homepage string.
|
The package homepage string.
|
||||||
.It Fl h, Fl -help
|
.It Fl h, Fl -help
|
||||||
|
Loading…
Reference in New Issue
Block a user