bin/xbps-create: allow to define the reverts field for a package.
This commit is contained in:
parent
13e3e74863
commit
33032429c2
@ -94,6 +94,8 @@ usage(void)
|
|||||||
" -q --quiet Work silently.\n"
|
" -q --quiet Work silently.\n"
|
||||||
" -R --replaces Replaces (blank separated list,\n"
|
" -R --replaces Replaces (blank separated list,\n"
|
||||||
" e.g: 'foo>=1.0 blah<2.0').\n"
|
" e.g: 'foo>=1.0 blah<2.0').\n"
|
||||||
|
" -r --reverts Reverts (blank separated list,\n"
|
||||||
|
" e.g: '1.0_1 2.0_3').\n"
|
||||||
" -S --long-desc Long description (80 cols per line).\n"
|
" -S --long-desc Long description (80 cols per line).\n"
|
||||||
" -s --desc Short description (max 80 characters).\n"
|
" -s --desc Short description (max 80 characters).\n"
|
||||||
" -t --tags A list of tags/categories (blank separated list).\n"
|
" -t --tags A list of tags/categories (blank separated list).\n"
|
||||||
@ -591,7 +593,7 @@ set_build_date(void)
|
|||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
const char *shortopts = "A:B:C:D:F:G:H:hl:M:m:n:P:pqR:S:s:t:V";
|
const char *shortopts = "A:B:C:D:F:G:H:hl:M:m:n:P:pqr:R:S:s:t: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' },
|
||||||
@ -609,6 +611,7 @@ main(int argc, char **argv)
|
|||||||
{ "preserve", no_argument, NULL, 'p' },
|
{ "preserve", no_argument, NULL, 'p' },
|
||||||
{ "quiet", no_argument, NULL, 'q' },
|
{ "quiet", no_argument, NULL, 'q' },
|
||||||
{ "replaces", required_argument, NULL, 'R' },
|
{ "replaces", required_argument, NULL, 'R' },
|
||||||
|
{ "reverts", required_argument, NULL, 'r' },
|
||||||
{ "long-desc", required_argument, NULL, 'S' },
|
{ "long-desc", required_argument, NULL, 'S' },
|
||||||
{ "desc", required_argument, NULL, 's' },
|
{ "desc", required_argument, NULL, 's' },
|
||||||
{ "tags", required_argument, NULL, 't' },
|
{ "tags", required_argument, NULL, 't' },
|
||||||
@ -624,7 +627,7 @@ main(int argc, char **argv)
|
|||||||
struct archive_entry_linkresolver *resolver;
|
struct archive_entry_linkresolver *resolver;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
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, *reverts, *desc, *ldesc;
|
||||||
const char *arch, *config_files, *mutable_files, *version;
|
const char *arch, *config_files, *mutable_files, *version;
|
||||||
const char *buildopts, *shlib_provides, *shlib_requires;
|
const char *buildopts, *shlib_provides, *shlib_requires;
|
||||||
const char *compression, *tags = NULL, *srcrevs = NULL;
|
const char *compression, *tags = NULL, *srcrevs = NULL;
|
||||||
@ -634,8 +637,9 @@ main(int argc, char **argv)
|
|||||||
mode_t myumask;
|
mode_t myumask;
|
||||||
|
|
||||||
arch = conflicts = deps = homepage = license = maint = compression = NULL;
|
arch = conflicts = deps = homepage = license = maint = compression = NULL;
|
||||||
provides = pkgver = replaces = desc = ldesc = bwith = buildopts = NULL;
|
provides = pkgver = replaces = reverts = desc = ldesc = bwith = NULL;
|
||||||
config_files = mutable_files = shlib_provides = shlib_requires = NULL;
|
buildopts = config_files = mutable_files = shlib_provides = NULL;
|
||||||
|
shlib_requires = NULL;
|
||||||
|
|
||||||
while ((c = getopt_long(argc, argv, shortopts, longopts, NULL)) != -1) {
|
while ((c = getopt_long(argc, argv, shortopts, longopts, NULL)) != -1) {
|
||||||
if (optarg && strcmp(optarg, "") == 0)
|
if (optarg && strcmp(optarg, "") == 0)
|
||||||
@ -690,6 +694,9 @@ main(int argc, char **argv)
|
|||||||
case 'R':
|
case 'R':
|
||||||
replaces = optarg;
|
replaces = optarg;
|
||||||
break;
|
break;
|
||||||
|
case 'r':
|
||||||
|
reverts = optarg;
|
||||||
|
break;
|
||||||
case 'S':
|
case 'S':
|
||||||
ldesc = optarg;
|
ldesc = optarg;
|
||||||
break;
|
break;
|
||||||
@ -794,6 +801,7 @@ main(int argc, char **argv)
|
|||||||
process_array("conflicts", conflicts);
|
process_array("conflicts", conflicts);
|
||||||
process_array("provides", provides);
|
process_array("provides", provides);
|
||||||
process_array("replaces", replaces);
|
process_array("replaces", replaces);
|
||||||
|
process_array("reverts", reverts);
|
||||||
process_array("shlib-provides", shlib_provides);
|
process_array("shlib-provides", shlib_provides);
|
||||||
process_array("shlib-requires", shlib_requires);
|
process_array("shlib-requires", shlib_requires);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user