diff --git a/000-Ensure_that_provides-requires_versions_are_factored_into_dep_filtering.diff b/000-Ensure_that_provides-requires_versions_are_factored_into_dep_filtering.diff new file mode 100644 index 0000000..37724e9 --- /dev/null +++ b/000-Ensure_that_provides-requires_versions_are_factored_into_dep_filtering.diff @@ -0,0 +1,53 @@ +diff --git a/src/parsehdr.c b/src/parsehdr.c +index ceaf884..61f5a89 100644 +--- a/src/parsehdr.c ++++ b/src/parsehdr.c +@@ -319,7 +319,10 @@ cr_package_from_header(Header hdr, + }; + + // Hastable with filenames from provided +- GHashTable *provided_hashtable = g_hash_table_new(g_str_hash, g_str_equal); ++ GHashTable *provided_hashtable = g_hash_table_new_full(g_str_hash, ++ g_str_equal, ++ NULL, ++ g_free); + + // Hashtable with already processed files from requires + GHashTable *ap_hashtable = g_hash_table_new_full(g_str_hash, +@@ -358,15 +361,19 @@ cr_package_from_header(Header hdr, + } + + // Skip package primary files +- if (g_hash_table_lookup_extended(filenames_hashtable, filename, NULL, NULL)) { ++ if (*filename == '/' && g_hash_table_lookup_extended(filenames_hashtable, filename, NULL, NULL)) { + if (cr_is_primary(filename)) { + continue; + } + } + + // Skip files which are provided +- if (g_hash_table_lookup_extended(provided_hashtable, filename, NULL, NULL)) { +- continue; ++ gpointer pvalue; ++ if (g_hash_table_lookup_extended(provided_hashtable, filename, NULL, &pvalue)) { ++ struct ap_value_struct *ap_value = pvalue; ++ if (!ap_value->flags || !ap_value->flags[0] || !flags || !flags[0] || ++ (!g_strcmp0(ap_value->flags, flags) && !g_strcmp0(ap_value->version, full_version))) ++ continue; + } + + // Calculate pre value +@@ -413,8 +420,12 @@ cr_package_from_header(Header hdr, + + switch (deptype) { + case DEP_PROVIDES: +- g_hash_table_replace(provided_hashtable, dependency->name, dependency->name); + pkg->provides = g_slist_prepend(pkg->provides, dependency); ++ struct ap_value_struct *pvalue = g_malloc(sizeof(struct ap_value_struct)); ++ pvalue->flags = flags; ++ pvalue->version = full_version; ++ pvalue->pre = dependency->pre; ++ g_hash_table_replace(provided_hashtable, dependency->name, pvalue); + break; + case DEP_CONFLICTS: + pkg->conflicts = g_slist_prepend(pkg->conflicts, dependency); diff --git a/createrepo_c-0.10.0.git20160503.7c6fae0.tar.gz b/createrepo_c-0.10.0.git20160503.7c6fae0.tar.gz deleted file mode 100644 index f4b6d6b..0000000 --- a/createrepo_c-0.10.0.git20160503.7c6fae0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:86504509036d18db8a9829acb9e5108a2e62e438611e65940ac45aca24e63a8a -size 373784 diff --git a/createrepo_c-0.10.0.git20160929.547b5db.tar.gz b/createrepo_c-0.10.0.git20160929.547b5db.tar.gz new file mode 100644 index 0000000..81f03b1 --- /dev/null +++ b/createrepo_c-0.10.0.git20160929.547b5db.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:00a3dbba22ca41503f12aed7f9c5496b477edcdf608c0090847518ade8944092 +size 357990 diff --git a/createrepo_c.changes b/createrepo_c.changes index 60b673e..0e05668 100644 --- a/createrepo_c.changes +++ b/createrepo_c.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Oct 31 13:19:23 UTC 2016 - fschreiner@suse.com + +- updated upstream sources +- Added patch 000-Ensure_that_provides-requires_versions_are_factored_into_dep_filtering.diff + ------------------------------------------------------------------- Tue Jul 5 11:03:23 UTC 2016 - jengelh@inai.de diff --git a/createrepo_c.spec b/createrepo_c.spec index 92fa4ed..4047241 100644 --- a/createrepo_c.spec +++ b/createrepo_c.spec @@ -20,17 +20,17 @@ %define libname lib%{name}%{major} %define devname lib%{name}-devel -%define version_unconverted 0.10.0.git20160503.7c6fae0 +%define version_unconverted 0.10.0.git20160929.547b5db Name: createrepo_c Summary: Creates a common metadata repository License: GPL-2.0 Group: System/Packages -Version: 0.10.0.git20160503.7c6fae0 +Version: 0.10.0.git20160929.547b5db Release: 0 Url: https://github.com/rpm-software-management/createrepo_c Source0: %{name}-%{version}.tar.gz - +Patch0: 000-Ensure_that_provides-requires_versions_are_factored_into_dep_filtering.diff BuildRequires: bash-completion %if 0%{?suse_version} >= 1330 @@ -38,8 +38,8 @@ BuildRequires: bash-completion-devel %endif BuildRequires: cmake -BuildRequires: fdupes BuildRequires: doxygen +BuildRequires: fdupes BuildRequires: file-devel BuildRequires: glib2-devel >= 2.22.0 BuildRequires: libbz2-devel @@ -87,6 +87,7 @@ These development files are for easy manipulation with a repodata. %prep %setup -q +%patch0 -p1 %if %{with python3} rm -rf py3