[PATCH] trivial: export the service pack filename in the service pack header

Utsav Handa utsavhanda at hotmail.com
Thu Jan 29 01:11:44 PST 2009


---
 client/pk-generate-pack.c             |    4 ++--
 lib/packagekit-glib/pk-service-pack.h |    3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/client/pk-generate-pack.c b/client/pk-generate-pack.c
index 2192e58..c7d94c9 100644
--- a/client/pk-generate-pack.c
+++ b/client/pk-generate-pack.c
@@ -50,12 +50,12 @@ pk_generate_pack_get_filename (const gchar *name, const gchar *directory)
 
 	distro_id = pk_get_distro_id ();
 	if (name != NULL) {
-		filename = g_strdup_printf ("%s/%s-%s.servicepack", directory, name, distro_id);
+		filename = g_strdup_printf ("%s/%s-%s.%s", directory, name, distro_id, PK_SERVICE_PACK_FILE_EXTENSION);
 	} else {
 		iso_time = pk_iso8601_present ();
 		/* don't include the time, just use the date prefix */
 		iso_time[10] = '\0';
-		filename = g_strdup_printf ("%s/updates-%s-%s.servicepack", directory, iso_time, distro_id);
+		filename = g_strdup_printf ("%s/updates-%s-%s.%s", directory, iso_time, distro_id, PK_SERVICE_PACK_FILE_EXTENSION);
 	}
 	g_free (distro_id);
 	g_free (iso_time);
diff --git a/lib/packagekit-glib/pk-service-pack.h b/lib/packagekit-glib/pk-service-pack.h
index 4d249be..4abb181 100644
--- a/lib/packagekit-glib/pk-service-pack.h
+++ b/lib/packagekit-glib/pk-service-pack.h
@@ -40,6 +40,9 @@ G_BEGIN_DECLS
 #define PK_SERVICE_PACK_ERROR	 	(pk_service_pack_error_quark ())
 #define PK_SERVICE_PACK_TYPE_ERROR	(pk_service_pack_error_get_type ())
 
+/* the file extension to a servicepack */
+#define PK_SERVICE_PACK_FILE_EXTENSION	"servicepack"
+
 typedef struct PkServicePackPrivate PkServicePackPrivate;
 
 typedef enum
-- 
1.6.0.6


--=-lV+SxmnKFyrvv1DKBoIC
Content-Disposition: attachment; filename*0=0003-trivial-exit-with-the-correct-return-code-in-pkgenp.patc; filename*1=h
Content-Type: text/x-patch; name="0003-trivial-exit-with-the-correct-return-code-in-pkgenp.patch"; charset="UTF-8"
Content-Transfer-Encoding: 7bit



More information about the PackageKit mailing list