rhughes pushed to libhif (master). "Update to new upstream version"

notifications at fedoraproject.org notifications at fedoraproject.org
Wed Apr 8 19:13:54 UTC 2015


>From 193d78d46ce28cfc079a63e23bbdb58ddeab0eed Mon Sep 17 00:00:00 2001
From: Richard Hughes <richard at hughsie.com>
Date: Wed, 8 Apr 2015 20:13:44 +0100
Subject: Update to new upstream version


diff --git a/.gitignore b/.gitignore
index ca68744..28aeb57 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@
 /libhif-0.1.6.tar.xz
 /libhif-0.1.7.tar.xz
 /libhif-0.1.8.tar.xz
+/libhif-0.2.0.tar.xz
diff --git a/0001-Ensure-the-mirror-list-is-set-before-trying-to-downl.patch b/0001-Ensure-the-mirror-list-is-set-before-trying-to-downl.patch
deleted file mode 100644
index 08f9d23..0000000
--- a/0001-Ensure-the-mirror-list-is-set-before-trying-to-downl.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From a4d699fd15c4f6ef29c9026c0a77e5dea5913e66 Mon Sep 17 00:00:00 2001
-From: Richard Hughes <richard at hughsie.com>
-Date: Tue, 3 Feb 2015 14:13:53 +0000
-Subject: [PATCH] Ensure the mirror list is set before trying to download
- packages
-
-This works around a librepo behaviour change in the latest update.
----
- libhif/hif-source.c | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/libhif/hif-source.c b/libhif/hif-source.c
-index 30fb4f3..b38fcf4 100644
---- a/libhif/hif-source.c
-+++ b/libhif/hif-source.c
-@@ -743,6 +743,8 @@ hif_source_set_keyfile_data (HifSource *source, GError **error)
- 	}
- 
- 	/* set location if currently unset */
-+	if (!lr_handle_setopt (priv->repo_handle, error, LRO_LOCAL, FALSE))
-+		return FALSE;
- 	if (priv->location == NULL) {
- 		_cleanup_free_ gchar *tmp = NULL;
- 		tmp = g_build_filename (hif_context_get_cache_dir (priv->context),
-@@ -1555,7 +1557,11 @@ hif_source_download_package (HifSource *source,
- 	int checksum_type;
- 	_cleanup_error_free_ GError *error_local = NULL;
- 	_cleanup_free_ gchar *basename = NULL;
--	_cleanup_free_ gchar *directory_slash;
-+	_cleanup_free_ gchar *directory_slash = NULL;
-+
-+	/* ensure we reset the values from the keyfile */
-+	if (!hif_source_set_keyfile_data (source, error))
-+		return NULL;
- 
- 	/* if nothing specified then use cachedir */
- 	if (directory == NULL) {
--- 
-2.1.0
-
diff --git a/0001-If-the-enabled-local-source-does-not-exist-do-not-ad.patch b/0001-If-the-enabled-local-source-does-not-exist-do-not-ad.patch
deleted file mode 100644
index b586a4f..0000000
--- a/0001-If-the-enabled-local-source-does-not-exist-do-not-ad.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-diff --git a/data/tests/yum.repos.d/local.repo b/data/tests/yum.repos.d/local.repo
-index 4773cc0..0c25d48 100644
---- a/data/tests/yum.repos.d/local.repo
-+++ b/data/tests/yum.repos.d/local.repo
-@@ -1,6 +1,6 @@
- [local]
- name=Local
--baseurl=file:///tmp/repo
-+baseurl=file:///tmp
- enabled=1
- gpgcheck=0
- metadata_expire=0
-diff --git a/libhif/hif-sack.c b/libhif/hif-sack.c
-index 5f86c58..550fa1f 100644
---- a/libhif/hif-sack.c
-+++ b/libhif/hif-sack.c
-@@ -82,6 +82,7 @@ hif_sack_add_source (HySack sack,
- 			if (g_error_matches (error_local,
- 					     HIF_ERROR,
- 					     HIF_ERROR_CANNOT_FETCH_SOURCE)) {
-+				hif_source_set_enabled (src, HIF_SOURCE_ENABLED_NONE);
- 				g_warning ("Skipping refresh of %s: %s",
- 					   hif_source_get_id (src),
- 					   error_local->message);
-@@ -93,6 +94,13 @@ hif_sack_add_source (HySack sack,
- 		}
- 	}
- 
-+	/* checking disabled the repo */
-+	if (hif_source_get_enabled (src) == HIF_SOURCE_ENABLED_NONE) {
-+		g_debug ("Skipping %s as repo no longer enabled",
-+			 hif_source_get_id (src));
-+		return hif_state_finished (state, error);
-+	}
-+
- 	/* done */
- 	if (!hif_state_done (state, error))
- 		return FALSE;
-diff --git a/libhif/hif-self-test.c b/libhif/hif-self-test.c
-index 23ee721..7ba9b3b 100644
---- a/libhif/hif-self-test.c
-+++ b/libhif/hif-self-test.c
-@@ -878,8 +878,9 @@ hif_repos_func (void)
- 	/* try to refresh local repo */
- 	hif_state_reset (state);
- 	ret = hif_source_update (src, HIF_SOURCE_UPDATE_FLAG_NONE, state, &error);
--	g_assert_no_error (error);
--	g_assert (ret);
-+	g_assert_error (error, HIF_ERROR, HIF_ERROR_CANNOT_FETCH_SOURCE);
-+	g_assert (!ret);
-+	g_clear_error (&error);
- 
- 	/* try to check local repo that will not exist */
- 	hif_state_reset (state);
-diff --git a/libhif/hif-source.c b/libhif/hif-source.c
-index b38fcf4..36dd735 100644
---- a/libhif/hif-source.c
-+++ b/libhif/hif-source.c
-@@ -960,7 +960,22 @@ hif_source_check (HifSource *source,
- 	if (priv->kind == HIF_SOURCE_KIND_MEDIA &&
- 	    !g_file_test (priv->location, G_FILE_TEST_EXISTS)) {
- 		priv->enabled = HIF_SOURCE_ENABLED_NONE;
--		return TRUE;
-+		g_set_error (error,
-+			     HIF_ERROR,
-+			     HIF_ERROR_SOURCE_NOT_AVAILABLE,
-+			     "%s was not found", priv->location);
-+		return FALSE;
-+	}
-+
-+	/* has the local repo vanished? */
-+	if (priv->kind == HIF_SOURCE_KIND_LOCAL &&
-+	    !g_file_test (priv->location, G_FILE_TEST_EXISTS)) {
-+		priv->enabled = HIF_SOURCE_ENABLED_NONE;
-+		g_set_error (error,
-+			     HIF_ERROR,
-+			     HIF_ERROR_SOURCE_NOT_AVAILABLE,
-+			     "%s was not found", priv->location);
-+		return FALSE;
- 	}
- 
- 	/* Yum metadata */
-@@ -1220,19 +1235,16 @@ hif_source_update (HifSource *source,
- 	gint64 timestamp_new = 0;
- 	_cleanup_error_free_ GError *error_local = NULL;
- 
--	/* cannot change DVD contents */
--	if (priv->kind == HIF_SOURCE_KIND_MEDIA) {
-+	/* cannot change DVD or local contents */
-+	if (priv->kind == HIF_SOURCE_KIND_MEDIA ||
-+	    priv->kind == HIF_SOURCE_KIND_LOCAL) {
- 		g_set_error_literal (error,
- 				     HIF_ERROR,
--				     HIF_ERROR_SOURCE_NOT_AVAILABLE,
-+				     HIF_ERROR_CANNOT_FETCH_SOURCE,
- 				     "Cannot update read-only source");
- 		return FALSE;
- 	}
- 
--	/* do not refresh local repos */
--	if (priv->kind == HIF_SOURCE_KIND_LOCAL)
--		return TRUE;
--
- 	/* this needs to be set */
- 	if (priv->location_tmp == NULL) {
- 		g_set_error (error,
diff --git a/adapt-to-new-hawkey-api.patch b/adapt-to-new-hawkey-api.patch
deleted file mode 100644
index 7968f18..0000000
--- a/adapt-to-new-hawkey-api.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-diff --git a/libhif/hif-context.c b/libhif/hif-context.c
-index cbda0f6..cecc037 100644
---- a/libhif/hif-context.c
-+++ b/libhif/hif-context.c
-@@ -36,6 +36,7 @@
- 
- #include <hawkey/query.h>
- #include <hawkey/packagelist.h>
-+#include <hawkey/version.h>
- #include <librepo/librepo.h>
- 
- #include "hif-cleanup.h"
-@@ -910,9 +911,16 @@ hif_context_setup_sack (HifContext *context, HifState *state, GError **error)
- 
- 	/* create empty sack */
- 	solv_dir_real = hif_realpath (priv->solv_dir);
-+#if HY_VERSION_CHECK(0,5,3)
- 	priv->sack = hy_sack_create (solv_dir_real, NULL,
- 				     priv->install_root,
-+				     NULL,
- 				     HY_MAKE_CACHE_DIR);
-+#else
-+	priv->sack = hy_sack_create (solv_dir_real, NULL,
-+				     priv->install_root,
-+				     HY_MAKE_CACHE_DIR);
-+#endif
- 	if (priv->sack == NULL) {
- 		g_set_error (error,
- 			     HIF_ERROR,
diff --git a/libhif.spec b/libhif.spec
index f42d1a9..5634fb1 100644
--- a/libhif.spec
+++ b/libhif.spec
@@ -1,7 +1,7 @@
 Summary:   Simple package library built on top of hawkey and librepo
 Name:      libhif
-Version:   0.1.8
-Release:   7%{?dist}
+Version:   0.2.0
+Release:   1%{?dist}
 License:   LGPLv2+
 URL:       https://github.com/hughsie/libhif
 Source0:   http://people.freedesktop.org/~hughsient/releases/libhif-%{version}.tar.xz
@@ -19,11 +19,6 @@ BuildRequires: libsolv-devel
 # Bootstrap build requirements
 BuildRequires: automake autoconf libtool
 
-# already upstream
-Patch0:    0001-Ensure-the-mirror-list-is-set-before-trying-to-downl.patch
-Patch1:    0001-If-the-enabled-local-source-does-not-exist-do-not-ad.patch
-Patch2:    adapt-to-new-hawkey-api.patch
-
 %description
 This library provides a simple interface to hawkey and librepo and is currently
 used by PackageKit and rpm-ostree.
@@ -37,9 +32,6 @@ GLib headers and libraries for libhif.
 
 %prep
 %setup -q
-%patch0 -p1 -b .naughty-librepo
-%patch1 -p1 -b .file-repo-not-exists
-%patch2 -p1 -b .pointless-api-break
 
 %build
 # Support builds of both git snapshots and tarballs
@@ -75,6 +67,10 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libhif*.la
 %{_datadir}/gir-1.0/*.gir
 
 %changelog
+* Wed Apr 08 2015 Richard Hughes <richard at hughsie.com> 0.2.0-1
+- Update to new upstream version
+- Add new API required for ostree
+
 * Sat Mar 28 2015 Kalev Lember <kalevlember at gmail.com> - 0.1.8-7
 - Fix broken -devel package requires
 
diff --git a/sources b/sources
index 02f844d..2531838 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-e2ff81e857b767491b0cb5b23b7c69de  libhif-0.1.8.tar.xz
+550ad748c0a36ec6d27dc9a425d88baf  libhif-0.2.0.tar.xz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/libhif.git/commit/?h=master&id=193d78d46ce28cfc079a63e23bbdb58ddeab0eed


More information about the scm-commits mailing list