SF.net SVN: morphix:[2640] trunk/mmaker/libmorphix

[email protected] Tue, 20 Jan 2009 14:29:34 +0000
Newsgroups gmane.linux.morphix.cvs
Message-ID <[email protected]>
Revision: 2640
          http://morphix.svn.sourceforge.net/morphix/?rev=2640&view=rev
Author:   paul_c
Date:     2009-01-20 14:29:34 +0000 (Tue, 20 Jan 2009)

Log Message:
-----------
Add a nostrip attribute to <type> - This allows a basemod to be built without
any of the usual victims being wiped out. Adds 90+Megs and is only useful when
the basemod is being used without any mainmods. To use:

    <type nostrip="yes">basemod</type>

Note: The value assigned to nostrip is unimportant as the parser only tests for
it's presence.

Modified Paths:
--------------
    trunk/mmaker/libmorphix/makemodule.c
    trunk/mmaker/libmorphix/parsemod.c
    trunk/mmaker/libmorphix/parsemod.h

Modified: trunk/mmaker/libmorphix/makemodule.c
===================================================================
--- trunk/mmaker/libmorphix/makemodule.c	2009-01-16 23:52:13 UTC (rev 2639)
+++ trunk/mmaker/libmorphix/makemodule.c	2009-01-20 14:29:34 UTC (rev 2640)
@@ -1358,10 +1358,11 @@
 		if (!moveKernel(module)) {
 			return FALSE;
 		}
-		if (!stripBaseModule(module)) {
-			return FALSE;
+		if (!module->nostrip) {
+			if (!stripBaseModule(module)) {
+				return FALSE;
+			}
 		}
-
 		if (!executeRetrieveFiles(module)) {
 			return FALSE;
 		}	

Modified: trunk/mmaker/libmorphix/parsemod.c
===================================================================
--- trunk/mmaker/libmorphix/parsemod.c	2009-01-16 23:52:13 UTC (rev 2639)
+++ trunk/mmaker/libmorphix/parsemod.c	2009-01-20 14:29:34 UTC (rev 2640)
@@ -286,6 +286,7 @@
 	module->patchlist = NULL;
 	module->commandlist = NULL;
 	module->arch = NULL;
+	module->nostrip = FALSE;
 	module->verbose = FALSE;
 	module->interactive = FALSE;
 	module->localdeblist = NULL;
@@ -311,9 +312,14 @@
 			xmlFree(key);
 		}
 		if (!xmlStrcmp(cur->name, ((const xmlChar *)"type"))) {
+			xmlChar *strip = xmlGetProp(cur,"nostrip");
 			key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
 			module->type = g_strdup(key);
 			xmlFree(key);
+			if (strip != NULL) {
+			        module->nostrip = TRUE;
+				xmlFree(strip);
+			}
 		}
 		if (!xmlStrcmp(cur->name, ((const xmlChar *)"description"))) {
 			key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);

Modified: trunk/mmaker/libmorphix/parsemod.h
===================================================================
--- trunk/mmaker/libmorphix/parsemod.h	2009-01-16 23:52:13 UTC (rev 2639)
+++ trunk/mmaker/libmorphix/parsemod.h	2009-01-20 14:29:34 UTC (rev 2640)
@@ -51,7 +51,7 @@
 	GList *commandlist; // list of commands for module
 	GList *localdeblist; // list of locations of packages on host
 	GList *retrievelist; // list of to/from combinations
-
+	gboolean nostrip; // Prevents base mod from being stripped down.
 	gboolean verbose; // build verbosely
 	gboolean interactive; // don't try to hide debconf or use --force-yes
 } mmodule;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword