xbps-create: add -c/--changelog
This commit is contained in:
parent
e2e8eea490
commit
dedc93d17d
3
NEWS
3
NEWS
@ -1,5 +1,8 @@
|
|||||||
xbps-0.52 (???):
|
xbps-0.52 (???):
|
||||||
|
|
||||||
|
* xbps-create(1): accept -c/--changelog to set the changelog property of the
|
||||||
|
package
|
||||||
|
|
||||||
* xbps-query(1): fix segfault in -Ro with HTTPS repositories.
|
* xbps-query(1): fix segfault in -Ro with HTTPS repositories.
|
||||||
Fixes #167. See https://github.com/voidlinux/xbps/issues/167
|
Fixes #167. See https://github.com/voidlinux/xbps/issues/167
|
||||||
|
|
||||||
|
@ -68,6 +68,7 @@ usage(void)
|
|||||||
" -B --built-with Package builder string (e.g: xbps-src-30).\n"
|
" -B --built-with Package builder string (e.g: xbps-src-30).\n"
|
||||||
" -C --conflicts Conflicts (blank separated list,\n"
|
" -C --conflicts Conflicts (blank separated list,\n"
|
||||||
" e.g: 'foo>=2.0 blah<=2.0').\n"
|
" e.g: 'foo>=2.0 blah<=2.0').\n"
|
||||||
|
" -c --changelog Changelog URL.\n"
|
||||||
" -D --dependencies Dependencies (blank separated list,\n"
|
" -D --dependencies Dependencies (blank separated list,\n"
|
||||||
" e.g: 'foo>=1.0_1 blah<2.1').\n"
|
" e.g: 'foo>=1.0_1 blah<2.1').\n"
|
||||||
" -F --config-files Configuration files (blank separated list,\n"
|
" -F --config-files Configuration files (blank separated list,\n"
|
||||||
@ -666,7 +667,7 @@ process_archive(struct archive *ar,
|
|||||||
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:R:S:s:t:V";
|
const char *shortopts = "A:B:C: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' },
|
||||||
@ -694,6 +695,7 @@ main(int argc, char **argv)
|
|||||||
{ "build-options", required_argument, NULL, '2' },
|
{ "build-options", required_argument, NULL, '2' },
|
||||||
{ "compression", required_argument, NULL, '3' },
|
{ "compression", required_argument, NULL, '3' },
|
||||||
{ "alternatives", required_argument, NULL, '4' },
|
{ "alternatives", required_argument, NULL, '4' },
|
||||||
|
{ "changelog", required_argument, NULL, 'c'},
|
||||||
{ NULL, 0, NULL, 0 }
|
{ NULL, 0, NULL, 0 }
|
||||||
};
|
};
|
||||||
struct archive *ar;
|
struct archive *ar;
|
||||||
@ -702,7 +704,7 @@ main(int argc, char **argv)
|
|||||||
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, *reverts, *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, *changelog;
|
||||||
const char *buildopts, *shlib_provides, *shlib_requires, *alternatives;
|
const char *buildopts, *shlib_provides, *shlib_requires, *alternatives;
|
||||||
const char *compression, *tags = NULL, *srcrevs = NULL;
|
const char *compression, *tags = NULL, *srcrevs = NULL;
|
||||||
char *pkgname, *binpkg, *tname, *p, cwd[PATH_MAX-1];
|
char *pkgname, *binpkg, *tname, *p, cwd[PATH_MAX-1];
|
||||||
@ -713,7 +715,7 @@ main(int argc, char **argv)
|
|||||||
arch = conflicts = deps = homepage = license = maint = compression = NULL;
|
arch = conflicts = deps = homepage = license = maint = compression = NULL;
|
||||||
provides = pkgver = replaces = reverts = desc = ldesc = bwith = NULL;
|
provides = pkgver = replaces = reverts = desc = ldesc = bwith = NULL;
|
||||||
buildopts = config_files = mutable_files = shlib_provides = NULL;
|
buildopts = config_files = mutable_files = shlib_provides = NULL;
|
||||||
alternatives = shlib_requires = NULL;
|
alternatives = shlib_requires = changelog = 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)
|
||||||
@ -729,6 +731,9 @@ main(int argc, char **argv)
|
|||||||
case 'C':
|
case 'C':
|
||||||
conflicts = optarg;
|
conflicts = optarg;
|
||||||
break;
|
break;
|
||||||
|
case 'c':
|
||||||
|
changelog = optarg;
|
||||||
|
break;
|
||||||
case 'D':
|
case 'D':
|
||||||
deps = optarg;
|
deps = optarg;
|
||||||
break;
|
break;
|
||||||
@ -870,6 +875,9 @@ main(int argc, char **argv)
|
|||||||
if (buildopts)
|
if (buildopts)
|
||||||
xbps_dictionary_set_cstring_nocopy(pkg_propsd,
|
xbps_dictionary_set_cstring_nocopy(pkg_propsd,
|
||||||
"build-options", buildopts);
|
"build-options", buildopts);
|
||||||
|
if (changelog)
|
||||||
|
xbps_dictionary_set_cstring_nocopy(pkg_propsd,
|
||||||
|
"changelog", changelog);
|
||||||
|
|
||||||
/* Optional arrays */
|
/* Optional arrays */
|
||||||
process_array("run_depends", deps);
|
process_array("run_depends", deps);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.Dd October 31, 2015
|
.Dd April 23, 2016
|
||||||
.Dt XBPS-CREATE 1
|
.Dt XBPS-CREATE 1
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
.Nm xbps-create
|
.Nm xbps-create
|
||||||
@ -87,6 +87,8 @@ If
|
|||||||
.Em symlink
|
.Em symlink
|
||||||
is a relative path, the symlink will be created relative to
|
is a relative path, the symlink will be created relative to
|
||||||
.Em target .
|
.Em target .
|
||||||
|
.It Fl c, Fl -changelog Ar string
|
||||||
|
The package changelog string.
|
||||||
.El
|
.El
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr xbps-checkvers 1 ,
|
.Xr xbps-checkvers 1 ,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user