rpms/PackageKit/F-12 PackageKit-0.5.4-fix-cnf-exec.patch, NONE, 1.1 PackageKit.spec, 1.124, 1.125

Richard Hughes rhughes at fedoraproject.org
Mon Nov 9 11:28:26 UTC 2009


Author: rhughes

Update of /cvs/pkgs/rpms/PackageKit/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv24995

Modified Files:
	PackageKit.spec 
Added Files:
	PackageKit-0.5.4-fix-cnf-exec.patch 
Log Message:
* Mon Nov 09 2009 Richard Hughes  <rhughes at redhat.com> - 0.5.4-0.2.20091029git
- Fix a critical bug in the command-not-found code that triggers an infinite
  loop when a new package is installed.
- Fixes #533554


PackageKit-0.5.4-fix-cnf-exec.patch:
 pk-command-not-found.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

--- NEW FILE PackageKit-0.5.4-fix-cnf-exec.patch ---
commit 7005e0af84874207ab6863f18ac48508237ced5c
Author: Richard Hughes <richard at hughsie.com>
Date:   Mon Nov 9 09:42:23 2009 +0000

    cnf: after a successful installation, re-exec new binary not command-not-found. Fixes rh#533554

diff --git a/contrib/command-not-found/pk-command-not-found.c b/contrib/command-not-found/pk-command-not-found.c
index 4e3f4b3..de2e503 100644
--- a/contrib/command-not-found/pk-command-not-found.c
+++ b/contrib/command-not-found/pk-command-not-found.c
@@ -706,7 +706,7 @@ main (int argc, char *argv[])
 
 		/* run */
 		} else if (config->single_match == PK_CNF_POLICY_RUN) {
-			pk_cnf_spawn_command (possible, &argv[1]);
+			pk_cnf_spawn_command (possible, &argv[2]);
 
 		/* ask */
 		} else if (config->single_match == PK_CNF_POLICY_ASK) {
@@ -714,7 +714,7 @@ main (int argc, char *argv[])
 			text = g_strdup_printf ("%s %s", _("Run similar command:"), possible);
 			ret = pk_console_get_prompt (text, TRUE);
 			if (ret)
-				pk_cnf_spawn_command (possible, &argv[1]);
+				pk_cnf_spawn_command (possible, &argv[2]);
 			else
 				retval = EXIT_COMMAND_NOT_FOUND;
 			g_free (text);
@@ -745,7 +745,7 @@ main (int argc, char *argv[])
 
 			/* run command */
 			possible = g_ptr_array_index (array, i);
-			pk_cnf_spawn_command (possible, &argv[1]);
+			pk_cnf_spawn_command (possible, &argv[2]);
 		}
 		goto out;
 
@@ -772,7 +772,7 @@ main (int argc, char *argv[])
 				if (ret) {
 					ret = pk_cnf_install_package_id (package_ids[0]);
 					if (ret)
-						pk_cnf_spawn_command (argv[0], &argv[1]);
+						pk_cnf_spawn_command (argv[1], &argv[2]);
 					else
 						retval = EXIT_COMMAND_NOT_FOUND;
 				}
@@ -781,7 +781,7 @@ main (int argc, char *argv[])
 			} else if (config->single_install == PK_CNF_POLICY_INSTALL) {
 				ret = pk_cnf_install_package_id (package_ids[0]);
 				if (ret)
-					pk_cnf_spawn_command (argv[0], &argv[1]);
+					pk_cnf_spawn_command (argv[1], &argv[2]);
 				else
 					retval = EXIT_COMMAND_NOT_FOUND;
 			}
@@ -814,7 +814,7 @@ main (int argc, char *argv[])
 				/* run command */
 				ret = pk_cnf_install_package_id (package_ids[i]);
 				if (ret)
-					pk_cnf_spawn_command (argv[0], &argv[1]);
+					pk_cnf_spawn_command (argv[1], &argv[2]);
 				else
 					retval = EXIT_COMMAND_NOT_FOUND;
 			}


Index: PackageKit.spec
===================================================================
RCS file: /cvs/pkgs/rpms/PackageKit/F-12/PackageKit.spec,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -p -r1.124 -r1.125
--- PackageKit.spec	29 Oct 2009 10:43:33 -0000	1.124
+++ PackageKit.spec	9 Nov 2009 11:28:26 -0000	1.125
@@ -10,7 +10,7 @@
 Summary:   Package management service
 Name:      PackageKit
 Version:   0.5.4
-Release:   0.1.%{?alphatag}git%{?dist}
+Release:   0.2.%{?alphatag}git%{?dist}
 #Release:   1%{?dist}
 License:   GPLv2+
 Group:     System Environment/Libraries
@@ -25,6 +25,9 @@ Patch0:    PackageKit-0.3.8-Fedora-Vendo
 # Fedora specific: the yum backend doesn't do time estimation correctly
 Patch1:    PackageKit-0.4.4-Fedora-turn-off-time.conf.patch
 
+# already upstream
+Patch2:    PackageKit-0.5.4-fix-cnf-exec.patch
+
 Requires: dbus >= %{dbus_version}
 Requires: dbus-glib >= %{dbus_glib_version}
 Requires: PackageKit-glib = %{version}-%{release}
@@ -244,6 +247,7 @@ user to restart the computer or remove a
 #%setup -q
 %patch0 -p1 -b .fedora
 %patch1 -p1 -b .no-time
+%patch2 -p1 -b .cnf-fix-exec
 
 %build
 %configure \
@@ -454,6 +458,11 @@ update-mime-database %{_datadir}/mime &>
 %{_includedir}/PackageKit/backend/*.h
 
 %changelog
+* Mon Nov 09 2009 Richard Hughes  <rhughes at redhat.com> - 0.5.4-0.2.20091029git
+- Fix a critical bug in the command-not-found code that triggers an infinite
+  loop when a new package is installed.
+- Fixes #533554
+
 * Thu Oct 29 2009 Richard Hughes  <rhughes at redhat.com> - 0.5.4-0.1.20091029git
 - Update to a newer git snapshot from the 0.5.x series.
 - Check the language code exists before we search for it.




More information about the fedora-extras-commits mailing list