SF.net SVN: morphix: [2292] trunk/mmaker/debian

[email protected]
Newsgroups gmane.linux.morphix.cvs
Message-ID <[email protected]>
Revision: 2292
Author:   alextreme
Date:     2006-06-07 04:54:17 -0700 (Wed, 07 Jun 2006)
ViewCVS:  http://svn.sourceforge.net/morphix/?rev=2292&view=rev

Log Message:
-----------
  * removing glib 2.8 dependancy, now using plain fopen instead of g_file_set_contents()

Modified Paths:
--------------
    trunk/mmaker/debian/changelog
    trunk/mmaker/debian/control
    trunk/mmaker/libmorphix/makemodule.c
Modified: trunk/mmaker/debian/changelog
===================================================================
--- trunk/mmaker/debian/changelog	2006-06-06 10:51:33 UTC (rev 2291)
+++ trunk/mmaker/debian/changelog	2006-06-07 11:54:17 UTC (rev 2292)
@@ -1,3 +1,9 @@
+morphix-mmaker (0.4-30) unstable; urgency=low
+
+  * removing glib 2.8 dependancy (fopen ftw!)
+
+ -- root <[email protected]>  Wed,  7 Jun 2006 13:50:48 +0200
+
 morphix-mmaker (0.4-29) unstable; urgency=low
 
   * fixed <command>

Modified: trunk/mmaker/debian/control
===================================================================
--- trunk/mmaker/debian/control	2006-06-06 10:51:33 UTC (rev 2291)
+++ trunk/mmaker/debian/control	2006-06-07 11:54:17 UTC (rev 2292)
@@ -2,7 +2,7 @@
 Section: utils
 Priority: optional
 Maintainer: Alex de Landgraaf <alextreme-qWit8jRvyhVmR6Xm/[email protected]> 
-Build-Depends: debhelper (>= 4.0.0), libglib2.0-dev (>=2.8.0), libxml2-dev
+Build-Depends: debhelper (>= 4.0.0), libglib2.0-dev, libxml2-dev
 Standards-Version: 3.6.0
 
 Package: morphix-mmaker

Modified: trunk/mmaker/libmorphix/makemodule.c
===================================================================
--- trunk/mmaker/libmorphix/makemodule.c	2006-06-06 10:51:33 UTC (rev 2291)
+++ trunk/mmaker/libmorphix/makemodule.c	2006-06-07 11:54:17 UTC (rev 2292)
@@ -539,6 +539,7 @@
 gboolean executeCommands(mmodule *module, gchar *dirname) {
 	GList *ptr = module->commandlist;
 	gchar *filename = g_strdup_printf("%s/commands.sh", module->dirname);
+	FILE *fp = NULL;
 
 	while (ptr != NULL) {
 		gchar *cmdline = NULL;
@@ -546,9 +547,14 @@
 
 		if (command == NULL)
 			continue;
+		fp = fopen(filename, "w");
+		if (fp == NULL) {
+			fprintf(stderr,"Warning: unable to open command.sh (for <command>-execution\n");
+			continue;
+		}
+		fprintf(fp, command);
+		fclose(fp);
 
-		g_file_set_contents(filename, command, -1, NULL);
-
 		cmdline = g_strdup_printf("%s %s sh ./commands.sh",P_CHROOT,module->dirname);
 		if (!ExecuteCommand(cmdline)) {
 			fprintf(stderr,"Warning: unable to execute command: %s\n", command);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.