From 33032429c2b4517089a82bfbb14c12c3a1d3e8a4 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Mon, 22 Sep 2014 21:20:38 +0200 Subject: [PATCH 01/15] bin/xbps-create: allow to define the reverts field for a package. --- bin/xbps-create/main.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/bin/xbps-create/main.c b/bin/xbps-create/main.c index f84d630e..427c386a 100644 --- a/bin/xbps-create/main.c +++ b/bin/xbps-create/main.c @@ -94,6 +94,8 @@ usage(void) " -q --quiet Work silently.\n" " -R --replaces Replaces (blank separated list,\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 --desc Short description (max 80 characters).\n" " -t --tags A list of tags/categories (blank separated list).\n" @@ -591,7 +593,7 @@ set_build_date(void) int 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[] = { { "architecture", required_argument, NULL, 'A' }, { "built-with", required_argument, NULL, 'B' }, @@ -609,6 +611,7 @@ main(int argc, char **argv) { "preserve", no_argument, NULL, 'p' }, { "quiet", no_argument, NULL, 'q' }, { "replaces", required_argument, NULL, 'R' }, + { "reverts", required_argument, NULL, 'r' }, { "long-desc", required_argument, NULL, 'S' }, { "desc", required_argument, NULL, 's' }, { "tags", required_argument, NULL, 't' }, @@ -624,7 +627,7 @@ main(int argc, char **argv) struct archive_entry_linkresolver *resolver; struct stat st; 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 *buildopts, *shlib_provides, *shlib_requires; const char *compression, *tags = NULL, *srcrevs = NULL; @@ -634,8 +637,9 @@ main(int argc, char **argv) mode_t myumask; arch = conflicts = deps = homepage = license = maint = compression = NULL; - provides = pkgver = replaces = desc = ldesc = bwith = buildopts = NULL; - config_files = mutable_files = shlib_provides = shlib_requires = NULL; + provides = pkgver = replaces = reverts = desc = ldesc = bwith = NULL; + buildopts = config_files = mutable_files = shlib_provides = NULL; + shlib_requires = NULL; while ((c = getopt_long(argc, argv, shortopts, longopts, NULL)) != -1) { if (optarg && strcmp(optarg, "") == 0) @@ -690,6 +694,9 @@ main(int argc, char **argv) case 'R': replaces = optarg; break; + case 'r': + reverts = optarg; + break; case 'S': ldesc = optarg; break; @@ -794,6 +801,7 @@ main(int argc, char **argv) process_array("conflicts", conflicts); process_array("provides", provides); process_array("replaces", replaces); + process_array("reverts", reverts); process_array("shlib-provides", shlib_provides); process_array("shlib-requires", shlib_requires); From 18204aeac1cecb1ddb74a779727a68d2892971f5 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Mon, 22 Sep 2014 21:22:05 +0200 Subject: [PATCH 02/15] lib/util.c: add function which tests if a given pkgver is reverted by a given pkg. --- include/xbps.h.in | 13 +++++++++++++ lib/util.c | 22 ++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/include/xbps.h.in b/include/xbps.h.in index f5a1a8fb..32e0e824 100644 --- a/include/xbps.h.in +++ b/include/xbps.h.in @@ -1835,6 +1835,19 @@ bool xbps_pkg_arch_match(struct xbps_handle *xhp, */ int xbps_humanize_number(char *buf, int64_t bytes); +/** + * Tests if pkgver is reverted by pkg + * + * The package version is defined by: + * ${VERSION}_${REVISION}. + * + * @param[in] pkgver a package version string + * @param[in] pkg a package which is a candidate to revert pkgver. + * + * @return 1 if pkg reverts pkgver, 0 otherwise. + */ +int xbps_pkgver_is_reverted(const char *pkgver, xbps_dictionary_t pkg); + /** * Compares package version strings. * diff --git a/lib/util.c b/lib/util.c index 11ea33b1..8d476f35 100644 --- a/lib/util.c +++ b/lib/util.c @@ -425,3 +425,25 @@ xbps_humanize_number(char *buf, int64_t bytes) return humanize_number(buf, 7, bytes, "B", HN_AUTOSCALE, HN_DECIMAL|HN_NOSPACE); } + +/* + * Check if pkg is explicitly marked to replace a specific installed version. + */ +int +xbps_pkgver_is_reverted(const char *pkgver, xbps_dictionary_t pkg) { + unsigned int i; + xbps_array_t reverts; + const char *revertver; + + if ((reverts = xbps_dictionary_get(pkg, "reverts")) == NULL) + return 0; + + for (i = 0; i < xbps_array_count(reverts); i++) { + xbps_array_get_cstring_nocopy(reverts, i, &revertver); + if (strcmp(pkgver, revertver) == 0) { + return 1; + } + } + + return 0; +} From ebd614dff64e6d21da52bddf75d08d04de44ddea Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Mon, 22 Sep 2014 21:23:40 +0200 Subject: [PATCH 03/15] bin/xbps-rindex: take the revert field in account. - if the user wants to add a package which is older than the one in the index, xbps-rindex will check if the package reverts the one on the index. If so the package will be added regardless of its version - if the user wants to add a package which is newer than the one on the index, xbps-rindex will check if the package on the index reverts the one the user wants to add. If so the package will be skipped regardless of its version. --- bin/xbps-rindex/index-add.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/bin/xbps-rindex/index-add.c b/bin/xbps-rindex/index-add.c index a61e4e5e..5ef65ac0 100644 --- a/bin/xbps-rindex/index-add.c +++ b/bin/xbps-rindex/index-add.c @@ -117,6 +117,22 @@ index_add(struct xbps_handle *xhp, int argc, char **argv, bool force) xbps_dictionary_get_cstring(curpkgd, "pkgver", &opkgver); xbps_dictionary_get_cstring(curpkgd, "architecture", &oarch); ret = xbps_cmpver(pkgver, opkgver); + + /* + * If the current package reverts the package in the index, consider + * the current package as the newer one. + */ + if(ret < 0 && xbps_pkgver_is_reverted(pkgver, curpkgd)) { + ret = 1; + } + /* + * If package in the index reverts current package, consider the + * package in the index as the newer one. + */ + else if (ret < 0 && xbps_pkgver_is_reverted(opkgver, binpkgd)) { + ret = -1; + } + if (ret <= 0) { /* Same version or index version greater */ fprintf(stderr, "index: skipping `%s' (%s), already registered.\n", pkgver, arch); From cd9a9e78a82b9085f7d00d0f9e651f59700a6826 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Mon, 22 Sep 2014 21:34:28 +0200 Subject: [PATCH 04/15] lib/transaction_ops.c: trans_find_pkg will check the revert field too. - if a package on the repo has a lower version than installed libxbps will check if this package reverts the one installed and downgrades to it if so. --- lib/transaction_ops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/transaction_ops.c b/lib/transaction_ops.c index 7dd52e4d..22211e97 100644 --- a/lib/transaction_ops.c +++ b/lib/transaction_ops.c @@ -117,7 +117,8 @@ trans_find_pkg(struct xbps_handle *xhp, const char *pkg, bool reinstall) */ xbps_dictionary_get_cstring_nocopy(pkg_pkgdb, "pkgver", &instpkgver); - if (xbps_cmpver(repopkgver, instpkgver) <= 0) { + if (xbps_cmpver(repopkgver, instpkgver) <= 0 && + !xbps_pkgver_is_reverted(repopkgver, pkg_repod)) { xbps_dbg_printf(xhp, "[rpool] Skipping `%s' " "(installed: %s) from repository `%s'\n", repopkgver, instpkgver, repoloc); From 50fb6c16050fa781a41d8ebff62bb2a98f0f71ef Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Tue, 23 Sep 2014 09:51:11 +0200 Subject: [PATCH 05/15] rename xbps_pkgver_is_reverted to xbps_pkg_reverts --- bin/xbps-rindex/index-add.c | 4 ++-- include/xbps.h.in | 4 ++-- lib/transaction_ops.c | 2 +- lib/util.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/xbps-rindex/index-add.c b/bin/xbps-rindex/index-add.c index 5ef65ac0..ae54fd2c 100644 --- a/bin/xbps-rindex/index-add.c +++ b/bin/xbps-rindex/index-add.c @@ -122,14 +122,14 @@ index_add(struct xbps_handle *xhp, int argc, char **argv, bool force) * If the current package reverts the package in the index, consider * the current package as the newer one. */ - if(ret < 0 && xbps_pkgver_is_reverted(pkgver, curpkgd)) { + if(ret < 0 && xbps_pkg_reverts(curpkgd, pkgver)) { ret = 1; } /* * If package in the index reverts current package, consider the * package in the index as the newer one. */ - else if (ret < 0 && xbps_pkgver_is_reverted(opkgver, binpkgd)) { + else if (ret < 0 && xbps_pkg_reverts(binpkgd, opkgver)) { ret = -1; } diff --git a/include/xbps.h.in b/include/xbps.h.in index 32e0e824..d534dd1a 100644 --- a/include/xbps.h.in +++ b/include/xbps.h.in @@ -1841,12 +1841,12 @@ int xbps_humanize_number(char *buf, int64_t bytes); * The package version is defined by: * ${VERSION}_${REVISION}. * - * @param[in] pkgver a package version string * @param[in] pkg a package which is a candidate to revert pkgver. + * @param[in] pkgver a package version string * * @return 1 if pkg reverts pkgver, 0 otherwise. */ -int xbps_pkgver_is_reverted(const char *pkgver, xbps_dictionary_t pkg); +int xbps_pkg_reverts(xbps_dictionary_t pkg, const char *pkgver); /** * Compares package version strings. diff --git a/lib/transaction_ops.c b/lib/transaction_ops.c index 22211e97..63e6edf4 100644 --- a/lib/transaction_ops.c +++ b/lib/transaction_ops.c @@ -118,7 +118,7 @@ trans_find_pkg(struct xbps_handle *xhp, const char *pkg, bool reinstall) xbps_dictionary_get_cstring_nocopy(pkg_pkgdb, "pkgver", &instpkgver); if (xbps_cmpver(repopkgver, instpkgver) <= 0 && - !xbps_pkgver_is_reverted(repopkgver, pkg_repod)) { + !xbps_pkg_reverts(pkg_repod, repopkgver)) { xbps_dbg_printf(xhp, "[rpool] Skipping `%s' " "(installed: %s) from repository `%s'\n", repopkgver, instpkgver, repoloc); diff --git a/lib/util.c b/lib/util.c index 8d476f35..0732c40e 100644 --- a/lib/util.c +++ b/lib/util.c @@ -430,7 +430,7 @@ xbps_humanize_number(char *buf, int64_t bytes) * Check if pkg is explicitly marked to replace a specific installed version. */ int -xbps_pkgver_is_reverted(const char *pkgver, xbps_dictionary_t pkg) { +xbps_pkg_reverts(xbps_dictionary_t pkg, const char *pkgver) { unsigned int i; xbps_array_t reverts; const char *revertver; From dbab3f2cfc592fcf565146b08303be050c067085 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Tue, 23 Sep 2014 18:22:57 +0200 Subject: [PATCH 06/15] xbps_pkg_reverts: use version instead of pkgname-version to find reverts --- lib/util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/util.c b/lib/util.c index 0732c40e..4ff065d3 100644 --- a/lib/util.c +++ b/lib/util.c @@ -433,6 +433,7 @@ int xbps_pkg_reverts(xbps_dictionary_t pkg, const char *pkgver) { unsigned int i; xbps_array_t reverts; + const char *version = xbps_pkg_version(pkgver); const char *revertver; if ((reverts = xbps_dictionary_get(pkg, "reverts")) == NULL) @@ -440,7 +441,7 @@ xbps_pkg_reverts(xbps_dictionary_t pkg, const char *pkgver) { for (i = 0; i < xbps_array_count(reverts); i++) { xbps_array_get_cstring_nocopy(reverts, i, &revertver); - if (strcmp(pkgver, revertver) == 0) { + if (strcmp(version, revertver) == 0) { return 1; } } From 511fdc42157c58f79b5ba732487a64bb0fb8fa18 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Tue, 23 Sep 2014 18:26:03 +0200 Subject: [PATCH 07/15] xbps_pkg_reverts: add unit tests to test this functionality. --- tests/xbps/libxbps/pkgdb/main.c | 31 +++++++++++++++++++++++ tests/xbps/libxbps/pkgdb/pkgdb-0.38.plist | 16 ++++++++++++ 2 files changed, 47 insertions(+) diff --git a/tests/xbps/libxbps/pkgdb/main.c b/tests/xbps/libxbps/pkgdb/main.c index e810523f..b87b8ca8 100644 --- a/tests/xbps/libxbps/pkgdb/main.c +++ b/tests/xbps/libxbps/pkgdb/main.c @@ -146,11 +146,42 @@ ATF_TC_BODY(pkgdb_get_pkg_revdeps_test, tc) ATF_REQUIRE_STREQ(xbps_string_cstring_nocopy(pstr), eout); } +ATF_TC(pkgdb_pkg_reverts_test); +ATF_TC_HEAD(pkgdb_pkg_reverts_test, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test xbps_pkg_reverts()"); +} + +ATF_TC_BODY(pkgdb_pkg_reverts_test, tc) +{ + struct xbps_handle xh; + const char *tcsdir; + xbps_dictionary_t pkgd; + + /* get test source dir */ + tcsdir = atf_tc_get_config_var(tc, "srcdir"); + + memset(&xh, 0, sizeof(xh)); + strncpy(xh.rootdir, tcsdir, sizeof(xh.rootdir)); + strncpy(xh.metadir, tcsdir, sizeof(xh.metadir)); + xh.flags = XBPS_FLAG_DEBUG; + ATF_REQUIRE_EQ(xbps_init(&xh), 0); + + pkgd = xbps_pkgdb_get_pkg(&xh, "reverts"); + ATF_REQUIRE_EQ(xbps_object_type(pkgd), XBPS_TYPE_DICTIONARY); + + ATF_REQUIRE_EQ(xbps_pkg_reverts(pkgd, "reverts-0.2_1"), 0); + ATF_REQUIRE_EQ(xbps_pkg_reverts(pkgd, "reverts-0.3_1"), 1); + ATF_REQUIRE_EQ(xbps_pkg_reverts(pkgd, "reverts-0.4_1"), 1); + ATF_REQUIRE_EQ(xbps_pkg_reverts(pkgd, "reverts-0.5_1"), 0); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, pkgdb_get_pkg_test); ATF_TP_ADD_TC(tp, pkgdb_get_virtualpkg_test); ATF_TP_ADD_TC(tp, pkgdb_get_pkg_revdeps_test); + ATF_TP_ADD_TC(tp, pkgdb_pkg_reverts_test); return atf_no_error(); } diff --git a/tests/xbps/libxbps/pkgdb/pkgdb-0.38.plist b/tests/xbps/libxbps/pkgdb/pkgdb-0.38.plist index b6bfa35b..7c4393ad 100644 --- a/tests/xbps/libxbps/pkgdb/pkgdb-0.38.plist +++ b/tests/xbps/libxbps/pkgdb/pkgdb-0.38.plist @@ -94,5 +94,21 @@ state installed + reverts + + automatic-install + + pkgver + reverts-0.2_1 + reverts + + 0.3_1 + 0.4_1 + + short_desc + two descriptionm + state + installed + From 78203c1735add824a1fa613614703d0ae828d072 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Tue, 23 Sep 2014 19:14:45 +0200 Subject: [PATCH 08/15] bin/xbps-rindex: fix adding packages with reverts. --- bin/xbps-rindex/index-add.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/xbps-rindex/index-add.c b/bin/xbps-rindex/index-add.c index ae54fd2c..e8955a81 100644 --- a/bin/xbps-rindex/index-add.c +++ b/bin/xbps-rindex/index-add.c @@ -119,17 +119,17 @@ index_add(struct xbps_handle *xhp, int argc, char **argv, bool force) ret = xbps_cmpver(pkgver, opkgver); /* - * If the current package reverts the package in the index, consider - * the current package as the newer one. + * If the considered package reverts the package in the index, + * consider the current package as the newer one. */ - if(ret < 0 && xbps_pkg_reverts(curpkgd, pkgver)) { + if(ret < 0 && xbps_pkg_reverts(binpkgd, opkgver)) { ret = 1; } /* - * If package in the index reverts current package, consider the + * If package in the index reverts considered package, consider the * package in the index as the newer one. */ - else if (ret < 0 && xbps_pkg_reverts(binpkgd, opkgver)) { + else if (ret > 0 && xbps_pkg_reverts(curpkgd, pkgver)) { ret = -1; } From 4467518329b95c4e1288858ef4deafb9caedbb65 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Tue, 23 Sep 2014 19:17:31 +0200 Subject: [PATCH 09/15] bin/xbps-rindex: add unit tests to test rindex behavior for adding packages with reverts. --- tests/xbps/xbps-rindex/add_test.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tests/xbps/xbps-rindex/add_test.sh b/tests/xbps/xbps-rindex/add_test.sh index 82302072..a84b5178 100644 --- a/tests/xbps/xbps-rindex/add_test.sh +++ b/tests/xbps/xbps-rindex/add_test.sh @@ -30,6 +30,33 @@ update_body() { atf_check_equal $rv 0 } +revert_head() { + atf_set "descr" "xbps-rindex(8) -a: revert version test" +} + +revert_body() { + mkdir -p some_repo pkg_A + touch pkg_A/file00 + cd some_repo + xbps-create -A noarch -n foo-1.1_1 -s "foo pkg" ../pkg_A + atf_check_equal $? 0 + xbps-rindex -a *.xbps + atf_check_equal $? 0 + xbps-create -A noarch -n foo-1.0_1 -r "1.1_1" -s "foo pkg" ../pkg_A + atf_check_equal $? 0 + xbps-rindex -a *.xbps + atf_check_equal $? 0 + cd .. + result="$(xbps-query -r root -C empty.conf --repository=some_repo -o \*)" + expected="foo-1.0_1: /file00 (some_repo)" + rv=0 + if [ "$result" != "$expected" ]; then + rv=1 + fi + atf_check_equal $rv 0 +} + atf_init_test_cases() { atf_add_test_case update + atf_add_test_case revert } From 0c333d574b3fd0a14ee0cb9013c467fde24dc4b7 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Tue, 23 Sep 2014 19:28:22 +0200 Subject: [PATCH 10/15] include/xbps.h.in: sync doc with reality --- include/xbps.h.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/xbps.h.in b/include/xbps.h.in index d534dd1a..68950dfb 100644 --- a/include/xbps.h.in +++ b/include/xbps.h.in @@ -1839,7 +1839,9 @@ int xbps_humanize_number(char *buf, int64_t bytes); * Tests if pkgver is reverted by pkg * * The package version is defined by: - * ${VERSION}_${REVISION}. + * ${NAME}-{${VERSION}_${REVISION}. + * + * the name part is ignored. * * @param[in] pkg a package which is a candidate to revert pkgver. * @param[in] pkgver a package version string From a421bf7db5f612878853c4ec5c1e61d48c73bc99 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Tue, 23 Sep 2014 20:50:34 +0200 Subject: [PATCH 11/15] xbps_pkg_reverts: return bool instead of int. --- include/xbps.h.in | 4 ++-- lib/util.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/xbps.h.in b/include/xbps.h.in index 68950dfb..6b695342 100644 --- a/include/xbps.h.in +++ b/include/xbps.h.in @@ -1846,9 +1846,9 @@ int xbps_humanize_number(char *buf, int64_t bytes); * @param[in] pkg a package which is a candidate to revert pkgver. * @param[in] pkgver a package version string * - * @return 1 if pkg reverts pkgver, 0 otherwise. + * @return true if pkg reverts pkgver, false otherwise. */ -int xbps_pkg_reverts(xbps_dictionary_t pkg, const char *pkgver); +bool xbps_pkg_reverts(xbps_dictionary_t pkg, const char *pkgver); /** * Compares package version strings. diff --git a/lib/util.c b/lib/util.c index 4ff065d3..a05e6451 100644 --- a/lib/util.c +++ b/lib/util.c @@ -429,7 +429,7 @@ xbps_humanize_number(char *buf, int64_t bytes) /* * Check if pkg is explicitly marked to replace a specific installed version. */ -int +bool xbps_pkg_reverts(xbps_dictionary_t pkg, const char *pkgver) { unsigned int i; xbps_array_t reverts; @@ -437,14 +437,14 @@ xbps_pkg_reverts(xbps_dictionary_t pkg, const char *pkgver) { const char *revertver; if ((reverts = xbps_dictionary_get(pkg, "reverts")) == NULL) - return 0; + return false; for (i = 0; i < xbps_array_count(reverts); i++) { xbps_array_get_cstring_nocopy(reverts, i, &revertver); if (strcmp(version, revertver) == 0) { - return 1; + return false; } } - return 0; + return false; } From b5f357bd5e4d2c71a1cd9aafe849ee5f1a0d07d8 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Tue, 23 Sep 2014 20:50:59 +0200 Subject: [PATCH 12/15] bin/xbps-create: update manpage. --- bin/xbps-create/xbps-create.8 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/xbps-create/xbps-create.8 b/bin/xbps-create/xbps-create.8 index 6c54bbed..f1b7f257 100644 --- a/bin/xbps-create/xbps-create.8 +++ b/bin/xbps-create/xbps-create.8 @@ -58,6 +58,9 @@ Enable quiet operation. .It Fl R, Fl -replaces Ar list A list of package patterns this package replaces, separated by whitespaces. Example: .Ar 'foo>=1.0 blah>=2.0' . +.It Fl r, Fl -reverts Ar list +A list of versions this package reverts, separated by whitespaces. Example: +.Ar '2.0_1 2.1_1' . .It Fl S, Fl -long-desc Ar string A long description for this package. .It Fl s, Fl -desc Ar string From 2adcf485b54d324b8f714fe38c3fb3c879c799b9 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Tue, 23 Sep 2014 20:52:24 +0200 Subject: [PATCH 13/15] xbps.h: bump XBPS_API_VERSION. --- include/xbps.h.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/xbps.h.in b/include/xbps.h.in index 6b695342..2e909a0f 100644 --- a/include/xbps.h.in +++ b/include/xbps.h.in @@ -48,7 +48,7 @@ * * This header documents the full API for the XBPS Library. */ -#define XBPS_API_VERSION "20140913" +#define XBPS_API_VERSION "20140923" #ifndef XBPS_VERSION #define XBPS_VERSION "UNSET" From 66e697ffc422d8ed21ad862fa9616856fc4b2437 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Tue, 23 Sep 2014 21:00:24 +0200 Subject: [PATCH 14/15] NEWS: explain new reverts field. --- NEWS | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/NEWS b/NEWS index 487f1ddd..393708ea 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,13 @@ xbps-0.41 (???): * A performance improvement for xbps_file_hash(), by Enno Boland. + * Added reverts field to package definitions. If defined, a package will + replace all versions specified in this field even if the installed version is + newer. This is helpful when a broken package is released. The maintainer can + downgrade this package and define a reverts field to the broken version. On + the next update the user will automatically replace the broken release by the + new downgraded release. + xbps-0.40 (2014-09-18): * xbps-install(8): handle xbps_transaction_prepare() returning ENOSPC, to From 162845023e448ef389b771a86f6574dc0ba2aafe Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Tue, 23 Sep 2014 21:05:28 +0200 Subject: [PATCH 15/15] NEWS: correct reverts description. --- NEWS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 393708ea..060f5545 100644 --- a/NEWS +++ b/NEWS @@ -12,8 +12,8 @@ xbps-0.41 (???): replace all versions specified in this field even if the installed version is newer. This is helpful when a broken package is released. The maintainer can downgrade this package and define a reverts field to the broken version. On - the next update the user will automatically replace the broken release by the - new downgraded release. + the next update xbps-install will automatically replace the broken release by + the new downgraded release. xbps-0.40 (2014-09-18):