diff --git a/pym/cl_builder.py b/pym/cl_builder.py index 2cc5334..180a0b3 100644 --- a/pym/cl_builder.py +++ b/pym/cl_builder.py @@ -328,7 +328,7 @@ class cl_builder(color_print): createdDev = self.createUrandom(mp) self.dispatchConf(mp) self.updatePortage(mp) - self.clearPortage(mp) + #self.clearPortage(mp) self.updateMan(mp) self.removeUrandom(mp,createdDev) @@ -578,8 +578,12 @@ class cl_builder(color_print): """Get list for portage exclude by 'cl_builder_tree'""" if self.clVars.Get('cl_builder_tree') == 'off': portagePath = pathJoin(sourceDirectory,"usr/portage") - return map(lambda x: path.join("usr/portage",x), - filter(lambda x: not x in ( "eclass", "licenses", "profiles"), + overlayPath = pathJoin(sourceDirectory,"var/lib/layman/calculate") + return map(lambda x: path.join("var/lib/layman/calculate",x), + filter(lambda x: not x in ("distfiles", "eclass", ".git","profiles"), + listDirectory(overlayPath))) + \ + map(lambda x: path.join("usr/portage",x), + filter(lambda x: not x in ("distfiles", "eclass", ".git","profiles"), listDirectory(portagePath))) else: return [] diff --git a/pym/cl_image_cmd.py b/pym/cl_image_cmd.py index f05ac27..9564bec 100644 --- a/pym/cl_image_cmd.py +++ b/pym/cl_image_cmd.py @@ -70,6 +70,9 @@ CMD_OPTIONS = [{'shortOption':"p", 'optVal':"TIMEZONE", 'help':_("timezone by default") }, + {'longOption':'keep-tree', + 'help':_("keep portage tree in image") + }, {'longOption':"set"}, {'shortOption':"f", 'longOption':"force", @@ -170,6 +173,9 @@ class image_cmd(share_cmd): if values.noisohybrid: self.logicObj.clVars.Set('cl_builder_isohybrid_set','off',True) + if values.keep_tree: + self.logicObj.clVars.Set('cl_builder_tree','on',True) + if args and args[0] == "squash": self.logicObj.clVars.Set('cl_builder_iso_path','/mnt/flash',True) if values.timezone and not self.logicObj.setTimezone(values.timezone): diff --git a/pym/cl_vars_builder.py b/pym/cl_vars_builder.py index 44e4965..c1fd439 100644 --- a/pym/cl_vars_builder.py +++ b/pym/cl_vars_builder.py @@ -98,7 +98,7 @@ class Data: cl_builder_kernel_suffix = {} # include portage directory from image - cl_builder_tree = {'value':'on'} + cl_builder_tree = {'value':'off'} cl_builder_isohybrid_set = {'value':'on'}