diff --git a/.gitignore b/.gitignore index c6d7ebe..092a664 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ SOURCES/bubblewrap-0.1.1.tar.gz -SOURCES/rpm-ostree-client-2016.9.tar.xz +SOURCES/rpm-ostree-client-2016.11.tar.xz diff --git a/.rpm-ostree-client.metadata b/.rpm-ostree-client.metadata index 178b78c..6563f0d 100644 --- a/.rpm-ostree-client.metadata +++ b/.rpm-ostree-client.metadata @@ -1,2 +1,2 @@ 903322415b3e8824c6d6513a25a8b3ca03083186 SOURCES/bubblewrap-0.1.1.tar.gz -2fcd9aab4ddc14a40609f548bd5d0daae8bd43f2 SOURCES/rpm-ostree-client-2016.9.tar.xz +5f408ee3a23c7c3561da6ef5eb0f8a3d79b37de3 SOURCES/rpm-ostree-client-2016.11.tar.xz diff --git a/SOURCES/0001-Revert-selector-prefer-obsoletes-Related-RhBug-10965.patch b/SOURCES/0001-Revert-selector-prefer-obsoletes-Related-RhBug-10965.patch new file mode 100644 index 0000000..795bb72 --- /dev/null +++ b/SOURCES/0001-Revert-selector-prefer-obsoletes-Related-RhBug-10965.patch @@ -0,0 +1,127 @@ +From 1a32ea40288d88be40030665090bb2ae418cd0aa Mon Sep 17 00:00:00 2001 +From: Colin Walters +Date: Tue, 25 Oct 2016 09:53:14 -0400 +Subject: [PATCH] Revert "selector: prefer obsoletes (Related:RhBug:1096506)" + +This reverts commit 94ac2e5b980f9095faa372568a8e381e8a4523bc. +--- + data/tests/hawkey/greedy.repo | 2 -- + libdnf/hy-goal.c | 34 ++-------------------------------- + tests/hawkey/test_goal.c | 23 ----------------------- + 3 files changed, 2 insertions(+), 57 deletions(-) + +diff --git a/data/tests/hawkey/greedy.repo b/data/tests/hawkey/greedy.repo +index d450885..64bb85a 100644 +--- a/libdnf/data/tests/hawkey/greedy.repo ++++ b/libdnf/data/tests/hawkey/greedy.repo +@@ -5,7 +5,5 @@ + =Pkg: B 1 0 noarch + =Rec: C + =Prv: somereq +-=Obs: somereq + =Pkg: C 1 0 noarch + =Prv: somereq +-=Pkg: somereq 1 0 noarch +diff --git a/libdnf/hy-goal.c b/libdnf/hy-goal.c +index b404921..c50e8f5 100644 +--- a/libdnf/libdnf/hy-goal.c ++++ b/libdnf/libdnf/hy-goal.c +@@ -523,36 +523,6 @@ filter_name2job(DnfSack *sack, const struct _Filter *f, Queue *job) + return 0; + } + +-/** +- * add_preferred_provide: +- * when searching by provides the packages that contain the same +- * name as provide or contain obsoletes with the same name as their +- * provide will be picked first +- */ +-static void +-add_preferred_provide(DnfSack *sack, Queue *job, Id id) +-{ +- g_autoptr(GPtrArray) plist = g_ptr_array_new_with_free_func( +- (GDestroyNotify) g_object_unref); +- Pool *pool = dnf_sack_get_pool(sack); +- const char *name = pool_dep2str(pool, id); +- HyQuery q = hy_query_create(sack); +- hy_query_filter(q, HY_PKG_NAME, HY_NEQ, name); +- DnfPackageSet *pset = hy_query_run_set(q); +- hy_query_filter(q, HY_PKG_PROVIDES, HY_EQ, name); +- hy_query_filter_package_in(q, HY_PKG_OBSOLETES, HY_NEQ, pset); +- DnfPackage *pkg; +- plist = hy_query_run(q); +- for (guint i = 0; i < plist->len; i++) { +- pkg = g_ptr_array_index(plist, i); +- queue_push2(job, SOLVER_DISFAVOR|SOLVER_SOLVABLE, +- dnf_package_get_id(pkg)); +- } +- queue_push2(job, SOLVER_SOLVABLE_PROVIDES, id); +- hy_query_free(q); +- g_object_unref(pset); +-} +- + static int + filter_provides2job(DnfSack *sack, const struct _Filter *f, Queue *job) + { +@@ -568,7 +538,7 @@ filter_provides2job(DnfSack *sack, const struct _Filter *f, Queue *job) + switch (f->cmp_type) { + case HY_EQ: + id = dnf_reldep_get_id (f->matches[0].reldep); +- add_preferred_provide(sack, job, id); ++ queue_push2(job, SOLVER_SOLVABLE_PROVIDES, id); + break; + case HY_GLOB: + dataiterator_init(&di, pool, 0, 0, SOLVABLE_PROVIDES, name, SEARCH_GLOB); +@@ -579,7 +549,7 @@ filter_provides2job(DnfSack *sack, const struct _Filter *f, Queue *job) + assert(di.idp); + id = *di.idp; + if (!job_has(job, SOLVABLE_PROVIDES, id)) +- add_preferred_provide(sack, job, id); ++ queue_push2(job, SOLVER_SOLVABLE_PROVIDES, id); + dataiterator_free(&di); + break; + default: +diff --git a/tests/hawkey/test_goal.c b/tests/hawkey/test_goal.c +index 6217c38..ce2c8bd 100644 +--- a/libdnf/tests/hawkey/test_goal.c ++++ b/libdnf/tests/hawkey/test_goal.c +@@ -230,28 +230,6 @@ START_TEST(test_goal_install_selector) + } + END_TEST + +-START_TEST(test_goal_install_selector_obsoletes_first) +-{ +- HySelector sltr; +- HyGoal goal = hy_goal_create(test_globals.sack); +- +- sltr = hy_selector_create(test_globals.sack); +- hy_selector_set(sltr, HY_PKG_PROVIDES, HY_EQ, "somereq"); +- fail_if(!hy_goal_install_selector(goal, sltr, NULL)); +- hy_selector_free(sltr); +- +- fail_if(hy_goal_run(goal)); +- assert_iueo(goal, 1, 0, 0, 0); +- +- GPtrArray *plist = hy_goal_list_installs(goal, NULL); +- char *nvra = dnf_package_get_nevra(g_ptr_array_index(plist, 0)); +- ck_assert_str_eq(nvra, "B-1-0.noarch"); +- g_free(nvra); +- g_ptr_array_unref(plist); +- hy_goal_free(goal); +-} +-END_TEST +- + START_TEST(test_goal_install_selector_err) + { + int rc; +@@ -1459,7 +1437,6 @@ goal_suite(void) + tc = tcase_create("Greedy"); + tcase_add_unchecked_fixture(tc, fixture_greedy_only, teardown); + tcase_add_test(tc, test_goal_run_all); +- tcase_add_test(tc, test_goal_install_selector_obsoletes_first); + tcase_add_test(tc, test_goal_install_weak_deps); + suite_add_tcase(s, tc); + +-- +2.7.4 + diff --git a/SOURCES/0001-daemon-use-refspec-after-pulling-ancestry.patch b/SOURCES/0001-daemon-use-refspec-after-pulling-ancestry.patch new file mode 100644 index 0000000..ca4af71 --- /dev/null +++ b/SOURCES/0001-daemon-use-refspec-after-pulling-ancestry.patch @@ -0,0 +1,37 @@ +From 47ba21aca15be084deda0f9d80336ce0cb2717cc Mon Sep 17 00:00:00 2001 +From: Jonathan Lebon +Date: Mon, 31 Oct 2016 12:19:08 -0400 +Subject: [PATCH] daemon: use refspec after pulling ancestry + +Previously, in preparation for validating e.g. versions during 'deploy' +operations, we would pull the latest commit metadata. However, we would +then do resolve on the branch name only rather than the full refspec. +But this can sometimes give the wrong checksum. For example, if we have +multiple remotes holding the same branch name, ostree_repo_resolve_rev +will just start looking in each remote for the specified ref, and we may +thus end up with the checksum from the wrong remote. + +Related: RHBZ#1390259 + +Closes: #507 +Approved by: cgwalters +--- + src/daemon/rpmostreed-utils.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/daemon/rpmostreed-utils.c b/src/daemon/rpmostreed-utils.c +index d0f0abb..2f3aa5c 100644 +--- a/src/daemon/rpmostreed-utils.c ++++ b/src/daemon/rpmostreed-utils.c +@@ -301,7 +301,7 @@ rpmostreed_repo_pull_ancestry (OstreeRepo *repo, + /* First pass only. Now we can resolve the ref to a checksum. */ + if (checksum == NULL) + { +- if (!ostree_repo_resolve_rev (repo, ref, FALSE, &checksum, error)) ++ if (!ostree_repo_resolve_rev (repo, refspec, FALSE, &checksum, error)) + goto out; + } + +-- +2.7.4 + diff --git a/SPECS/rpm-ostree-client.spec b/SPECS/rpm-ostree-client.spec index cadccb9..1fe4d13 100644 --- a/SPECS/rpm-ostree-client.spec +++ b/SPECS/rpm-ostree-client.spec @@ -1,8 +1,8 @@ %global bubblewrap_version 0.1.1 Summary: Client side upgrade program Name: rpm-ostree-client -Version: 2016.9 -Release: 1.atomic%{?dist} +Version: 2016.11 +Release: 2.atomic%{?dist} #VCS: https://github.com/cgwalters/rpm-ostree # This tarball is generated via "make -f Makefile.dist-packaging dist-snapshot-without-compose-tooling" Source0: rpm-ostree-client-%{version}.tar.xz @@ -10,6 +10,9 @@ License: LGPLv2+ URL: https://github.com/projectatomic/rpm-ostree Source1: bubblewrap-%{bubblewrap_version}.tar.gz +Patch0: 0001-daemon-use-refspec-after-pulling-ancestry.patch +Patch1: 0001-Revert-selector-prefer-obsoletes-Related-RhBug-10965.patch + Requires: ostree-fuse # We always run autogen.sh @@ -119,6 +122,9 @@ python autofiles.py > files \ %doc COPYING README.md %changelog +* Mon Oct 24 2016 Colin Walters +- New upstream version + * Thu Sep 08 2016 walters@redhat.com - 2016.10-1 - New upstream version