xbps-create: new option -G, --source-revisions; mainly for xbps-src use.

This commit is contained in:
Juan RP 2012-11-20 04:21:26 +01:00
parent ddca33b4a9
commit d063e63bbb
2 changed files with 13 additions and 2 deletions

View File

@ -522,10 +522,11 @@ set_build_date(void)
int
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[] = {
{ "architecture", required_argument, NULL, 'A' },
{ "built-with", required_argument, NULL, 'B' },
{ "source-revisions", required_argument, NULL, 'G' },
{ "conflicts", required_argument, NULL, 'C' },
{ "dependencies", required_argument, NULL, 'D' },
{ "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 *provides, *pkgver, *replaces, *desc, *ldesc;
const char *arch, *config_files, *mutable_files, *version;
const char *srcrevs = NULL;
char *pkgname, *binpkg, *tname, *p, cwd[PATH_MAX-1];
bool quiet = false, preserve = false;
int c, pkg_fd;
@ -578,6 +580,9 @@ main(int argc, char **argv)
case 'F':
config_files = optarg;
break;
case 'G':
srcrevs = optarg;
break;
case 'h':
usage();
break;
@ -677,6 +682,9 @@ main(int argc, char **argv)
if (bwith)
prop_dictionary_set_cstring_nocopy(pkg_propsd,
"packaged-with", bwith);
if (srcrevs)
prop_dictionary_set_cstring_nocopy(pkg_propsd,
"source-revisions", srcrevs);
if (preserve)
prop_dictionary_set_bool(pkg_propsd, "preserve", true);

View File

@ -1,4 +1,4 @@
.Dd November 6, 2012
.Dd November 20, 2012
.Os Void Linux
.Dt xbps-create 8
.Sh NAME
@ -34,6 +34,9 @@ blank. Example:
.It Fl F, Fl -config-files Ar list
A list of configuration files this package provides, separated by a single
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
The package homepage string.
.It Fl h, Fl -help