From johnsonm@rpath.com Tue Apr 29 16:09:51 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m3TG9poR013367 for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 16:09:51 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m3TG9pej007392
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 12:09:51 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m3TG9os8010059
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 12:09:50 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m3TG9oH9028511
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 12:09:50 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m3TG9oPP028506
	for rpath-common-commits@lists.rpath.com;
	Tue, 29 Apr 2008 12:09:50 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200804291609.m3TG9oPP028506@scc.eng.rpath.com>
Date: Tue, 29 Apr 2008 12:09:50 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-common: Initial commit: hub for rPath common code libraries
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 29 Apr 2008 16:09:51 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       EULA_rpath_common.txt LICENSE Make.defs Make.rules Makefile NEWS README rpath_common/Makefile rpath_common/__init__.py

Initial commit: hub for rPath common code libraries

diff -r 000000000000 -r 9a44e39c249c EULA_rpath_common.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/EULA_rpath_common.txt	Tue Apr 29 12:09:47 2008 -0400
@@ -0,0 +1,170 @@
+rPATH APPLICATION SOFTWARE
+rBUILD END USER LICENSE AGREEMENT
+
+
+IMPORTANT -- READ CAREFULLY BEFORE USING THIS SOFTWARE:
+
+
+The Software governed by this license agreement is a collective work
+under the U.S. Copyright laws. The Software may be licensed under the
+Common Public License ("CPL") or a commercial software agreement from
+rPath, Inc. If the Software, under a commercial software agreement
+from rPath, is conveyed to the End User, and End User would like to
+use or distribute the Software, then the End User must comply with
+the terms contained in this EULA. If the Software, under the CPL,
+is conveyed to the End User, then the End User must comply with
+the terms of the CPL.
+
+Upon the use of any rPath Software Application (“Software”)
+or any appliance in which the Software may be embedded, End User
+acknowledges that End User has reviewed and agreed to all of the
+terms and conditions set forth in this document.  If End User DOES
+NOT AGREE with these terms and conditions, DO NOT USE the Software.
+
+REDISTRIBUTION NOT PERMITTED
+
+As used herein, the following terms have the meanings set forth below:
+
+"Computer" means the hardware, if the hardware is a single computer
+system whether physical or virtual, or shall mean the computer
+system with which the hardware operates, if the hardware is a
+computer system component.
+
+“End User” means the purchasers or licensees who have acquired
+the Software for their own personal or internal use and without
+the right to resale, re-market or otherwise distribute the Software.
+
+“EULA” means an end user license agreement.  This EULA is a
+legal agreement between you (either an individual or an entity) and
+rPath, Inc. and its suppliers and licensors (collectively "rPath")
+for the rPath Software which may include components provided by
+suppliers and licensors to rPath.
+
+“Software” means the source code and object code versions of
+the product, together with the updates, upgrades, modifications
+or enhancements owned and provided by rPath to you pursuant to
+this EULA.
+
+BY USING THE SOFTWARE YOU ACKNOWLEDGE THAT YOU HAVE READ THIS
+LICENSE AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS
+TERMS AND CONDITIONS.
+
+This EULA applies to Software applications that are made up of
+individual software components, each of which was individually
+written and copyrighted.
+
+ANY THIRD PARTY SOFTWARE, INCLUDING ANY THIRD PARTY'S PLUG-IN,
+THAT MAY BE PROVIDED WITH THE SOFTWARE IS INCLUDED FOR USE AT YOUR
+OPTION. IF YOU CHOOSE TO USE SUCH THIRD PARTY SOFTWARE, THEN SUCH
+USE SHALL BE GOVERNED BY SUCH THIRD PARTY'S LICENSE AGREEMENT. rPath
+IS NOT RESPONSIBLE FOR ANY THIRD PARTY'S SOFTWARE AND SHALL HAVE
+NO LIABILITY FOR YOUR USE OF THIRD PARTY SOFTWARE.
+
+rPath hereby grants End User the following license to use the
+Software in the End User’s facility subject to the terms contained
+herein subject to the licenses referenced herein.
+
+1. GRANT OF LICENSE. Upon payment of any fees applicable, rPath
+hereby grants to you a non-exclusive, personal license to use the
+Software and any related documentation ("Documentation") subject
+to the following terms:
+
+a)	You may: (i) use the Software on any single Computer; and
+(ii) copy the Software for back-up and archival purposes, provided
+any copy must contain all of the original Software's proprietary
+notices within the United States and its territories or any other
+country to which this Software can legally be exported.
+
+b)	The Software is "in use" on a computer when it is loaded
+into temporary memory or installed in permanent memory (Hard Drive,
+CD-ROM or other storage device).  You agree to use your best efforts
+to prevent and protect the contents of the Software and Documentation
+from unauthorized use or disclosure.
+
+2. LICENSE RESTRICTIONS. 
+a)	You may not: (i) permit other individuals to use the Software
+except under the terms listed above; (ii) modify, translate, reverse
+engineer, decompile, disassemble (except to the extent that this
+restriction is expressly prohibited by law) or create derivative
+works based upon the Software or Documentation; (iii) copy the
+Software or Documentation (except for back-up or archival purposes);
+(iv) rent, lease, transfer, or otherwise transfer rights to the
+Software or Documentation; (v) remove any proprietary notices or
+labels on the Software or Documentation. Any such forbidden use
+shall immediately terminate your license to the Software. The
+recording, playback and download features of the Software are
+intended only for use with public domain or properly licensed content
+and content creation tools. You may require a patent, copyright,
+or other license from a third party to create, copy, download,
+record or save content files for playback by this Software or to
+serve or distribute such files to be played back by the Software.
+b)	You agree that you shall only use the Software and
+Documentation in a manner that complies with all applicable laws in
+the jurisdictions in which you use the Software and Documentation,
+including, but not limited to, applicable restrictions concerning
+copyright and other intellectual property rights.
+
+3. TITLE.  Title, ownership, rights, and intellectual property
+rights in and to the Software and Documentation shall remain
+rPath’s and/or its suppliers.  The Software and the Documentation
+are protected by the copyright laws of the United States and
+international copyright treaties.  Title, ownership rights and
+intellectual property rights in and to the content accessed
+through the Software and the Documentation ("Content") shall be
+retained by the applicable Content owner and may be protected by
+applicable copyright or other law.  This EULA gives you no rights
+to such Content.
+
+4. DATA RIGHTS.  You should be aware that rPath’s Software
+contains functions for collecting information related to your use
+of the Software.  rPath may also collect and track non-personally
+identifiable information about you including but not limited to your
+IP address, the type of hardware you use and the type of browser
+you employ.  rPath reserves the right to compile, save, use within
+the scope of rPath’s activities, and analyze any and all of your
+data (registration data, and use history).  rPath intends to use
+such data for internal purposes only, including without limitation
+for the purposes of responding to your requests for information and
+for contacting you.  rPath may provide aggregated statistics about
+your use of the Software to third parties, but such information will
+be aggregated so that it does not identify a particular individual
+or company.
+
+5.  NO WARRANTY.  THE SOFTWARE IS PROVIDED AND LICENSED "AS IS"
+WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
+NON-INFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+
+6.  NO LIABILITY.  TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE
+LAW, IN NO EVENT WILL rPATH, INC. BE LIABLE TO END USER FOR ANY
+INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, LOST
+SAVINGS, OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT
+OF THE USE OR INABILITY TO USE THE SOFTWARE OR SOFTWARE PROGRAMS,
+EVEN IF rPATH, INC. OR A DEALER AUTHORIZED BY rPATH, INC. HAD BEEN
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.  IN NO EVENT SHALL
+rPATH HAVE ANY LIABILITY HEREUNDER.
+
+7.  COMPLETE AGREEMENT.  This EULA constitutes the entire
+agreement between the parties with respect to the Software and
+supersedes all prior or contemporaneous communications, agreements
+and understandings, written or oral, with respect to the subject
+matter hereof.  This EULA shall not be amended or modified except
+in a writing signed by authorized representatives of each party.
+
+8.  GENERAL.  If any provision of this EULA is held to be
+unenforceable, that shall not affect the enforceability of the
+remaining provisions.  This EULA shall be governed by the laws of
+the State of North Carolina and of the United States, without regard
+to any conflict of laws provisions, except that the United Nations
+Convention on the International Sale of Goods shall not apply.
+
+
+Copyright © 2005 - 2008.  rPath, Inc.  All rights reserved.
+
+"rPath," “rPath” Logo, “Powered by rPath” Logo, ”rPath
+Appliance Platform” logo, “Conary,”  “rMake,” “rAA,”
+“rEA,” “rBuilder,” “rBuilder” Logo, and “rManager”
+are trademarks and service marks that are the property of
+rPath, Inc.
+
+Revised January 30, 2008
diff -r 000000000000 -r 9a44e39c249c LICENSE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LICENSE	Tue Apr 29 12:09:47 2008 -0400
@@ -0,0 +1,224 @@
+Common Public License - v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON
+PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF
+THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+      a) in the case of the initial Contributor, the initial code and
+      documentation distributed under this Agreement, and
+
+      b) in the case of each subsequent Contributor:
+
+      i) changes to the Program, and
+
+      ii) additions to the Program;
+
+      where such changes and/or additions to the Program originate from
+      and are distributed by that particular Contributor. A Contribution
+      'originates' from a Contributor if it was added to the Program
+      by such Contributor itself or anyone acting on such Contributor's
+      behalf. Contributions do not include additions to the Program which:
+      (i) are separate modules of software distributed in conjunction
+      with the Program under their own license agreement, and (ii)
+      are not derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " mean patent claims licensable by a Contributor which are
+necessarily infringed by the use or sale of its Contribution alone or when
+combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this
+Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement,
+including all Contributors.
+
+2. GRANT OF RIGHTS
+
+      a) Subject to the terms of this Agreement, each Contributor hereby
+      grants Recipient a non-exclusive, worldwide, royalty-free copyright
+      license to reproduce, prepare derivative works of, publicly display,
+      publicly perform, distribute and sublicense the Contribution of
+      such Contributor, if any, and such derivative works, in source
+      code and object code form.
+
+      b) Subject to the terms of this Agreement, each Contributor hereby
+      grants Recipient a non-exclusive, worldwide, royalty-free patent
+      license under Licensed Patents to make, use, sell, offer to sell,
+      import and otherwise transfer the Contribution of such Contributor,
+      if any, in source code and object code form. This patent license
+      shall apply to the combination of the Contribution and the Program
+      if, at the time the Contribution is added by the Contributor,
+      such addition of the Contribution causes such combination to be
+      covered by the Licensed Patents. The patent license shall not
+      apply to any other combinations which include the Contribution. No
+      hardware per se is licensed hereunder.
+
+      c) Recipient understands that although each Contributor grants the
+      licenses to its Contributions set forth herein, no assurances are
+      provided by any Contributor that the Program does not infringe
+      the patent or other intellectual property rights of any other
+      entity. Each Contributor disclaims any liability to Recipient
+      for claims brought by any other entity based on infringement
+      of intellectual property rights or otherwise. As a condition to
+      exercising the rights and licenses granted hereunder, each Recipient
+      hereby assumes sole responsibility to secure any other intellectual
+      property rights needed, if any. For example, if a third party patent
+      license is required to allow Recipient to distribute the Program,
+      it is Recipient's responsibility to acquire that license before
+      distributing the Program.
+
+      d) Each Contributor represents that to its knowledge it has
+      sufficient copyright rights in its Contribution, if any, to grant
+      the copyright license set forth in this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under
+its own license agreement, provided that:
+
+      a) it complies with the terms and conditions of this Agreement; and
+
+      b) its license agreement:
+
+      i) effectively disclaims on behalf of all Contributors all
+      warranties and conditions, express and implied, including warranties
+      or conditions of title and non-infringement, and implied warranties
+      or conditions of merchantability and fitness for a particular
+      purpose;
+
+      ii) effectively excludes on behalf of all Contributors all liability
+      for damages, including direct, indirect, special, incidental and
+      consequential damages, such as lost profits;
+
+      iii) states that any provisions which differ from this Agreement are
+      offered by that Contributor alone and not by any other party; and
+
+      iv) states that source code for the Program is available from
+      such Contributor, and informs licensees how to obtain it in a
+      reasonable manner on or through a medium customarily used for
+      software exchange.
+
+When the Program is made available in source code form:
+
+      a) it must be made available under this Agreement; and 
+
+      b) a copy of this Agreement must be included with each copy of
+      the Program.
+
+Contributors may not remove or alter any copyright notices contained within the
+Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if
+any, in a manner that reasonably allows subsequent Recipients to identify the
+originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with
+respect to end users, business partners and the like. While this license is
+intended to facilitate the commercial use of the Program, the Contributor who
+includes the Program in a commercial product offering should do so in a manner
+which does not create potential liability for other Contributors. Therefore, if
+a Contributor includes the Program in a commercial product offering, such
+Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
+every other Contributor ("Indemnified Contributor") against any losses, damages
+and costs (collectively "Losses") arising from claims, lawsuits and other legal
+actions brought by a third party against the Indemnified Contributor to the
+extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may
+participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product
+offering, Product X. That Contributor is then a Commercial Contributor. If that
+Commercial Contributor then makes performance claims, or offers warranties
+related to Product X, those performance claims and warranties are such
+Commercial Contributor's responsibility alone. Under this section, the
+Commercial Contributor would have to defend claims against the other
+Contributors related to those performance claims and warranties, and if a court
+requires any other Contributor to pay any damages as a result, the Commercial
+Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
+Recipient is solely responsible for determining the appropriateness of using
+and distributing the Program and assumes all risks associated with its exercise
+of rights under this Agreement, including but not limited to the risks and
+costs of program errors, compliance with applicable laws, damage to or loss of
+data, programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
+CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
+WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
+GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable
+law, it shall not affect the validity or enforceability of the remainder of the
+terms of this Agreement, and without further action by the parties hereto, such
+provision shall be reformed to the minimum extent necessary to make such
+provision valid and enforceable.
+
+If Recipient institutes patent litigation against a Contributor with respect to
+a patent applicable to software (including a cross-claim or counterclaim in a
+lawsuit), then any patent licenses granted by that Contributor to such
+Recipient under this Agreement shall terminate as of the date such litigation
+is filed. In addition, if Recipient institutes patent litigation against any
+entity (including a cross-claim or counterclaim in a lawsuit) alleging that the
+Program itself (excluding combinations of the Program with other software or
+hardware) infringes such Recipient's patent(s), then such Recipient's rights
+granted under Section 2(b) shall terminate as of the date such litigation is
+filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to
+comply with any of the material terms or conditions of this Agreement and does
+not cure such failure in a reasonable period of time after becoming aware of
+such noncompliance. If all Recipient's rights under this Agreement terminate,
+Recipient agrees to cease use and distribution of the Program as soon as
+reasonably practicable. However, Recipient's obligations under this Agreement
+and any licenses granted by Recipient relating to the Program shall continue
+and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in
+order to avoid inconsistency the Agreement is copyrighted and may only be
+modified in the following manner. The Agreement Steward reserves the right to
+publish new versions (including revisions) of this Agreement from time to time.
+No one other than the Agreement Steward has the right to modify this Agreement.
+IBM is the initial Agreement Steward. IBM may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the
+intellectual property laws of the United States of America. No party to this
+Agreement will bring a legal action under this Agreement more than one year
+after the cause of action arose. Each party waives its rights to a jury trial
+in any resulting litigation. 
diff -r 000000000000 -r 9a44e39c249c Make.defs
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Make.defs	Tue Apr 29 12:09:47 2008 -0400
@@ -0,0 +1,31 @@
+#
+# Copyright (c) 2006-2007 rPath, Inc.
+#
+# This program is distributed under the terms of the Common Public License,
+# version 1.0. A copy of this license should have been distributed with this
+# source file in a file called LICENSE. If it is not present, the license
+# is always available at http://www.rpath.com/permanent/licenses/CPL-1.0.
+#
+# This program is distributed in the hope that it will be useful, but
+# without any warranty; without even the implied warranty of merchantability
+# or fitness for a particular purpose. See the Common Public License for
+# full details.
+#
+
+VERSION=1.0
+# VERSION can be overridden by snapshot builds to force incompatible versions
+
+export prefix = /usr
+export bindir = $(prefix)/bin
+export sbindir = $(prefix)/sbin
+export libdir = $(prefix)/lib
+export libexecdir = $(prefix)/libexec
+export datadir = $(prefix)/share
+export mandir = $(datadir)/man
+export sitedir = $(libdir)/python$(PYVERSION)/site-packages/
+export pydir = $(sitedir)/rpath_common/
+export initdir = /etc/init.d
+export sysconfdir = /etc/sysconfig
+export docdir = $(datadir)/doc/rpath-common-$(VERSION)
+
+export VERSION
diff -r 000000000000 -r 9a44e39c249c Make.rules
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Make.rules	Tue Apr 29 12:09:47 2008 -0400
@@ -0,0 +1,58 @@
+#
+# Copyright (c) 2006-2008 rPath, Inc.
+#
+# This program is distributed under the terms of the Common Public License,
+# version 1.0. A copy of this license should have been distributed with this
+# source file in a file called LICENSE. If it is not present, the license
+# is always available at http://www.rpath.com/permanent/licenses/CPL-1.0.
+#
+# This program is distributed in the hope that it will be useful, but
+# without any warranty; without even the implied warranty of merchantability
+# or fitness for a particular purpose. See the Common Public License for
+# full details.
+#
+
+PYTHON = $(shell [ -x /usr/bin/python2.4 ] && echo /usr/bin/python2.4)
+PYVERSION = $(shell $(PYTHON) -c 'import os, sys; print sys.version[:3]')
+PYINCLUDE = $(shell $(PYTHON) -c 'import os, sys; print os.sep.join((sys.prefix, "include", "python" + sys.version[:3]))')
+
+pyfiles-install:
+	mkdir -p $(DESTDIR)$(pydir)
+	for f in $(python_files); do \
+		mkdir -p `dirname $(DESTDIR)/$(sitedir)/$(DIR)/$$f`; \
+		cp -a $$f $(DESTDIR)/$(sitedir)/$(DIR)/$$f; \
+	done
+
+default-dist: dist-subdirs
+	for f in $(dist_files); do \
+		mkdir -p $(DISTDIR)/$(DIR)/`dirname $$f`; \
+		cp -a $$f $(DISTDIR)/$(DIR)/$$f; \
+	done
+
+default-install:
+
+default-all:
+
+default-clean: clean-subdirs
+	rm -f *~ .??*~ .#* *.pyo *.pyc $(generated_files) *.orig *.ccs
+
+default-test:
+	$(TESTSUITE) *.py
+
+default-subdirs:
+	for d in $(SUBDIRS); do make -C $$d DIR=$$d || exit 1; done
+
+clean-subdirs:
+ifdef SUBDIRS
+	for d in $(SUBDIRS); do make -C $$d DIR=$(DIR)/$$d clean || exit 1; done
+endif
+
+install-subdirs:
+ifdef SUBDIRS
+	for d in $(SUBDIRS); do make -C $$d DIR=$(DIR)/$$d install || exit 1; done
+endif
+
+dist-subdirs:
+ifdef SUBDIRS
+	for d in $(SUBDIRS); do make -C $$d DIR=$(DIR)/$$d dist || exit 1; done
+endif
diff -r 000000000000 -r 9a44e39c249c Makefile
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile	Tue Apr 29 12:09:47 2008 -0400
@@ -0,0 +1,69 @@
+#
+# Copyright (c) 2006-2008 rPath, Inc.
+#
+# This program is distributed under the terms of the Common Public License,
+# version 1.0. A copy of this license should have been distributed with this
+# source file in a file called LICENSE. If it is not present, the license
+# is always available at http://www.rpath.com/permanent/licenses/CPL-1.0.
+#
+# This program is distributed in the hope that it will be useful, but
+# without any warranty; without even the implied warranty of merchantability
+# or fitness for a particular purpose. See the Common Public License for
+# full details.
+#
+
+all: default-subdirs default-all
+
+export TOPDIR = $(shell pwd)
+export DISTDIR = $(TOPDIR)/rbuild-$(VERSION)
+
+SUBDIRS=rpath_common xsd doc
+
+extra_files = \
+	Make.rules 		\
+	Makefile		\
+	Make.defs		\
+	NEWS			\
+	README			\
+	EULA_product_common.txt		\
+	LICENSE
+
+dist_files = $(extra_files)
+
+.PHONY: clean dist install subdirs
+
+subdirs: default-subdirs
+
+install: install-subdirs
+
+clean: clean-subdirs default-clean
+
+dist:
+	if ! grep "^Changes in $(VERSION)" NEWS > /dev/null 2>&1; then \
+		echo "no NEWS entry"; \
+		exit 1; \
+	fi
+	$(MAKE) forcedist
+
+
+archive: $(dist_files)
+	rm -rf $(DISTDIR)
+	mkdir $(DISTDIR)
+	for d in $(SUBDIRS); do make -C $$d DIR=$$d dist || exit 1; done
+	for f in $(dist_files); do \
+		mkdir -p $(DISTDIR)/`dirname $$f`; \
+		cp -a $$f $(DISTDIR)/$$f; \
+	done; \
+	tar cjf $(DISTDIR).tar.bz2 `basename $(DISTDIR)`
+
+forcedist: archive
+
+tag:
+	hg tag -f rbuild-$(VERSION)
+
+clean: clean-subdirs default-clean
+
+include Make.rules
+include Make.defs
+ 
+# vim: set sts=8 sw=8 noexpandtab :
diff -r 000000000000 -r 9a44e39c249c NEWS
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/NEWS	Tue Apr 29 12:09:47 2008 -0400
@@ -0,0 +1,1 @@
+Changes in @NEW@:
diff -r 000000000000 -r 9a44e39c249c README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README	Tue Apr 29 12:09:47 2008 -0400
@@ -0,0 +1,8 @@
+This is the core module for the rpath_common set of modules.  These
+modules provide stable interfaces shared by multiple rPath products
+and technologies.
+
+To select an API version explicitly:
+    from rpath_common.<modulename> import api<version>
+For example:
+    from rpath_common.xmldata import api1
diff -r 000000000000 -r 9a44e39c249c rpath_common/Makefile
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpath_common/Makefile	Tue Apr 29 12:09:47 2008 -0400
@@ -0,0 +1,30 @@
+#
+# Copyright (c) 2006-2008 rPath, Inc.
+#
+# This program is distributed under the terms of the Common Public License,
+# version 1.0. A copy of this license should have been distributed with this
+# source file in a file called LICENSE. If it is not present, the license
+# is always available at http://www.rpath.com/permanent/licenses/CPL-1.0.
+#
+# This program is distributed in the hope that it will be useful, but
+# without any warranty; without even the implied warranty of merchantability
+# or fitness for a particular purpose. See the Common Public License for
+# full details.
+#
+
+python_files =  __init__.py
+
+dist_files = Makefile $(python_files)
+
+all: default-all
+
+install: all pyfiles-install default-install
+	$(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)$(pydir)', ddir='$(pydir)', quiet=1)"
+	$(PYTHON) -OO -c "import compileall; compileall.compile_dir('$(DESTDIR)$(pydir)', ddir='$(pydir)', quiet=1)"
+
+dist: default-dist
+
+clean: default-clean
+
+include ../Make.rules
+include ../Make.defs
diff -r 000000000000 -r 9a44e39c249c rpath_common/__init__.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpath_common/__init__.py	Tue Apr 29 12:09:47 2008 -0400
@@ -0,0 +1,36 @@
+#
+# Copyright (c) 2008 rPath, Inc.
+#
+# This program is distributed under the terms of the Common Public License,
+# version 1.0. A copy of this license should have been distributed with this
+# source file in a file called LICENSE. If it is not present, the license
+# is always available at http://www.rpath.com/permanent/licenses/CPL-1.0.
+#
+# This program is distributed in the hope that it will be useful, but
+# without any warranty; without even the implied warranty of merchantability
+# or fitness for a particular purpose. See the Common Public License for
+# full details.
+#
+"""
+The rPath Common Library Modules
+
+The rPath Common Library Modules provide public interfaces shared
+by rPath products.  These interfaces will be backward-compatible
+within major versions of their respective packages.  Each package
+will implement a module containing a C{VERSION} data element which
+will be a string containing the version.  The portion of the string
+before the initial C{.} charater is the major version.
+
+All interfaces in these modules that do not start with a C{_} character
+and do not include C{internal} in their names are public interfaces.
+
+Interfaces with a C{VERSION} starting with C{0.} are not stable
+interfaces and may change without warning.  Interface modules
+built from source code snapshots rather than from published releases
+also may not be stable.
+
+To select an API version explicitly:
+    from rpath_common.<modulename> import api<version>
+For example:
+    from rpath_common.xmldata import api1
+"""

From johnsonm@rpath.com Tue Apr 29 18:32:58 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m3TIWwIR016648 for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 18:32:58 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m3TIWwIp027028
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 14:32:58 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m3TIWvTv023435
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 14:32:57 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m3TIWvHB005244
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 14:32:57 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m3TIWv92005239
	for rpath-common-commits@lists.rpath.com;
	Tue, 29 Apr 2008 14:32:57 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200804291832.m3TIWv92005239@scc.eng.rpath.com>
Date: Tue, 29 Apr 2008 14:32:57 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: xmldata expanded in scope and was renamed
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 29 Apr 2008 18:32:58 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       NEWS rpath_common/proddef/api1.py

xmldata expanded in scope and was renamed

diff -r f384ef7cb3a2 -r 877fc5134a8d NEWS
--- a/NEWS	Tue Apr 29 13:05:08 2008 -0400
+++ b/NEWS	Tue Apr 29 14:32:57 2008 -0400
@@ -5,3 +5,4 @@
       changed to elementDict, elem_obj changed to elementObject,
       elem_list change to elementList.
     * API versioning added via explicit imports
+    * Use rpath_common.xmllib instead of conary.lib.xmldata
diff -r f384ef7cb3a2 -r 877fc5134a8d rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Tue Apr 29 13:05:08 2008 -0400
+++ b/rpath_common/proddef/api1.py	Tue Apr 29 14:32:57 2008 -0400
@@ -18,7 +18,7 @@
 character are public interfaces.
 """
 
-from rpath_common.xmldata import api1 as xmldata
+from rpath_common.xmllib import api1 as xmllib
 
 class ProductDefinition(object):
     """
@@ -34,8 +34,8 @@
 
         self.elementDict = elementDict
 
-        self.xmldb = xmldata.DataBinder()
-        self.xmldb.registerType('baseFlavor', xmldata.StringNode)
+        self.xmldb = xmllib.DataBinder()
+        self.xmldb.registerType('baseFlavor', xmllib.StringNode)
 
         if xml is None:
             # No xml was passed in, create an empty object that we will build
@@ -48,7 +48,7 @@
             # Create the object from the passed in xml using our DataBinder.
             self.xmlobj = self.xmldb.parseString(xml)
 
-        # A special attribute recognized by xmldata to preserve child order.
+        # A special attribute recognized by xmllib to preserve child order.
         self.xmlobj._childOrder = ['baseFlavor', 'stages', 'upstreamSources',
                                    'buildDefinition']
 

From johnsonm@rpath.com Tue Apr 29 18:36:17 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m3TIaHf4016721 for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 18:36:17 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m3TIaHqb027382
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 14:36:17 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m3TIaH5q023868
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 14:36:17 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m3TIaGsQ005531
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 14:36:16 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m3TIaG86005526
	for rpath-common-commits@lists.rpath.com;
	Tue, 29 Apr 2008 14:36:16 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200804291836.m3TIaG86005526@scc.eng.rpath.com>
Date: Tue, 29 Apr 2008 14:36:16 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: add missing proddef_constants.py.in
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 29 Apr 2008 18:36:17 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       .hgignore rpath_common/proddef/proddef_constants.py.in

add missing proddef_constants.py.in

diff -r 877fc5134a8d -r f213c853b082 .hgignore
--- a/.hgignore	Tue Apr 29 14:32:57 2008 -0400
+++ b/.hgignore	Tue Apr 29 14:36:14 2008 -0400
@@ -5,6 +5,6 @@
 .*\.o$
 .*\.so$
 ^tmp/
-rpath_common/proddef/proddef_constants.py
+rpath_common/proddef/proddef_constants.pyc?$
 ^pylint/reports/
 ^rpath-common-.*.tar.bz2
diff -r 877fc5134a8d -r f213c853b082 rpath_common/proddef/proddef_constants.py.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpath_common/proddef/proddef_constants.py.in	Tue Apr 29 14:36:14 2008 -0400
@@ -0,0 +1,24 @@
+#
+# Copyright (c) 2006-2008 rPath, Inc.
+#
+# This program is distributed under the terms of the Common Public License,
+# version 1.0. A copy of this license should have been distributed with this
+# source file in a file called LICENSE. If it is not present, the license
+# is always available at http://www.rpath.com/permanent/licenses/CPL-1.0.
+#
+# This program is distributed in the hope that it will be useful, but
+# without any warranty; without even the implied warranty of merchantability
+# or fitness for a particular purpose. See the Common Public License for
+# full details.
+#
+"""
+The rPath Product Definition API Constants definition
+
+The module data elements in this module are a private interface,
+available through the rpath_common.proddef module.
+@var _VERSION: rBuild version
+@type _VERSION: string
+"""
+
+# NOTE: constants.py is auto generated from constants.py.in
+_VERSION          = "@version@"        # proddef version

From johnsonm@rpath.com Tue Apr 29 18:39:27 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m3TIdRIB016763 for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 18:39:27 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m3TIdQUl027641
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 14:39:26 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m3TIdQZr024263
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 14:39:26 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m3TIdPpX005786
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 14:39:25 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m3TIdPaL005781
	for rpath-common-commits@lists.rpath.com;
	Tue, 29 Apr 2008 14:39:25 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200804291839.m3TIdPaL005781@scc.eng.rpath.com>
Date: Tue, 29 Apr 2008 14:39:24 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: integrate pylint directory into Makefile structure
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 29 Apr 2008 18:39:27 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       Makefile pylint/Makefile

integrate pylint directory into Makefile structure

diff -r f213c853b082 -r e6b766194e07 Makefile
--- a/Makefile	Tue Apr 29 14:36:14 2008 -0400
+++ b/Makefile	Tue Apr 29 14:39:24 2008 -0400
@@ -17,7 +17,7 @@
 export TOPDIR = $(shell pwd)
 export DISTDIR = $(TOPDIR)/rbuild-$(VERSION)
 
-SUBDIRS=rpath_common xsd doc
+SUBDIRS=rpath_common xsd doc pylint
 
 extra_files = \
 	Make.rules 		\
diff -r f213c853b082 -r e6b766194e07 pylint/Makefile
--- a/pylint/Makefile	Tue Apr 29 14:36:14 2008 -0400
+++ b/pylint/Makefile	Tue Apr 29 14:39:24 2008 -0400
@@ -1,3 +1,24 @@
+#
+# Copyright (c) 2008 rPath, Inc.
+#
+# This program is distributed under the terms of the Common Public License,
+# version 1.0. A copy of this license should have been distributed with this
+# source file in a file called LICENSE. If it is not present, the license
+# is always available at http://www.rpath.com/permanent/licenses/CPL-1.0.
+#
+# This program is distributed in the hope that it will be useful, but
+# without any warranty; without even the implied warranty of merchantability
+# or fitness for a particular purpose. See the Common Public License for
+# full details.
+#
+
+dist_files = init_pylint.py  Makefile  pylintrc  run_pylint
+
+all:
+install:
+
+dist: default-dist
+
 pylint:
 	@echo running pylint...
 	@./run_pylint
@@ -5,3 +26,6 @@
 
 clean:
 	rm -rf reports *,cover
+
+include ../Make.rules
+include ../Make.defs

From johnsonm@rpath.com Tue Apr 29 18:42:49 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m3TIgnWd016842 for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 18:42:49 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m3TIgnOj027887
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 14:42:49 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m3TIgnV2024516
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 14:42:49 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m3TIgmQn006024
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 14:42:48 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m3TIgmIi006019
	for rpath-common-commits@lists.rpath.com;
	Tue, 29 Apr 2008 14:42:48 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200804291842.m3TIgmIi006019@scc.eng.rpath.com>
Date: Tue, 29 Apr 2008 14:42:48 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: fix epydoc typos
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 29 Apr 2008 18:42:49 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       rpath_common/proddef/__init__.py

fix epydoc typos

diff -r e6b766194e07 -r 010a039fe5bf rpath_common/proddef/__init__.py
--- a/rpath_common/proddef/__init__.py	Tue Apr 29 14:39:24 2008 -0400
+++ b/rpath_common/proddef/__init__.py	Tue Apr 29 14:42:46 2008 -0400
@@ -18,14 +18,14 @@
 rPath product definition XML files.  This interface will be
 backward-compatible within major versions of this package.
 The C{VERSION} data element is a string containing the version.
-The portion of the string before the initial C{.} charater is the
+The portion of the string before the initial C{.} character is the
 major version.
 
 All interfaces in this modules that do not start with a C{_}
 character are public interfaces.
 
 If the C{VERSION} starts with C{0.}, none of the included
-interfaces is stable and the may change without warning.
+interfaces is stable and may change without warning.
 
 To use the latest version of the interface:
     from rpath_common import proddef

From misa@rpath.com Tue Apr 29 18:54:23 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m3TIsN0I017206 for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 18:54:23 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m3TIsNFY028840
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 14:54:23 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m3TIsNnh025445
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 14:54:23 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m3TIsMRM006784
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 14:54:22 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m3TIsMim006769
	for rpath-common-commits@lists.rpath.com;
	Tue, 29 Apr 2008 14:54:22 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200804291854.m3TIsMim006769@scc.eng.rpath.com>
Date: Tue, 29 Apr 2008 14:54:22 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Fixing make install
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailman-Approved-At: Tue, 29 Apr 2008 18:56:34 +0000
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 29 Apr 2008 18:54:23 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       doc/Makefile xsd/Makefile

Fixing make install

diff -r e6b766194e07 -r a293cea65e91 doc/Makefile
--- a/doc/Makefile	Tue Apr 29 14:39:24 2008 -0400
+++ b/doc/Makefile	Tue Apr 29 14:54:02 2008 -0400
@@ -16,8 +16,11 @@
 
 all: default-all
 
-install: all default-install
+install: all default-install $(DESTDIR)$(docdir)
 	install example.xml $(DESTDIR)$(docdir)/example.xml
+
+$(DESTDIR)$(docdir):
+	install -d -m755 $@
 
 dist: default-dist
 
diff -r e6b766194e07 -r a293cea65e91 xsd/Makefile
--- a/xsd/Makefile	Tue Apr 29 14:39:24 2008 -0400
+++ b/xsd/Makefile	Tue Apr 29 14:54:02 2008 -0400
@@ -16,8 +16,11 @@
 
 all: default-all
 
-install: all default-install
+install: all default-install $(DESTDIR)$(datadir)/rpath_common
 	install pd.xsd $(DESTDIR)$(datadir)/rpath_common/pd.xsd
+
+$(DESTDIR)$(datadir)/rpath_common:
+	install -d -m755 $@
 
 dist: default-dist
 

From johnsonm@rpath.com Tue Apr 29 19:02:58 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m3TJ2w9i017481 for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 19:02:58 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m3TJ2wqh029688
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 15:02:58 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m3TJ2wWM026105
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 15:02:58 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m3TJ2vR6007353
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 15:02:57 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m3TJ2vTg007347
	for rpath-common-commits@lists.rpath.com;
	Tue, 29 Apr 2008 15:02:57 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200804291902.m3TJ2vTg007347@scc.eng.rpath.com>
Date: Tue, 29 Apr 2008 15:02:57 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: remove unnecessary path insertion for pylint
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 29 Apr 2008 19:02:59 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       pylint/init_pylint.py

remove unnecessary path insertion for pylint

diff -r 72a8864a6c5f -r f94e3a2379a8 pylint/init_pylint.py
--- a/pylint/init_pylint.py	Tue Apr 29 14:54:17 2008 -0400
+++ b/pylint/init_pylint.py	Tue Apr 29 15:02:56 2008 -0400
@@ -1,7 +1,6 @@
 import os
 import sys
 sys.path.insert(0, os.environ['CONARY_PATH'])
-sys.path.insert(0, os.environ['RMAKE_PATH'])
 sys.path.insert(0, os.environ['PRODUCT_DEFINITION_PATH'])
 sys.path.insert(0, os.environ['XMLDATA_PATH'])
 

From johnsonm@rpath.com Tue Apr 29 19:26:28 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m3TJQSdO018218 for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 19:26:28 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m3TJQSjN031881
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 15:26:28 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m3TJQRYo027834
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 15:26:27 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m3TJQQ4h009159
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 15:26:26 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m3TJQQUV009139
	for rpath-common-commits@lists.rpath.com;
	Tue, 29 Apr 2008 15:26:26 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200804291926.m3TJQQUV009139@scc.eng.rpath.com>
Date: Tue, 29 Apr 2008 15:26:26 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: add missing copyright statements in pylint
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 29 Apr 2008 19:26:28 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       pylint/init_pylint.py pylint/run_pylint

add missing copyright statements in pylint

diff -r f94e3a2379a8 -r 207fdd6ce3c4 pylint/init_pylint.py
--- a/pylint/init_pylint.py	Tue Apr 29 15:02:56 2008 -0400
+++ b/pylint/init_pylint.py	Tue Apr 29 15:26:25 2008 -0400
@@ -1,3 +1,17 @@
+#
+# Copyright (c) 2008 rPath, Inc.
+#
+# This program is distributed under the terms of the Common Public License,
+# version 1.0. A copy of this license should have been distributed with this
+# source file in a file called LICENSE. If it is not present, the license
+# is always available at http://www.rpath.com/permanent/licenses/CPL-1.0.
+#
+# This program is distributed in the hope that it will be useful, but
+# without any warranty; without even the implied warranty of merchantability
+# or fitness for a particular purpose. See the Common Public License for
+# full details.
+#
+
 import os
 import sys
 sys.path.insert(0, os.environ['CONARY_PATH'])
diff -r f94e3a2379a8 -r 207fdd6ce3c4 pylint/run_pylint
--- a/pylint/run_pylint	Tue Apr 29 15:02:56 2008 -0400
+++ b/pylint/run_pylint	Tue Apr 29 15:26:25 2008 -0400
@@ -1,4 +1,18 @@
 #!/bin/sh
+#
+# Copyright (c) 2008 rPath, Inc.
+#
+# This program is distributed under the terms of the Common Public License,
+# version 1.0. A copy of this license should have been distributed with this
+# source file in a file called LICENSE. If it is not present, the license
+# is always available at http://www.rpath.com/permanent/licenses/CPL-1.0.
+#
+# This program is distributed in the hope that it will be useful, but
+# without any warranty; without even the implied warranty of merchantability
+# or fitness for a particular purpose. See the Common Public License for
+# full details.
+#
+
 if [ -x reports ]; then
    rm -rf reports;
 fi

From misa@rpath.com Tue Apr 29 19:52:58 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m3TJqwv8019226 for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 19:52:58 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m3TJqvhA004003
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 15:52:58 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m3TJquBv030561
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 15:52:56 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m3TJquuo011883
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 15:52:56 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m3TJquXP011878
	for rpath-common-commits@lists.rpath.com;
	Tue, 29 Apr 2008 15:52:56 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200804291952.m3TJquXP011878@scc.eng.rpath.com>
Date: Tue, 29 Apr 2008 15:52:56 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: Importing xmldata as xmllib
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 29 Apr 2008 19:52:58 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       .hgignore EULA_xmllib.txt LICENSE Make.defs Make.rules Makefile NEWS README pylint/Makefile pylint/init_pylint.py pylint/pylintrc pylint/run_pylint rpath_common/Makefile rpath_common/__init__.py rpath_common/xmllib/Makefile rpath_common/xmllib/__init__.py rpath_common/xmllib/api1.py rpath_common/xmllib/xmllib_constants.py.in

Importing xmldata as xmllib

diff -r 000000000000 -r aae7fb5993a6 .hgignore
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore	Tue Apr 29 15:52:36 2008 -0400
@@ -0,0 +1,10 @@
+(^|/)\.hg($|/)
+.*\.pyc$
+.*\~$
+.*,cover$
+.*\.o$
+.*\.so$
+^tmp/
+rpath_common/xmllib/xmllib_constants.pyc?$
+^pylint/reports/
+^rpath-common-.*.tar.bz2
diff -r 000000000000 -r aae7fb5993a6 EULA_xmllib.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/EULA_xmllib.txt	Tue Apr 29 15:52:36 2008 -0400
@@ -0,0 +1,170 @@
+rPATH APPLICATION SOFTWARE
+rBUILD END USER LICENSE AGREEMENT
+
+
+IMPORTANT -- READ CAREFULLY BEFORE USING THIS SOFTWARE:
+
+
+The Software governed by this license agreement is a collective work
+under the U.S. Copyright laws. The Software may be licensed under the
+Common Public License ("CPL") or a commercial software agreement from
+rPath, Inc. If the Software, under a commercial software agreement
+from rPath, is conveyed to the End User, and End User would like to
+use or distribute the Software, then the End User must comply with
+the terms contained in this EULA. If the Software, under the CPL,
+is conveyed to the End User, then the End User must comply with
+the terms of the CPL.
+
+Upon the use of any rPath Software Application (“Software”)
+or any appliance in which the Software may be embedded, End User
+acknowledges that End User has reviewed and agreed to all of the
+terms and conditions set forth in this document.  If End User DOES
+NOT AGREE with these terms and conditions, DO NOT USE the Software.
+
+REDISTRIBUTION NOT PERMITTED
+
+As used herein, the following terms have the meanings set forth below:
+
+"Computer" means the hardware, if the hardware is a single computer
+system whether physical or virtual, or shall mean the computer
+system with which the hardware operates, if the hardware is a
+computer system component.
+
+“End User” means the purchasers or licensees who have acquired
+the Software for their own personal or internal use and without
+the right to resale, re-market or otherwise distribute the Software.
+
+“EULA” means an end user license agreement.  This EULA is a
+legal agreement between you (either an individual or an entity) and
+rPath, Inc. and its suppliers and licensors (collectively "rPath")
+for the rPath Software which may include components provided by
+suppliers and licensors to rPath.
+
+“Software” means the source code and object code versions of
+the product, together with the updates, upgrades, modifications
+or enhancements owned and provided by rPath to you pursuant to
+this EULA.
+
+BY USING THE SOFTWARE YOU ACKNOWLEDGE THAT YOU HAVE READ THIS
+LICENSE AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS
+TERMS AND CONDITIONS.
+
+This EULA applies to Software applications that are made up of
+individual software components, each of which was individually
+written and copyrighted.
+
+ANY THIRD PARTY SOFTWARE, INCLUDING ANY THIRD PARTY'S PLUG-IN,
+THAT MAY BE PROVIDED WITH THE SOFTWARE IS INCLUDED FOR USE AT YOUR
+OPTION. IF YOU CHOOSE TO USE SUCH THIRD PARTY SOFTWARE, THEN SUCH
+USE SHALL BE GOVERNED BY SUCH THIRD PARTY'S LICENSE AGREEMENT. rPath
+IS NOT RESPONSIBLE FOR ANY THIRD PARTY'S SOFTWARE AND SHALL HAVE
+NO LIABILITY FOR YOUR USE OF THIRD PARTY SOFTWARE.
+
+rPath hereby grants End User the following license to use the
+Software in the End User’s facility subject to the terms contained
+herein subject to the licenses referenced herein.
+
+1. GRANT OF LICENSE. Upon payment of any fees applicable, rPath
+hereby grants to you a non-exclusive, personal license to use the
+Software and any related documentation ("Documentation") subject
+to the following terms:
+
+a)	You may: (i) use the Software on any single Computer; and
+(ii) copy the Software for back-up and archival purposes, provided
+any copy must contain all of the original Software's proprietary
+notices within the United States and its territories or any other
+country to which this Software can legally be exported.
+
+b)	The Software is "in use" on a computer when it is loaded
+into temporary memory or installed in permanent memory (Hard Drive,
+CD-ROM or other storage device).  You agree to use your best efforts
+to prevent and protect the contents of the Software and Documentation
+from unauthorized use or disclosure.
+
+2. LICENSE RESTRICTIONS. 
+a)	You may not: (i) permit other individuals to use the Software
+except under the terms listed above; (ii) modify, translate, reverse
+engineer, decompile, disassemble (except to the extent that this
+restriction is expressly prohibited by law) or create derivative
+works based upon the Software or Documentation; (iii) copy the
+Software or Documentation (except for back-up or archival purposes);
+(iv) rent, lease, transfer, or otherwise transfer rights to the
+Software or Documentation; (v) remove any proprietary notices or
+labels on the Software or Documentation. Any such forbidden use
+shall immediately terminate your license to the Software. The
+recording, playback and download features of the Software are
+intended only for use with public domain or properly licensed content
+and content creation tools. You may require a patent, copyright,
+or other license from a third party to create, copy, download,
+record or save content files for playback by this Software or to
+serve or distribute such files to be played back by the Software.
+b)	You agree that you shall only use the Software and
+Documentation in a manner that complies with all applicable laws in
+the jurisdictions in which you use the Software and Documentation,
+including, but not limited to, applicable restrictions concerning
+copyright and other intellectual property rights.
+
+3. TITLE.  Title, ownership, rights, and intellectual property
+rights in and to the Software and Documentation shall remain
+rPath’s and/or its suppliers.  The Software and the Documentation
+are protected by the copyright laws of the United States and
+international copyright treaties.  Title, ownership rights and
+intellectual property rights in and to the content accessed
+through the Software and the Documentation ("Content") shall be
+retained by the applicable Content owner and may be protected by
+applicable copyright or other law.  This EULA gives you no rights
+to such Content.
+
+4. DATA RIGHTS.  You should be aware that rPath’s Software
+contains functions for collecting information related to your use
+of the Software.  rPath may also collect and track non-personally
+identifiable information about you including but not limited to your
+IP address, the type of hardware you use and the type of browser
+you employ.  rPath reserves the right to compile, save, use within
+the scope of rPath’s activities, and analyze any and all of your
+data (registration data, and use history).  rPath intends to use
+such data for internal purposes only, including without limitation
+for the purposes of responding to your requests for information and
+for contacting you.  rPath may provide aggregated statistics about
+your use of the Software to third parties, but such information will
+be aggregated so that it does not identify a particular individual
+or company.
+
+5.  NO WARRANTY.  THE SOFTWARE IS PROVIDED AND LICENSED "AS IS"
+WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
+NON-INFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+
+6.  NO LIABILITY.  TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE
+LAW, IN NO EVENT WILL rPATH, INC. BE LIABLE TO END USER FOR ANY
+INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, LOST
+SAVINGS, OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT
+OF THE USE OR INABILITY TO USE THE SOFTWARE OR SOFTWARE PROGRAMS,
+EVEN IF rPATH, INC. OR A DEALER AUTHORIZED BY rPATH, INC. HAD BEEN
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.  IN NO EVENT SHALL
+rPATH HAVE ANY LIABILITY HEREUNDER.
+
+7.  COMPLETE AGREEMENT.  This EULA constitutes the entire
+agreement between the parties with respect to the Software and
+supersedes all prior or contemporaneous communications, agreements
+and understandings, written or oral, with respect to the subject
+matter hereof.  This EULA shall not be amended or modified except
+in a writing signed by authorized representatives of each party.
+
+8.  GENERAL.  If any provision of this EULA is held to be
+unenforceable, that shall not affect the enforceability of the
+remaining provisions.  This EULA shall be governed by the laws of
+the State of North Carolina and of the United States, without regard
+to any conflict of laws provisions, except that the United Nations
+Convention on the International Sale of Goods shall not apply.
+
+
+Copyright © 2005 - 2008.  rPath, Inc.  All rights reserved.
+
+"rPath," “rPath” Logo, “Powered by rPath” Logo, ”rPath
+Appliance Platform” logo, “Conary,”  “rMake,” “rAA,”
+“rEA,” “rBuilder,” “rBuilder” Logo, and “rManager”
+are trademarks and service marks that are the property of
+rPath, Inc.
+
+Revised January 30, 2008
diff -r 000000000000 -r aae7fb5993a6 LICENSE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LICENSE	Tue Apr 29 15:52:36 2008 -0400
@@ -0,0 +1,224 @@
+Common Public License - v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON
+PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF
+THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+      a) in the case of the initial Contributor, the initial code and
+      documentation distributed under this Agreement, and
+
+      b) in the case of each subsequent Contributor:
+
+      i) changes to the Program, and
+
+      ii) additions to the Program;
+
+      where such changes and/or additions to the Program originate from
+      and are distributed by that particular Contributor. A Contribution
+      'originates' from a Contributor if it was added to the Program
+      by such Contributor itself or anyone acting on such Contributor's
+      behalf. Contributions do not include additions to the Program which:
+      (i) are separate modules of software distributed in conjunction
+      with the Program under their own license agreement, and (ii)
+      are not derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " mean patent claims licensable by a Contributor which are
+necessarily infringed by the use or sale of its Contribution alone or when
+combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this
+Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement,
+including all Contributors.
+
+2. GRANT OF RIGHTS
+
+      a) Subject to the terms of this Agreement, each Contributor hereby
+      grants Recipient a non-exclusive, worldwide, royalty-free copyright
+      license to reproduce, prepare derivative works of, publicly display,
+      publicly perform, distribute and sublicense the Contribution of
+      such Contributor, if any, and such derivative works, in source
+      code and object code form.
+
+      b) Subject to the terms of this Agreement, each Contributor hereby
+      grants Recipient a non-exclusive, worldwide, royalty-free patent
+      license under Licensed Patents to make, use, sell, offer to sell,
+      import and otherwise transfer the Contribution of such Contributor,
+      if any, in source code and object code form. This patent license
+      shall apply to the combination of the Contribution and the Program
+      if, at the time the Contribution is added by the Contributor,
+      such addition of the Contribution causes such combination to be
+      covered by the Licensed Patents. The patent license shall not
+      apply to any other combinations which include the Contribution. No
+      hardware per se is licensed hereunder.
+
+      c) Recipient understands that although each Contributor grants the
+      licenses to its Contributions set forth herein, no assurances are
+      provided by any Contributor that the Program does not infringe
+      the patent or other intellectual property rights of any other
+      entity. Each Contributor disclaims any liability to Recipient
+      for claims brought by any other entity based on infringement
+      of intellectual property rights or otherwise. As a condition to
+      exercising the rights and licenses granted hereunder, each Recipient
+      hereby assumes sole responsibility to secure any other intellectual
+      property rights needed, if any. For example, if a third party patent
+      license is required to allow Recipient to distribute the Program,
+      it is Recipient's responsibility to acquire that license before
+      distributing the Program.
+
+      d) Each Contributor represents that to its knowledge it has
+      sufficient copyright rights in its Contribution, if any, to grant
+      the copyright license set forth in this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under
+its own license agreement, provided that:
+
+      a) it complies with the terms and conditions of this Agreement; and
+
+      b) its license agreement:
+
+      i) effectively disclaims on behalf of all Contributors all
+      warranties and conditions, express and implied, including warranties
+      or conditions of title and non-infringement, and implied warranties
+      or conditions of merchantability and fitness for a particular
+      purpose;
+
+      ii) effectively excludes on behalf of all Contributors all liability
+      for damages, including direct, indirect, special, incidental and
+      consequential damages, such as lost profits;
+
+      iii) states that any provisions which differ from this Agreement are
+      offered by that Contributor alone and not by any other party; and
+
+      iv) states that source code for the Program is available from
+      such Contributor, and informs licensees how to obtain it in a
+      reasonable manner on or through a medium customarily used for
+      software exchange.
+
+When the Program is made available in source code form:
+
+      a) it must be made available under this Agreement; and 
+
+      b) a copy of this Agreement must be included with each copy of
+      the Program.
+
+Contributors may not remove or alter any copyright notices contained within the
+Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if
+any, in a manner that reasonably allows subsequent Recipients to identify the
+originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with
+respect to end users, business partners and the like. While this license is
+intended to facilitate the commercial use of the Program, the Contributor who
+includes the Program in a commercial product offering should do so in a manner
+which does not create potential liability for other Contributors. Therefore, if
+a Contributor includes the Program in a commercial product offering, such
+Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
+every other Contributor ("Indemnified Contributor") against any losses, damages
+and costs (collectively "Losses") arising from claims, lawsuits and other legal
+actions brought by a third party against the Indemnified Contributor to the
+extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may
+participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product
+offering, Product X. That Contributor is then a Commercial Contributor. If that
+Commercial Contributor then makes performance claims, or offers warranties
+related to Product X, those performance claims and warranties are such
+Commercial Contributor's responsibility alone. Under this section, the
+Commercial Contributor would have to defend claims against the other
+Contributors related to those performance claims and warranties, and if a court
+requires any other Contributor to pay any damages as a result, the Commercial
+Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
+Recipient is solely responsible for determining the appropriateness of using
+and distributing the Program and assumes all risks associated with its exercise
+of rights under this Agreement, including but not limited to the risks and
+costs of program errors, compliance with applicable laws, damage to or loss of
+data, programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
+CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
+WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
+GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable
+law, it shall not affect the validity or enforceability of the remainder of the
+terms of this Agreement, and without further action by the parties hereto, such
+provision shall be reformed to the minimum extent necessary to make such
+provision valid and enforceable.
+
+If Recipient institutes patent litigation against a Contributor with respect to
+a patent applicable to software (including a cross-claim or counterclaim in a
+lawsuit), then any patent licenses granted by that Contributor to such
+Recipient under this Agreement shall terminate as of the date such litigation
+is filed. In addition, if Recipient institutes patent litigation against any
+entity (including a cross-claim or counterclaim in a lawsuit) alleging that the
+Program itself (excluding combinations of the Program with other software or
+hardware) infringes such Recipient's patent(s), then such Recipient's rights
+granted under Section 2(b) shall terminate as of the date such litigation is
+filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to
+comply with any of the material terms or conditions of this Agreement and does
+not cure such failure in a reasonable period of time after becoming aware of
+such noncompliance. If all Recipient's rights under this Agreement terminate,
+Recipient agrees to cease use and distribution of the Program as soon as
+reasonably practicable. However, Recipient's obligations under this Agreement
+and any licenses granted by Recipient relating to the Program shall continue
+and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in
+order to avoid inconsistency the Agreement is copyrighted and may only be
+modified in the following manner. The Agreement Steward reserves the right to
+publish new versions (including revisions) of this Agreement from time to time.
+No one other than the Agreement Steward has the right to modify this Agreement.
+IBM is the initial Agreement Steward. IBM may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the
+intellectual property laws of the United States of America. No party to this
+Agreement will bring a legal action under this Agreement more than one year
+after the cause of action arose. Each party waives its rights to a jury trial
+in any resulting litigation. 
diff -r 000000000000 -r aae7fb5993a6 Make.defs
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Make.defs	Tue Apr 29 15:52:36 2008 -0400
@@ -0,0 +1,31 @@
+#
+# Copyright (c) 2006-2007 rPath, Inc.
+#
+# This program is distributed under the terms of the Common Public License,
+# version 1.0. A copy of this license should have been distributed with this
+# source file in a file called LICENSE. If it is not present, the license
+# is always available at http://www.rpath.com/permanent/licenses/CPL-1.0.
+#
+# This program is distributed in the hope that it will be useful, but
+# without any warranty; without even the implied warranty of merchantability
+# or fitness for a particular purpose. See the Common Public License for
+# full details.
+#
+
+VERSION=0.1
+# VERSION can be overridden by snapshot builds to force incompatible versions
+
+export prefix = /usr
+export bindir = $(prefix)/bin
+export sbindir = $(prefix)/sbin
+export libdir = $(prefix)/lib
+export libexecdir = $(prefix)/libexec
+export datadir = $(prefix)/share
+export mandir = $(datadir)/man
+export sitedir = $(libdir)/python$(PYVERSION)/site-packages/
+export pydir = $(sitedir)/rpath_common/
+export initdir = /etc/init.d
+export sysconfdir = /etc/sysconfig
+export docdir = $(datadir)/doc/product-common-$(VERSION)
+
+export VERSION
diff -r 000000000000 -r aae7fb5993a6 Make.rules
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Make.rules	Tue Apr 29 15:52:36 2008 -0400
@@ -0,0 +1,58 @@
+#
+# Copyright (c) 2006-2008 rPath, Inc.
+#
+# This program is distributed under the terms of the Common Public License,
+# version 1.0. A copy of this license should have been distributed with this
+# source file in a file called LICENSE. If it is not present, the license
+# is always available at http://www.rpath.com/permanent/licenses/CPL-1.0.
+#
+# This program is distributed in the hope that it will be useful, but
+# without any warranty; without even the implied warranty of merchantability
+# or fitness for a particular purpose. See the Common Public License for
+# full details.
+#
+
+PYTHON = $(shell [ -x /usr/bin/python2.4 ] && echo /usr/bin/python2.4)
+PYVERSION = $(shell $(PYTHON) -c 'import os, sys; print sys.version[:3]')
+PYINCLUDE = $(shell $(PYTHON) -c 'import os, sys; print os.sep.join((sys.prefix, "include", "python" + sys.version[:3]))')
+
+pyfiles-install:
+	mkdir -p $(DESTDIR)$(pydir)
+	for f in $(python_files); do \
+		mkdir -p `dirname $(DESTDIR)/$(sitedir)/$(DIR)/$$f`; \
+		cp -a $$f $(DESTDIR)/$(sitedir)/$(DIR)/$$f; \
+	done
+
+default-dist: dist-subdirs
+	for f in $(dist_files); do \
+		mkdir -p $(DISTDIR)/$(DIR)/`dirname $$f`; \
+		cp -a $$f $(DISTDIR)/$(DIR)/$$f; \
+	done
+
+default-install:
+
+default-all:
+
+default-clean: clean-subdirs
+	rm -f *~ .??*~ .#* *.pyo *.pyc $(generated_files) *.orig *.ccs
+
+default-test:
+	$(TESTSUITE) *.py
+
+default-subdirs:
+	for d in $(SUBDIRS); do make -C $$d DIR=$$d || exit 1; done
+
+clean-subdirs:
+ifdef SUBDIRS
+	for d in $(SUBDIRS); do make -C $$d DIR=$(DIR)/$$d clean || exit 1; done
+endif
+
+install-subdirs:
+ifdef SUBDIRS
+	for d in $(SUBDIRS); do make -C $$d DIR=$(DIR)/$$d install || exit 1; done
+endif
+
+dist-subdirs:
+ifdef SUBDIRS
+	for d in $(SUBDIRS); do make -C $$d DIR=$(DIR)/$$d dist || exit 1; done
+endif
diff -r 000000000000 -r aae7fb5993a6 Makefile
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile	Tue Apr 29 15:52:36 2008 -0400
@@ -0,0 +1,69 @@
+#
+# Copyright (c) 2006-2008 rPath, Inc.
+#
+# This program is distributed under the terms of the Common Public License,
+# version 1.0. A copy of this license should have been distributed with this
+# source file in a file called LICENSE. If it is not present, the license
+# is always available at http://www.rpath.com/permanent/licenses/CPL-1.0.
+#
+# This program is distributed in the hope that it will be useful, but
+# without any warranty; without even the implied warranty of merchantability
+# or fitness for a particular purpose. See the Common Public License for
+# full details.
+#
+
+all: default-subdirs default-all
+
+export TOPDIR = $(shell pwd)
+export DISTDIR = $(TOPDIR)/rbuild-$(VERSION)
+
+SUBDIRS=rpath_common pylint
+
+extra_files = \
+	Make.rules 		\
+	Makefile		\
+	Make.defs		\
+	NEWS			\
+	README			\
+	EULA_product_common.txt		\
+	LICENSE
+
+dist_files = $(extra_files)
+
+.PHONY: clean dist install subdirs
+
+subdirs: default-subdirs
+
+install: install-subdirs
+
+clean: clean-subdirs default-clean
+
+dist:
+	if ! grep "^Changes in $(VERSION)" NEWS > /dev/null 2>&1; then \
+		echo "no NEWS entry"; \
+		exit 1; \
+	fi
+	$(MAKE) forcedist
+
+
+archive: $(dist_files)
+	rm -rf $(DISTDIR)
+	mkdir $(DISTDIR)
+	for d in $(SUBDIRS); do make -C $$d DIR=$$d dist || exit 1; done
+	for f in $(dist_files); do \
+		mkdir -p $(DISTDIR)/`dirname $$f`; \
+		cp -a $$f $(DISTDIR)/$$f; \
+	done; \
+	tar cjf $(DISTDIR).tar.bz2 `basename $(DISTDIR)`
+
+forcedist: archive
+
+tag:
+	hg tag -f rbuild-$(VERSION)
+
+clean: clean-subdirs default-clean
+
+include Make.rules
+include Make.defs
+ 
+# vim: set sts=8 sw=8 noexpandtab :
diff -r 000000000000 -r aae7fb5993a6 NEWS
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/NEWS	Tue Apr 29 15:52:36 2008 -0400
@@ -0,0 +1,3 @@
+Changes in @NEW@:
+  o API Changes:
+    * xmldata.py moved into rpath_common module as xmllib
diff -r 000000000000 -r aae7fb5993a6 README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README	Tue Apr 29 15:52:36 2008 -0400
@@ -0,0 +1,13 @@
+This is a component of the rpath_common set of modules.  It provides
+a stable interface for managing rPath product definition components
+as stored in rBuilder.
+
+Note that until version 1.0 is released, public APIs are subject to
+change.  All documentation regarding stable interfaces is relevant
+only to published stable releases; it is not in force for alpha
+and beta releases, including 0.x releases and any automated builds.
+
+To use the latest version of the interface:
+    from rpath_common import xmllib
+To use a specific API Version of the interface:
+    from rpath_common.xmllib import api1 as xmllib
diff -r 000000000000 -r aae7fb5993a6 pylint/Makefile
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pylint/Makefile	Tue Apr 29 15:52:36 2008 -0400
@@ -0,0 +1,31 @@
+#
+# Copyright (c) 2008 rPath, Inc.
+#
+# This program is distributed under the terms of the Common Public License,
+# version 1.0. A copy of this license should have been distributed with this
+# source file in a file called LICENSE. If it is not present, the license
+# is always available at http://www.rpath.com/permanent/licenses/CPL-1.0.
+#
+# This program is distributed in the hope that it will be useful, but
+# without any warranty; without even the implied warranty of merchantability
+# or fitness for a particular purpose. See the Common Public License for
+# full details.
+#
+
+dist_files = init_pylint.py  Makefile  pylintrc  run_pylint
+
+all:
+install:
+
+dist: default-dist
+
+pylint:
+	@echo running pylint...
+	@./run_pylint
+	@echo Done.  Error output is in the reports/ directory.
+
+clean:
+	rm -rf reports *,cover
+
+include ../Make.rules
+include ../Make.defs
diff -r 000000000000 -r aae7fb5993a6 pylint/init_pylint.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pylint/init_pylint.py	Tue Apr 29 15:52:36 2008 -0400
@@ -0,0 +1,20 @@
+#
+# Copyright (c) 2008 rPath, Inc.
+#
+# This program is distributed under the terms of the Common Public License,
+# version 1.0. A copy of this license should have been distributed with this
+# source file in a file called LICENSE. If it is not present, the license
+# is always available at http://www.rpath.com/permanent/licenses/CPL-1.0.
+#
+# This program is distributed in the hope that it will be useful, but
+# without any warranty; without even the implied warranty of merchantability
+# or fitness for a particular purpose. See the Common Public License for
+# full details.
+#
+
+import os
+import sys
+sys.path.insert(0, os.environ['CONARY_PATH'])
+sys.path.insert(0, os.path.abspath('../..'))
+
+from rpath_common.xmllib import api1
diff -r 000000000000 -r aae7fb5993a6 pylint/pylintrc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pylint/pylintrc	Tue Apr 29 15:52:36 2008 -0400
@@ -0,0 +1,36 @@
+[BASIC]
+# Regular expression which should only match correct class names
+class-rgx=[A-Z][a-zA-Z0-9]+$
+
+# Regular expression which should only match correct function names
+function-rgx=[a-z_][a-zA-Z0-9]*$
+
+# Regular expression which should only match correct function names
+name-rgx=[a-z_][a-zA-Z0-9]*$
+
+# Regular expression which should only match correct method names
+method-rgx=([a-z_][a-zA-Z0-9]*)|(__[a-z][a-zA-Z0-9]+__)$
+
+# Regular expression which should only match correct argument names
+argument-rgx=[a-z][a-zA-Z0-9]*$
+
+# Regular expression which should only match correct variable names
+variable-rgx=[a-z][a-zA-Z0-9]*$
+
+# Attributes can be camel case too
+attr-rgx=[a-z_][a-zA-Z0-9_]{2,30}$
+
+# Good variable names which should always be accepted, separated by a comma
+good-names=XmlObj,Elem
+
+
+
+
+[REPORTS]
+files-output=yes
+reports=yes
+include-ids=yes
+
+[MESSAGES CONTROL]
+disable-msg=W0102,W0142
+#,I0011
diff -r 000000000000 -r aae7fb5993a6 pylint/run_pylint
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pylint/run_pylint	Tue Apr 29 15:52:36 2008 -0400
@@ -0,0 +1,15 @@
+#!/bin/sh
+if [ -x reports ]; then
+   rm -rf reports;
+fi
+mkdir reports
+cp init_pylint.py reports
+cd reports
+
+pylint --init-hook='import sys, os; sys.path.append("."); import init_pylint' --rcfile='../pylintrc' ../../rpath_common/proddef/api1.py;
+rm init_pylint*;
+for file in $(ls); do
+   if [ ! -s $file ]; then
+      rm $file;
+   fi
+done
diff -r 000000000000 -r aae7fb5993a6 rpath_common/Makefile
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpath_common/Makefile	Tue Apr 29 15:52:36 2008 -0400
@@ -0,0 +1,32 @@
+#
+# Copyright (c) 2006-2008 rPath, Inc.
+#
+# This program is distributed under the terms of the Common Public License,
+# version 1.0. A copy of this license should have been distributed with this
+# source file in a file called LICENSE. If it is not present, the license
+# is always available at http://www.rpath.com/permanent/licenses/CPL-1.0.
+#
+# This program is distributed in the hope that it will be useful, but
+# without any warranty; without even the implied warranty of merchantability
+# or fitness for a particular purpose. See the Common Public License for
+# full details.
+#
+
+# Note: do not list __init__.py in python_files -- it is here only
+# to support testing out of the tree.  When distributed, this
+# file is provided by the rpath-common package instead.
+
+SUBDIRS=xmllib
+
+dist_files = Makefile __init__.py
+
+all: default-all default-subdirs
+
+install: all default-install install-subdirs
+
+dist: default-dist
+
+clean: default-clean
+
+include ../Make.rules
+include ../Make.defs
diff -r 000000000000 -r aae7fb5993a6 rpath_common/xmllib/Makefile
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpath_common/xmllib/Makefile	Tue Apr 29 15:52:36 2008 -0400
@@ -0,0 +1,37 @@
+#
+# Copyright (c) 2008 rPath, Inc.
+#
+# This program is distributed under the terms of the Common Public License,
+# version 1.0. A copy of this license should have been distributed with this
+# source file in a file called LICENSE. If it is not present, the license
+# is always available at http://www.rpath.com/permanent/licenses/CPL-1.0.
+#
+# This program is distributed in the hope that it will be useful, but
+# without any warranty; without even the implied warranty of merchantability
+# or fitness for a particular purpose. See the Common Public License for
+# full details.
+#
+
+python_files =	__init__.py \
+		api1.py
+
+dist_files = Makefile xmllib_constants.py.in $(python_files)
+
+all: default-all xmllib_constants.py
+
+xmllib_constants.py: xmllib_constants.py.in ../../Makefile ../../Make.defs Makefile
+	sed -e s,@version@,$(VERSION),g \
+	$< > $@
+
+install: all pyfiles-install default-install
+	install xmllib_constants.py $(DESTDIR)$(pydir)/xmllib/xmllib_constants.py
+	$(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)$(pydir)/xmllib', ddir='$(pydir)/xmllib', quiet=1)"
+	$(PYTHON) -OO -c "import compileall; compileall.compile_dir('$(DESTDIR)$(pydir)/xmllib', ddir='$(pydir)/xmllib', quiet=1)"
+
+dist: default-dist
+
+clean: default-clean
+	rm -f xmllib_constants.py
+
+include ../../Make.rules
+include ../../Make.defs
diff -r 000000000000 -r aae7fb5993a6 rpath_common/xmllib/__init__.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpath_common/xmllib/__init__.py	Tue Apr 29 15:52:36 2008 -0400
@@ -0,0 +1,42 @@
+#
+# Copyright (c) 2008 rPath, Inc.
+#
+# This program is distributed under the terms of the Common Public License,
+# version 1.0. A copy of this license should have been distributed with this
+# source file in a file called LICENSE. If it is not present, the license
+# is always available at http://www.rpath.com/permanent/licenses/CPL-1.0.
+#
+# This program is distributed in the hope that it will be useful, but
+# without any warranty; without even the implied warranty of merchantability
+# or fitness for a particular purpose. See the Common Public License for
+# full details.
+#
+"""
+The rPath Common Library Module for XML parsing
+
+This module provides a stable interface for reading and writing
+rPath-generated XML files.  This interface will be
+backward-compatible within major versions of this package.
+The C{VERSION} data element is a string containing the version.
+The portion of the string before the initial C{.} charater is the
+major version.
+
+All interfaces in this modules that do not start with a C{_}
+character are public interfaces.
+
+If the C{VERSION} starts with C{0.}, none of the included
+interfaces is stable and the may change without warning.
+
+To use the latest version of the interface:
+    from rpath_common import xmllib
+To use a specific API Version of the interface:
+    from rpath_common.xmllib import api1 as xmllib
+"""
+
+# Default to current API version
+#pylint: disable-msg=W0401
+from rpath_common.xmllib.api1 import *
+
+# Import the automatically-generated VERSION
+#pylint: disable-msg=W0212
+from rpath_common.xmllib.xmllib_constants import _VERSION as VERSION
diff -r 000000000000 -r aae7fb5993a6 rpath_common/xmllib/api1.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpath_common/xmllib/api1.py	Tue Apr 29 15:52:36 2008 -0400
@@ -0,0 +1,300 @@
+#
+# Copyright (c) 2008 rPath, Inc.
+#
+# This program is distributed under the terms of the Common Public License,
+# version 1.0. A copy of this license should have been distributed with this
+# source file in a file called LICENSE. If it is not present, the license
+# is always available at http://www.rpath.com/permanent/licenses/CPL-1.0.
+#
+# This program is distributed in the hope that it will be useful, but
+# without any warranty; without even the implied warranty of merchantability
+# or fitness for a particular purpose. See the Common Public License for
+# full details.
+#
+
+import StringIO
+import os
+import subprocess
+from xml import sax
+
+simpletypes = (int, long, float, bool, str, unicode, list, set, dict, tuple)
+
+from lxml import etree
+
+def prettyPrint(func):
+    def wrapper(*args, **kwargs):
+        res = func(*args, **kwargs)
+        # XXX: It is fairly inefficient to serialize an
+        # ElementTree-like object to XML, then parse it back into an
+        # lxml.etree.ElementTree object, then serialize it again just to
+        # pretty-print it. Maybe we whould just have _toXml write an
+        # ElementTree object to begin with?
+        tree = etree.parse(StringIO.StringIO(res))
+        res = etree.tostring(tree, pretty_print = True,
+            xml_declaration = True, encoding = 'UTF-8')
+    return wrapper
+
+class BaseNode(object):
+    """
+    Base node for all data classes used by SAX handler. Neither this class,
+    nor any descendent needs to be instantiated. They should be registered
+    with instances of the DataBinder class.
+
+    This class serves as the base datatype. This is the default node type
+    if nothing else is specified, thus it's not useful to register this
+    class.
+
+    By default, _addChild will add the childNode to a list. specifying an
+    attribute in _singleChildren will cause the value to be stored directly.
+    """
+    _singleChildren = []
+    _childOrder = []
+
+    def __init__(self):
+        self._text = ''
+
+    def _addChild(self, name, childNode):
+        # ensure we don't modify the class attribute
+        if id(self._childOrder) == id(self.__class__._childOrder):
+            self._childOrder = []
+        self._childOrder.append(name)
+        if name in self._singleChildren:
+            self.__dict__[name] = childNode._finalize()
+        else:
+            if name not in self.__dict__:
+                self.__dict__[name] = []
+            self.__dict__[name].append(childNode._finalize())
+
+    def _finalize(self):
+        return self
+
+    def _characters(self, ch):
+        self._text += ch
+
+class IntegerNode(BaseNode):
+    """
+    Integer data class for SAX parser.
+
+    Registering a tag with this class will render the text contents into
+    an integer when _finalize is called. All attributes and tags will be lost.
+    If no text is set, this object will default to 0.
+    """
+    def _finalize(self):
+        return self._text and int(self._text) or 0
+
+class StringNode(BaseNode):
+    """
+    String data class for SAX parser.
+
+    Registering a tag with this class will render the text contents into
+    a string when _finalize is called. All attributes and tags will be lost.
+    If no text is set, this object will default to ''.
+    """
+    def _finalize(self):
+        if isinstance(self._text, unicode):
+            return self._text
+        return str(self._text)
+
+class NullNode(BaseNode):
+    """
+    Null data class for SAX parser.
+
+    Registering a tag with this class will render the text contents into
+    None when _finalize is called. All attributes and tags will be lost.
+    All text will be lost.
+    """
+    def _finalize(self):
+        pass
+
+class BooleanNode(BaseNode):
+    """
+    Boolean data class for SAX parser.
+
+    Registering a tag with this class will render the text contents into
+    a bool when _finalize is called. All attributes and tags will be lost.
+    '1' or 'true' (case insensitive) will result in True.
+    """
+    def _finalize(self):
+        return self._text.upper().strip() in ('TRUE', '1')
+
+class DictNode(BaseNode):
+    """
+    Dict container class for SAX parser.
+
+    Registering a tag with this class will return the __dict__  of this class
+    when _finalize is called. This effectively means all tags will be
+    preserved, but all attributes will be lost.
+    """
+    def _finalize(self):
+        return dict(x for x in self.__dict__.iteritems() \
+                if not x[0].startswith('_'))
+
+class BindingHandler(sax.ContentHandler):
+    """
+    Sax Content handler class.
+
+    This class doesn't need to be instantiated directly. It will be invoked
+    on an as-needed basis by DataBinder. This class interfaces with the
+    Python builtin SAX parser and creates dynamic python objects based on
+    registered node classes. If no nodes are registered, a python object
+    structure that looks somewhat like a DOM tree will result.
+    """
+    def __init__(self, typeDict = None):
+        if not typeDict:
+            typeDict = {}
+        self.typeDict = typeDict
+        self.stack = []
+        self.rootNode = None
+        sax.ContentHandler.__init__(self)
+
+    def registerType(self, key, typeClass):
+        self.typeDict[key] = typeClass
+
+    def startElement(self, name, attrs):
+        classType = BaseNode
+        if name in self.typeDict:
+            classType = self.typeDict[name]
+        self.stack.append(type(str(name), (classType,), dict(attrs))())
+
+    def endElement(self, name):
+        elem = self.stack.pop()
+        if not self.stack:
+            self.rootNode = elem
+        else:
+            self.stack[-1]._addChild(name, elem)
+
+    def characters(self, ch):
+        elem = self.stack[-1]
+        elem._characters(ch)
+
+class DataBinder(object):
+    """
+    DataBinder class.
+
+    This class wraps all XML parsing logic in this module. As a rough rule
+    of thumb, attributes of an XML tag will be treated as class level
+    attributes, while subtags will populate an object's main dictionary.
+
+    parseFile: takes a a path and returns a python object.
+    parseString: takes a string containing XML data and returns a python
+        object.
+    registerType: register a tag with a class defining how to treat XML content.
+    toXml: takes an object and renders it into an XML representation.
+
+    EXAMPLE:
+    class ComplexType(BaseNode):
+        _singleChildren = ['foo', 'bar']
+
+    binder = DataBinder()
+    binder.registerType('foo', BooleanNode)
+    binder.registerType('bar', NullNode)
+    binder.registerType('baz', ComplexType)
+
+    obj = binder.parseString('<baz><foo>TRUE</foo><bar>test</bar></baz>')
+
+    obj.foo == True
+    obj.bar == 'test'
+
+    EXAMPLE:
+    binder = DataBinder()
+    class baz(object):
+        pass
+    obj = baz()
+    obj.foo = True
+    obj.bar = 'test'
+    binder.toXml(obj) == '<baz><foo>true</foo><bar>test</bar></baz>'
+    """
+    def __init__(self, typeDict = None):
+        self.contentHandler = BindingHandler(typeDict)
+
+    def registerType(self, key, val):
+        return self.contentHandler.registerType(key, val)
+
+    def parseFile(self, fn):
+        f = open(fn)
+        data = f.read()
+        f.close()
+        return self.parseString(data)
+
+    def parseString(self, data):
+        self.contentHandler.rootNode = None
+        parser = sax.make_parser()
+        parser.setContentHandler(self.contentHandler)
+        parser.parse(StringIO.StringIO(data))
+        rootNode = self.contentHandler.rootNode
+        self.contentHandler.rootNode = None
+        return rootNode
+
+    def _getChildOrder(self, items, order):
+        # sort key is a three part tuple. each element maps to these rules:
+        # element one reflects if we know how to order the element.
+        # element two reflects the element's position in the ordering.
+        # element three sorts everything else by simply providing the original
+        # item (aka. default ordering of sort)
+        return sorted(items, key = lambda x: \
+                (x not in order, x in order and order.index(x), x))
+
+    @staticmethod
+    def _etree_add(elem, obj):
+        if isinstance(obj, list):
+            elem.extend(obj)
+        else:
+            elem.append(obj)
+
+    def _to_etree_r(self, obj, suggestedName = None):
+        name = suggestedName or obj.__class__.__name__
+
+        elem = etree.Element(name)
+        if isinstance(obj, bool):
+            elem.text = (obj and 'true' or 'false')
+        elif isinstance(obj, (int, float, long)):
+            elem.text = str(obj)
+        elif isinstance(obj, (str, unicode)):
+            elem.text = obj
+        elif isinstance(obj, (list, set, tuple)):
+            elem = [ self._to_etree_r(child, suggestedName) for child in obj]
+        elif isinstance(obj, dict):
+            for childName, child in sorted(obj.iteritems()):
+                self._etree_add(elem, self._to_etree_r(child, suggestedName = childName))
+        else:
+            attrs = (x for x in obj.__class__.__dict__.iteritems() \
+                    if not x[0].startswith('_'))
+            attrs = dict((x, self._toString(y)) for x, y in attrs)
+            children = dict(x for x in obj.__dict__.iteritems() \
+                    if not x[0].startswith('_'))
+            elem.attrib.update(attrs)
+            ordering = hasattr(obj, '_childOrder') and obj._childOrder or []
+            childOrder = self._getChildOrder(children.keys(), ordering)
+            for key in childOrder:
+                val = children[key]
+                self._etree_add(elem, self._to_etree_r(val, key))
+            if hasattr(obj, '_text'):
+                if obj._text.strip():
+                    elem.text = obj._text
+        return elem
+
+    @staticmethod
+    def _toString(obj):
+        if isinstance(obj, (str, unicode)):
+            return obj
+        return str(obj)
+
+    def toXml(self, obj, suggestedName = None):
+        tree = self._to_etree_r(obj, suggestedName)
+        res = etree.tostring(tree, pretty_print = True,
+            xml_declaration = True, encoding = 'UTF-8')
+        return res
+
+    def _toXml(self, obj, suggestedName = None):
+        encoding = None
+        tree = self._to_etree_r(obj, suggestedName)
+        if isinstance(tree, list):
+            res = [ etree.tostring(x, pretty_print = False,
+                xml_declaration = False, encoding = encoding) for x in tree ]
+            res = ''.join(res)
+        else:
+            res = etree.tostring(tree, pretty_print = False,
+                xml_declaration = False, encoding = encoding)
+        return res
+
+
diff -r 000000000000 -r aae7fb5993a6 rpath_common/xmllib/xmllib_constants.py.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpath_common/xmllib/xmllib_constants.py.in	Tue Apr 29 15:52:36 2008 -0400
@@ -0,0 +1,24 @@
+#
+# Copyright (c) 2006-2008 rPath, Inc.
+#
+# This program is distributed under the terms of the Common Public License,
+# version 1.0. A copy of this license should have been distributed with this
+# source file in a file called LICENSE. If it is not present, the license
+# is always available at http://www.rpath.com/permanent/licenses/CPL-1.0.
+#
+# This program is distributed in the hope that it will be useful, but
+# without any warranty; without even the implied warranty of merchantability
+# or fitness for a particular purpose. See the Common Public License for
+# full details.
+#
+"""
+The rPath Product Definition API Constants definition
+
+The module data elements in this module are a private interface,
+available through the rpath_common.proddef module.
+@var _VERSION: rBuild version
+@type _VERSION: string
+"""
+
+# NOTE: constants.py is auto generated from constants.py.in
+_VERSION          = "0.1"        # proddef version

From johnsonm@rpath.com Tue Apr 29 20:18:20 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m3TKIKNh019929 for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 20:18:20 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m3TKIKLk007330
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 16:18:20 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m3TKIJwX000781
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 16:18:19 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m3TKIJqr013772
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 16:18:19 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m3TKIJm2013766
	for rpath-common-commits@lists.rpath.com;
	Tue, 29 Apr 2008 16:18:19 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200804292018.m3TKIJm2013766@scc.eng.rpath.com>
Date: Tue, 29 Apr 2008 16:18:19 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: fix README, pylint Makefile
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 29 Apr 2008 20:18:21 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       Make.defs README pylint/Makefile

fix README, pylint Makefile

diff -r aae7fb5993a6 -r d116b03f26cd Make.defs
--- a/Make.defs	Tue Apr 29 15:52:36 2008 -0400
+++ b/Make.defs	Tue Apr 29 16:18:18 2008 -0400
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2006-2007 rPath, Inc.
+# Copyright (c) 2006-2008 rPath, Inc.
 #
 # This program is distributed under the terms of the Common Public License,
 # version 1.0. A copy of this license should have been distributed with this
diff -r aae7fb5993a6 -r d116b03f26cd README
--- a/README	Tue Apr 29 15:52:36 2008 -0400
+++ b/README	Tue Apr 29 16:18:18 2008 -0400
@@ -1,6 +1,6 @@
 This is a component of the rpath_common set of modules.  It provides
-a stable interface for managing rPath product definition components
-as stored in rBuilder.
+a stable interface for for reading and writing rPath-generated XML
+files.
 
 Note that until version 1.0 is released, public APIs are subject to
 change.  All documentation regarding stable interfaces is relevant
diff -r aae7fb5993a6 -r d116b03f26cd pylint/Makefile
--- a/pylint/Makefile	Tue Apr 29 15:52:36 2008 -0400
+++ b/pylint/Makefile	Tue Apr 29 16:18:18 2008 -0400
@@ -14,7 +14,7 @@
 
 dist_files = init_pylint.py  Makefile  pylintrc  run_pylint
 
-all:
+all: pylint
 install:
 
 dist: default-dist

From misa@rpath.com Tue Apr 29 20:18:40 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m3TKIeSV019946 for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 20:18:40 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m3TKIdsB007362
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 16:18:40 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m3TKIdsr000814
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 16:18:39 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m3TKIdO4013871
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 16:18:39 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m3TKId2Y013866
	for rpath-common-commits@lists.rpath.com;
	Tue, 29 Apr 2008 16:18:39 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200804292018.m3TKId2Y013866@scc.eng.rpath.com>
Date: Tue, 29 Apr 2008 16:18:39 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Symlinking to get around module shadowing
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 29 Apr 2008 20:18:40 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       .hgignore pylint/Makefile pylint/init_pylint.py

Symlinking to get around module shadowing

diff -r 207fdd6ce3c4 -r b18ee1cbbbcb .hgignore
--- a/.hgignore	Tue Apr 29 15:26:25 2008 -0400
+++ b/.hgignore	Tue Apr 29 16:18:36 2008 -0400
@@ -7,4 +7,5 @@
 ^tmp/
 rpath_common/proddef/proddef_constants.pyc?$
 ^pylint/reports/
+^pylint/code-dir/
 ^rpath-common-.*.tar.bz2
diff -r 207fdd6ce3c4 -r b18ee1cbbbcb pylint/Makefile
--- a/pylint/Makefile	Tue Apr 29 15:26:25 2008 -0400
+++ b/pylint/Makefile	Tue Apr 29 16:18:36 2008 -0400
@@ -19,13 +19,25 @@
 
 dist: default-dist
 
-pylint:
+pylint: code-dir/rpath_common/__init__.py code-dir/rpath_common/proddef code-dir/rpath_common/xmllib
 	@echo running pylint...
 	@./run_pylint
 	@echo Done.  Error output is in the reports/ directory.
 
+code-dir/rpath_common/__init__.py: code-dir/rpath_common
+	@touch $@
+
+code-dir/rpath_common/proddef: code-dir/rpath_common
+	[ -h $@ ] || ln -s ../../../rpath_common/proddef $<
+
+code-dir/rpath_common/xmllib: code-dir/rpath_common
+	[ -n "$$XMLLIB_PATH" ] && [ -h code-dir/rpath_common/xmllib ] || ln -s $$XMLLIB_PATH/rpath_common/xmllib $<
+
+code-dir/rpath_common:
+	install -d -m755 $@
+
 clean:
-	rm -rf reports *,cover
+	rm -rf reports *,cover code-dir
 
 include ../Make.rules
 include ../Make.defs
diff -r 207fdd6ce3c4 -r b18ee1cbbbcb pylint/init_pylint.py
--- a/pylint/init_pylint.py	Tue Apr 29 15:26:25 2008 -0400
+++ b/pylint/init_pylint.py	Tue Apr 29 16:18:36 2008 -0400
@@ -15,7 +15,6 @@
 import os
 import sys
 sys.path.insert(0, os.environ['CONARY_PATH'])
-sys.path.insert(0, os.environ['PRODUCT_DEFINITION_PATH'])
-sys.path.insert(0, os.environ['XMLDATA_PATH'])
+sys.path.insert(0, os.path.abspath('../code-dir'))
 
 from rpath_common.proddef import api1

From misa@rpath.com Tue Apr 29 20:24:21 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m3TKOLJx020144 for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 20:24:21 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m3TKOKLV008220
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 16:24:21 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m3TKOKak001432
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 16:24:20 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m3TKOJCW014632
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 16:24:19 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m3TKOJ1D014628
	for rpath-common-commits@lists.rpath.com;
	Tue, 29 Apr 2008 16:24:19 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200804292024.m3TKOJ1D014628@scc.eng.rpath.com>
Date: Tue, 29 Apr 2008 16:24:19 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Added pylint-dirs
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 29 Apr 2008 20:24:21 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       pylint/Makefile

Added pylint-dirs

diff -r b18ee1cbbbcb -r 37b49afa3546 pylint/Makefile
--- a/pylint/Makefile	Tue Apr 29 16:18:36 2008 -0400
+++ b/pylint/Makefile	Tue Apr 29 16:24:17 2008 -0400
@@ -14,12 +14,14 @@
 
 dist_files = init_pylint.py  Makefile  pylintrc  run_pylint
 
-all:
+all: clean pylint-dirs
 install:
 
 dist: default-dist
 
-pylint: code-dir/rpath_common/__init__.py code-dir/rpath_common/proddef code-dir/rpath_common/xmllib
+pylint-dirs: code-dir/rpath_common/__init__.py code-dir/rpath_common/proddef code-dir/rpath_common/xmllib
+
+pylint: pylint-dirs
 	@echo running pylint...
 	@./run_pylint
 	@echo Done.  Error output is in the reports/ directory.

From misa@rpath.com Tue Apr 29 20:47:50 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m3TKlo6h021030 for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 20:47:50 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m3TKloR4011803
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 16:47:50 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m3TKlnEs003248
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 16:47:49 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m3TKlnQ6016990
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 29 Apr 2008 16:47:49 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m3TKln1d016985
	for rpath-common-commits@lists.rpath.com;
	Tue, 29 Apr 2008 16:47:49 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200804292047.m3TKln1d016985@scc.eng.rpath.com>
Date: Tue, 29 Apr 2008 16:47:49 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: make automatically runs pylint now, and it
	creates symlinks where appropriate
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 29 Apr 2008 20:47:50 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       .hgignore pylint/Makefile pylint/init_pylint.py rpath_common/Makefile

make automatically runs pylint now, and it creates symlinks where appropriate

diff -r 37b49afa3546 -r da09bd1ac02d .hgignore
--- a/.hgignore	Tue Apr 29 16:24:17 2008 -0400
+++ b/.hgignore	Tue Apr 29 16:47:32 2008 -0400
@@ -6,6 +6,6 @@
 .*\.so$
 ^tmp/
 rpath_common/proddef/proddef_constants.pyc?$
+rpath_common/xmllib/
 ^pylint/reports/
-^pylint/code-dir/
 ^rpath-common-.*.tar.bz2
diff -r 37b49afa3546 -r da09bd1ac02d pylint/Makefile
--- a/pylint/Makefile	Tue Apr 29 16:24:17 2008 -0400
+++ b/pylint/Makefile	Tue Apr 29 16:47:32 2008 -0400
@@ -14,32 +14,18 @@
 
 dist_files = init_pylint.py  Makefile  pylintrc  run_pylint
 
-all: clean pylint-dirs
+all: clean pylint
 install:
 
 dist: default-dist
 
-pylint-dirs: code-dir/rpath_common/__init__.py code-dir/rpath_common/proddef code-dir/rpath_common/xmllib
-
-pylint: pylint-dirs
+pylint:
 	@echo running pylint...
 	@./run_pylint
 	@echo Done.  Error output is in the reports/ directory.
 
-code-dir/rpath_common/__init__.py: code-dir/rpath_common
-	@touch $@
-
-code-dir/rpath_common/proddef: code-dir/rpath_common
-	[ -h $@ ] || ln -s ../../../rpath_common/proddef $<
-
-code-dir/rpath_common/xmllib: code-dir/rpath_common
-	[ -n "$$XMLLIB_PATH" ] && [ -h code-dir/rpath_common/xmllib ] || ln -s $$XMLLIB_PATH/rpath_common/xmllib $<
-
-code-dir/rpath_common:
-	install -d -m755 $@
-
 clean:
-	rm -rf reports *,cover code-dir
+	rm -rf reports *,cover
 
 include ../Make.rules
 include ../Make.defs
diff -r 37b49afa3546 -r da09bd1ac02d pylint/init_pylint.py
--- a/pylint/init_pylint.py	Tue Apr 29 16:24:17 2008 -0400
+++ b/pylint/init_pylint.py	Tue Apr 29 16:47:32 2008 -0400
@@ -15,6 +15,6 @@
 import os
 import sys
 sys.path.insert(0, os.environ['CONARY_PATH'])
-sys.path.insert(0, os.path.abspath('../code-dir'))
+sys.path.insert(0, os.path.abspath('../..'))
 
 from rpath_common.proddef import api1
diff -r 37b49afa3546 -r da09bd1ac02d rpath_common/Makefile
--- a/rpath_common/Makefile	Tue Apr 29 16:24:17 2008 -0400
+++ b/rpath_common/Makefile	Tue Apr 29 16:47:32 2008 -0400
@@ -16,17 +16,25 @@
 # to support testing out of the tree.  When distributed, this
 # file is provided by the rpath-common package instead.
 
-SUBDIRS=proddef
+SUBDIRS = proddef
+SYMLINKS = xmllib
 
 dist_files = Makefile __init__.py
 
-all: default-all default-subdirs
+all: default-all default-subdirs symlinks
 
 install: all default-install install-subdirs
 
 dist: default-dist
 
-clean: default-clean
+clean: default-clean symlink-clean
+
+symlink-clean:
+	@rm -f $(SYMLINKS)
+
+symlinks:
+	[ -z "$$XMLLIB_PATH" ] || [ -h xmllib ] || ln -s $$XMLLIB_PATH/rpath_common/xmllib .
+
 
 include ../Make.rules
 include ../Make.defs

From misa@rpath.com Wed Apr 30 18:11:02 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m3UIB27v016353 for <rpath-common-commits@lists.rpath.com>;
	Wed, 30 Apr 2008 18:11:02 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m3UIB1kw001158
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 30 Apr 2008 14:11:02 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m3UIB1Rf032008
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 30 Apr 2008 14:11:01 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m3UIB1UW031534
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 30 Apr 2008 14:11:01 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m3UIB1du031529
	for rpath-common-commits@lists.rpath.com;
	Wed, 30 Apr 2008 14:11:01 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200804301811.m3UIB1du031529@scc.eng.rpath.com>
Date: Wed, 30 Apr 2008 14:11:01 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Only expose public classes to __init__.py
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 30 Apr 2008 18:11:02 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Only expose public classes to __init__.py

diff -r da09bd1ac02d -r cc475dce1aa6 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Tue Apr 29 16:47:32 2008 -0400
+++ b/rpath_common/proddef/api1.py	Wed Apr 30 14:10:58 2008 -0400
@@ -17,6 +17,8 @@
 All interfaces in this modules that do not start with a C{_}
 character are public interfaces.
 """
+
+__all__ = [ 'ProductDefinition' ]
 
 from rpath_common.xmllib import api1 as xmllib
 

From misa@rpath.com Thu May  1 15:14:22 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m41FEMuF002356
	for <rpath-common-commits@lists.rpath.com>; Thu, 1 May 2008 15:14:22 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m41FELrA022071
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 1 May 2008 11:14:21 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m41FELN4019541
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 1 May 2008 11:14:21 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m41FELGv016308
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 1 May 2008 11:14:21 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m41FEK0d016274
	for rpath-common-commits@lists.rpath.com; Thu, 1 May 2008 11:14:20 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805011514.m41FEK0d016274@scc.eng.rpath.com>
Date: Thu, 01 May 2008 11:14:20 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: Adding namespaces
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 01 May 2008 15:14:22 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/xmllib/api1.py

Adding namespaces

diff -r d116b03f26cd -r caee3902fbdb rpath_common/xmllib/api1.py
--- a/rpath_common/xmllib/api1.py	Tue Apr 29 16:18:18 2008 -0400
+++ b/rpath_common/xmllib/api1.py	Wed Apr 30 14:46:53 2008 -0400
@@ -52,6 +52,8 @@
 
     def __init__(self):
         self._text = ''
+        self.namespaces = {}
+        self.inheritedNamespaces = {}
 
     def _addChild(self, name, childNode):
         # ensure we don't modify the class attribute
@@ -154,7 +156,25 @@
         classType = BaseNode
         if name in self.typeDict:
             classType = self.typeDict[name]
-        self.stack.append(type(str(name), (classType,), dict(attrs))())
+        # Extract namespace aliases
+        namespaces = {}
+        nonNsAttrs = {}
+        for k, v in attrs.items():
+            arr = k.split(':', 1)
+            if arr[0] != 'xmlns':
+                nonNsAttrs[k] = v
+                continue
+            if len(arr) == 1:
+                nsName = None
+            else:
+                nsName = arr[1]
+            namespaces[nsName] = v
+        inheritedNamespaces = (self.stack and self.stack[-1].namespaces.copy()
+                               or {})
+        newNode = type(str(name), (classType,), nonNsAttrs)()
+        newNode.namespaces = namespaces
+        newNode.inheritedNamespaces = inheritedNamespaces
+        self.stack.append(newNode)
 
     def endElement(self, name):
         elem = self.stack.pop()

From misa@rpath.com Thu May  1 15:14:23 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m41FENS7002359
	for <rpath-common-commits@lists.rpath.com>; Thu, 1 May 2008 15:14:23 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m41FEMxd022076
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 1 May 2008 11:14:23 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m41FEMiR019544
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 1 May 2008 11:14:22 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m41FEMgn016365
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 1 May 2008 11:14:22 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m41FEM58016350
	for rpath-common-commits@lists.rpath.com; Thu, 1 May 2008 11:14:22 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805011514.m41FEM58016350@scc.eng.rpath.com>
Date: Thu, 01 May 2008 11:14:22 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: Changed internal representation to be node-based as
	opposed to class-based
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 01 May 2008 15:14:23 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/xmllib/api1.py

Changed internal representation to be node-based as opposed to class-based

diff -r caee3902fbdb -r b762412dcaec rpath_common/xmllib/api1.py
--- a/rpath_common/xmllib/api1.py	Wed Apr 30 14:46:53 2008 -0400
+++ b/rpath_common/xmllib/api1.py	Wed Apr 30 22:49:08 2008 -0400
@@ -17,8 +17,6 @@
 import subprocess
 from xml import sax
 
-simpletypes = (int, long, float, bool, str, unicode, list, set, dict, tuple)
-
 from lxml import etree
 
 def prettyPrint(func):
@@ -34,7 +32,165 @@
             xml_declaration = True, encoding = 'UTF-8')
     return wrapper
 
-class BaseNode(object):
+class _AbstractNode(object):
+    __slots__ = ['_children', '_nsMap', '_name', '_nsAttributes',
+                 '_otherAttributes', ]
+    def __init__(self, attributes = None, nsMap = None, name = None):
+        self._children = []
+        self._nsMap = nsMap or {}
+        self._setAttributes(attributes)
+        if name is not None:
+            self.setName(name)
+
+    def setName(self, name):
+        nsName, tagName = splitNamespace(name)
+        if nsName is not None and nsName not in self._nsMap:
+            raise Exception("Reference to undefined namespace %s" % nsName)
+        self._name = (nsName, tagName)
+
+    def getName(self):
+        return unsplitNamespace(self._name[1], self._name[0])
+
+    def addChild(self, childNode):
+        # If the previous node in the list is character data, drop it, since
+        # we don't support mixed content
+        if self._children and isinstance(self._children[-1], unicode):
+            self._children[-1] = childNode.finalize()
+        else:
+            if childNode.getName() in getattr(self, '_singleChildren', []):
+                setattr(self, childNode.getName(), childNode.finalize())
+            else:
+                self._children.append(childNode.finalize())
+
+    def iterChildren(self):
+        if hasattr(self, '_childOrder'):
+            return orderItems(self._children, self._childOrder)
+        return iter(self._children)
+
+    def finalize(self):
+        return self
+
+    def characters(self, ch):
+        if self._children:
+            if isinstance(self._children[-1], unicode):
+                self._children[-1] += ch
+            # We don't support mixed contents, so don't bother adding
+            # characters after children
+        else:
+            self._children.append(ch)
+
+    def getNamespaceMap(self):
+        return self._nsMap.copy()
+
+    def iterAttributes(self):
+        for nsName, nsVal in sorted(self._nsAttributes.items()):
+            if nsName is None:
+                yield ('xmlns', nsVal)
+            else:
+                yield ('xmlns:%s' % nsName, nsVal)
+        for (nsName, attrName), attrVal in self._otherAttributes.items():
+            if nsName is None:
+                yield (attrName, attrVal)
+            else:
+                yield ("%s:%s" % (nsName, attrName), attrVal)
+
+    def getAttribute(self, name, namespace = None):
+        return self._otherAttributes.get((namespace, name))
+
+    def getChildren(self, name, namespace = None):
+        tagName = unsplitNamespace(name, namespace)
+        return [ x for x in self.iterChildren()
+            if hasattr(x, 'getName') and x.getName() == tagName ]
+
+    def getText(self):
+        text = [ x for x in self._children if isinstance(x, (str, unicode)) ]
+        if not text:
+            return ''
+        return text[0]
+
+    def getElementTree(self, parent = None):
+        if self._name[0] is None:
+            name = self._name[1]
+        else:
+            name = "{%s}%s" % (self._nsMap[self._name[0]], self._name[1])
+
+        attrs = {}
+        for (nsName, attrName), attrVal in self._otherAttributes.items():
+            attrName = self._buildElementTreeName(attrName, nsName)
+            attrs[attrName] = attrVal
+
+        if parent is None:
+            elem = etree.Element(name, attrs, self._nsAttributes)
+        else:
+            elem = etree.SubElement(parent, name, attrs, self._nsAttributes)
+        for child in self.iterChildren():
+            if hasattr(child, 'getElementTree'):
+                child.getElementTree(parent = elem)
+            elif isinstance(child, unicode):
+                elem.text = child
+            elif isinstance(child, tuple):
+                self._getElementTreeFromTuple(child, elem)
+            else:
+                # XXX
+                pass
+        return elem
+
+    def _getElementTreeFromTuple(self, child, parent = None):
+        nsName, tagName = splitNamespace(child[0])
+        elemName = self._buildElementTreeName(tagName, nsName)
+        if parent is None:
+            nelem = etree.Element(elemName)
+        else:
+            nelem = etree.SubElement(parent, elemName)
+        val = None
+        if isinstance(child[1], bool):
+            val = child[1] and 'true' or 'false'
+        elif isinstance(child[1], (str, unicode)):
+            val = child[1]
+        else:
+            val = str(child[1])
+        nelem.text = val
+
+    def _setAttributes(self, attributes):
+        self._nsAttributes = {}
+        self._otherAttributes = {}
+        if attributes is None:
+            return
+        nonNsAttr = []
+        for attrName, attrVal in attributes.items():
+            arr = attrName.split(':', 1)
+            if arr[0] != 'xmlns':
+                # Copy the tag aside, we may need to qualify it later
+                if len(arr) == 1:
+                    # No name space specified, use default
+                    attrKey = (None, attrName)
+                else:
+                    attrKey = tuple(arr)
+                nonNsAttr.append((attrKey, attrVal))
+                continue
+            if len(arr) == 1:
+                nsName = None
+            else:
+                nsName = arr[1]
+            self._nsMap[nsName] = attrVal
+            self._nsAttributes[nsName] = attrVal
+        # Now walk all attributes and qualify them with the namespace if
+        # necessary
+        for (nsName, attrName), attrVal in nonNsAttr:
+            if nsName is not None and nsName not in self._nsMap:
+                raise Exception("Reference to undefined namespace %s" % nsName)
+            self._otherAttributes[(nsName, attrName)] = attrVal
+
+    def _buildElementTreeName(self, name, namespace = None):
+        if namespace is None:
+            return name
+        return "{%s}%s" % (self._nsMap[namespace], name)
+
+
+class BaseNode(_AbstractNode):
+    pass
+
+class GenericNode(BaseNode):
     """
     Base node for all data classes used by SAX handler. Neither this class,
     nor any descendent needs to be instantiated. They should be registered
@@ -47,65 +203,46 @@
     By default, _addChild will add the childNode to a list. specifying an
     attribute in _singleChildren will cause the value to be stored directly.
     """
-    _singleChildren = []
-    _childOrder = []
 
-    def __init__(self):
-        self._text = ''
-        self.namespaces = {}
-        self.inheritedNamespaces = {}
-
-    def _addChild(self, name, childNode):
-        # ensure we don't modify the class attribute
-        if id(self._childOrder) == id(self.__class__._childOrder):
-            self._childOrder = []
-        self._childOrder.append(name)
-        if name in self._singleChildren:
-            self.__dict__[name] = childNode._finalize()
-        else:
-            if name not in self.__dict__:
-                self.__dict__[name] = []
-            self.__dict__[name].append(childNode._finalize())
-
-    def _finalize(self):
-        return self
-
-    def _characters(self, ch):
-        self._text += ch
+    def __init__(self, attributes = None, nsMap = None):
+        BaseNode.__init__(self, attributes = attributes, nsMap = nsMap)
 
 class IntegerNode(BaseNode):
     """
     Integer data class for SAX parser.
 
     Registering a tag with this class will render the text contents into
-    an integer when _finalize is called. All attributes and tags will be lost.
+    an integer when finalize is called. All attributes and tags will be lost.
     If no text is set, this object will default to 0.
     """
-    def _finalize(self):
-        return self._text and int(self._text) or 0
+    def finalize(self):
+        text = self.getText()
+        try:
+            return int(text)
+        except ValueError:
+            return 0
 
 class StringNode(BaseNode):
     """
     String data class for SAX parser.
 
     Registering a tag with this class will render the text contents into
-    a string when _finalize is called. All attributes and tags will be lost.
+    a string when finalize is called. All attributes and tags will be lost.
     If no text is set, this object will default to ''.
     """
-    def _finalize(self):
-        if isinstance(self._text, unicode):
-            return self._text
-        return str(self._text)
+    def finalize(self):
+        text = self.getText()
+        return text
 
 class NullNode(BaseNode):
     """
     Null data class for SAX parser.
 
     Registering a tag with this class will render the text contents into
-    None when _finalize is called. All attributes and tags will be lost.
+    None when finalize is called. All attributes and tags will be lost.
     All text will be lost.
     """
-    def _finalize(self):
+    def finalize(self):
         pass
 
 class BooleanNode(BaseNode):
@@ -113,21 +250,22 @@
     Boolean data class for SAX parser.
 
     Registering a tag with this class will render the text contents into
-    a bool when _finalize is called. All attributes and tags will be lost.
+    a bool when finalize is called. All attributes and tags will be lost.
     '1' or 'true' (case insensitive) will result in True.
     """
-    def _finalize(self):
-        return self._text.upper().strip() in ('TRUE', '1')
+    def finalize(self):
+        text = self.getText()
+        return text.strip().upper() in ('TRUE', '1')
 
 class DictNode(BaseNode):
     """
     Dict container class for SAX parser.
 
     Registering a tag with this class will return the __dict__  of this class
-    when _finalize is called. This effectively means all tags will be
+    when finalize is called. This effectively means all tags will be
     preserved, but all attributes will be lost.
     """
-    def _finalize(self):
+    def finalize(self):
         return dict(x for x in self.__dict__.iteritems() \
                 if not x[0].startswith('_'))
 
@@ -149,43 +287,39 @@
         self.rootNode = None
         sax.ContentHandler.__init__(self)
 
-    def registerType(self, key, typeClass):
-        self.typeDict[key] = typeClass
+    def registerType(self, typeClass, name = None, namespace = None):
+        if name is None:
+            name = typeClass.name
+        if namespace is None:
+            namespace = getattr(typeClass, 'namespace', None)
+
+        self.typeDict[(namespace, name)] = typeClass
 
     def startElement(self, name, attrs):
-        classType = BaseNode
-        if name in self.typeDict:
-            classType = self.typeDict[name]
-        # Extract namespace aliases
-        namespaces = {}
-        nonNsAttrs = {}
-        for k, v in attrs.items():
-            arr = k.split(':', 1)
-            if arr[0] != 'xmlns':
-                nonNsAttrs[k] = v
-                continue
-            if len(arr) == 1:
-                nsName = None
-            else:
-                nsName = arr[1]
-            namespaces[nsName] = v
-        inheritedNamespaces = (self.stack and self.stack[-1].namespaces.copy()
-                               or {})
-        newNode = type(str(name), (classType,), nonNsAttrs)()
-        newNode.namespaces = namespaces
-        newNode.inheritedNamespaces = inheritedNamespaces
+        classType = GenericNode
+        nameSpace, tagName = splitNamespace(name)
+        if (nameSpace, tagName) in self.typeDict:
+            classType = self.typeDict[(nameSpace, tagName)]
+
+        if self.stack:
+            nsMap = self.stack[-1].getNamespaceMap()
+        else:
+            nsMap = {}
+        newNode = classType(attrs, nsMap = nsMap)
+        newNode.setName(name)
         self.stack.append(newNode)
 
     def endElement(self, name):
         elem = self.stack.pop()
         if not self.stack:
-            self.rootNode = elem
+            self.rootNode = elem.finalize()
         else:
-            self.stack[-1]._addChild(name, elem)
+            self.stack[-1].addChild(elem)
 
     def characters(self, ch):
         elem = self.stack[-1]
-        elem._characters(ch)
+        elem.characters(ch)
+
 
 class DataBinder(object):
     """
@@ -227,32 +361,24 @@
     def __init__(self, typeDict = None):
         self.contentHandler = BindingHandler(typeDict)
 
-    def registerType(self, key, val):
-        return self.contentHandler.registerType(key, val)
-
-    def parseFile(self, fn):
-        f = open(fn)
-        data = f.read()
-        f.close()
-        return self.parseString(data)
+    def registerType(self, klass, name = None, namespace = None):
+        return self.contentHandler.registerType(klass, name = name,
+                                                namespace = namespace)
 
     def parseString(self, data):
+        stream = StringIO.StringIO(data)
+        return self.parseFile(stream)
+
+    def parseFile(self, stream):
+        if isinstance(stream, str):
+            stream = file(stream)
         self.contentHandler.rootNode = None
         parser = sax.make_parser()
         parser.setContentHandler(self.contentHandler)
-        parser.parse(StringIO.StringIO(data))
+        parser.parse(stream)
         rootNode = self.contentHandler.rootNode
         self.contentHandler.rootNode = None
         return rootNode
-
-    def _getChildOrder(self, items, order):
-        # sort key is a three part tuple. each element maps to these rules:
-        # element one reflects if we know how to order the element.
-        # element two reflects the element's position in the ordering.
-        # element three sorts everything else by simply providing the original
-        # item (aka. default ordering of sort)
-        return sorted(items, key = lambda x: \
-                (x not in order, x in order and order.index(x), x))
 
     @staticmethod
     def _etree_add(elem, obj):
@@ -277,20 +403,7 @@
             for childName, child in sorted(obj.iteritems()):
                 self._etree_add(elem, self._to_etree_r(child, suggestedName = childName))
         else:
-            attrs = (x for x in obj.__class__.__dict__.iteritems() \
-                    if not x[0].startswith('_'))
-            attrs = dict((x, self._toString(y)) for x, y in attrs)
-            children = dict(x for x in obj.__dict__.iteritems() \
-                    if not x[0].startswith('_'))
-            elem.attrib.update(attrs)
-            ordering = hasattr(obj, '_childOrder') and obj._childOrder or []
-            childOrder = self._getChildOrder(children.keys(), ordering)
-            for key in childOrder:
-                val = children[key]
-                self._etree_add(elem, self._to_etree_r(val, key))
-            if hasattr(obj, '_text'):
-                if obj._text.strip():
-                    elem.text = obj._text
+            elem = obj.getElementTree()
         return elem
 
     @staticmethod
@@ -317,4 +430,31 @@
                 xml_declaration = False, encoding = encoding)
         return res
 
+def splitNamespace(tag):
+    """Splits the namespace out of the tag.
+    @param tag: tag
+    @type tag: C{str}
+    @return: A tuple with the namespace (set to None if not present) and
+    the tag name.
+    @rtype: C{tuple} (namespace, tagName)
+    """
+    arr = tag.split(':', 1)
+    if len(arr) == 1:
+        return None, tag
+    return arr[0], arr[1]
 
+def unsplitNamespace(name, namespace = None):
+    if namespace is None:
+        return name
+    return "%s:%s" % (namespace, name)
+
+def orderItems(items, order):
+    # sort key is a three part tuple. each element maps to these rules:
+    # element one reflects if we know how to order the element.
+    # element two reflects the element's position in the ordering.
+    # element three sorts everything else by simply providing the original
+    # item (aka. default ordering of sort)
+    return sorted(items,
+        key = lambda x: (x.getName() not in order,
+                         x.getName() in order and order.index(x.getName()),
+                         x.getName()))

From misa@rpath.com Thu May  1 15:14:25 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m41FEPBQ002365
	for <rpath-common-commits@lists.rpath.com>; Thu, 1 May 2008 15:14:25 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m41FEPH2022084
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 1 May 2008 11:14:25 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m41FEPJI019550
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 1 May 2008 11:14:25 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m41FEOVg016428
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 1 May 2008 11:14:24 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m41FENBE016414
	for rpath-common-commits@lists.rpath.com; Thu, 1 May 2008 11:14:24 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805011514.m41FENBE016414@scc.eng.rpath.com>
Date: Thu, 01 May 2008 11:14:23 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: Changed internal representation to be node-based as
	opposed to class-based
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 01 May 2008 15:14:25 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/xmllib/api1.py

Changed internal representation to be node-based as opposed to class-based

diff -r b762412dcaec -r 76a778fe7f1e rpath_common/xmllib/api1.py
--- a/rpath_common/xmllib/api1.py	Wed Apr 30 22:49:08 2008 -0400
+++ b/rpath_common/xmllib/api1.py	Thu May 01 09:40:48 2008 -0400
@@ -19,18 +19,13 @@
 
 from lxml import etree
 
-def prettyPrint(func):
-    def wrapper(*args, **kwargs):
-        res = func(*args, **kwargs)
-        # XXX: It is fairly inefficient to serialize an
-        # ElementTree-like object to XML, then parse it back into an
-        # lxml.etree.ElementTree object, then serialize it again just to
-        # pretty-print it. Maybe we whould just have _toXml write an
-        # ElementTree object to begin with?
-        tree = etree.parse(StringIO.StringIO(res))
-        res = etree.tostring(tree, pretty_print = True,
-            xml_declaration = True, encoding = 'UTF-8')
-    return wrapper
+#{ Exception classes
+class XmlLibError(Exception):
+    "Top-level exception class"
+
+class UndefinedNamespaceError(XmlLibError):
+    "Raised when a reference to an undefined namespace is found"
+#}
 
 class _AbstractNode(object):
     __slots__ = ['_children', '_nsMap', '_name', '_nsAttributes',
@@ -45,11 +40,17 @@
     def setName(self, name):
         nsName, tagName = splitNamespace(name)
         if nsName is not None and nsName not in self._nsMap:
-            raise Exception("Reference to undefined namespace %s" % nsName)
+            raise UndefinedNamespaceError(nsName)
         self._name = (nsName, tagName)
 
     def getName(self):
         return unsplitNamespace(self._name[1], self._name[0])
+
+    def getAbsoluteName(self):
+        if self._name[0] is None and None not in self._nsMap:
+            # No default namespace provided
+            return self._name[1]
+        return "{%s}%s" % (self._nsMap[self._name[0]], self._name[1])
 
     def addChild(self, childNode):
         # If the previous node in the list is character data, drop it, since
@@ -178,7 +179,7 @@
         # necessary
         for (nsName, attrName), attrVal in nonNsAttr:
             if nsName is not None and nsName not in self._nsMap:
-                raise Exception("Reference to undefined namespace %s" % nsName)
+                raise UndefinedNamespaceError(nsName)
             self._otherAttributes[(nsName, attrName)] = attrVal
 
     def _buildElementTreeName(self, name, namespace = None):

From misa@rpath.com Thu May  1 22:00:06 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m41M06Vm009794
	for <rpath-common-commits@lists.rpath.com>; Thu, 1 May 2008 22:00:06 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m41M05ng018896
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 1 May 2008 18:00:05 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m41M05Kq020567
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 1 May 2008 18:00:05 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m41M05bN006294
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 1 May 2008 18:00:05 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m41M04OZ006268
	for rpath-common-commits@lists.rpath.com; Thu, 1 May 2008 18:00:04 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805012200.m41M04OZ006268@scc.eng.rpath.com>
Date: Thu, 01 May 2008 18:00:04 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Code to parse the XML for prod def
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 01 May 2008 22:00:06 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Code to parse the XML for prod def

diff -r cc475dce1aa6 -r 870a12c7338f rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Wed Apr 30 14:10:58 2008 -0400
+++ b/rpath_common/proddef/api1.py	Thu May 01 13:53:41 2008 -0400
@@ -20,39 +20,47 @@
 
 __all__ = [ 'ProductDefinition' ]
 
+import StringIO
+
 from rpath_common.xmllib import api1 as xmllib
+from rpath_common.proddef import _xmlConstants
+from rpath_common.proddef import _imageTypes
 
 class ProductDefinition(object):
     """
     Represents the definition of a product.
     """
-    def __init__(self, elementDict={}, xml=None):
+    defaultNamespace = _xmlConstants.defaultNamespace
+    xmlSchemaNamespace = _xmlConstants.xmlSchemaNamespace
+    xmlSchemaLocation = _xmlConstants.xmlSchemaLocation
+
+    def __init__(self, fromStream = None):
         """
         Pass in either a dictionary as constructed in the example below, or an
         xml string to create an instance.
         """
-        # Static text that needs to be at the beginning of our xml.
-        self.xml_header_tag = '<?xml version="1.0" encoding="UTF-8"?>'
 
-        self.elementDict = elementDict
+        self._initFields()
 
-        self.xmldb = xmllib.DataBinder()
-        self.xmldb.registerType('baseFlavor', xmllib.StringNode)
+        if fromStream:
+            if isinstance(fromStream, (str, unicode)):
+                fromStream = StringIO.StringIO(fromStream)
+            self.parseStream(fromStream)
 
-        if xml is None:
-            # No xml was passed in, create an empty object that we will build
-            # out later to represent the dict.
-            XmlObj = type('XmlObj', (object,), {})
-            XmlObj.__name__ = 'productDefinition'
-            self.xmlobj = XmlObj()
-            self._setFromDict()
-        else:
-            # Create the object from the passed in xml using our DataBinder.
-            self.xmlobj = self.xmldb.parseString(xml)
+    def parseStream(self, stream):
+        binder = xmllib.DataBinder()
+        binder.registerType(_ProductDefinition, 'productDefinition')
+        xmlObj = binder.parseFile(stream)
+        self.baseFlavor = getattr(xmlObj, 'baseFlavor', None)
+        self.stages = getattr(xmlObj, 'stages', [])
+        self.upstreamSources = getattr(xmlObj, 'upstreamSources', [])
+        self.buildDefinition = getattr(xmlObj, 'buildDefinition', [])
 
-        # A special attribute recognized by xmllib to preserve child order.
-        self.xmlobj._childOrder = ['baseFlavor', 'stages', 'upstreamSources',
-                                   'buildDefinition']
+    def _initFields(self):
+        self.baseFlavor = None
+        self.stages = []
+        self.upstreamSources = []
+        self.buildDefinition = []
 
     def _setFromDict(self):
         # Functions to call to set attributes on the root element.
@@ -177,35 +185,111 @@
             builds.append(buildData)                    
 
         return builds                               
-            
-    
-def cls(**kwargs):
-    """
-    Return a class instance that has a class attribute set for each key/value
-    pair in kwargs.  If one of the values in the kwargs is a dict itself, that
-    signifies a child element.  In that case, create an object for that
-    element using recursion and add the produced object to our instance's main
-    dictionary.
-    """
 
-    # Just an empty class on which to set attributes.
-    class Cls(object):
-        #pylint: disable-msg=R0903
-        pass
+#{ Objects for the representation of ProductDefinition fields
+class _Stage(object):
+    __slots__ = [ 'name', 'label' ]
 
-    # Empty dict to store attrs for our instance.
-    attrs = {}
+    def __init__(self, name = None, label = None):
+        self.name = name
+        self.label = label
 
-    for k, v in kwargs.items():
-        # If v is a dict, create an object for it.
-        if type(v) == type({}):
-            attrs[k] = [cls(**v)]
-        # Else, just set it as a class attribute on Cls
-        else:
-            setattr(Cls, k, v)
+class _UpstreamSource(object):
+    __slots__ = [ 'troveName', 'label' ]
 
-    # Instantiate our modified class and update it's internal dictionary to
-    # represent any child elements.
-    x = Cls()
-    x.__dict__.update(attrs)
-    return x
+    def __init__(self, troveName = None, label = None):
+        self.troveName = troveName
+        self.label = label
+
+class _BuildDefinition(object):
+    __slots__ = [ 'name', 'baseFlavor', 'imageType', 'byDefault' ]
+
+    def __init__(self, name = None, baseFlavor = None,
+                 imageType = None, byDefault = None):
+        self.name = name
+        self.baseFlavor = baseFlavor
+        self.imageType = imageType
+        if byDefault is None:
+            byDefault = True
+        self.byDefault = byDefault
+
+#}
+
+class _ProductDefinition(xmllib.BaseNode):
+    ndNameBaseFlavor = "{%s}%s" % (ProductDefinition.defaultNamespace,
+                                   'baseFlavor')
+    ndNameStages = "{%s}%s" % (ProductDefinition.defaultNamespace,
+                               'stages')
+    ndNameUpstreamSources = "{%s}%s" % (ProductDefinition.defaultNamespace,
+                                        'upstreamSources')
+    ndNameBuildDefinition = "{%s}%s" % (ProductDefinition.defaultNamespace,
+                                        'buildDefinition')
+
+    ndNameInstIso = "{%s}%s" % (ProductDefinition.defaultNamespace,
+                                'installbleIsoImage')
+
+    ndNameRawFs = "{%s}%s" % (ProductDefinition.defaultNamespace,
+                             'rawFsImage')
+    ndNameRawHd = "{%s}%s" % (ProductDefinition.defaultNamespace,
+                             'rawHdImage')
+
+
+    def addChild(self, childNode):
+        chName = childNode.getAbsoluteName()
+        if chName == self.ndNameBaseFlavor:
+            self.baseFlavor = childNode.getText()
+            return
+
+        if chName == self.ndNameStages:
+            children = childNode.getChildren('stage')
+            self._addStages(children)
+            return
+
+        if chName == self.ndNameUpstreamSources:
+            children = childNode.getChildren('upstreamSource')
+            self._addUpstreamSources(children)
+            return
+
+        if chName == self.ndNameBuildDefinition:
+            children = childNode.getChildren('build')
+            self._addBuildDefinition(children)
+            return
+
+    def _addStages(self, stagesNodes):
+        stages = self.stages = []
+        for node in stagesNodes:
+            # XXX getAttribute should be getAbsoluteAttribute
+            pyObj = _Stage(name = node.getAttribute('name'),
+                           label = node.getAttribute('label'))
+            stages.append(pyObj)
+
+    def _addUpstreamSources(self, upstreamSources):
+        sources = self.upstreamSources = []
+        for node in upstreamSources:
+            pyObj = _UpstreamSource(
+                troveName = node.getAttribute('troveName'),
+                label = node.getAttribute('label'))
+            sources.append(pyObj)
+
+    def _addBuildDefinition(self, buildNodes):
+        builds = self.buildDefinition = []
+        for node in buildNodes:
+            imgType = None
+            for subNode in node.iterChildren():
+                if not isinstance(subNode, xmllib.BaseNode):
+                    continue
+                imgType = _imageTypes.ImageType_Dispatcher.dispatch(subNode)
+                if imgType is not None:
+                    break
+            if imgType is None:
+                raise Exception("")
+            byDefault = node.getAttribute('byDefault')
+            if byDefault is None:
+                byDefault = True
+            else:
+                byDefault = byDefault.upper() in ['TRUE', 1] and True or False
+            pyobj = _BuildDefinition(
+                baseFlavor = node.getAttribute('baseFlavor'),
+                byDefault = byDefault,
+                imageType = imgType)
+            builds.append(pyobj)

From misa@rpath.com Thu May  1 22:00:06 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m41M06wv009797
	for <rpath-common-commits@lists.rpath.com>; Thu, 1 May 2008 22:00:06 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m41M06hj018907
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 1 May 2008 18:00:06 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m41M06VU020571
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 1 May 2008 18:00:06 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m41M05rl006339
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 1 May 2008 18:00:05 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m41M05ee006327
	for rpath-common-commits@lists.rpath.com; Thu, 1 May 2008 18:00:05 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805012200.m41M05ee006327@scc.eng.rpath.com>
Date: Thu, 01 May 2008 18:00:05 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Additional files for handling image types
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 01 May 2008 22:00:07 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/_imageTypes.py rpath_common/proddef/_xmlConstants.py

Additional files for handling image types

diff -r 870a12c7338f -r fc3d9625aa59 rpath_common/proddef/_imageTypes.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpath_common/proddef/_imageTypes.py	Thu May 01 14:09:56 2008 -0400
@@ -0,0 +1,146 @@
+#
+# Copyright (c) 2008 rPath, Inc.
+#
+# This program is distributed under the terms of the Common Public License,
+# version 1.0. A copy of this license should have been distributed with this
+# source file in a file called LICENSE. If it is not present, the license
+# is always available at http://www.rpath.com/permanent/licenses/CPL-1.0.
+#
+# This program is distributed in the hope that it will be useful, but
+# without any warranty; without even the implied warranty of merchantability
+# or fitness for a particular purpose. See the Common Public License for
+# full details.
+#
+"""
+Private interface.
+"""
+
+from rpath_common.proddef import _xmlConstants
+
+class ImageType_Dispatcher(object):
+    _dispatcher = {}
+
+    @classmethod
+    def addImageType(kls, imageType):
+        key = "{%s}%s" % (imageType._defaultNamespace, imageType.tag)
+        kls._dispatcher[key] = imageType
+
+    @classmethod
+    def dispatch(kls, node):
+        absName = node.getAbsoluteName()
+        if absName not in kls._dispatcher:
+            return None
+        nodeClass = kls._dispatcher.get(absName)
+
+        fields = {}
+        for attrName, values in nodeClass._attributes.items():
+            attrType = values[0]
+            val = node.getAttribute(attrName)
+            if val is None:
+                continue
+            if attrType == bool:
+                val = (val.strip().upper() in ["TRUE", "1"] and True) or False
+            elif attrType == int:
+                val = int(val)
+            fields[attrName] = val
+        obj = nodeClass(fields)
+        return obj
+
+#{ Image Type Classes
+class ImageType_Base(object):
+    _defaultNamespace = _xmlConstants.defaultNamespace
+
+    _attributes = {
+        'name'              : (str, ),
+        'autoResolve'       : (bool, ),
+        'baseFileName'      : (str, ),
+        'installLabelPath'  : (str, ),
+    }
+
+    def __init__(self, fields):
+        self.fields = fields
+
+class ImageType_AMI(ImageType_Base):
+    tag = "amiImage"
+    _attributes = ImageType_Base._attributes.copy()
+    _attributes.update({
+        'amiHugeDiskMountpoint'     : (str, ),
+        'freespace'                 : (int, ),
+    })
+
+class ImageType_InstallableISO(ImageType_Base):
+    tag = "installableIsoImage"
+    _attributes = ImageType_Base._attributes.copy()
+    _attributes.update({
+        'maxIsoSize'                : (int, ),
+        'bugsUrl'                   : (str, ),
+        'showMediaCheck'            : (bool, ),
+        'betaNag'                   : (bool, ),
+        'mediaTemplateTrove'        : (str, ),
+        'anacondaCustomTrove'       : (str, ),
+        'anacondaTemplatesTrove'    : (str, ),
+    })
+
+class ImageType_LiveIso(ImageType_Base):
+    tag = "liveIsoImage"
+    _attributes = ImageType_Base._attributes.copy()
+    _attributes.update({
+    })
+
+class ImageType_Netboot(ImageType_Base):
+    tag = "netbootImage"
+    _attributes = ImageType_Base._attributes.copy()
+    _attributes.update({
+    })
+
+class ImageType_RawFs(ImageType_Base):
+    tag = "rawFsImage"
+    _attributes = ImageType_Base._attributes.copy()
+    _attributes.update({
+    })
+
+class ImageType_RawHd(ImageType_Base):
+    tag = "rawHdImage"
+    _attributes = ImageType_Base._attributes.copy()
+    _attributes.update({
+        'swapSize'          : (int, ),
+        'freespace'         : (int, ),
+    })
+
+class ImageType_Tarball(ImageType_Base):
+    tag = "tarballImage"
+    _attributes = ImageType_Base._attributes.copy()
+    _attributes.update({
+    })
+
+class ImageType_UpdateIso(ImageType_Base):
+    tag = "updateIsoImage"
+    _attributes = ImageType_Base._attributes.copy()
+    _attributes.update({
+    })
+
+class ImageType_VHD(ImageType_Base):
+    tag = "vhdImage"
+    _attributes = ImageType_Base._attributes.copy()
+    _attributes.update({
+    })
+
+class ImageType_VMWare(ImageType_Base):
+    tag = "vmwareImage"
+    _attributes = ImageType_Base._attributes.copy()
+    _attributes.update({
+    })
+
+class ImageType_VMWareEsx(ImageType_Base):
+    tag = "vmwareEsxImage"
+    _attributes = ImageType_Base._attributes.copy()
+    _attributes.update({
+    })
+#}
+
+# Globally register all image types defined in this module
+for symVal in globals().values():
+    if not isinstance(symVal, type):
+        continue
+    if issubclass(symVal, ImageType_Base) and symVal != ImageType_Base:
+        ImageType_Dispatcher.addImageType(symVal)
diff -r 870a12c7338f -r fc3d9625aa59 rpath_common/proddef/_xmlConstants.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpath_common/proddef/_xmlConstants.py	Thu May 01 14:09:56 2008 -0400
@@ -0,0 +1,22 @@
+#
+# Copyright (c) 2006-2008 rPath, Inc.
+#
+# This program is distributed under the terms of the Common Public License,
+# version 1.0. A copy of this license should have been distributed with this
+# source file in a file called LICENSE. If it is not present, the license
+# is always available at http://www.rpath.com/permanent/licenses/CPL-1.0.
+#
+# This program is distributed in the hope that it will be useful, but
+# without any warranty; without even the implied warranty of merchantability
+# or fitness for a particular purpose. See the Common Public License for
+# full details.
+#
+"""
+@var defaultNamespace: Default namespace
+@var xmlSchemaNamespace: XML Schema namespace
+@var xmlSchemaLocation: XML Schema location
+"""
+
+defaultNamespace = "http://www.rpath.com/permanent/rpd.xsd"
+xmlSchemaNamespace = "http://www.w3.org/2001/XMLSchema-instance"
+xmlSchemaLocation = "http://www.rpath.com/permanent/pd.xsd pd.xsd"

From misa@rpath.com Thu May  1 22:00:12 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m41M0Cqc009806
	for <rpath-common-commits@lists.rpath.com>; Thu, 1 May 2008 22:00:12 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m41M0Cxb018916
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 1 May 2008 18:00:12 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m41M0BAO020579
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 1 May 2008 18:00:11 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m41M0Bco006457
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 1 May 2008 18:00:11 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m41M0Bee006441
	for rpath-common-commits@lists.rpath.com; Thu, 1 May 2008 18:00:11 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805012200.m41M0Bee006441@scc.eng.rpath.com>
Date: Thu, 01 May 2008 18:00:10 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Fixed .hgignore to ignore xmllib
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 01 May 2008 22:00:13 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       .hgignore

Fixed .hgignore to ignore xmllib

diff -r fc3d9625aa59 -r f2be095456a9 .hgignore
--- a/.hgignore	Thu May 01 14:09:56 2008 -0400
+++ b/.hgignore	Thu May 01 14:10:25 2008 -0400
@@ -6,6 +6,6 @@
 .*\.so$
 ^tmp/
 rpath_common/proddef/proddef_constants.pyc?$
-rpath_common/xmllib/
+rpath_common/xmllib
 ^pylint/reports/
 ^rpath-common-.*.tar.bz2

From misa@rpath.com Thu May  1 22:00:13 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m41M0D7l009809
	for <rpath-common-commits@lists.rpath.com>; Thu, 1 May 2008 22:00:13 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m41M0DQV018919
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 1 May 2008 18:00:13 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m41M0C9o020582
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 1 May 2008 18:00:12 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m41M0CVX006495
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 1 May 2008 18:00:12 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m41M0CQd006484
	for rpath-common-commits@lists.rpath.com; Thu, 1 May 2008 18:00:12 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805012200.m41M0CQd006484@scc.eng.rpath.com>
Date: Thu, 01 May 2008 18:00:12 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: Object serialization made simpler
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 01 May 2008 22:00:13 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/xmllib/api1.py

Object serialization made simpler

diff -r 76a778fe7f1e -r 4954ac4a5633 rpath_common/xmllib/api1.py
--- a/rpath_common/xmllib/api1.py	Thu May 01 09:40:48 2008 -0400
+++ b/rpath_common/xmllib/api1.py	Thu May 01 17:58:43 2008 -0400
@@ -26,6 +26,40 @@
 class UndefinedNamespaceError(XmlLibError):
     "Raised when a reference to an undefined namespace is found"
 #}
+
+class SerializableObject(object):
+    def getElementTree(self, parent = None):
+        name = self._getName()
+
+        attrs = {}
+        for attrName, attrVal in self._iterAttributes():
+            if isinstance(attrVal, bool):
+                attrVal = attrVal and "true" or "false"
+            elif not isinstance(attrVal, (str, unicode)):
+                attrVal = str(attrVal)
+            attrs[attrName] = attrVal
+
+        localNamespaces = self._getLocalNamespaces()
+
+        elem = createElementTree(name, attrs, localNamespaces, parent = parent)
+        for child in self._iterChildren():
+            if hasattr(child, 'getElementTree'):
+                child.getElementTree(parent = elem)
+            elif isinstance(child, (str, unicode)):
+                elem.text = child
+        return elem
+
+    def _getName(self):
+        raise NotImplementedError()
+
+    def _getLocalNamespaces(self):
+        raise NotImplementedError()
+
+    def _iterAttributes(self):
+        raise NotImplementedError()
+
+    def _iterChildren(self):
+        raise NotImplementedError()
 
 class _AbstractNode(object):
     __slots__ = ['_children', '_nsMap', '_name', '_nsAttributes',
@@ -120,14 +154,12 @@
             attrName = self._buildElementTreeName(attrName, nsName)
             attrs[attrName] = attrVal
 
-        if parent is None:
-            elem = etree.Element(name, attrs, self._nsAttributes)
-        else:
-            elem = etree.SubElement(parent, name, attrs, self._nsAttributes)
+        elem = createElementTree(name, attrs, self._nsAttributes,
+                                 parent = parent)
         for child in self.iterChildren():
             if hasattr(child, 'getElementTree'):
                 child.getElementTree(parent = elem)
-            elif isinstance(child, unicode):
+            elif isinstance(child, (str, unicode)):
                 elem.text = child
             elif isinstance(child, tuple):
                 self._getElementTreeFromTuple(child, elem)
@@ -139,10 +171,7 @@
     def _getElementTreeFromTuple(self, child, parent = None):
         nsName, tagName = splitNamespace(child[0])
         elemName = self._buildElementTreeName(tagName, nsName)
-        if parent is None:
-            nelem = etree.Element(elemName)
-        else:
-            nelem = etree.SubElement(parent, elemName)
+        nelem = createElementTree(elemName, {}, parent = parent)
         val = None
         if isinstance(child[1], bool):
             val = child[1] and 'true' or 'false'
@@ -222,6 +251,9 @@
             return int(text)
         except ValueError:
             return 0
+
+class TextNode(BaseNode):
+    pass
 
 class StringNode(BaseNode):
     """
@@ -459,3 +491,12 @@
         key = lambda x: (x.getName() not in order,
                          x.getName() in order and order.index(x.getName()),
                          x.getName()))
+
+def createElementTree(name, attrs, nsMap = None, parent = None):
+    if nsMap is None:
+        nsMap = {}
+    if parent is not None:
+        elem = etree.SubElement(parent, name, attrs, nsMap)
+    else:
+        elem = etree.Element(name, attrs, nsMap)
+    return elem

From misa@rpath.com Thu May  1 22:00:15 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m41M0FvO009818
	for <rpath-common-commits@lists.rpath.com>; Thu, 1 May 2008 22:00:15 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m41M0FlF018929
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 1 May 2008 18:00:15 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m41M0E7J020590
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 1 May 2008 18:00:15 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m41M0EJN006560
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 1 May 2008 18:00:14 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m41M0EWM006540
	for rpath-common-commits@lists.rpath.com; Thu, 1 May 2008 18:00:14 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805012200.m41M0EWM006540@scc.eng.rpath.com>
Date: Thu, 01 May 2008 18:00:13 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Serialization
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 01 May 2008 22:00:15 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/_imageTypes.py rpath_common/proddef/api1.py

Serialization

diff -r f2be095456a9 -r 2339181cc38f rpath_common/proddef/_imageTypes.py
--- a/rpath_common/proddef/_imageTypes.py	Thu May 01 14:10:25 2008 -0400
+++ b/rpath_common/proddef/_imageTypes.py	Thu May 01 17:59:15 2008 -0400
@@ -15,6 +15,7 @@
 Private interface.
 """
 
+from rpath_common import xmllib
 from rpath_common.proddef import _xmlConstants
 
 class ImageType_Dispatcher(object):
@@ -47,7 +48,7 @@
         return obj
 
 #{ Image Type Classes
-class ImageType_Base(object):
+class ImageType_Base(xmllib.SerializableObject):
     _defaultNamespace = _xmlConstants.defaultNamespace
 
     _attributes = {
@@ -59,6 +60,19 @@
 
     def __init__(self, fields):
         self.fields = fields
+
+    def _getName(self):
+        return self.tag
+
+    def _getLocalNamespaces(self):
+        return {}
+
+    def _iterAttributes(self):
+        return self.fields.iteritems()
+
+    def _iterChildren(self):
+        return []
+
 
 class ImageType_AMI(ImageType_Base):
     tag = "amiImage"
@@ -85,6 +99,8 @@
     tag = "liveIsoImage"
     _attributes = ImageType_Base._attributes.copy()
     _attributes.update({
+        'unionfs'                   : (bool, ),
+        'zisofs'                    : (bool, ),
     })
 
 class ImageType_Netboot(ImageType_Base):
@@ -97,6 +113,8 @@
     tag = "rawFsImage"
     _attributes = ImageType_Base._attributes.copy()
     _attributes.update({
+        'swapSize'          : (int, ),
+        'freespace'         : (int, ),
     })
 
 class ImageType_RawHd(ImageType_Base):
@@ -111,30 +129,45 @@
     tag = "tarballImage"
     _attributes = ImageType_Base._attributes.copy()
     _attributes.update({
+        'swapSize'          : (int, ),
     })
 
 class ImageType_UpdateIso(ImageType_Base):
     tag = "updateIsoImage"
-    _attributes = ImageType_Base._attributes.copy()
-    _attributes.update({
-    })
+    # No inheritance
+    _attributes = {
+        'baseFileName'          : (str, ),
+        'mediaTemplateTrove'    : (str, ),
+    }
 
 class ImageType_VHD(ImageType_Base):
     tag = "vhdImage"
     _attributes = ImageType_Base._attributes.copy()
     _attributes.update({
+        'swapSize'          : (int, ),
+        'freespace'         : (int, ),
+        'vhdDiskType'       : (str, ),
     })
 
 class ImageType_VMWare(ImageType_Base):
     tag = "vmwareImage"
     _attributes = ImageType_Base._attributes.copy()
     _attributes.update({
+        'swapSize'          : (int, ),
+        'freespace'         : (int, ),
+        'natNetworking'     : (bool, ),
+        'diskAdapter'       : (str, ),
+        'vmSnapshots'       : (bool, ),
+        'vmMemory'          : (int, ),
     })
 
 class ImageType_VMWareEsx(ImageType_Base):
     tag = "vmwareEsxImage"
     _attributes = ImageType_Base._attributes.copy()
     _attributes.update({
+        'swapSize'          : (int, ),
+        'freespace'         : (int, ),
+        'natNetworking'     : (bool, ),
     })
 #}
 
diff -r f2be095456a9 -r 2339181cc38f rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Thu May 01 14:10:25 2008 -0400
+++ b/rpath_common/proddef/api1.py	Thu May 01 17:59:15 2008 -0400
@@ -30,6 +30,7 @@
     """
     Represents the definition of a product.
     """
+    version = '1.0'
     defaultNamespace = _xmlConstants.defaultNamespace
     xmlSchemaNamespace = _xmlConstants.xmlSchemaNamespace
     xmlSchemaLocation = _xmlConstants.xmlSchemaLocation
@@ -48,19 +49,69 @@
             self.parseStream(fromStream)
 
     def parseStream(self, stream):
+        self._initFields()
         binder = xmllib.DataBinder()
         binder.registerType(_ProductDefinition, 'productDefinition')
         xmlObj = binder.parseFile(stream)
         self.baseFlavor = getattr(xmlObj, 'baseFlavor', None)
-        self.stages = getattr(xmlObj, 'stages', [])
-        self.upstreamSources = getattr(xmlObj, 'upstreamSources', [])
-        self.buildDefinition = getattr(xmlObj, 'buildDefinition', [])
+        self.stages.extend(getattr(xmlObj, 'stages', []))
+        self.upstreamSources.extend(getattr(xmlObj, 'upstreamSources', []))
+        self.buildDefinition.extend(getattr(xmlObj, 'buildDefinition', []))
+
+    def serialize(self, stream):
+        """Serialize the current object"""
+        baseFlavor = xmllib.TextNode(name = 'baseFlavor')
+        baseFlavor.characters(self.baseFlavor)
+        class N(xmllib.BaseNode):
+            def iterChildren(slf):
+                return [ baseFlavor,
+                         self.stages,
+                         self.upstreamSources,
+                         self.buildDefinition ]
+        attrs = {'version' : ProductDefinition.version,
+                 'xmlns' : ProductDefinition.defaultNamespace,
+                 'xmlns:xsi' : ProductDefinition.xmlSchemaNamespace,
+                 "xsi:schemaLocation" : ProductDefinition.xmlSchemaLocation,
+        }
+        nameSpaces = {}
+        n = N(attrs, nameSpaces, name = "productDefinition")
+        binder = xmllib.DataBinder()
+        stream.write(binder.toXml(n))
+
+    def getBaseFlavor(self):
+        return self.baseFlavor
+
+    def setBaseFlavor(self, baseFlavor):
+        self.baseFlavor = baseFlavor
+
+    def getStages(self):
+        return self.stages
+
+    def addStage(self, name = None, label = None):
+        obj = _Stage(name = name, label = label)
+        self.stages.append(obj)
+
+    def getUpstreamSources(self):
+        return self.upstreamSources
+
+    def addUpstreamSource(self, troveName = None, label = None):
+        obj = _UpstreamSource(troveName = troveName, label = label)
+        self.upstreamSources.append(obj)
+
+    def getBuildDefinitions(self):
+        return self.buildDefinition
+
+    def addBuildDefinition(self, name = None, baseFlavor = None,
+                           byDefault = None, imageType = None):
+        obj = _Build(name = name, baseFlavor = baseFlavor,
+                               byDefault = byDefault, imageType = imageType)
+        self.buildDefinition.append(obj)
 
     def _initFields(self):
         self.baseFlavor = None
-        self.stages = []
-        self.upstreamSources = []
-        self.buildDefinition = []
+        self.stages = _Stages()
+        self.upstreamSources = _UpstreamSources()
+        self.buildDefinition = _BuildDefinition()
 
     def _setFromDict(self):
         # Functions to call to set attributes on the root element.
@@ -128,81 +179,65 @@
     def toXml(self):
         return self.xmldb.toXml(self.xmlobj, 'productDefinition')
 
-    def setXmlObj(self, xmlobj):
-        self.xmlobj = xmlobj
+#{ Objects for the representation of ProductDefinition fields
+class _List(list):
+    def getElementTree(self, parent = None):
+        elem = xmllib.createElementTree(self.tag, {}, {}, parent = parent)
+        for child in self:
+            child.getElementTree(parent = elem)
 
-    def setStages(self, stages):
-        elementObject = self._genElemObj(stages)
-        self._setElemObj('stages', 'stage', elementObject)
+class _Stages(_List):
+    tag = "stages"
 
-    def getStages(self): 
-        stages = []
-        for stage in getattr(self.xmlobj.stages[0], 'stage', []):
-            stages.append(dict(name=stage.name, label=stage.label))
-        return stages
+class _UpstreamSources(_List):
+    tag = "upstreamSources"
 
-    def setUpstreamSources(self, sources):
-        elementObject = self._genElemObj(sources)
-        self._setElemObj('upstreamSources', 'upstreamSource', elementObject)
+class _BuildDefinition(_List):
+    tag = "buildDefinition"
 
-    def getUpstreamSources(self):
-        upstreamSources = []
-        for source in getattr(self.xmlobj.upstreamSources[0],
-                'upstreamSource', []):
-            upstreamSources.append(dict(troveName=source.troveName,
-                                        label=source.label))
-        return upstreamSources
+class _SerializableObject(xmllib.SerializableObject):
+    def _getName(self):
+        return self.tag
 
-    def setBaseFlavor(self, baseFlavor):
-        self.xmlobj.baseFlavor = [baseFlavor]
+    def _getLocalNamespaces(self):
+        return {}
 
-    def getBaseFlavor(self):
-        return self.xmlobj.baseFlavor[0]
+    def _iterAttributes(self):
+        return self._splitData()[0].items()
 
-    def setBuildDefinition(self, builddef):
-        elementObject = self._genElemObj(builddef)
-        self._setElemObj('buildDefinition', 'build', elementObject)
+    def _iterChildren(self):
+        return self._splitData()[1]
 
-    def getBuildDefinition(self):
-        builds = []
-        for build in getattr(self.xmlobj.buildDefinition[0], 'build', []):
-            buildData = {}
-            for key in dir(build):
-                if key.startswith('_'):
-                    continue
-                value = getattr(build, key)
-                if type(value) == type([]):
-                    buildDataValue = {}
-                    for k in dir(value[0]):
-                        if k.startswith('_'):
-                            continue
-                        else:
-                            buildDataValue[k] = getattr(value[0], k)
-                    buildData[key] = buildDataValue
-                else:
-                    buildData[key] = value
+    def _splitData(self):
+        attrs = {}
+        children = []
+        for fName in self.__slots__:
+            fVal = getattr(self, fName)
+            if isinstance(fVal, (bool, int, str, unicode)):
+                attrs[fName] = fVal
+            else:
+                children.append(fVal)
+        return attrs, children
 
-            builds.append(buildData)                    
-
-        return builds                               
-
-#{ Objects for the representation of ProductDefinition fields
-class _Stage(object):
+class _Stage(_SerializableObject):
     __slots__ = [ 'name', 'label' ]
+    tag = "stage"
 
     def __init__(self, name = None, label = None):
         self.name = name
         self.label = label
 
-class _UpstreamSource(object):
+class _UpstreamSource(_SerializableObject):
     __slots__ = [ 'troveName', 'label' ]
+    tag = "upstreamSource"
 
     def __init__(self, troveName = None, label = None):
         self.troveName = troveName
         self.label = label
 
-class _BuildDefinition(object):
+class _Build(_SerializableObject):
     __slots__ = [ 'name', 'baseFlavor', 'imageType', 'byDefault' ]
+    tag = "build"
 
     def __init__(self, name = None, baseFlavor = None,
                  imageType = None, byDefault = None):
@@ -212,6 +247,9 @@
         if byDefault is None:
             byDefault = True
         self.byDefault = byDefault
+
+    def _iterChildren(self):
+        yield self.imageType
 
 #}
 
@@ -288,7 +326,7 @@
                 byDefault = True
             else:
                 byDefault = byDefault.upper() in ['TRUE', 1] and True or False
-            pyobj = _BuildDefinition(
+            pyobj = _Build(
                 baseFlavor = node.getAttribute('baseFlavor'),
                 byDefault = byDefault,
                 imageType = imgType)

From misa@rpath.com Fri May  2 14:18:41 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m42EIfhg023198
	for <rpath-common-commits@lists.rpath.com>; Fri, 2 May 2008 14:18:41 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m42EIfMd004689
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 May 2008 10:18:41 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m42EIfqS015778
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 May 2008 10:18:41 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m42EIeAk001169
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 May 2008 10:18:40 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m42EIeBH001162
	for rpath-common-commits@lists.rpath.com; Fri, 2 May 2008 10:18:40 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805021418.m42EIeBH001162@scc.eng.rpath.com>
Date: Fri, 02 May 2008 10:18:40 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Moved more code into xmllib
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 02 May 2008 14:18:42 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Moved more code into xmllib

diff -r d4b8da7ae9e6 -r 7a83a5ee2e0d rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Thu May 01 17:59:56 2008 -0400
+++ b/rpath_common/proddef/api1.py	Thu May 01 22:38:16 2008 -0400
@@ -180,46 +180,17 @@
         return self.xmldb.toXml(self.xmlobj, 'productDefinition')
 
 #{ Objects for the representation of ProductDefinition fields
-class _List(list):
-    def getElementTree(self, parent = None):
-        elem = xmllib.createElementTree(self.tag, {}, {}, parent = parent)
-        for child in self:
-            child.getElementTree(parent = elem)
 
-class _Stages(_List):
+class _Stages(xmllib.SerializableList):
     tag = "stages"
 
-class _UpstreamSources(_List):
+class _UpstreamSources(xmllib.SerializableList):
     tag = "upstreamSources"
 
-class _BuildDefinition(_List):
+class _BuildDefinition(xmllib.SerializableList):
     tag = "buildDefinition"
 
-class _SerializableObject(xmllib.SerializableObject):
-    def _getName(self):
-        return self.tag
-
-    def _getLocalNamespaces(self):
-        return {}
-
-    def _iterAttributes(self):
-        return self._splitData()[0].items()
-
-    def _iterChildren(self):
-        return self._splitData()[1]
-
-    def _splitData(self):
-        attrs = {}
-        children = []
-        for fName in self.__slots__:
-            fVal = getattr(self, fName)
-            if isinstance(fVal, (bool, int, str, unicode)):
-                attrs[fName] = fVal
-            else:
-                children.append(fVal)
-        return attrs, children
-
-class _Stage(_SerializableObject):
+class _Stage(xmllib.SlotBasedSerializableObject):
     __slots__ = [ 'name', 'label' ]
     tag = "stage"
 
@@ -227,7 +198,7 @@
         self.name = name
         self.label = label
 
-class _UpstreamSource(_SerializableObject):
+class _UpstreamSource(xmllib.SlotBasedSerializableObject):
     __slots__ = [ 'troveName', 'label' ]
     tag = "upstreamSource"
 
@@ -235,7 +206,7 @@
         self.troveName = troveName
         self.label = label
 
-class _Build(_SerializableObject):
+class _Build(xmllib.SlotBasedSerializableObject):
     __slots__ = [ 'name', 'baseFlavor', 'imageType', 'byDefault' ]
     tag = "build"
 
@@ -325,7 +296,7 @@
             if byDefault is None:
                 byDefault = True
             else:
-                byDefault = byDefault.upper() in ['TRUE', 1] and True or False
+                byDefault = xmllib.BooleanNode.fromString(byDefault)
             pyobj = _Build(
                 baseFlavor = node.getAttribute('baseFlavor'),
                 byDefault = byDefault,

From misa@rpath.com Fri May  2 14:18:42 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m42EIfq7023199
	for <rpath-common-commits@lists.rpath.com>; Fri, 2 May 2008 14:18:41 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m42EIfhq004690
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 May 2008 10:18:41 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m42EIfAQ015779
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 May 2008 10:18:41 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m42EIegn001172
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 May 2008 10:18:40 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m42EIevg001158
	for rpath-common-commits@lists.rpath.com; Fri, 2 May 2008 10:18:40 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805021418.m42EIevg001158@scc.eng.rpath.com>
Date: Fri, 02 May 2008 10:18:40 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: Moved more code from proddef into xmllib; got rid
	of some obsolete tuple-encoding code;
	added a convenient method to TextNode
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 02 May 2008 14:18:42 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/xmllib/api1.py

Moved more code from proddef into xmllib; got rid of some obsolete tuple-encoding code; added a convenient method to TextNode

diff -r 4954ac4a5633 -r d4c7f8e362ed rpath_common/xmllib/api1.py
--- a/rpath_common/xmllib/api1.py	Thu May 01 17:58:43 2008 -0400
+++ b/rpath_common/xmllib/api1.py	Thu May 01 22:39:38 2008 -0400
@@ -34,7 +34,7 @@
         attrs = {}
         for attrName, attrVal in self._iterAttributes():
             if isinstance(attrVal, bool):
-                attrVal = attrVal and "true" or "false"
+                attrVal = BooleanNode.toString(attrVal)
             elif not isinstance(attrVal, (str, unicode)):
                 attrVal = str(attrVal)
             attrs[attrName] = attrVal
@@ -61,7 +61,7 @@
     def _iterChildren(self):
         raise NotImplementedError()
 
-class _AbstractNode(object):
+class _AbstractNode(SerializableObject):
     __slots__ = ['_children', '_nsMap', '_name', '_nsAttributes',
                  '_otherAttributes', ]
     def __init__(self, attributes = None, nsMap = None, name = None):
@@ -113,6 +113,7 @@
             # characters after children
         else:
             self._children.append(ch)
+        return self
 
     def getNamespaceMap(self):
         return self._nsMap.copy()
@@ -143,43 +144,23 @@
             return ''
         return text[0]
 
-    def getElementTree(self, parent = None):
+    #{ Methods for serializing Node objects
+    def _getName(self):
         if self._name[0] is None:
-            name = self._name[1]
-        else:
-            name = "{%s}%s" % (self._nsMap[self._name[0]], self._name[1])
+            return self._name[1]
+        return "{%s}%s" % (self._nsMap[self._name[0]], self._name[1])
 
-        attrs = {}
+    def _getLocalNamespaces(self):
+        return self._nsAttributes
+
+    def _iterAttributes(self):
         for (nsName, attrName), attrVal in self._otherAttributes.items():
             attrName = self._buildElementTreeName(attrName, nsName)
-            attrs[attrName] = attrVal
+            yield (attrName, attrVal)
 
-        elem = createElementTree(name, attrs, self._nsAttributes,
-                                 parent = parent)
-        for child in self.iterChildren():
-            if hasattr(child, 'getElementTree'):
-                child.getElementTree(parent = elem)
-            elif isinstance(child, (str, unicode)):
-                elem.text = child
-            elif isinstance(child, tuple):
-                self._getElementTreeFromTuple(child, elem)
-            else:
-                # XXX
-                pass
-        return elem
-
-    def _getElementTreeFromTuple(self, child, parent = None):
-        nsName, tagName = splitNamespace(child[0])
-        elemName = self._buildElementTreeName(tagName, nsName)
-        nelem = createElementTree(elemName, {}, parent = parent)
-        val = None
-        if isinstance(child[1], bool):
-            val = child[1] and 'true' or 'false'
-        elif isinstance(child[1], (str, unicode)):
-            val = child[1]
-        else:
-            val = str(child[1])
-        nelem.text = val
+    def _iterChildren(self):
+        return self.iterChildren()
+    #}
 
     def _setAttributes(self, attributes):
         self._nsAttributes = {}
@@ -253,7 +234,47 @@
             return 0
 
 class TextNode(BaseNode):
-    pass
+    """A node containing just test. Useful for representing elements with
+    character data in them"""
+
+class SerializableList(list):
+    def getElementTree(self, parent = None):
+        elem = createElementTree(self._getName(), {}, {}, parent = parent)
+        for child in self:
+            child.getElementTree(parent = elem)
+        return elem
+
+    def _getName(self):
+        return self.tag
+
+class SlotBasedSerializableObject(SerializableObject):
+    def _getName(self):
+        return self.tag
+
+    def _getLocalNamespaces(self):
+        return {}
+
+    def _iterAttributes(self):
+        return self._splitData()[0].items()
+
+    def _iterChildren(self):
+        return self._splitData()[1]
+
+    def _splitData(self):
+        attrs = {}
+        children = []
+        for fName in self.__slots__:
+            fVal = getattr(self, fName)
+            if isinstance(fVal, (bool, int, str, unicode)):
+                attrs[fName] = fVal
+            elif fVal is None:
+                # Skip None values
+                continue
+            else:
+                if not hasattr(fVal, "getElementTree"):
+                    raise XmlLibError("Expected an object implementing getElementTree")
+                children.append(fVal)
+        return attrs, children
 
 class StringNode(BaseNode):
     """
@@ -288,7 +309,16 @@
     """
     def finalize(self):
         text = self.getText()
-        return text.strip().upper() in ('TRUE', '1')
+        return self.fromString(text)
+
+    @staticmethod
+    def fromString(stringVal):
+        return stringVal.strip().upper() in ('TRUE', '1')
+
+    @staticmethod
+    def toString(boolVal):
+        return boolVal and "true" or "false"
+
 
 class DictNode(BaseNode):
     """
@@ -424,7 +454,9 @@
         name = suggestedName or obj.__class__.__name__
 
         elem = etree.Element(name)
-        if isinstance(obj, bool):
+        if hasattr(obj, 'getElementTree'):
+            elem = obj.getElementTree()
+        elif isinstance(obj, bool):
             elem.text = (obj and 'true' or 'false')
         elif isinstance(obj, (int, float, long)):
             elem.text = str(obj)
@@ -436,7 +468,8 @@
             for childName, child in sorted(obj.iteritems()):
                 self._etree_add(elem, self._to_etree_r(child, suggestedName = childName))
         else:
-            elem = obj.getElementTree()
+            # Not sure what to do
+            pass
         return elem
 
     @staticmethod

From misa@rpath.com Fri May  2 14:58:51 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m42EwprI023951
	for <rpath-common-commits@lists.rpath.com>; Fri, 2 May 2008 14:58:51 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m42EwpiA009796
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 May 2008 10:58:51 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m42Ewo7Z018268
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 May 2008 10:58:50 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m42EwoJq002861
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 May 2008 10:58:50 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m42Ewo30002856
	for rpath-common-commits@lists.rpath.com; Fri, 2 May 2008 10:58:50 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805021458.m42Ewo30002856@scc.eng.rpath.com>
Date: Fri, 02 May 2008 10:58:50 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Renamed namespaces
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 02 May 2008 14:58:51 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/_xmlConstants.py

Renamed namespaces

diff -r 7a83a5ee2e0d -r 509b013b31b0 rpath_common/proddef/_xmlConstants.py
--- a/rpath_common/proddef/_xmlConstants.py	Thu May 01 22:38:16 2008 -0400
+++ b/rpath_common/proddef/_xmlConstants.py	Fri May 02 10:58:46 2008 -0400
@@ -19,4 +19,4 @@
 
 defaultNamespace = "http://www.rpath.com/permanent/rpd.xsd"
 xmlSchemaNamespace = "http://www.w3.org/2001/XMLSchema-instance"
-xmlSchemaLocation = "http://www.rpath.com/permanent/pd.xsd pd.xsd"
+xmlSchemaLocation = "http://www.rpath.com/permanent/rpd-1.0.xsd rpd-1.0.xsd"

From johnsonm@rpath.com Fri May  2 15:52:35 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m42FqZJS025127
	for <rpath-common-commits@lists.rpath.com>; Fri, 2 May 2008 15:52:35 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m42FqZiI015033
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 May 2008 11:52:35 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m42FqYNw022023
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 May 2008 11:52:34 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m42FqYb8005055
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 May 2008 11:52:34 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m42FqYTq005050
	for rpath-common-commits@lists.rpath.com; Fri, 2 May 2008 11:52:34 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200805021552.m42FqYTq005050@scc.eng.rpath.com>
Date: Fri, 02 May 2008 11:52:34 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: version the schema more thoroughly
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 02 May 2008 15:52:35 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       rpath_common/proddef/_xmlConstants.py

version the schema more thoroughly

diff -r 509b013b31b0 -r 7023476eb6a0 rpath_common/proddef/_xmlConstants.py
--- a/rpath_common/proddef/_xmlConstants.py	Fri May 02 10:58:46 2008 -0400
+++ b/rpath_common/proddef/_xmlConstants.py	Fri May 02 11:52:31 2008 -0400
@@ -17,6 +17,6 @@
 @var xmlSchemaLocation: XML Schema location
 """
 
-defaultNamespace = "http://www.rpath.com/permanent/rpd.xsd"
+defaultNamespace = "http://www.rpath.com/permanent/rpd-1.0.xsd"
 xmlSchemaNamespace = "http://www.w3.org/2001/XMLSchema-instance"
 xmlSchemaLocation = "http://www.rpath.com/permanent/rpd-1.0.xsd rpd-1.0.xsd"

From johnsonm@rpath.com Fri May  2 15:56:00 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m42Fu0v3025191
	for <rpath-common-commits@lists.rpath.com>; Fri, 2 May 2008 15:56:00 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m42Fu0rw015329
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 May 2008 11:56:00 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m42FtxJc022273
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 May 2008 11:55:59 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m42Ftx22005312
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 May 2008 11:55:59 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m42FtxTr005307
	for rpath-common-commits@lists.rpath.com; Fri, 2 May 2008 11:55:59 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200805021555.m42FtxTr005307@scc.eng.rpath.com>
Date: Fri, 02 May 2008 11:55:59 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: have run_pylint call correct api
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 02 May 2008 15:56:00 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       pylint/run_pylint

have run_pylint call correct api

diff -r d4c7f8e362ed -r 730938bba416 pylint/run_pylint
--- a/pylint/run_pylint	Thu May 01 22:39:38 2008 -0400
+++ b/pylint/run_pylint	Fri May 02 11:55:57 2008 -0400
@@ -6,7 +6,7 @@
 cp init_pylint.py reports
 cd reports
 
-pylint --init-hook='import sys, os; sys.path.append("."); import init_pylint' --rcfile='../pylintrc' ../../rpath_common/proddef/api1.py;
+pylint --init-hook='import sys, os; sys.path.append("."); import init_pylint' --rcfile='../pylintrc' ../../rpath_common/xmllib/api1.py;
 rm init_pylint*;
 for file in $(ls); do
    if [ ! -s $file ]; then

From misa@rpath.com Fri May  2 16:00:41 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m42G0fN9025257
	for <rpath-common-commits@lists.rpath.com>; Fri, 2 May 2008 16:00:41 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m42G0fJM015791
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 May 2008 12:00:41 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m42G0e8c022551
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 May 2008 12:00:40 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m42G0e4j005580
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 May 2008 12:00:40 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m42G0e2Y005575
	for rpath-common-commits@lists.rpath.com; Fri, 2 May 2008 12:00:40 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805021600.m42G0e2Y005575@scc.eng.rpath.com>
Date: Fri, 02 May 2008 12:00:40 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Unused functions
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 02 May 2008 16:00:41 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Unused functions

diff -r 7023476eb6a0 -r f7b18723a563 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Fri May 02 11:52:31 2008 -0400
+++ b/rpath_common/proddef/api1.py	Fri May 02 12:00:38 2008 -0400
@@ -159,26 +159,6 @@
         setattr(e, name, elementObject)
         setattr(self.xmlobj, elem, [e])
 
-    @staticmethod
-    def _genElemObj(elementList):        
-        """
-        Create an object (using the cls helper function) that has elements set
-        as attributes and xml attributes set as class attributes for each item
-        in elementList.  Returns the list of objects.
-        """
-        elementObjList = []
-
-        # For each item in that list, we expect a dict representing the
-        # attributes (or possible more child elements).
-        for element in elementList:
-            # Append an object created from the element dict to elementObjList.
-            elementObjList.append(cls(**element))
-
-        return elementObjList
-
-    def toXml(self):
-        return self.xmldb.toXml(self.xmlobj, 'productDefinition')
-
 #{ Objects for the representation of ProductDefinition fields
 
 class _Stages(xmllib.SerializableList):

From misa@rpath.com Fri May  2 17:50:53 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m42HoqRT027161
	for <rpath-common-commits@lists.rpath.com>; Fri, 2 May 2008 17:50:52 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m42HoqAo030917
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 May 2008 13:50:52 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m42HoqV2030032
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 May 2008 13:50:52 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m42HopUV009462
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 May 2008 13:50:51 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m42Hop2C009441
	for rpath-common-commits@lists.rpath.com; Fri, 2 May 2008 13:50:51 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805021750.m42Hop2C009441@scc.eng.rpath.com>
Date: Fri, 02 May 2008 13:50:51 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: Removed unneeded methods
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 02 May 2008 17:50:53 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/xmllib/api1.py

Removed unneeded methods

diff -r d4c7f8e362ed -r 26b715733fec rpath_common/xmllib/api1.py
--- a/rpath_common/xmllib/api1.py	Thu May 01 22:39:38 2008 -0400
+++ b/rpath_common/xmllib/api1.py	Fri May 02 13:48:42 2008 -0400
@@ -76,6 +76,7 @@
         if nsName is not None and nsName not in self._nsMap:
             raise UndefinedNamespaceError(nsName)
         self._name = (nsName, tagName)
+        return self
 
     def getName(self):
         return unsplitNamespace(self._name[1], self._name[0])
@@ -226,6 +227,8 @@
     an integer when finalize is called. All attributes and tags will be lost.
     If no text is set, this object will default to 0.
     """
+    _name = (None, 'int')
+
     def finalize(self):
         text = self.getText()
         try:
@@ -233,9 +236,8 @@
         except ValueError:
             return 0
 
-class TextNode(BaseNode):
-    """A node containing just test. Useful for representing elements with
-    character data in them"""
+    def _iterChildren(self):
+        yield str(self.finalize())
 
 class SerializableList(list):
     def getElementTree(self, parent = None):
@@ -284,9 +286,14 @@
     a string when finalize is called. All attributes and tags will be lost.
     If no text is set, this object will default to ''.
     """
+    _name = (None, 'string')
+
     def finalize(self):
         text = self.getText()
         return text
+
+    def _iterChildren(self):
+        yield self.finalize()
 
 class NullNode(BaseNode):
     """
@@ -296,8 +303,13 @@
     None when finalize is called. All attributes and tags will be lost.
     All text will be lost.
     """
+    _name = (None, 'none')
+
     def finalize(self):
         pass
+
+    def _iterChildren(self):
+        return []
 
 class BooleanNode(BaseNode):
     """
@@ -307,6 +319,8 @@
     a bool when finalize is called. All attributes and tags will be lost.
     '1' or 'true' (case insensitive) will result in True.
     """
+    _name = (None, 'bool')
+
     def finalize(self):
         text = self.getText()
         return self.fromString(text)
@@ -319,18 +333,8 @@
     def toString(boolVal):
         return boolVal and "true" or "false"
 
-
-class DictNode(BaseNode):
-    """
-    Dict container class for SAX parser.
-
-    Registering a tag with this class will return the __dict__  of this class
-    when finalize is called. This effectively means all tags will be
-    preserved, but all attributes will be lost.
-    """
-    def finalize(self):
-        return dict(x for x in self.__dict__.iteritems() \
-                if not x[0].startswith('_'))
+    def _iterChildren(self):
+        yield self.toString(self.finalize())
 
 class BindingHandler(sax.ContentHandler):
     """
@@ -443,57 +447,10 @@
         self.contentHandler.rootNode = None
         return rootNode
 
-    @staticmethod
-    def _etree_add(elem, obj):
-        if isinstance(obj, list):
-            elem.extend(obj)
-        else:
-            elem.append(obj)
-
-    def _to_etree_r(self, obj, suggestedName = None):
-        name = suggestedName or obj.__class__.__name__
-
-        elem = etree.Element(name)
-        if hasattr(obj, 'getElementTree'):
-            elem = obj.getElementTree()
-        elif isinstance(obj, bool):
-            elem.text = (obj and 'true' or 'false')
-        elif isinstance(obj, (int, float, long)):
-            elem.text = str(obj)
-        elif isinstance(obj, (str, unicode)):
-            elem.text = obj
-        elif isinstance(obj, (list, set, tuple)):
-            elem = [ self._to_etree_r(child, suggestedName) for child in obj]
-        elif isinstance(obj, dict):
-            for childName, child in sorted(obj.iteritems()):
-                self._etree_add(elem, self._to_etree_r(child, suggestedName = childName))
-        else:
-            # Not sure what to do
-            pass
-        return elem
-
-    @staticmethod
-    def _toString(obj):
-        if isinstance(obj, (str, unicode)):
-            return obj
-        return str(obj)
-
-    def toXml(self, obj, suggestedName = None):
-        tree = self._to_etree_r(obj, suggestedName)
-        res = etree.tostring(tree, pretty_print = True,
+    def toXml(self, obj, prettyPrint = True):
+        tree = obj.getElementTree()
+        res = etree.tostring(tree, pretty_print = prettyPrint,
             xml_declaration = True, encoding = 'UTF-8')
-        return res
-
-    def _toXml(self, obj, suggestedName = None):
-        encoding = None
-        tree = self._to_etree_r(obj, suggestedName)
-        if isinstance(tree, list):
-            res = [ etree.tostring(x, pretty_print = False,
-                xml_declaration = False, encoding = encoding) for x in tree ]
-            res = ''.join(res)
-        else:
-            res = etree.tostring(tree, pretty_print = False,
-                xml_declaration = False, encoding = encoding)
         return res
 
 def splitNamespace(tag):

From misa@rpath.com Fri May  2 18:51:57 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m42IpvXX028228
	for <rpath-common-commits@lists.rpath.com>; Fri, 2 May 2008 18:51:57 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m42IpvXV003534
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 May 2008 14:51:57 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m42IpvW5002005
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 May 2008 14:51:57 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m42Ipuph015422
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 May 2008 14:51:56 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m42Ipunn015417
	for rpath-common-commits@lists.rpath.com; Fri, 2 May 2008 14:51:56 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805021851.m42Ipunn015417@scc.eng.rpath.com>
Date: Fri, 02 May 2008 14:51:56 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Getting rid of the TextNode
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 02 May 2008 18:51:58 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Getting rid of the TextNode

diff -r f7b18723a563 -r d7bd973196d1 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Fri May 02 12:00:38 2008 -0400
+++ b/rpath_common/proddef/api1.py	Fri May 02 14:51:46 2008 -0400
@@ -60,7 +60,7 @@
 
     def serialize(self, stream):
         """Serialize the current object"""
-        baseFlavor = xmllib.TextNode(name = 'baseFlavor')
+        baseFlavor = xmllib.StringNode(name = 'baseFlavor')
         baseFlavor.characters(self.baseFlavor)
         class N(xmllib.BaseNode):
             def iterChildren(slf):

From misa@rpath.com Mon May  5 15:48:18 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m45FmItw032454
	for <rpath-common-commits@lists.rpath.com>; Mon, 5 May 2008 15:48:18 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m45FmIE4007675
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 5 May 2008 11:48:18 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m45FmH3s031133
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 5 May 2008 11:48:18 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m45FmHHw011660
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 5 May 2008 11:48:17 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m45FmH1o011655
	for rpath-common-commits@lists.rpath.com; Mon, 5 May 2008 11:48:17 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805051548.m45FmH1o011655@scc.eng.rpath.com>
Date: Mon, 05 May 2008 11:48:17 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-common: Converted to hg archive
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 05 May 2008 15:48:18 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       Makefile

Converted to hg archive

diff -r 9a44e39c249c -r 26478c21e1e9 Makefile
--- a/Makefile	Tue Apr 29 12:09:47 2008 -0400
+++ b/Makefile	Mon May 05 11:41:39 2008 -0400
@@ -15,20 +15,9 @@
 all: default-subdirs default-all
 
 export TOPDIR = $(shell pwd)
-export DISTDIR = $(TOPDIR)/rbuild-$(VERSION)
+export DISTDIR = $(TOPDIR)/rpath-common-$(VERSION)
 
-SUBDIRS=rpath_common xsd doc
-
-extra_files = \
-	Make.rules 		\
-	Makefile		\
-	Make.defs		\
-	NEWS			\
-	README			\
-	EULA_product_common.txt		\
-	LICENSE
-
-dist_files = $(extra_files)
+SUBDIRS=rpath_common pylint
 
 .PHONY: clean dist install subdirs
 
@@ -46,15 +35,8 @@
 	$(MAKE) forcedist
 
 
-archive: $(dist_files)
-	rm -rf $(DISTDIR)
-	mkdir $(DISTDIR)
-	for d in $(SUBDIRS); do make -C $$d DIR=$$d dist || exit 1; done
-	for f in $(dist_files); do \
-		mkdir -p $(DISTDIR)/`dirname $$f`; \
-		cp -a $$f $(DISTDIR)/$$f; \
-	done; \
-	tar cjf $(DISTDIR).tar.bz2 `basename $(DISTDIR)`
+archive:
+	hg --config 'ui.archivemeta=False' archive --exclude .hgignore -t tbz2 $(DISTDIR).tar.bz2
 
 forcedist: archive
 
@@ -62,6 +44,7 @@
 	hg tag -f rbuild-$(VERSION)
 
 clean: clean-subdirs default-clean
+	@rm -rf $(DISTDIR).tar.bz2
 
 include Make.rules
 include Make.defs

From misa@rpath.com Mon May  5 16:32:33 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m45GWXKq001312
	for <rpath-common-commits@lists.rpath.com>; Mon, 5 May 2008 16:32:33 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m45GWXJb015357
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 5 May 2008 12:32:33 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m45GWWLh001090
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 5 May 2008 12:32:32 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m45GWW9m013640
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 5 May 2008 12:32:32 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m45GWWmN013635
	for rpath-common-commits@lists.rpath.com; Mon, 5 May 2008 12:32:32 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805051632.m45GWWmN013635@scc.eng.rpath.com>
Date: Mon, 05 May 2008 12:32:32 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-common: No need for pylint
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 05 May 2008 16:32:33 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       Makefile

No need for pylint

diff -r 26478c21e1e9 -r 0f4232b8e3e1 Makefile
--- a/Makefile	Mon May 05 11:41:39 2008 -0400
+++ b/Makefile	Mon May 05 12:31:56 2008 -0400
@@ -17,7 +17,7 @@
 export TOPDIR = $(shell pwd)
 export DISTDIR = $(TOPDIR)/rpath-common-$(VERSION)
 
-SUBDIRS=rpath_common pylint
+SUBDIRS=rpath_common
 
 .PHONY: clean dist install subdirs
 

From misa@rpath.com Tue May  6 13:27:16 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m46DRGbw021926
	for <rpath-common-commits@lists.rpath.com>; Tue, 6 May 2008 13:27:16 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m46DRGcm012773
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 09:27:16 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m46DRFsv013267
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 09:27:15 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m46DRFN5003432
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 09:27:15 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m46DRFjh003404
	for rpath-common-commits@lists.rpath.com; Tue, 6 May 2008 09:27:15 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805061327.m46DRFjh003404@scc.eng.rpath.com>
Date: Tue, 06 May 2008 09:27:14 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: Updated documentation; added
	getAttributeByNamespace and iterNamespaces
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 06 May 2008 13:27:16 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/xmllib/__init__.py rpath_common/xmllib/api1.py

Updated documentation; added getAttributeByNamespace and iterNamespaces

diff -r 4a439a94a085 -r e3b5883ca34c rpath_common/xmllib/__init__.py
--- a/rpath_common/xmllib/__init__.py	Fri May 02 13:50:49 2008 -0400
+++ b/rpath_common/xmllib/__init__.py	Fri May 02 23:18:35 2008 -0400
@@ -27,9 +27,12 @@
 If the C{VERSION} starts with C{0.}, none of the included
 interfaces is stable and the may change without warning.
 
-To use the latest version of the interface:
+To use the latest version of the interface::
+
     from rpath_common import xmllib
-To use a specific API Version of the interface:
+
+To use a specific API Version of the interface::
+
     from rpath_common.xmllib import api1 as xmllib
 """
 
diff -r 4a439a94a085 -r e3b5883ca34c rpath_common/xmllib/api1.py
--- a/rpath_common/xmllib/api1.py	Fri May 02 13:50:49 2008 -0400
+++ b/rpath_common/xmllib/api1.py	Fri May 02 23:18:35 2008 -0400
@@ -131,8 +131,27 @@
             else:
                 yield ("%s:%s" % (nsName, attrName), attrVal)
 
+    def iterNamespaces(self):
+        for nsName, nsVal in sorted(self._nsAttributes.items()):
+            yield nsName, nsVal
+
     def getAttribute(self, name, namespace = None):
         return self._otherAttributes.get((namespace, name))
+
+    def getAttributeByNamespace(self, name, namespace = None):
+        """Retrieve an attribute using its full namespace designation"""
+        if namespace is None:
+            # Nothing different from getAttribute
+            return self.getAttribute(name)
+
+        # Get all aliases that correspond to this namespace
+        aliases = [ x for (x, y) in self._nsMap.items() if y == namespace ]
+        # Sort them (this way the default namespace comes first)
+        aliases.sort()
+        for alias in aliases:
+            if (alias, name) in self._otherAttributes:
+                return self._otherAttributes[(alias, name)]
+        return None
 
     def getChildren(self, name, namespace = None):
         tagName = unsplitNamespace(name, namespace)
@@ -163,6 +182,7 @@
         return self.iterChildren()
     #}
 
+    #{ Private methods
     def _setAttributes(self, attributes):
         self._nsAttributes = {}
         self._otherAttributes = {}
@@ -197,7 +217,7 @@
         if namespace is None:
             return name
         return "{%s}%s" % (self._nsMap[namespace], name)
-
+    #}
 
 class BaseNode(_AbstractNode):
     pass
@@ -398,32 +418,34 @@
 
     parseFile: takes a a path and returns a python object.
     parseString: takes a string containing XML data and returns a python
-        object.
+    object.
     registerType: register a tag with a class defining how to treat XML content.
     toXml: takes an object and renders it into an XML representation.
 
-    EXAMPLE:
-    class ComplexType(BaseNode):
-        _singleChildren = ['foo', 'bar']
+    EXAMPLE::
 
-    binder = DataBinder()
-    binder.registerType('foo', BooleanNode)
-    binder.registerType('bar', NullNode)
-    binder.registerType('baz', ComplexType)
+        class ComplexType(BaseNode):
+            _singleChildren = ['foo', 'bar']
 
-    obj = binder.parseString('<baz><foo>TRUE</foo><bar>test</bar></baz>')
+        binder = DataBinder()
+        binder.registerType('foo', BooleanNode)
+        binder.registerType('bar', NullNode)
+        binder.registerType('baz', ComplexType)
 
-    obj.foo == True
-    obj.bar == 'test'
+        obj = binder.parseString('<baz><foo>TRUE</foo><bar>test</bar></baz>')
 
-    EXAMPLE:
-    binder = DataBinder()
-    class baz(object):
-        pass
-    obj = baz()
-    obj.foo = True
-    obj.bar = 'test'
-    binder.toXml(obj) == '<baz><foo>true</foo><bar>test</bar></baz>'
+        obj.foo == True
+        obj.bar == 'test'
+
+    EXAMPLE::
+
+        binder = DataBinder()
+        class baz(object):
+            pass
+        obj = baz()
+        obj.foo = True
+        obj.bar = 'test'
+        binder.toXml(obj) == '<baz><foo>true</foo><bar>test</bar></baz>'
     """
     def __init__(self, typeDict = None):
         self.contentHandler = BindingHandler(typeDict)

From misa@rpath.com Tue May  6 13:27:18 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m46DRIGK021932
	for <rpath-common-commits@lists.rpath.com>; Tue, 6 May 2008 13:27:18 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m46DRI2J012783
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 09:27:18 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m46DRIpM013277
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 09:27:18 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m46DRHso003482
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 09:27:17 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m46DRH2d003475
	for rpath-common-commits@lists.rpath.com; Tue, 6 May 2008 09:27:17 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805061327.m46DRH2d003475@scc.eng.rpath.com>
Date: Tue, 06 May 2008 09:27:17 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: Added dispatcher class; doc strings
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 06 May 2008 13:27:19 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/xmllib/api1.py

Added dispatcher class; doc strings

diff -r e3b5883ca34c -r 3d219a8edc98 rpath_common/xmllib/api1.py
--- a/rpath_common/xmllib/api1.py	Fri May 02 23:18:35 2008 -0400
+++ b/rpath_common/xmllib/api1.py	Tue May 06 09:27:10 2008 -0400
@@ -11,6 +11,12 @@
 # or fitness for a particular purpose. See the Common Public License for
 # full details.
 #
+"""
+The rPath XML Library API.
+
+All interfaces in this modules that do not start with a C{_}
+character are public interfaces.
+"""
 
 import StringIO
 import os
@@ -28,7 +34,18 @@
 #}
 
 class SerializableObject(object):
+    """
+    Base class for an XML-serializable object
+    """
+
     def getElementTree(self, parent = None):
+        """Any serializable object should implement the C{getElementTree}
+        method, which returns a hierarchy of objects that represent the
+        structure of the XML document.
+
+        @param parent: An optional parent object.
+        @type parent: C{SerializableObject} instance
+        """
         name = self._getName()
 
         attrs = {}
@@ -50,18 +67,35 @@
         return elem
 
     def _getName(self):
+        """
+        @return: the node's XML tag
+        @rtype: C{str}
+        """
         raise NotImplementedError()
 
     def _getLocalNamespaces(self):
+        """
+        @return: the locally defined namespaces
+        @rtype: C{dict}
+        """
         raise NotImplementedError()
 
     def _iterAttributes(self):
+        """
+        Iterate over this node's attributes.
+        @return: iteratable of (attributeName, attributeValue)
+        @rtype: iterable of (attributeName, attributeValue) strings
+        """
         raise NotImplementedError()
 
     def _iterChildren(self):
+        """
+        Iterate over the node's children
+        """
         raise NotImplementedError()
 
 class _AbstractNode(SerializableObject):
+    """Abstract node class for parsing XML data"""
     __slots__ = ['_children', '_nsMap', '_name', '_nsAttributes',
                  '_otherAttributes', ]
     def __init__(self, attributes = None, nsMap = None, name = None):
@@ -72,6 +106,7 @@
             self.setName(name)
 
     def setName(self, name):
+        """Set the node's name"""
         nsName, tagName = splitNamespace(name)
         if nsName is not None and nsName not in self._nsMap:
             raise UndefinedNamespaceError(nsName)
@@ -79,15 +114,30 @@
         return self
 
     def getName(self):
+        """
+        @return: the node's name
+        @rtype: C{str}
+        """
         return unsplitNamespace(self._name[1], self._name[0])
 
     def getAbsoluteName(self):
+        """
+        Retrieve the node's absolute name (qualified with the full
+        namespace), in the format C{{namespace}node}
+        @return: the node's absolute name
+        @rtype: C{str}
+        """
         if self._name[0] is None and None not in self._nsMap:
             # No default namespace provided
             return self._name[1]
         return "{%s}%s" % (self._nsMap[self._name[0]], self._name[1])
 
     def addChild(self, childNode):
+        """
+        Add a child node to this node
+        @param childNode: Child node to be added to this node
+        @type childNode: Node
+        """
         # If the previous node in the list is character data, drop it, since
         # we don't support mixed content
         if self._children and isinstance(self._children[-1], unicode):
@@ -220,7 +270,7 @@
     #}
 
 class BaseNode(_AbstractNode):
-    pass
+    """Base node for parsing XML data"""
 
 class GenericNode(BaseNode):
     """
@@ -347,6 +397,8 @@
 
     @staticmethod
     def fromString(stringVal):
+        if isinstance(stringVal, bool):
+            return stringVal
         return stringVal.strip().upper() in ('TRUE', '1')
 
     @staticmethod
@@ -412,9 +464,53 @@
     """
     DataBinder class.
 
-    This class wraps all XML parsing logic in this module. As a rough rule
-    of thumb, attributes of an XML tag will be treated as class level
-    attributes, while subtags will populate an object's main dictionary.
+    This class wraps all XML parsing logic in this module.
+
+    For the simple case, the binder can be used as-is, by invoking the
+    C{parseString} method, in which case a hierarchy of C{BaseNode} objects
+    will be produced. The top-level node can be also used for serializing
+    back to XML
+
+    EXAMPLE::
+
+        binder = DataBinder()
+        obj = binder.parseString('<baz><foo>3</foo><bar>test</bar></baz>')
+        data = binder.toXml(prettyPrint = False)
+        # data == '<baz><foo>3</foo><bar>test</bar></baz>'
+
+    A node's attributes can be retrieved with C{iterAttributes}, and its
+    children with C{iterChildren}. The node's text can be retrieved with
+    C{getText}. Please note that we do not support character data and nodes
+    mixed under the same parent. For insntance, the following XML construct
+    will not be properly handled::
+
+        <node>Some text<child>Child1</child>and some other text</node>
+
+    To convert simple data types (like integer or boolean nodes) into their
+    corresponding Python representation, you can use the built-in
+    C{IntegerNode}, C{BooleanNode} and C{StringNode}. These objects implement
+    a C{finalize} method that will convert the object's text into the proper
+    data type (and ignore other possible child nodes).
+
+    For a more convenient mapping of the data structures parsed from XML into
+    rich Python objects, you can register your own classes, generally
+    inherited from C{BaseNode}, that will overwrite the C{addChild} method to
+    change the default behavior. You can choose to store children in a
+    different way, instead of the default data structure of children.
+
+    EXAMLPLE::
+
+        binder = xmllib.DataBinder()
+        class MyClass(BaseNode):
+            def addChild(self, child):
+                if child.getName() == 'isPresent':
+                    self.present = child.finalize()
+
+        binder.registerType(MyClass, name = 'node')
+        binder.registerType(BooleanNode, name = 'isPresent')
+
+        obj = binder.parseString('<node><isPresent>true</isPresent></node>')
+        # obj.isPresent == true
 
     parseFile: takes a a path and returns a python object.
     parseString: takes a string containing XML data and returns a python
@@ -422,43 +518,51 @@
     registerType: register a tag with a class defining how to treat XML content.
     toXml: takes an object and renders it into an XML representation.
 
-    EXAMPLE::
-
-        class ComplexType(BaseNode):
-            _singleChildren = ['foo', 'bar']
-
-        binder = DataBinder()
-        binder.registerType('foo', BooleanNode)
-        binder.registerType('bar', NullNode)
-        binder.registerType('baz', ComplexType)
-
-        obj = binder.parseString('<baz><foo>TRUE</foo><bar>test</bar></baz>')
-
-        obj.foo == True
-        obj.bar == 'test'
-
-    EXAMPLE::
-
-        binder = DataBinder()
-        class baz(object):
-            pass
-        obj = baz()
-        obj.foo = True
-        obj.bar = 'test'
-        binder.toXml(obj) == '<baz><foo>true</foo><bar>test</bar></baz>'
     """
     def __init__(self, typeDict = None):
+        """
+        Initialize the Binder object.
+
+        @param typeDict: optional type mapping object
+        @type typeDict: dict
+        """
         self.contentHandler = BindingHandler(typeDict)
 
     def registerType(self, klass, name = None, namespace = None):
+        """
+        Register a new class with a node name. As the XML parser encounters
+        nodes, it will try to instantiate the classes registered with the
+        node's name, and will fall back to the BaseNode class if a more
+        specific class could not be found.
+
+        If the optional keyword argument C{name} is not specified, the name
+        of the node will be compared with the class' C{name} field (a
+        class-level attribute).
+        """
         return self.contentHandler.registerType(klass, name = name,
                                                 namespace = namespace)
 
     def parseString(self, data):
+        """
+        Parse an XML string.
+        @param data: the XML string to be parsed
+        @type data: C{str}
+        @return: a Node object
+        @rtype: A previosly registered class (using C{registerType} or a
+        C{BaseNode}.
+        """
         stream = StringIO.StringIO(data)
         return self.parseFile(stream)
 
     def parseFile(self, stream):
+        """
+        Parse an XML file.
+        @param data: the XML file to be parsed
+        @type data: C{file}
+        @return: a Node object
+        @rtype: A previosly registered class (using C{registerType} or a
+        C{BaseNode}.
+        """
         if isinstance(stream, str):
             stream = file(stream)
         self.contentHandler.rootNode = None
@@ -470,6 +574,18 @@
         return rootNode
 
     def toXml(self, obj, prettyPrint = True):
+        """
+        Serialize an object to XML.
+
+        @param obj: An object implementing a C{getElementTree} mthod.
+        @type obj: C{obj}
+        @param prettyPrint: if True (the default), the XML that is produced
+        will be formatted for easier reading by humans (by introducing new
+        lines and white spaces).
+        @type prettyPrint: C{bool}
+        @return: the XML representation of the object
+        @rtype: str
+        """
         tree = obj.getElementTree()
         res = etree.tostring(tree, pretty_print = prettyPrint,
             xml_declaration = True, encoding = 'UTF-8')
@@ -512,3 +628,63 @@
     else:
         elem = etree.Element(name, attrs, nsMap)
     return elem
+
+class NodeDispatcher(object):
+    """Simple class that dispatches nodes of various types to various
+    registered classes.
+
+    The registered classes need to implement a C{getTag()} static method or
+    class method, that returns the name of the tags we want to be registered
+    with this node.
+    """
+
+    def __init__(self, nsMap = None):
+        """
+        @param nsMap: a namespace mapping from aliases to the namespace
+        string. For example, for the following declaration::
+
+            <node xmlns="namespace1" xmlns:ns="namespace2"/>
+
+        the mapping will be {None: "namespace1", "ns" : "namespace2"}
+        @type nsMap: C{dict}
+        """
+
+        self._dispatcher = {}
+        self._nsMap = nsMap or {}
+
+    def registerType(self, nodeType, name = None, namespace = None):
+        if name is None:
+            if not hasattr(nodeType, 'getTag'):
+                return
+            ns, name = splitNamespace(nodeType.getTag())
+        else:
+            ns, name = namespace, name
+
+        key = "{%s}%s" % (self._nsMap.get(ns, ''), name)
+        self._dispatcher[key] = nodeType
+
+    def registerClasses(self, module, baseClass):
+        """Register all classes that are a subclass of baseClass and are part
+        of the module.
+        @param module: The module in which supported classes will be looked up.
+        @type module: module
+        @param baseClass: A base class for all the classes that have to be
+        registered.
+        @type baseClass: class
+        """
+        for symVal in module.__dict__.itervalues():
+            if not isinstance(symVal, type):
+                continue
+            if issubclass(symVal, baseClass) and symVal != baseClass:
+                self.registerType(symVal)
+
+    def dispatch(self, node):
+        """Create objects for this node, based on the classes registered with
+        the dispatcher"""
+
+        absName = node.getAbsoluteName()
+        if absName not in self._dispatcher:
+            return None
+        nodeClass = self._dispatcher.get(absName)
+
+        return nodeClass(node)

From misa@rpath.com Tue May  6 13:27:26 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m46DRPqX021938
	for <rpath-common-commits@lists.rpath.com>; Tue, 6 May 2008 13:27:25 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m46DRPTh012801
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 09:27:25 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m46DRPUI013298
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 09:27:25 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m46DRPN4003603
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 09:27:25 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m46DRO5Y003581
	for rpath-common-commits@lists.rpath.com; Tue, 6 May 2008 09:27:24 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805061327.m46DRO5Y003581@scc.eng.rpath.com>
Date: Tue, 06 May 2008 09:27:24 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Changed defaultNamespace to be a list
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 06 May 2008 13:27:26 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/_imageTypes.py rpath_common/proddef/_xmlConstants.py rpath_common/proddef/api1.py

Changed defaultNamespace to be a list

diff -r d7bd973196d1 -r bebdc6602d7d rpath_common/proddef/_imageTypes.py
--- a/rpath_common/proddef/_imageTypes.py	Fri May 02 14:51:46 2008 -0400
+++ b/rpath_common/proddef/_imageTypes.py	Fri May 02 23:19:05 2008 -0400
@@ -49,7 +49,7 @@
 
 #{ Image Type Classes
 class ImageType_Base(xmllib.SerializableObject):
-    _defaultNamespace = _xmlConstants.defaultNamespace
+    _defaultNamespace = _xmlConstants.defaultNamespaceList[0]
 
     _attributes = {
         'name'              : (str, ),
diff -r d7bd973196d1 -r bebdc6602d7d rpath_common/proddef/_xmlConstants.py
--- a/rpath_common/proddef/_xmlConstants.py	Fri May 02 14:51:46 2008 -0400
+++ b/rpath_common/proddef/_xmlConstants.py	Fri May 02 23:19:05 2008 -0400
@@ -12,11 +12,17 @@
 # full details.
 #
 """
-@var defaultNamespace: Default namespace
+@var defaultNamespaceList: List of supported namespaces, the preferred
+    namespace being first. Normally, augmenting the schema in a
+    backwards-compatible way (i.e. with pure additions) should not result in a
+    new namespace being generated.
+@type defaultNamespaceList: list
 @var xmlSchemaNamespace: XML Schema namespace
+@type xmlSchemaNamespace: C{str}
 @var xmlSchemaLocation: XML Schema location
+@type xmlSchemaLocaltion: C{str}
 """
 
-defaultNamespace = "http://www.rpath.com/permanent/rpd-1.0.xsd"
+defaultNamespaceList = [ "http://www.rpath.com/permanent/rpd-1.0.xsd" ]
 xmlSchemaNamespace = "http://www.w3.org/2001/XMLSchema-instance"
 xmlSchemaLocation = "http://www.rpath.com/permanent/rpd-1.0.xsd rpd-1.0.xsd"
diff -r d7bd973196d1 -r bebdc6602d7d rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Fri May 02 14:51:46 2008 -0400
+++ b/rpath_common/proddef/api1.py	Fri May 02 23:19:05 2008 -0400
@@ -31,7 +31,7 @@
     Represents the definition of a product.
     """
     version = '1.0'
-    defaultNamespace = _xmlConstants.defaultNamespace
+    defaultNamespace = _xmlConstants.defaultNamespaceList[0]
     xmlSchemaNamespace = _xmlConstants.xmlSchemaNamespace
     xmlSchemaLocation = _xmlConstants.xmlSchemaLocation
 
@@ -58,6 +58,16 @@
         self.upstreamSources.extend(getattr(xmlObj, 'upstreamSources', []))
         self.buildDefinition.extend(getattr(xmlObj, 'buildDefinition', []))
 
+        ver = xmlObj.getAttribute('version')
+        if ver is not None and ver != self.version:
+            self.version = ver
+
+        for nsName, nsVal in xmlObj.iterNamespaces():
+            if nsName is None and nsVal != self.defaultNamespace:
+                self.defaultNamespace = nsVal
+                continue
+            # XXX We don't support changing the schema location for now
+
     def serialize(self, stream):
         """Serialize the current object"""
         baseFlavor = xmllib.StringNode(name = 'baseFlavor')
@@ -68,10 +78,10 @@
                          self.stages,
                          self.upstreamSources,
                          self.buildDefinition ]
-        attrs = {'version' : ProductDefinition.version,
-                 'xmlns' : ProductDefinition.defaultNamespace,
-                 'xmlns:xsi' : ProductDefinition.xmlSchemaNamespace,
-                 "xsi:schemaLocation" : ProductDefinition.xmlSchemaLocation,
+        attrs = {'version' : self.version,
+                 'xmlns' : self.defaultNamespace,
+                 'xmlns:xsi' : self.xmlSchemaNamespace,
+                 "xsi:schemaLocation" : self.xmlSchemaLocation,
         }
         nameSpaces = {}
         n = N(attrs, nameSpaces, name = "productDefinition")

From misa@rpath.com Tue May  6 13:27:26 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m46DRQIx021941
	for <rpath-common-commits@lists.rpath.com>; Tue, 6 May 2008 13:27:26 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m46DRQnT012804
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 09:27:26 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m46DRQm9013301
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 09:27:26 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m46DRPA2003631
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 09:27:25 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m46DRPtN003621
	for rpath-common-commits@lists.rpath.com; Tue, 6 May 2008 09:27:25 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805061327.m46DRPtN003621@scc.eng.rpath.com>
Date: Tue, 06 May 2008 09:27:25 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Accept new namespaces too
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 06 May 2008 13:27:26 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/_imageTypes.py rpath_common/proddef/api1.py

Accept new namespaces too

diff -r bebdc6602d7d -r 06c0cf732750 rpath_common/proddef/_imageTypes.py
--- a/rpath_common/proddef/_imageTypes.py	Fri May 02 23:19:05 2008 -0400
+++ b/rpath_common/proddef/_imageTypes.py	Mon May 05 15:23:58 2008 -0400
@@ -19,19 +19,19 @@
 from rpath_common.proddef import _xmlConstants
 
 class ImageType_Dispatcher(object):
-    _dispatcher = {}
+    def __init__(self, nsMap = None):
+        self._dispatcher = {}
+        self._nsMap = nsMap or {}
 
-    @classmethod
-    def addImageType(kls, imageType):
-        key = "{%s}%s" % (imageType._defaultNamespace, imageType.tag)
-        kls._dispatcher[key] = imageType
+    def addImageType(self, imageType):
+        key = "{%s}%s" % (self._nsMap[None], imageType.tag)
+        self._dispatcher[key] = imageType
 
-    @classmethod
-    def dispatch(kls, node):
+    def dispatch(self, node):
         absName = node.getAbsoluteName()
-        if absName not in kls._dispatcher:
+        if absName not in self._dispatcher:
             return None
-        nodeClass = kls._dispatcher.get(absName)
+        nodeClass = self._dispatcher.get(absName)
 
         fields = {}
         for attrName, values in nodeClass._attributes.items():
@@ -46,6 +46,15 @@
             fields[attrName] = val
         obj = nodeClass(fields)
         return obj
+
+    def registerClasses(self, module, baseClass):
+        """Register all classes that are a subclass of baseClass and are part
+        of the module."""
+        for symVal in module.__dict__.itervalues():
+            if not isinstance(symVal, type):
+                continue
+            if issubclass(symVal, baseClass) and symVal != baseClass:
+                self.addImageType(symVal)
 
 #{ Image Type Classes
 class ImageType_Base(xmllib.SerializableObject):
@@ -171,9 +180,4 @@
     })
 #}
 
-# Globally register all image types defined in this module
-for symVal in globals().values():
-    if not isinstance(symVal, type):
-        continue
-    if issubclass(symVal, ImageType_Base) and symVal != ImageType_Base:
-        ImageType_Dispatcher.addImageType(symVal)
+
diff -r bebdc6602d7d -r 06c0cf732750 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Fri May 02 23:19:05 2008 -0400
+++ b/rpath_common/proddef/api1.py	Mon May 05 15:23:58 2008 -0400
@@ -51,6 +51,8 @@
     def parseStream(self, stream):
         self._initFields()
         binder = xmllib.DataBinder()
+        # We need to dynamically create a class here, so we can set the proper
+        # namespace for the class
         binder.registerType(_ProductDefinition, 'productDefinition')
         xmlObj = binder.parseFile(stream)
         self.baseFlavor = getattr(xmlObj, 'baseFlavor', None)
@@ -215,44 +217,34 @@
 #}
 
 class _ProductDefinition(xmllib.BaseNode):
-    ndNameBaseFlavor = "{%s}%s" % (ProductDefinition.defaultNamespace,
-                                   'baseFlavor')
-    ndNameStages = "{%s}%s" % (ProductDefinition.defaultNamespace,
-                               'stages')
-    ndNameUpstreamSources = "{%s}%s" % (ProductDefinition.defaultNamespace,
-                                        'upstreamSources')
-    ndNameBuildDefinition = "{%s}%s" % (ProductDefinition.defaultNamespace,
-                                        'buildDefinition')
-
-    ndNameInstIso = "{%s}%s" % (ProductDefinition.defaultNamespace,
-                                'installbleIsoImage')
-
-    ndNameRawFs = "{%s}%s" % (ProductDefinition.defaultNamespace,
-                             'rawFsImage')
-    ndNameRawHd = "{%s}%s" % (ProductDefinition.defaultNamespace,
-                             'rawHdImage')
-
+    def __init__(self, attributes = None, nsMap = None, name = None):
+        xmllib.BaseNode.__init__(self, attributes = attributes, nsMap = nsMap,
+                                 name = name)
+        self.defaultNamespace = self.getNamespaceMap().get(None)
 
     def addChild(self, childNode):
         chName = childNode.getAbsoluteName()
-        if chName == self.ndNameBaseFlavor:
+        if chName == self._makeAbsoluteName('baseFlavor'):
             self.baseFlavor = childNode.getText()
             return
 
-        if chName == self.ndNameStages:
+        if chName == self._makeAbsoluteName('stages'):
             children = childNode.getChildren('stage')
             self._addStages(children)
             return
 
-        if chName == self.ndNameUpstreamSources:
+        if chName == self._makeAbsoluteName('upstreamSources'):
             children = childNode.getChildren('upstreamSource')
             self._addUpstreamSources(children)
             return
 
-        if chName == self.ndNameBuildDefinition:
+        if chName == self._makeAbsoluteName('buildDefinition'):
             children = childNode.getChildren('build')
             self._addBuildDefinition(children)
             return
+
+    def _makeAbsoluteName(self, name):
+        return "{%s}%s" % (self.defaultNamespace, name)
 
     def _addStages(self, stagesNodes):
         stages = self.stages = []
@@ -271,13 +263,16 @@
             sources.append(pyObj)
 
     def _addBuildDefinition(self, buildNodes):
+        dispatcher = _imageTypes.ImageType_Dispatcher(self._nsMap)
+        dispatcher.registerClasses(_imageTypes, _imageTypes.ImageType_Base)
+
         builds = self.buildDefinition = []
         for node in buildNodes:
             imgType = None
             for subNode in node.iterChildren():
                 if not isinstance(subNode, xmllib.BaseNode):
                     continue
-                imgType = _imageTypes.ImageType_Dispatcher.dispatch(subNode)
+                imgType = dispatcher.dispatch(subNode)
                 if imgType is not None:
                     break
             if imgType is None:

From misa@rpath.com Tue May  6 13:27:31 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m46DRUhK021950
	for <rpath-common-commits@lists.rpath.com>; Tue, 6 May 2008 13:27:30 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m46DRUDG012823
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 09:27:30 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m46DRUfW013309
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 09:27:30 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m46DRTK2003702
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 09:27:29 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m46DRSJf003684
	for rpath-common-commits@lists.rpath.com; Tue, 6 May 2008 09:27:28 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805061327.m46DRSJf003684@scc.eng.rpath.com>
Date: Tue, 06 May 2008 09:27:28 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Moved the dispatcher into xmllib
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 06 May 2008 13:27:31 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/_imageTypes.py rpath_common/proddef/api1.py

Moved the dispatcher into xmllib

diff -r 06c0cf732750 -r 661197137a5d rpath_common/proddef/_imageTypes.py
--- a/rpath_common/proddef/_imageTypes.py	Mon May 05 15:23:58 2008 -0400
+++ b/rpath_common/proddef/_imageTypes.py	Mon May 05 23:32:54 2008 -0400
@@ -18,44 +18,6 @@
 from rpath_common import xmllib
 from rpath_common.proddef import _xmlConstants
 
-class ImageType_Dispatcher(object):
-    def __init__(self, nsMap = None):
-        self._dispatcher = {}
-        self._nsMap = nsMap or {}
-
-    def addImageType(self, imageType):
-        key = "{%s}%s" % (self._nsMap[None], imageType.tag)
-        self._dispatcher[key] = imageType
-
-    def dispatch(self, node):
-        absName = node.getAbsoluteName()
-        if absName not in self._dispatcher:
-            return None
-        nodeClass = self._dispatcher.get(absName)
-
-        fields = {}
-        for attrName, values in nodeClass._attributes.items():
-            attrType = values[0]
-            val = node.getAttribute(attrName)
-            if val is None:
-                continue
-            if attrType == bool:
-                val = (val.strip().upper() in ["TRUE", "1"] and True) or False
-            elif attrType == int:
-                val = int(val)
-            fields[attrName] = val
-        obj = nodeClass(fields)
-        return obj
-
-    def registerClasses(self, module, baseClass):
-        """Register all classes that are a subclass of baseClass and are part
-        of the module."""
-        for symVal in module.__dict__.itervalues():
-            if not isinstance(symVal, type):
-                continue
-            if issubclass(symVal, baseClass) and symVal != baseClass:
-                self.addImageType(symVal)
-
 #{ Image Type Classes
 class ImageType_Base(xmllib.SerializableObject):
     _defaultNamespace = _xmlConstants.defaultNamespaceList[0]
@@ -67,8 +29,36 @@
         'installLabelPath'  : (str, ),
     }
 
-    def __init__(self, fields):
-        self.fields = fields
+    def __init__(self, node = None, fields = None):
+        """
+        Initialize an ImageType object, either from a Node, or from a
+        dictionary of fields.
+        """
+
+        self.fields = flds = {}
+
+        if node is None and fields is None:
+            return
+
+        initFields = fields or {}
+
+        for attrName, values in self._attributes.items():
+            attrType = values[0]
+            if node is not None:
+                val = node.getAttribute(attrName)
+            else:
+                val = initFields.get(attrName)
+            if val is None:
+                continue
+            if attrType == bool:
+                val = xmllib.BooleanNode.fromString(val)
+            elif attrType == int:
+                val = int(val)
+            flds[attrName] = val
+
+    @classmethod
+    def getTag(kls):
+        return kls.tag
 
     def _getName(self):
         return self.tag
diff -r 06c0cf732750 -r 661197137a5d rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Mon May 05 15:23:58 2008 -0400
+++ b/rpath_common/proddef/api1.py	Mon May 05 23:32:54 2008 -0400
@@ -263,7 +263,7 @@
             sources.append(pyObj)
 
     def _addBuildDefinition(self, buildNodes):
-        dispatcher = _imageTypes.ImageType_Dispatcher(self._nsMap)
+        dispatcher = xmllib.NodeDispatcher(self._nsMap)
         dispatcher.registerClasses(_imageTypes, _imageTypes.ImageType_Base)
 
         builds = self.buildDefinition = []

From misa@rpath.com Tue May  6 13:27:32 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m46DRWwp021953
	for <rpath-common-commits@lists.rpath.com>; Tue, 6 May 2008 13:27:32 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m46DRWpv012830
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 09:27:32 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m46DRVhY013312
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 09:27:32 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m46DRVCG003768
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 09:27:31 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m46DRV3w003744
	for rpath-common-commits@lists.rpath.com; Tue, 6 May 2008 09:27:31 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805061327.m46DRV3w003744@scc.eng.rpath.com>
Date: Tue, 06 May 2008 09:27:31 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Renamed _imageTypes.py to imageTypes.py
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 06 May 2008 13:27:32 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/_imageTypes.py rpath_common/proddef/api1.py rpath_common/proddef/imageTypes.py

Renamed _imageTypes.py to imageTypes.py

diff -r 661197137a5d -r 74104572aa8a rpath_common/proddef/_imageTypes.py
--- a/rpath_common/proddef/_imageTypes.py	Mon May 05 23:32:54 2008 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,173 +0,0 @@
-#
-# Copyright (c) 2008 rPath, Inc.
-#
-# This program is distributed under the terms of the Common Public License,
-# version 1.0. A copy of this license should have been distributed with this
-# source file in a file called LICENSE. If it is not present, the license
-# is always available at http://www.rpath.com/permanent/licenses/CPL-1.0.
-#
-# This program is distributed in the hope that it will be useful, but
-# without any warranty; without even the implied warranty of merchantability
-# or fitness for a particular purpose. See the Common Public License for
-# full details.
-#
-"""
-Private interface.
-"""
-
-from rpath_common import xmllib
-from rpath_common.proddef import _xmlConstants
-
-#{ Image Type Classes
-class ImageType_Base(xmllib.SerializableObject):
-    _defaultNamespace = _xmlConstants.defaultNamespaceList[0]
-
-    _attributes = {
-        'name'              : (str, ),
-        'autoResolve'       : (bool, ),
-        'baseFileName'      : (str, ),
-        'installLabelPath'  : (str, ),
-    }
-
-    def __init__(self, node = None, fields = None):
-        """
-        Initialize an ImageType object, either from a Node, or from a
-        dictionary of fields.
-        """
-
-        self.fields = flds = {}
-
-        if node is None and fields is None:
-            return
-
-        initFields = fields or {}
-
-        for attrName, values in self._attributes.items():
-            attrType = values[0]
-            if node is not None:
-                val = node.getAttribute(attrName)
-            else:
-                val = initFields.get(attrName)
-            if val is None:
-                continue
-            if attrType == bool:
-                val = xmllib.BooleanNode.fromString(val)
-            elif attrType == int:
-                val = int(val)
-            flds[attrName] = val
-
-    @classmethod
-    def getTag(kls):
-        return kls.tag
-
-    def _getName(self):
-        return self.tag
-
-    def _getLocalNamespaces(self):
-        return {}
-
-    def _iterAttributes(self):
-        return self.fields.iteritems()
-
-    def _iterChildren(self):
-        return []
-
-
-class ImageType_AMI(ImageType_Base):
-    tag = "amiImage"
-    _attributes = ImageType_Base._attributes.copy()
-    _attributes.update({
-        'amiHugeDiskMountpoint'     : (str, ),
-        'freespace'                 : (int, ),
-    })
-
-class ImageType_InstallableISO(ImageType_Base):
-    tag = "installableIsoImage"
-    _attributes = ImageType_Base._attributes.copy()
-    _attributes.update({
-        'maxIsoSize'                : (int, ),
-        'bugsUrl'                   : (str, ),
-        'showMediaCheck'            : (bool, ),
-        'betaNag'                   : (bool, ),
-        'mediaTemplateTrove'        : (str, ),
-        'anacondaCustomTrove'       : (str, ),
-        'anacondaTemplatesTrove'    : (str, ),
-    })
-
-class ImageType_LiveIso(ImageType_Base):
-    tag = "liveIsoImage"
-    _attributes = ImageType_Base._attributes.copy()
-    _attributes.update({
-        'unionfs'                   : (bool, ),
-        'zisofs'                    : (bool, ),
-    })
-
-class ImageType_Netboot(ImageType_Base):
-    tag = "netbootImage"
-    _attributes = ImageType_Base._attributes.copy()
-    _attributes.update({
-    })
-
-class ImageType_RawFs(ImageType_Base):
-    tag = "rawFsImage"
-    _attributes = ImageType_Base._attributes.copy()
-    _attributes.update({
-        'swapSize'          : (int, ),
-        'freespace'         : (int, ),
-    })
-
-class ImageType_RawHd(ImageType_Base):
-    tag = "rawHdImage"
-    _attributes = ImageType_Base._attributes.copy()
-    _attributes.update({
-        'swapSize'          : (int, ),
-        'freespace'         : (int, ),
-    })
-
-class ImageType_Tarball(ImageType_Base):
-    tag = "tarballImage"
-    _attributes = ImageType_Base._attributes.copy()
-    _attributes.update({
-        'swapSize'          : (int, ),
-    })
-
-class ImageType_UpdateIso(ImageType_Base):
-    tag = "updateIsoImage"
-    # No inheritance
-    _attributes = {
-        'baseFileName'          : (str, ),
-        'mediaTemplateTrove'    : (str, ),
-    }
-
-class ImageType_VHD(ImageType_Base):
-    tag = "vhdImage"
-    _attributes = ImageType_Base._attributes.copy()
-    _attributes.update({
-        'swapSize'          : (int, ),
-        'freespace'         : (int, ),
-        'vhdDiskType'       : (str, ),
-    })
-
-class ImageType_VMWare(ImageType_Base):
-    tag = "vmwareImage"
-    _attributes = ImageType_Base._attributes.copy()
-    _attributes.update({
-        'swapSize'          : (int, ),
-        'freespace'         : (int, ),
-        'natNetworking'     : (bool, ),
-        'diskAdapter'       : (str, ),
-        'vmSnapshots'       : (bool, ),
-        'vmMemory'          : (int, ),
-    })
-
-class ImageType_VMWareEsx(ImageType_Base):
-    tag = "vmwareEsxImage"
-    _attributes = ImageType_Base._attributes.copy()
-    _attributes.update({
-        'swapSize'          : (int, ),
-        'freespace'         : (int, ),
-        'natNetworking'     : (bool, ),
-    })
-#}
-
-
diff -r 661197137a5d -r 74104572aa8a rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Mon May 05 23:32:54 2008 -0400
+++ b/rpath_common/proddef/api1.py	Mon May 05 23:36:50 2008 -0400
@@ -24,7 +24,7 @@
 
 from rpath_common.xmllib import api1 as xmllib
 from rpath_common.proddef import _xmlConstants
-from rpath_common.proddef import _imageTypes
+from rpath_common.proddef import imageTypes
 
 class ProductDefinition(object):
     """
@@ -264,7 +264,7 @@
 
     def _addBuildDefinition(self, buildNodes):
         dispatcher = xmllib.NodeDispatcher(self._nsMap)
-        dispatcher.registerClasses(_imageTypes, _imageTypes.ImageType_Base)
+        dispatcher.registerClasses(imageTypes, imageTypes.ImageType_Base)
 
         builds = self.buildDefinition = []
         for node in buildNodes:
diff -r 661197137a5d -r 74104572aa8a rpath_common/proddef/imageTypes.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpath_common/proddef/imageTypes.py	Mon May 05 23:36:50 2008 -0400
@@ -0,0 +1,173 @@
+#
+# Copyright (c) 2008 rPath, Inc.
+#
+# This program is distributed under the terms of the Common Public License,
+# version 1.0. A copy of this license should have been distributed with this
+# source file in a file called LICENSE. If it is not present, the license
+# is always available at http://www.rpath.com/permanent/licenses/CPL-1.0.
+#
+# This program is distributed in the hope that it will be useful, but
+# without any warranty; without even the implied warranty of merchantability
+# or fitness for a particular purpose. See the Common Public License for
+# full details.
+#
+"""
+Private interface.
+"""
+
+from rpath_common import xmllib
+from rpath_common.proddef import _xmlConstants
+
+#{ Image Type Classes
+class ImageType_Base(xmllib.SerializableObject):
+    _defaultNamespace = _xmlConstants.defaultNamespaceList[0]
+
+    _attributes = {
+        'name'              : (str, ),
+        'autoResolve'       : (bool, ),
+        'baseFileName'      : (str, ),
+        'installLabelPath'  : (str, ),
+    }
+
+    def __init__(self, node = None, fields = None):
+        """
+        Initialize an ImageType object, either from a Node, or from a
+        dictionary of fields.
+        """
+
+        self.fields = flds = {}
+
+        if node is None and fields is None:
+            return
+
+        initFields = fields or {}
+
+        for attrName, values in self._attributes.items():
+            attrType = values[0]
+            if node is not None:
+                val = node.getAttribute(attrName)
+            else:
+                val = initFields.get(attrName)
+            if val is None:
+                continue
+            if attrType == bool:
+                val = xmllib.BooleanNode.fromString(val)
+            elif attrType == int:
+                val = int(val)
+            flds[attrName] = val
+
+    @classmethod
+    def getTag(kls):
+        return kls.tag
+
+    def _getName(self):
+        return self.tag
+
+    def _getLocalNamespaces(self):
+        return {}
+
+    def _iterAttributes(self):
+        return self.fields.iteritems()
+
+    def _iterChildren(self):
+        return []
+
+
+class ImageType_AMI(ImageType_Base):
+    tag = "amiImage"
+    _attributes = ImageType_Base._attributes.copy()
+    _attributes.update({
+        'amiHugeDiskMountpoint'     : (str, ),
+        'freespace'                 : (int, ),
+    })
+
+class ImageType_InstallableISO(ImageType_Base):
+    tag = "installableIsoImage"
+    _attributes = ImageType_Base._attributes.copy()
+    _attributes.update({
+        'maxIsoSize'                : (int, ),
+        'bugsUrl'                   : (str, ),
+        'showMediaCheck'            : (bool, ),
+        'betaNag'                   : (bool, ),
+        'mediaTemplateTrove'        : (str, ),
+        'anacondaCustomTrove'       : (str, ),
+        'anacondaTemplatesTrove'    : (str, ),
+    })
+
+class ImageType_LiveIso(ImageType_Base):
+    tag = "liveIsoImage"
+    _attributes = ImageType_Base._attributes.copy()
+    _attributes.update({
+        'unionfs'                   : (bool, ),
+        'zisofs'                    : (bool, ),
+    })
+
+class ImageType_Netboot(ImageType_Base):
+    tag = "netbootImage"
+    _attributes = ImageType_Base._attributes.copy()
+    _attributes.update({
+    })
+
+class ImageType_RawFs(ImageType_Base):
+    tag = "rawFsImage"
+    _attributes = ImageType_Base._attributes.copy()
+    _attributes.update({
+        'swapSize'          : (int, ),
+        'freespace'         : (int, ),
+    })
+
+class ImageType_RawHd(ImageType_Base):
+    tag = "rawHdImage"
+    _attributes = ImageType_Base._attributes.copy()
+    _attributes.update({
+        'swapSize'          : (int, ),
+        'freespace'         : (int, ),
+    })
+
+class ImageType_Tarball(ImageType_Base):
+    tag = "tarballImage"
+    _attributes = ImageType_Base._attributes.copy()
+    _attributes.update({
+        'swapSize'          : (int, ),
+    })
+
+class ImageType_UpdateIso(ImageType_Base):
+    tag = "updateIsoImage"
+    # No inheritance
+    _attributes = {
+        'baseFileName'          : (str, ),
+        'mediaTemplateTrove'    : (str, ),
+    }
+
+class ImageType_VHD(ImageType_Base):
+    tag = "vhdImage"
+    _attributes = ImageType_Base._attributes.copy()
+    _attributes.update({
+        'swapSize'          : (int, ),
+        'freespace'         : (int, ),
+        'vhdDiskType'       : (str, ),
+    })
+
+class ImageType_VMWare(ImageType_Base):
+    tag = "vmwareImage"
+    _attributes = ImageType_Base._attributes.copy()
+    _attributes.update({
+        'swapSize'          : (int, ),
+        'freespace'         : (int, ),
+        'natNetworking'     : (bool, ),
+        'diskAdapter'       : (str, ),
+        'vmSnapshots'       : (bool, ),
+        'vmMemory'          : (int, ),
+    })
+
+class ImageType_VMWareEsx(ImageType_Base):
+    tag = "vmwareEsxImage"
+    _attributes = ImageType_Base._attributes.copy()
+    _attributes.update({
+        'swapSize'          : (int, ),
+        'freespace'         : (int, ),
+        'natNetworking'     : (bool, ),
+    })
+#}
+
+

From misa@rpath.com Tue May  6 13:27:34 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m46DRYXs021962
	for <rpath-common-commits@lists.rpath.com>; Tue, 6 May 2008 13:27:34 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m46DRXFH012837
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 09:27:34 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m46DRXkM013322
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 09:27:33 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m46DRX7Y003825
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 09:27:33 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m46DRW0N003809
	for rpath-common-commits@lists.rpath.com; Tue, 6 May 2008 09:27:32 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805061327.m46DRW0N003809@scc.eng.rpath.com>
Date: Tue, 06 May 2008 09:27:32 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Updated doc string
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 06 May 2008 13:27:34 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/imageTypes.py

Updated doc string

diff -r 74104572aa8a -r fc28ecbcc9a6 rpath_common/proddef/imageTypes.py
--- a/rpath_common/proddef/imageTypes.py	Mon May 05 23:36:50 2008 -0400
+++ b/rpath_common/proddef/imageTypes.py	Mon May 05 23:37:13 2008 -0400
@@ -12,7 +12,7 @@
 # full details.
 #
 """
-Private interface.
+Image types.
 """
 
 from rpath_common import xmllib

From misa@rpath.com Tue May  6 15:16:34 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m46FGYon024752
	for <rpath-common-commits@lists.rpath.com>; Tue, 6 May 2008 15:16:34 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m46FGXuu028674
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 11:16:33 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m46FGXPU021347
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 11:16:33 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m46FGXua008526
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 11:16:33 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m46FGXh5008521
	for rpath-common-commits@lists.rpath.com; Tue, 6 May 2008 11:16:33 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805061516.m46FGXh5008521@scc.eng.rpath.com>
Date: Tue, 06 May 2008 11:16:33 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Cleaning up of unused methods; more doc
	strings; added imageType
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 06 May 2008 15:16:34 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py rpath_common/proddef/imageTypes.py

Cleaning up of unused methods; more doc strings; added imageType

diff -r fc28ecbcc9a6 -r 3e239977fa8d rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Mon May 05 23:37:13 2008 -0400
+++ b/rpath_common/proddef/api1.py	Tue May 06 11:16:09 2008 -0400
@@ -18,7 +18,8 @@
 character are public interfaces.
 """
 
-__all__ = [ 'ProductDefinition' ]
+__all__ = [ 'ProductDefinition', 'ProductDefinitionError',
+            'UnsupportedImageType' ]
 
 import StringIO
 
@@ -26,14 +27,35 @@
 from rpath_common.proddef import _xmlConstants
 from rpath_common.proddef import imageTypes
 
+#{ Exception classes
+class ProductDefinitionError(Exception):
+    "Base class for product definition exceptions"
+
+class UnsupportedImageType(ProductDefinitionError):
+    "Raised when an unsupported image type was passed"
+#}
+
 class ProductDefinition(object):
     """
     Represents the definition of a product.
+    @cvar version:
+    @type version: C{str}
+    @cvar defaultNamespace:
+    @type defaultNamespace: C{str}
+    @cvar xmlSchemaNamespace:
+    @type xmlSchemaNamespace: C{str}
+    @cvar xmlSchemaLocation:
+    @type xmlSchemaLocation: C{str}
+    @cvar _imageTypeDispatcher: an object factory for imageType objects
+    @type _imageTypeDispatcher: C{xmllib.NodeDispatcher}
     """
     version = '1.0'
     defaultNamespace = _xmlConstants.defaultNamespaceList[0]
     xmlSchemaNamespace = _xmlConstants.xmlSchemaNamespace
     xmlSchemaLocation = _xmlConstants.xmlSchemaLocation
+
+    _imageTypeDispatcher = xmllib.NodeDispatcher({})
+    _imageTypeDispatcher.registerClasses(imageTypes, imageTypes.ImageType_Base)
 
     def __init__(self, fromStream = None):
         """
@@ -119,57 +141,29 @@
                                byDefault = byDefault, imageType = imageType)
         self.buildDefinition.append(obj)
 
+    @classmethod
+    def imageType(kls, name, fields = None):
+        """
+        Image type factory. Given an image type name, it will instantiate an
+        object of the proper type.
+        @param name: The name of the image type.
+        @type name: C{str}
+        @param fields: Fields to initialize the image type object
+        @type fields: C{dict}
+        @raise UnsupportedImageType: when an unsupported image type is passed
+        """
+        fnode = _ImageTypeFakeNode(name, fields or {})
+        obj = kls._imageTypeDispatcher.dispatch(fnode)
+        if obj is None:
+            raise UnsupportedImageType(name)
+        return obj
+
+
     def _initFields(self):
         self.baseFlavor = None
         self.stages = _Stages()
         self.upstreamSources = _UpstreamSources()
         self.buildDefinition = _BuildDefinition()
-
-    def _setFromDict(self):
-        # Functions to call to set attributes on the root element.
-        self._setNameSpace()
-        self._setNameSpaceXsi()
-        self._setXsiSchemaLocation()
-        self._setVersion()
-
-        self.setBaseFlavor(self.elementDict.pop('baseFlavor', ''))
-
-        # Set each of our 3 possible list elements.
-        self.setStages(self.elementDict.pop('stages', []))
-        self.setUpstreamSources(self.elementDict.pop('upstreamSources', []))
-        self.setBuildDefinition(self.elementDict.pop('buildDefinition', []))
-
-        # Merge any remaining items in self.elementDict into the instance's
-        # main dictionary, causing them to show up as elements.
-        self.xmlobj.__dict__.update(self.elementDict)
-
-    def _setNameSpace(self):
-        setattr(self.xmlobj.__class__, 'xmlns',
-                'http://www.rpath.com/permanent/rpd-1.0.xsd')
-
-    def _setNameSpaceXsi(self):
-        setattr(self.xmlobj.__class__, 'xmlns:xsi',
-                'http://www.w3.org/2001/XMLSchema-instance')
-
-    def _setXsiSchemaLocation(self):
-        setattr(self.xmlobj.__class__, 'xsi:schemaLocation',
-                'http://www.rpath.com/permanent/rpd-1.0.xsd rpd-1.0.xsd')
-
-    def _setVersion(self):
-        setattr(self.xmlobj.__class__, 'version', '1.0')
-
-    def _setElemObj(self, elem, name, elementObject):
-        """
-        Creates an object with an attribute called name set to elementObject.
-        Then, sets that object to an attribute called elem on self.xmlobj.
-
-        This method is typically used in conjuction with self._genElemObj to
-        set the returned list at the desired location.
-        """
-        Elem = type('Elem', (object,), {})
-        e = Elem()
-        setattr(e, name, elementObject)
-        setattr(self.xmlobj, elem, [e])
 
 #{ Objects for the representation of ProductDefinition fields
 
@@ -217,6 +211,7 @@
 #}
 
 class _ProductDefinition(xmllib.BaseNode):
+
     def __init__(self, attributes = None, nsMap = None, name = None):
         xmllib.BaseNode.__init__(self, attributes = attributes, nsMap = nsMap,
                                  name = name)
@@ -287,3 +282,28 @@
                 byDefault = byDefault,
                 imageType = imgType)
             builds.append(pyobj)
+
+class _ImageTypeFakeNode(object):
+    """Internal class for emulating the interface expected by the node
+    dispatcher for creating image types"""
+    def __init__(self, name, fields = None):
+        self.name = name
+        self.fields = fields or {}
+
+    def getAbsoluteName(self):
+        """
+        @return: the absolute node name
+        @rtype: C{str}
+        """
+        return '{}%s' % self.name
+
+    def getAttribute(self, name):
+        """
+        Get an attribute by name
+        @param name: The attribute name
+        @type name: C{str}
+        @return: The attribute with the specified name, or C{None} if one
+        could not be found.
+        @rtype: C{str} or C{None}
+        """
+        return self.fields.get(name)
diff -r fc28ecbcc9a6 -r 3e239977fa8d rpath_common/proddef/imageTypes.py
--- a/rpath_common/proddef/imageTypes.py	Mon May 05 23:37:13 2008 -0400
+++ b/rpath_common/proddef/imageTypes.py	Tue May 06 11:16:09 2008 -0400
@@ -29,7 +29,7 @@
         'installLabelPath'  : (str, ),
     }
 
-    def __init__(self, node = None, fields = None):
+    def __init__(self, node = None):
         """
         Initialize an ImageType object, either from a Node, or from a
         dictionary of fields.
@@ -37,17 +37,12 @@
 
         self.fields = flds = {}
 
-        if node is None and fields is None:
+        if node is None:
             return
-
-        initFields = fields or {}
 
         for attrName, values in self._attributes.items():
             attrType = values[0]
-            if node is not None:
-                val = node.getAttribute(attrName)
-            else:
-                val = initFields.get(attrName)
+            val = node.getAttribute(attrName)
             if val is None:
                 continue
             if attrType == bool:

From misa@rpath.com Tue May  6 16:22:10 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m46GMAGb025918
	for <rpath-common-commits@lists.rpath.com>; Tue, 6 May 2008 16:22:10 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m46GM99K005917
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 12:22:09 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m46GM93c026090
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 12:22:09 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m46GM9i8011570
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 12:22:09 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m46GM9k5011565
	for rpath-common-commits@lists.rpath.com; Tue, 6 May 2008 12:22:09 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805061622.m46GM9k5011565@scc.eng.rpath.com>
Date: Tue, 06 May 2008 12:22:09 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: Fixed hg archive
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 06 May 2008 16:22:10 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       Makefile

Fixed hg archive

diff -r 3d219a8edc98 -r e3d2e35888af Makefile
--- a/Makefile	Tue May 06 09:27:10 2008 -0400
+++ b/Makefile	Tue May 06 12:22:06 2008 -0400
@@ -15,18 +15,9 @@
 all: default-subdirs default-all
 
 export TOPDIR = $(shell pwd)
-export DISTDIR = $(TOPDIR)/rbuild-$(VERSION)
+export DISTDIR = $(TOPDIR)/rpath-xmllib-$(VERSION)
 
 SUBDIRS=rpath_common pylint
-
-extra_files = \
-	Make.rules 		\
-	Makefile		\
-	Make.defs		\
-	NEWS			\
-	README			\
-	EULA_product_common.txt		\
-	LICENSE
 
 dist_files = $(extra_files)
 
@@ -46,15 +37,8 @@
 	$(MAKE) forcedist
 
 
-archive: $(dist_files)
-	rm -rf $(DISTDIR)
-	mkdir $(DISTDIR)
-	for d in $(SUBDIRS); do make -C $$d DIR=$$d dist || exit 1; done
-	for f in $(dist_files); do \
-		mkdir -p $(DISTDIR)/`dirname $$f`; \
-		cp -a $$f $(DISTDIR)/$$f; \
-	done; \
-	tar cjf $(DISTDIR).tar.bz2 `basename $(DISTDIR)`
+archive:
+	hg --config 'ui.archivemeta=False' archive --exclude .hgignore -t tbz2 $(DISTDIR).tar.bz2
 
 forcedist: archive
 
@@ -62,6 +46,7 @@
 	hg tag -f rbuild-$(VERSION)
 
 clean: clean-subdirs default-clean
+	@rm -rf $(DISTDIR).tar.bz2
 
 include Make.rules
 include Make.defs

From johnsonm@rpath.com Tue May  6 16:37:15 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m46GbFQE026145
	for <rpath-common-commits@lists.rpath.com>; Tue, 6 May 2008 16:37:15 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m46GbE8K007775
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 12:37:14 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m46GbEqf027299
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 12:37:14 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m46GbE6w012442
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 12:37:14 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m46GbEWT012437
	for rpath-common-commits@lists.rpath.com; Tue, 6 May 2008 12:37:14 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200805061637.m46GbEWT012437@scc.eng.rpath.com>
Date: Tue, 06 May 2008 12:37:14 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: fix typo
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 06 May 2008 16:37:15 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       rpath_common/xmllib/api1.py

fix typo

diff -r e3d2e35888af -r d13a070e4ac5 rpath_common/xmllib/api1.py
--- a/rpath_common/xmllib/api1.py	Tue May 06 12:22:06 2008 -0400
+++ b/rpath_common/xmllib/api1.py	Tue May 06 12:36:39 2008 -0400
@@ -498,7 +498,7 @@
     change the default behavior. You can choose to store children in a
     different way, instead of the default data structure of children.
 
-    EXAMLPLE::
+    EXAMPLE::
 
         binder = xmllib.DataBinder()
         class MyClass(BaseNode):

From misa@rpath.com Tue May  6 18:36:55 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m46Iat7t027716
	for <rpath-common-commits@lists.rpath.com>; Tue, 6 May 2008 18:36:55 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m46Iaseu020969
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 14:36:54 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m46IasMH003587
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 14:36:54 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m46IasFM018783
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 14:36:54 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m46IasrD018778
	for rpath-common-commits@lists.rpath.com; Tue, 6 May 2008 14:36:54 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805061836.m46IasrD018778@scc.eng.rpath.com>
Date: Tue, 06 May 2008 14:36:54 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Updated Makefile
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 06 May 2008 18:36:55 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       Makefile

Updated Makefile

diff -r 3e239977fa8d -r 6380a7961d91 Makefile
--- a/Makefile	Tue May 06 11:16:09 2008 -0400
+++ b/Makefile	Tue May 06 12:23:20 2008 -0400
@@ -15,18 +15,9 @@
 all: default-subdirs default-all
 
 export TOPDIR = $(shell pwd)
-export DISTDIR = $(TOPDIR)/rbuild-$(VERSION)
+export DISTDIR = $(TOPDIR)/rpath-product-definition-$(VERSION)
 
 SUBDIRS=rpath_common xsd doc pylint
-
-extra_files = \
-	Make.rules 		\
-	Makefile		\
-	Make.defs		\
-	NEWS			\
-	README			\
-	EULA_product_common.txt		\
-	LICENSE
 
 dist_files = $(extra_files)
 
@@ -46,15 +37,8 @@
 	$(MAKE) forcedist
 
 
-archive: $(dist_files)
-	rm -rf $(DISTDIR)
-	mkdir $(DISTDIR)
-	for d in $(SUBDIRS); do make -C $$d DIR=$$d dist || exit 1; done
-	for f in $(dist_files); do \
-		mkdir -p $(DISTDIR)/`dirname $$f`; \
-		cp -a $$f $(DISTDIR)/$$f; \
-	done; \
-	tar cjf $(DISTDIR).tar.bz2 `basename $(DISTDIR)`
+archive:
+	hg --config 'ui.archivemeta=False' archive --exclude .hgignore -t tbz2 $(DISTDIR).tar.bz2
 
 forcedist: archive
 
@@ -62,6 +46,7 @@
 	hg tag -f rbuild-$(VERSION)
 
 clean: clean-subdirs default-clean
+	@rm -rf $(DISTDIR).tar.bz2
 
 include Make.rules
 include Make.defs

From misa@rpath.com Tue May  6 18:49:41 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m46Inf41027943
	for <rpath-common-commits@lists.rpath.com>; Tue, 6 May 2008 18:49:41 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m46InfVm022353
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 14:49:41 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m46InfuK004624
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 14:49:41 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m46InZqa019366
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 14:49:35 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m46InZf0019359
	for rpath-common-commits@lists.rpath.com; Tue, 6 May 2008 14:49:35 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805061849.m46InZf0019359@scc.eng.rpath.com>
Date: Tue, 06 May 2008 14:49:33 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Adding all .py files to the install
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 06 May 2008 18:49:42 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/Makefile

Adding all .py files to the install

diff -r 6380a7961d91 -r 1593ff0e4706 rpath_common/proddef/Makefile
--- a/rpath_common/proddef/Makefile	Tue May 06 12:23:20 2008 -0400
+++ b/rpath_common/proddef/Makefile	Tue May 06 14:49:19 2008 -0400
@@ -12,8 +12,7 @@
 # full details.
 #
 
-python_files =	__init__.py \
-		api1.py
+python_files =	$(wildcard *.py)
 
 dist_files = Makefile proddef_constants.py.in $(python_files)
 

From misa@rpath.com Tue May  6 19:26:35 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m46JQZJw028404
	for <rpath-common-commits@lists.rpath.com>; Tue, 6 May 2008 19:26:35 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m46JQY92026695
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 15:26:34 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m46JQY5W007564
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 15:26:34 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m46JQYku021442
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 15:26:34 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m46JQYj7021437
	for rpath-common-commits@lists.rpath.com; Tue, 6 May 2008 15:26:34 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805061926.m46JQYj7021437@scc.eng.rpath.com>
Date: Tue, 06 May 2008 15:26:34 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: Updated doc strings
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 06 May 2008 19:26:35 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/xmllib/api1.py

Updated doc strings

diff -r d13a070e4ac5 -r 6b16a10e32d7 rpath_common/xmllib/api1.py
--- a/rpath_common/xmllib/api1.py	Tue May 06 12:36:39 2008 -0400
+++ b/rpath_common/xmllib/api1.py	Tue May 06 15:26:31 2008 -0400
@@ -149,14 +149,22 @@
                 self._children.append(childNode.finalize())
 
     def iterChildren(self):
+        "Iterate over this node's children"
         if hasattr(self, '_childOrder'):
             return orderItems(self._children, self._childOrder)
         return iter(self._children)
 
     def finalize(self):
+        "Post-process this node (e.g. cast text to the expected type)"
         return self
 
     def characters(self, ch):
+        """Add character data to this node.
+        @param ch: Character data to be added
+        @type ch: C{str}
+        @return: self
+        @rtype: C{type(self)}
+        """
         if self._children:
             if isinstance(self._children[-1], unicode):
                 self._children[-1] += ch
@@ -167,9 +175,15 @@
         return self
 
     def getNamespaceMap(self):
+        "Return a copy of the namespace mapping"
         return self._nsMap.copy()
 
     def iterAttributes(self):
+        """
+        Iterate over this node's attributes.
+        @return: iterable of (attributeName, attributeValue)
+        @rtype: iterable of (attributeName, attributeValue) strings
+        """
         for nsName, nsVal in sorted(self._nsAttributes.items()):
             if nsName is None:
                 yield ('xmlns', nsVal)
@@ -182,14 +196,41 @@
                 yield ("%s:%s" % (nsName, attrName), attrVal)
 
     def iterNamespaces(self):
+        """
+        Iterate over this node's namespaces
+        @return: iterable of (namespaceAlias, namespaceValue), with a
+        C{namespaceAlias} equal to {None} for the default namespace.
+        @rtype: iterable of (namespaceAlias, namespaceValue) strings
+        """
         for nsName, nsVal in sorted(self._nsAttributes.items()):
             yield nsName, nsVal
 
     def getAttribute(self, name, namespace = None):
+        """
+        Get an attribute's value.
+        @param name: the attribute name
+        @type name: C{str}
+        @param namespace: the namespace alias for the attribute (or None for
+        the attribute with this name from the default namespace).
+        @type namespace: C{str} or C{None}
+        @return: the attribute's value
+        @rtype: C{str}
+        """
         return self._otherAttributes.get((namespace, name))
 
     def getAttributeByNamespace(self, name, namespace = None):
-        """Retrieve an attribute using its full namespace designation"""
+        """
+        Retrieve an attribute using its full namespace designation
+        @param name: the attribute name
+        @type name: C{str}
+        @param namespace: the full namespace for the attribute. Passing
+        C{None} is equivalent to calling C{getAttribute} with the name and no
+        namespace, i.e. the node's attribute will be returned only if no
+        default namespace is set.
+        @type namespace: C{str} or C{None}
+        @return: the attribute's value
+        @rtype: C{str}
+        """
         if namespace is None:
             # Nothing different from getAttribute
             return self.getAttribute(name)
@@ -204,36 +245,56 @@
         return None
 
     def getChildren(self, name, namespace = None):
+        """
+        Get a node's children, by name and (the optional) namespace.
+        @param name: the attribute name
+        @type name: C{str}
+        @param namespace: the namespace alias for the attribute (or None for
+        the attribute with this name from the default namespace).
+        @type namespace: C{str} or C{None}
+        @return: The children nodes with the specified name.
+        @rtype: C{list}
+        """
         tagName = unsplitNamespace(name, namespace)
         return [ x for x in self.iterChildren()
             if hasattr(x, 'getName') and x.getName() == tagName ]
 
     def getText(self):
+        "Return a node's character data"
         text = [ x for x in self._children if isinstance(x, (str, unicode)) ]
         if not text:
             return ''
         return text[0]
 
     #{ Methods for serializing Node objects
+    # pylint: disable-msg=C0111
+    # docstring inherited from parent class
     def _getName(self):
         if self._name[0] is None:
             return self._name[1]
         return "{%s}%s" % (self._nsMap[self._name[0]], self._name[1])
 
+    # pylint: disable-msg=C0111
+    # docstring inherited from parent class
     def _getLocalNamespaces(self):
         return self._nsAttributes
 
+    # pylint: disable-msg=C0111
+    # docstring inherited from parent class
     def _iterAttributes(self):
         for (nsName, attrName), attrVal in self._otherAttributes.items():
             attrName = self._buildElementTreeName(attrName, nsName)
             yield (attrName, attrVal)
 
+    # pylint: disable-msg=C0111
+    # docstring inherited from parent class
     def _iterChildren(self):
         return self.iterChildren()
     #}
 
     #{ Private methods
     def _setAttributes(self, attributes):
+        "Set a node's attributes"
         self._nsAttributes = {}
         self._otherAttributes = {}
         if attributes is None:
@@ -264,6 +325,7 @@
             self._otherAttributes[(nsName, attrName)] = attrVal
 
     def _buildElementTreeName(self, name, namespace = None):
+        "Convenience function for building a namespace-qualified node name"
         if namespace is None:
             return name
         return "{%s}%s" % (self._nsMap[namespace], name)
@@ -653,6 +715,17 @@
         self._nsMap = nsMap or {}
 
     def registerType(self, nodeType, name = None, namespace = None):
+        """
+        Register a class as a node handler.
+        @param nodeType: A node class to register
+        @type nodeType: C{class}
+        @param name: the node name for which C{dispatch} will instantiate the
+        node type class. If None, the name and namespace will be extracted by
+        calling the class-level method C{getTag} of the node type class.
+        @type name: C{str} or None
+        @param namespace: An optional namespace
+        @type namespace: C{str} or None
+        """
         if name is None:
             if not hasattr(nodeType, 'getTag'):
                 return
@@ -664,7 +737,8 @@
         self._dispatcher[key] = nodeType
 
     def registerClasses(self, module, baseClass):
-        """Register all classes that are a subclass of baseClass and are part
+        """
+        Register all classes that are a subclass of baseClass and are part
         of the module.
         @param module: The module in which supported classes will be looked up.
         @type module: module
@@ -679,8 +753,10 @@
                 self.registerType(symVal)
 
     def dispatch(self, node):
-        """Create objects for this node, based on the classes registered with
-        the dispatcher"""
+        """
+        Create objects for this node, based on the classes registered with
+        the dispatcher.
+        """
 
         absName = node.getAbsoluteName()
         if absName not in self._dispatcher:

From misa@rpath.com Tue May  6 19:34:33 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m46JYXhp028456
	for <rpath-common-commits@lists.rpath.com>; Tue, 6 May 2008 19:34:33 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m46JYWMs027407
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 15:34:33 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m46JYWgi008115
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 15:34:32 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m46JYW4x021881
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 15:34:32 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m46JYVas021871
	for rpath-common-commits@lists.rpath.com; Tue, 6 May 2008 15:34:31 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805061934.m46JYVas021871@scc.eng.rpath.com>
Date: Tue, 06 May 2008 15:34:31 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Serializing a build's name too
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 06 May 2008 19:34:33 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Serializing a build's name too

diff -r 1593ff0e4706 -r 615ddf37dafc rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Tue May 06 14:49:19 2008 -0400
+++ b/rpath_common/proddef/api1.py	Tue May 06 15:34:28 2008 -0400
@@ -278,6 +278,7 @@
             else:
                 byDefault = xmllib.BooleanNode.fromString(byDefault)
             pyobj = _Build(
+                name = node.getAttribute('name'),
                 baseFlavor = node.getAttribute('baseFlavor'),
                 byDefault = byDefault,
                 imageType = imgType)

From misa@rpath.com Tue May  6 21:26:13 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m46LQDqi030878
	for <rpath-common-commits@lists.rpath.com>; Tue, 6 May 2008 21:26:13 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m46LQDu7009816
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 17:26:13 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m46LQD74015597
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 17:26:13 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m46LQCNI026964
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 17:26:12 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m46LQCK1026948
	for rpath-common-commits@lists.rpath.com; Tue, 6 May 2008 17:26:12 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805062126.m46LQCK1026948@scc.eng.rpath.com>
Date: Tue, 06 May 2008 17:26:12 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: Internal classes can start with a leading
 underscore
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 06 May 2008 21:26:14 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       pylint/pylintrc

Internal classes can start with a leading underscore

diff -r 6b16a10e32d7 -r 1a0b411c9bad pylint/pylintrc
--- a/pylint/pylintrc	Tue May 06 15:26:31 2008 -0400
+++ b/pylint/pylintrc	Tue May 06 16:27:58 2008 -0400
@@ -1,6 +1,6 @@
 [BASIC]
 # Regular expression which should only match correct class names
-class-rgx=[A-Z][a-zA-Z0-9]+$
+class-rgx=[A-Z_][a-zA-Z0-9]+$
 
 # Regular expression which should only match correct function names
 function-rgx=[a-z_][a-zA-Z0-9]*$

From misa@rpath.com Tue May  6 21:26:15 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m46LQFbp030881
	for <rpath-common-commits@lists.rpath.com>; Tue, 6 May 2008 21:26:15 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m46LQEVn009821
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 17:26:14 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m46LQEPM015600
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 17:26:14 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m46LQEBm027005
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 17:26:14 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m46LQDdm026989
	for rpath-common-commits@lists.rpath.com; Tue, 6 May 2008 17:26:13 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805062126.m46LQDdm026989@scc.eng.rpath.com>
Date: Tue, 06 May 2008 17:26:13 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: Docstring updates; orderItems more efficient by
	using a hash
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 06 May 2008 21:26:15 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/xmllib/api1.py

Docstring updates; orderItems more efficient by using a hash

diff -r 1a0b411c9bad -r c40ac889701e rpath_common/xmllib/api1.py
--- a/rpath_common/xmllib/api1.py	Tue May 06 16:27:58 2008 -0400
+++ b/rpath_common/xmllib/api1.py	Tue May 06 16:28:56 2008 -0400
@@ -19,8 +19,6 @@
 """
 
 import StringIO
-import os
-import subprocess
 from xml import sax
 
 from lxml import etree
@@ -38,6 +36,8 @@
     Base class for an XML-serializable object
     """
 
+    # pylint: disable-msg=R0903
+    # Too few public methods (1/2): this is an interface
     def getElementTree(self, parent = None):
         """Any serializable object should implement the C{getElementTree}
         method, which returns a hierarchy of objects that represent the
@@ -98,9 +98,16 @@
     """Abstract node class for parsing XML data"""
     __slots__ = ['_children', '_nsMap', '_name', '_nsAttributes',
                  '_otherAttributes', ]
+
     def __init__(self, attributes = None, nsMap = None, name = None):
+        SerializableObject.__init__(self)
         self._children = []
         self._nsMap = nsMap or {}
+        self._nsAttributes = {}
+        self._otherAttributes = {}
+        # Prefer the class-based attribute if it is available
+        if not hasattr(self.__class__, '_name'):
+            self._name = (None, None)
         self._setAttributes(attributes)
         if name is not None:
             self.setName(name)
@@ -151,6 +158,8 @@
     def iterChildren(self):
         "Iterate over this node's children"
         if hasattr(self, '_childOrder'):
+            # pylint: disable-msg=E1101
+            # no '_childOrder' member: we just tested for that
             return orderItems(self._children, self._childOrder)
         return iter(self._children)
 
@@ -362,39 +371,76 @@
     _name = (None, 'int')
 
     def finalize(self):
+        "Convert the character data to an integer"
         text = self.getText()
         try:
             return int(text)
         except ValueError:
             return 0
 
+    # pylint: disable-msg=C0111
+    # docstring inherited from parent class
     def _iterChildren(self):
         yield str(self.finalize())
 
 class SerializableList(list):
+    """A List class that can be serialized to XML"""
+
+    tag = None
+
     def getElementTree(self, parent = None):
+        """Return a hierarchy of objects that represent the
+        structure of the XML document.
+
+        @param parent: An optional parent object.
+        @type parent: C{SerializableObject} instance
+        """
         elem = createElementTree(self._getName(), {}, {}, parent = parent)
         for child in self:
             child.getElementTree(parent = elem)
         return elem
 
+    # pylint: disable-msg=C0111
+    # docstring inherited from parent class
     def _getName(self):
         return self.tag
 
+# pylint: disable-msg=R0903
+# Too few public methods (1/2): this is an interface
 class SlotBasedSerializableObject(SerializableObject):
+    """
+    A serializable object that uses the slots for defining the data that
+    has to be serialized to XML
+    """
+    __slots__ = []
+    tag = None
+
+    # pylint: disable-msg=C0111
+    # docstring inherited from parent class
     def _getName(self):
         return self.tag
 
+    # pylint: disable-msg=C0111
+    # docstring inherited from parent class
     def _getLocalNamespaces(self):
         return {}
 
+    # pylint: disable-msg=C0111
+    # docstring inherited from parent class
     def _iterAttributes(self):
         return self._splitData()[0].items()
 
+    # pylint: disable-msg=C0111
+    # docstring inherited from parent class
     def _iterChildren(self):
         return self._splitData()[1]
 
     def _splitData(self):
+        """
+        Split attributes and child nodes from the slots
+        @return: A tuple (attributes, children)
+        @rtype: C{tuple}
+        """
         attrs = {}
         children = []
         for fName in self.__slots__:
@@ -406,7 +452,8 @@
                 continue
             else:
                 if not hasattr(fVal, "getElementTree"):
-                    raise XmlLibError("Expected an object implementing getElementTree")
+                    raise XmlLibError(
+                        "Expected an object implementing getElementTree")
                 children.append(fVal)
         return attrs, children
 
@@ -421,9 +468,12 @@
     _name = (None, 'string')
 
     def finalize(self):
+        "Convert the text data to a string"
         text = self.getText()
         return text
 
+    # pylint: disable-msg=C0111
+    # docstring inherited from parent class
     def _iterChildren(self):
         yield self.finalize()
 
@@ -438,8 +488,11 @@
     _name = (None, 'none')
 
     def finalize(self):
+        "Discard the character data"
         pass
 
+    # pylint: disable-msg=C0111
+    # docstring inherited from parent class
     def _iterChildren(self):
         return []
 
@@ -454,19 +507,34 @@
     _name = (None, 'bool')
 
     def finalize(self):
+        "Convert the character data to a boolean value"
         text = self.getText()
         return self.fromString(text)
 
     @staticmethod
     def fromString(stringVal):
+        """
+        Convert character data to a boolean value
+        @param stringVal: String value to be converted to boolean
+        @type stringVal: C{str}
+        @rtype: C{bool}
+        """
         if isinstance(stringVal, bool):
             return stringVal
         return stringVal.strip().upper() in ('TRUE', '1')
 
     @staticmethod
     def toString(boolVal):
+        """
+        Convert boolean value to character data.
+        @param boolVal: Boolean value to be converted
+        @type stringVal: C{bool}
+        @rtype: C{str}
+        """
         return boolVal and "true" or "false"
 
+    # pylint: disable-msg=C0111
+    # docstring inherited from parent class
     def _iterChildren(self):
         yield self.toString(self.finalize())
 
@@ -489,6 +557,17 @@
         sax.ContentHandler.__init__(self)
 
     def registerType(self, typeClass, name = None, namespace = None):
+        """
+        Register a class as a node handler.
+        @param typeClass: A node class to register
+        @type typeClass: C{class}
+        @param name: the node name for which C{dispatch} will instantiate the
+        node type class. If None, the name and namespace will be extracted by
+        calling the class-level method C{getTag} of the node type class.
+        @type name: C{str} or None
+        @param namespace: An optional namespace
+        @type namespace: C{str} or None
+        """
         if name is None:
             name = typeClass.name
         if namespace is None:
@@ -497,6 +576,7 @@
         self.typeDict[(namespace, name)] = typeClass
 
     def startElement(self, name, attrs):
+        "SAX parser callback invoked when a start element event is emitted"
         classType = GenericNode
         nameSpace, tagName = splitNamespace(name)
         if (nameSpace, tagName) in self.typeDict:
@@ -511,13 +591,16 @@
         self.stack.append(newNode)
 
     def endElement(self, name):
+        "SAX parser callback invoked when an end element event is emitted"
         elem = self.stack.pop()
+        assert(elem.getName() == name)
         if not self.stack:
             self.rootNode = elem.finalize()
         else:
             self.stack[-1].addChild(elem)
 
     def characters(self, ch):
+        "SAX parser callback invoked when character data is found"
         elem = self.stack[-1]
         elem.characters(ch)
 
@@ -635,7 +718,8 @@
         self.contentHandler.rootNode = None
         return rootNode
 
-    def toXml(self, obj, prettyPrint = True):
+    @classmethod
+    def toXml(cls, obj, prettyPrint = True):
         """
         Serialize an object to XML.
 
@@ -654,7 +738,8 @@
         return res
 
 def splitNamespace(tag):
-    """Splits the namespace out of the tag.
+    """
+    Splits the namespace out of the tag.
     @param tag: tag
     @type tag: C{str}
     @return: A tuple with the namespace (set to None if not present) and
@@ -667,22 +752,54 @@
     return arr[0], arr[1]
 
 def unsplitNamespace(name, namespace = None):
+    """
+    @param name: Name
+    @type name: C{str}
+    @param namespace: Namespace
+    @type namespace: C{str} or None
+    @return: the name qualified with the namespace
+    @rtype: C{str}
+    """
     if namespace is None:
         return name
     return "%s:%s" % (namespace, name)
 
 def orderItems(items, order):
+    """
+    Reorder a list of items based on the order passed in as a list
+    @param items:
+    @type items: iterable
+    @param order: list defining the items' ordering
+    @type order: C{list}
+    @return: the ordered list, unknown elements at the end
+    @rtype: C{list}
+    """
     # sort key is a three part tuple. each element maps to these rules:
     # element one reflects if we know how to order the element.
     # element two reflects the element's position in the ordering.
     # element three sorts everything else by simply providing the original
     # item (aka. default ordering of sort)
+    orderHash = dict((y, i) for i, y in enumerate(order))
     return sorted(items,
-        key = lambda x: (x.getName() not in order,
-                         x.getName() in order and order.index(x.getName()),
+        key = lambda x: (x.getName() not in orderHash,
+                         orderHash.get(x.getName()),
                          x.getName()))
 
 def createElementTree(name, attrs, nsMap = None, parent = None):
+    """
+    Create an element tree.
+
+    @param name: Node name
+    @type name: C{str}
+    @param attrs: Node attributes
+    @type attrs: C{dict}
+    @param nsMap: A namespace alias to namespace mapping
+    @type nsMap: C{dict}
+    @param parent: An optional parent object.
+    @type parent: C{etree.Element} instance
+    @return: an element tree
+    @rtype: C{etree.Element} instance
+    """
     if nsMap is None:
         nsMap = {}
     if parent is not None:
@@ -714,11 +831,11 @@
         self._dispatcher = {}
         self._nsMap = nsMap or {}
 
-    def registerType(self, nodeType, name = None, namespace = None):
+    def registerType(self, typeClass, name = None, namespace = None):
         """
         Register a class as a node handler.
-        @param nodeType: A node class to register
-        @type nodeType: C{class}
+        @param typeClass: A node class to register
+        @type typeClass: C{class}
         @param name: the node name for which C{dispatch} will instantiate the
         node type class. If None, the name and namespace will be extracted by
         calling the class-level method C{getTag} of the node type class.
@@ -727,14 +844,14 @@
         @type namespace: C{str} or None
         """
         if name is None:
-            if not hasattr(nodeType, 'getTag'):
+            if not hasattr(typeClass, 'getTag'):
                 return
-            ns, name = splitNamespace(nodeType.getTag())
+            ns, name = splitNamespace(typeClass.getTag())
         else:
             ns, name = namespace, name
 
         key = "{%s}%s" % (self._nsMap.get(ns, ''), name)
-        self._dispatcher[key] = nodeType
+        self._dispatcher[key] = typeClass
 
     def registerClasses(self, module, baseClass):
         """

From misa@rpath.com Tue May  6 21:26:16 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m46LQG28030890
	for <rpath-common-commits@lists.rpath.com>; Tue, 6 May 2008 21:26:16 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m46LQFkt009825
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 17:26:15 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m46LQFAp015604
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 17:26:15 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m46LQFle027042
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 17:26:15 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m46LQE3V027027
	for rpath-common-commits@lists.rpath.com; Tue, 6 May 2008 17:26:14 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805062126.m46LQE3V027027@scc.eng.rpath.com>
Date: Tue, 06 May 2008 17:26:14 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: Fixed epydoc warnings, added epydoc separators
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 06 May 2008 21:26:16 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/xmllib/__init__.py rpath_common/xmllib/api1.py

Fixed epydoc warnings, added epydoc separators

diff -r c40ac889701e -r ce16ec6480ac rpath_common/xmllib/__init__.py
--- a/rpath_common/xmllib/__init__.py	Tue May 06 16:28:56 2008 -0400
+++ b/rpath_common/xmllib/__init__.py	Tue May 06 17:10:23 2008 -0400
@@ -12,7 +12,7 @@
 # full details.
 #
 """
-The rPath Common Library Module for XML parsing
+The rPath Common Library Module for XML parsing.
 
 This module provides a stable interface for reading and writing
 rPath-generated XML files.  This interface will be
diff -r c40ac889701e -r ce16ec6480ac rpath_common/xmllib/api1.py
--- a/rpath_common/xmllib/api1.py	Tue May 06 16:28:56 2008 -0400
+++ b/rpath_common/xmllib/api1.py	Tue May 06 17:10:23 2008 -0400
@@ -340,6 +340,7 @@
         return "{%s}%s" % (self._nsMap[namespace], name)
     #}
 
+#{ Specialized nodes
 class BaseNode(_AbstractNode):
     """Base node for parsing XML data"""
 
@@ -382,6 +383,7 @@
     # docstring inherited from parent class
     def _iterChildren(self):
         yield str(self.finalize())
+#}
 
 class SerializableList(list):
     """A List class that can be serialized to XML"""
@@ -528,7 +530,7 @@
         """
         Convert boolean value to character data.
         @param boolVal: Boolean value to be converted
-        @type stringVal: C{bool}
+        @type boolVal: C{bool}
         @rtype: C{str}
         """
         return boolVal and "true" or "false"
@@ -702,8 +704,8 @@
     def parseFile(self, stream):
         """
         Parse an XML file.
-        @param data: the XML file to be parsed
-        @type data: C{file}
+        @param stream: the XML file to be parsed
+        @type stream: C{file}
         @return: a Node object
         @rtype: A previosly registered class (using C{registerType} or a
         C{BaseNode}.

From misa@rpath.com Tue May  6 21:26:17 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m46LQHao030893
	for <rpath-common-commits@lists.rpath.com>; Tue, 6 May 2008 21:26:17 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m46LQHGc009836
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 17:26:17 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m46LQG2f015611
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 17:26:16 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m46LQGqf027097
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 17:26:16 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m46LQFoK027086
	for rpath-common-commits@lists.rpath.com; Tue, 6 May 2008 17:26:15 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805062126.m46LQFoK027086@scc.eng.rpath.com>
Date: Tue, 06 May 2008 17:26:15 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: Shuffling code around - no real change
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 06 May 2008 21:26:17 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/xmllib/api1.py

Shuffling code around - no real change

diff -r ce16ec6480ac -r 16820396dac2 rpath_common/xmllib/api1.py
--- a/rpath_common/xmllib/api1.py	Tue May 06 17:10:23 2008 -0400
+++ b/rpath_common/xmllib/api1.py	Tue May 06 17:11:23 2008 -0400
@@ -383,81 +383,6 @@
     # docstring inherited from parent class
     def _iterChildren(self):
         yield str(self.finalize())
-#}
-
-class SerializableList(list):
-    """A List class that can be serialized to XML"""
-
-    tag = None
-
-    def getElementTree(self, parent = None):
-        """Return a hierarchy of objects that represent the
-        structure of the XML document.
-
-        @param parent: An optional parent object.
-        @type parent: C{SerializableObject} instance
-        """
-        elem = createElementTree(self._getName(), {}, {}, parent = parent)
-        for child in self:
-            child.getElementTree(parent = elem)
-        return elem
-
-    # pylint: disable-msg=C0111
-    # docstring inherited from parent class
-    def _getName(self):
-        return self.tag
-
-# pylint: disable-msg=R0903
-# Too few public methods (1/2): this is an interface
-class SlotBasedSerializableObject(SerializableObject):
-    """
-    A serializable object that uses the slots for defining the data that
-    has to be serialized to XML
-    """
-    __slots__ = []
-    tag = None
-
-    # pylint: disable-msg=C0111
-    # docstring inherited from parent class
-    def _getName(self):
-        return self.tag
-
-    # pylint: disable-msg=C0111
-    # docstring inherited from parent class
-    def _getLocalNamespaces(self):
-        return {}
-
-    # pylint: disable-msg=C0111
-    # docstring inherited from parent class
-    def _iterAttributes(self):
-        return self._splitData()[0].items()
-
-    # pylint: disable-msg=C0111
-    # docstring inherited from parent class
-    def _iterChildren(self):
-        return self._splitData()[1]
-
-    def _splitData(self):
-        """
-        Split attributes and child nodes from the slots
-        @return: A tuple (attributes, children)
-        @rtype: C{tuple}
-        """
-        attrs = {}
-        children = []
-        for fName in self.__slots__:
-            fVal = getattr(self, fName)
-            if isinstance(fVal, (bool, int, str, unicode)):
-                attrs[fName] = fVal
-            elif fVal is None:
-                # Skip None values
-                continue
-            else:
-                if not hasattr(fVal, "getElementTree"):
-                    raise XmlLibError(
-                        "Expected an object implementing getElementTree")
-                children.append(fVal)
-        return attrs, children
 
 class StringNode(BaseNode):
     """
@@ -539,6 +464,82 @@
     # docstring inherited from parent class
     def _iterChildren(self):
         yield self.toString(self.finalize())
+
+#}
+
+class SerializableList(list):
+    """A List class that can be serialized to XML"""
+
+    tag = None
+
+    def getElementTree(self, parent = None):
+        """Return a hierarchy of objects that represent the
+        structure of the XML document.
+
+        @param parent: An optional parent object.
+        @type parent: C{SerializableObject} instance
+        """
+        elem = createElementTree(self._getName(), {}, {}, parent = parent)
+        for child in self:
+            child.getElementTree(parent = elem)
+        return elem
+
+    # pylint: disable-msg=C0111
+    # docstring inherited from parent class
+    def _getName(self):
+        return self.tag
+
+# pylint: disable-msg=R0903
+# Too few public methods (1/2): this is an interface
+class SlotBasedSerializableObject(SerializableObject):
+    """
+    A serializable object that uses the slots for defining the data that
+    has to be serialized to XML
+    """
+    __slots__ = []
+    tag = None
+
+    # pylint: disable-msg=C0111
+    # docstring inherited from parent class
+    def _getName(self):
+        return self.tag
+
+    # pylint: disable-msg=C0111
+    # docstring inherited from parent class
+    def _getLocalNamespaces(self):
+        return {}
+
+    # pylint: disable-msg=C0111
+    # docstring inherited from parent class
+    def _iterAttributes(self):
+        return self._splitData()[0].items()
+
+    # pylint: disable-msg=C0111
+    # docstring inherited from parent class
+    def _iterChildren(self):
+        return self._splitData()[1]
+
+    def _splitData(self):
+        """
+        Split attributes and child nodes from the slots
+        @return: A tuple (attributes, children)
+        @rtype: C{tuple}
+        """
+        attrs = {}
+        children = []
+        for fName in self.__slots__:
+            fVal = getattr(self, fName)
+            if isinstance(fVal, (bool, int, str, unicode)):
+                attrs[fName] = fVal
+            elif fVal is None:
+                # Skip None values
+                continue
+            else:
+                if not hasattr(fVal, "getElementTree"):
+                    raise XmlLibError(
+                        "Expected an object implementing getElementTree")
+                children.append(fVal)
+        return attrs, children
 
 class BindingHandler(sax.ContentHandler):
     """

From misa@rpath.com Tue May  6 21:26:19 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m46LQJ3V030902
	for <rpath-common-commits@lists.rpath.com>; Tue, 6 May 2008 21:26:19 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m46LQJ2J009845
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 17:26:19 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m46LQIH9015617
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 17:26:18 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m46LQIMo027136
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 17:26:18 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m46LQHno027129
	for rpath-common-commits@lists.rpath.com; Tue, 6 May 2008 17:26:17 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805062126.m46LQHno027129@scc.eng.rpath.com>
Date: Tue, 06 May 2008 17:26:17 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: Added delimiters for classes
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 06 May 2008 21:26:19 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/xmllib/api1.py

Added delimiters for classes

diff -r 16820396dac2 -r d36779f936b5 rpath_common/xmllib/api1.py
--- a/rpath_common/xmllib/api1.py	Tue May 06 17:11:23 2008 -0400
+++ b/rpath_common/xmllib/api1.py	Tue May 06 17:25:11 2008 -0400
@@ -31,6 +31,7 @@
     "Raised when a reference to an undefined namespace is found"
 #}
 
+#{ Base classes
 class SerializableObject(object):
     """
     Base class for an XML-serializable object
@@ -340,10 +341,11 @@
         return "{%s}%s" % (self._nsMap[namespace], name)
     #}
 
-#{ Specialized nodes
 class BaseNode(_AbstractNode):
     """Base node for parsing XML data"""
+#}
 
+#{ Specialized nodes
 class GenericNode(BaseNode):
     """
     Base node for all data classes used by SAX handler. Neither this class,
@@ -467,6 +469,8 @@
 
 #}
 
+
+#{ Specialized objects that can be serialized
 class SerializableList(list):
     """A List class that can be serialized to XML"""
 
@@ -540,7 +544,9 @@
                         "Expected an object implementing getElementTree")
                 children.append(fVal)
         return attrs, children
+#}
 
+#{ Binding classes
 class BindingHandler(sax.ContentHandler):
     """
     Sax Content handler class.
@@ -739,6 +745,7 @@
         res = etree.tostring(tree, pretty_print = prettyPrint,
             xml_declaration = True, encoding = 'UTF-8')
         return res
+#}
 
 def splitNamespace(tag):
     """

From misa@rpath.com Tue May  6 22:09:15 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m46M9FAg031527
	for <rpath-common-commits@lists.rpath.com>; Tue, 6 May 2008 22:09:15 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m46M9F3w014315
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 18:09:15 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m46M9EwD018613
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 18:09:14 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m46M9EYB029035
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 18:09:14 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m46M9Eab029017
	for rpath-common-commits@lists.rpath.com; Tue, 6 May 2008 18:09:14 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805062209.m46M9Eab029017@scc.eng.rpath.com>
Date: Tue, 06 May 2008 18:09:14 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Better exception to raise
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 06 May 2008 22:09:15 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Better exception to raise

diff -r 615ddf37dafc -r 6e36f3ca78de rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Tue May 06 15:34:28 2008 -0400
+++ b/rpath_common/proddef/api1.py	Tue May 06 16:37:36 2008 -0400
@@ -271,7 +271,7 @@
                 if imgType is not None:
                     break
             if imgType is None:
-                raise Exception("")
+                raise UnsupportedImageType(subNode.getName())
             byDefault = node.getAttribute('byDefault')
             if byDefault is None:
                 byDefault = True

From misa@rpath.com Tue May  6 22:09:16 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m46M9GGJ031530
	for <rpath-common-commits@lists.rpath.com>; Tue, 6 May 2008 22:09:16 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m46M9GUx014320
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 18:09:16 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m46M9FHU018623
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 18:09:15 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m46M9FHD029067
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 18:09:15 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m46M9FJB029057
	for rpath-common-commits@lists.rpath.com; Tue, 6 May 2008 18:09:15 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805062209.m46M9FJB029057@scc.eng.rpath.com>
Date: Tue, 06 May 2008 18:09:15 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Getting rid of the inner class monstruozity
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 06 May 2008 22:09:16 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Getting rid of the inner class monstruozity

diff -r 6e36f3ca78de -r bf86b8ac20b9 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Tue May 06 16:37:36 2008 -0400
+++ b/rpath_common/proddef/api1.py	Tue May 06 17:38:47 2008 -0400
@@ -96,21 +96,17 @@
         """Serialize the current object"""
         baseFlavor = xmllib.StringNode(name = 'baseFlavor')
         baseFlavor.characters(self.baseFlavor)
-        class N(xmllib.BaseNode):
-            def iterChildren(slf):
-                return [ baseFlavor,
-                         self.stages,
-                         self.upstreamSources,
-                         self.buildDefinition ]
         attrs = {'version' : self.version,
                  'xmlns' : self.defaultNamespace,
                  'xmlns:xsi' : self.xmlSchemaNamespace,
                  "xsi:schemaLocation" : self.xmlSchemaLocation,
         }
         nameSpaces = {}
-        n = N(attrs, nameSpaces, name = "productDefinition")
+        serObj = _ProductDefinitionSerialization("productDefinition",
+            attrs, nameSpaces, baseFlavor, self.stages, self.upstreamSources,
+            self.buildDefinition)
         binder = xmllib.DataBinder()
-        stream.write(binder.toXml(n))
+        stream.write(binder.toXml(serObj))
 
     def getBaseFlavor(self):
         return self.baseFlavor
@@ -284,6 +280,21 @@
                 imageType = imgType)
             builds.append(pyobj)
 
+class _ProductDefinitionSerialization(xmllib.BaseNode):
+    def __init__(self, name, attrs, namespaces,
+                 baseFlavor, stages, upstreamSources, buildDefinition):
+        xmllib.BaseNode.__init__(self, attrs, namespaces, name = name)
+        self.baseFlavor = baseFlavor
+        self.stages = stages
+        self.upstreamSources = upstreamSources
+        self.buildDefinition = buildDefinition
+
+    def iterChildren(self):
+        return [ self.baseFlavor,
+                 self.stages,
+                 self.upstreamSources,
+                 self.buildDefinition ]
+
 class _ImageTypeFakeNode(object):
     """Internal class for emulating the interface expected by the node
     dispatcher for creating image types"""

From misa@rpath.com Tue May  6 22:09:17 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m46M9HMS031536
	for <rpath-common-commits@lists.rpath.com>; Tue, 6 May 2008 22:09:17 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m46M9Hf3014326
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 18:09:17 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m46M9GWT018639
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 18:09:16 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m46M9Gnr029115
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 18:09:16 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m46M9Glt029094
	for rpath-common-commits@lists.rpath.com; Tue, 6 May 2008 18:09:16 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805062209.m46M9Glt029094@scc.eng.rpath.com>
Date: Tue, 06 May 2008 18:09:16 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: s/kls/cls/
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 06 May 2008 22:09:17 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

s/kls/cls/

diff -r bf86b8ac20b9 -r c91cbd297767 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Tue May 06 17:38:47 2008 -0400
+++ b/rpath_common/proddef/api1.py	Tue May 06 17:39:25 2008 -0400
@@ -138,7 +138,7 @@
         self.buildDefinition.append(obj)
 
     @classmethod
-    def imageType(kls, name, fields = None):
+    def imageType(cls, name, fields = None):
         """
         Image type factory. Given an image type name, it will instantiate an
         object of the proper type.
@@ -149,7 +149,7 @@
         @raise UnsupportedImageType: when an unsupported image type is passed
         """
         fnode = _ImageTypeFakeNode(name, fields or {})
-        obj = kls._imageTypeDispatcher.dispatch(fnode)
+        obj = cls._imageTypeDispatcher.dispatch(fnode)
         if obj is None:
             raise UnsupportedImageType(name)
         return obj

From misa@rpath.com Tue May  6 22:09:19 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m46M9JCh031545
	for <rpath-common-commits@lists.rpath.com>; Tue, 6 May 2008 22:09:19 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m46M9JDO014336
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 18:09:19 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m46M9IVs018654
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 18:09:18 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m46M9IQI029156
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 18:09:18 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m46M9Imp029135
	for rpath-common-commits@lists.rpath.com; Tue, 6 May 2008 18:09:18 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805062209.m46M9Imp029135@scc.eng.rpath.com>
Date: Tue, 06 May 2008 18:09:17 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Updated pylintrc to accept
	underscore-prefixed classes
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 06 May 2008 22:09:19 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       pylint/pylintrc

Updated pylintrc to accept underscore-prefixed classes

diff -r c91cbd297767 -r ebdb4f8ff300 pylint/pylintrc
--- a/pylint/pylintrc	Tue May 06 17:39:25 2008 -0400
+++ b/pylint/pylintrc	Tue May 06 17:40:08 2008 -0400
@@ -1,6 +1,6 @@
 [BASIC]
 # Regular expression which should only match correct class names
-class-rgx=[A-Z][a-zA-Z0-9]+$
+class-rgx=[A-Z_][a-zA-Z0-9]+$
 
 # Regular expression which should only match correct function names
 function-rgx=[a-z_][a-zA-Z0-9]*$

From misa@rpath.com Tue May  6 22:09:20 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m46M9KqO031548
	for <rpath-common-commits@lists.rpath.com>; Tue, 6 May 2008 22:09:20 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m46M9KNQ014344
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 18:09:20 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m46M9JCd018660
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 18:09:19 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m46M9JYH029188
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 18:09:19 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m46M9JuC029178
	for rpath-common-commits@lists.rpath.com; Tue, 6 May 2008 18:09:19 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805062209.m46M9JuC029178@scc.eng.rpath.com>
Date: Tue, 06 May 2008 18:09:19 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Simplifying _ProductDefinitionSerialization
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 06 May 2008 22:09:20 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Simplifying _ProductDefinitionSerialization

diff -r ebdb4f8ff300 -r 0c983c4f2e76 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Tue May 06 17:40:08 2008 -0400
+++ b/rpath_common/proddef/api1.py	Tue May 06 17:47:38 2008 -0400
@@ -103,8 +103,8 @@
         }
         nameSpaces = {}
         serObj = _ProductDefinitionSerialization("productDefinition",
-            attrs, nameSpaces, baseFlavor, self.stages, self.upstreamSources,
-            self.buildDefinition)
+            attrs, nameSpaces, self)
+        serObj.baseFlavor = baseFlavor
         binder = xmllib.DataBinder()
         stream.write(binder.toXml(serObj))
 
@@ -194,6 +194,7 @@
 
     def __init__(self, name = None, baseFlavor = None,
                  imageType = None, byDefault = None):
+        xmllib.SlotBasedSerializableObject.__init__(self)
         self.name = name
         self.baseFlavor = baseFlavor
         self.imageType = imageType
@@ -281,13 +282,12 @@
             builds.append(pyobj)
 
 class _ProductDefinitionSerialization(xmllib.BaseNode):
-    def __init__(self, name, attrs, namespaces,
-                 baseFlavor, stages, upstreamSources, buildDefinition):
+    def __init__(self, name, attrs, namespaces, prodDef):
         xmllib.BaseNode.__init__(self, attrs, namespaces, name = name)
-        self.baseFlavor = baseFlavor
-        self.stages = stages
-        self.upstreamSources = upstreamSources
-        self.buildDefinition = buildDefinition
+        self.baseFlavor = prodDef.getBaseFlavor()
+        self.stages = prodDef.getStages()
+        self.upstreamSources = prodDef.getUpstreamSources()
+        self.buildDefinition = prodDef.getBuildDefinitions()
 
     def iterChildren(self):
         return [ self.baseFlavor,

From misa@rpath.com Tue May  6 22:09:21 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m46M9LwU031551
	for <rpath-common-commits@lists.rpath.com>; Tue, 6 May 2008 22:09:21 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m46M9La8014347
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 18:09:21 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m46M9KLn018665
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 18:09:20 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m46M9Kk0029224
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 18:09:20 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m46M9KvA029219
	for rpath-common-commits@lists.rpath.com; Tue, 6 May 2008 18:09:20 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805062209.m46M9KvA029219@scc.eng.rpath.com>
Date: Tue, 06 May 2008 18:09:20 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: More doc strings, fixing pylint warnings
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 06 May 2008 22:09:21 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

More doc strings, fixing pylint warnings

diff -r 0c983c4f2e76 -r 44460412e87f rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Tue May 06 17:47:38 2008 -0400
+++ b/rpath_common/proddef/api1.py	Tue May 06 18:08:59 2008 -0400
@@ -59,8 +59,10 @@
 
     def __init__(self, fromStream = None):
         """
-        Pass in either a dictionary as constructed in the example below, or an
-        xml string to create an instance.
+        Initialize a ProductDefinition object, getting data from the optional
+        XML stream.
+        @param fromStream: An optional XML string or file
+        @type fromStream: C{str} or C{file}
         """
 
         self._initFields()
@@ -71,6 +73,11 @@
             self.parseStream(fromStream)
 
     def parseStream(self, stream):
+        """
+        Initialize the current object from an XML stream.
+        @param stream: An XML stream
+        @type stream: C{file}
+        """
         self._initFields()
         binder = xmllib.DataBinder()
         # We need to dynamically create a class here, so we can set the proper
@@ -93,7 +100,11 @@
             # XXX We don't support changing the schema location for now
 
     def serialize(self, stream):
-        """Serialize the current object"""
+        """
+        Serialize the current object as an XML stream.
+        @param stream: stream to write the serialized object
+        @type stream: C{file}
+        """
         baseFlavor = xmllib.StringNode(name = 'baseFlavor')
         baseFlavor.characters(self.baseFlavor)
         attrs = {'version' : self.version,
@@ -109,30 +120,79 @@
         stream.write(binder.toXml(serObj))
 
     def getBaseFlavor(self):
+        """
+        @return: the base flavor
+        @rtype: C{str}
+        """
         return self.baseFlavor
 
     def setBaseFlavor(self, baseFlavor):
+        """
+        Set the base flavor.
+        @param baseFlavor: the base flavor
+        @type baseFlavor: C{str}
+        """
         self.baseFlavor = baseFlavor
 
     def getStages(self):
+        """
+        @return: the stages from this product definition
+        @rtype: C{list} of C{_Stage} objects
+        """
         return self.stages
 
     def addStage(self, name = None, label = None):
+        """
+        Add a stage.
+        @param name: the stage's name
+        @type name: C{str} or C{None}
+        @param label: Label for the stage
+        @type label: C{str} or C{None}
+        """
         obj = _Stage(name = name, label = label)
         self.stages.append(obj)
 
     def getUpstreamSources(self):
+        """
+        @return: the upstream sources from this product definition
+        @rtype: C{list} of C{_UpstreamSource} objects
+        """
         return self.upstreamSources
 
     def addUpstreamSource(self, troveName = None, label = None):
+        """
+        Add an upstream source.
+        @param troveName: the trove name for the upstream source.
+        @type name: C{str} or C{None}
+        @param label: Label for the upstream source
+        @type label: C{str} or C{None}
+        """
         obj = _UpstreamSource(troveName = troveName, label = label)
         self.upstreamSources.append(obj)
 
     def getBuildDefinitions(self):
+        """
+        @return: The build definitions from this product definition
+        @rtype: C{list} of C{_BuildDefinition} objects
+        """
         return self.buildDefinition
 
     def addBuildDefinition(self, name = None, baseFlavor = None,
                            byDefault = None, imageType = None):
+        """
+        Add a build definition.
+        Image types are specified by calling C{ProductDefinition.imageType}.
+        @param name: the name for the build definition
+        @type name: C{str} or C{None}
+        @param baseFlavor: the base flavor
+        @type baseFlavor: C{str}
+        @param byDefault: byDefault value
+        @type byDefault: C{bool}
+        @param imageType: an image type, as returned by
+        C{ProductDefinition.imageType}.
+        @type imageType: an instance of an C{imageTypes.ImageType_Base}
+        subclass.
+        """
         obj = _Build(name = name, baseFlavor = baseFlavor,
                                byDefault = byDefault, imageType = imageType)
         self.buildDefinition.append(obj)
@@ -154,7 +214,6 @@
             raise UnsupportedImageType(name)
         return obj
 
-
     def _initFields(self):
         self.baseFlavor = None
         self.stages = _Stages()
@@ -166,17 +225,24 @@
 class _Stages(xmllib.SerializableList):
     tag = "stages"
 
+# pylint: disable-msg=R0903
+# Too few public methods (1/2): this is an interface
 class _UpstreamSources(xmllib.SerializableList):
     tag = "upstreamSources"
 
+# pylint: disable-msg=R0903
+# Too few public methods (1/2): this is an interface
 class _BuildDefinition(xmllib.SerializableList):
     tag = "buildDefinition"
 
+# pylint: disable-msg=R0903
+# Too few public methods (1/2): this is an interface
 class _Stage(xmllib.SlotBasedSerializableObject):
     __slots__ = [ 'name', 'label' ]
     tag = "stage"
 
     def __init__(self, name = None, label = None):
+        xmllib.SlotBasedSerializableObject.__init__(self)
         self.name = name
         self.label = label
 
@@ -185,6 +251,7 @@
     tag = "upstreamSource"
 
     def __init__(self, troveName = None, label = None):
+        xmllib.SlotBasedSerializableObject.__init__(self)
         self.troveName = troveName
         self.label = label
 

From misa@rpath.com Tue May  6 22:27:44 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m46MRiI2031684
	for <rpath-common-commits@lists.rpath.com>; Tue, 6 May 2008 22:27:44 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m46MRiTk016034
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 18:27:44 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m46MRi0e019693
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 18:27:44 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m46MRhVL030051
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 6 May 2008 18:27:43 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m46MRhs0030046
	for rpath-common-commits@lists.rpath.com; Tue, 6 May 2008 18:27:43 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805062227.m46MRhs0030046@scc.eng.rpath.com>
Date: Tue, 06 May 2008 18:27:43 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: Simplified the setting of _name
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 06 May 2008 22:27:45 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/xmllib/api1.py

Simplified the setting of _name

diff -r d36779f936b5 -r 71a585503e82 rpath_common/xmllib/api1.py
--- a/rpath_common/xmllib/api1.py	Tue May 06 17:25:11 2008 -0400
+++ b/rpath_common/xmllib/api1.py	Tue May 06 18:27:40 2008 -0400
@@ -99,6 +99,7 @@
     """Abstract node class for parsing XML data"""
     __slots__ = ['_children', '_nsMap', '_name', '_nsAttributes',
                  '_otherAttributes', ]
+    _name = (None, None)
 
     def __init__(self, attributes = None, nsMap = None, name = None):
         SerializableObject.__init__(self)
@@ -106,9 +107,6 @@
         self._nsMap = nsMap or {}
         self._nsAttributes = {}
         self._otherAttributes = {}
-        # Prefer the class-based attribute if it is available
-        if not hasattr(self.__class__, '_name'):
-            self._name = (None, None)
         self._setAttributes(attributes)
         if name is not None:
             self.setName(name)
@@ -418,7 +416,6 @@
 
     def finalize(self):
         "Discard the character data"
-        pass
 
     # pylint: disable-msg=C0111
     # docstring inherited from parent class

From scott@rpath.com Wed May  7 14:21:25 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m47ELP79014468
	for <rpath-common-commits@lists.rpath.com>; Wed, 7 May 2008 14:21:25 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m47ELOl5021000
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 7 May 2008 10:21:25 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m47ELOB3013313
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 7 May 2008 10:21:24 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m47ELLl7003120
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 7 May 2008 10:21:23 -0400
Received: (from scott@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m47ELLYY003108
	for rpath-common-commits@lists.rpath.com; Wed, 7 May 2008 10:21:21 -0400
From: Scott Parkerson <scott@rpath.com>
Message-Id: <200805071421.m47ELLYY003108@scc.eng.rpath.com>
Date: Wed, 07 May 2008 10:21:21 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: ignore eclipse project files
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 07 May 2008 14:21:25 -0000

user:        Scott Parkerson <http://issues.rpath.com/>
files:       .hgignore

ignore eclipse project files

diff -r 44460412e87f -r ac4fb93dab59 .hgignore
--- a/.hgignore	Tue May 06 18:08:59 2008 -0400
+++ b/.hgignore	Wed May 07 10:09:37 2008 -0400
@@ -9,3 +9,4 @@
 rpath_common/xmllib
 ^pylint/reports/
 ^rpath-common-.*.tar.bz2
+^\..*project

From scott@rpath.com Wed May  7 14:21:27 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m47ELRMX014477
	for <rpath-common-commits@lists.rpath.com>; Wed, 7 May 2008 14:21:27 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m47ELRXf021014
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 7 May 2008 10:21:27 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m47ELR6F013320
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 7 May 2008 10:21:27 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m47ELQhZ003198
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 7 May 2008 10:21:26 -0400
Received: (from scott@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m47ELQSQ003193
	for rpath-common-commits@lists.rpath.com; Wed, 7 May 2008 10:21:26 -0400
From: Scott Parkerson <scott@rpath.com>
Message-Id: <200805071421.m47ELQSQ003193@scc.eng.rpath.com>
Date: Wed, 07 May 2008 10:21:26 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Add applianceIsoImage,
	xenOvaImage which were missing in original version
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 07 May 2008 14:21:28 -0000

tag:         tip
user:        Scott Parkerson <http://issues.rpath.com/>
files:       xsd/rpd-1.0.xsd

Add applianceIsoImage, xenOvaImage which were missing in original version

diff -r 92b1ff66784e -r c5d0a1300f20 xsd/rpd-1.0.xsd
--- a/xsd/rpd-1.0.xsd	Wed May 07 10:10:00 2008 -0400
+++ b/xsd/rpd-1.0.xsd	Wed May 07 10:20:53 2008 -0400
@@ -33,7 +33,7 @@
 
     <xsd:complexType name="stageListType">
         <xsd:sequence>
-                <xsd:element name="stage" type="stageType" minOccurs="1" maxOccurs="unbounded" />
+            <xsd:element name="stage" type="stageType" minOccurs="1" maxOccurs="unbounded" />
         </xsd:sequence>
     </xsd:complexType>
 
@@ -52,6 +52,17 @@
         <xsd:attributeGroup ref="common" />
         <xsd:attribute name="amiHugeDiskMountpoint" type="xsd:string" />
         <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="applianceIsoImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="maxIsoSize" type="xsd:positiveInteger" />
+        <xsd:attribute name="bugsUrl" type="xsd:string" />
+        <xsd:attribute name="showMediaCheck" type="xsd:boolean" />
+        <xsd:attribute name="betaNag" type="xsd:boolean" />
+        <xsd:attribute name="mediaTemplateTrove" type="xsd:string" />
+        <xsd:attribute name="anacondaCustomTrove" type="xsd:string" />
+        <xsd:attribute name="anacondaTemplatesTrove" type="xsd:string" />
     </xsd:complexType>
 
     <xsd:complexType name="installableIsoImageType">
@@ -117,6 +128,7 @@
         <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
         <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
         <xsd:attribute name="natNetworking" type="xsd:boolean" />
+        <xsd:attribute name="vmMemory" type="xsd:nonNegativeInteger" />
     </xsd:complexType>
 
     <xsd:complexType name="vmwareImageType">
@@ -136,6 +148,13 @@
         <xsd:attribute name="vmMemory" type="xsd:nonNegativeInteger" />
     </xsd:complexType>
 
+    <xsd:complexType name="xenOvaImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="vmMemory" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
     <xsd:complexType name="buildDefinitionType">
         <xsd:sequence>
             <xsd:element name="build" type="rpd:buildType" minOccurs="1" maxOccurs="unbounded" />
@@ -145,6 +164,7 @@
     <xsd:complexType name="buildType">
         <xsd:choice>
             <xsd:element name="amiImage" type="rpd:amiImageType" />
+            <xsd:element name="applianceIsoImage" type="rpd:applianceIsoImageType" />
             <xsd:element name="installableIsoImage" type="rpd:installableIsoImageType" />
             <xsd:element name="liveIsoImage" type="rpd:liveIsoImageType" />
             <xsd:element name="netbootImage" type="rpd:netbootImageType" />
@@ -155,6 +175,7 @@
             <xsd:element name="vhdImage" type="rpd:vhdImageType" />
             <xsd:element name="vmwareImage" type="rpd:vmwareImageType" />
             <xsd:element name="vmwareEsxImage" type="rpd:vmwareEsxImageType" />
+            <xsd:element name="xenOvaImage" type="rpd:xenOvaImageType" />
         </xsd:choice>
         <xsd:attribute name="baseFlavor" type="rpd:flavorStringType" />
         <xsd:attribute name="byDefault" type="xsd:boolean" default="true" />

From scott@rpath.com Wed May  7 16:01:55 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m47G1tCV016405
	for <rpath-common-commits@lists.rpath.com>; Wed, 7 May 2008 16:01:55 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m47G1tsT031490
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 7 May 2008 12:01:55 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m47G1tWU019825
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 7 May 2008 12:01:55 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m47G1sBt009284
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 7 May 2008 12:01:54 -0400
Received: (from scott@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m47G1smI009280
	for rpath-common-commits@lists.rpath.com; Wed, 7 May 2008 12:01:54 -0400
From: Scott Parkerson <scott@rpath.com>
Message-Id: <200805071601.m47G1smI009280@scc.eng.rpath.com>
Date: Wed, 07 May 2008 12:01:54 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: add imageGroup; refactor specialTroves
	attributes, cleanups
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 07 May 2008 16:01:56 -0000

tag:         tip
user:        Scott Parkerson <http://issues.rpath.com/>
files:       xsd/rpd-1.0.xsd

add imageGroup; refactor specialTroves attributes, cleanups

diff -r c5d0a1300f20 -r 23dffb29712b xsd/rpd-1.0.xsd
--- a/xsd/rpd-1.0.xsd	Wed May 07 10:20:53 2008 -0400
+++ b/xsd/rpd-1.0.xsd	Wed May 07 12:01:51 2008 -0400
@@ -6,14 +6,20 @@
         xmlns:rpd="http://www.rpath.com/permanent/rpd-1.0.xsd"
         xmlns="http://www.rpath.com/permanent/rpd-1.0.xsd">
 
-   <xsd:attributeGroup name="common">
+    <xsd:attributeGroup name="common">
        <xsd:attribute name="name" type="xsd:string" />
        <xsd:attribute name="autoResolve" type="xsd:boolean" />
        <xsd:attribute name="baseFileName" type="xsd:string" />
        <xsd:attribute name="installLabelPath" type="xsd:string" />
-   </xsd:attributeGroup>
+    </xsd:attributeGroup>
 
-   <xsd:simpleType name="troveSpecType">
+    <xsd:attributeGroup name="specialIsoTroves">
+        <xsd:attribute name="mediaTemplateTrove" type="rpd:troveSpecType" />
+        <xsd:attribute name="anacondaCustomTrove" type="rpd:troveSpecType" />
+        <xsd:attribute name="anacondaTemplatesTrove" type="rpd:troveSpecType" />
+    </xsd:attributeGroup>
+
+    <xsd:simpleType name="troveSpecType">
         <xsd:restriction base="xsd:string"></xsd:restriction>
         <!-- TODO: make a proper xsd:restriction here to validate troveSpecs -->
     </xsd:simpleType>
@@ -27,8 +33,8 @@
     </xsd:simpleType>
 
     <xsd:complexType name="stageType">
-        <xsd:attribute name="name" type="xsd:string"></xsd:attribute>
-        <xsd:attribute name="label" type="xsd:string"></xsd:attribute>
+        <xsd:attribute name="name" type="xsd:string" />
+        <xsd:attribute name="label" type="xsd:string" />
     </xsd:complexType>
 
     <xsd:complexType name="stageListType">
@@ -38,8 +44,8 @@
     </xsd:complexType>
 
     <xsd:complexType name="upstreamSourceType">
-        <xsd:attribute name="troveName" type="xsd:string"></xsd:attribute>
-        <xsd:attribute name="label" type="xsd:string"></xsd:attribute>
+        <xsd:attribute name="troveName" type="xsd:string" />
+        <xsd:attribute name="label" type="xsd:string" />
     </xsd:complexType>
 
     <xsd:complexType name="upstreamSourceListType">
@@ -60,9 +66,7 @@
         <xsd:attribute name="bugsUrl" type="xsd:string" />
         <xsd:attribute name="showMediaCheck" type="xsd:boolean" />
         <xsd:attribute name="betaNag" type="xsd:boolean" />
-        <xsd:attribute name="mediaTemplateTrove" type="xsd:string" />
-        <xsd:attribute name="anacondaCustomTrove" type="xsd:string" />
-        <xsd:attribute name="anacondaTemplatesTrove" type="xsd:string" />
+        <xsd:attributeGroup ref="specialIsoTroves" />
     </xsd:complexType>
 
     <xsd:complexType name="installableIsoImageType">
@@ -71,9 +75,7 @@
         <xsd:attribute name="bugsUrl" type="xsd:string" />
         <xsd:attribute name="showMediaCheck" type="xsd:boolean" />
         <xsd:attribute name="betaNag" type="xsd:boolean" />
-        <xsd:attribute name="mediaTemplateTrove" type="xsd:string" />
-        <xsd:attribute name="anacondaCustomTrove" type="xsd:string" />
-        <xsd:attribute name="anacondaTemplatesTrove" type="xsd:string" />
+        <xsd:attributeGroup ref="specialIsoTroves" />
     </xsd:complexType>
 
     <xsd:complexType name="liveIsoImageType">
@@ -179,11 +181,13 @@
         </xsd:choice>
         <xsd:attribute name="baseFlavor" type="rpd:flavorStringType" />
         <xsd:attribute name="byDefault" type="xsd:boolean" default="true" />
+        <xsd:attribute name="imageGroup" type="rpd:troveSpecType" />
     </xsd:complexType>
 
     <xsd:element name="productDefinition">
         <xsd:complexType>
             <xsd:sequence>
+                <xsd:element name="imageGroup" type="rpd:troveSpecType" />
                 <xsd:element name="baseFlavor" type="rpd:flavorStringType" />
                 <xsd:element name="stages" type="rpd:stageListType" />
                 <xsd:element name="upstreamSources" type="rpd:upstreamSourceListType" />

From scott@rpath.com Wed May  7 18:06:10 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m47I691W018880
	for <rpath-common-commits@lists.rpath.com>; Wed, 7 May 2008 18:06:09 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m47I699s018911
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 7 May 2008 14:06:09 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m47I69nd029594
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 7 May 2008 14:06:09 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m47I69M7016345
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 7 May 2008 14:06:09 -0400
Received: (from scott@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m47I690t016340
	for rpath-common-commits@lists.rpath.com; Wed, 7 May 2008 14:06:09 -0400
From: Scott Parkerson <scott@rpath.com>
Message-Id: <200805071806.m47I690t016340@scc.eng.rpath.com>
Date: Wed, 07 May 2008 14:06:09 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: add stages to builds; remove byDefault
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 07 May 2008 18:06:10 -0000

tag:         tip
user:        Scott Parkerson <http://issues.rpath.com/>
files:       xsd/rpd-1.0.xsd

add stages to builds; remove byDefault

diff -r 23dffb29712b -r 00b61db1ebba xsd/rpd-1.0.xsd
--- a/xsd/rpd-1.0.xsd	Wed May 07 12:01:51 2008 -0400
+++ b/xsd/rpd-1.0.xsd	Wed May 07 14:04:57 2008 -0400
@@ -164,23 +164,29 @@
     </xsd:complexType>
 
     <xsd:complexType name="buildType">
-        <xsd:choice>
-            <xsd:element name="amiImage" type="rpd:amiImageType" />
-            <xsd:element name="applianceIsoImage" type="rpd:applianceIsoImageType" />
-            <xsd:element name="installableIsoImage" type="rpd:installableIsoImageType" />
-            <xsd:element name="liveIsoImage" type="rpd:liveIsoImageType" />
-            <xsd:element name="netbootImage" type="rpd:netbootImageType" />
-            <xsd:element name="rawFsImage" type="rpd:rawFsImageType" />
-            <xsd:element name="rawHdImage" type="rpd:rawHdImageType" />
-            <xsd:element name="tarballImage" type="rpd:tarballImageType" />
-            <xsd:element name="updateIsoImage" type="rpd:updateIsoImageType" />
-            <xsd:element name="vhdImage" type="rpd:vhdImageType" />
-            <xsd:element name="vmwareImage" type="rpd:vmwareImageType" />
-            <xsd:element name="vmwareEsxImage" type="rpd:vmwareEsxImageType" />
-            <xsd:element name="xenOvaImage" type="rpd:xenOvaImageType" />
-        </xsd:choice>
+        <xsd:sequence>
+            <xsd:choice>
+                <xsd:element name="amiImage" type="rpd:amiImageType" />
+                <xsd:element name="applianceIsoImage" type="rpd:applianceIsoImageType" />
+                <xsd:element name="installableIsoImage" type="rpd:installableIsoImageType" />
+                <xsd:element name="liveIsoImage" type="rpd:liveIsoImageType" />
+                <xsd:element name="netbootImage" type="rpd:netbootImageType" />
+                <xsd:element name="rawFsImage" type="rpd:rawFsImageType" />
+                <xsd:element name="rawHdImage" type="rpd:rawHdImageType" />
+                <xsd:element name="tarballImage" type="rpd:tarballImageType" />
+                <xsd:element name="updateIsoImage" type="rpd:updateIsoImageType" />
+                <xsd:element name="vhdImage" type="rpd:vhdImageType" />
+                <xsd:element name="vmwareImage" type="rpd:vmwareImageType" />
+                <xsd:element name="vmwareEsxImage" type="rpd:vmwareEsxImageType" />
+                <xsd:element name="xenOvaImage" type="rpd:xenOvaImageType" />
+            </xsd:choice>
+            <xsd:element name="stage" minOccurs="0" maxOccurs="unbounded">
+                <xsd:complexType>
+                    <xsd:attribute name="ref" type="xsd:string" use="required"/>
+                </xsd:complexType>
+            </xsd:element>
+        </xsd:sequence>
         <xsd:attribute name="baseFlavor" type="rpd:flavorStringType" />
-        <xsd:attribute name="byDefault" type="xsd:boolean" default="true" />
         <xsd:attribute name="imageGroup" type="rpd:troveSpecType" />
     </xsd:complexType>
 

From misa@rpath.com Thu May  8 17:23:02 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m48HN20F025421
	for <rpath-common-commits@lists.rpath.com>; Thu, 8 May 2008 17:23:02 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m48HN1KY002614
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 8 May 2008 13:23:02 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m48HN1br027458
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 8 May 2008 13:23:01 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m48HN1Gr010767
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 8 May 2008 13:23:01 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m48HN1VW010748
	for rpath-common-commits@lists.rpath.com; Thu, 8 May 2008 13:23:01 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805081723.m48HN1VW010748@scc.eng.rpath.com>
Date: Thu, 08 May 2008 13:23:01 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Making imageGroup an optional element, to
	make it consistent with the other imageGroup
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 08 May 2008 17:23:02 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       xsd/rpd-1.0.xsd

Making imageGroup an optional element, to make it consistent with the other imageGroup

diff -r 00b61db1ebba -r e328d50d6269 xsd/rpd-1.0.xsd
--- a/xsd/rpd-1.0.xsd	Wed May 07 14:04:57 2008 -0400
+++ b/xsd/rpd-1.0.xsd	Thu May 08 13:22:21 2008 -0400
@@ -185,9 +185,10 @@
                     <xsd:attribute name="ref" type="xsd:string" use="required"/>
                 </xsd:complexType>
             </xsd:element>
+            <xsd:element name="imageGroup" type="rpd:troveSpecType" minOccurs="0" maxOccurs="1" />
         </xsd:sequence>
+        <xsd:attribute name="name" type="xsd:string" />
         <xsd:attribute name="baseFlavor" type="rpd:flavorStringType" />
-        <xsd:attribute name="imageGroup" type="rpd:troveSpecType" />
     </xsd:complexType>
 
     <xsd:element name="productDefinition">

From misa@rpath.com Thu May  8 17:23:04 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m48HN4eI025424
	for <rpath-common-commits@lists.rpath.com>; Thu, 8 May 2008 17:23:04 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m48HN3LY002621
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 8 May 2008 13:23:04 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m48HN2oG027463
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 8 May 2008 13:23:02 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m48HN2d4010813
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 8 May 2008 13:23:02 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m48HN2nm010790
	for rpath-common-commits@lists.rpath.com; Thu, 8 May 2008 13:23:02 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805081723.m48HN2nm010790@scc.eng.rpath.com>
Date: Thu, 08 May 2008 13:23:01 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Support for the new product definition fields
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 08 May 2008 17:23:05 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py rpath_common/proddef/imageTypes.py

Support for the new product definition fields

diff -r e328d50d6269 -r 935f25cc1496 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Thu May 08 13:22:21 2008 -0400
+++ b/rpath_common/proddef/api1.py	Thu May 08 13:22:46 2008 -0400
@@ -80,10 +80,9 @@
         """
         self._initFields()
         binder = xmllib.DataBinder()
-        # We need to dynamically create a class here, so we can set the proper
-        # namespace for the class
         binder.registerType(_ProductDefinition, 'productDefinition')
         xmlObj = binder.parseFile(stream)
+        self.imageGroup = getattr(xmlObj, 'imageGroup', None)
         self.baseFlavor = getattr(xmlObj, 'baseFlavor', None)
         self.stages.extend(getattr(xmlObj, 'stages', []))
         self.upstreamSources.extend(getattr(xmlObj, 'upstreamSources', []))
@@ -105,8 +104,6 @@
         @param stream: stream to write the serialized object
         @type stream: C{file}
         """
-        baseFlavor = xmllib.StringNode(name = 'baseFlavor')
-        baseFlavor.characters(self.baseFlavor)
         attrs = {'version' : self.version,
                  'xmlns' : self.defaultNamespace,
                  'xmlns:xsi' : self.xmlSchemaNamespace,
@@ -115,9 +112,14 @@
         nameSpaces = {}
         serObj = _ProductDefinitionSerialization("productDefinition",
             attrs, nameSpaces, self)
-        serObj.baseFlavor = baseFlavor
         binder = xmllib.DataBinder()
         stream.write(binder.toXml(serObj))
+
+    def getImageGroup(self):
+        return self.imageGroup
+
+    def setImageGroup(self, imageGroup):
+        self.imageGroup = imageGroup
 
     def getBaseFlavor(self):
         """
@@ -178,7 +180,7 @@
         return self.buildDefinition
 
     def addBuildDefinition(self, name = None, baseFlavor = None,
-                           byDefault = None, imageType = None):
+                           imageType = None, stages = None, imageGroup = None):
         """
         Add a build definition.
         Image types are specified by calling C{ProductDefinition.imageType}.
@@ -186,15 +188,18 @@
         @type name: C{str} or C{None}
         @param baseFlavor: the base flavor
         @type baseFlavor: C{str}
-        @param byDefault: byDefault value
-        @type byDefault: C{bool}
         @param imageType: an image type, as returned by
         C{ProductDefinition.imageType}.
         @type imageType: an instance of an C{imageTypes.ImageType_Base}
+        @param stages: Stages for which to build this image type
+        @type stages: C{list} of C{str} referring to a C{_Stage} object's name
+        @param imageGroup: XXX
+        @type imageGroup: XXX
         subclass.
         """
         obj = _Build(name = name, baseFlavor = baseFlavor,
-                               byDefault = byDefault, imageType = imageType)
+                     imageType = imageType, stages = stages,
+                     imageGroup = imageGroup)
         self.buildDefinition.append(obj)
 
     @classmethod
@@ -217,6 +222,7 @@
     def _initFields(self):
         self.baseFlavor = None
         self.stages = _Stages()
+        self.imageGroup = None
         self.upstreamSources = _UpstreamSources()
         self.buildDefinition = _BuildDefinition()
 
@@ -255,22 +261,38 @@
         self.troveName = troveName
         self.label = label
 
-class _Build(xmllib.SlotBasedSerializableObject):
-    __slots__ = [ 'name', 'baseFlavor', 'imageType', 'byDefault' ]
+class _Build(xmllib.SerializableObject):
+    __slots__ = [ 'name', 'baseFlavor', 'imageType', 'stages', 'imageGroup' ]
     tag = "build"
 
     def __init__(self, name = None, baseFlavor = None,
-                 imageType = None, byDefault = None):
+                 imageType = None, stages = None, imageGroup = None):
         xmllib.SlotBasedSerializableObject.__init__(self)
         self.name = name
         self.baseFlavor = baseFlavor
         self.imageType = imageType
-        if byDefault is None:
-            byDefault = True
-        self.byDefault = byDefault
+        self.stages = stages or []
+        self.imageGroup = imageGroup
+
+    def _getName(self):
+        return self.tag
+
+    def _getLocalNamespaces(self):
+        return {}
 
     def _iterChildren(self):
         yield self.imageType
+        for stage in self.stages:
+            yield xmllib.NullNode(dict(ref=stage), name = 'stage')
+        if self.imageGroup is not None:
+            yield xmllib.StringNode(name = 'imageGroup').characters(
+                self.imageGroup)
+
+    def _iterAttributes(self):
+        if self.name is not None:
+            yield ('name', self.name)
+        if self.baseFlavor is not None:
+            yield ('baseFlavor', self.baseFlavor)
 
 #}
 
@@ -283,6 +305,11 @@
 
     def addChild(self, childNode):
         chName = childNode.getAbsoluteName()
+
+        if chName == self._makeAbsoluteName('imageGroup'):
+            self.imageGroup = childNode.getText()
+            return
+
         if chName == self._makeAbsoluteName('baseFlavor'):
             self.baseFlavor = childNode.getText()
             return
@@ -336,28 +363,39 @@
                     break
             if imgType is None:
                 raise UnsupportedImageType(subNode.getName())
-            byDefault = node.getAttribute('byDefault')
-            if byDefault is None:
-                byDefault = True
+            imageGroup = node.getChildren('imageGroup')
+            if imageGroup:
+                imageGroup = imageGroup[0].getText()
             else:
-                byDefault = xmllib.BooleanNode.fromString(byDefault)
+                imageGroup = None
             pyobj = _Build(
                 name = node.getAttribute('name'),
                 baseFlavor = node.getAttribute('baseFlavor'),
-                byDefault = byDefault,
-                imageType = imgType)
+                imageType = imgType,
+                stages = [ x.getAttribute('ref')
+                           for x in node.getChildren('stage') ],
+                imageGroup = imageGroup,
+                )
             builds.append(pyobj)
 
 class _ProductDefinitionSerialization(xmllib.BaseNode):
     def __init__(self, name, attrs, namespaces, prodDef):
         xmllib.BaseNode.__init__(self, attrs, namespaces, name = name)
-        self.baseFlavor = prodDef.getBaseFlavor()
         self.stages = prodDef.getStages()
         self.upstreamSources = prodDef.getUpstreamSources()
         self.buildDefinition = prodDef.getBuildDefinitions()
 
+        self.imageGroup = xmllib.StringNode(name = 'imageGroup')
+        imageGroup = prodDef.getImageGroup()
+        if imageGroup:
+            self.imageGroup.characters(imageGroup)
+
+        self.baseFlavor = xmllib.StringNode(name = 'baseFlavor')
+        self.baseFlavor.characters(prodDef.getBaseFlavor())
+
     def iterChildren(self):
-        return [ self.baseFlavor,
+        return [ self.imageGroup,
+                 self.baseFlavor,
                  self.stages,
                  self.upstreamSources,
                  self.buildDefinition ]
diff -r e328d50d6269 -r 935f25cc1496 rpath_common/proddef/imageTypes.py
--- a/rpath_common/proddef/imageTypes.py	Thu May 08 13:22:21 2008 -0400
+++ b/rpath_common/proddef/imageTypes.py	Thu May 08 13:22:46 2008 -0400
@@ -75,6 +75,20 @@
         'amiHugeDiskMountpoint'     : (str, ),
         'freespace'                 : (int, ),
     })
+
+class ImageType_AppplianceIso(ImageType_Base):
+    tag = "applianceIsoImage"
+    _attributes = ImageType_Base._attributes.copy()
+    _attributes.update({
+        'maxIsoSize'                : (int, ),
+        'bugsUrl'                   : (str, ),
+        'showMediaCheck'            : (bool, ),
+        'betaNag'                   : (bool, ),
+        'mediaTemplateTrove'        : (str, ),
+        'anacondaCustomTrove'       : (str, ),
+        'anacondaTemplatesTrove'    : (str, ),
+    })
+
 
 class ImageType_InstallableISO(ImageType_Base):
     tag = "installableIsoImage"
@@ -162,6 +176,16 @@
         'swapSize'          : (int, ),
         'freespace'         : (int, ),
         'natNetworking'     : (bool, ),
+        'vmMemory'          : (int, ),
+    })
+
+class ImageType_XenOva(ImageType_Base):
+    tag = "xenOvaImage"
+    _attributes = ImageType_Base._attributes.copy()
+    _attributes.update({
+        'swapSize'          : (int, ),
+        'freespace'         : (int, ),
+        'vmMemory'          : (int, ),
     })
 #}
 

From misa@rpath.com Thu May  8 17:45:24 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m48HjOuO025628
	for <rpath-common-commits@lists.rpath.com>; Thu, 8 May 2008 17:45:24 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m48HjNje004733
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 8 May 2008 13:45:24 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m48HjNaC028927
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 8 May 2008 13:45:23 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m48HjNb0011958
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 8 May 2008 13:45:23 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m48HjMLR011941
	for rpath-common-commits@lists.rpath.com; Thu, 8 May 2008 13:45:22 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805081745.m48HjMLR011941@scc.eng.rpath.com>
Date: Thu, 08 May 2008 13:45:22 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Enforcing the existance of the name attribute for
	a build
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 08 May 2008 17:45:24 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       xsd/rpd-1.0.xsd

Enforcing the existance of the name attribute for a build

diff -r 935f25cc1496 -r 926d77c83db3 xsd/rpd-1.0.xsd
--- a/xsd/rpd-1.0.xsd	Thu May 08 13:22:46 2008 -0400
+++ b/xsd/rpd-1.0.xsd	Thu May 08 13:44:59 2008 -0400
@@ -187,7 +187,7 @@
             </xsd:element>
             <xsd:element name="imageGroup" type="rpd:troveSpecType" minOccurs="0" maxOccurs="1" />
         </xsd:sequence>
-        <xsd:attribute name="name" type="xsd:string" />
+        <xsd:attribute name="name" type="xsd:string" use="required" />
         <xsd:attribute name="baseFlavor" type="rpd:flavorStringType" />
     </xsd:complexType>
 

From misa@rpath.com Thu May  8 17:45:26 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m48HjQUL025634
	for <rpath-common-commits@lists.rpath.com>; Thu, 8 May 2008 17:45:26 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m48HjQ4J004741
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 8 May 2008 13:45:26 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m48HjPsm028931
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 8 May 2008 13:45:25 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m48HjPi9012033
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 8 May 2008 13:45:25 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m48HjP4K012019
	for rpath-common-commits@lists.rpath.com; Thu, 8 May 2008 13:45:25 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805081745.m48HjP4K012019@scc.eng.rpath.com>
Date: Thu, 08 May 2008 13:45:25 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Added getBuildsForStage, updated doc strings
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 08 May 2008 17:45:26 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Added getBuildsForStage, updated doc strings

diff -r 926d77c83db3 -r 479f736236e0 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Thu May 08 13:44:59 2008 -0400
+++ b/rpath_common/proddef/api1.py	Thu May 08 13:45:16 2008 -0400
@@ -116,9 +116,18 @@
         stream.write(binder.toXml(serObj))
 
     def getImageGroup(self):
+        """
+        @return: the image group
+        @rtype: C{str}
+        """
         return self.imageGroup
 
     def setImageGroup(self, imageGroup):
+        """
+        Set the image group name
+        @param imageGroup: the image group name
+        @type imageGroup: C{str}
+        """
         self.imageGroup = imageGroup
 
     def getBaseFlavor(self):
@@ -175,7 +184,7 @@
     def getBuildDefinitions(self):
         """
         @return: The build definitions from this product definition
-        @rtype: C{list} of C{_BuildDefinition} objects
+        @rtype: C{list} of C{_Build} objects
         """
         return self.buildDefinition
 
@@ -193,8 +202,9 @@
         @type imageType: an instance of an C{imageTypes.ImageType_Base}
         @param stages: Stages for which to build this image type
         @type stages: C{list} of C{str} referring to a C{_Stage} object's name
-        @param imageGroup: XXX
-        @type imageGroup: XXX
+        @param imageGroup: An optional image group that will override the
+        product definition's image group
+        @type imageGroup: C{str}
         subclass.
         """
         obj = _Build(name = name, baseFlavor = baseFlavor,
@@ -218,6 +228,20 @@
         if obj is None:
             raise UnsupportedImageType(name)
         return obj
+
+    def getBuildsForStage(self, stageName):
+        """
+        Retrieve all build definitions for a stage name.
+        @param stageName: stage name
+        @type stageName: C{str}
+        @return: A list of build definitions for the stage.
+        @rtype: C{list} of C{_Build} objects
+        """
+        ret = []
+        for build in self.getBuildDefinitions():
+            if stageName in build.stages:
+                ret.append(build)
+        return ret
 
     def _initFields(self):
         self.baseFlavor = None

From misa@rpath.com Thu May  8 17:47:14 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m48HlEdT025677
	for <rpath-common-commits@lists.rpath.com>; Thu, 8 May 2008 17:47:14 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m48HlDD3005195
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 8 May 2008 13:47:13 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m48HlDMR029095
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 8 May 2008 13:47:13 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m48HlCkA012152
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 8 May 2008 13:47:12 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m48HlCTn012147
	for rpath-common-commits@lists.rpath.com; Thu, 8 May 2008 13:47:12 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805081747.m48HlCTn012147@scc.eng.rpath.com>
Date: Thu, 08 May 2008 13:47:12 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: serializing lists properly
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 08 May 2008 17:47:14 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/xmllib/api1.py

serializing lists properly

diff -r 71a585503e82 -r bd0067bd3443 rpath_common/xmllib/api1.py
--- a/rpath_common/xmllib/api1.py	Tue May 06 18:27:40 2008 -0400
+++ b/rpath_common/xmllib/api1.py	Thu May 08 13:47:10 2008 -0400
@@ -535,6 +535,8 @@
             elif fVal is None:
                 # Skip None values
                 continue
+            elif isinstance(fVal, list):
+                children.append(fVal)
             else:
                 if not hasattr(fVal, "getElementTree"):
                     raise XmlLibError(

From scott@rpath.com Fri May  9 18:35:04 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m49IZ42t018581
	for <rpath-common-commits@lists.rpath.com>; Fri, 9 May 2008 18:35:04 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m49IZ48J012195
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 9 May 2008 14:35:04 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m49IZ38m031026
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 9 May 2008 14:35:03 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m49IZ3kZ011204
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 9 May 2008 14:35:03 -0400
Received: (from scott@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m49IZ35S011190
	for rpath-common-commits@lists.rpath.com; Fri, 9 May 2008 14:35:03 -0400
From: Scott Parkerson <scott@rpath.com>
Message-Id: <200805091835.m49IZ35S011190@scc.eng.rpath.com>
Date: Fri, 09 May 2008 14:35:03 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Add virtualIron appliance image type
 (RBL-2854)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 09 May 2008 18:35:04 -0000

user:        Scott Parkerson <http://issues.rpath.com/>
files:       rpath_common/proddef/imageTypes.py xsd/rpd-1.0.xsd

Add virtualIron appliance image type (RBL-2854)

diff -r 3768ba6d2a6e -r eaae7d709778 rpath_common/proddef/imageTypes.py
--- a/rpath_common/proddef/imageTypes.py	Fri May 09 13:14:39 2008 -0400
+++ b/rpath_common/proddef/imageTypes.py	Fri May 09 14:13:40 2008 -0400
@@ -157,6 +157,15 @@
         'vhdDiskType'       : (str, ),
     })
 
+class ImageType_VirtualIron(ImageType_Base):
+    tag = "virtualIronImage"
+    _attributes = ImageType_Base._attributes.copy()
+    _attributes.update({
+        'swapSize'          : (int, ),
+        'freespace'         : (int, ),
+        'vhdDiskType'       : (str, ),
+    })
+
 class ImageType_VMWare(ImageType_Base):
     tag = "vmwareImage"
     _attributes = ImageType_Base._attributes.copy()
diff -r 3768ba6d2a6e -r eaae7d709778 xsd/rpd-1.0.xsd
--- a/xsd/rpd-1.0.xsd	Fri May 09 13:14:39 2008 -0400
+++ b/xsd/rpd-1.0.xsd	Fri May 09 14:13:40 2008 -0400
@@ -114,15 +114,30 @@
         <xsd:attributeGroup ref="common" />
         <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
         <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
-            <xsd:attribute name="vhdDiskType">
-                <xsd:simpleType>
-                    <xsd:restriction base="xsd:string">
-                        <xsd:enumeration value="fixed" />
-                        <xsd:enumeration value="dynamic" />
-                        <xsd:enumeration value="difference" />
-                    </xsd:restriction>
-                </xsd:simpleType>
-            </xsd:attribute>
+        <xsd:attribute name="vhdDiskType">
+            <xsd:simpleType>
+                <xsd:restriction base="xsd:string">
+                    <xsd:enumeration value="fixed" />
+                    <xsd:enumeration value="dynamic" />
+                    <xsd:enumeration value="difference" />
+                </xsd:restriction>
+            </xsd:simpleType>
+        </xsd:attribute>
+    </xsd:complexType>
+
+    <xsd:complexType name="virtualIronImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="vhdDiskType">
+            <xsd:simpleType>
+                <xsd:restriction base="xsd:string">
+                    <xsd:enumeration value="fixed" />
+                    <xsd:enumeration value="dynamic" />
+                    <xsd:enumeration value="difference" />
+                </xsd:restriction>
+            </xsd:simpleType>
+        </xsd:attribute>
     </xsd:complexType>
 
     <xsd:complexType name="vmwareEsxImageType">
@@ -176,6 +191,7 @@
                 <xsd:element name="tarballImage" type="rpd:tarballImageType" />
                 <xsd:element name="updateIsoImage" type="rpd:updateIsoImageType" />
                 <xsd:element name="vhdImage" type="rpd:vhdImageType" />
+                <xsd:element name="virtualIronImage" type="rpd:virtualIronImageType" />
                 <xsd:element name="vmwareImage" type="rpd:vmwareImageType" />
                 <xsd:element name="vmwareEsxImage" type="rpd:vmwareEsxImageType" />
                 <xsd:element name="xenOvaImage" type="rpd:xenOvaImageType" />

From scott@rpath.com Fri May  9 18:35:05 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m49IZ5wS018585
	for <rpath-common-commits@lists.rpath.com>; Fri, 9 May 2008 18:35:05 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m49IZ51S012201
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 9 May 2008 14:35:05 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m49IZ5Tc031030
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 9 May 2008 14:35:05 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m49IZ43T011245
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 9 May 2008 14:35:04 -0400
Received: (from scott@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m49IZ4lC011230
	for rpath-common-commits@lists.rpath.com; Fri, 9 May 2008 14:35:04 -0400
From: Scott Parkerson <scott@rpath.com>
Message-Id: <200805091835.m49IZ4lC011230@scc.eng.rpath.com>
Date: Fri, 09 May 2008 14:35:04 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Fix typo
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 09 May 2008 18:35:06 -0000

user:        Scott Parkerson <http://issues.rpath.com/>
files:       rpath_common/proddef/imageTypes.py

Fix typo

diff -r eaae7d709778 -r 68b4fbcd9201 rpath_common/proddef/imageTypes.py
--- a/rpath_common/proddef/imageTypes.py	Fri May 09 14:13:40 2008 -0400
+++ b/rpath_common/proddef/imageTypes.py	Fri May 09 14:14:54 2008 -0400
@@ -76,7 +76,7 @@
         'freespace'                 : (int, ),
     })
 
-class ImageType_AppplianceIso(ImageType_Base):
+class ImageType_ApplianceIso(ImageType_Base):
     tag = "applianceIsoImage"
     _attributes = ImageType_Base._attributes.copy()
     _attributes.update({

From scott@rpath.com Fri May  9 18:35:06 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m49IZ6d8018593
	for <rpath-common-commits@lists.rpath.com>; Fri, 9 May 2008 18:35:06 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m49IZ6m8012212
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 9 May 2008 14:35:06 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m49IZ6Px031036
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 9 May 2008 14:35:06 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m49IZ5w0011273
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 9 May 2008 14:35:05 -0400
Received: (from scott@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m49IZ5Fo011267
	for rpath-common-commits@lists.rpath.com; Fri, 9 May 2008 14:35:05 -0400
From: Scott Parkerson <scott@rpath.com>
Message-Id: <200805091835.m49IZ5Fo011267@scc.eng.rpath.com>
Date: Fri, 09 May 2008 14:35:05 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Make getDefaultLabel use the stage with label
	suffix "-devel" rather than by name
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 09 May 2008 18:35:07 -0000

tag:         tip
user:        Scott Parkerson <http://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Make getDefaultLabel use the stage with label suffix "-devel" rather than by name

diff -r 68b4fbcd9201 -r 9cdf2ffa11ff rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Fri May 09 14:14:54 2008 -0400
+++ b/rpath_common/proddef/api1.py	Fri May 09 14:34:29 2008 -0400
@@ -308,9 +308,29 @@
         """
         return self.upstreamSources
 
+    def _getLabelForStage(self, stageObj):
+        """
+        Private method that works similarly to L{getLabelForStage},
+        but works on a given C{_Stage} object.
+        @return: a Conary label string where for the given stage object
+        @rtype: C{str}
+        @raises MissingInformationError: if there isn't enough information
+            in the product definition to generate the label
+        """
+        hostname = self.getConaryRepositoryHostname()
+        shortname = self.getProductShortname()
+        namespace = self.getConaryNamespace()
+        version = self.getProductVersion()
+        labelSuffix = stageObj.labelSuffix or '' # this can be blank
+
+        if not (hostname and shortname and namespace and version):
+            raise MissingInformationError
+        return "%s@%s:%s-%s%s" % (hostname, namespace, shortname, version,
+                labelSuffix)
+
     def getLabelForStage(self, stageName):
         """
-        Synthesize the label for a particular stage based upon 
+        Synthesize the label for a particular stage based upon
         the existing product information. Raises an exception
         if there isn't enough information in the product definition
         object to create the label.
@@ -320,17 +340,7 @@
         @raises MissingInformationError: if there isn't enough information
             in the product definition to generate the label
         """
-        stage = self.getStage(stageName)
-        hostname = self.getConaryRepositoryHostname()
-        shortname = self.getProductShortname()
-        namespace = self.getConaryNamespace()
-        version = self.getProductVersion()
-        labelSuffix = stage.labelSuffix or '' # this can be blank
-
-        if not (hostname and shortname and namespace and version):
-            raise MissingInformationError
-        return "%s@%s:%s-%s%s" % (hostname, namespace, shortname, version,
-                labelSuffix)
+        return self._getLabelForStage(self.getStage(stageName))
 
     def getDefaultLabel(self):
         """
@@ -338,14 +348,22 @@
         @return: a label string representing the default label for this
             product definition
         @rtype: C{str}
+        @raises StageNotFoundError: if no such stage exists
         @raises MissingInformationError: if there isn't enough information
             in the object to generate the default label
         """
-        # TODO: Currently, this is the development stage's label.
+        # TODO: Currently, this is the development stage's label,
+        #       i.e. the one with suffix '-devel'.
+        #
         #       Eventually the XML schema will explicitly define the
         #       default label, either via a 'default' attribute on
         #       the stage or via the stage's order.
-        return self.getLabelForStage('devel')
+        ret = None
+        stages = self.getStages()
+        for stage in stages:
+            if stage.labelSuffix == '-devel':
+                return self._getLabelForStage(stage)
+        raise StageNotFoundError
 
     def addUpstreamSource(self, troveName = None, label = None):
         """

From misa@rpath.com Fri May  9 21:42:05 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m49Lg5Ix021424
	for <rpath-common-commits@lists.rpath.com>; Fri, 9 May 2008 21:42:05 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m49Lg4XM000413
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 9 May 2008 17:42:04 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m49Lg4ZQ012656
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 9 May 2008 17:42:04 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m49Lg4CP020313
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 9 May 2008 17:42:04 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m49Lg4UJ020297
	for rpath-common-commits@lists.rpath.com; Fri, 9 May 2008 17:42:04 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805092142.m49Lg4UJ020297@scc.eng.rpath.com>
Date: Fri, 09 May 2008 17:42:04 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Re-generated example.xml
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 09 May 2008 21:42:05 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       doc/example.xml

Re-generated example.xml

diff -r 9cdf2ffa11ff -r fcc065ff6e61 doc/example.xml
--- a/doc/example.xml	Fri May 09 14:34:29 2008 -0400
+++ b/doc/example.xml	Fri May 09 17:41:33 2008 -0400
@@ -1,74 +1,72 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<productDefinition xmlns="http://www.rpath.com/permanent/pd.xsd"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
-  xsi:schemaLocation="http://www.rpath.com/permanent/pd.xsd pd.xsd"
-  version="1.0">
+<?xml version='1.0' encoding='UTF-8'?>
+<productDefinition xmlns="http://www.rpath.com/permanent/rpd-1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.rpath.com/permanent/rpd-1.0.xsd rpd-1.0.xsd" version="1.0">
   <productName>My Awesome Appliance</productName>
   <productShortname>awesome</productShortname>
   <productDescription>
       This here is my awesome appliance.
       Is it not nifty?
       Worship the appliance.
-  </productDescription>
+</productDescription>
   <productVersion>1.0</productVersion>
   <productVersionDescription>
       Version 1.0 features "stability" and "usefulness", which is a 
       vast improvement over our pre-release code.
-  </productVersionDescription>
-  <conaryRepository name="default">product.example.com</conaryRepository>
+</productVersionDescription>
+  <conaryRepositoryHostname>product.example.com</conaryRepositoryHostname>
   <conaryNamespace>exm</conaryNamespace>
   <imageGroup>group-awesome-dist</imageGroup>
   <baseFlavor>
-     ~MySQL-python.threadsafe, ~X, ~!alternatives, !bootstrap, 
-     ~builddocs, ~buildtests, !cross, ~desktop, ~!dietlibc, ~!dom0, ~!domU, 
-     ~emacs, ~gcj, ~gnome, ~grub.static, ~gtk, ~ipv6, ~kde, ~!kernel.debug, 
-     ~kernel.debugdata, ~!kernel.numa, ~kernel.smp, ~krb, ~ldap, ~nptl, 
-     ~!openssh.smartcard, ~!openssh.static_libcrypto, pam, ~pcre, ~perl, 
-     ~!pie, ~!postfix.mysql, ~python, ~qt, ~readline, ~!sasl, ~!selinux, 
-     ~sqlite.threadsafe, ssl, ~tcl, tcpwrappers, ~tk, ~uClibc, !vmware, 
-     ~!xen, ~!xfce, ~!xorg-x11.xprint
-  </baseFlavor>
+    ~MySQL-python.threadsafe, ~X, ~!alternatives, !bootstrap,
+    ~builddocs, ~buildtests, !cross, ~desktop, ~!dietlibc, ~!dom0, ~!domU,
+    ~emacs, ~gcj, ~gnome, ~grub.static, ~gtk, ~ipv6, ~kde, ~!kernel.debug,
+    ~kernel.debugdata, ~!kernel.numa, ~kernel.smp, ~krb, ~ldap, ~nptl,
+    ~!openssh.smartcard, ~!openssh.static_libcrypto, pam, ~pcre, ~perl,
+    ~!pie, ~!postfix.mysql, ~python, ~qt, ~readline, ~!sasl, ~!selinux,
+    ~sqlite.threadsafe, ssl, ~tcl, tcpwrappers, ~tk, ~uClibc, !vmware,
+    ~!xen, ~!xfce, ~!xorg-x11.xprint
+    </baseFlavor>
   <stages>
-    <stage name="devel" labelSuffix="-devel" />
-    <stage name="qa" labelSuffix="-qa" />
-    <stage name="release" labelSuffix="" />
+    <stage labelSuffix="-devel" name="devel"/>
+    <stage labelSuffix="-qa" name="qa"/>
+    <stage labelSuffix="" name="release"/>
   </stages>
   <upstreamSources>
-    <upstreamSource troveName="group-rap-standard" label="rap.rpath.com@rpath:linux-1" />
-    <upstreamSource troveName="group-postgres" label="products.rpath.com@rpath:postgres-8.2" />
+    <upstreamSource troveName="group-rap-standard" label="rap.rpath.com@rpath:linux-1"/>
+    <upstreamSource troveName="group-postgres" label="products.rpath.com@rpath:postgres-8.2"/>
   </upstreamSources>
   <buildDefinition>
-    <build name="x86 Installable ISO Build" baseFlavor="is: x86" >
-      <installableIsoImage />
-      <stage ref="devel" />
-      <stage ref="qa" />
-      <stage ref="release" />
+    <build baseFlavor="is: x86" name="x86 Installable ISO Build">
+      <installableIsoImage/>
+      <stage ref="devel"/>
+      <stage ref="qa"/>
+      <stage ref="release"/>
     </build>
-    <build name="x86-64 Installable ISO Build" baseFlavor="is: x86 x86_64" >
-      <installableIsoImage />
-      <stage ref="devel" />
-      <stage ref="qa" />
-      <stage ref="release" />
+    <build baseFlavor="is: x86 x86_64" name="x86-64 Installable ISO Build">
+      <installableIsoImage/>
+      <stage ref="devel"/>
+      <stage ref="qa"/>
+      <stage ref="release"/>
     </build>
-    <build name="x86 Citrix Xenserver Virtual Appliance" baseFlavor="~xen, ~domU is: x86" >
-      <xenOvaImage />
-      <stage ref="devel" />
-      <stage ref="qa" />
-      <stage ref="release" />
+    <build baseFlavor="~xen, ~domU is: x86" name="x86 Citrix Xenserver Virtual Appliance">
+      <xenOvaImage/>
+      <stage ref="devel"/>
+      <stage ref="qa"/>
+      <stage ref="release"/>
     </build>
-    <build name="Another Xen build" baseFlavor="~xen, ~domU is: x86 x86_64">
-      <rawHdImage autoResolve="true" baseFileName="/poo/foo/moo"/>
-      <stage ref="devel" />
-      <stage ref="qa" />
-      <stage ref="release" />
+    <build baseFlavor="~xen, ~domU is: x86" name="Another Xen Build">
+      <rawHdImage autoResolve="true" baseFileName="/poo/moo/foo"/>
+      <stage ref="devel"/>
+      <stage ref="qa"/>
+      <stage ref="release"/>
     </build>
-    <build name="VMWare build" baseFlavor="~vmware is: x86 x86_64">
-      <vmwareImage baseFileName="foobar" autoResolve="true" /> 
-      <stage ref="devel" />
-      <stage ref="qa" />
+    <build baseFlavor="~vmware is: x86 x86_64" name="VMWare build">
+      <vmwareImage autoResolve="true" baseFileName="foobar"/>
+      <stage ref="devel"/>
+      <stage ref="qa"/>
     </build>
-    <build name="Totally VMware optional build from a different group" imageGroup="group-foo-dist" baseFlavor="~vmware is: x86 x86_64">
-      <vmwareImage /> 
+    <build baseFlavor="~vmware is: x86 x86_64" name="Totally VMware optional build from a different group">
+      <vmwareImage/>
+      <imageGroup>group-foo-dist</imageGroup>
     </build>
   </buildDefinition>
 </productDefinition>

From misa@rpath.com Fri May  9 21:42:06 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m49Lg62K021427
	for <rpath-common-commits@lists.rpath.com>; Fri, 9 May 2008 21:42:06 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m49Lg5S7000426
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 9 May 2008 17:42:06 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m49Lg59b012661
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 9 May 2008 17:42:05 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m49Lg5Pb020342
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 9 May 2008 17:42:05 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m49Lg5vW020337
	for rpath-common-commits@lists.rpath.com; Fri, 9 May 2008 17:42:05 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805092142.m49Lg5vW020337@scc.eng.rpath.com>
Date: Fri, 09 May 2008 17:42:05 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Added methods to load from repo and save to repo.
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 09 May 2008 21:42:06 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Added methods to load from repo and save to repo.

diff -r fcc065ff6e61 -r b554bf663c3e rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Fri May 09 17:41:33 2008 -0400
+++ b/rpath_common/proddef/api1.py	Fri May 09 17:41:34 2008 -0400
@@ -26,6 +26,10 @@
 
 import StringIO
 
+from conary import changelog
+from conary import errors as conaryErrors
+from conary.conaryclient import filetypes
+
 from rpath_common.xmllib import api1 as xmllib
 from rpath_common.proddef import _xmlConstants
 from rpath_common.proddef import imageTypes
@@ -45,6 +49,15 @@
 
 class UnsupportedImageType(ProductDefinitionError):
     "Raised when an unsupported image type was passed"
+
+class ProductDefinitionTroveNotFound(ProductDefinitionError):
+    """
+    Raised when the trove containing the product definition file could not
+    be found in the repository
+    """
+
+class ProductDefinitionFileNotFound(ProductDefinitionError):
+    "Raised when the product definition file was not found in the repository"
 #}
 
 class ProductDefinition(object):
@@ -68,6 +81,22 @@
 
     _imageTypeDispatcher = xmllib.NodeDispatcher({})
     _imageTypeDispatcher.registerClasses(imageTypes, imageTypes.ImageType_Base)
+
+    _troveName = 'product-definition'
+    _troveFileName = 'product-definition.xml'
+
+    _recipe = """
+#
+# Copyright (c) 2008 rPath, Inc.
+#
+
+class Recipe_@NAME@(PackageRecipe):
+    name = "@NAME@"
+    version = "@VERSION@"
+
+    def setup(r):
+        pass
+"""
 
     def __init__(self, fromStream = None):
         """
@@ -98,8 +127,10 @@
         self.productDescription = getattr(xmlObj, 'productDescription', None)
         self.productShortname = getattr(xmlObj, 'productShortname', None)
         self.productVersion = getattr(xmlObj, 'productVersion', None)
-        self.productVersionDescription = getattr(xmlObj, 'productVersionDescription', None)
-        self.conaryRepositoryHostname = getattr(xmlObj, 'conaryRepositoryHostname', None)
+        self.productVersionDescription = getattr(xmlObj,
+            'productVersionDescription', None)
+        self.conaryRepositoryHostname = getattr(xmlObj,
+            'conaryRepositoryHostname', None)
         self.conaryNamespace = getattr(xmlObj, 'conaryNamespace', None)
         self.imageGroup = getattr(xmlObj, 'imageGroup', None)
         self.baseFlavor = getattr(xmlObj, 'baseFlavor', None)
@@ -133,6 +164,16 @@
             attrs, nameSpaces, self)
         binder = xmllib.DataBinder()
         stream.write(binder.toXml(serObj))
+
+    def saveToRepository(self, client, message = None):
+        label = self._getProductDefinitionLabel()
+        return self._saveToRepository(client, label, message = message)
+
+    def loadFromRepository(self, client):
+        label = self._getProductDefinitionLabel()
+        stream = self._getStreamFromRepository(client, label)
+        stream.seek(0)
+        self.parseStream(stream)
 
     def getProductName(self):
         """
@@ -308,6 +349,23 @@
         """
         return self.upstreamSources
 
+    def _getProductDefinitionLabel(self):
+        """
+        Private method that returns the product definition's label
+        @return: a Conary label string
+        @rtype: C{str}
+        @raises MissingInformationError: if there isn't enough information
+            in the product definition to generate the label
+        """
+        hostname = self.getConaryRepositoryHostname()
+        shortname = self.getProductShortname()
+        namespace = self.getConaryNamespace()
+        version = self.getProductVersion()
+
+        if not (hostname and shortname and namespace and version):
+            raise MissingInformationError
+        return "%s@%s:%s-%s" % (hostname, namespace, shortname, version)
+
     def _getLabelForStage(self, stageObj):
         """
         Private method that works similarly to L{getLabelForStage},
@@ -317,16 +375,9 @@
         @raises MissingInformationError: if there isn't enough information
             in the product definition to generate the label
         """
-        hostname = self.getConaryRepositoryHostname()
-        shortname = self.getProductShortname()
-        namespace = self.getConaryNamespace()
-        version = self.getProductVersion()
+        prefix = self._getProductDefinitionLabel()
         labelSuffix = stageObj.labelSuffix or '' # this can be blank
-
-        if not (hostname and shortname and namespace and version):
-            raise MissingInformationError
-        return "%s@%s:%s-%s%s" % (hostname, namespace, shortname, version,
-                labelSuffix)
+        return prefix + labelSuffix
 
     def getLabelForStage(self, stageName):
         """
@@ -451,6 +502,61 @@
         self.imageGroup = None
         self.upstreamSources = _UpstreamSources()
         self.buildDefinition = _BuildDefinition()
+
+    def _saveToRepository(self, conaryClient, label, message = None):
+        version = '0.1'
+
+        if message is None:
+            message = "Automatic checkin\n"
+
+        recipe = self._recipe.replace('@NAME@', self._troveName)
+        recipe = recipe.replace('@VERSION@', version)
+
+        stream = StringIO.StringIO()
+        self.serialize(stream)
+        pathDict = {
+            "%s.recipe" % self._troveName : filetypes.RegularFile(
+                contents = self._recipe),
+            self._troveFileName : filetypes.RegularFile(
+                contents = stream.getvalue()),
+        }
+        cLog = changelog.ChangeLog(name = conaryClient.cfg.name,
+                                   contact = conaryClient.cfg.contact,
+                                   message = message)
+        troveName = '%s:source' % self._troveName
+        cs = conaryClient.createSourceTrove(troveName, label, version,
+            pathDict, cLog)
+
+        repos = conaryClient.getRepos()
+        repos.commitChangeSet(cs)
+
+    def _getStreamFromRepository(self, conaryClient, label):
+        repos = conaryClient.getRepos()
+        troveName = '%s:source' % self._troveName
+        troveSpec = (troveName, label, None)
+        try:
+            troves = repos.findTroves(None, [ troveSpec ])
+        except conaryErrors.TroveNotFound:
+            raise ProductDefinitionTroveNotFound("%s=%s" % (troveName, label))
+        nvfs = troves[troveSpec]
+        if not nvfs:
+            raise ProductDefinitionTroveNotFound("%s=%s" % (troveName, label))
+        trvCsSpec = (nvfs[0][0], (None, None), (nvfs[0][1], nvfs[0][2]), True)
+        cs = conaryClient.createChangeSet([ trvCsSpec ], withFiles = True,
+                                          withFileContents = True)
+        for thawTrvCs in cs.iterNewTroveList():
+            paths = [ x for x in thawTrvCs.getNewFileList()
+                      if x[1] == self._troveFileName ]
+            if not paths:
+                continue
+            # Fetch file from changeset
+            fileSpecs = [ (fId, fVer) for (_, _, fId, fVer) in paths ]
+            fileContents = repos.getFileContents(fileSpecs)
+            return fileContents[0].get()
+
+        # Couldn't find the file we expected; die
+        raise ProductDefinitionFileNotFound("%s=%s" % (troveName, label))
+
 
 #{ Objects for the representation of ProductDefinition fields
 

From misa@rpath.com Mon May 12 13:35:28 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m4CDZRqx013808 for <rpath-common-commits@lists.rpath.com>;
	Mon, 12 May 2008 13:35:28 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m4CDZRhc022078
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 12 May 2008 09:35:27 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m4CDZRwO015640
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 12 May 2008 09:35:27 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m4CDZQoU013661
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 12 May 2008 09:35:27 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m4CDZQRA013656
	for rpath-common-commits@lists.rpath.com;
	Mon, 12 May 2008 09:35:26 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805121335.m4CDZQRA013656@scc.eng.rpath.com>
Date: Mon, 12 May 2008 09:35:26 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Updated doc strings; moved the internal
	methods towards the end of the class definition
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 12 May 2008 13:35:28 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Updated doc strings; moved the internal methods towards the end of the class definition

diff -r b554bf663c3e -r a40a42a9f6ed rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Fri May 09 17:41:34 2008 -0400
+++ b/rpath_common/proddef/api1.py	Mon May 12 09:35:14 2008 -0400
@@ -166,10 +166,28 @@
         stream.write(binder.toXml(serObj))
 
     def saveToRepository(self, client, message = None):
+        """
+        Save a C{ProductDefinition} object to a Conary repository.
+        @param client: A Conary client object
+        @type client: C{conaryclient.ConaryClient}
+        @param message: An optional commit message
+        @type message: C{str}
+        """
         label = self._getProductDefinitionLabel()
         return self._saveToRepository(client, label, message = message)
 
     def loadFromRepository(self, client):
+        """
+        Load a C{ProductDefinition} object to a Conary repository.
+        Prior to calling this method, the C{ProductDefinition} object should
+        be initialized by calling C{setProductShortname},
+        C{setProductVersion}, C{setConaryRepositoryHostname} and
+        C{setConaryNamespace}.
+        @param client: A Conary client object
+        @type client: C{conaryclient.ConaryClient}
+        @param message: An optional commit message
+        @type message: C{str}
+        """
         label = self._getProductDefinitionLabel()
         stream = self._getStreamFromRepository(client, label)
         stream.seek(0)
@@ -349,36 +367,6 @@
         """
         return self.upstreamSources
 
-    def _getProductDefinitionLabel(self):
-        """
-        Private method that returns the product definition's label
-        @return: a Conary label string
-        @rtype: C{str}
-        @raises MissingInformationError: if there isn't enough information
-            in the product definition to generate the label
-        """
-        hostname = self.getConaryRepositoryHostname()
-        shortname = self.getProductShortname()
-        namespace = self.getConaryNamespace()
-        version = self.getProductVersion()
-
-        if not (hostname and shortname and namespace and version):
-            raise MissingInformationError
-        return "%s@%s:%s-%s" % (hostname, namespace, shortname, version)
-
-    def _getLabelForStage(self, stageObj):
-        """
-        Private method that works similarly to L{getLabelForStage},
-        but works on a given C{_Stage} object.
-        @return: a Conary label string where for the given stage object
-        @rtype: C{str}
-        @raises MissingInformationError: if there isn't enough information
-            in the product definition to generate the label
-        """
-        prefix = self._getProductDefinitionLabel()
-        labelSuffix = stageObj.labelSuffix or '' # this can be blank
-        return prefix + labelSuffix
-
     def getLabelForStage(self, stageName):
         """
         Synthesize the label for a particular stage based upon
@@ -489,6 +477,37 @@
                 ret.append(build)
         return ret
 
+    #{ Internal methods
+    def _getProductDefinitionLabel(self):
+        """
+        Private method that returns the product definition's label
+        @return: a Conary label string
+        @rtype: C{str}
+        @raises MissingInformationError: if there isn't enough information
+            in the product definition to generate the label
+        """
+        hostname = self.getConaryRepositoryHostname()
+        shortname = self.getProductShortname()
+        namespace = self.getConaryNamespace()
+        version = self.getProductVersion()
+
+        if not (hostname and shortname and namespace and version):
+            raise MissingInformationError
+        return "%s@%s:%s-%s" % (hostname, namespace, shortname, version)
+
+    def _getLabelForStage(self, stageObj):
+        """
+        Private method that works similarly to L{getLabelForStage},
+        but works on a given C{_Stage} object.
+        @return: a Conary label string where for the given stage object
+        @rtype: C{str}
+        @raises MissingInformationError: if there isn't enough information
+            in the product definition to generate the label
+        """
+        prefix = self._getProductDefinitionLabel()
+        labelSuffix = stageObj.labelSuffix or '' # this can be blank
+        return prefix + labelSuffix
+
     def _initFields(self):
         self.baseFlavor = None
         self.stages = _Stages()
@@ -556,6 +575,7 @@
 
         # Couldn't find the file we expected; die
         raise ProductDefinitionFileNotFound("%s=%s" % (troveName, label))
+    #}
 
 
 #{ Objects for the representation of ProductDefinition fields

From misa@rpath.com Tue May 13 03:12:01 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m4D3C0gs025880 for <rpath-common-commits@lists.rpath.com>;
	Tue, 13 May 2008 03:12:00 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m4D3C0Vw025043
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 12 May 2008 23:12:00 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m4D3C08d012269
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 12 May 2008 23:12:00 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m4D3C0Im019592
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 12 May 2008 23:12:00 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m4D3C0cw019587
	for rpath-common-commits@lists.rpath.com;
	Mon, 12 May 2008 23:12:00 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805130312.m4D3C0cw019587@scc.eng.rpath.com>
Date: Mon, 12 May 2008 23:11:59 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Build is now a first-class object; added a
	RepositoryError exception
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 13 May 2008 03:12:01 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Build is now a first-class object; added a RepositoryError exception

diff -r a40a42a9f6ed -r a95153702dab rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Mon May 12 09:35:14 2008 -0400
+++ b/rpath_common/proddef/api1.py	Mon May 12 23:10:54 2008 -0400
@@ -22,7 +22,11 @@
             'ProductDefinition',
             'ProductDefinitionError',
             'StageNotFoundError',
-            'UnsupportedImageType' ]
+            'UnsupportedImageType',
+            'ProductDefinitionTroveNotFound',
+            'ProductDefinitionFileNotFound',
+            'RepositoryError',
+            ]
 
 import StringIO
 
@@ -58,6 +62,10 @@
 
 class ProductDefinitionFileNotFound(ProductDefinitionError):
     "Raised when the product definition file was not found in the repository"
+
+class RepositoryError(ProductDefinitionError):
+    "Generic error raised when a repository error was caught"
+
 #}
 
 class ProductDefinition(object):
@@ -187,6 +195,9 @@
         @type client: C{conaryclient.ConaryClient}
         @param message: An optional commit message
         @type message: C{str}
+        @raises C{RepositoryError}:
+        @raises C{ProductDefinitionTroveNotFound}:
+        @raises C{ProductDefinitionFileNotFound}:
         """
         label = self._getProductDefinitionLabel()
         stream = self._getStreamFromRepository(client, label)
@@ -418,7 +429,7 @@
     def getBuildDefinitions(self):
         """
         @return: The build definitions from this product definition
-        @rtype: C{list} of C{_Build} objects
+        @rtype: C{list} of C{Build} objects
         """
         return self.buildDefinition
 
@@ -441,9 +452,10 @@
         @type imageGroup: C{str}
         subclass.
         """
-        obj = _Build(name = name, baseFlavor = baseFlavor,
+        obj = Build(name = name, baseFlavor = baseFlavor,
                      imageType = imageType, stages = stages,
-                     imageGroup = imageGroup)
+                     imageGroup = imageGroup,
+                     parentImageGroup = self.imageGroup)
         self.buildDefinition.append(obj)
 
     @classmethod
@@ -469,7 +481,7 @@
         @param stageName: stage name
         @type stageName: C{str}
         @return: A list of build definitions for the stage.
-        @rtype: C{list} of C{_Build} objects
+        @rtype: C{list} of C{Build} objects
         """
         ret = []
         for build in self.getBuildDefinitions():
@@ -557,6 +569,8 @@
             troves = repos.findTroves(None, [ troveSpec ])
         except conaryErrors.TroveNotFound:
             raise ProductDefinitionTroveNotFound("%s=%s" % (troveName, label))
+        except conaryErrors.RepositoryError, e:
+            raise RepositoryError(str(e))
         nvfs = troves[troveSpec]
         if not nvfs:
             raise ProductDefinitionTroveNotFound("%s=%s" % (troveName, label))
@@ -613,18 +627,38 @@
         self.troveName = troveName
         self.label = label
 
-class _Build(xmllib.SerializableObject):
-    __slots__ = [ 'name', 'baseFlavor', 'imageType', 'stages', 'imageGroup' ]
+class Build(xmllib.SerializableObject):
+    __slots__ = [ 'name', 'baseFlavor', 'imageType', 'stages', 'imageGroup',
+                  'parentImageGroup', ]
     tag = "build"
 
     def __init__(self, name = None, baseFlavor = None,
-                 imageType = None, stages = None, imageGroup = None):
+                 imageType = None, stages = None, imageGroup = None,
+                 parentImageGroup = None):
         xmllib.SlotBasedSerializableObject.__init__(self)
         self.name = name
         self.baseFlavor = baseFlavor
         self.imageType = imageType
         self.stages = stages or []
         self.imageGroup = imageGroup
+        self.parentImageGroup = parentImageGroup
+
+    def getBuildImageGroup(self):
+        if self.imageGroup is None:
+            return self.parentImageGroup
+        return self.imageGroup
+
+    def getBuildImageType(self):
+        return self.imageType
+
+    def getBuildStages(self):
+        return list(self.stages)
+
+    def getBuildName(self):
+        return self.name
+
+    def getBuildBaseFlavor(self):
+        return self.baseFlavor
 
     def _getName(self):
         return self.tag
@@ -748,13 +782,14 @@
                 imageGroup = imageGroup[0].getText()
             else:
                 imageGroup = None
-            pyobj = _Build(
+            pyobj = Build(
                 name = node.getAttribute('name'),
                 baseFlavor = node.getAttribute('baseFlavor'),
                 imageType = imgType,
                 stages = [ x.getAttribute('ref')
                            for x in node.getChildren('stage') ],
                 imageGroup = imageGroup,
+                parentImageGroup = self.imageGroup,
                 )
             builds.append(pyobj)
 

From misa@rpath.com Wed May 14 14:26:05 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m4EEQ5Vx031024 for <rpath-common-commits@lists.rpath.com>;
	Wed, 14 May 2008 14:26:05 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m4EEQ5Tb010696
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 14 May 2008 10:26:05 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m4EEQ5xp026313
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 14 May 2008 10:26:05 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m4EEQ4VK009222
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 14 May 2008 10:26:04 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m4EEQ4oN009217
	for rpath-common-commits@lists.rpath.com;
	Wed, 14 May 2008 10:26:04 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805141426.m4EEQ4oN009217@scc.eng.rpath.com>
Date: Wed, 14 May 2008 10:26:04 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Accepting Label objects too
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 14 May 2008 14:26:05 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Accepting Label objects too

diff -r a95153702dab -r cf7216a217ef rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Mon May 12 23:10:54 2008 -0400
+++ b/rpath_common/proddef/api1.py	Wed May 14 10:25:49 2008 -0400
@@ -32,6 +32,7 @@
 
 from conary import changelog
 from conary import errors as conaryErrors
+from conary import versions as conaryVersions
 from conary.conaryclient import filetypes
 
 from rpath_common.xmllib import api1 as xmllib
@@ -423,6 +424,9 @@
         @param label: Label for the upstream source
         @type label: C{str} or C{None}
         """
+        if label is not None:
+            if isinstance(label, conaryVersions.Label):
+                label = str(label)
         obj = _UpstreamSource(troveName = troveName, label = label)
         self.upstreamSources.append(obj)
 

From misa@rpath.com Wed May 14 17:45:06 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m4EHj6PK002231 for <rpath-common-commits@lists.rpath.com>;
	Wed, 14 May 2008 17:45:06 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m4EHj6cR010032
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 14 May 2008 13:45:06 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m4EHj6nr009314
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 14 May 2008 13:45:06 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m4EHj5uf018514
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 14 May 2008 13:45:05 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m4EHj5Hx018485
	for rpath-common-commits@lists.rpath.com;
	Wed, 14 May 2008 13:45:05 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805141745.m4EHj5Hx018485@scc.eng.rpath.com>
Date: Wed, 14 May 2008 13:45:05 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: Added class to extract the top-level node
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 14 May 2008 17:45:06 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/xmllib/api1.py

Added class to extract the top-level node

diff -r bd0067bd3443 -r 32a830c510ca rpath_common/xmllib/api1.py
--- a/rpath_common/xmllib/api1.py	Thu May 08 13:47:10 2008 -0400
+++ b/rpath_common/xmllib/api1.py	Mon May 12 12:08:27 2008 -0400
@@ -545,6 +545,70 @@
         return attrs, children
 #}
 
+class ToplevelNode(object):
+    """
+    A class that extracts the first node out of an XML stream
+
+    @ivar name: the name of the top-level node
+    @type name: C{unicode}
+    @ivar attrs: the node's attributes
+    @type attrs: C{dict}
+    """
+
+    class _FirstTagFound(Exception):
+        pass
+
+    class _Handler(sax.ContentHandler):
+        def __init__(self):
+            sax.ContentHandler.__init__(self)
+            self._name = None
+            self._attrs = None
+
+        def startElement(self, name, attrs):
+            self._name = name
+            self._attrs = dict((k, v) for (k, v) in attrs.items())
+            raise ToplevelNode._FirstTagFound()
+
+        def endElement(self, name):
+            "This method should never be called"
+
+        def characters(self, ch):
+            "This method should never be called"
+
+    def __init__(self, stream):
+        """
+        Read the top-level node.
+
+        @param stream: the XML stream
+        @type stream: C{str} or C{file}
+        """
+        self.name = None
+        self.attrs = {}
+
+        self.parseStream(stream)
+
+    def parseStream(self, stream):
+        """
+        Parse the stream and extract the top-level node name and attributes.
+
+        @param stream: the XML stream
+        @type stream: C{str} or C{file}
+        """
+        if not hasattr(stream, 'read'):
+            stream = StringIO.StringIO(stream)
+
+        contentHandler = self._Handler()
+        parser = sax.make_parser()
+        parser.setContentHandler(contentHandler)
+        try:
+            parser.parse(stream)
+        except sax.SAXParseException:
+            return
+        except self._FirstTagFound:
+            self.name = contentHandler._name
+            self.attrs = contentHandler._attrs
+            return
+
 #{ Binding classes
 class BindingHandler(sax.ContentHandler):
     """

From misa@rpath.com Wed May 14 17:45:08 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m4EHj8RA002237 for <rpath-common-commits@lists.rpath.com>;
	Wed, 14 May 2008 17:45:08 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m4EHj8Bd010044
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 14 May 2008 13:45:08 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m4EHj7Da009320
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 14 May 2008 13:45:08 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m4EHj7Ci018575
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 14 May 2008 13:45:07 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m4EHj7uT018558
	for rpath-common-commits@lists.rpath.com;
	Wed, 14 May 2008 13:45:07 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805141745.m4EHj7uT018558@scc.eng.rpath.com>
Date: Wed, 14 May 2008 13:45:06 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: Added convenience method getAttributesByNamespace
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 14 May 2008 17:45:08 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/xmllib/api1.py

Added convenience method getAttributesByNamespace

diff -r 32a830c510ca -r 51edc02758fe rpath_common/xmllib/api1.py
--- a/rpath_common/xmllib/api1.py	Mon May 12 12:08:27 2008 -0400
+++ b/rpath_common/xmllib/api1.py	Mon May 12 12:37:00 2008 -0400
@@ -609,6 +609,42 @@
             self.attrs = contentHandler._attrs
             return
 
+    def getAttributesByNamespace(self, namespace):
+        """
+        Retrieve the top-level node's attributes associated with the specified
+        namespace.
+
+        Example::
+
+            Given the XML specification:
+            <node xmlns:x="urlX" x:a="1" x:b="2" attr="3" />
+
+            the method, called with namespace "urlX", will return
+            {"a" : "1", "b" : "2"}
+
+        @return: The attributes associated with the namespace
+        @rtype: dict
+        """
+        nsMap = {}
+        otherAttrs = {}
+        for k, v in self.attrs.items():
+            arr = k.split(':', 1)
+            if arr[0] == 'xmlns':
+                if len(arr) == 1:
+                    nsAlias = None
+                else:
+                    nsAlias = arr[1]
+                nsMap[v] = nsAlias
+            else:
+                if len(arr) == 1:
+                    attrNs, attrK = None, arr[0]
+                else:
+                    attrNs, attrK = arr
+                otherAttrs.setdefault(attrNs, {})[attrK] = v
+        if namespace not in nsMap:
+            return {}
+        return otherAttrs.get(nsMap[namespace], {})
+
 #{ Binding classes
 class BindingHandler(sax.ContentHandler):
     """

From misa@rpath.com Wed May 14 17:45:12 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m4EHjCJ6002243 for <rpath-common-commits@lists.rpath.com>;
	Wed, 14 May 2008 17:45:12 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m4EHjBSC010073
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 14 May 2008 13:45:11 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m4EHjBfv009357
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 14 May 2008 13:45:11 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m4EHjB2W018656
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 14 May 2008 13:45:11 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m4EHjB0t018631
	for rpath-common-commits@lists.rpath.com;
	Wed, 14 May 2008 13:45:11 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805141745.m4EHjB0t018631@scc.eng.rpath.com>
Date: Wed, 14 May 2008 13:45:10 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: Invalid XML exception
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 14 May 2008 17:45:12 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/xmllib/api1.py

Invalid XML exception

diff -r 51edc02758fe -r f0f22761e653 rpath_common/xmllib/api1.py
--- a/rpath_common/xmllib/api1.py	Mon May 12 12:37:00 2008 -0400
+++ b/rpath_common/xmllib/api1.py	Mon May 12 14:38:23 2008 -0400
@@ -29,6 +29,9 @@
 
 class UndefinedNamespaceError(XmlLibError):
     "Raised when a reference to an undefined namespace is found"
+
+class InvalidXML(XmlLibError):
+    "Raised when the XML data is invalid"
 #}
 
 #{ Base classes
@@ -821,7 +824,10 @@
         self.contentHandler.rootNode = None
         parser = sax.make_parser()
         parser.setContentHandler(self.contentHandler)
-        parser.parse(stream)
+        try:
+            parser.parse(stream)
+        except sax.SAXParseException:
+            raise InvalidXML
         rootNode = self.contentHandler.rootNode
         self.contentHandler.rootNode = None
         return rootNode

From misa@rpath.com Wed May 14 17:45:14 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m4EHjDld002247 for <rpath-common-commits@lists.rpath.com>;
	Wed, 14 May 2008 17:45:13 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m4EHjDvc010086
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 14 May 2008 13:45:13 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m4EHjDf5009379
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 14 May 2008 13:45:13 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m4EHjCNW018709
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 14 May 2008 13:45:12 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m4EHjCCO018698
	for rpath-common-commits@lists.rpath.com;
	Wed, 14 May 2008 13:45:12 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805141745.m4EHjCCO018698@scc.eng.rpath.com>
Date: Wed, 14 May 2008 13:45:12 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: XML schema validation (RDST-232)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 14 May 2008 17:45:14 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/xmllib/api1.py

XML schema validation (RDST-232)

diff -r f0f22761e653 -r 8508067a1f42 rpath_common/xmllib/api1.py
--- a/rpath_common/xmllib/api1.py	Mon May 12 14:38:23 2008 -0400
+++ b/rpath_common/xmllib/api1.py	Wed May 14 13:44:48 2008 -0400
@@ -18,6 +18,7 @@
 character are public interfaces.
 """
 
+import os
 import StringIO
 from xml import sax
 
@@ -32,6 +33,15 @@
 
 class InvalidXML(XmlLibError):
     "Raised when the XML data is invalid"
+
+class SchemaValidationError(XmlLibError):
+    "Raised when the XML data is not validating against the XML schema"
+
+class UnknownSchemaError(SchemaValidationError):
+    """
+    Raised when an unknown or missing schema was specified in the XML document
+    """
+
 #}
 
 #{ Base classes
@@ -774,7 +784,13 @@
     registerType: register a tag with a class defining how to treat XML content.
     toXml: takes an object and renders it into an XML representation.
 
+    @cvar xmlSchemaNamespace: Namespace for XML schema. This should not
+    change.
+    @type xmlSchemaNamespace: C{str}
+
     """
+    xmlSchemaNamespace = 'http://www.w3.org/2001/XMLSchema-instance'
+
     def __init__(self, typeDict = None):
         """
         Initialize the Binder object.
@@ -798,29 +814,47 @@
         return self.contentHandler.registerType(klass, name = name,
                                                 namespace = namespace)
 
-    def parseString(self, data):
+    def parseString(self, data, validate = False, schemaDir = None):
         """
         Parse an XML string.
         @param data: the XML string to be parsed
         @type data: C{str}
+        @param validate: Validate before parsing (off by default)
+        @type validate: C{bool}
+        @param schemaDir: A directory where schema files are stored
+        @type schemaDir: C{str}
+
         @return: a Node object
         @rtype: A previosly registered class (using C{registerType} or a
         C{BaseNode}.
+        @raises C{UnknownSchemaError}: if no valid schema was found
+        @raises C{InvalidXML}: if the XML is malformed.
         """
         stream = StringIO.StringIO(data)
-        return self.parseFile(stream)
+        return self.parseFile(stream, validate = validate,
+                              schemaDir = schemaDir)
 
-    def parseFile(self, stream):
+    def parseFile(self, stream, validate = False, schemaDir = None):
         """
         Parse an XML file.
         @param stream: the XML file to be parsed
         @type stream: C{file}
+        @param validate: Validate before parsing (off by default)
+        @type validate: C{bool}
+        @param schemaDir: A directory where schema files are stored
+        @type schemaDir: C{str}
+
         @return: a Node object
         @rtype: A previosly registered class (using C{registerType} or a
         C{BaseNode}.
+        @raises C{UnknownSchemaError}: if no valid schema was found
+        @raises C{InvalidXML}: if the XML is malformed.
         """
         if isinstance(stream, str):
             stream = file(stream)
+        if validate:
+            self.validate(stream, schemaDir = schemaDir)
+
         self.contentHandler.rootNode = None
         parser = sax.make_parser()
         parser.setContentHandler(self.contentHandler)
@@ -831,6 +865,86 @@
         rootNode = self.contentHandler.rootNode
         self.contentHandler.rootNode = None
         return rootNode
+
+    @classmethod
+    def getSchemaLocationsFromStream(cls, stream):
+        """
+        Extract the schema locations from an XML stream.
+        @param stream: an XML stream
+        @type stream: C{file}
+        @return: A list of schema locations found in the document
+        @rtype: C{list}
+        @raises C{UnknownSchemaError}: if no schema location was specified in
+        the trove.
+        @raises C{InvalidXML}: if the XML is malformed.
+        """
+        # We need the schema location, so extract the top-level node
+
+        # Make sure we roll the stream back where it was
+        pos = stream.tell()
+        tn = ToplevelNode(stream)
+        stream.seek(pos)
+
+        if tn.name is None:
+            raise InvalidXML("Possibly malformed XML")
+        attrs = tn.getAttributesByNamespace(cls.xmlSchemaNamespace)
+        schemaLocation = attrs.get('schemaLocation')
+        if schemaLocation is None:
+            raise UnknownSchemaError(
+                "Schema location not specified in XML stream")
+        schemaFiles = [ os.path.basename(x) for x in schemaLocation.split() ]
+        return schemaFiles
+
+    @classmethod
+    def chooseSchemaFile(cls, schemaFiles, schemaDir):
+        """
+        Given a list of schema files, choose the one that we can find in
+        the specified directory.
+        @param schemaFiles: A list of schema files
+        @type schemaFiles: C{list}
+        @param schemaDir: A directory where schema files reside
+        @type schemaDir: C{str}
+        @return: path to the schema file
+        @rtype: C{str}
+        @raises C{UnknownSchemaError}: if no valid schema was found
+        """
+        if schemaDir is None:
+            raise UnknownSchemaError("Schema directory not specified")
+        if not os.path.isdir(schemaDir):
+            raise UnknownSchemaError("Schema directory `%s' not found" %
+                schemaDir)
+
+        # Pick up the first schema that we could find, in the order they were
+        # specified
+        localFiles = os.listdir(schemaDir)
+
+        possibleSchema = set(schemaFiles).intersection(localFiles)
+        if not possibleSchema:
+            raise UnknownSchemaError(
+                "No applicable schema found in directory `%s'" % schemaDir)
+
+        for sch in schemaFiles:
+            if sch in possibleSchema:
+                return os.path.join(schemaDir, sch)
+
+    @classmethod
+    def validate(cls, stream, schemaDir = None):
+        """
+        Validate a stream against schema files found in a directory.
+        @param stream: an XML stream
+        @type stream: C{file}
+        @param schemaDir: A directory where schema files reside
+        @type schemaDir: C{str}
+        @raises C{UnknownSchemaError}: if no valid schema was found
+        @raises C{InvalidXML}: if the XML is malformed.
+        """
+        validSchema = cls.getSchemaLocationsFromStream(stream)
+        schemaFile = cls.chooseSchemaFile(validSchema, schemaDir)
+
+        schema = etree.XMLSchema(file = schemaFile)
+        tree = etree.parse(stream)
+        if not schema.validate(tree):
+            raise SchemaValidationError(str(schema.error_log))
 
     @classmethod
     def toXml(cls, obj, prettyPrint = True):

From misa@rpath.com Wed May 14 18:02:16 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m4EI2G4G002611 for <rpath-common-commits@lists.rpath.com>;
	Wed, 14 May 2008 18:02:16 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m4EI2GBa012874
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 14 May 2008 14:02:16 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m4EI2GYe011010
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 14 May 2008 14:02:16 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m4EI2FpA019674
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 14 May 2008 14:02:15 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m4EI2Fn9019658
	for rpath-common-commits@lists.rpath.com;
	Wed, 14 May 2008 14:02:15 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805141802.m4EI2Fn9019658@scc.eng.rpath.com>
Date: Wed, 14 May 2008 14:02:15 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Added factorySources (RDST-229)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 14 May 2008 18:02:16 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       doc/example.py doc/example.xml rpath_common/proddef/api1.py xsd/rpd-1.0.xsd

Added factorySources (RDST-229)

diff -r cf7216a217ef -r f84b859c067a doc/example.py
--- a/doc/example.py	Wed May 14 10:25:49 2008 -0400
+++ b/doc/example.py	Wed May 14 11:50:52 2008 -0400
@@ -61,6 +61,8 @@
                         label='rap.rpath.com@rpath:linux-1')
 prodDef.addUpstreamSource(troveName='group-postgres',
                         label='products.rpath.com@rpath:postgres-8.2')
+prodDef.addFactorySource(troveName='group-factories',
+                        label='products.rpath.com@rpath:factories-1')
 
 prodDef.addBuildDefinition(name='x86 Installable ISO Build',
                         baseFlavor='is: x86',
diff -r cf7216a217ef -r f84b859c067a doc/example.xml
--- a/doc/example.xml	Wed May 14 10:25:49 2008 -0400
+++ b/doc/example.xml	Wed May 14 11:50:52 2008 -0400
@@ -34,6 +34,9 @@
     <upstreamSource troveName="group-rap-standard" label="rap.rpath.com@rpath:linux-1"/>
     <upstreamSource troveName="group-postgres" label="products.rpath.com@rpath:postgres-8.2"/>
   </upstreamSources>
+  <factorySources>
+    <factorySource troveName="group-factories" label="products.rpath.com@rpath:factories-1"/>
+  </factorySources>
   <buildDefinition>
     <build baseFlavor="is: x86" name="x86 Installable ISO Build">
       <installableIsoImage/>
diff -r cf7216a217ef -r f84b859c067a rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Wed May 14 10:25:49 2008 -0400
+++ b/rpath_common/proddef/api1.py	Wed May 14 11:50:52 2008 -0400
@@ -145,6 +145,7 @@
         self.baseFlavor = getattr(xmlObj, 'baseFlavor', None)
         self.stages.extend(getattr(xmlObj, 'stages', []))
         self.upstreamSources.extend(getattr(xmlObj, 'upstreamSources', []))
+        self.factorySources.extend(getattr(xmlObj, 'factorySources', []))
         self.buildDefinition.extend(getattr(xmlObj, 'buildDefinition', []))
 
         ver = xmlObj.getAttribute('version')
@@ -379,6 +380,14 @@
         """
         return self.upstreamSources
 
+    def getFactorySources(self):
+        """
+        @return: the factory sources from this product definition
+        @rtype: C{list} of C{_FactorySource} objects
+        """
+        return self.factorySources
+
+
     def getLabelForStage(self, stageName):
         """
         Synthesize the label for a particular stage based upon
@@ -424,11 +433,25 @@
         @param label: Label for the upstream source
         @type label: C{str} or C{None}
         """
+        self._addSource(troveName, label, _UpstreamSource, self.upstreamSources)
+
+    def addFactorySource(self, troveName = None, label = None):
+        """
+        Add a factory source.
+        @param troveName: the trove name for the factory source.
+        @type name: C{str} or C{None}
+        @param label: Label for the factory source
+        @type label: C{str} or C{None}
+        """
+        self._addSource(troveName, label, _FactorySource, self.factorySources)
+
+    def _addSource(self, troveName, label, cls, intList):
+        "Internal function for adding a Source"
         if label is not None:
             if isinstance(label, conaryVersions.Label):
                 label = str(label)
-        obj = _UpstreamSource(troveName = troveName, label = label)
-        self.upstreamSources.append(obj)
+        obj = cls(troveName = troveName, label = label)
+        intList.append(obj)
 
     def getBuildDefinitions(self):
         """
@@ -536,6 +559,7 @@
         self.conaryNamespace = None
         self.imageGroup = None
         self.upstreamSources = _UpstreamSources()
+        self.factorySources = _FactorySources()
         self.buildDefinition = _BuildDefinition()
 
     def _saveToRepository(self, conaryClient, label, message = None):
@@ -608,6 +632,12 @@
 
 # pylint: disable-msg=R0903
 # Too few public methods (1/2): this is an interface
+class _FactorySources(xmllib.SerializableList):
+    tag = "factorySources"
+
+
+# pylint: disable-msg=R0903
+# Too few public methods (1/2): this is an interface
 class _BuildDefinition(xmllib.SerializableList):
     tag = "buildDefinition"
 
@@ -630,6 +660,9 @@
         xmllib.SlotBasedSerializableObject.__init__(self)
         self.troveName = troveName
         self.label = label
+
+class _FactorySource(_UpstreamSource):
+    tag = "factorySource"
 
 class Build(xmllib.SerializableObject):
     __slots__ = [ 'name', 'baseFlavor', 'imageType', 'stages', 'imageGroup',
@@ -742,6 +775,11 @@
             self._addUpstreamSources(children)
             return
 
+        if chName == self._makeAbsoluteName('factorySources'):
+            children = childNode.getChildren('factorySource')
+            self._addFactorySources(children)
+            return
+
         if chName == self._makeAbsoluteName('buildDefinition'):
             children = childNode.getChildren('build')
             self._addBuildDefinition(children)
@@ -765,6 +803,15 @@
                 troveName = node.getAttribute('troveName'),
                 label = node.getAttribute('label'))
             sources.append(pyObj)
+
+    def _addFactorySources(self, factorySources):
+        sources = self.factorySources = []
+        for node in factorySources:
+            pyObj = _FactorySource(
+                troveName = node.getAttribute('troveName'),
+                label = node.getAttribute('label'))
+            sources.append(pyObj)
+
 
     def _addBuildDefinition(self, buildNodes):
         dispatcher = xmllib.NodeDispatcher(self._nsMap)
@@ -802,6 +849,7 @@
         xmllib.BaseNode.__init__(self, attrs, namespaces, name = name)
         self.stages = prodDef.getStages()
         self.upstreamSources = prodDef.getUpstreamSources()
+        self.factorySources = prodDef.getFactorySources()
         self.buildDefinition = prodDef.getBuildDefinitions()
 
         self.productName = xmllib.StringNode(name = 'productName')
@@ -853,7 +901,7 @@
         self.baseFlavor.characters(prodDef.getBaseFlavor())
 
     def iterChildren(self):
-        return [ self.productName,
+        ret =  [ self.productName,
                  self.productShortname,
                  self.productDescription,
                  self.productVersion,
@@ -863,8 +911,11 @@
                  self.imageGroup,
                  self.baseFlavor,
                  self.stages,
-                 self.upstreamSources,
-                 self.buildDefinition ]
+                 self.upstreamSources, ]
+        if len(self.factorySources):
+            ret.append(self.factorySources)
+        ret.append(self.buildDefinition)
+        return ret
 
 class _ImageTypeFakeNode(object):
     """Internal class for emulating the interface expected by the node
diff -r cf7216a217ef -r f84b859c067a xsd/rpd-1.0.xsd
--- a/xsd/rpd-1.0.xsd	Wed May 14 10:25:49 2008 -0400
+++ b/xsd/rpd-1.0.xsd	Wed May 14 11:50:52 2008 -0400
@@ -53,6 +53,13 @@
             <xsd:element name="upstreamSource" type="upstreamSourceType" minOccurs="1" maxOccurs="unbounded" />
         </xsd:sequence>
     </xsd:complexType>
+
+    <xsd:complexType name="factorySourceListType">
+        <xsd:sequence>
+            <xsd:element name="factorySource" type="upstreamSourceType" minOccurs="1" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
 
     <xsd:complexType name="amiImageType">
         <xsd:attributeGroup ref="common" />
@@ -221,6 +228,7 @@
                 <xsd:element name="baseFlavor" type="rpd:flavorStringType" />
                 <xsd:element name="stages" type="rpd:stageListType" />
                 <xsd:element name="upstreamSources" type="rpd:upstreamSourceListType" />
+                <xsd:element name="factorySources" type="rpd:factorySourceListType" minOccurs="0" maxOccurs="1" />
                 <xsd:element name="buildDefinition" type="rpd:buildDefinitionType" />
             </xsd:sequence>
             <xsd:attribute name="version" type="xsd:string" />

From misa@rpath.com Wed May 14 18:02:19 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m4EI2JiN002617 for <rpath-common-commits@lists.rpath.com>;
	Wed, 14 May 2008 18:02:19 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m4EI2Idh012880
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 14 May 2008 14:02:19 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m4EI2Ibs011019
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 14 May 2008 14:02:18 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m4EI2HcB019733
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 14 May 2008 14:02:17 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m4EI2H0T019726
	for rpath-common-commits@lists.rpath.com;
	Wed, 14 May 2008 14:02:17 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805141802.m4EI2H0T019726@scc.eng.rpath.com>
Date: Wed, 14 May 2008 14:02:17 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Added schema validaation (RDST-229)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 14 May 2008 18:02:19 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Added schema validaation (RDST-229)

diff -r f84b859c067a -r 932106321636 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Wed May 14 11:50:52 2008 -0400
+++ b/rpath_common/proddef/api1.py	Wed May 14 14:01:07 2008 -0400
@@ -76,17 +76,18 @@
     @type version: C{str}
     @cvar defaultNamespace:
     @type defaultNamespace: C{str}
-    @cvar xmlSchemaNamespace:
-    @type xmlSchemaNamespace: C{str}
     @cvar xmlSchemaLocation:
     @type xmlSchemaLocation: C{str}
     @cvar _imageTypeDispatcher: an object factory for imageType objects
     @type _imageTypeDispatcher: C{xmllib.NodeDispatcher}
+    @cvar schemaDir: Directory where schema definitions are stored
+    @type schemaDir: C{str}
     """
     version = '1.0'
     defaultNamespace = _xmlConstants.defaultNamespaceList[0]
-    xmlSchemaNamespace = _xmlConstants.xmlSchemaNamespace
     xmlSchemaLocation = _xmlConstants.xmlSchemaLocation
+
+    schemaDir = "/usr/share/rpath_common"
 
     _imageTypeDispatcher = xmllib.NodeDispatcher({})
     _imageTypeDispatcher.registerClasses(imageTypes, imageTypes.ImageType_Base)
@@ -107,12 +108,16 @@
         pass
 """
 
-    def __init__(self, fromStream = None):
+    def __init__(self, fromStream = None, validate = False, schemaDir = None):
         """
         Initialize a ProductDefinition object, getting data from the optional
         XML stream.
         @param fromStream: An optional XML string or file
         @type fromStream: C{str} or C{file}
+        @param validate: Validate before parsing (off by default)
+        @type validate: C{bool}
+        @param schemaDir: A directory where schema files are stored
+        @type schemaDir: C{str}
         """
 
         self._initFields()
@@ -120,18 +125,24 @@
         if fromStream:
             if isinstance(fromStream, (str, unicode)):
                 fromStream = StringIO.StringIO(fromStream)
-            self.parseStream(fromStream)
+            self.parseStream(fromStream, validate = validate,
+                             schemaDir = schemaDir)
 
-    def parseStream(self, stream):
+    def parseStream(self, stream, validate = False, schemaDir = None):
         """
         Initialize the current object from an XML stream.
         @param stream: An XML stream
         @type stream: C{file}
+        @param validate: Validate before parsing (off by default)
+        @type validate: C{bool}
+        @param schemaDir: A directory where schema files are stored
+        @type schemaDir: C{str}
         """
         self._initFields()
         binder = xmllib.DataBinder()
         binder.registerType(_ProductDefinition, 'productDefinition')
-        xmlObj = binder.parseFile(stream)
+        xmlObj = binder.parseFile(stream, validate = validate,
+                                  schemaDir = schemaDir or self.schemaDir)
         self.productName = getattr(xmlObj, 'productName', None)
         self.productDescription = getattr(xmlObj, 'productDescription', None)
         self.productShortname = getattr(xmlObj, 'productShortname', None)
@@ -166,7 +177,7 @@
         """
         attrs = {'version' : self.version,
                  'xmlns' : self.defaultNamespace,
-                 'xmlns:xsi' : self.xmlSchemaNamespace,
+                 'xmlns:xsi' : xmllib.DataBinder.xmlSchemaNamespace,
                  "xsi:schemaLocation" : self.xmlSchemaLocation,
         }
         nameSpaces = {}

From scott@rpath.com Thu May 15 17:59:30 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m4FHxUYC028098 for <rpath-common-commits@lists.rpath.com>;
	Thu, 15 May 2008 17:59:30 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m4FHxUgW025425
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 15 May 2008 13:59:30 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m4FHxT5R012653
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 15 May 2008 13:59:29 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m4FHxTHN017969
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 15 May 2008 13:59:29 -0400
Received: (from scott@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m4FHxTfG017964
	for rpath-common-commits@lists.rpath.com;
	Thu, 15 May 2008 13:59:29 -0400
From: Scott Parkerson <scott@rpath.com>
Message-Id: <200805151759.m4FHxTfG017964@scc.eng.rpath.com>
Date: Thu, 15 May 2008 13:59:29 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: stringify labels, for Conary's sake
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 15 May 2008 17:59:31 -0000

tag:         tip
user:        Scott Parkerson <http://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

stringify labels, for Conary's sake

diff -r 932106321636 -r 2bb6d9b05535 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Wed May 14 14:01:07 2008 -0400
+++ b/rpath_common/proddef/api1.py	Thu May 15 13:58:59 2008 -0400
@@ -543,7 +543,7 @@
 
         if not (hostname and shortname and namespace and version):
             raise MissingInformationError
-        return "%s@%s:%s-%s" % (hostname, namespace, shortname, version)
+        return str("%s@%s:%s-%s" % (hostname, namespace, shortname, version))
 
     def _getLabelForStage(self, stageObj):
         """
@@ -556,7 +556,7 @@
         """
         prefix = self._getProductDefinitionLabel()
         labelSuffix = stageObj.labelSuffix or '' # this can be blank
-        return prefix + labelSuffix
+        return str(prefix + labelSuffix)
 
     def _initFields(self):
         self.baseFlavor = None

From elliot@rpath.com Mon May 19 16:10:57 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m4JGAvKH030192 for <rpath-common-commits@lists.rpath.com>;
	Mon, 19 May 2008 16:10:57 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m4JGAvTE024443
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 19 May 2008 12:10:57 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m4JGAuDZ030903
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 19 May 2008 12:10:56 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m4JGAuHp011982
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 19 May 2008 12:10:56 -0400
Received: (from elliot@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m4JGAu2C011977
	for rpath-common-commits@lists.rpath.com;
	Mon, 19 May 2008 12:10:56 -0400
From: Elliot Peele <elliot@rpath.com>
Message-Id: <200805191610.m4JGAu2C011977@scc.eng.rpath.com>
Date: Mon, 19 May 2008 12:10:56 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: remove double for
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailman-Approved-At: Mon, 19 May 2008 17:07:20 +0000
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 19 May 2008 16:10:57 -0000

tag:         tip
user:        Elliot Peele <http://issues.rpath.com/>
files:       README

remove double for

diff -r 8508067a1f42 -r 96d6d82d694b README
--- a/README	Wed May 14 13:44:48 2008 -0400
+++ b/README	Mon May 19 12:10:52 2008 -0400
@@ -1,5 +1,5 @@
 This is a component of the rpath_common set of modules.  It provides
-a stable interface for for reading and writing rPath-generated XML
+a stable interface for reading and writing rPath-generated XML
 files.
 
 Note that until version 1.0 is released, public APIs are subject to

From misa@rpath.com Thu May 22 16:34:47 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m4MGYlps017854 for <rpath-common-commits@lists.rpath.com>;
	Thu, 22 May 2008 16:34:47 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m4MGYkmu018713
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 22 May 2008 12:34:46 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m4MGYk2I031750
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 22 May 2008 12:34:46 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m4MGYkNQ002279
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 22 May 2008 12:34:46 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m4MGYjrW002272
	for rpath-common-commits@lists.rpath.com;
	Thu, 22 May 2008 12:34:45 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805221634.m4MGYjrW002272@scc.eng.rpath.com>
Date: Thu, 22 May 2008 12:34:45 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Use the right variable as a recipe (RDST-243)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 22 May 2008 16:34:47 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Use the right variable as a recipe (RDST-243)

diff -r 2bb6d9b05535 -r e2b91fbc8bf7 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Thu May 15 13:58:59 2008 -0400
+++ b/rpath_common/proddef/api1.py	Thu May 22 12:34:42 2008 -0400
@@ -586,7 +586,7 @@
         self.serialize(stream)
         pathDict = {
             "%s.recipe" % self._troveName : filetypes.RegularFile(
-                contents = self._recipe),
+                contents = recipe),
             self._troveFileName : filetypes.RegularFile(
                 contents = stream.getvalue()),
         }

From misa@rpath.com Fri May 23 18:13:36 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m4NIDaGO017045 for <rpath-common-commits@lists.rpath.com>;
	Fri, 23 May 2008 18:13:36 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m4NIDad3028599
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 23 May 2008 14:13:36 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m4NIDaCj005564
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 23 May 2008 14:13:36 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m4NIDajU001054
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 23 May 2008 14:13:36 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m4NIDZaY001046
	for rpath-common-commits@lists.rpath.com;
	Fri, 23 May 2008 14:13:35 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805231813.m4NIDZaY001046@scc.eng.rpath.com>
Date: Fri, 23 May 2008 14:13:35 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Changing _getProductDefinitionLabel to a
	public method
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 23 May 2008 18:13:37 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Changing _getProductDefinitionLabel to a public method

diff -r e2b91fbc8bf7 -r 4511b72e6aed rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Thu May 22 12:34:42 2008 -0400
+++ b/rpath_common/proddef/api1.py	Fri May 23 14:13:26 2008 -0400
@@ -194,7 +194,7 @@
         @param message: An optional commit message
         @type message: C{str}
         """
-        label = self._getProductDefinitionLabel()
+        label = self.getProductDefinitionLabel()
         return self._saveToRepository(client, label, message = message)
 
     def loadFromRepository(self, client):
@@ -212,7 +212,7 @@
         @raises C{ProductDefinitionTroveNotFound}:
         @raises C{ProductDefinitionFileNotFound}:
         """
-        label = self._getProductDefinitionLabel()
+        label = self.getProductDefinitionLabel()
         stream = self._getStreamFromRepository(client, label)
         stream.seek(0)
         self.parseStream(stream)
@@ -527,10 +527,9 @@
                 ret.append(build)
         return ret
 
-    #{ Internal methods
-    def _getProductDefinitionLabel(self):
+    def getProductDefinitionLabel(self):
         """
-        Private method that returns the product definition's label
+        Method that returns the product definition's label
         @return: a Conary label string
         @rtype: C{str}
         @raises MissingInformationError: if there isn't enough information
@@ -545,6 +544,7 @@
             raise MissingInformationError
         return str("%s@%s:%s-%s" % (hostname, namespace, shortname, version))
 
+    #{ Internal methods
     def _getLabelForStage(self, stageObj):
         """
         Private method that works similarly to L{getLabelForStage},
@@ -554,7 +554,7 @@
         @raises MissingInformationError: if there isn't enough information
             in the product definition to generate the label
         """
-        prefix = self._getProductDefinitionLabel()
+        prefix = self.getProductDefinitionLabel()
         labelSuffix = stageObj.labelSuffix or '' # this can be blank
         return str(prefix + labelSuffix)
 

From misa@rpath.com Fri May 23 18:29:34 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m4NITXAV017399 for <rpath-common-commits@lists.rpath.com>;
	Fri, 23 May 2008 18:29:33 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m4NITXr7030975
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 23 May 2008 14:29:33 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m4NITXa2006762
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 23 May 2008 14:29:33 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m4NITWo0002264
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 23 May 2008 14:29:32 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m4NITW4r002258
	for rpath-common-commits@lists.rpath.com;
	Fri, 23 May 2008 14:29:32 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805231829.m4NITW4r002258@scc.eng.rpath.com>
Date: Fri, 23 May 2008 14:29:32 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Added a getTroveName()
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 23 May 2008 18:29:34 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Added a getTroveName()

diff -r 4511b72e6aed -r c3250c539094 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Fri May 23 14:13:26 2008 -0400
+++ b/rpath_common/proddef/api1.py	Fri May 23 14:29:12 2008 -0400
@@ -544,6 +544,15 @@
             raise MissingInformationError
         return str("%s@%s:%s-%s" % (hostname, namespace, shortname, version))
 
+    @classmethod
+    def getTroveName(cls):
+        """
+        @return: The name of the trove containing the product definition XML
+        file.
+        @rtype: C{str}
+        """
+        return cls._troveName
+
     #{ Internal methods
     def _getLabelForStage(self, stageObj):
         """

From johnsonm@rpath.com Fri May 23 18:30:36 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m4NIUagK017407 for <rpath-common-commits@lists.rpath.com>;
	Fri, 23 May 2008 18:30:36 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m4NIUa7T031081
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 23 May 2008 14:30:36 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m4NIUaYK006873
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 23 May 2008 14:30:36 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m4NIUZef002393
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 23 May 2008 14:30:35 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m4NIUZYD002388
	for rpath-common-commits@lists.rpath.com;
	Fri, 23 May 2008 14:30:35 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200805231830.m4NIUZYD002388@scc.eng.rpath.com>
Date: Fri, 23 May 2008 14:30:35 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: fix typo in docstring
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 23 May 2008 18:30:36 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

fix typo in docstring

diff -r c3250c539094 -r 2db18a8bc2d6 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Fri May 23 14:29:12 2008 -0400
+++ b/rpath_common/proddef/api1.py	Fri May 23 14:30:32 2008 -0400
@@ -199,7 +199,7 @@
 
     def loadFromRepository(self, client):
         """
-        Load a C{ProductDefinition} object to a Conary repository.
+        Load a C{ProductDefinition} object from a Conary repository.
         Prior to calling this method, the C{ProductDefinition} object should
         be initialized by calling C{setProductShortname},
         C{setProductVersion}, C{setConaryRepositoryHostname} and

From misa@rpath.com Tue May 27 17:33:00 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m4RHX0uP012664 for <rpath-common-commits@lists.rpath.com>;
	Tue, 27 May 2008 17:33:00 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m4RHX0rH004886
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 27 May 2008 13:33:00 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m4RHWx0Q026453
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 27 May 2008 13:32:59 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m4RHWx1Y011943
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 27 May 2008 13:32:59 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m4RHWxGu011938
	for rpath-common-commits@lists.rpath.com;
	Tue, 27 May 2008 13:32:59 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200805271732.m4RHWxGu011938@scc.eng.rpath.com>
Date: Tue, 27 May 2008 13:32:59 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Fixed logic when no children of the node were
	found;
	commented out a case that is presumably impossible, where an empty list
	would be returned by findTroves
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 27 May 2008 17:33:00 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Fixed logic when no children of the node were found; commented out a case that is presumably impossible, where an empty list would be returned by findTroves

diff -r 2db18a8bc2d6 -r 55519b5b4ebc rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Fri May 23 14:30:32 2008 -0400
+++ b/rpath_common/proddef/api1.py	Tue May 27 13:32:32 2008 -0400
@@ -619,9 +619,11 @@
             raise ProductDefinitionTroveNotFound("%s=%s" % (troveName, label))
         except conaryErrors.RepositoryError, e:
             raise RepositoryError(str(e))
+        # At this point, troveSpec is in troves and its value should not be
+        # the empty list.
         nvfs = troves[troveSpec]
-        if not nvfs:
-            raise ProductDefinitionTroveNotFound("%s=%s" % (troveName, label))
+        #if not nvfs:
+        #    raise ProductDefinitionTroveNotFound("%s=%s" % (troveName, label))
         trvCsSpec = (nvfs[0][0], (None, None), (nvfs[0][1], nvfs[0][2]), True)
         cs = conaryClient.createChangeSet([ trvCsSpec ], withFiles = True,
                                           withFileContents = True)
@@ -840,12 +842,16 @@
         builds = self.buildDefinition = []
         for node in buildNodes:
             imgType = None
+            subNode = None
             for subNode in node.iterChildren():
                 if not isinstance(subNode, xmllib.BaseNode):
                     continue
                 imgType = dispatcher.dispatch(subNode)
                 if imgType is not None:
                     break
+            if subNode is None:
+                # Build node had no children
+                continue
             if imgType is None:
                 raise UnsupportedImageType(subNode.getName())
             imageGroup = node.getChildren('imageGroup')

From scott@rpath.com Wed May 28 14:32:21 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m4SEWLBx008939 for <rpath-common-commits@lists.rpath.com>;
	Wed, 28 May 2008 14:32:21 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m4SEWKeO018336
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 28 May 2008 10:32:20 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m4SEWKlH015396
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 28 May 2008 10:32:20 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m4SEWJoA030412
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 28 May 2008 10:32:19 -0400
Received: (from scott@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m4SEWJup030407
	for rpath-common-commits@lists.rpath.com;
	Wed, 28 May 2008 10:32:19 -0400
From: Scott Parkerson <scott@rpath.com>
Message-Id: <200805281432.m4SEWJup030407@scc.eng.rpath.com>
Date: Wed, 28 May 2008 10:32:19 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Fix broken recipe template (RBL-2896)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 28 May 2008 14:32:21 -0000

tag:         tip
user:        Scott Parkerson <http://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Fix broken recipe template (RBL-2896)

diff -r 55519b5b4ebc -r 7b018cf942ee rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Tue May 27 13:32:32 2008 -0400
+++ b/rpath_common/proddef/api1.py	Wed May 28 10:32:16 2008 -0400
@@ -95,18 +95,23 @@
     _troveName = 'product-definition'
     _troveFileName = 'product-definition.xml'
 
-    _recipe = """
+    _recipe = '''
 #
 # Copyright (c) 2008 rPath, Inc.
 #
 
-class Recipe_@NAME@(PackageRecipe):
+class ProductDefinitionRecipe(PackageRecipe):
     name = "@NAME@"
     version = "@VERSION@"
 
     def setup(r):
-        pass
-"""
+        """
+        This recipe is a stub created to allow users to manually
+        check in changes to the product definition XML.
+
+        No other recipe actions need to be added beyond this point.
+        """
+'''
 
     def __init__(self, fromStream = None, validate = False, schemaDir = None):
         """

From scott@rpath.com Wed May 28 18:27:53 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m4SIRr9D016363 for <rpath-common-commits@lists.rpath.com>;
	Wed, 28 May 2008 18:27:53 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m4SIRqjo020626
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 28 May 2008 14:27:52 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m4SIRqvS009785
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 28 May 2008 14:27:52 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m4SIRqw6007889
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 28 May 2008 14:27:52 -0400
Received: (from scott@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m4SIRqeN007884
	for rpath-common-commits@lists.rpath.com;
	Wed, 28 May 2008 14:27:52 -0400
From: Scott Parkerson <scott@rpath.com>
Message-Id: <200805281827.m4SIRqeN007884@scc.eng.rpath.com>
Date: Wed, 28 May 2008 14:27:52 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Make product-definition:source files text,
	not binary blobs (RBL-2903)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 28 May 2008 18:27:53 -0000

tag:         tip
user:        Scott Parkerson <http://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Make product-definition:source files text, not binary blobs (RBL-2903)

diff -r 7b018cf942ee -r fa1704e47ef1 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Wed May 28 10:32:16 2008 -0400
+++ b/rpath_common/proddef/api1.py	Wed May 28 14:27:36 2008 -0400
@@ -600,9 +600,9 @@
         self.serialize(stream)
         pathDict = {
             "%s.recipe" % self._troveName : filetypes.RegularFile(
-                contents = recipe),
+                contents = recipe, config=True),
             self._troveFileName : filetypes.RegularFile(
-                contents = stream.getvalue()),
+                contents = stream.getvalue(), config=True),
         }
         cLog = changelog.ChangeLog(name = conaryClient.cfg.name,
                                    contact = conaryClient.cfg.contact,

From smg@rpath.com Tue Jun  3 16:40:21 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m53GeLKO014086
	for <rpath-common-commits@lists.rpath.com>; Tue, 3 Jun 2008 16:40:21 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m53GeKrk016492
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 3 Jun 2008 12:40:20 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m53GeKpl018218
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 3 Jun 2008 12:40:20 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m53GeK1s012987
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 3 Jun 2008 12:40:20 -0400
Received: (from smg@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m53GeJk0012977
	for rpath-common-commits@lists.rpath.com; Tue, 3 Jun 2008 12:40:19 -0400
From: Stu Gott <smg@rpath.com>
Message-Id: <200806031640.m53GeJk0012977@scc.eng.rpath.com>
Date: Tue, 03 Jun 2008 12:40:19 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: add clear methods for list elements
 (RDST-240)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailman-Approved-At: Tue, 03 Jun 2008 19:00:20 +0000
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 03 Jun 2008 16:40:21 -0000

tag:         tip
user:        Stu Gott <http://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

add clear methods for list elements (RDST-240)

diff -r fa1704e47ef1 -r 70788fea1f3a rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Wed May 28 14:27:36 2008 -0400
+++ b/rpath_common/proddef/api1.py	Tue Jun 03 12:40:01 2008 -0400
@@ -389,12 +389,28 @@
         obj = _Stage(name = name, labelSuffix = labelSuffix)
         self.stages.append(obj)
 
+    def clearStages(self):
+        """
+        Delete all stages.
+        @return: None
+        @rtype None
+        """
+        self.stages = _Stages()
+
     def getUpstreamSources(self):
         """
         @return: the upstream sources from this product definition
         @rtype: C{list} of C{_UpstreamSource} objects
         """
         return self.upstreamSources
+
+    def clearUpstreamSources(self):
+        """
+        Delete all upstreamSources.
+        @return: None
+        @rtype None
+        """
+        self.upstreamSources = _UpstreamSources()
 
     def getFactorySources(self):
         """
@@ -403,6 +419,13 @@
         """
         return self.factorySources
 
+    def clearFactorySources(self):
+        """
+        Delete all factorySources.
+        @return: None
+        @rtype None
+        """
+        self.factorySources = _FactorySources()
 
     def getLabelForStage(self, stageName):
         """
@@ -500,6 +523,14 @@
                      imageGroup = imageGroup,
                      parentImageGroup = self.imageGroup)
         self.buildDefinition.append(obj)
+
+    def clearBuildDefinition(self):
+        """
+        Delete all buildDefinition.
+        @return: None
+        @rtype None
+        """
+        self.buildDefinition = _BuildDefinition()
 
     @classmethod
     def imageType(cls, name, fields = None):
@@ -816,7 +847,7 @@
         return "{%s}%s" % (self.defaultNamespace, name)
 
     def _addStages(self, stagesNodes):
-        stages = self.stages = []
+        stages = self.stages = _Stages()
         for node in stagesNodes:
             # XXX getAttribute should be getAbsoluteAttribute
             pyObj = _Stage(name = node.getAttribute('name'),
@@ -824,7 +855,7 @@
             stages.append(pyObj)
 
     def _addUpstreamSources(self, upstreamSources):
-        sources = self.upstreamSources = []
+        sources = self.upstreamSources = _UpstreamSources()
         for node in upstreamSources:
             pyObj = _UpstreamSource(
                 troveName = node.getAttribute('troveName'),
@@ -832,7 +863,7 @@
             sources.append(pyObj)
 
     def _addFactorySources(self, factorySources):
-        sources = self.factorySources = []
+        sources = self.factorySources = _FactorySources()
         for node in factorySources:
             pyObj = _FactorySource(
                 troveName = node.getAttribute('troveName'),
@@ -844,7 +875,7 @@
         dispatcher = xmllib.NodeDispatcher(self._nsMap)
         dispatcher.registerClasses(imageTypes, imageTypes.ImageType_Base)
 
-        builds = self.buildDefinition = []
+        builds = self.buildDefinition = _BuildDefinition()
         for node in buildNodes:
             imgType = None
             subNode = None

From smg@rpath.com Tue Jun  3 17:18:05 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m53HI5Ui014688
	for <rpath-common-commits@lists.rpath.com>; Tue, 3 Jun 2008 17:18:05 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m53HI4Wj020439
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 3 Jun 2008 13:18:04 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m53HI2Yv020808
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 3 Jun 2008 13:18:03 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m53HI012014649
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 3 Jun 2008 13:18:00 -0400
Received: (from smg@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m53HI0NC014644
	for rpath-common-commits@lists.rpath.com; Tue, 3 Jun 2008 13:18:00 -0400
From: Stu Gott <smg@rpath.com>
Message-Id: <200806031718.m53HI0NC014644@scc.eng.rpath.com>
Date: Tue, 03 Jun 2008 13:18:00 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: add __str__ method (RDST-242)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailman-Approved-At: Tue, 03 Jun 2008 19:00:20 +0000
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 03 Jun 2008 17:18:05 -0000

tag:         tip
user:        Stu Gott <http://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

add __str__ method (RDST-242)

diff -r 70788fea1f3a -r caa18d0251f2 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Tue Jun 03 12:40:01 2008 -0400
+++ b/rpath_common/proddef/api1.py	Tue Jun 03 13:17:45 2008 -0400
@@ -132,6 +132,16 @@
                 fromStream = StringIO.StringIO(fromStream)
             self.parseStream(fromStream, validate = validate,
                              schemaDir = schemaDir)
+
+    def __str__(self):
+        troveName = self.getTroveName()
+        try:
+            prodDefLabel = self.getProductDefinitionLabel()
+        except MissingInformationError:
+            # This is probably the best we can do. we don't want to backtrace
+            # in this case.
+            prodDefLabel = None
+        return "<Product Definition: %s=%s>" % (troveName, prodDefLabel)
 
     def parseStream(self, stream, validate = False, schemaDir = None):
         """

From smg@rpath.com Tue Jun  3 18:43:16 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m53IhGh6016399
	for <rpath-common-commits@lists.rpath.com>; Tue, 3 Jun 2008 18:43:16 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m53IhF4I031306
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 3 Jun 2008 14:43:15 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m53IhFqh028067
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 3 Jun 2008 14:43:15 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m53IhE0u018317
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 3 Jun 2008 14:43:14 -0400
Received: (from smg@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m53IhEIU018296
	for rpath-common-commits@lists.rpath.com; Tue, 3 Jun 2008 14:43:14 -0400
From: Stu Gott <smg@rpath.com>
Message-Id: <200806031843.m53IhEIU018296@scc.eng.rpath.com>
Date: Tue, 03 Jun 2008 14:43:13 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: add equlaity operators for
	SlotBasedSerializableObject (RDST-241)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailman-Approved-At: Tue, 03 Jun 2008 19:00:20 +0000
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 03 Jun 2008 18:43:16 -0000

tag:         tip
user:        Stu Gott <http://issues.rpath.com/>
files:       rpath_common/xmllib/api1.py

add equlaity operators for SlotBasedSerializableObject (RDST-241)

diff -r 96d6d82d694b -r f79291a78a40 rpath_common/xmllib/api1.py
--- a/rpath_common/xmllib/api1.py	Mon May 19 12:10:52 2008 -0400
+++ b/rpath_common/xmllib/api1.py	Tue Jun 03 14:42:55 2008 -0400
@@ -513,6 +513,17 @@
     __slots__ = []
     tag = None
 
+    def __eq__(self, obj):
+        for key in self.__slots__:
+            val = self.__getattribute__(key)
+            val2 = obj.__getattribute__(key)
+            if val != val2:
+                return False
+        return True
+
+    def __ne__(self, obj):
+        return not self.__eq__(obj)
+
     # pylint: disable-msg=C0111
     # docstring inherited from parent class
     def _getName(self):

From smg@rpath.com Tue Jun  3 18:43:17 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m53IhGYJ016402
	for <rpath-common-commits@lists.rpath.com>; Tue, 3 Jun 2008 18:43:16 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m53IhGmL031309
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 3 Jun 2008 14:43:16 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m53IhFHg028077
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 3 Jun 2008 14:43:16 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m53IhFgd018346
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 3 Jun 2008 14:43:15 -0400
Received: (from smg@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m53IhFjg018337
	for rpath-common-commits@lists.rpath.com; Tue, 3 Jun 2008 14:43:15 -0400
From: Stu Gott <smg@rpath.com>
Message-Id: <200806031843.m53IhFjg018337@scc.eng.rpath.com>
Date: Tue, 03 Jun 2008 14:43:15 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: add copy function and equlaity operators
	(RDST-241)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailman-Approved-At: Tue, 03 Jun 2008 19:00:20 +0000
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 03 Jun 2008 18:43:17 -0000

tag:         tip
user:        Stu Gott <http://issues.rpath.com/>
files:       rpath_common/proddef/api1.py rpath_common/proddef/imageTypes.py

add copy function and equlaity operators (RDST-241)

diff -r caa18d0251f2 -r 840732150307 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Tue Jun 03 13:17:45 2008 -0400
+++ b/rpath_common/proddef/api1.py	Tue Jun 03 14:42:55 2008 -0400
@@ -142,6 +142,22 @@
             # in this case.
             prodDefLabel = None
         return "<Product Definition: %s=%s>" % (troveName, prodDefLabel)
+
+    def __eq__(self, obj):
+        for key, val in self.__dict__.iteritems():
+            val2 = obj.__getattribute__(key)
+            if val != val2:
+                return False
+        return True
+
+    def __ne__(self, obj):
+        return not self.__eq__(obj)
+
+    def copy(self):
+        outStr = StringIO.StringIO()
+        self.serialize(outStr)
+        inStr = StringIO.StringIO(outStr.getvalue())
+        return ProductDefinition(inStr)
 
     def parseStream(self, stream, validate = False, schemaDir = None):
         """
@@ -748,6 +764,15 @@
         self.imageGroup = imageGroup
         self.parentImageGroup = parentImageGroup
 
+    def __eq__(self, build):
+        for key in self.__slots__:
+            if self.__getattribute__(key) != build.__getattribute__(key):
+                return False
+        return True
+
+    def __ne__(self, build):
+        return not self.__eq__(build)
+
     def getBuildImageGroup(self):
         if self.imageGroup is None:
             return self.parentImageGroup
diff -r caa18d0251f2 -r 840732150307 rpath_common/proddef/imageTypes.py
--- a/rpath_common/proddef/imageTypes.py	Tue Jun 03 13:17:45 2008 -0400
+++ b/rpath_common/proddef/imageTypes.py	Tue Jun 03 14:42:55 2008 -0400
@@ -50,6 +50,12 @@
             elif attrType == int:
                 val = int(val)
             flds[attrName] = val
+
+    def __eq__(self, obj):
+        return True
+
+    def __ne__(self, obj):
+        return not self.__eq__(obj)
 
     @classmethod
     def getTag(kls):

From scott@rpath.com Wed Jun  4 14:03:30 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m54E3T8R010238
	for <rpath-common-commits@lists.rpath.com>; Wed, 4 Jun 2008 14:03:29 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m54E3TQm027592
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 4 Jun 2008 10:03:29 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m54E3Qvf003414
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 4 Jun 2008 10:03:26 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m54E3Qvl030470
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 4 Jun 2008 10:03:26 -0400
Received: (from scott@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m54E3P0o030466
	for rpath-common-commits@lists.rpath.com; Wed, 4 Jun 2008 10:03:25 -0400
From: Scott Parkerson <scott@rpath.com>
Message-Id: <200806041403.m54E3P0o030466@scc.eng.rpath.com>
Date: Wed, 04 Jun 2008 10:03:25 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-common: This is not rBuild
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 04 Jun 2008 14:03:30 -0000

tag:         tip
user:        Scott Parkerson <http://issues.rpath.com/>
files:       Makefile

This is not rBuild

diff -r 0f4232b8e3e1 -r 0b34bc38b3f2 Makefile
--- a/Makefile	Mon May 05 12:31:56 2008 -0400
+++ b/Makefile	Wed Jun 04 10:03:23 2008 -0400
@@ -41,7 +41,7 @@
 forcedist: archive
 
 tag:
-	hg tag -f rbuild-$(VERSION)
+	hg tag -f rpath-common-$(VERSION)
 
 clean: clean-subdirs default-clean
 	@rm -rf $(DISTDIR).tar.bz2

From scott@rpath.com Wed Jun  4 14:03:56 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m54E3usU010244
	for <rpath-common-commits@lists.rpath.com>; Wed, 4 Jun 2008 14:03:56 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m54E3tvD027888
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 4 Jun 2008 10:03:55 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m54E3tR0003433
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 4 Jun 2008 10:03:55 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m54E3te4030544
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 4 Jun 2008 10:03:55 -0400
Received: (from scott@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m54E3trX030539
	for rpath-common-commits@lists.rpath.com; Wed, 4 Jun 2008 10:03:55 -0400
From: Scott Parkerson <scott@rpath.com>
Message-Id: <200806041403.m54E3trX030539@scc.eng.rpath.com>
Date: Wed, 04 Jun 2008 10:03:54 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: This is not rBuild
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 04 Jun 2008 14:03:56 -0000

tag:         tip
user:        Scott Parkerson <http://issues.rpath.com/>
files:       Makefile

This is not rBuild

diff -r f79291a78a40 -r 0ed4a26feec0 Makefile
--- a/Makefile	Tue Jun 03 14:42:55 2008 -0400
+++ b/Makefile	Wed Jun 04 10:03:51 2008 -0400
@@ -43,7 +43,7 @@
 forcedist: archive
 
 tag:
-	hg tag -f rbuild-$(VERSION)
+	hg tag -f rpath-xmllib-$(VERSION)
 
 clean: clean-subdirs default-clean
 	@rm -rf $(DISTDIR).tar.bz2

From scott@rpath.com Wed Jun  4 14:04:43 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m54E4hYP010461
	for <rpath-common-commits@lists.rpath.com>; Wed, 4 Jun 2008 14:04:43 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m54E4e7T028614
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 4 Jun 2008 10:04:41 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m54E4c1T003535
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 4 Jun 2008 10:04:38 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m54E4cd1030624
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 4 Jun 2008 10:04:38 -0400
Received: (from scott@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m54E4bR0030619
	for rpath-common-commits@lists.rpath.com; Wed, 4 Jun 2008 10:04:37 -0400
From: Scott Parkerson <scott@rpath.com>
Message-Id: <200806041404.m54E4bR0030619@scc.eng.rpath.com>
Date: Wed, 04 Jun 2008 10:04:37 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: This is not rBuild
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 04 Jun 2008 14:04:43 -0000

tag:         tip
user:        Scott Parkerson <http://issues.rpath.com/>
files:       Makefile

This is not rBuild

diff -r 840732150307 -r 796d953038a3 Makefile
--- a/Makefile	Tue Jun 03 14:42:55 2008 -0400
+++ b/Makefile	Wed Jun 04 10:04:35 2008 -0400
@@ -43,7 +43,7 @@
 forcedist: archive
 
 tag:
-	hg tag -f rbuild-$(VERSION)
+	hg tag -f product-definition-$(VERSION)
 
 clean: clean-subdirs default-clean
 	@rm -rf $(DISTDIR).tar.bz2

From scott@rpath.com Wed Jun  4 14:08:24 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m54E8OGx010577
	for <rpath-common-commits@lists.rpath.com>; Wed, 4 Jun 2008 14:08:24 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m54E8Ot1029542
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 4 Jun 2008 10:08:24 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m54E8Oib003820
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 4 Jun 2008 10:08:24 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m54E8NMf030838
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 4 Jun 2008 10:08:23 -0400
Received: (from scott@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m54E8NuV030832
	for rpath-common-commits@lists.rpath.com; Wed, 4 Jun 2008 10:08:23 -0400
From: Scott Parkerson <scott@rpath.com>
Message-Id: <200806041408.m54E8NuV030832@scc.eng.rpath.com>
Date: Wed, 04 Jun 2008 10:08:22 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Use something that at least resembles the
	docdir conary uses
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 04 Jun 2008 14:08:25 -0000

tag:         tip
user:        Scott Parkerson <http://issues.rpath.com/>
files:       Make.defs

Use something that at least resembles the docdir conary uses

diff -r 796d953038a3 -r 43398cd4f115 Make.defs
--- a/Make.defs	Wed Jun 04 10:04:35 2008 -0400
+++ b/Make.defs	Wed Jun 04 10:07:53 2008 -0400
@@ -26,6 +26,6 @@
 export pydir = $(sitedir)/rpath_common/
 export initdir = /etc/init.d
 export sysconfdir = /etc/sysconfig
-export docdir = $(datadir)/doc/product-common-$(VERSION)
+export docdir = $(datadir)/doc/rpath-product-definition-$(VERSION)
 
 export VERSION

From misa@rpath.com Sat Jun 21 05:04:44 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5L54iRe020287 for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 05:04:44 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5L54iqK008686
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 01:04:44 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5L54iD5010593
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 01:04:44 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5L54hxf016820
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 01:04:43 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5L54hjQ016796
	for rpath-common-commits@lists.rpath.com;
	Sat, 21 Jun 2008 01:04:43 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200806210504.m5L54hjQ016796@scc.eng.rpath.com>
Date: Sat, 21 Jun 2008 01:04:43 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Renamed prod def version to 0.1
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Sat, 21 Jun 2008 05:04:44 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       doc/example.xml rpath_common/proddef/_xmlConstants.py rpath_common/proddef/api1.py xsd/rpd-0.1.xsd xsd/rpd-1.0.xsd

Renamed prod def version to 0.1

diff -r 43398cd4f115 -r 368e98365678 doc/example.xml
--- a/doc/example.xml	Wed Jun 04 10:07:53 2008 -0400
+++ b/doc/example.xml	Sat Jun 21 01:03:54 2008 -0400
@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='UTF-8'?>
-<productDefinition xmlns="http://www.rpath.com/permanent/rpd-1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.rpath.com/permanent/rpd-1.0.xsd rpd-1.0.xsd" version="1.0">
+<productDefinition xmlns="http://www.rpath.com/permanent/rpd-0.1.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.rpath.com/permanent/rpd-0.1.xsd rpd-0.1.xsd" version="0.1">
   <productName>My Awesome Appliance</productName>
   <productShortname>awesome</productShortname>
   <productDescription>
diff -r 43398cd4f115 -r 368e98365678 rpath_common/proddef/_xmlConstants.py
--- a/rpath_common/proddef/_xmlConstants.py	Wed Jun 04 10:07:53 2008 -0400
+++ b/rpath_common/proddef/_xmlConstants.py	Sat Jun 21 01:03:54 2008 -0400
@@ -23,6 +23,6 @@
 @type xmlSchemaLocaltion: C{str}
 """
 
-defaultNamespaceList = [ "http://www.rpath.com/permanent/rpd-1.0.xsd" ]
+defaultNamespaceList = [ "http://www.rpath.com/permanent/rpd-0.1.xsd" ]
 xmlSchemaNamespace = "http://www.w3.org/2001/XMLSchema-instance"
-xmlSchemaLocation = "http://www.rpath.com/permanent/rpd-1.0.xsd rpd-1.0.xsd"
+xmlSchemaLocation = "http://www.rpath.com/permanent/rpd-0.1.xsd rpd-0.1.xsd"
diff -r 43398cd4f115 -r 368e98365678 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Wed Jun 04 10:07:53 2008 -0400
+++ b/rpath_common/proddef/api1.py	Sat Jun 21 01:03:54 2008 -0400
@@ -83,7 +83,7 @@
     @cvar schemaDir: Directory where schema definitions are stored
     @type schemaDir: C{str}
     """
-    version = '1.0'
+    version = '0.1'
     defaultNamespace = _xmlConstants.defaultNamespaceList[0]
     xmlSchemaLocation = _xmlConstants.xmlSchemaLocation
 
diff -r 43398cd4f115 -r 368e98365678 xsd/rpd-0.1.xsd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/xsd/rpd-0.1.xsd	Sat Jun 21 01:03:54 2008 -0400
@@ -0,0 +1,238 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema targetNamespace="http://www.rpath.com/permanent/rpd-0.1.xsd"
+        elementFormDefault="qualified"
+        attributeFormDefault="unqualified"
+        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+        xmlns:rpd="http://www.rpath.com/permanent/rpd-0.1.xsd"
+        xmlns="http://www.rpath.com/permanent/rpd-0.1.xsd">
+
+    <xsd:attributeGroup name="common">
+       <xsd:attribute name="name" type="xsd:string" />
+       <xsd:attribute name="autoResolve" type="xsd:boolean" />
+       <xsd:attribute name="baseFileName" type="xsd:string" />
+       <xsd:attribute name="installLabelPath" type="xsd:string" />
+    </xsd:attributeGroup>
+
+    <xsd:attributeGroup name="specialIsoTroves">
+        <xsd:attribute name="mediaTemplateTrove" type="rpd:troveSpecType" />
+        <xsd:attribute name="anacondaCustomTrove" type="rpd:troveSpecType" />
+        <xsd:attribute name="anacondaTemplatesTrove" type="rpd:troveSpecType" />
+    </xsd:attributeGroup>
+
+    <xsd:simpleType name="troveSpecType">
+        <xsd:restriction base="xsd:string"></xsd:restriction>
+        <!-- TODO: make a proper xsd:restriction here to validate troveSpecs -->
+    </xsd:simpleType>
+
+    <xsd:simpleType name="flavorStringType">
+        <xsd:restriction base="xsd:string">
+            <!-- TODO: make a proper xsd:restriction here to validate flavor xsd:strings -->
+            <!-- this regexp comes from conary.deps.deps.flavorRegexpStr, and it barfs inside of Eclipse (sgp) -->
+            <!-- <pattern value="^(use:)? *(?:((?:!|~!)?(?:~?!?(?:[0-9A-Za-z_-]+))(?:\\.(?:[0-9A-Za-z_-]+))? *(?:, *(?:!|~!)?(?:~?!?(?:[0-9A-Za-z_-]+))(?:\\.(?:[0-9A-Za-z_-]+))?)*)?)? *(?:(is:) *(?: *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?(?:((?:  * *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?)*))?))? *(?:(target:) *(?: *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?(?:((?:  * *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?)*))?))?$" /> -->
+        </xsd:restriction>
+    </xsd:simpleType>
+
+    <xsd:complexType name="stageType">
+        <xsd:attribute name="name" type="xsd:string" use="required" />
+        <xsd:attribute name="labelSuffix" type="xsd:string" use="required" />
+    </xsd:complexType>
+
+    <xsd:complexType name="stageListType">
+        <xsd:sequence>
+            <xsd:element name="stage" type="stageType" minOccurs="1" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="upstreamSourceType">
+        <xsd:attribute name="troveName" type="xsd:string" />
+        <xsd:attribute name="label" type="xsd:string" />
+    </xsd:complexType>
+
+    <xsd:complexType name="upstreamSourceListType">
+        <xsd:sequence>
+            <xsd:element name="upstreamSource" type="upstreamSourceType" minOccurs="1" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="factorySourceListType">
+        <xsd:sequence>
+            <xsd:element name="factorySource" type="upstreamSourceType" minOccurs="1" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+
+    <xsd:complexType name="amiImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="amiHugeDiskMountpoint" type="xsd:string" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="applianceIsoImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="maxIsoSize" type="xsd:positiveInteger" />
+        <xsd:attribute name="bugsUrl" type="xsd:string" />
+        <xsd:attribute name="showMediaCheck" type="xsd:boolean" />
+        <xsd:attribute name="betaNag" type="xsd:boolean" />
+        <xsd:attributeGroup ref="specialIsoTroves" />
+    </xsd:complexType>
+
+    <xsd:complexType name="installableIsoImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="maxIsoSize" type="xsd:positiveInteger" />
+        <xsd:attribute name="bugsUrl" type="xsd:string" />
+        <xsd:attribute name="showMediaCheck" type="xsd:boolean" />
+        <xsd:attribute name="betaNag" type="xsd:boolean" />
+        <xsd:attributeGroup ref="specialIsoTroves" />
+    </xsd:complexType>
+
+    <xsd:complexType name="liveIsoImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="unionfs" type="xsd:boolean" />
+        <xsd:attribute name="zisofs" type="xsd:boolean" />
+    </xsd:complexType>
+
+    <xsd:complexType name="netbootImageType">
+        <xsd:attributeGroup ref="common" />
+    </xsd:complexType>
+
+    <xsd:complexType name="rawFsImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="rawHdImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="tarballImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="updateIsoImageType">
+        <xsd:attribute name="baseFileName" type="xsd:string" />
+        <xsd:attribute name="mediaTemplateTrove" type="xsd:string" />
+    </xsd:complexType>
+
+    <xsd:complexType name="vhdImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="vhdDiskType">
+            <xsd:simpleType>
+                <xsd:restriction base="xsd:string">
+                    <xsd:enumeration value="fixed" />
+                    <xsd:enumeration value="dynamic" />
+                    <xsd:enumeration value="difference" />
+                </xsd:restriction>
+            </xsd:simpleType>
+        </xsd:attribute>
+    </xsd:complexType>
+
+    <xsd:complexType name="virtualIronImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="vhdDiskType">
+            <xsd:simpleType>
+                <xsd:restriction base="xsd:string">
+                    <xsd:enumeration value="fixed" />
+                    <xsd:enumeration value="dynamic" />
+                    <xsd:enumeration value="difference" />
+                </xsd:restriction>
+            </xsd:simpleType>
+        </xsd:attribute>
+    </xsd:complexType>
+
+    <xsd:complexType name="vmwareEsxImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="natNetworking" type="xsd:boolean" />
+        <xsd:attribute name="vmMemory" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="vmwareImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="natNetworking" type="xsd:boolean" />
+            <xsd:attribute name="diskAdapter">
+                <xsd:simpleType>
+                    <xsd:restriction base="xsd:string">
+                        <xsd:enumeration value="ide" />
+                        <xsd:enumeration value="lsilogic" />
+                    </xsd:restriction>
+                </xsd:simpleType>
+            </xsd:attribute>
+        <xsd:attribute name="vmSnapshots" type="xsd:boolean" />
+        <xsd:attribute name="vmMemory" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="xenOvaImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="vmMemory" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="buildDefinitionType">
+        <xsd:sequence>
+            <xsd:element name="build" type="rpd:buildType" minOccurs="1" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="buildType">
+        <xsd:sequence>
+            <xsd:choice>
+                <xsd:element name="amiImage" type="rpd:amiImageType" />
+                <xsd:element name="applianceIsoImage" type="rpd:applianceIsoImageType" />
+                <xsd:element name="installableIsoImage" type="rpd:installableIsoImageType" />
+                <xsd:element name="liveIsoImage" type="rpd:liveIsoImageType" />
+                <xsd:element name="netbootImage" type="rpd:netbootImageType" />
+                <xsd:element name="rawFsImage" type="rpd:rawFsImageType" />
+                <xsd:element name="rawHdImage" type="rpd:rawHdImageType" />
+                <xsd:element name="tarballImage" type="rpd:tarballImageType" />
+                <xsd:element name="updateIsoImage" type="rpd:updateIsoImageType" />
+                <xsd:element name="vhdImage" type="rpd:vhdImageType" />
+                <xsd:element name="virtualIronImage" type="rpd:virtualIronImageType" />
+                <xsd:element name="vmwareImage" type="rpd:vmwareImageType" />
+                <xsd:element name="vmwareEsxImage" type="rpd:vmwareEsxImageType" />
+                <xsd:element name="xenOvaImage" type="rpd:xenOvaImageType" />
+            </xsd:choice>
+            <xsd:element name="stage" minOccurs="0" maxOccurs="unbounded">
+                <xsd:complexType>
+                    <xsd:attribute name="ref" type="xsd:string" use="required"/>
+                </xsd:complexType>
+            </xsd:element>
+            <xsd:element name="imageGroup" type="rpd:troveSpecType" minOccurs="0" maxOccurs="1" />
+        </xsd:sequence>
+        <xsd:attribute name="name" type="xsd:string" use="required" />
+        <xsd:attribute name="baseFlavor" type="rpd:flavorStringType" />
+    </xsd:complexType>
+
+    <xsd:element name="productDefinition">
+        <xsd:complexType>
+            <xsd:sequence>
+                <xsd:element name="productName" type="xsd:string" />
+                <xsd:element name="productShortname" type="xsd:string" />
+                <xsd:element name="productDescription" type="xsd:string" />
+                <xsd:element name="productVersion" type="xsd:string" />
+                <xsd:element name="productVersionDescription" type="xsd:string" />
+                <xsd:element name="conaryRepositoryHostname" type="xsd:string" />
+                <xsd:element name="conaryNamespace" type="xsd:string" />
+                <xsd:element name="imageGroup" type="rpd:troveSpecType" />
+                <xsd:element name="baseFlavor" type="rpd:flavorStringType" />
+                <xsd:element name="stages" type="rpd:stageListType" />
+                <xsd:element name="upstreamSources" type="rpd:upstreamSourceListType" />
+                <xsd:element name="factorySources" type="rpd:factorySourceListType" minOccurs="0" maxOccurs="1" />
+                <xsd:element name="buildDefinition" type="rpd:buildDefinitionType" />
+            </xsd:sequence>
+            <xsd:attribute name="version" type="xsd:string" />
+        </xsd:complexType>
+    </xsd:element>
+
+</xsd:schema>
diff -r 43398cd4f115 -r 368e98365678 xsd/rpd-1.0.xsd
--- a/xsd/rpd-1.0.xsd	Wed Jun 04 10:07:53 2008 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,238 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema targetNamespace="http://www.rpath.com/permanent/rpd-1.0.xsd"
-        elementFormDefault="qualified"
-        attributeFormDefault="unqualified"
-        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-        xmlns:rpd="http://www.rpath.com/permanent/rpd-1.0.xsd"
-        xmlns="http://www.rpath.com/permanent/rpd-1.0.xsd">
-
-    <xsd:attributeGroup name="common">
-       <xsd:attribute name="name" type="xsd:string" />
-       <xsd:attribute name="autoResolve" type="xsd:boolean" />
-       <xsd:attribute name="baseFileName" type="xsd:string" />
-       <xsd:attribute name="installLabelPath" type="xsd:string" />
-    </xsd:attributeGroup>
-
-    <xsd:attributeGroup name="specialIsoTroves">
-        <xsd:attribute name="mediaTemplateTrove" type="rpd:troveSpecType" />
-        <xsd:attribute name="anacondaCustomTrove" type="rpd:troveSpecType" />
-        <xsd:attribute name="anacondaTemplatesTrove" type="rpd:troveSpecType" />
-    </xsd:attributeGroup>
-
-    <xsd:simpleType name="troveSpecType">
-        <xsd:restriction base="xsd:string"></xsd:restriction>
-        <!-- TODO: make a proper xsd:restriction here to validate troveSpecs -->
-    </xsd:simpleType>
-
-    <xsd:simpleType name="flavorStringType">
-        <xsd:restriction base="xsd:string">
-            <!-- TODO: make a proper xsd:restriction here to validate flavor xsd:strings -->
-            <!-- this regexp comes from conary.deps.deps.flavorRegexpStr, and it barfs inside of Eclipse (sgp) -->
-            <!-- <pattern value="^(use:)? *(?:((?:!|~!)?(?:~?!?(?:[0-9A-Za-z_-]+))(?:\\.(?:[0-9A-Za-z_-]+))? *(?:, *(?:!|~!)?(?:~?!?(?:[0-9A-Za-z_-]+))(?:\\.(?:[0-9A-Za-z_-]+))?)*)?)? *(?:(is:) *(?: *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?(?:((?:  * *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?)*))?))? *(?:(target:) *(?: *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?(?:((?:  * *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?)*))?))?$" /> -->
-        </xsd:restriction>
-    </xsd:simpleType>
-
-    <xsd:complexType name="stageType">
-        <xsd:attribute name="name" type="xsd:string" use="required" />
-        <xsd:attribute name="labelSuffix" type="xsd:string" use="required" />
-    </xsd:complexType>
-
-    <xsd:complexType name="stageListType">
-        <xsd:sequence>
-            <xsd:element name="stage" type="stageType" minOccurs="1" maxOccurs="unbounded" />
-        </xsd:sequence>
-    </xsd:complexType>
-
-    <xsd:complexType name="upstreamSourceType">
-        <xsd:attribute name="troveName" type="xsd:string" />
-        <xsd:attribute name="label" type="xsd:string" />
-    </xsd:complexType>
-
-    <xsd:complexType name="upstreamSourceListType">
-        <xsd:sequence>
-            <xsd:element name="upstreamSource" type="upstreamSourceType" minOccurs="1" maxOccurs="unbounded" />
-        </xsd:sequence>
-    </xsd:complexType>
-
-    <xsd:complexType name="factorySourceListType">
-        <xsd:sequence>
-            <xsd:element name="factorySource" type="upstreamSourceType" minOccurs="1" maxOccurs="unbounded" />
-        </xsd:sequence>
-    </xsd:complexType>
-
-
-    <xsd:complexType name="amiImageType">
-        <xsd:attributeGroup ref="common" />
-        <xsd:attribute name="amiHugeDiskMountpoint" type="xsd:string" />
-        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
-    </xsd:complexType>
-
-    <xsd:complexType name="applianceIsoImageType">
-        <xsd:attributeGroup ref="common" />
-        <xsd:attribute name="maxIsoSize" type="xsd:positiveInteger" />
-        <xsd:attribute name="bugsUrl" type="xsd:string" />
-        <xsd:attribute name="showMediaCheck" type="xsd:boolean" />
-        <xsd:attribute name="betaNag" type="xsd:boolean" />
-        <xsd:attributeGroup ref="specialIsoTroves" />
-    </xsd:complexType>
-
-    <xsd:complexType name="installableIsoImageType">
-        <xsd:attributeGroup ref="common" />
-        <xsd:attribute name="maxIsoSize" type="xsd:positiveInteger" />
-        <xsd:attribute name="bugsUrl" type="xsd:string" />
-        <xsd:attribute name="showMediaCheck" type="xsd:boolean" />
-        <xsd:attribute name="betaNag" type="xsd:boolean" />
-        <xsd:attributeGroup ref="specialIsoTroves" />
-    </xsd:complexType>
-
-    <xsd:complexType name="liveIsoImageType">
-        <xsd:attributeGroup ref="common" />
-        <xsd:attribute name="unionfs" type="xsd:boolean" />
-        <xsd:attribute name="zisofs" type="xsd:boolean" />
-    </xsd:complexType>
-
-    <xsd:complexType name="netbootImageType">
-        <xsd:attributeGroup ref="common" />
-    </xsd:complexType>
-
-    <xsd:complexType name="rawFsImageType">
-        <xsd:attributeGroup ref="common" />
-        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
-        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
-    </xsd:complexType>
-
-    <xsd:complexType name="rawHdImageType">
-        <xsd:attributeGroup ref="common" />
-        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
-        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
-    </xsd:complexType>
-
-    <xsd:complexType name="tarballImageType">
-        <xsd:attributeGroup ref="common" />
-        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
-    </xsd:complexType>
-
-    <xsd:complexType name="updateIsoImageType">
-        <xsd:attribute name="baseFileName" type="xsd:string" />
-        <xsd:attribute name="mediaTemplateTrove" type="xsd:string" />
-    </xsd:complexType>
-
-    <xsd:complexType name="vhdImageType">
-        <xsd:attributeGroup ref="common" />
-        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
-        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
-        <xsd:attribute name="vhdDiskType">
-            <xsd:simpleType>
-                <xsd:restriction base="xsd:string">
-                    <xsd:enumeration value="fixed" />
-                    <xsd:enumeration value="dynamic" />
-                    <xsd:enumeration value="difference" />
-                </xsd:restriction>
-            </xsd:simpleType>
-        </xsd:attribute>
-    </xsd:complexType>
-
-    <xsd:complexType name="virtualIronImageType">
-        <xsd:attributeGroup ref="common" />
-        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
-        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
-        <xsd:attribute name="vhdDiskType">
-            <xsd:simpleType>
-                <xsd:restriction base="xsd:string">
-                    <xsd:enumeration value="fixed" />
-                    <xsd:enumeration value="dynamic" />
-                    <xsd:enumeration value="difference" />
-                </xsd:restriction>
-            </xsd:simpleType>
-        </xsd:attribute>
-    </xsd:complexType>
-
-    <xsd:complexType name="vmwareEsxImageType">
-        <xsd:attributeGroup ref="common" />
-        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
-        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
-        <xsd:attribute name="natNetworking" type="xsd:boolean" />
-        <xsd:attribute name="vmMemory" type="xsd:nonNegativeInteger" />
-    </xsd:complexType>
-
-    <xsd:complexType name="vmwareImageType">
-        <xsd:attributeGroup ref="common" />
-        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
-        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
-        <xsd:attribute name="natNetworking" type="xsd:boolean" />
-            <xsd:attribute name="diskAdapter">
-                <xsd:simpleType>
-                    <xsd:restriction base="xsd:string">
-                        <xsd:enumeration value="ide" />
-                        <xsd:enumeration value="lsilogic" />
-                    </xsd:restriction>
-                </xsd:simpleType>
-            </xsd:attribute>
-        <xsd:attribute name="vmSnapshots" type="xsd:boolean" />
-        <xsd:attribute name="vmMemory" type="xsd:nonNegativeInteger" />
-    </xsd:complexType>
-
-    <xsd:complexType name="xenOvaImageType">
-        <xsd:attributeGroup ref="common" />
-        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
-        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
-        <xsd:attribute name="vmMemory" type="xsd:nonNegativeInteger" />
-    </xsd:complexType>
-
-    <xsd:complexType name="buildDefinitionType">
-        <xsd:sequence>
-            <xsd:element name="build" type="rpd:buildType" minOccurs="1" maxOccurs="unbounded" />
-        </xsd:sequence>
-    </xsd:complexType>
-
-    <xsd:complexType name="buildType">
-        <xsd:sequence>
-            <xsd:choice>
-                <xsd:element name="amiImage" type="rpd:amiImageType" />
-                <xsd:element name="applianceIsoImage" type="rpd:applianceIsoImageType" />
-                <xsd:element name="installableIsoImage" type="rpd:installableIsoImageType" />
-                <xsd:element name="liveIsoImage" type="rpd:liveIsoImageType" />
-                <xsd:element name="netbootImage" type="rpd:netbootImageType" />
-                <xsd:element name="rawFsImage" type="rpd:rawFsImageType" />
-                <xsd:element name="rawHdImage" type="rpd:rawHdImageType" />
-                <xsd:element name="tarballImage" type="rpd:tarballImageType" />
-                <xsd:element name="updateIsoImage" type="rpd:updateIsoImageType" />
-                <xsd:element name="vhdImage" type="rpd:vhdImageType" />
-                <xsd:element name="virtualIronImage" type="rpd:virtualIronImageType" />
-                <xsd:element name="vmwareImage" type="rpd:vmwareImageType" />
-                <xsd:element name="vmwareEsxImage" type="rpd:vmwareEsxImageType" />
-                <xsd:element name="xenOvaImage" type="rpd:xenOvaImageType" />
-            </xsd:choice>
-            <xsd:element name="stage" minOccurs="0" maxOccurs="unbounded">
-                <xsd:complexType>
-                    <xsd:attribute name="ref" type="xsd:string" use="required"/>
-                </xsd:complexType>
-            </xsd:element>
-            <xsd:element name="imageGroup" type="rpd:troveSpecType" minOccurs="0" maxOccurs="1" />
-        </xsd:sequence>
-        <xsd:attribute name="name" type="xsd:string" use="required" />
-        <xsd:attribute name="baseFlavor" type="rpd:flavorStringType" />
-    </xsd:complexType>
-
-    <xsd:element name="productDefinition">
-        <xsd:complexType>
-            <xsd:sequence>
-                <xsd:element name="productName" type="xsd:string" />
-                <xsd:element name="productShortname" type="xsd:string" />
-                <xsd:element name="productDescription" type="xsd:string" />
-                <xsd:element name="productVersion" type="xsd:string" />
-                <xsd:element name="productVersionDescription" type="xsd:string" />
-                <xsd:element name="conaryRepositoryHostname" type="xsd:string" />
-                <xsd:element name="conaryNamespace" type="xsd:string" />
-                <xsd:element name="imageGroup" type="rpd:troveSpecType" />
-                <xsd:element name="baseFlavor" type="rpd:flavorStringType" />
-                <xsd:element name="stages" type="rpd:stageListType" />
-                <xsd:element name="upstreamSources" type="rpd:upstreamSourceListType" />
-                <xsd:element name="factorySources" type="rpd:factorySourceListType" minOccurs="0" maxOccurs="1" />
-                <xsd:element name="buildDefinition" type="rpd:buildDefinitionType" />
-            </xsd:sequence>
-            <xsd:attribute name="version" type="xsd:string" />
-        </xsd:complexType>
-    </xsd:element>
-
-</xsd:schema>

From misa@rpath.com Sat Jun 21 05:04:45 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5L54jn3020290 for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 05:04:45 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5L54jCU008689
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 01:04:45 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5L54jvk010596
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 01:04:45 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5L54ixZ016849
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 01:04:44 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5L54i2M016835
	for rpath-common-commits@lists.rpath.com;
	Sat, 21 Jun 2008 01:04:44 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200806210504.m5L54i2M016835@scc.eng.rpath.com>
Date: Sat, 21 Jun 2008 01:04:44 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Renamed upstreamSource to searchPath; added
	platform definition to schema
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Sat, 21 Jun 2008 05:04:45 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       doc/example.py doc/example.xml rpath_common/proddef/api1.py xsd/rpd-0.1.xsd

Renamed upstreamSource to searchPath; added platform definition to schema

diff -r 368e98365678 -r 4f20089c9c1f doc/example.py
--- a/doc/example.py	Sat Jun 21 01:03:54 2008 -0400
+++ b/doc/example.py	Sat Jun 21 01:03:55 2008 -0400
@@ -57,9 +57,9 @@
 prodDef.addStage(name='qa', labelSuffix='-qa')
 prodDef.addStage(name='release', labelSuffix='')
 
-prodDef.addUpstreamSource(troveName='group-rap-standard',
+prodDef.addSearchPath(troveName='group-rap-standard',
                         label='rap.rpath.com@rpath:linux-1')
-prodDef.addUpstreamSource(troveName='group-postgres',
+prodDef.addSearchPath(troveName='group-postgres',
                         label='products.rpath.com@rpath:postgres-8.2')
 prodDef.addFactorySource(troveName='group-factories',
                         label='products.rpath.com@rpath:factories-1')
diff -r 368e98365678 -r 4f20089c9c1f doc/example.xml
--- a/doc/example.xml	Sat Jun 21 01:03:54 2008 -0400
+++ b/doc/example.xml	Sat Jun 21 01:03:55 2008 -0400
@@ -30,10 +30,10 @@
     <stage labelSuffix="-qa" name="qa"/>
     <stage labelSuffix="" name="release"/>
   </stages>
-  <upstreamSources>
-    <upstreamSource troveName="group-rap-standard" label="rap.rpath.com@rpath:linux-1"/>
-    <upstreamSource troveName="group-postgres" label="products.rpath.com@rpath:postgres-8.2"/>
-  </upstreamSources>
+  <searchPaths>
+    <searchPath troveName="group-rap-standard" label="rap.rpath.com@rpath:linux-1"/>
+    <searchPath troveName="group-postgres" label="products.rpath.com@rpath:postgres-8.2"/>
+  </searchPaths>
   <factorySources>
     <factorySource troveName="group-factories" label="products.rpath.com@rpath:factories-1"/>
   </factorySources>
diff -r 368e98365678 -r 4f20089c9c1f rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Sat Jun 21 01:03:54 2008 -0400
+++ b/rpath_common/proddef/api1.py	Sat Jun 21 01:03:55 2008 -0400
@@ -186,7 +186,7 @@
         self.imageGroup = getattr(xmlObj, 'imageGroup', None)
         self.baseFlavor = getattr(xmlObj, 'baseFlavor', None)
         self.stages.extend(getattr(xmlObj, 'stages', []))
-        self.upstreamSources.extend(getattr(xmlObj, 'upstreamSources', []))
+        self.searchPaths.extend(getattr(xmlObj, 'searchPaths', []))
         self.factorySources.extend(getattr(xmlObj, 'factorySources', []))
         self.buildDefinition.extend(getattr(xmlObj, 'buildDefinition', []))
 
@@ -423,20 +423,20 @@
         """
         self.stages = _Stages()
 
-    def getUpstreamSources(self):
+    def getSearchPaths(self):
         """
         @return: the upstream sources from this product definition
-        @rtype: C{list} of C{_UpstreamSource} objects
+        @rtype: C{list} of C{_SearchPath} objects
         """
-        return self.upstreamSources
+        return self.searchPaths
 
-    def clearUpstreamSources(self):
+    def clearSearchPaths(self):
         """
-        Delete all upstreamSources.
+        Delete all searchPaths.
         @return: None
         @rtype None
         """
-        self.upstreamSources = _UpstreamSources()
+        self.searchPaths = _SearchPaths()
 
     def getFactorySources(self):
         """
@@ -490,7 +490,7 @@
                 return self._getLabelForStage(stage)
         raise StageNotFoundError
 
-    def addUpstreamSource(self, troveName = None, label = None):
+    def addSearchPath(self, troveName = None, label = None):
         """
         Add an upstream source.
         @param troveName: the trove name for the upstream source.
@@ -498,7 +498,7 @@
         @param label: Label for the upstream source
         @type label: C{str} or C{None}
         """
-        self._addSource(troveName, label, _UpstreamSource, self.upstreamSources)
+        self._addSource(troveName, label, _SearchPath, self.searchPaths)
 
     def addFactorySource(self, troveName = None, label = None):
         """
@@ -640,7 +640,7 @@
         self.conaryRepositoryHostname = None
         self.conaryNamespace = None
         self.imageGroup = None
-        self.upstreamSources = _UpstreamSources()
+        self.searchPaths = _SearchPaths()
         self.factorySources = _FactorySources()
         self.buildDefinition = _BuildDefinition()
 
@@ -711,8 +711,8 @@
 
 # pylint: disable-msg=R0903
 # Too few public methods (1/2): this is an interface
-class _UpstreamSources(xmllib.SerializableList):
-    tag = "upstreamSources"
+class _SearchPaths(xmllib.SerializableList):
+    tag = "searchPaths"
 
 # pylint: disable-msg=R0903
 # Too few public methods (1/2): this is an interface
@@ -736,16 +736,16 @@
         self.name = name
         self.labelSuffix = labelSuffix
 
-class _UpstreamSource(xmllib.SlotBasedSerializableObject):
+class _SearchPath(xmllib.SlotBasedSerializableObject):
     __slots__ = [ 'troveName', 'label' ]
-    tag = "upstreamSource"
+    tag = "searchPath"
 
     def __init__(self, troveName = None, label = None):
         xmllib.SlotBasedSerializableObject.__init__(self)
         self.troveName = troveName
         self.label = label
 
-class _FactorySource(_UpstreamSource):
+class _FactorySource(_SearchPath):
     tag = "factorySource"
 
 class Build(xmllib.SerializableObject):
@@ -863,9 +863,9 @@
             self._addStages(children)
             return
 
-        if chName == self._makeAbsoluteName('upstreamSources'):
-            children = childNode.getChildren('upstreamSource')
-            self._addUpstreamSources(children)
+        if chName == self._makeAbsoluteName('searchPaths'):
+            children = childNode.getChildren('searchPath')
+            self._addSearchPaths(children)
             return
 
         if chName == self._makeAbsoluteName('factorySources'):
@@ -889,10 +889,10 @@
                            labelSuffix = node.getAttribute('labelSuffix'))
             stages.append(pyObj)
 
-    def _addUpstreamSources(self, upstreamSources):
-        sources = self.upstreamSources = _UpstreamSources()
-        for node in upstreamSources:
-            pyObj = _UpstreamSource(
+    def _addSearchPaths(self, searchPaths):
+        sources = self.searchPaths = _SearchPaths()
+        for node in searchPaths:
+            pyObj = _SearchPath(
                 troveName = node.getAttribute('troveName'),
                 label = node.getAttribute('label'))
             sources.append(pyObj)
@@ -945,7 +945,7 @@
     def __init__(self, name, attrs, namespaces, prodDef):
         xmllib.BaseNode.__init__(self, attrs, namespaces, name = name)
         self.stages = prodDef.getStages()
-        self.upstreamSources = prodDef.getUpstreamSources()
+        self.searchPaths = prodDef.getSearchPaths()
         self.factorySources = prodDef.getFactorySources()
         self.buildDefinition = prodDef.getBuildDefinitions()
 
@@ -1008,7 +1008,7 @@
                  self.imageGroup,
                  self.baseFlavor,
                  self.stages,
-                 self.upstreamSources, ]
+                 self.searchPaths, ]
         if len(self.factorySources):
             ret.append(self.factorySources)
         ret.append(self.buildDefinition)
diff -r 368e98365678 -r 4f20089c9c1f xsd/rpd-0.1.xsd
--- a/xsd/rpd-0.1.xsd	Sat Jun 21 01:03:54 2008 -0400
+++ b/xsd/rpd-0.1.xsd	Sat Jun 21 01:03:55 2008 -0400
@@ -43,20 +43,20 @@
         </xsd:sequence>
     </xsd:complexType>
 
-    <xsd:complexType name="upstreamSourceType">
+    <xsd:complexType name="searchPathType">
         <xsd:attribute name="troveName" type="xsd:string" />
         <xsd:attribute name="label" type="xsd:string" />
     </xsd:complexType>
 
-    <xsd:complexType name="upstreamSourceListType">
+    <xsd:complexType name="searchPathListType">
         <xsd:sequence>
-            <xsd:element name="upstreamSource" type="upstreamSourceType" minOccurs="1" maxOccurs="unbounded" />
+            <xsd:element name="searchPath" type="searchPathType" minOccurs="1" maxOccurs="unbounded" />
         </xsd:sequence>
     </xsd:complexType>
 
     <xsd:complexType name="factorySourceListType">
         <xsd:sequence>
-            <xsd:element name="factorySource" type="upstreamSourceType" minOccurs="1" maxOccurs="unbounded" />
+            <xsd:element name="factorySource" type="searchPathType" minOccurs="1" maxOccurs="unbounded" />
         </xsd:sequence>
     </xsd:complexType>
 
@@ -214,6 +214,39 @@
         <xsd:attribute name="baseFlavor" type="rpd:flavorStringType" />
     </xsd:complexType>
 
+    <xsd:complexType name="platformDefinitionType">
+      <xsd:sequence>
+        <xsd:element name="baseFlavor" type="rpd:flavorStringType"
+        minOccurs="0" maxOccurs="1" />
+        <xsd:element name="searchPaths" type="rpd:searchPathListType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="factorySources" type="rpd:factorySourceListType"
+            minOccurs="0" maxOccurs="1" />
+      </xsd:sequence>
+      <xsd:attribute name="version" type="xsd:string" />
+    </xsd:complexType>
+
+    <xsd:complexType name="platformType">
+      <xsd:sequence>
+        <xsd:element name="baseFlavor" type="rpd:flavorStringType"
+        minOccurs="0" maxOccurs="1" />
+        <xsd:element name="searchPaths" type="rpd:searchPathListType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="factorySources" type="rpd:factorySourceListType"
+            minOccurs="0" maxOccurs="1" />
+      </xsd:sequence>
+      <!-- Source of this platform. Will get filled in to a name-version trove
+      spec when the product definition is saved -->
+      <xsd:attribute name="source" type="xsd:string" />
+      <!-- If useLatest is "true", the upstream platform is copied verbatim
+      here, with no settling to a specific version. This essentially is a
+      cache of the upstream platform.
+      -->
+      <xsd:attribute name="useLatest" type="xsd:boolean" />
+    </xsd:complexType>
+
+
+    <!-- First top-level element we allow -->
     <xsd:element name="productDefinition">
         <xsd:complexType>
             <xsd:sequence>
@@ -225,14 +258,19 @@
                 <xsd:element name="conaryRepositoryHostname" type="xsd:string" />
                 <xsd:element name="conaryNamespace" type="xsd:string" />
                 <xsd:element name="imageGroup" type="rpd:troveSpecType" />
-                <xsd:element name="baseFlavor" type="rpd:flavorStringType" />
+                <xsd:element name="baseFlavor" type="rpd:flavorStringType" minOccurs="0" maxOccurs="1" />
                 <xsd:element name="stages" type="rpd:stageListType" />
-                <xsd:element name="upstreamSources" type="rpd:upstreamSourceListType" />
+                <xsd:element name="searchPaths" type="rpd:searchPathListType" minOccurs="0" maxOccurs="1" />
                 <xsd:element name="factorySources" type="rpd:factorySourceListType" minOccurs="0" maxOccurs="1" />
                 <xsd:element name="buildDefinition" type="rpd:buildDefinitionType" />
+                <xsd:element name="platform" type="rpd:platformType" minOccurs="0" maxOccurs="1" />
             </xsd:sequence>
             <xsd:attribute name="version" type="xsd:string" />
         </xsd:complexType>
     </xsd:element>
 
+    <!-- Second top-level element we allow (although we do allow this as part
+    of a product definition -->
+    <xsd:element name="platformDefinition" type="rpd:platformDefinitionType" />
+
 </xsd:schema>

From misa@rpath.com Sat Jun 21 05:04:46 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5L54kdJ020296 for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 05:04:46 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5L54kRA008701
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 01:04:46 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5L54k9w010600
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 01:04:46 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5L54kV7016882
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 01:04:46 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5L54jqJ016877
	for rpath-common-commits@lists.rpath.com;
	Sat, 21 Jun 2008 01:04:45 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200806210504.m5L54jqJ016877@scc.eng.rpath.com>
Date: Sat, 21 Jun 2008 01:04:45 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Added parsing of the inner platform tag
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Sat, 21 Jun 2008 05:04:47 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Added parsing of the inner platform tag

diff -r 4f20089c9c1f -r 068a82db9188 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Sat Jun 21 01:03:55 2008 -0400
+++ b/rpath_common/proddef/api1.py	Sat Jun 21 01:03:57 2008 -0400
@@ -69,7 +69,167 @@
 
 #}
 
-class ProductDefinition(object):
+class BaseDefinition(object):
+    version = '0.1'
+    defaultNamespace = _xmlConstants.defaultNamespaceList[0]
+    xmlSchemaLocation = _xmlConstants.xmlSchemaLocation
+
+    schemaDir = "/usr/share/rpath_common"
+
+    def __init__(self, fromStream = None, validate = False, schemaDir = None):
+        """
+        Initialize a ProductDefinition object, getting data from the optional
+        XML stream.
+        @param fromStream: An optional XML string or file
+        @type fromStream: C{str} or C{file}
+        @param validate: Validate before parsing (off by default)
+        @type validate: C{bool}
+        @param schemaDir: A directory where schema files are stored
+        @type schemaDir: C{str}
+        """
+
+        self._initFields()
+
+        if fromStream:
+            if isinstance(fromStream, (str, unicode)):
+                fromStream = StringIO.StringIO(fromStream)
+            self.parseStream(fromStream, validate = validate,
+                             schemaDir = schemaDir)
+
+    def getBaseFlavor(self):
+        """
+        @return: the base flavor
+        @rtype: C{str}
+        """
+        return self.baseFlavor
+
+    def setBaseFlavor(self, baseFlavor):
+        """
+        Set the base flavor.
+        @param baseFlavor: the base flavor
+        @type baseFlavor: C{str}
+        """
+        self.baseFlavor = baseFlavor
+
+    def getSearchPaths(self):
+        """
+        @return: the upstream sources from this product definition
+        @rtype: C{list} of C{_SearchPath} objects
+        """
+        return self.searchPaths
+
+    def clearSearchPaths(self):
+        """
+        Delete all searchPaths.
+        @return: None
+        @rtype None
+        """
+        self.searchPaths = _SearchPaths()
+
+
+    def getFactorySources(self):
+        """
+        @return: the factory sources from this product definition
+        @rtype: C{list} of C{_FactorySource} objects
+        """
+        return self.factorySources
+
+    def clearFactorySources(self):
+        """
+        Delete all factorySources.
+        @return: None
+        @rtype None
+        """
+        self.factorySources = _FactorySources()
+
+    def addSearchPath(self, troveName = None, label = None):
+        """
+        Add an upstream source.
+        @param troveName: the trove name for the upstream source.
+        @type name: C{str} or C{None}
+        @param label: Label for the upstream source
+        @type label: C{str} or C{None}
+        """
+        self._addSource(troveName, label, _SearchPath, self.searchPaths)
+
+    def addFactorySource(self, troveName = None, label = None):
+        """
+        Add a factory source.
+        @param troveName: the trove name for the factory source.
+        @type name: C{str} or C{None}
+        @param label: Label for the factory source
+        @type label: C{str} or C{None}
+        """
+        self._addSource(troveName, label, _FactorySource, self.factorySources)
+
+    def _addSource(self, troveName, label, cls, intList):
+        "Internal function for adding a Source"
+        if label is not None:
+            if isinstance(label, conaryVersions.Label):
+                label = str(label)
+        obj = cls(troveName = troveName, label = label)
+        intList.append(obj)
+
+
+    def _saveToRepository(self, conaryClient, label, message = None):
+        version = '0.1'
+
+        if message is None:
+            message = "Automatic checkin\n"
+
+        recipe = self._recipe.replace('@NAME@', self._troveName)
+        recipe = recipe.replace('@VERSION@', version)
+
+        stream = StringIO.StringIO()
+        self.serialize(stream)
+        pathDict = {
+            "%s.recipe" % self._troveName : filetypes.RegularFile(
+                contents = recipe, config=True),
+            self._troveFileName : filetypes.RegularFile(
+                contents = stream.getvalue(), config=True),
+        }
+        cLog = changelog.ChangeLog(name = conaryClient.cfg.name,
+                                   contact = conaryClient.cfg.contact,
+                                   message = message)
+        troveName = '%s:source' % self._troveName
+        cs = conaryClient.createSourceTrove(troveName, label, version,
+            pathDict, cLog)
+
+        repos = conaryClient.getRepos()
+        repos.commitChangeSet(cs)
+
+    def _getStreamFromRepository(self, conaryClient, label):
+        repos = conaryClient.getRepos()
+        troveName = '%s:source' % self._troveName
+        troveSpec = (troveName, label, None)
+        try:
+            troves = repos.findTroves(None, [ troveSpec ])
+        except conaryErrors.TroveNotFound:
+            raise ProductDefinitionTroveNotFound("%s=%s" % (troveName, label))
+        except conaryErrors.RepositoryError, e:
+            raise RepositoryError(str(e))
+        # At this point, troveSpec is in troves and its value should not be
+        # the empty list.
+        nvfs = troves[troveSpec]
+        #if not nvfs:
+        #    raise ProductDefinitionTroveNotFound("%s=%s" % (troveName, label))
+        trvCsSpec = (nvfs[0][0], (None, None), (nvfs[0][1], nvfs[0][2]), True)
+        cs = conaryClient.createChangeSet([ trvCsSpec ], withFiles = True,
+                                          withFileContents = True)
+        for thawTrvCs in cs.iterNewTroveList():
+            paths = [ x for x in thawTrvCs.getNewFileList()
+                      if x[1] == self._troveFileName ]
+            if not paths:
+                continue
+            # Fetch file from changeset
+            fileSpecs = [ (fId, fVer) for (_, _, fId, fVer) in paths ]
+            fileContents = repos.getFileContents(fileSpecs)
+            return fileContents[0].get()
+
+        # Couldn't find the file we expected; die
+        raise ProductDefinitionFileNotFound("%s=%s" % (troveName, label))
+
+class ProductDefinition(BaseDefinition):
     """
     Represents the definition of a product.
     @cvar version:
@@ -83,12 +243,6 @@
     @cvar schemaDir: Directory where schema definitions are stored
     @type schemaDir: C{str}
     """
-    version = '0.1'
-    defaultNamespace = _xmlConstants.defaultNamespaceList[0]
-    xmlSchemaLocation = _xmlConstants.xmlSchemaLocation
-
-    schemaDir = "/usr/share/rpath_common"
-
     _imageTypeDispatcher = xmllib.NodeDispatcher({})
     _imageTypeDispatcher.registerClasses(imageTypes, imageTypes.ImageType_Base)
 
@@ -112,26 +266,6 @@
         No other recipe actions need to be added beyond this point.
         """
 '''
-
-    def __init__(self, fromStream = None, validate = False, schemaDir = None):
-        """
-        Initialize a ProductDefinition object, getting data from the optional
-        XML stream.
-        @param fromStream: An optional XML string or file
-        @type fromStream: C{str} or C{file}
-        @param validate: Validate before parsing (off by default)
-        @type validate: C{bool}
-        @param schemaDir: A directory where schema files are stored
-        @type schemaDir: C{str}
-        """
-
-        self._initFields()
-
-        if fromStream:
-            if isinstance(fromStream, (str, unicode)):
-                fromStream = StringIO.StringIO(fromStream)
-            self.parseStream(fromStream, validate = validate,
-                             schemaDir = schemaDir)
 
     def __str__(self):
         troveName = self.getTroveName()
@@ -189,6 +323,7 @@
         self.searchPaths.extend(getattr(xmlObj, 'searchPaths', []))
         self.factorySources.extend(getattr(xmlObj, 'factorySources', []))
         self.buildDefinition.extend(getattr(xmlObj, 'buildDefinition', []))
+        self.platform = getattr(xmlObj, 'platform', None)
 
         ver = xmlObj.getAttribute('version')
         if ver is not None and ver != self.version:
@@ -368,21 +503,6 @@
         """
         self.imageGroup = imageGroup
 
-    def getBaseFlavor(self):
-        """
-        @return: the base flavor
-        @rtype: C{str}
-        """
-        return self.baseFlavor
-
-    def setBaseFlavor(self, baseFlavor):
-        """
-        Set the base flavor.
-        @param baseFlavor: the base flavor
-        @type baseFlavor: C{str}
-        """
-        self.baseFlavor = baseFlavor
-
     def getStages(self):
         """
         @return: the stages from this product definition
@@ -423,36 +543,6 @@
         """
         self.stages = _Stages()
 
-    def getSearchPaths(self):
-        """
-        @return: the upstream sources from this product definition
-        @rtype: C{list} of C{_SearchPath} objects
-        """
-        return self.searchPaths
-
-    def clearSearchPaths(self):
-        """
-        Delete all searchPaths.
-        @return: None
-        @rtype None
-        """
-        self.searchPaths = _SearchPaths()
-
-    def getFactorySources(self):
-        """
-        @return: the factory sources from this product definition
-        @rtype: C{list} of C{_FactorySource} objects
-        """
-        return self.factorySources
-
-    def clearFactorySources(self):
-        """
-        Delete all factorySources.
-        @return: None
-        @rtype None
-        """
-        self.factorySources = _FactorySources()
-
     def getLabelForStage(self, stageName):
         """
         Synthesize the label for a particular stage based upon
@@ -489,34 +579,6 @@
             if stage.labelSuffix == '-devel':
                 return self._getLabelForStage(stage)
         raise StageNotFoundError
-
-    def addSearchPath(self, troveName = None, label = None):
-        """
-        Add an upstream source.
-        @param troveName: the trove name for the upstream source.
-        @type name: C{str} or C{None}
-        @param label: Label for the upstream source
-        @type label: C{str} or C{None}
-        """
-        self._addSource(troveName, label, _SearchPath, self.searchPaths)
-
-    def addFactorySource(self, troveName = None, label = None):
-        """
-        Add a factory source.
-        @param troveName: the trove name for the factory source.
-        @type name: C{str} or C{None}
-        @param label: Label for the factory source
-        @type label: C{str} or C{None}
-        """
-        self._addSource(troveName, label, _FactorySource, self.factorySources)
-
-    def _addSource(self, troveName, label, cls, intList):
-        "Internal function for adding a Source"
-        if label is not None:
-            if isinstance(label, conaryVersions.Label):
-                label = str(label)
-        obj = cls(troveName = troveName, label = label)
-        intList.append(obj)
 
     def getBuildDefinitions(self):
         """
@@ -557,6 +619,92 @@
         @rtype None
         """
         self.buildDefinition = _BuildDefinition()
+
+    def getPlatformSearchPaths(self):
+        """
+        @return: the upstream sources from this product definition
+        @rtype: C{list} of C{_SearchPath} objects
+        """
+        if self.platform is None:
+            return None
+        return self.platform.searchPaths
+
+    def clearPlatformSearchPaths(self):
+        """
+        Delete all searchPaths.
+        @return: None
+        @rtype None
+        """
+        if self.platform is None:
+            return
+        self.platform.searchPaths = _SearchPaths()
+
+    def addPlatformSearchPath(self, troveName = None, label = None):
+        if self.platform is None:
+            self.platform = Platform()
+        self._addSource(troveName, label, _SearchPath, self.platform.searchPaths)
+
+    def getPlatformFactorySources(self):
+        """
+        @return: the factory sources from this product definition
+        @rtype: C{list} of C{_FactorySource} objects
+        """
+        if self.platform is None:
+            return None
+        return self.platform.factorySources
+
+    def clearPlatformFactorySources(self):
+        """
+        Delete all factorySources.
+        @return: None
+        @rtype None
+        """
+        if self.platform is None:
+            return
+        self.platform.factorySources = _FactorySources()
+
+    def addPlatformFactorySource(self, troveName = None, label = None):
+        """
+        Add a factory source.
+        @param troveName: the trove name for the factory source.
+        @type name: C{str} or C{None}
+        @param label: Label for the factory source
+        @type label: C{str} or C{None}
+        """
+        if self.platform is None:
+            self.platform = Platform()
+        self._addSource(troveName, label, _FactorySource, self.platform.factorySources)
+
+    def getPlatformBaseFlavor(self):
+        if self.platform is None:
+            return None
+        return self.platform.baseFlavor
+
+    def setPlatformBaseFlavor(self, baseFlavor):
+        self._ensurePlatformExists()
+        self.platform.baseFlavor = baseFlavor
+
+    def getPlatformSourceLabel(self):
+        if self.platform is None:
+            return None
+        return self.platform.sourceLabel
+
+    def setPlatformSourceLabel(self, sourceLabel):
+        self._ensurePlatformExists()
+        self.platform.sourceLabel = sourceLabel
+
+    def getPlatformUseLatest(self):
+        if self.platform is None:
+            return None
+        return self.platform.useLatest
+
+    def setPlatformUseLatest(self, useLatest):
+        self._ensurePlatformExists()
+        self.platform.useLatest = useLatest
+
+    def _ensurePlatformExists(self):
+        if self.platform is None:
+            self.platform = PlatformDefinition()
 
     @classmethod
     def imageType(cls, name, fields = None):
@@ -629,6 +777,84 @@
         labelSuffix = stageObj.labelSuffix or '' # this can be blank
         return str(prefix + labelSuffix)
 
+    def toPlatformDefinition(self):
+        "Create a PlatformDefinition object from this ProductDefinition"
+        nplat = PlatformDefinition()
+        baseFlavor = self.getBaseFlavor()
+        if baseFlavor is None:
+            baseFlavor = self.getPlatformBaseFlavor()
+        nplat.setBaseFlavor(baseFlavor)
+
+        # Factory sources defined in the product defintion take precedence
+        fSources = self.getFactorySources()
+        if not fSources:
+            fSources = self.getPlatformFactorySources()
+        for fsrc in fSources or []:
+            nplat.addFactorySource(troveName = fsrc.troveName,
+                                   label = fsrc.label)
+
+        # Build new search path
+        label = self.getProductDefinitionLabel()
+        sPathsList = []
+        sPathsSet = set()
+
+        # Iterate over all builds, and add the image group
+        for build in self.buildDefinition:
+            if not build.imageGroup:
+                continue
+            key = (build.imageGroup, label)
+            if key not in sPathsSet:
+                sPathsList.append(key)
+                sPathsSet.add(key)
+        # Append the global image group
+        key = (self.getImageGroup(), label)
+        if key not in sPathsSet:
+            sPathsList.append(key)
+            sPathsSet.add(key)
+        # Now append the search paths from this object, if available, or from
+        # the upstream platform, if available
+
+        sPaths = self.getSearchPaths()
+        if not sPaths:
+            sPaths = self.getPlatformSearchPaths()
+        for sp in sPaths or []:
+            key = (sp.troveName, sp.label)
+            if key not in sPathsSet:
+                sPathsList.append(key)
+                sPathsSet.add(key)
+
+        for troveName, label in sPathsList:
+            nplat.addSearchPath(troveName=troveName, label=label)
+
+        return nplat
+
+    def savePlatformToRepository(self, client, message = None):
+        nplat = self.toPlatformDefinition()
+        label = self.getProductDefinitionLabel()
+        nplat.saveToRepository(client, label, message = message)
+
+    def rebase(self, client, label = None, useLatest = None):
+        if label is None:
+            label = self.getPlatformSourceLabel()
+        if label is None:
+            raise Exception("XXX")
+        nplat = self.toPlatformDefinition()
+        nplat.loadFromRepository(client, label)
+        # XXX here we have to determine the real versions
+        self._rebase(label, nplat, useLatest = None)
+
+    def _rebase(self, label, nplat, useLatest = None):
+        # Create a new platform definition
+        self.platform = PlatformDefinition()
+        # Fill it in with fields from the upstream one
+        self.setPlatformBaseFlavor(nplat.getBaseFlavor())
+        self.setPlatformSourceLabel(label)
+        self.setPlatformUseLatest(useLatest)
+        for sp in nplat.getSearchPaths():
+            self.addPlatformSearchPath(troveName=sp.troveName, label=sp.label)
+        for sp in nplat.getFactorySources():
+            self.addPlatformFactorySource(troveName=sp.troveName, label=sp.label)
+
     def _initFields(self):
         self.baseFlavor = None
         self.stages = _Stages()
@@ -643,65 +869,110 @@
         self.searchPaths = _SearchPaths()
         self.factorySources = _FactorySources()
         self.buildDefinition = _BuildDefinition()
+        self.platform = None
 
-    def _saveToRepository(self, conaryClient, label, message = None):
-        version = '0.1'
+    #}
 
-        if message is None:
-            message = "Automatic checkin\n"
 
-        recipe = self._recipe.replace('@NAME@', self._troveName)
-        recipe = recipe.replace('@VERSION@', version)
+class PlatformDefinition(BaseDefinition):
+    _troveName = 'platform-definition'
+    _troveFileName = 'platform-definition.xml'
 
-        stream = StringIO.StringIO()
-        self.serialize(stream)
-        pathDict = {
-            "%s.recipe" % self._troveName : filetypes.RegularFile(
-                contents = recipe, config=True),
-            self._troveFileName : filetypes.RegularFile(
-                contents = stream.getvalue(), config=True),
+    _recipe = '''
+#
+# Copyright (c) 2008 rPath, Inc.
+#
+
+class ProductDefinitionRecipe(PackageRecipe):
+    name = "@NAME@"
+    version = "@VERSION@"
+
+    def setup(r):
+        """
+        This recipe is a stub created to allow users to manually
+        check in changes to the product definition XML.
+
+        No other recipe actions need to be added beyond this point.
+        """
+'''
+
+    def _initFields(self):
+        self.searchPaths = _SearchPaths()
+        self.factorySources = _FactorySources()
+        self.baseFlavor = None
+        self.useLatest = None
+        self.sourceLabel = None
+
+    def parseStream(self, stream, validate = False, schemaDir = None):
+        """
+        Initialize the current object from an XML stream.
+        @param stream: An XML stream
+        @type stream: C{file}
+        @param validate: Validate before parsing (off by default)
+        @type validate: C{bool}
+        @param schemaDir: A directory where schema files are stored
+        @type schemaDir: C{str}
+        """
+        self._initFields()
+        binder = xmllib.DataBinder()
+        binder.registerType(_PlatformDefinition, 'platformDefinition')
+        xmlObj = binder.parseFile(stream, validate = validate,
+                                  schemaDir = schemaDir or self.schemaDir)
+        self.baseFlavor = getattr(xmlObj.platform, 'baseFlavor', None)
+        self.sourceLabel = getattr(xmlObj.platform, 'sourceLabel', None)
+        self.useLatest = getattr(xmlObj.platform, 'useLatest', None)
+        self.searchPaths = getattr(xmlObj.platform, 'searchPaths', None)
+        self.factorySources = getattr(xmlObj.platform, 'factorySources', None)
+
+        for nsName, nsVal in xmlObj.iterNamespaces():
+            if nsName is None and nsVal != self.defaultNamespace:
+                self.defaultNamespace = nsVal
+                continue
+            # XXX We don't support changing the schema location for now
+
+    def serialize(self, stream):
+        """
+        Serialize the current object as an XML stream.
+        @param stream: stream to write the serialized object
+        @type stream: C{file}
+        """
+        attrs = {'version' : self.version,
+                 'xmlns' : self.defaultNamespace,
+                 'xmlns:xsi' : xmllib.DataBinder.xmlSchemaNamespace,
+                 "xsi:schemaLocation" : self.xmlSchemaLocation,
         }
-        cLog = changelog.ChangeLog(name = conaryClient.cfg.name,
-                                   contact = conaryClient.cfg.contact,
-                                   message = message)
-        troveName = '%s:source' % self._troveName
-        cs = conaryClient.createSourceTrove(troveName, label, version,
-            pathDict, cLog)
+        nameSpaces = {}
+        serObj = _PlatformSerialization(attrs, nameSpaces, self,
+            name="platformDefinition")
+        binder = xmllib.DataBinder()
+        stream.write(binder.toXml(serObj))
 
-        repos = conaryClient.getRepos()
-        repos.commitChangeSet(cs)
+    def saveToRepository(self, client, label, message = None):
+        """
+        Save a C{PlatformDefinition} object to a Conary repository.
+        @param client: A Conary client object
+        @type client: C{conaryclient.ConaryClient}
+        @param message: An optional commit message
+        @type message: C{str}
+        @param label: Label where the representation will be saved
+        @type label: C{str}
+        """
+        return self._saveToRepository(client, label, message = message)
 
-    def _getStreamFromRepository(self, conaryClient, label):
-        repos = conaryClient.getRepos()
-        troveName = '%s:source' % self._troveName
-        troveSpec = (troveName, label, None)
-        try:
-            troves = repos.findTroves(None, [ troveSpec ])
-        except conaryErrors.TroveNotFound:
-            raise ProductDefinitionTroveNotFound("%s=%s" % (troveName, label))
-        except conaryErrors.RepositoryError, e:
-            raise RepositoryError(str(e))
-        # At this point, troveSpec is in troves and its value should not be
-        # the empty list.
-        nvfs = troves[troveSpec]
-        #if not nvfs:
-        #    raise ProductDefinitionTroveNotFound("%s=%s" % (troveName, label))
-        trvCsSpec = (nvfs[0][0], (None, None), (nvfs[0][1], nvfs[0][2]), True)
-        cs = conaryClient.createChangeSet([ trvCsSpec ], withFiles = True,
-                                          withFileContents = True)
-        for thawTrvCs in cs.iterNewTroveList():
-            paths = [ x for x in thawTrvCs.getNewFileList()
-                      if x[1] == self._troveFileName ]
-            if not paths:
-                continue
-            # Fetch file from changeset
-            fileSpecs = [ (fId, fVer) for (_, _, fId, fVer) in paths ]
-            fileContents = repos.getFileContents(fileSpecs)
-            return fileContents[0].get()
-
-        # Couldn't find the file we expected; die
-        raise ProductDefinitionFileNotFound("%s=%s" % (troveName, label))
-    #}
+    def loadFromRepository(self, client, label):
+        """
+        Load a C{PlatformDefinition} object from a Conary repository.
+        @param client: A Conary client object
+        @type client: C{conaryclient.ConaryClient}
+        @param message: An optional commit message
+        @type message: C{str}
+        @raises C{RepositoryError}:
+        @raises C{ProductDefinitionTroveNotFound}:
+        @raises C{ProductDefinitionFileNotFound}:
+        """
+        stream = self._getStreamFromRepository(client, label)
+        stream.seek(0)
+        self.parseStream(stream)
 
 
 #{ Objects for the representation of ProductDefinition fields
@@ -812,12 +1083,54 @@
 
 #}
 
-class _ProductDefinition(xmllib.BaseNode):
-
+class BaseXmlNode(xmllib.BaseNode):
     def __init__(self, attributes = None, nsMap = None, name = None):
         xmllib.BaseNode.__init__(self, attributes = attributes, nsMap = nsMap,
                                  name = name)
         self.defaultNamespace = self.getNamespaceMap().get(None)
+
+    def _makeAbsoluteName(self, name):
+        return "{%s}%s" % (self.defaultNamespace, name)
+
+    def _processSearchPaths(self, searchPaths):
+        sources = _SearchPaths()
+        for node in searchPaths:
+            pyObj = _SearchPath(
+                troveName = node.getAttribute('troveName'),
+                label = node.getAttribute('label'))
+            sources.append(pyObj)
+        return sources
+
+    def _processFactorySources(self, factorySources):
+        sources = _FactorySources()
+        for node in factorySources:
+            pyObj = _FactorySource(
+                troveName = node.getAttribute('troveName'),
+                label = node.getAttribute('label'))
+            sources.append(pyObj)
+        return sources
+
+    def _addPlatform(self, node):
+        self.platform = PlatformDefinition()
+        self.platform.sourceLabel = node.getAttribute('sourceLabel')
+        useLatest = node.getAttribute('useLatest')
+        if useLatest is not None:
+            useLatest = xmllib.BooleanNode.fromString(useLatest)
+        self.platform.useLatest = useLatest
+        listNode = node.getChildren('searchPaths')
+        if listNode:
+            self.platform.searchPaths = self._processSearchPaths(
+                listNode[0].getChildren('searchPath'))
+        listNode = node.getChildren('factorySources')
+        if listNode:
+            self.platform.factorySources = self._processFactorySources(
+                listNode[0].getChildren('factorySource'))
+        baseFlavorChildren = node.getChildren('baseFlavor')
+        if baseFlavorChildren:
+            self.platform.baseFlavor = baseFlavorChildren[0].getText()
+
+
+class _ProductDefinition(BaseXmlNode):
 
     def addChild(self, childNode):
         chName = childNode.getAbsoluteName()
@@ -878,8 +1191,9 @@
             self._addBuildDefinition(children)
             return
 
-    def _makeAbsoluteName(self, name):
-        return "{%s}%s" % (self.defaultNamespace, name)
+        if chName == self._makeAbsoluteName('platform'):
+            self._addPlatform(childNode)
+            return
 
     def _addStages(self, stagesNodes):
         stages = self.stages = _Stages()
@@ -890,20 +1204,10 @@
             stages.append(pyObj)
 
     def _addSearchPaths(self, searchPaths):
-        sources = self.searchPaths = _SearchPaths()
-        for node in searchPaths:
-            pyObj = _SearchPath(
-                troveName = node.getAttribute('troveName'),
-                label = node.getAttribute('label'))
-            sources.append(pyObj)
+        self.searchPaths = self._processSearchPaths(searchPaths)
 
     def _addFactorySources(self, factorySources):
-        sources = self.factorySources = _FactorySources()
-        for node in factorySources:
-            pyObj = _FactorySource(
-                troveName = node.getAttribute('troveName'),
-                label = node.getAttribute('label'))
-            sources.append(pyObj)
+        self.factorySources = self._processFactorySources(factorySources)
 
 
     def _addBuildDefinition(self, buildNodes):
@@ -941,6 +1245,30 @@
                 )
             builds.append(pyobj)
 
+class _PlatformDefinition(BaseXmlNode):
+    def finalize(self):
+        self._addPlatform(self)
+        return self
+
+class _PlatformSerialization(xmllib.BaseNode):
+    def __init__(self, attrs, namespaces, platform, name='platform'):
+        if platform.useLatest:
+            attrs['useLatest'] = True
+        if platform.sourceLabel:
+            attrs['sourceLabel'] = platform.sourceLabel
+        self.searchPaths = platform.searchPaths
+        self.factorySources = platform.factorySources
+        self.baseFlavor = xmllib.StringNode(name = 'baseFlavor').characters(platform.baseFlavor)
+        xmllib.BaseNode.__init__(self, attrs, namespaces, name=name)
+
+    def iterChildren(self):
+        ret = [self.baseFlavor]
+        if self.searchPaths:
+            ret.append(self.searchPaths)
+        if self.factorySources:
+            ret.append(self.factorySources)
+        return ret
+
 class _ProductDefinitionSerialization(xmllib.BaseNode):
     def __init__(self, name, attrs, namespaces, prodDef):
         xmllib.BaseNode.__init__(self, attrs, namespaces, name = name)
@@ -948,6 +1276,11 @@
         self.searchPaths = prodDef.getSearchPaths()
         self.factorySources = prodDef.getFactorySources()
         self.buildDefinition = prodDef.getBuildDefinitions()
+        if prodDef.platform:
+            self.platform = _PlatformSerialization({}, namespaces,
+                prodDef.platform)
+        else:
+            self.platform = None
 
         self.productName = xmllib.StringNode(name = 'productName')
         productName = prodDef.getProductName()
@@ -1012,6 +1345,8 @@
         if len(self.factorySources):
             ret.append(self.factorySources)
         ret.append(self.buildDefinition)
+        if self.platform:
+            ret.append(self.platform)
         return ret
 
 class _ImageTypeFakeNode(object):

From misa@rpath.com Sat Jun 21 05:19:10 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5L5J9wP020510 for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 05:19:10 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5L5J9VN009769
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 01:19:09 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5L5J9DF011347
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 01:19:09 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5L5J8OW017601
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 01:19:08 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5L5J8Bq017596
	for rpath-common-commits@lists.rpath.com;
	Sat, 21 Jun 2008 01:19:08 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200806210519.m5L5J8Bq017596@scc.eng.rpath.com>
Date: Sat, 21 Jun 2008 01:19:08 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Renamed
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Sat, 21 Jun 2008 05:19:10 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       xsd/Makefile

Renamed

diff -r 068a82db9188 -r b7b0ddc4a826 xsd/Makefile
--- a/xsd/Makefile	Sat Jun 21 01:03:57 2008 -0400
+++ b/xsd/Makefile	Sat Jun 21 01:18:53 2008 -0400
@@ -12,12 +12,12 @@
 # full details.
 #
 
-dist_files = Makefile rpd-1.0.xsd
+dist_files = Makefile rpd-0.1.xsd
 
 all: default-all
 
 install: all default-install $(DESTDIR)$(datadir)/rpath_common
-	install rpd-1.0.xsd $(DESTDIR)$(datadir)/rpath_common/rpd-1.0.xsd
+	install rpd-0.1.xsd $(DESTDIR)$(datadir)/rpath_common/rpd-0.1.xsd
 
 $(DESTDIR)$(datadir)/rpath_common:
 	install -d -m755 $@

From misa@rpath.com Sat Jun 21 13:49:47 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5LDnlwu032096 for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 13:49:47 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5LDnkca009577
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 09:49:46 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5LDnkpW012660
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 09:49:46 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5LDnkKH003987
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 09:49:46 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5LDnkLe003969
	for rpath-common-commits@lists.rpath.com;
	Sat, 21 Jun 2008 09:49:46 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200806211349.m5LDnkLe003969@scc.eng.rpath.com>
Date: Sat, 21 Jun 2008 09:49:45 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Snapshot versions upon rebase (RPCL-6)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Sat, 21 Jun 2008 13:49:47 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py xsd/rpd-0.1.xsd

Snapshot versions upon rebase (RPCL-6)

diff -r b7b0ddc4a826 -r 0f3a8ea062b1 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Sat Jun 21 01:18:53 2008 -0400
+++ b/rpath_common/proddef/api1.py	Sat Jun 21 08:39:11 2008 -0400
@@ -28,6 +28,7 @@
             'RepositoryError',
             ]
 
+import itertools
 import StringIO
 
 from conary import changelog
@@ -113,7 +114,7 @@
 
     def getSearchPaths(self):
         """
-        @return: the upstream sources from this product definition
+        @return: the search paths from this product definition
         @rtype: C{list} of C{_SearchPath} objects
         """
         return self.searchPaths
@@ -142,32 +143,36 @@
         """
         self.factorySources = _FactorySources()
 
-    def addSearchPath(self, troveName = None, label = None):
+    def addSearchPath(self, troveName = None, label = None, version = None):
         """
-        Add an upstream source.
-        @param troveName: the trove name for the upstream source.
+        Add an search path.
+        @param troveName: the trove name for the search path.
         @type name: C{str} or C{None}
-        @param label: Label for the upstream source
+        @param label: Label for the search path
         @type label: C{str} or C{None}
+        @param version: Version for the search path
+        @param version: C{str} or C{None}
         """
-        self._addSource(troveName, label, _SearchPath, self.searchPaths)
+        self._addSource(troveName, label, version, _SearchPath, self.searchPaths)
 
-    def addFactorySource(self, troveName = None, label = None):
+    def addFactorySource(self, troveName = None, label = None, version = None):
         """
         Add a factory source.
         @param troveName: the trove name for the factory source.
         @type name: C{str} or C{None}
         @param label: Label for the factory source
         @type label: C{str} or C{None}
+        @param version: Version for the factory source
+        @param version: C{str} or C{None}
         """
-        self._addSource(troveName, label, _FactorySource, self.factorySources)
+        self._addSource(troveName, label, version, _FactorySource, self.factorySources)
 
-    def _addSource(self, troveName, label, cls, intList):
+    def _addSource(self, troveName, label, version, cls, intList):
         "Internal function for adding a Source"
         if label is not None:
             if isinstance(label, conaryVersions.Label):
                 label = str(label)
-        obj = cls(troveName = troveName, label = label)
+        obj = cls(troveName = troveName, label = label, version = version)
         intList.append(obj)
 
 
@@ -622,7 +627,7 @@
 
     def getPlatformSearchPaths(self):
         """
-        @return: the upstream sources from this product definition
+        @return: the search paths from this product definition
         @rtype: C{list} of C{_SearchPath} objects
         """
         if self.platform is None:
@@ -639,10 +644,21 @@
             return
         self.platform.searchPaths = _SearchPaths()
 
-    def addPlatformSearchPath(self, troveName = None, label = None):
+    def addPlatformSearchPath(self, troveName = None, label = None,
+                              version = None):
+        """
+        Add an search path.
+        @param troveName: the trove name for the search path.
+        @type name: C{str} or C{None}
+        @param label: Label for the search path
+        @type label: C{str} or C{None}
+        @param version: Version for the search path
+        @param version: C{str} or C{None}
+        """
         if self.platform is None:
             self.platform = Platform()
-        self._addSource(troveName, label, _SearchPath, self.platform.searchPaths)
+        self._addSource(troveName, label, version, _SearchPath,
+                        self.platform.searchPaths)
 
     def getPlatformFactorySources(self):
         """
@@ -663,17 +679,21 @@
             return
         self.platform.factorySources = _FactorySources()
 
-    def addPlatformFactorySource(self, troveName = None, label = None):
+    def addPlatformFactorySource(self, troveName = None, label = None,
+                                 version = None):
         """
         Add a factory source.
         @param troveName: the trove name for the factory source.
         @type name: C{str} or C{None}
         @param label: Label for the factory source
         @type label: C{str} or C{None}
+        @param version: Version for the factory source
+        @param version: C{str} or C{None}
         """
         if self.platform is None:
             self.platform = Platform()
-        self._addSource(troveName, label, _FactorySource, self.platform.factorySources)
+        self._addSource(troveName, label, version, _FactorySource,
+                        self.platform.factorySources)
 
     def getPlatformBaseFlavor(self):
         if self.platform is None:
@@ -814,6 +834,9 @@
         # Now append the search paths from this object, if available, or from
         # the upstream platform, if available
 
+        # We are purposely dropping the versions from the platform definition
+        # on creation.
+
         sPaths = self.getSearchPaths()
         if not sPaths:
             sPaths = self.getPlatformSearchPaths()
@@ -840,6 +863,7 @@
             raise Exception("XXX")
         nplat = self.toPlatformDefinition()
         nplat.loadFromRepository(client, label)
+        nplat.snapshotVersions(client)
         # XXX here we have to determine the real versions
         self._rebase(label, nplat, useLatest = None)
 
@@ -851,9 +875,13 @@
         self.setPlatformSourceLabel(label)
         self.setPlatformUseLatest(useLatest)
         for sp in nplat.getSearchPaths():
-            self.addPlatformSearchPath(troveName=sp.troveName, label=sp.label)
+            self.addPlatformSearchPath(troveName=sp.troveName,
+                                       label=sp.label,
+                                       version=sp.version)
         for sp in nplat.getFactorySources():
-            self.addPlatformFactorySource(troveName=sp.troveName, label=sp.label)
+            self.addPlatformFactorySource(troveName=sp.troveName,
+                                          label=sp.label,
+                                          version=sp.version)
 
     def _initFields(self):
         self.baseFlavor = None
@@ -974,6 +1002,33 @@
         stream.seek(0)
         self.parseStream(stream)
 
+    def snapshotVersions(self, conaryClient):
+        """
+        For each search path or factory source from this platform definition,
+        query the repositories for the latest versions and record them.
+        @param conaryClient: A Conary client object
+        @type conaryClient: C{conaryclient.ConaryClient}
+        """
+        repos = conaryClient.getRepos()
+        troveSpecs = set()
+        # XXX We are ignoring the flavors for now.
+        for sp in itertools.chain(self.getSearchPaths(),
+                                  self.getFactorySources()):
+            key = (sp.troveName, sp.label, None)
+            troveSpecs.add(key)
+        troveSpecs = sorted(troveSpecs)
+        try:
+            troves = repos.findTroves(None, troveSpecs, allowMissing = True)
+        except conaryErrors.RepositoryError, e:
+            raise RepositoryError(str(e))
+
+        for sp in itertools.chain(self.getSearchPaths(),
+                                  self.getFactorySources()):
+            key = (sp.troveName, sp.label, None)
+            if key not in troves:
+                raise ProductDefinitionTroveNotFound("%s=%s" % (key[0], key[1]))
+            nvf = troves[key][0]
+            sp.version = str(nvf[1].trailingRevision())
 
 #{ Objects for the representation of ProductDefinition fields
 
@@ -1008,13 +1063,14 @@
         self.labelSuffix = labelSuffix
 
 class _SearchPath(xmllib.SlotBasedSerializableObject):
-    __slots__ = [ 'troveName', 'label' ]
+    __slots__ = [ 'troveName', 'label', 'version' ]
     tag = "searchPath"
 
-    def __init__(self, troveName = None, label = None):
+    def __init__(self, troveName = None, label = None, version = None):
         xmllib.SlotBasedSerializableObject.__init__(self)
         self.troveName = troveName
         self.label = label
+        self.version = version
 
 class _FactorySource(_SearchPath):
     tag = "factorySource"
@@ -1097,7 +1153,8 @@
         for node in searchPaths:
             pyObj = _SearchPath(
                 troveName = node.getAttribute('troveName'),
-                label = node.getAttribute('label'))
+                label = node.getAttribute('label'),
+                version = node.getAttribute('version'))
             sources.append(pyObj)
         return sources
 
@@ -1106,7 +1163,8 @@
         for node in factorySources:
             pyObj = _FactorySource(
                 troveName = node.getAttribute('troveName'),
-                label = node.getAttribute('label'))
+                label = node.getAttribute('label'),
+                version = node.getAttribute('version'))
             sources.append(pyObj)
         return sources
 
diff -r b7b0ddc4a826 -r 0f3a8ea062b1 xsd/rpd-0.1.xsd
--- a/xsd/rpd-0.1.xsd	Sat Jun 21 01:18:53 2008 -0400
+++ b/xsd/rpd-0.1.xsd	Sat Jun 21 08:39:11 2008 -0400
@@ -46,6 +46,7 @@
     <xsd:complexType name="searchPathType">
         <xsd:attribute name="troveName" type="xsd:string" />
         <xsd:attribute name="label" type="xsd:string" />
+        <xsd:attribute name="version" type="xsd:string" />
     </xsd:complexType>
 
     <xsd:complexType name="searchPathListType">

From misa@rpath.com Sat Jun 21 13:49:48 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5LDnmL4032099 for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 13:49:48 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5LDnlLP009584
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 09:49:47 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5LDnlF2012666
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 09:49:47 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5LDnlIk004025
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 09:49:47 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5LDnllN004011
	for rpath-common-commits@lists.rpath.com;
	Sat, 21 Jun 2008 09:49:47 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200806211349.m5LDnllN004011@scc.eng.rpath.com>
Date: Sat, 21 Jun 2008 09:49:47 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Changed proddef so that if overrides don't
	exist, the platform's fields are used
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Sat, 21 Jun 2008 13:49:48 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Changed proddef so that if overrides don't exist, the platform's fields are used

diff -r 0f3a8ea062b1 -r a7f4fcec4030 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Sat Jun 21 08:39:11 2008 -0400
+++ b/rpath_common/proddef/api1.py	Sat Jun 21 09:29:29 2008 -0400
@@ -126,7 +126,6 @@
         @rtype None
         """
         self.searchPaths = _SearchPaths()
-
 
     def getFactorySources(self):
         """
@@ -508,6 +507,15 @@
         """
         self.imageGroup = imageGroup
 
+    def getBaseFlavor(self):
+        """
+        @return: the base flavor
+        @rtype: C{str}
+        """
+        if self.baseFlavor is not None:
+            return self.baseFlavor
+        return self.getPlatformBaseFlavor()
+
     def getStages(self):
         """
         @return: the stages from this product definition
@@ -585,6 +593,24 @@
                 return self._getLabelForStage(stage)
         raise StageNotFoundError
 
+    def getSearchPaths(self):
+        """
+        @return: the search paths from this product definition
+        @rtype: C{list} of C{_SearchPath} objects
+        """
+        if self.searchPaths:
+            return self.searchPaths
+        return self.getPlatformSearchPaths()
+
+    def getFactorySources(self):
+        """
+        @return: the factory sources from this product definition
+        @rtype: C{list} of C{_FactorySource} objects
+        """
+        if self.factorySources:
+            return self.factorySources
+        return self.getPlatformFactorySources()
+
     def getBuildDefinitions(self):
         """
         @return: The build definitions from this product definition
@@ -631,7 +657,7 @@
         @rtype: C{list} of C{_SearchPath} objects
         """
         if self.platform is None:
-            return None
+            return []
         return self.platform.searchPaths
 
     def clearPlatformSearchPaths(self):
@@ -656,7 +682,7 @@
         @param version: C{str} or C{None}
         """
         if self.platform is None:
-            self.platform = Platform()
+            self.platform = PlatformDefinition()
         self._addSource(troveName, label, version, _SearchPath,
                         self.platform.searchPaths)
 
@@ -666,7 +692,7 @@
         @rtype: C{list} of C{_FactorySource} objects
         """
         if self.platform is None:
-            return None
+            return []
         return self.platform.factorySources
 
     def clearPlatformFactorySources(self):
@@ -691,7 +717,7 @@
         @param version: C{str} or C{None}
         """
         if self.platform is None:
-            self.platform = Platform()
+            self.platform = PlatformDefinition()
         self._addSource(troveName, label, version, _FactorySource,
                         self.platform.factorySources)
 
@@ -801,8 +827,6 @@
         "Create a PlatformDefinition object from this ProductDefinition"
         nplat = PlatformDefinition()
         baseFlavor = self.getBaseFlavor()
-        if baseFlavor is None:
-            baseFlavor = self.getPlatformBaseFlavor()
         nplat.setBaseFlavor(baseFlavor)
 
         # Factory sources defined in the product defintion take precedence
@@ -1267,7 +1291,6 @@
     def _addFactorySources(self, factorySources):
         self.factorySources = self._processFactorySources(factorySources)
 
-
     def _addBuildDefinition(self, buildNodes):
         dispatcher = xmllib.NodeDispatcher(self._nsMap)
         dispatcher.registerClasses(imageTypes, imageTypes.ImageType_Base)
@@ -1331,8 +1354,8 @@
     def __init__(self, name, attrs, namespaces, prodDef):
         xmllib.BaseNode.__init__(self, attrs, namespaces, name = name)
         self.stages = prodDef.getStages()
-        self.searchPaths = prodDef.getSearchPaths()
-        self.factorySources = prodDef.getFactorySources()
+        self.searchPaths = prodDef.searchPaths
+        self.factorySources = prodDef.factorySources
         self.buildDefinition = prodDef.getBuildDefinitions()
         if prodDef.platform:
             self.platform = _PlatformSerialization({}, namespaces,
@@ -1386,7 +1409,7 @@
             self.imageGroup.characters(imageGroup)
 
         self.baseFlavor = xmllib.StringNode(name = 'baseFlavor')
-        self.baseFlavor.characters(prodDef.getBaseFlavor())
+        self.baseFlavor.characters(prodDef.baseFlavor)
 
     def iterChildren(self):
         ret =  [ self.productName,

From misa@rpath.com Sat Jun 21 13:49:49 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5LDnmCS032105 for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 13:49:49 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5LDnmEl009588
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 09:49:48 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5LDnmPH012669
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 09:49:48 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5LDnmBL004054
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 09:49:48 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5LDnmpO004048
	for rpath-common-commits@lists.rpath.com;
	Sat, 21 Jun 2008 09:49:48 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200806211349.m5LDnmpO004048@scc.eng.rpath.com>
Date: Sat, 21 Jun 2008 09:49:48 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Fix unused code
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Sat, 21 Jun 2008 13:49:49 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Fix unused code

diff -r a7f4fcec4030 -r 7eeb574215cf rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Sat Jun 21 09:29:29 2008 -0400
+++ b/rpath_common/proddef/api1.py	Sat Jun 21 09:49:37 2008 -0400
@@ -831,8 +831,6 @@
 
         # Factory sources defined in the product defintion take precedence
         fSources = self.getFactorySources()
-        if not fSources:
-            fSources = self.getPlatformFactorySources()
         for fsrc in fSources or []:
             nplat.addFactorySource(troveName = fsrc.troveName,
                                    label = fsrc.label)
@@ -862,8 +860,6 @@
         # on creation.
 
         sPaths = self.getSearchPaths()
-        if not sPaths:
-            sPaths = self.getPlatformSearchPaths()
         for sp in sPaths or []:
             key = (sp.troveName, sp.label)
             if key not in sPathsSet:
@@ -888,7 +884,6 @@
         nplat = self.toPlatformDefinition()
         nplat.loadFromRepository(client, label)
         nplat.snapshotVersions(client)
-        # XXX here we have to determine the real versions
         self._rebase(label, nplat, useLatest = None)
 
     def _rebase(self, label, nplat, useLatest = None):

From misa@rpath.com Sat Jun 21 14:03:03 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5LE332a032302 for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 14:03:03 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5LE32tb011686
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 10:03:02 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5LE32Ar013794
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 10:03:02 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5LE32U9004805
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 21 Jun 2008 10:03:02 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5LE31ka004787
	for rpath-common-commits@lists.rpath.com;
	Sat, 21 Jun 2008 10:03:02 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200806211403.m5LE31ka004787@scc.eng.rpath.com>
Date: Sat, 21 Jun 2008 10:03:01 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: When label is missing, fail on rebase
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Sat, 21 Jun 2008 14:03:03 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

When label is missing, fail on rebase

diff -r 7eeb574215cf -r ceac41fe54a1 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Sat Jun 21 09:49:37 2008 -0400
+++ b/rpath_common/proddef/api1.py	Sat Jun 21 10:02:33 2008 -0400
@@ -26,6 +26,7 @@
             'ProductDefinitionTroveNotFound',
             'ProductDefinitionFileNotFound',
             'RepositoryError',
+            'PlatformLabelMissingError'
             ]
 
 import itertools
@@ -67,6 +68,9 @@
 
 class RepositoryError(ProductDefinitionError):
     "Generic error raised when a repository error was caught"
+
+class PlatformLabelMissingError(ProductDefinitionError):
+    "Raised when the platform label is missing, and a rebase was requested"
 
 #}
 
@@ -880,7 +884,7 @@
         if label is None:
             label = self.getPlatformSourceLabel()
         if label is None:
-            raise Exception("XXX")
+            raise PlatformLabelMissingError()
         nplat = self.toPlatformDefinition()
         nplat.loadFromRepository(client, label)
         nplat.snapshotVersions(client)

From misa@rpath.com Mon Jun 23 15:20:56 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5NFKuh8031902 for <rpath-common-commits@lists.rpath.com>;
	Mon, 23 Jun 2008 15:20:56 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5NFKt14015483
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 23 Jun 2008 11:20:56 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5NFKtIu009290
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 23 Jun 2008 11:20:55 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5NFKtRQ020963
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 23 Jun 2008 11:20:55 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5NFKtvw020958
	for rpath-common-commits@lists.rpath.com;
	Mon, 23 Jun 2008 11:20:55 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200806231520.m5NFKtvw020958@scc.eng.rpath.com>
Date: Mon, 23 Jun 2008 11:20:55 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Renamed sourceLabel to sourceTrove
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 23 Jun 2008 15:20:56 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Renamed sourceLabel to sourceTrove

diff -r ceac41fe54a1 -r e3a5c9629556 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Sat Jun 21 10:02:33 2008 -0400
+++ b/rpath_common/proddef/api1.py	Mon Jun 23 11:20:31 2008 -0400
@@ -734,14 +734,14 @@
         self._ensurePlatformExists()
         self.platform.baseFlavor = baseFlavor
 
-    def getPlatformSourceLabel(self):
+    def getPlatformSourceTrove(self):
         if self.platform is None:
             return None
-        return self.platform.sourceLabel
+        return self.platform.sourceTrove
 
-    def setPlatformSourceLabel(self, sourceLabel):
+    def setPlatformSourceTrove(self, sourceTrove):
         self._ensurePlatformExists()
-        self.platform.sourceLabel = sourceLabel
+        self.platform.sourceTrove = sourceTrove
 
     def getPlatformUseLatest(self):
         if self.platform is None:
@@ -882,7 +882,7 @@
 
     def rebase(self, client, label = None, useLatest = None):
         if label is None:
-            label = self.getPlatformSourceLabel()
+            label = self.getPlatformSourceTrove()
         if label is None:
             raise PlatformLabelMissingError()
         nplat = self.toPlatformDefinition()
@@ -895,7 +895,7 @@
         self.platform = PlatformDefinition()
         # Fill it in with fields from the upstream one
         self.setPlatformBaseFlavor(nplat.getBaseFlavor())
-        self.setPlatformSourceLabel(label)
+        self.setPlatformSourceTrove(label)
         self.setPlatformUseLatest(useLatest)
         for sp in nplat.getSearchPaths():
             self.addPlatformSearchPath(troveName=sp.troveName,
@@ -952,7 +952,7 @@
         self.factorySources = _FactorySources()
         self.baseFlavor = None
         self.useLatest = None
-        self.sourceLabel = None
+        self.sourceTrove = None
 
     def parseStream(self, stream, validate = False, schemaDir = None):
         """
@@ -970,7 +970,7 @@
         xmlObj = binder.parseFile(stream, validate = validate,
                                   schemaDir = schemaDir or self.schemaDir)
         self.baseFlavor = getattr(xmlObj.platform, 'baseFlavor', None)
-        self.sourceLabel = getattr(xmlObj.platform, 'sourceLabel', None)
+        self.sourceTrove = getattr(xmlObj.platform, 'sourceTrove', None)
         self.useLatest = getattr(xmlObj.platform, 'useLatest', None)
         self.searchPaths = getattr(xmlObj.platform, 'searchPaths', None)
         self.factorySources = getattr(xmlObj.platform, 'factorySources', None)
@@ -1193,7 +1193,7 @@
 
     def _addPlatform(self, node):
         self.platform = PlatformDefinition()
-        self.platform.sourceLabel = node.getAttribute('sourceLabel')
+        self.platform.sourceTrove = node.getAttribute('sourceTrove')
         useLatest = node.getAttribute('useLatest')
         if useLatest is not None:
             useLatest = xmllib.BooleanNode.fromString(useLatest)
@@ -1334,8 +1334,8 @@
     def __init__(self, attrs, namespaces, platform, name='platform'):
         if platform.useLatest:
             attrs['useLatest'] = True
-        if platform.sourceLabel:
-            attrs['sourceLabel'] = platform.sourceLabel
+        if platform.sourceTrove:
+            attrs['sourceTrove'] = platform.sourceTrove
         self.searchPaths = platform.searchPaths
         self.factorySources = platform.factorySources
         self.baseFlavor = xmllib.StringNode(name = 'baseFlavor').characters(platform.baseFlavor)

From misa@rpath.com Mon Jun 23 18:23:13 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5NINDPH004379 for <rpath-common-commits@lists.rpath.com>;
	Mon, 23 Jun 2008 18:23:13 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5NINDD6008307
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 23 Jun 2008 14:23:13 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5NINDMe023538
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 23 Jun 2008 14:23:13 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5NINClO025727
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 23 Jun 2008 14:23:12 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5NINCpF025709
	for rpath-common-commits@lists.rpath.com;
	Mon, 23 Jun 2008 14:23:12 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200806231823.m5NINCpF025709@scc.eng.rpath.com>
Date: Mon, 23 Jun 2008 14:23:12 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Include the trove name in the platform's
	source trove attribute
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 23 Jun 2008 18:23:13 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Include the trove name in the platform's source trove attribute

diff -r e3a5c9629556 -r 02c59f09faa0 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Mon Jun 23 11:20:31 2008 -0400
+++ b/rpath_common/proddef/api1.py	Mon Jun 23 14:07:46 2008 -0400
@@ -35,7 +35,7 @@
 from conary import changelog
 from conary import errors as conaryErrors
 from conary import versions as conaryVersions
-from conary.conaryclient import filetypes
+from conary.conaryclient import filetypes, cmdline
 
 from rpath_common.xmllib import api1 as xmllib
 from rpath_common.proddef import _xmlConstants
@@ -882,7 +882,12 @@
 
     def rebase(self, client, label = None, useLatest = None):
         if label is None:
-            label = self.getPlatformSourceTrove()
+            troveSpec = self.getPlatformSourceTrove()
+            if troveSpec:
+                tn, tv, tf = cmdline.parseTroveSpec(troveSpec)
+                label = tv
+            else:
+                label = None
         if label is None:
             raise PlatformLabelMissingError()
         nplat = self.toPlatformDefinition()
@@ -895,7 +900,7 @@
         self.platform = PlatformDefinition()
         # Fill it in with fields from the upstream one
         self.setPlatformBaseFlavor(nplat.getBaseFlavor())
-        self.setPlatformSourceTrove(label)
+        self.setPlatformSourceTrove("%s=%s" % (nplat._troveName, label))
         self.setPlatformUseLatest(useLatest)
         for sp in nplat.getSearchPaths():
             self.addPlatformSearchPath(troveName=sp.troveName,

From misa@rpath.com Mon Jun 23 18:23:14 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5NINEdU004382 for <rpath-common-commits@lists.rpath.com>;
	Mon, 23 Jun 2008 18:23:14 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5NINEwp008311
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 23 Jun 2008 14:23:14 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5NINEAJ023541
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 23 Jun 2008 14:23:14 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5NINDj3025754
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 23 Jun 2008 14:23:13 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5NINDBI025749
	for rpath-common-commits@lists.rpath.com;
	Mon, 23 Jun 2008 14:23:13 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200806231823.m5NINDBI025749@scc.eng.rpath.com>
Date: Mon, 23 Jun 2008 14:23:13 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Renaming schema to 1.1
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 23 Jun 2008 18:23:15 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/_xmlConstants.py rpath_common/proddef/api1.py xsd/Makefile xsd/rpd-0.1.xsd xsd/rpd-1.0.xsd xsd/rpd-1.1.xsd

Renaming schema to 1.1

diff -r 02c59f09faa0 -r b721e441cc73 rpath_common/proddef/_xmlConstants.py
--- a/rpath_common/proddef/_xmlConstants.py	Mon Jun 23 14:07:46 2008 -0400
+++ b/rpath_common/proddef/_xmlConstants.py	Mon Jun 23 14:23:06 2008 -0400
@@ -23,6 +23,6 @@
 @type xmlSchemaLocaltion: C{str}
 """
 
-defaultNamespaceList = [ "http://www.rpath.com/permanent/rpd-0.1.xsd" ]
+defaultNamespaceList = [ "http://www.rpath.com/permanent/rpd-1.1.xsd" ]
 xmlSchemaNamespace = "http://www.w3.org/2001/XMLSchema-instance"
-xmlSchemaLocation = "http://www.rpath.com/permanent/rpd-0.1.xsd rpd-0.1.xsd"
+xmlSchemaLocation = "http://www.rpath.com/permanent/rpd-1.1.xsd rpd-1.1.xsd"
diff -r 02c59f09faa0 -r b721e441cc73 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Mon Jun 23 14:07:46 2008 -0400
+++ b/rpath_common/proddef/api1.py	Mon Jun 23 14:23:06 2008 -0400
@@ -75,7 +75,7 @@
 #}
 
 class BaseDefinition(object):
-    version = '0.1'
+    version = '1.1'
     defaultNamespace = _xmlConstants.defaultNamespaceList[0]
     xmlSchemaLocation = _xmlConstants.xmlSchemaLocation
 
@@ -180,7 +180,7 @@
 
 
     def _saveToRepository(self, conaryClient, label, message = None):
-        version = '0.1'
+        version = '1.1'
 
         if message is None:
             message = "Automatic checkin\n"
diff -r 02c59f09faa0 -r b721e441cc73 xsd/Makefile
--- a/xsd/Makefile	Mon Jun 23 14:07:46 2008 -0400
+++ b/xsd/Makefile	Mon Jun 23 14:23:06 2008 -0400
@@ -12,12 +12,13 @@
 # full details.
 #
 
-dist_files = Makefile rpd-0.1.xsd
+dist_files = Makefile $(SCHEMA_FILES)
+SCHEMA_FILES = rpd-1.0.xsd rpd-1.1.xsd
 
 all: default-all
 
 install: all default-install $(DESTDIR)$(datadir)/rpath_common
-	install rpd-0.1.xsd $(DESTDIR)$(datadir)/rpath_common/rpd-0.1.xsd
+	install $(SCHEMA_FILES) $(DESTDIR)$(datadir)/rpath_common/
 
 $(DESTDIR)$(datadir)/rpath_common:
 	install -d -m755 $@
diff -r 02c59f09faa0 -r b721e441cc73 xsd/rpd-0.1.xsd
--- a/xsd/rpd-0.1.xsd	Mon Jun 23 14:07:46 2008 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,277 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema targetNamespace="http://www.rpath.com/permanent/rpd-0.1.xsd"
-        elementFormDefault="qualified"
-        attributeFormDefault="unqualified"
-        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-        xmlns:rpd="http://www.rpath.com/permanent/rpd-0.1.xsd"
-        xmlns="http://www.rpath.com/permanent/rpd-0.1.xsd">
-
-    <xsd:attributeGroup name="common">
-       <xsd:attribute name="name" type="xsd:string" />
-       <xsd:attribute name="autoResolve" type="xsd:boolean" />
-       <xsd:attribute name="baseFileName" type="xsd:string" />
-       <xsd:attribute name="installLabelPath" type="xsd:string" />
-    </xsd:attributeGroup>
-
-    <xsd:attributeGroup name="specialIsoTroves">
-        <xsd:attribute name="mediaTemplateTrove" type="rpd:troveSpecType" />
-        <xsd:attribute name="anacondaCustomTrove" type="rpd:troveSpecType" />
-        <xsd:attribute name="anacondaTemplatesTrove" type="rpd:troveSpecType" />
-    </xsd:attributeGroup>
-
-    <xsd:simpleType name="troveSpecType">
-        <xsd:restriction base="xsd:string"></xsd:restriction>
-        <!-- TODO: make a proper xsd:restriction here to validate troveSpecs -->
-    </xsd:simpleType>
-
-    <xsd:simpleType name="flavorStringType">
-        <xsd:restriction base="xsd:string">
-            <!-- TODO: make a proper xsd:restriction here to validate flavor xsd:strings -->
-            <!-- this regexp comes from conary.deps.deps.flavorRegexpStr, and it barfs inside of Eclipse (sgp) -->
-            <!-- <pattern value="^(use:)? *(?:((?:!|~!)?(?:~?!?(?:[0-9A-Za-z_-]+))(?:\\.(?:[0-9A-Za-z_-]+))? *(?:, *(?:!|~!)?(?:~?!?(?:[0-9A-Za-z_-]+))(?:\\.(?:[0-9A-Za-z_-]+))?)*)?)? *(?:(is:) *(?: *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?(?:((?:  * *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?)*))?))? *(?:(target:) *(?: *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?(?:((?:  * *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?)*))?))?$" /> -->
-        </xsd:restriction>
-    </xsd:simpleType>
-
-    <xsd:complexType name="stageType">
-        <xsd:attribute name="name" type="xsd:string" use="required" />
-        <xsd:attribute name="labelSuffix" type="xsd:string" use="required" />
-    </xsd:complexType>
-
-    <xsd:complexType name="stageListType">
-        <xsd:sequence>
-            <xsd:element name="stage" type="stageType" minOccurs="1" maxOccurs="unbounded" />
-        </xsd:sequence>
-    </xsd:complexType>
-
-    <xsd:complexType name="searchPathType">
-        <xsd:attribute name="troveName" type="xsd:string" />
-        <xsd:attribute name="label" type="xsd:string" />
-        <xsd:attribute name="version" type="xsd:string" />
-    </xsd:complexType>
-
-    <xsd:complexType name="searchPathListType">
-        <xsd:sequence>
-            <xsd:element name="searchPath" type="searchPathType" minOccurs="1" maxOccurs="unbounded" />
-        </xsd:sequence>
-    </xsd:complexType>
-
-    <xsd:complexType name="factorySourceListType">
-        <xsd:sequence>
-            <xsd:element name="factorySource" type="searchPathType" minOccurs="1" maxOccurs="unbounded" />
-        </xsd:sequence>
-    </xsd:complexType>
-
-
-    <xsd:complexType name="amiImageType">
-        <xsd:attributeGroup ref="common" />
-        <xsd:attribute name="amiHugeDiskMountpoint" type="xsd:string" />
-        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
-    </xsd:complexType>
-
-    <xsd:complexType name="applianceIsoImageType">
-        <xsd:attributeGroup ref="common" />
-        <xsd:attribute name="maxIsoSize" type="xsd:positiveInteger" />
-        <xsd:attribute name="bugsUrl" type="xsd:string" />
-        <xsd:attribute name="showMediaCheck" type="xsd:boolean" />
-        <xsd:attribute name="betaNag" type="xsd:boolean" />
-        <xsd:attributeGroup ref="specialIsoTroves" />
-    </xsd:complexType>
-
-    <xsd:complexType name="installableIsoImageType">
-        <xsd:attributeGroup ref="common" />
-        <xsd:attribute name="maxIsoSize" type="xsd:positiveInteger" />
-        <xsd:attribute name="bugsUrl" type="xsd:string" />
-        <xsd:attribute name="showMediaCheck" type="xsd:boolean" />
-        <xsd:attribute name="betaNag" type="xsd:boolean" />
-        <xsd:attributeGroup ref="specialIsoTroves" />
-    </xsd:complexType>
-
-    <xsd:complexType name="liveIsoImageType">
-        <xsd:attributeGroup ref="common" />
-        <xsd:attribute name="unionfs" type="xsd:boolean" />
-        <xsd:attribute name="zisofs" type="xsd:boolean" />
-    </xsd:complexType>
-
-    <xsd:complexType name="netbootImageType">
-        <xsd:attributeGroup ref="common" />
-    </xsd:complexType>
-
-    <xsd:complexType name="rawFsImageType">
-        <xsd:attributeGroup ref="common" />
-        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
-        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
-    </xsd:complexType>
-
-    <xsd:complexType name="rawHdImageType">
-        <xsd:attributeGroup ref="common" />
-        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
-        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
-    </xsd:complexType>
-
-    <xsd:complexType name="tarballImageType">
-        <xsd:attributeGroup ref="common" />
-        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
-    </xsd:complexType>
-
-    <xsd:complexType name="updateIsoImageType">
-        <xsd:attribute name="baseFileName" type="xsd:string" />
-        <xsd:attribute name="mediaTemplateTrove" type="xsd:string" />
-    </xsd:complexType>
-
-    <xsd:complexType name="vhdImageType">
-        <xsd:attributeGroup ref="common" />
-        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
-        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
-        <xsd:attribute name="vhdDiskType">
-            <xsd:simpleType>
-                <xsd:restriction base="xsd:string">
-                    <xsd:enumeration value="fixed" />
-                    <xsd:enumeration value="dynamic" />
-                    <xsd:enumeration value="difference" />
-                </xsd:restriction>
-            </xsd:simpleType>
-        </xsd:attribute>
-    </xsd:complexType>
-
-    <xsd:complexType name="virtualIronImageType">
-        <xsd:attributeGroup ref="common" />
-        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
-        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
-        <xsd:attribute name="vhdDiskType">
-            <xsd:simpleType>
-                <xsd:restriction base="xsd:string">
-                    <xsd:enumeration value="fixed" />
-                    <xsd:enumeration value="dynamic" />
-                    <xsd:enumeration value="difference" />
-                </xsd:restriction>
-            </xsd:simpleType>
-        </xsd:attribute>
-    </xsd:complexType>
-
-    <xsd:complexType name="vmwareEsxImageType">
-        <xsd:attributeGroup ref="common" />
-        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
-        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
-        <xsd:attribute name="natNetworking" type="xsd:boolean" />
-        <xsd:attribute name="vmMemory" type="xsd:nonNegativeInteger" />
-    </xsd:complexType>
-
-    <xsd:complexType name="vmwareImageType">
-        <xsd:attributeGroup ref="common" />
-        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
-        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
-        <xsd:attribute name="natNetworking" type="xsd:boolean" />
-            <xsd:attribute name="diskAdapter">
-                <xsd:simpleType>
-                    <xsd:restriction base="xsd:string">
-                        <xsd:enumeration value="ide" />
-                        <xsd:enumeration value="lsilogic" />
-                    </xsd:restriction>
-                </xsd:simpleType>
-            </xsd:attribute>
-        <xsd:attribute name="vmSnapshots" type="xsd:boolean" />
-        <xsd:attribute name="vmMemory" type="xsd:nonNegativeInteger" />
-    </xsd:complexType>
-
-    <xsd:complexType name="xenOvaImageType">
-        <xsd:attributeGroup ref="common" />
-        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
-        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
-        <xsd:attribute name="vmMemory" type="xsd:nonNegativeInteger" />
-    </xsd:complexType>
-
-    <xsd:complexType name="buildDefinitionType">
-        <xsd:sequence>
-            <xsd:element name="build" type="rpd:buildType" minOccurs="1" maxOccurs="unbounded" />
-        </xsd:sequence>
-    </xsd:complexType>
-
-    <xsd:complexType name="buildType">
-        <xsd:sequence>
-            <xsd:choice>
-                <xsd:element name="amiImage" type="rpd:amiImageType" />
-                <xsd:element name="applianceIsoImage" type="rpd:applianceIsoImageType" />
-                <xsd:element name="installableIsoImage" type="rpd:installableIsoImageType" />
-                <xsd:element name="liveIsoImage" type="rpd:liveIsoImageType" />
-                <xsd:element name="netbootImage" type="rpd:netbootImageType" />
-                <xsd:element name="rawFsImage" type="rpd:rawFsImageType" />
-                <xsd:element name="rawHdImage" type="rpd:rawHdImageType" />
-                <xsd:element name="tarballImage" type="rpd:tarballImageType" />
-                <xsd:element name="updateIsoImage" type="rpd:updateIsoImageType" />
-                <xsd:element name="vhdImage" type="rpd:vhdImageType" />
-                <xsd:element name="virtualIronImage" type="rpd:virtualIronImageType" />
-                <xsd:element name="vmwareImage" type="rpd:vmwareImageType" />
-                <xsd:element name="vmwareEsxImage" type="rpd:vmwareEsxImageType" />
-                <xsd:element name="xenOvaImage" type="rpd:xenOvaImageType" />
-            </xsd:choice>
-            <xsd:element name="stage" minOccurs="0" maxOccurs="unbounded">
-                <xsd:complexType>
-                    <xsd:attribute name="ref" type="xsd:string" use="required"/>
-                </xsd:complexType>
-            </xsd:element>
-            <xsd:element name="imageGroup" type="rpd:troveSpecType" minOccurs="0" maxOccurs="1" />
-        </xsd:sequence>
-        <xsd:attribute name="name" type="xsd:string" use="required" />
-        <xsd:attribute name="baseFlavor" type="rpd:flavorStringType" />
-    </xsd:complexType>
-
-    <xsd:complexType name="platformDefinitionType">
-      <xsd:sequence>
-        <xsd:element name="baseFlavor" type="rpd:flavorStringType"
-        minOccurs="0" maxOccurs="1" />
-        <xsd:element name="searchPaths" type="rpd:searchPathListType"
-            minOccurs="0" maxOccurs="1" />
-        <xsd:element name="factorySources" type="rpd:factorySourceListType"
-            minOccurs="0" maxOccurs="1" />
-      </xsd:sequence>
-      <xsd:attribute name="version" type="xsd:string" />
-    </xsd:complexType>
-
-    <xsd:complexType name="platformType">
-      <xsd:sequence>
-        <xsd:element name="baseFlavor" type="rpd:flavorStringType"
-        minOccurs="0" maxOccurs="1" />
-        <xsd:element name="searchPaths" type="rpd:searchPathListType"
-            minOccurs="0" maxOccurs="1" />
-        <xsd:element name="factorySources" type="rpd:factorySourceListType"
-            minOccurs="0" maxOccurs="1" />
-      </xsd:sequence>
-      <!-- Source of this platform. Will get filled in to a name-version trove
-      spec when the product definition is saved -->
-      <xsd:attribute name="source" type="xsd:string" />
-      <!-- If useLatest is "true", the upstream platform is copied verbatim
-      here, with no settling to a specific version. This essentially is a
-      cache of the upstream platform.
-      -->
-      <xsd:attribute name="useLatest" type="xsd:boolean" />
-    </xsd:complexType>
-
-
-    <!-- First top-level element we allow -->
-    <xsd:element name="productDefinition">
-        <xsd:complexType>
-            <xsd:sequence>
-                <xsd:element name="productName" type="xsd:string" />
-                <xsd:element name="productShortname" type="xsd:string" />
-                <xsd:element name="productDescription" type="xsd:string" />
-                <xsd:element name="productVersion" type="xsd:string" />
-                <xsd:element name="productVersionDescription" type="xsd:string" />
-                <xsd:element name="conaryRepositoryHostname" type="xsd:string" />
-                <xsd:element name="conaryNamespace" type="xsd:string" />
-                <xsd:element name="imageGroup" type="rpd:troveSpecType" />
-                <xsd:element name="baseFlavor" type="rpd:flavorStringType" minOccurs="0" maxOccurs="1" />
-                <xsd:element name="stages" type="rpd:stageListType" />
-                <xsd:element name="searchPaths" type="rpd:searchPathListType" minOccurs="0" maxOccurs="1" />
-                <xsd:element name="factorySources" type="rpd:factorySourceListType" minOccurs="0" maxOccurs="1" />
-                <xsd:element name="buildDefinition" type="rpd:buildDefinitionType" />
-                <xsd:element name="platform" type="rpd:platformType" minOccurs="0" maxOccurs="1" />
-            </xsd:sequence>
-            <xsd:attribute name="version" type="xsd:string" />
-        </xsd:complexType>
-    </xsd:element>
-
-    <!-- Second top-level element we allow (although we do allow this as part
-    of a product definition -->
-    <xsd:element name="platformDefinition" type="rpd:platformDefinitionType" />
-
-</xsd:schema>
diff -r 02c59f09faa0 -r b721e441cc73 xsd/rpd-1.0.xsd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/xsd/rpd-1.0.xsd	Mon Jun 23 14:23:06 2008 -0400
@@ -0,0 +1,238 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema targetNamespace="http://www.rpath.com/permanent/rpd-1.0.xsd"
+        elementFormDefault="qualified"
+        attributeFormDefault="unqualified"
+        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+        xmlns:rpd="http://www.rpath.com/permanent/rpd-1.0.xsd"
+        xmlns="http://www.rpath.com/permanent/rpd-1.0.xsd">
+
+    <xsd:attributeGroup name="common">
+       <xsd:attribute name="name" type="xsd:string" />
+       <xsd:attribute name="autoResolve" type="xsd:boolean" />
+       <xsd:attribute name="baseFileName" type="xsd:string" />
+       <xsd:attribute name="installLabelPath" type="xsd:string" />
+    </xsd:attributeGroup>
+
+    <xsd:attributeGroup name="specialIsoTroves">
+        <xsd:attribute name="mediaTemplateTrove" type="rpd:troveSpecType" />
+        <xsd:attribute name="anacondaCustomTrove" type="rpd:troveSpecType" />
+        <xsd:attribute name="anacondaTemplatesTrove" type="rpd:troveSpecType" />
+    </xsd:attributeGroup>
+
+    <xsd:simpleType name="troveSpecType">
+        <xsd:restriction base="xsd:string"></xsd:restriction>
+        <!-- TODO: make a proper xsd:restriction here to validate troveSpecs -->
+    </xsd:simpleType>
+
+    <xsd:simpleType name="flavorStringType">
+        <xsd:restriction base="xsd:string">
+            <!-- TODO: make a proper xsd:restriction here to validate flavor xsd:strings -->
+            <!-- this regexp comes from conary.deps.deps.flavorRegexpStr, and it barfs inside of Eclipse (sgp) -->
+            <!-- <pattern value="^(use:)? *(?:((?:!|~!)?(?:~?!?(?:[0-9A-Za-z_-]+))(?:\\.(?:[0-9A-Za-z_-]+))? *(?:, *(?:!|~!)?(?:~?!?(?:[0-9A-Za-z_-]+))(?:\\.(?:[0-9A-Za-z_-]+))?)*)?)? *(?:(is:) *(?: *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?(?:((?:  * *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?)*))?))? *(?:(target:) *(?: *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?(?:((?:  * *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?)*))?))?$" /> -->
+        </xsd:restriction>
+    </xsd:simpleType>
+
+    <xsd:complexType name="stageType">
+        <xsd:attribute name="name" type="xsd:string" use="required" />
+        <xsd:attribute name="labelSuffix" type="xsd:string" use="required" />
+    </xsd:complexType>
+
+    <xsd:complexType name="stageListType">
+        <xsd:sequence>
+            <xsd:element name="stage" type="stageType" minOccurs="1" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="upstreamSourceType">
+        <xsd:attribute name="troveName" type="xsd:string" />
+        <xsd:attribute name="label" type="xsd:string" />
+    </xsd:complexType>
+
+    <xsd:complexType name="upstreamSourceListType">
+        <xsd:sequence>
+            <xsd:element name="upstreamSource" type="upstreamSourceType" minOccurs="1" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="factorySourceListType">
+        <xsd:sequence>
+            <xsd:element name="factorySource" type="upstreamSourceType" minOccurs="1" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+
+    <xsd:complexType name="amiImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="amiHugeDiskMountpoint" type="xsd:string" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="applianceIsoImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="maxIsoSize" type="xsd:positiveInteger" />
+        <xsd:attribute name="bugsUrl" type="xsd:string" />
+        <xsd:attribute name="showMediaCheck" type="xsd:boolean" />
+        <xsd:attribute name="betaNag" type="xsd:boolean" />
+        <xsd:attributeGroup ref="specialIsoTroves" />
+    </xsd:complexType>
+
+    <xsd:complexType name="installableIsoImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="maxIsoSize" type="xsd:positiveInteger" />
+        <xsd:attribute name="bugsUrl" type="xsd:string" />
+        <xsd:attribute name="showMediaCheck" type="xsd:boolean" />
+        <xsd:attribute name="betaNag" type="xsd:boolean" />
+        <xsd:attributeGroup ref="specialIsoTroves" />
+    </xsd:complexType>
+
+    <xsd:complexType name="liveIsoImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="unionfs" type="xsd:boolean" />
+        <xsd:attribute name="zisofs" type="xsd:boolean" />
+    </xsd:complexType>
+
+    <xsd:complexType name="netbootImageType">
+        <xsd:attributeGroup ref="common" />
+    </xsd:complexType>
+
+    <xsd:complexType name="rawFsImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="rawHdImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="tarballImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="updateIsoImageType">
+        <xsd:attribute name="baseFileName" type="xsd:string" />
+        <xsd:attribute name="mediaTemplateTrove" type="xsd:string" />
+    </xsd:complexType>
+
+    <xsd:complexType name="vhdImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="vhdDiskType">
+            <xsd:simpleType>
+                <xsd:restriction base="xsd:string">
+                    <xsd:enumeration value="fixed" />
+                    <xsd:enumeration value="dynamic" />
+                    <xsd:enumeration value="difference" />
+                </xsd:restriction>
+            </xsd:simpleType>
+        </xsd:attribute>
+    </xsd:complexType>
+
+    <xsd:complexType name="virtualIronImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="vhdDiskType">
+            <xsd:simpleType>
+                <xsd:restriction base="xsd:string">
+                    <xsd:enumeration value="fixed" />
+                    <xsd:enumeration value="dynamic" />
+                    <xsd:enumeration value="difference" />
+                </xsd:restriction>
+            </xsd:simpleType>
+        </xsd:attribute>
+    </xsd:complexType>
+
+    <xsd:complexType name="vmwareEsxImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="natNetworking" type="xsd:boolean" />
+        <xsd:attribute name="vmMemory" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="vmwareImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="natNetworking" type="xsd:boolean" />
+            <xsd:attribute name="diskAdapter">
+                <xsd:simpleType>
+                    <xsd:restriction base="xsd:string">
+                        <xsd:enumeration value="ide" />
+                        <xsd:enumeration value="lsilogic" />
+                    </xsd:restriction>
+                </xsd:simpleType>
+            </xsd:attribute>
+        <xsd:attribute name="vmSnapshots" type="xsd:boolean" />
+        <xsd:attribute name="vmMemory" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="xenOvaImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="vmMemory" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="buildDefinitionType">
+        <xsd:sequence>
+            <xsd:element name="build" type="rpd:buildType" minOccurs="1" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="buildType">
+        <xsd:sequence>
+            <xsd:choice>
+                <xsd:element name="amiImage" type="rpd:amiImageType" />
+                <xsd:element name="applianceIsoImage" type="rpd:applianceIsoImageType" />
+                <xsd:element name="installableIsoImage" type="rpd:installableIsoImageType" />
+                <xsd:element name="liveIsoImage" type="rpd:liveIsoImageType" />
+                <xsd:element name="netbootImage" type="rpd:netbootImageType" />
+                <xsd:element name="rawFsImage" type="rpd:rawFsImageType" />
+                <xsd:element name="rawHdImage" type="rpd:rawHdImageType" />
+                <xsd:element name="tarballImage" type="rpd:tarballImageType" />
+                <xsd:element name="updateIsoImage" type="rpd:updateIsoImageType" />
+                <xsd:element name="vhdImage" type="rpd:vhdImageType" />
+                <xsd:element name="virtualIronImage" type="rpd:virtualIronImageType" />
+                <xsd:element name="vmwareImage" type="rpd:vmwareImageType" />
+                <xsd:element name="vmwareEsxImage" type="rpd:vmwareEsxImageType" />
+                <xsd:element name="xenOvaImage" type="rpd:xenOvaImageType" />
+            </xsd:choice>
+            <xsd:element name="stage" minOccurs="0" maxOccurs="unbounded">
+                <xsd:complexType>
+                    <xsd:attribute name="ref" type="xsd:string" use="required"/>
+                </xsd:complexType>
+            </xsd:element>
+            <xsd:element name="imageGroup" type="rpd:troveSpecType" minOccurs="0" maxOccurs="1" />
+        </xsd:sequence>
+        <xsd:attribute name="name" type="xsd:string" use="required" />
+        <xsd:attribute name="baseFlavor" type="rpd:flavorStringType" />
+    </xsd:complexType>
+
+    <xsd:element name="productDefinition">
+        <xsd:complexType>
+            <xsd:sequence>
+                <xsd:element name="productName" type="xsd:string" />
+                <xsd:element name="productShortname" type="xsd:string" />
+                <xsd:element name="productDescription" type="xsd:string" />
+                <xsd:element name="productVersion" type="xsd:string" />
+                <xsd:element name="productVersionDescription" type="xsd:string" />
+                <xsd:element name="conaryRepositoryHostname" type="xsd:string" />
+                <xsd:element name="conaryNamespace" type="xsd:string" />
+                <xsd:element name="imageGroup" type="rpd:troveSpecType" />
+                <xsd:element name="baseFlavor" type="rpd:flavorStringType" />
+                <xsd:element name="stages" type="rpd:stageListType" />
+                <xsd:element name="upstreamSources" type="rpd:upstreamSourceListType" />
+                <xsd:element name="factorySources" type="rpd:factorySourceListType" minOccurs="0" maxOccurs="1" />
+                <xsd:element name="buildDefinition" type="rpd:buildDefinitionType" />
+            </xsd:sequence>
+            <xsd:attribute name="version" type="xsd:string" />
+        </xsd:complexType>
+    </xsd:element>
+
+</xsd:schema>
diff -r 02c59f09faa0 -r b721e441cc73 xsd/rpd-1.1.xsd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/xsd/rpd-1.1.xsd	Mon Jun 23 14:23:06 2008 -0400
@@ -0,0 +1,277 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema targetNamespace="http://www.rpath.com/permanent/rpd-1.1.xsd"
+        elementFormDefault="qualified"
+        attributeFormDefault="unqualified"
+        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+        xmlns:rpd="http://www.rpath.com/permanent/rpd-1.1.xsd"
+        xmlns="http://www.rpath.com/permanent/rpd-1.1.xsd">
+
+    <xsd:attributeGroup name="common">
+       <xsd:attribute name="name" type="xsd:string" />
+       <xsd:attribute name="autoResolve" type="xsd:boolean" />
+       <xsd:attribute name="baseFileName" type="xsd:string" />
+       <xsd:attribute name="installLabelPath" type="xsd:string" />
+    </xsd:attributeGroup>
+
+    <xsd:attributeGroup name="specialIsoTroves">
+        <xsd:attribute name="mediaTemplateTrove" type="rpd:troveSpecType" />
+        <xsd:attribute name="anacondaCustomTrove" type="rpd:troveSpecType" />
+        <xsd:attribute name="anacondaTemplatesTrove" type="rpd:troveSpecType" />
+    </xsd:attributeGroup>
+
+    <xsd:simpleType name="troveSpecType">
+        <xsd:restriction base="xsd:string"></xsd:restriction>
+        <!-- TODO: make a proper xsd:restriction here to validate troveSpecs -->
+    </xsd:simpleType>
+
+    <xsd:simpleType name="flavorStringType">
+        <xsd:restriction base="xsd:string">
+            <!-- TODO: make a proper xsd:restriction here to validate flavor xsd:strings -->
+            <!-- this regexp comes from conary.deps.deps.flavorRegexpStr, and it barfs inside of Eclipse (sgp) -->
+            <!-- <pattern value="^(use:)? *(?:((?:!|~!)?(?:~?!?(?:[0-9A-Za-z_-]+))(?:\\.(?:[0-9A-Za-z_-]+))? *(?:, *(?:!|~!)?(?:~?!?(?:[0-9A-Za-z_-]+))(?:\\.(?:[0-9A-Za-z_-]+))?)*)?)? *(?:(is:) *(?: *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?(?:((?:  * *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?)*))?))? *(?:(target:) *(?: *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?(?:((?:  * *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?)*))?))?$" /> -->
+        </xsd:restriction>
+    </xsd:simpleType>
+
+    <xsd:complexType name="stageType">
+        <xsd:attribute name="name" type="xsd:string" use="required" />
+        <xsd:attribute name="labelSuffix" type="xsd:string" use="required" />
+    </xsd:complexType>
+
+    <xsd:complexType name="stageListType">
+        <xsd:sequence>
+            <xsd:element name="stage" type="stageType" minOccurs="1" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="searchPathType">
+        <xsd:attribute name="troveName" type="xsd:string" />
+        <xsd:attribute name="label" type="xsd:string" />
+        <xsd:attribute name="version" type="xsd:string" />
+    </xsd:complexType>
+
+    <xsd:complexType name="searchPathListType">
+        <xsd:sequence>
+            <xsd:element name="searchPath" type="searchPathType" minOccurs="1" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="factorySourceListType">
+        <xsd:sequence>
+            <xsd:element name="factorySource" type="searchPathType" minOccurs="1" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+
+    <xsd:complexType name="amiImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="amiHugeDiskMountpoint" type="xsd:string" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="applianceIsoImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="maxIsoSize" type="xsd:positiveInteger" />
+        <xsd:attribute name="bugsUrl" type="xsd:string" />
+        <xsd:attribute name="showMediaCheck" type="xsd:boolean" />
+        <xsd:attribute name="betaNag" type="xsd:boolean" />
+        <xsd:attributeGroup ref="specialIsoTroves" />
+    </xsd:complexType>
+
+    <xsd:complexType name="installableIsoImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="maxIsoSize" type="xsd:positiveInteger" />
+        <xsd:attribute name="bugsUrl" type="xsd:string" />
+        <xsd:attribute name="showMediaCheck" type="xsd:boolean" />
+        <xsd:attribute name="betaNag" type="xsd:boolean" />
+        <xsd:attributeGroup ref="specialIsoTroves" />
+    </xsd:complexType>
+
+    <xsd:complexType name="liveIsoImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="unionfs" type="xsd:boolean" />
+        <xsd:attribute name="zisofs" type="xsd:boolean" />
+    </xsd:complexType>
+
+    <xsd:complexType name="netbootImageType">
+        <xsd:attributeGroup ref="common" />
+    </xsd:complexType>
+
+    <xsd:complexType name="rawFsImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="rawHdImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="tarballImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="updateIsoImageType">
+        <xsd:attribute name="baseFileName" type="xsd:string" />
+        <xsd:attribute name="mediaTemplateTrove" type="xsd:string" />
+    </xsd:complexType>
+
+    <xsd:complexType name="vhdImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="vhdDiskType">
+            <xsd:simpleType>
+                <xsd:restriction base="xsd:string">
+                    <xsd:enumeration value="fixed" />
+                    <xsd:enumeration value="dynamic" />
+                    <xsd:enumeration value="difference" />
+                </xsd:restriction>
+            </xsd:simpleType>
+        </xsd:attribute>
+    </xsd:complexType>
+
+    <xsd:complexType name="virtualIronImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="vhdDiskType">
+            <xsd:simpleType>
+                <xsd:restriction base="xsd:string">
+                    <xsd:enumeration value="fixed" />
+                    <xsd:enumeration value="dynamic" />
+                    <xsd:enumeration value="difference" />
+                </xsd:restriction>
+            </xsd:simpleType>
+        </xsd:attribute>
+    </xsd:complexType>
+
+    <xsd:complexType name="vmwareEsxImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="natNetworking" type="xsd:boolean" />
+        <xsd:attribute name="vmMemory" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="vmwareImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="natNetworking" type="xsd:boolean" />
+            <xsd:attribute name="diskAdapter">
+                <xsd:simpleType>
+                    <xsd:restriction base="xsd:string">
+                        <xsd:enumeration value="ide" />
+                        <xsd:enumeration value="lsilogic" />
+                    </xsd:restriction>
+                </xsd:simpleType>
+            </xsd:attribute>
+        <xsd:attribute name="vmSnapshots" type="xsd:boolean" />
+        <xsd:attribute name="vmMemory" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="xenOvaImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="vmMemory" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="buildDefinitionType">
+        <xsd:sequence>
+            <xsd:element name="build" type="rpd:buildType" minOccurs="1" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="buildType">
+        <xsd:sequence>
+            <xsd:choice>
+                <xsd:element name="amiImage" type="rpd:amiImageType" />
+                <xsd:element name="applianceIsoImage" type="rpd:applianceIsoImageType" />
+                <xsd:element name="installableIsoImage" type="rpd:installableIsoImageType" />
+                <xsd:element name="liveIsoImage" type="rpd:liveIsoImageType" />
+                <xsd:element name="netbootImage" type="rpd:netbootImageType" />
+                <xsd:element name="rawFsImage" type="rpd:rawFsImageType" />
+                <xsd:element name="rawHdImage" type="rpd:rawHdImageType" />
+                <xsd:element name="tarballImage" type="rpd:tarballImageType" />
+                <xsd:element name="updateIsoImage" type="rpd:updateIsoImageType" />
+                <xsd:element name="vhdImage" type="rpd:vhdImageType" />
+                <xsd:element name="virtualIronImage" type="rpd:virtualIronImageType" />
+                <xsd:element name="vmwareImage" type="rpd:vmwareImageType" />
+                <xsd:element name="vmwareEsxImage" type="rpd:vmwareEsxImageType" />
+                <xsd:element name="xenOvaImage" type="rpd:xenOvaImageType" />
+            </xsd:choice>
+            <xsd:element name="stage" minOccurs="0" maxOccurs="unbounded">
+                <xsd:complexType>
+                    <xsd:attribute name="ref" type="xsd:string" use="required"/>
+                </xsd:complexType>
+            </xsd:element>
+            <xsd:element name="imageGroup" type="rpd:troveSpecType" minOccurs="0" maxOccurs="1" />
+        </xsd:sequence>
+        <xsd:attribute name="name" type="xsd:string" use="required" />
+        <xsd:attribute name="baseFlavor" type="rpd:flavorStringType" />
+    </xsd:complexType>
+
+    <xsd:complexType name="platformDefinitionType">
+      <xsd:sequence>
+        <xsd:element name="baseFlavor" type="rpd:flavorStringType"
+        minOccurs="0" maxOccurs="1" />
+        <xsd:element name="searchPaths" type="rpd:searchPathListType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="factorySources" type="rpd:factorySourceListType"
+            minOccurs="0" maxOccurs="1" />
+      </xsd:sequence>
+      <xsd:attribute name="version" type="xsd:string" />
+    </xsd:complexType>
+
+    <xsd:complexType name="platformType">
+      <xsd:sequence>
+        <xsd:element name="baseFlavor" type="rpd:flavorStringType"
+        minOccurs="0" maxOccurs="1" />
+        <xsd:element name="searchPaths" type="rpd:searchPathListType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="factorySources" type="rpd:factorySourceListType"
+            minOccurs="0" maxOccurs="1" />
+      </xsd:sequence>
+      <!-- Source of this platform. Will get filled in to a name-version trove
+      spec when the product definition is saved -->
+      <xsd:attribute name="source" type="xsd:string" />
+      <!-- If useLatest is "true", the upstream platform is copied verbatim
+      here, with no settling to a specific version. This essentially is a
+      cache of the upstream platform.
+      -->
+      <xsd:attribute name="useLatest" type="xsd:boolean" />
+    </xsd:complexType>
+
+
+    <!-- First top-level element we allow -->
+    <xsd:element name="productDefinition">
+        <xsd:complexType>
+            <xsd:sequence>
+                <xsd:element name="productName" type="xsd:string" />
+                <xsd:element name="productShortname" type="xsd:string" />
+                <xsd:element name="productDescription" type="xsd:string" />
+                <xsd:element name="productVersion" type="xsd:string" />
+                <xsd:element name="productVersionDescription" type="xsd:string" />
+                <xsd:element name="conaryRepositoryHostname" type="xsd:string" />
+                <xsd:element name="conaryNamespace" type="xsd:string" />
+                <xsd:element name="imageGroup" type="rpd:troveSpecType" />
+                <xsd:element name="baseFlavor" type="rpd:flavorStringType" minOccurs="0" maxOccurs="1" />
+                <xsd:element name="stages" type="rpd:stageListType" />
+                <xsd:element name="searchPaths" type="rpd:searchPathListType" minOccurs="0" maxOccurs="1" />
+                <xsd:element name="factorySources" type="rpd:factorySourceListType" minOccurs="0" maxOccurs="1" />
+                <xsd:element name="buildDefinition" type="rpd:buildDefinitionType" />
+                <xsd:element name="platform" type="rpd:platformType" minOccurs="0" maxOccurs="1" />
+            </xsd:sequence>
+            <xsd:attribute name="version" type="xsd:string" />
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- Second top-level element we allow (although we do allow this as part
+    of a product definition -->
+    <xsd:element name="platformDefinition" type="rpd:platformDefinitionType" />
+
+</xsd:schema>

From misa@rpath.com Mon Jun 23 20:02:16 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5NK2Glq006978 for <rpath-common-commits@lists.rpath.com>;
	Mon, 23 Jun 2008 20:02:16 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5NK2GkJ020382
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 23 Jun 2008 16:02:16 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5NK2FpX031092
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 23 Jun 2008 16:02:15 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5NK2FTL028208
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 23 Jun 2008 16:02:15 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5NK2Fal028203
	for rpath-common-commits@lists.rpath.com;
	Mon, 23 Jun 2008 16:02:15 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200806232002.m5NK2Fal028203@scc.eng.rpath.com>
Date: Mon, 23 Jun 2008 16:02:15 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Properly version sourceTrove
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 23 Jun 2008 20:02:16 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Properly version sourceTrove

diff -r b721e441cc73 -r 83fffa6b6757 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Mon Jun 23 14:23:06 2008 -0400
+++ b/rpath_common/proddef/api1.py	Mon Jun 23 16:00:53 2008 -0400
@@ -232,7 +232,7 @@
             # Fetch file from changeset
             fileSpecs = [ (fId, fVer) for (_, _, fId, fVer) in paths ]
             fileContents = repos.getFileContents(fileSpecs)
-            return fileContents[0].get()
+            return fileContents[0].get(), thawTrvCs.getNewNameVersionFlavor()
 
         # Couldn't find the file we expected; die
         raise ProductDefinitionFileNotFound("%s=%s" % (troveName, label))
@@ -387,7 +387,7 @@
         @raises C{ProductDefinitionFileNotFound}:
         """
         label = self.getProductDefinitionLabel()
-        stream = self._getStreamFromRepository(client, label)
+        stream, nvf = self._getStreamFromRepository(client, label)
         stream.seek(0)
         self.parseStream(stream)
 
@@ -900,7 +900,7 @@
         self.platform = PlatformDefinition()
         # Fill it in with fields from the upstream one
         self.setPlatformBaseFlavor(nplat.getBaseFlavor())
-        self.setPlatformSourceTrove("%s=%s" % (nplat._troveName, label))
+        self.setPlatformSourceTrove(nplat.sourceTrove)
         self.setPlatformUseLatest(useLatest)
         for sp in nplat.getSearchPaths():
             self.addPlatformSearchPath(troveName=sp.troveName,
@@ -1026,9 +1026,11 @@
         @raises C{ProductDefinitionTroveNotFound}:
         @raises C{ProductDefinitionFileNotFound}:
         """
-        stream = self._getStreamFromRepository(client, label)
+        stream, nvf = self._getStreamFromRepository(client, label)
         stream.seek(0)
         self.parseStream(stream)
+        # Set the source trove version we used
+        self.sourceTrove = "%s=%s" % (self._troveName, nvf[1])
 
     def snapshotVersions(self, conaryClient):
         """
@@ -1337,10 +1339,12 @@
 
 class _PlatformSerialization(xmllib.BaseNode):
     def __init__(self, attrs, namespaces, platform, name='platform'):
-        if platform.useLatest:
-            attrs['useLatest'] = True
-        if platform.sourceTrove:
-            attrs['sourceTrove'] = platform.sourceTrove
+        # Some attributes don't make sense for a productDefinition node
+        if name == 'platform':
+            if platform.useLatest:
+                attrs['useLatest'] = True
+            if platform.sourceTrove:
+                attrs['sourceTrove'] = platform.sourceTrove
         self.searchPaths = platform.searchPaths
         self.factorySources = platform.factorySources
         self.baseFlavor = xmllib.StringNode(name = 'baseFlavor').characters(platform.baseFlavor)

From misa@rpath.com Mon Jun 23 21:38:43 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5NLchcf009483 for <rpath-common-commits@lists.rpath.com>;
	Mon, 23 Jun 2008 21:38:43 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5NLcgUh032424
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 23 Jun 2008 17:38:43 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5NLcgk5006303
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 23 Jun 2008 17:38:42 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5NLcgFl030767
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 23 Jun 2008 17:38:42 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5NLcgZe030749
	for rpath-common-commits@lists.rpath.com;
	Mon, 23 Jun 2008 17:38:42 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200806232138.m5NLcgZe030749@scc.eng.rpath.com>
Date: Mon, 23 Jun 2008 17:38:42 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Proper class name for the platform
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 23 Jun 2008 21:38:43 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Proper class name for the platform

diff -r 83fffa6b6757 -r 5dc2bddd78b3 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Mon Jun 23 16:00:53 2008 -0400
+++ b/rpath_common/proddef/api1.py	Mon Jun 23 16:21:48 2008 -0400
@@ -939,7 +939,7 @@
 # Copyright (c) 2008 rPath, Inc.
 #
 
-class ProductDefinitionRecipe(PackageRecipe):
+class PlatformDefinitionRecipe(PackageRecipe):
     name = "@NAME@"
     version = "@VERSION@"
 

From misa@rpath.com Mon Jun 23 21:38:44 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5NLcih3009486 for <rpath-common-commits@lists.rpath.com>;
	Mon, 23 Jun 2008 21:38:44 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5NLcihY032427
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 23 Jun 2008 17:38:44 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5NLchiH006307
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 23 Jun 2008 17:38:43 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5NLchn1030795
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 23 Jun 2008 17:38:43 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5NLchLr030789
	for rpath-common-commits@lists.rpath.com;
	Mon, 23 Jun 2008 17:38:43 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200806232138.m5NLchLr030789@scc.eng.rpath.com>
Date: Mon, 23 Jun 2008 17:38:43 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Make the base flavor cumulative on top of the
	platform (RPCL-8)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 23 Jun 2008 21:38:44 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Make the base flavor cumulative on top of the platform (RPCL-8)

diff -r 5dc2bddd78b3 -r 063a1a426df6 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Mon Jun 23 16:21:48 2008 -0400
+++ b/rpath_common/proddef/api1.py	Mon Jun 23 17:38:34 2008 -0400
@@ -36,6 +36,7 @@
 from conary import errors as conaryErrors
 from conary import versions as conaryVersions
 from conary.conaryclient import filetypes, cmdline
+from conary.deps import deps as conaryDeps
 
 from rpath_common.xmllib import api1 as xmllib
 from rpath_common.proddef import _xmlConstants
@@ -516,9 +517,15 @@
         @return: the base flavor
         @rtype: C{str}
         """
+        flv = conaryDeps.parseFlavor('')
         if self.baseFlavor is not None:
-            return self.baseFlavor
-        return self.getPlatformBaseFlavor()
+            nflv = conaryDeps.parseFlavor(self.baseFlavor)
+            flv.union(nflv)
+        platFlv = self.getPlatformBaseFlavor()
+        if platFlv is not None:
+            nflv = conaryDeps.parseFlavor(platFlv)
+            flv.union(nflv)
+        return str(flv)
 
     def getStages(self):
         """

From johnsonm@rpath.com Tue Jun 24 18:26:39 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5OIQd8k003538 for <rpath-common-commits@lists.rpath.com>;
	Tue, 24 Jun 2008 18:26:39 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5OIQcJ5017495
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 24 Jun 2008 14:26:39 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5OIQc4h024755
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 24 Jun 2008 14:26:38 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5OIQcxS023289
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 24 Jun 2008 14:26:38 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5OIQchN023284
	for rpath-common-commits@lists.rpath.com;
	Tue, 24 Jun 2008 14:26:38 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200806241826.m5OIQchN023284@scc.eng.rpath.com>
Date: Tue, 24 Jun 2008 14:26:38 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: add epydoc documentation generartion
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 24 Jun 2008 18:26:39 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       .hgignore Makefile docs/config/epydoc rpath_common/xmllib/__init__.py scripts/generate_docs.sh

add epydoc documentation generartion

diff -r 0ed4a26feec0 -r 44b6fe098d66 .hgignore
--- a/.hgignore	Wed Jun 04 10:03:51 2008 -0400
+++ b/.hgignore	Tue Jun 24 14:26:26 2008 -0400
@@ -5,6 +5,7 @@
 .*\.o$
 .*\.so$
 ^tmp/
+docs/developer/.*
 rpath_common/xmllib/xmllib_constants.pyc?$
 ^pylint/reports/
 ^rpath-common-.*.tar.bz2
diff -r 0ed4a26feec0 -r 44b6fe098d66 Makefile
--- a/Makefile	Wed Jun 04 10:03:51 2008 -0400
+++ b/Makefile	Tue Jun 24 14:26:26 2008 -0400
@@ -13,6 +13,8 @@
 #
 
 all: default-subdirs default-all
+
+.PHONY: clean dist install html docs
 
 export TOPDIR = $(shell pwd)
 export DISTDIR = $(TOPDIR)/rpath-xmllib-$(VERSION)
@@ -42,6 +44,10 @@
 
 forcedist: archive
 
+doc: html
+html:
+	scripts/generate_docs.sh
+
 tag:
 	hg tag -f rpath-xmllib-$(VERSION)
 
diff -r 0ed4a26feec0 -r 44b6fe098d66 docs/config/epydoc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/config/epydoc	Tue Jun 24 14:26:26 2008 -0400
@@ -0,0 +1,11 @@
+[epydoc]
+
+name: rPath XML Library API Documentation
+
+parse: yes
+private: no
+sourcecode: yes
+introspect: yes
+
+output: html
+target: docs/developer
diff -r 0ed4a26feec0 -r 44b6fe098d66 rpath_common/xmllib/__init__.py
--- a/rpath_common/xmllib/__init__.py	Wed Jun 04 10:03:51 2008 -0400
+++ b/rpath_common/xmllib/__init__.py	Tue Jun 24 14:26:26 2008 -0400
@@ -25,7 +25,7 @@
 character are public interfaces.
 
 If the C{VERSION} starts with C{0.}, none of the included
-interfaces is stable and the may change without warning.
+interfaces is stable and they may change without warning.
 
 To use the latest version of the interface::
 
diff -r 0ed4a26feec0 -r 44b6fe098d66 scripts/generate_docs.sh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/generate_docs.sh	Tue Jun 24 14:26:26 2008 -0400
@@ -0,0 +1,2 @@
+#!/bin/sh -x
+epydoc --verbose --html --config docs/config/epydoc rpath_common/xmllib

From johnsonm@rpath.com Tue Jun 24 18:40:47 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5OIekMQ003894 for <rpath-common-commits@lists.rpath.com>;
	Tue, 24 Jun 2008 18:40:46 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5OIekpa019418
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 24 Jun 2008 14:40:46 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5OIekbA025917
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 24 Jun 2008 14:40:46 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5OIekAH023608
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 24 Jun 2008 14:40:46 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5OIejeg023603
	for rpath-common-commits@lists.rpath.com;
	Tue, 24 Jun 2008 14:40:45 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200806241840.m5OIejeg023603@scc.eng.rpath.com>
Date: Tue, 24 Jun 2008 14:40:45 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: add epydoc documentation generation
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 24 Jun 2008 18:40:47 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       .hgignore Makefile docs/config/epydoc rpath_common/proddef/__init__.py rpath_common/proddef/api1.py scripts/generate_docs.sh

add epydoc documentation generation

diff -r 063a1a426df6 -r 9074b2d4b381 .hgignore
--- a/.hgignore	Mon Jun 23 17:38:34 2008 -0400
+++ b/.hgignore	Tue Jun 24 14:40:43 2008 -0400
@@ -5,6 +5,7 @@
 .*\.o$
 .*\.so$
 ^tmp/
+docs/developer/.*
 rpath_common/proddef/proddef_constants.pyc?$
 rpath_common/xmllib
 ^pylint/reports/
diff -r 063a1a426df6 -r 9074b2d4b381 Makefile
--- a/Makefile	Mon Jun 23 17:38:34 2008 -0400
+++ b/Makefile	Tue Jun 24 14:40:43 2008 -0400
@@ -13,6 +13,8 @@
 #
 
 all: default-subdirs default-all
+
+.PHONY: clean dist install html docs
 
 export TOPDIR = $(shell pwd)
 export DISTDIR = $(TOPDIR)/rpath-product-definition-$(VERSION)
@@ -42,6 +44,10 @@
 
 forcedist: archive
 
+doc: html
+html: default-subdirs
+	scripts/generate_docs.sh
+
 tag:
 	hg tag -f product-definition-$(VERSION)
 
diff -r 063a1a426df6 -r 9074b2d4b381 docs/config/epydoc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/config/epydoc	Tue Jun 24 14:40:43 2008 -0400
@@ -0,0 +1,11 @@
+[epydoc]
+
+name: Product Definition Library API Documentation
+
+parse: yes
+private: no
+sourcecode: yes
+introspect: yes
+
+output: html
+target: docs/developer
diff -r 063a1a426df6 -r 9074b2d4b381 rpath_common/proddef/__init__.py
--- a/rpath_common/proddef/__init__.py	Mon Jun 23 17:38:34 2008 -0400
+++ b/rpath_common/proddef/__init__.py	Tue Jun 24 14:40:43 2008 -0400
@@ -27,9 +27,9 @@
 If the C{VERSION} starts with C{0.}, none of the included
 interfaces is stable and may change without warning.
 
-To use the latest version of the interface:
+To use the latest version of the interface::
     from rpath_common import proddef
-To use a specific API Version of the interface:
+To use a specific API Version of the interface::
     from rpath_common.proddef import api1 as proddef
 """
 
diff -r 063a1a426df6 -r 9074b2d4b381 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Mon Jun 23 17:38:34 2008 -0400
+++ b/rpath_common/proddef/api1.py	Tue Jun 24 14:40:43 2008 -0400
@@ -151,7 +151,7 @@
         """
         Add an search path.
         @param troveName: the trove name for the search path.
-        @type name: C{str} or C{None}
+        @type troveName: C{str} or C{None}
         @param label: Label for the search path
         @type label: C{str} or C{None}
         @param version: Version for the search path
@@ -163,7 +163,7 @@
         """
         Add a factory source.
         @param troveName: the trove name for the factory source.
-        @type name: C{str} or C{None}
+        @type troveName: C{str} or C{None}
         @param label: Label for the factory source
         @type label: C{str} or C{None}
         @param version: Version for the factory source
@@ -381,8 +381,6 @@
         C{setConaryNamespace}.
         @param client: A Conary client object
         @type client: C{conaryclient.ConaryClient}
-        @param message: An optional commit message
-        @type message: C{str}
         @raises C{RepositoryError}:
         @raises C{ProductDefinitionTroveNotFound}:
         @raises C{ProductDefinitionFileNotFound}:
@@ -686,7 +684,7 @@
         """
         Add an search path.
         @param troveName: the trove name for the search path.
-        @type name: C{str} or C{None}
+        @type troveName: C{str} or C{None}
         @param label: Label for the search path
         @type label: C{str} or C{None}
         @param version: Version for the search path
@@ -721,7 +719,7 @@
         """
         Add a factory source.
         @param troveName: the trove name for the factory source.
-        @type name: C{str} or C{None}
+        @type troveName: C{str} or C{None}
         @param label: Label for the factory source
         @type label: C{str} or C{None}
         @param version: Version for the factory source
@@ -1027,8 +1025,6 @@
         Load a C{PlatformDefinition} object from a Conary repository.
         @param client: A Conary client object
         @type client: C{conaryclient.ConaryClient}
-        @param message: An optional commit message
-        @type message: C{str}
         @raises C{RepositoryError}:
         @raises C{ProductDefinitionTroveNotFound}:
         @raises C{ProductDefinitionFileNotFound}:
diff -r 063a1a426df6 -r 9074b2d4b381 scripts/generate_docs.sh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/generate_docs.sh	Tue Jun 24 14:40:43 2008 -0400
@@ -0,0 +1,2 @@
+#!/bin/sh -x
+epydoc --verbose --html --config docs/config/epydoc rpath_common/proddef

From johnsonm@rpath.com Tue Jun 24 19:37:53 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5OJbqbV004887 for <rpath-common-commits@lists.rpath.com>;
	Tue, 24 Jun 2008 19:37:52 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5OJbqSm026353
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 24 Jun 2008 15:37:52 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5OJbqQm030188
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 24 Jun 2008 15:37:52 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5OJbqGv025056
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 24 Jun 2008 15:37:52 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5OJbp9J025051
	for rpath-common-commits@lists.rpath.com;
	Tue, 24 Jun 2008 15:37:51 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200806241937.m5OJbp9J025051@scc.eng.rpath.com>
Date: Tue, 24 Jun 2008 15:37:51 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: fix documentation of the constants declaration
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 24 Jun 2008 19:37:53 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       rpath_common/xmllib/xmllib_constants.py.in

fix documentation of the constants declaration

diff -r 44b6fe098d66 -r 3acce6817548 rpath_common/xmllib/xmllib_constants.py.in
--- a/rpath_common/xmllib/xmllib_constants.py.in	Tue Jun 24 14:26:26 2008 -0400
+++ b/rpath_common/xmllib/xmllib_constants.py.in	Tue Jun 24 15:37:49 2008 -0400
@@ -12,11 +12,11 @@
 # full details.
 #
 """
-The rPath Product Definition API Constants definition
+The rPath XML Library API Constants definition
 
 The module data elements in this module are a private interface,
 available through the rpath_common.proddef module.
-@var _VERSION: rBuild version
+@var _VERSION: rPath XML Library API version
 @type _VERSION: string
 """
 

From johnsonm@rpath.com Tue Jun 24 20:59:58 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5OKxwrA006733 for <rpath-common-commits@lists.rpath.com>;
	Tue, 24 Jun 2008 20:59:58 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5OKxvcC004408
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 24 Jun 2008 16:59:57 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5OKxve1003827
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 24 Jun 2008 16:59:57 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5OKxvag026562
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 24 Jun 2008 16:59:57 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5OKxvgi026557
	for rpath-common-commits@lists.rpath.com;
	Tue, 24 Jun 2008 16:59:57 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200806242059.m5OKxvgi026557@scc.eng.rpath.com>
Date: Tue, 24 Jun 2008 16:59:57 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: fix documentation of internal constants
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 24 Jun 2008 20:59:58 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       rpath_common/proddef/proddef_constants.py.in

fix documentation of internal constants

diff -r 9074b2d4b381 -r 75ffe68fd257 rpath_common/proddef/proddef_constants.py.in
--- a/rpath_common/proddef/proddef_constants.py.in	Tue Jun 24 14:40:43 2008 -0400
+++ b/rpath_common/proddef/proddef_constants.py.in	Tue Jun 24 16:59:53 2008 -0400
@@ -16,7 +16,7 @@
 
 The module data elements in this module are a private interface,
 available through the rpath_common.proddef module.
-@var _VERSION: rBuild version
+@var _VERSION: Product Definition version
 @type _VERSION: string
 """
 

From johnsonm@rpath.com Wed Jun 25 21:08:52 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5PL8qp9007037 for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 21:08:52 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5PL8qAH024511
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 17:08:52 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5PL8pHa004689
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 17:08:51 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5PL8pjx020441
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 17:08:51 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5PL8pok020436
	for rpath-common-commits@lists.rpath.com;
	Wed, 25 Jun 2008 17:08:51 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200806252108.m5PL8pok020436@scc.eng.rpath.com>
Date: Wed, 25 Jun 2008 17:08:51 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: include .hg_archival.txt in archives
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 25 Jun 2008 21:08:52 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       Makefile

include .hg_archival.txt in archives

diff -r 3acce6817548 -r fcbcfa14c497 Makefile
--- a/Makefile	Tue Jun 24 15:37:49 2008 -0400
+++ b/Makefile	Wed Jun 25 17:08:47 2008 -0400
@@ -40,7 +40,7 @@
 
 
 archive:
-	hg --config 'ui.archivemeta=False' archive --exclude .hgignore -t tbz2 $(DISTDIR).tar.bz2
+	hg archive --exclude .hgignore -t tbz2 $(DISTDIR).tar.bz2
 
 forcedist: archive
 

From johnsonm@rpath.com Wed Jun 25 21:09:36 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5PL9aah007044 for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 21:09:36 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5PL9ZHk024717
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 17:09:35 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5PL9ZQE004709
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 17:09:35 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5PL9Z5v020503
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 17:09:35 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5PL9ZV2020498
	for rpath-common-commits@lists.rpath.com;
	Wed, 25 Jun 2008 17:09:35 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200806252109.m5PL9ZV2020498@scc.eng.rpath.com>
Date: Wed, 25 Jun 2008 17:09:35 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: separate forcetag
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 25 Jun 2008 21:09:36 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       Makefile

separate forcetag

diff -r fcbcfa14c497 -r 841cbb0ace89 Makefile
--- a/Makefile	Wed Jun 25 17:08:47 2008 -0400
+++ b/Makefile	Wed Jun 25 17:09:31 2008 -0400
@@ -48,8 +48,10 @@
 html:
 	scripts/generate_docs.sh
 
+forcetag:
+	hg tag -f rpath-xmllib-$(VERSION)
 tag:
-	hg tag -f rpath-xmllib-$(VERSION)
+	hg tag rpath-xmllib-$(VERSION)
 
 clean: clean-subdirs default-clean
 	@rm -rf $(DISTDIR).tar.bz2

From johnsonm@rpath.com Wed Jun 25 21:17:37 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5PLHbTG007225 for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 21:17:37 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5PLHbea025495
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 17:17:37 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5PLHav9005180
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 17:17:36 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5PLHavV020886
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 17:17:36 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5PLHa0l020867
	for rpath-common-commits@lists.rpath.com;
	Wed, 25 Jun 2008 17:17:36 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200806252117.m5PLHa0l020867@scc.eng.rpath.com>
Date: Wed, 25 Jun 2008 17:17:36 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: include .hg_archival.txt in archives
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 25 Jun 2008 21:17:38 -0000

user:        Michael K. Johnson <http://issues.rpath.com/>
files:       Makefile

include .hg_archival.txt in archives

diff -r 75ffe68fd257 -r 76ea9737dad5 Makefile
--- a/Makefile	Tue Jun 24 16:59:53 2008 -0400
+++ b/Makefile	Wed Jun 25 17:17:08 2008 -0400
@@ -40,7 +40,7 @@
 
 
 archive:
-	hg --config 'ui.archivemeta=False' archive --exclude .hgignore -t tbz2 $(DISTDIR).tar.bz2
+	hg archive --exclude .hgignore -t tbz2 $(DISTDIR).tar.bz2
 
 forcedist: archive
 

From johnsonm@rpath.com Wed Jun 25 21:17:38 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5PLHcUm007228 for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 21:17:38 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5PLHbAj025496
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 17:17:37 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5PLHbQJ005184
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 17:17:37 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5PLHbX7020912
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 17:17:37 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5PLHalp020907
	for rpath-common-commits@lists.rpath.com;
	Wed, 25 Jun 2008 17:17:36 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200806252117.m5PLHalp020907@scc.eng.rpath.com>
Date: Wed, 25 Jun 2008 17:17:36 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: separate forcetag
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 25 Jun 2008 21:17:38 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       Makefile

separate forcetag

diff -r 76ea9737dad5 -r 57cf57c9600e Makefile
--- a/Makefile	Wed Jun 25 17:17:08 2008 -0400
+++ b/Makefile	Wed Jun 25 17:17:29 2008 -0400
@@ -48,8 +48,10 @@
 html: default-subdirs
 	scripts/generate_docs.sh
 
+forcetag:
+	hg tag -f product-definition-$(VERSION)
 tag:
-	hg tag -f product-definition-$(VERSION)
+	hg tag product-definition-$(VERSION)
 
 clean: clean-subdirs default-clean
 	@rm -rf $(DISTDIR).tar.bz2

From johnsonm@rpath.com Wed Jun 25 22:21:23 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5PMLNQv008772 for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 22:21:23 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5PMLNKP001116
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:21:23 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5PMLMvv009076
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:21:22 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5PMLMUw022494
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:21:22 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5PMLMJp022489
	for rpath-common-commits@lists.rpath.com;
	Wed, 25 Jun 2008 18:21:22 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200806252221.m5PMLMJp022489@scc.eng.rpath.com>
Date: Wed, 25 Jun 2008 18:21:22 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: Documentation edits preparing for 0.1 release
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 25 Jun 2008 22:21:23 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       NEWS README

Documentation edits preparing for 0.1 release

diff -r 841cbb0ace89 -r 3768adef74c7 NEWS
--- a/NEWS	Wed Jun 25 17:09:31 2008 -0400
+++ b/NEWS	Wed Jun 25 18:21:17 2008 -0400
@@ -1,3 +1,4 @@
-Changes in @NEW@:
+Changes in 0.1:
   o API Changes:
-    * xmldata.py moved into rpath_common module as xmllib
+    * xmldata.py moved from Conary into rpath_common module as xmllib,
+      and interface significantly changed.
diff -r 841cbb0ace89 -r 3768adef74c7 README
--- a/README	Wed Jun 25 17:09:31 2008 -0400
+++ b/README	Wed Jun 25 18:21:17 2008 -0400
@@ -9,5 +9,9 @@
 
 To use the latest version of the interface:
     from rpath_common import xmllib
-To use a specific API Version of the interface:
+To use a specific API version of the interface:
     from rpath_common.xmllib import api1 as xmllib
+
+API documentation is available at http://cvs.rpath.com/rpath-xmllib-docs/
+or by running "make html" and viewing docs/developer/index.html (requires
+epydoc).

From johnsonm@rpath.com Wed Jun 25 22:25:17 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5PMPHrN008898 for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 22:25:17 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5PMPHma001499
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:25:17 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5PMPGnb009348
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:25:16 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5PMPGdG022637
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:25:16 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5PMPGvs022632
	for rpath-common-commits@lists.rpath.com;
	Wed, 25 Jun 2008 18:25:16 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200806252225.m5PMPGvs022632@scc.eng.rpath.com>
Date: Wed, 25 Jun 2008 18:25:16 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: Added tag rpath-xmllib-0.1 for changeset
 3768adef74c7
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 25 Jun 2008 22:25:17 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       .hgtags

Added tag rpath-xmllib-0.1 for changeset 3768adef74c7

diff -r 3768adef74c7 -r 72e919dde779 .hgtags
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgtags	Wed Jun 25 18:25:09 2008 -0400
@@ -0,0 +1,1 @@
+3768adef74c75b945f89762704991dbb1a61ec71 rpath-xmllib-0.1

From johnsonm@rpath.com Wed Jun 25 22:32:19 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5PMWIF4009029 for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 22:32:18 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5PMWIOv002144
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:32:18 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5PMWIkJ009830
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:32:18 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5PMWH0L022920
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:32:17 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5PMWHFo022901
	for rpath-common-commits@lists.rpath.com;
	Wed, 25 Jun 2008 18:32:17 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200806252232.m5PMWHFo022901@scc.eng.rpath.com>
Date: Wed, 25 Jun 2008 18:32:17 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: there is a minor (and now irreversible)
	incompatibility between schema versions 1.0 and 1.1,
	so change the example at least...
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 25 Jun 2008 22:32:19 -0000

user:        Michael K. Johnson <http://issues.rpath.com/>
files:       README

there is a minor (and now irreversible) incompatibility between schema versions 1.0 and 1.1, so change the example at least...

diff -r 57cf57c9600e -r 95436f02871c README
--- a/README	Wed Jun 25 17:17:29 2008 -0400
+++ b/README	Wed Jun 25 18:29:34 2008 -0400
@@ -15,8 +15,8 @@
 The schema definitions are versioned with major and minor numbers.
 Within a major version, only new elements will be added; elements
 will not be removed and semantics will not be changed.  A document
-that validates against schema version 1.0 should validate without
-changes against schema version 1.1 or 1.2.  Incompatible schema
+that validates against schema version 2.0 should validate without
+changes against schema version 2.1 or 2.2.  Incompatible schema
 version changes will cause the major version to be incremented.
 The schema version is included in the filename: rpd-1.0.xsd
 implements version 1.0 of the schema.

From johnsonm@rpath.com Wed Jun 25 22:32:19 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5PMWJNH009032 for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 22:32:19 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5PMWJUY002147
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:32:19 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5PMWJ1M009834
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:32:19 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5PMWI4R022948
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:32:18 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5PMWIbW022934
	for rpath-common-commits@lists.rpath.com;
	Wed, 25 Jun 2008 18:32:18 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200806252232.m5PMWIbW022934@scc.eng.rpath.com>
Date: Wed, 25 Jun 2008 18:32:18 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: pointer to API docs
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 25 Jun 2008 22:32:20 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       README

pointer to API docs

diff -r 95436f02871c -r 3d7a37d92010 README
--- a/README	Wed Jun 25 18:29:34 2008 -0400
+++ b/README	Wed Jun 25 18:32:13 2008 -0400
@@ -19,4 +19,11 @@
 changes against schema version 2.1 or 2.2.  Incompatible schema
 version changes will cause the major version to be incremented.
 The schema version is included in the filename: rpd-1.0.xsd
-implements version 1.0 of the schema.
+implements version 1.0 of the schema.  (From schema version 1.0
+to 1.1 there is a slight incompatibility; the schema version
+rules will not be strictly enforced until the software version
+reaches 1.0.)
+
+API documentation is available at
+http://cvs.rpath.com/product-definition-docs/ or by running "make
+html" and viewing docs/developer/index.html (requires epydoc).

From johnsonm@rpath.com Wed Jun 25 22:36:18 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5PMaI5m009073 for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 22:36:18 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5PMaIk3002343
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:36:18 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5PMaHOm010079
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:36:17 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5PMaHmi023171
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:36:17 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5PMaHkA023166
	for rpath-common-commits@lists.rpath.com;
	Wed, 25 Jun 2008 18:36:17 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200806252236.m5PMaHkA023166@scc.eng.rpath.com>
Date: Wed, 25 Jun 2008 18:36:17 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: prepare 0.1 release
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 25 Jun 2008 22:36:19 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       NEWS

prepare 0.1 release

diff -r 3d7a37d92010 -r 4fb972278253 NEWS
--- a/NEWS	Wed Jun 25 18:32:13 2008 -0400
+++ b/NEWS	Wed Jun 25 18:36:10 2008 -0400
@@ -1,4 +1,4 @@
-Changes in @NEW@:
+Changes in 0.1:
   o API Changes:
     * proddef.py moved into rpath_common module.
     * More consistent API function and method naming: elem_dict

From johnsonm@rpath.com Wed Jun 25 22:37:49 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5PMbnrh009112 for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 22:37:49 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5PMbmrX002438
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:37:48 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5PMbmCG010129
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:37:48 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5PMbmF0023338
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:37:48 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5PMbmq3023324
	for rpath-common-commits@lists.rpath.com;
	Wed, 25 Jun 2008 18:37:48 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200806252237.m5PMbmq3023324@scc.eng.rpath.com>
Date: Wed, 25 Jun 2008 18:37:47 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Added tag product-definition-0.1 for
	changeset 4fb972278253
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 25 Jun 2008 22:37:49 -0000

user:        Michael K. Johnson <http://issues.rpath.com/>
files:       .hgtags

Added tag product-definition-0.1 for changeset 4fb972278253

diff -r 4fb972278253 -r 80ae36c30de3 .hgtags
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgtags	Wed Jun 25 18:36:23 2008 -0400
@@ -0,0 +1,1 @@
+4fb9722782532f27b55a8c6473c6c25a114d51bc product-definition-0.1

From johnsonm@rpath.com Wed Jun 25 22:37:50 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5PMboH8009115 for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 22:37:50 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5PMboMR002441
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:37:50 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5PMboCv010132
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:37:50 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5PMbnai023386
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:37:49 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5PMbnsP023364
	for rpath-common-commits@lists.rpath.com;
	Wed, 25 Jun 2008 18:37:49 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200806252237.m5PMbnsP023364@scc.eng.rpath.com>
Date: Wed, 25 Jun 2008 18:37:48 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: fix name of archive
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 25 Jun 2008 22:37:51 -0000

tag:         product-definition-0.1
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       Makefile

fix name of archive

diff -r 80ae36c30de3 -r 03ef2cdaacee Makefile
--- a/Makefile	Wed Jun 25 18:36:23 2008 -0400
+++ b/Makefile	Wed Jun 25 18:37:07 2008 -0400
@@ -17,7 +17,7 @@
 .PHONY: clean dist install html docs
 
 export TOPDIR = $(shell pwd)
-export DISTDIR = $(TOPDIR)/rpath-product-definition-$(VERSION)
+export DISTDIR = $(TOPDIR)/product-definition-$(VERSION)
 
 SUBDIRS=rpath_common xsd doc pylint
 

From johnsonm@rpath.com Wed Jun 25 22:37:51 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5PMboT2009116 for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 22:37:50 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5PMboi9002443
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:37:50 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5PMboLj010133
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:37:50 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5PMbouD023405
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:37:50 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5PMbnBi023399
	for rpath-common-commits@lists.rpath.com;
	Wed, 25 Jun 2008 18:37:50 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200806252237.m5PMbnBi023399@scc.eng.rpath.com>
Date: Wed, 25 Jun 2008 18:37:49 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Added tag product-definition-0.1 for
	changeset 03ef2cdaacee
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 25 Jun 2008 22:37:51 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       .hgtags

Added tag product-definition-0.1 for changeset 03ef2cdaacee

diff -r 03ef2cdaacee -r f8848d909d16 .hgtags
--- a/.hgtags	Wed Jun 25 18:37:07 2008 -0400
+++ b/.hgtags	Wed Jun 25 18:37:15 2008 -0400
@@ -1,1 +1,2 @@
 4fb9722782532f27b55a8c6473c6c25a114d51bc product-definition-0.1
+03ef2cdaaceedbd1df0402c65c5b77165df3c8cb product-definition-0.1

From johnsonm@rpath.com Wed Jun 25 22:47:54 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5PMlsG3009339 for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 22:47:54 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5PMls1B003336
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:47:54 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5PMlsqP010658
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:47:54 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5PMlrtX023684
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:47:53 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5PMlrJk023669
	for rpath-common-commits@lists.rpath.com;
	Wed, 25 Jun 2008 18:47:53 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200806252247.m5PMlrJk023669@scc.eng.rpath.com>
Date: Wed, 25 Jun 2008 18:47:53 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-common: prepare for 0.1 release
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 25 Jun 2008 22:47:55 -0000

user:        Michael K. Johnson <http://issues.rpath.com/>
files:       Make.defs Make.rules Makefile NEWS README

prepare for 0.1 release

diff -r 9a44e39c249c -r 5299e028fca0 Make.defs
--- a/Make.defs	Tue Apr 29 12:09:47 2008 -0400
+++ b/Make.defs	Wed Jun 25 18:46:45 2008 -0400
@@ -12,7 +12,7 @@
 # full details.
 #
 
-VERSION=1.0
+VERSION=0.1
 # VERSION can be overridden by snapshot builds to force incompatible versions
 
 export prefix = /usr
diff -r 9a44e39c249c -r 5299e028fca0 Make.rules
--- a/Make.rules	Tue Apr 29 12:09:47 2008 -0400
+++ b/Make.rules	Wed Jun 25 18:46:45 2008 -0400
@@ -24,10 +24,6 @@
 	done
 
 default-dist: dist-subdirs
-	for f in $(dist_files); do \
-		mkdir -p $(DISTDIR)/$(DIR)/`dirname $$f`; \
-		cp -a $$f $(DISTDIR)/$(DIR)/$$f; \
-	done
 
 default-install:
 
diff -r 9a44e39c249c -r 5299e028fca0 Makefile
--- a/Makefile	Tue Apr 29 12:09:47 2008 -0400
+++ b/Makefile	Wed Jun 25 18:46:45 2008 -0400
@@ -15,7 +15,7 @@
 all: default-subdirs default-all
 
 export TOPDIR = $(shell pwd)
-export DISTDIR = $(TOPDIR)/rbuild-$(VERSION)
+export DISTDIR = $(TOPDIR)/rpath-common-$(VERSION)
 
 SUBDIRS=rpath_common xsd doc
 
@@ -47,19 +47,14 @@
 
 
 archive: $(dist_files)
-	rm -rf $(DISTDIR)
-	mkdir $(DISTDIR)
-	for d in $(SUBDIRS); do make -C $$d DIR=$$d dist || exit 1; done
-	for f in $(dist_files); do \
-		mkdir -p $(DISTDIR)/`dirname $$f`; \
-		cp -a $$f $(DISTDIR)/$$f; \
-	done; \
-	tar cjf $(DISTDIR).tar.bz2 `basename $(DISTDIR)`
+	hg archive --exclude .hgignore -t tbz2 $(DISTDIR).tar.bz2
 
 forcedist: archive
 
+forcetag:
+	hg tag -f rpath-common-$(VERSION)
 tag:
-	hg tag -f rbuild-$(VERSION)
+	hg tag rpath-common-$(VERSION)
 
 clean: clean-subdirs default-clean
 
diff -r 9a44e39c249c -r 5299e028fca0 NEWS
--- a/NEWS	Tue Apr 29 12:09:47 2008 -0400
+++ b/NEWS	Wed Jun 25 18:46:45 2008 -0400
@@ -1,1 +1,2 @@
-Changes in @NEW@:
+Changes in 0.1:
+  o Initial public release
diff -r 9a44e39c249c -r 5299e028fca0 README
--- a/README	Tue Apr 29 12:09:47 2008 -0400
+++ b/README	Wed Jun 25 18:46:45 2008 -0400
@@ -6,3 +6,6 @@
     from rpath_common.<modulename> import api<version>
 For example:
     from rpath_common.xmldata import api1
+
+Please report bugs at https://issues.rpath.com/ in the rPath Common
+Libraries project.

From johnsonm@rpath.com Wed Jun 25 22:47:55 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5PMltCm009342 for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 22:47:55 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5PMltcA003340
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:47:55 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5PMltVJ010662
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:47:55 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5PMlsBc023715
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:47:54 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5PMlspl023709
	for rpath-common-commits@lists.rpath.com;
	Wed, 25 Jun 2008 18:47:54 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200806252247.m5PMlspl023709@scc.eng.rpath.com>
Date: Wed, 25 Jun 2008 18:47:54 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-common: branch merge
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 25 Jun 2008 22:47:55 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       Makefile

branch merge

diff -r 5299e028fca0 -r a4a457a2c363 Makefile
--- a/Makefile	Wed Jun 25 18:46:45 2008 -0400
+++ b/Makefile	Wed Jun 25 18:47:49 2008 -0400
@@ -17,18 +17,7 @@
 export TOPDIR = $(shell pwd)
 export DISTDIR = $(TOPDIR)/rpath-common-$(VERSION)
 
-SUBDIRS=rpath_common xsd doc
-
-extra_files = \
-	Make.rules 		\
-	Makefile		\
-	Make.defs		\
-	NEWS			\
-	README			\
-	EULA_product_common.txt		\
-	LICENSE
-
-dist_files = $(extra_files)
+SUBDIRS=rpath_common
 
 .PHONY: clean dist install subdirs
 
@@ -57,6 +46,7 @@
 	hg tag rpath-common-$(VERSION)
 
 clean: clean-subdirs default-clean
+	@rm -rf $(DISTDIR).tar.bz2
 
 include Make.rules
 include Make.defs

From johnsonm@rpath.com Wed Jun 25 22:49:01 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5PMn1g5009358 for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 22:49:01 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5PMn1FW003425
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:49:01 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5PMn1dn010766
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:49:01 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5PMn1kA023781
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 18:49:01 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5PMn0OK023776
	for rpath-common-commits@lists.rpath.com;
	Wed, 25 Jun 2008 18:49:00 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200806252249.m5PMn0OK023776@scc.eng.rpath.com>
Date: Wed, 25 Jun 2008 18:49:00 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-common: Added tag rpath-common-0.1 for changeset
 a4a457a2c363
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 25 Jun 2008 22:49:02 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       .hgtags

Added tag rpath-common-0.1 for changeset a4a457a2c363

diff -r a4a457a2c363 -r dba5b6c46426 .hgtags
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgtags	Wed Jun 25 18:48:54 2008 -0400
@@ -0,0 +1,1 @@
+a4a457a2c3637d84b40c87e9444b39b9603846bc rpath-common-0.1

From johnsonm@rpath.com Thu Jun 26 02:13:48 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5Q2Dm00012481 for <rpath-common-commits@lists.rpath.com>;
	Thu, 26 Jun 2008 02:13:48 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5Q2DmFK025922
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 22:13:48 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5Q2DlLr023938
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 22:13:47 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5Q2Dld2027432
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 22:13:47 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5Q2Dlb8027418
	for rpath-common-commits@lists.rpath.com;
	Wed, 25 Jun 2008 22:13:47 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200806260213.m5Q2Dlb8027418@scc.eng.rpath.com>
Date: Wed, 25 Jun 2008 22:13:47 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: unfix the non-typo in the package name
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 26 Jun 2008 02:13:48 -0000

tag:         product-definition-0.1
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       Makefile

unfix the non-typo in the package name

diff -r f8848d909d16 -r dda1dd574149 Makefile
--- a/Makefile	Wed Jun 25 18:37:15 2008 -0400
+++ b/Makefile	Wed Jun 25 22:12:51 2008 -0400
@@ -17,7 +17,10 @@
 .PHONY: clean dist install html docs
 
 export TOPDIR = $(shell pwd)
-export DISTDIR = $(TOPDIR)/product-definition-$(VERSION)
+# DISTDIR is not a typo: "rpath-product-definition" is the name
+# of the package that contains the code; "product-definition" is
+# the name of packages containing a product definition
+export DISTDIR = $(TOPDIR)/rpath-product-definition-$(VERSION)
 
 SUBDIRS=rpath_common xsd doc pylint
 

From johnsonm@rpath.com Thu Jun 26 02:13:49 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	m5Q2DnkH012484 for <rpath-common-commits@lists.rpath.com>;
	Thu, 26 Jun 2008 02:13:49 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m5Q2Dm4f025927
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 22:13:48 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m5Q2Dm5H023941
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 22:13:48 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m5Q2Dmea027463
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 25 Jun 2008 22:13:48 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m5Q2Dm9h027458
	for rpath-common-commits@lists.rpath.com;
	Wed, 25 Jun 2008 22:13:48 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200806260213.m5Q2Dm9h027458@scc.eng.rpath.com>
Date: Wed, 25 Jun 2008 22:13:48 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Added tag product-definition-0.1 for
	changeset dda1dd574149
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 26 Jun 2008 02:13:50 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       .hgtags

Added tag product-definition-0.1 for changeset dda1dd574149

diff -r dda1dd574149 -r fdb137b95c2d .hgtags
--- a/.hgtags	Wed Jun 25 22:12:51 2008 -0400
+++ b/.hgtags	Wed Jun 25 22:12:58 2008 -0400
@@ -1,2 +1,3 @@
 4fb9722782532f27b55a8c6473c6c25a114d51bc product-definition-0.1
 03ef2cdaaceedbd1df0402c65c5b77165df3c8cb product-definition-0.1
+dda1dd574149cd43221a5fcba3669247fd0fdfc0 product-definition-0.1

From smg@rpath.com Wed Jul  2 16:39:57 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m62GdvvF005439
	for <rpath-common-commits@lists.rpath.com>; Wed, 2 Jul 2008 16:39:57 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m62GdvJC002023
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 2 Jul 2008 12:39:57 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m62GduOm024738
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 2 Jul 2008 12:39:57 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m62Gduow012452
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 2 Jul 2008 12:39:56 -0400
Received: (from smg@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m62GducE012428
	for rpath-common-commits@lists.rpath.com; Wed, 2 Jul 2008 12:39:56 -0400
From: Stu Gott <smg@rpath.com>
Message-Id: <200807021639.m62GducE012428@scc.eng.rpath.com>
Date: Wed, 02 Jul 2008 12:39:56 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: ensure we seek before and after reading stream
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 02 Jul 2008 16:39:57 -0000

user:        Stu Gott <http://issues.rpath.com/>
files:       NEWS rpath_common/xmllib/api1.py

ensure we seek before and after reading stream

diff -r 0ed4a26feec0 -r 6e6b8b79d272 NEWS
--- a/NEWS	Wed Jun 04 10:03:51 2008 -0400
+++ b/NEWS	Wed Jul 02 12:35:08 2008 -0400
@@ -1,3 +1,5 @@
 Changes in @NEW@:
   o API Changes:
     * xmldata.py moved into rpath_common module as xmllib
+  o Bug Fixes:
+    * parseFile method now seeks before and after attempting to read the stream
diff -r 0ed4a26feec0 -r 6e6b8b79d272 rpath_common/xmllib/api1.py
--- a/rpath_common/xmllib/api1.py	Wed Jun 04 10:03:51 2008 -0400
+++ b/rpath_common/xmllib/api1.py	Wed Jul 02 12:35:08 2008 -0400
@@ -863,18 +863,24 @@
         """
         if isinstance(stream, str):
             stream = file(stream)
-        if validate:
-            self.validate(stream, schemaDir = schemaDir)
+        origPos = stream.tell()
+        try:
+            if validate:
+                stream.seek(0)
+                self.validate(stream, schemaDir = schemaDir)
+            stream.seek(0)
 
-        self.contentHandler.rootNode = None
-        parser = sax.make_parser()
-        parser.setContentHandler(self.contentHandler)
-        try:
-            parser.parse(stream)
-        except sax.SAXParseException:
-            raise InvalidXML
-        rootNode = self.contentHandler.rootNode
-        self.contentHandler.rootNode = None
+            self.contentHandler.rootNode = None
+            parser = sax.make_parser()
+            parser.setContentHandler(self.contentHandler)
+            try:
+                parser.parse(stream)
+            except sax.SAXParseException, e:
+                raise InvalidXML
+            rootNode = self.contentHandler.rootNode
+            self.contentHandler.rootNode = None
+        finally:
+            stream.seek(origPos)
         return rootNode
 
     @classmethod

From smg@rpath.com Wed Jul  2 16:39:58 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m62Gdwlp005442
	for <rpath-common-commits@lists.rpath.com>; Wed, 2 Jul 2008 16:39:58 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m62GdwfZ002026
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 2 Jul 2008 12:39:58 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m62GdvaM024746
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 2 Jul 2008 12:39:57 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m62GdvFR012473
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 2 Jul 2008 12:39:57 -0400
Received: (from smg@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m62GdvaG012468
	for rpath-common-commits@lists.rpath.com; Wed, 2 Jul 2008 12:39:57 -0400
From: Stu Gott <smg@rpath.com>
Message-Id: <200807021639.m62GdvaG012468@scc.eng.rpath.com>
Date: Wed, 02 Jul 2008 12:39:57 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: branch merge
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 02 Jul 2008 16:39:58 -0000

tag:         tip
user:        Stu Gott <http://issues.rpath.com/>
files:       NEWS

branch merge

diff -r 6e6b8b79d272 -r 866676f2033b NEWS
--- a/NEWS	Wed Jul 02 12:35:08 2008 -0400
+++ b/NEWS	Wed Jul 02 12:37:16 2008 -0400
@@ -1,5 +1,7 @@
-Changes in @NEW@:
+Changes in 0.1:
   o API Changes:
     * xmldata.py moved into rpath_common module as xmllib
   o Bug Fixes:
     * parseFile method now seeks before and after attempting to read the stream
+    * xmldata.py moved from Conary into rpath_common module as xmllib,
+      and interface significantly changed.

From johnsonm@rpath.com Wed Jul  2 19:31:11 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m62JVBZV009550
	for <rpath-common-commits@lists.rpath.com>; Wed, 2 Jul 2008 19:31:11 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m62JVBJa026530
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 2 Jul 2008 15:31:11 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m62JVASM006542
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 2 Jul 2008 15:31:11 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m62JVA3C017978
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 2 Jul 2008 15:31:10 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m62JVAZs017973
	for rpath-common-commits@lists.rpath.com; Wed, 2 Jul 2008 15:31:10 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200807021931.m62JVAZs017973@scc.eng.rpath.com>
Date: Wed, 02 Jul 2008 15:31:10 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: fix bad branch merge
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 02 Jul 2008 19:31:11 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       NEWS

fix bad branch merge

diff -r 866676f2033b -r a6eaa12c46dc NEWS
--- a/NEWS	Wed Jul 02 12:37:16 2008 -0400
+++ b/NEWS	Wed Jul 02 15:31:08 2008 -0400
@@ -1,7 +1,12 @@
+Changes in @NEW@:
+  o Bug Fixes:
+    * parseFile method now seeks before and after attempting to read
+      the stream.
+
 Changes in 0.1:
   o API Changes:
     * xmldata.py moved into rpath_common module as xmllib
+
   o Bug Fixes:
-    * parseFile method now seeks before and after attempting to read the stream
     * xmldata.py moved from Conary into rpath_common module as xmllib,
       and interface significantly changed.

From misa@rpath.com Wed Jul  2 20:06:04 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m62K64CT010133
	for <rpath-common-commits@lists.rpath.com>; Wed, 2 Jul 2008 20:06:04 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m62K64DV029314
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 2 Jul 2008 16:06:04 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m62K63tO008669
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 2 Jul 2008 16:06:04 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m62K62Bm019188
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 2 Jul 2008 16:06:02 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m62K62pG019175
	for rpath-common-commits@lists.rpath.com; Wed, 2 Jul 2008 16:06:02 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200807022006.m62K62pG019175@scc.eng.rpath.com>
Date: Wed, 02 Jul 2008 16:06:02 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Ground work to add architectures and image
	templates (RPCL-13)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 02 Jul 2008 20:06:05 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/_xmlConstants.py rpath_common/proddef/api1.py

Ground work to add architectures and image templates (RPCL-13)

diff -r fdb137b95c2d -r aed648b4b7fa rpath_common/proddef/_xmlConstants.py
--- a/rpath_common/proddef/_xmlConstants.py	Wed Jun 25 22:12:58 2008 -0400
+++ b/rpath_common/proddef/_xmlConstants.py	Wed Jul 02 09:57:36 2008 -0400
@@ -23,6 +23,6 @@
 @type xmlSchemaLocaltion: C{str}
 """
 
-defaultNamespaceList = [ "http://www.rpath.com/permanent/rpd-1.1.xsd" ]
+defaultNamespaceList = [ "http://www.rpath.com/permanent/rpd-1.2.xsd" ]
 xmlSchemaNamespace = "http://www.w3.org/2001/XMLSchema-instance"
-xmlSchemaLocation = "http://www.rpath.com/permanent/rpd-1.1.xsd rpd-1.1.xsd"
+xmlSchemaLocation = "http://www.rpath.com/permanent/rpd-1.2.xsd rpd-1.2.xsd"
diff -r fdb137b95c2d -r aed648b4b7fa rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Wed Jun 25 22:12:58 2008 -0400
+++ b/rpath_common/proddef/api1.py	Wed Jul 02 09:57:36 2008 -0400
@@ -53,7 +53,13 @@
     """
 
 class StageNotFoundError(ProductDefinitionError):
-    " Raised when no such stage exists. "
+    "Raised when no such stage exists."
+
+class ArchitectureNotFoundError(ProductDefinitionError):
+    "Raised when no such architecture exists."
+
+class ImageTemplateNotFoundError(ProductDefinitionError):
+    "Raised when no such image template exists."
 
 class UnsupportedImageType(ProductDefinitionError):
     "Raised when an unsupported image type was passed"
@@ -76,7 +82,7 @@
 #}
 
 class BaseDefinition(object):
-    version = '1.1'
+    version = '1.2'
     defaultNamespace = _xmlConstants.defaultNamespaceList[0]
     xmlSchemaLocation = _xmlConstants.xmlSchemaLocation
 
@@ -171,6 +177,43 @@
         """
         self._addSource(troveName, label, version, _FactorySource, self.factorySources)
 
+    def getArchitectures(self):
+        return self.architectures
+
+    def getArchitecture(self, name):
+        ret = None
+        arches = self.getArchitectures()
+        for arch in arches:
+            if arch.name == name:
+                return arch
+        raise ArchitectureNotFoundError(name)
+
+    def addArchitecture(self, name, flavor):
+        obj = _Architecture(name = name, flavor = flavor)
+        self.architectures.append(obj)
+
+    def clearArchitectures(self):
+        self.architectures = _Architectures()
+
+    def getImageTemplates(self):
+        return self.imageTemplates
+
+    def getImageTemplate(self, name):
+        ret = None
+        templates = self.getImageTemplates()
+        for tmpl in templates:
+            if tmpl.name == name:
+                return tmpl
+        raise ImageTemplateNotFoundError(name)
+
+    def addImageTemplate(self, name, flavor):
+        obj = _ImageTemplate(name = name, flavor = flavor)
+        self.imageTemplates.append(obj)
+
+    def clearImageTemplates(self):
+        self.imageTemplates = _ImageTemplates()
+
+
     def _addSource(self, troveName, label, version, cls, intList):
         "Internal function for adding a Source"
         if label is not None:
@@ -181,13 +224,11 @@
 
 
     def _saveToRepository(self, conaryClient, label, message = None):
-        version = '1.1'
-
         if message is None:
             message = "Automatic checkin\n"
 
         recipe = self._recipe.replace('@NAME@', self._troveName)
-        recipe = recipe.replace('@VERSION@', version)
+        recipe = recipe.replace('@VERSION@', self.__class__.version)
 
         stream = StringIO.StringIO()
         self.serialize(stream)
@@ -201,8 +242,8 @@
                                    contact = conaryClient.cfg.contact,
                                    message = message)
         troveName = '%s:source' % self._troveName
-        cs = conaryClient.createSourceTrove(troveName, label, version,
-            pathDict, cLog)
+        cs = conaryClient.createSourceTrove(troveName, label,
+            self.__class__.version, pathDict, cLog)
 
         repos = conaryClient.getRepos()
         repos.commitChangeSet(cs)
@@ -237,6 +278,13 @@
 
         # Couldn't find the file we expected; die
         raise ProductDefinitionFileNotFound("%s=%s" % (troveName, label))
+
+    def _initFields(self):
+        self.baseFlavor = None
+        self.searchPaths = _SearchPaths()
+        self.factorySources = _FactorySources()
+        self.architectures = _Architectures()
+        self.imageTemplates = _ImageTemplates()
 
 class ProductDefinition(BaseDefinition):
     """
@@ -331,6 +379,8 @@
         self.stages.extend(getattr(xmlObj, 'stages', []))
         self.searchPaths.extend(getattr(xmlObj, 'searchPaths', []))
         self.factorySources.extend(getattr(xmlObj, 'factorySources', []))
+        self.architectures.extend(getattr(xmlObj, 'architectures', []))
+        self.imageTemplates.extend(getattr(xmlObj, 'imageTemplates', []))
         self.buildDefinition.extend(getattr(xmlObj, 'buildDefinition', []))
         self.platform = getattr(xmlObj, 'platform', None)
 
@@ -544,7 +594,7 @@
         for stage in stages:
             if stage.name == stageName:
                 return stage
-        raise StageNotFoundError
+        raise StageNotFoundError(stageName)
 
     def addStage(self, name = None, labelSuffix = None):
         """
@@ -917,7 +967,7 @@
                                           version=sp.version)
 
     def _initFields(self):
-        self.baseFlavor = None
+        BaseDefinition._initFields(self)
         self.stages = _Stages()
         self.productName = None
         self.productShortname = None
@@ -927,8 +977,6 @@
         self.conaryRepositoryHostname = None
         self.conaryNamespace = None
         self.imageGroup = None
-        self.searchPaths = _SearchPaths()
-        self.factorySources = _FactorySources()
         self.buildDefinition = _BuildDefinition()
         self.platform = None
 
@@ -958,9 +1006,7 @@
 '''
 
     def _initFields(self):
-        self.searchPaths = _SearchPaths()
-        self.factorySources = _FactorySources()
-        self.baseFlavor = None
+        BaseDefinition._initFields(self)
         self.useLatest = None
         self.sourceTrove = None
 
@@ -984,6 +1030,8 @@
         self.useLatest = getattr(xmlObj.platform, 'useLatest', None)
         self.searchPaths = getattr(xmlObj.platform, 'searchPaths', None)
         self.factorySources = getattr(xmlObj.platform, 'factorySources', None)
+        self.architectures = getattr(xmlObj.platform, 'architectures', None)
+        self.imageTemplates = getattr(xmlObj.platform, 'imageTemplates', None)
 
         for nsName, nsVal in xmlObj.iterNamespaces():
             if nsName is None and nsVal != self.defaultNamespace:
@@ -1078,6 +1126,15 @@
 class _FactorySources(xmllib.SerializableList):
     tag = "factorySources"
 
+# pylint: disable-msg=R0903
+# Too few public methods (1/2): this is an interface
+class _Architectures(xmllib.SerializableList):
+    tag = "architectures"
+
+# pylint: disable-msg=R0903
+# Too few public methods (1/2): this is an interface
+class _ImageTemplates(xmllib.SerializableList):
+    tag = "imageTemplates"
 
 # pylint: disable-msg=R0903
 # Too few public methods (1/2): this is an interface
@@ -1107,6 +1164,18 @@
 
 class _FactorySource(_SearchPath):
     tag = "factorySource"
+
+class _Architecture(xmllib.SlotBasedSerializableObject):
+    __slots__ = [ 'name', 'flavor' ]
+    tag = "architecture"
+
+    def __init__(self, name, flavor):
+        xmllib.SlotBasedSerializableObject.__init__(self)
+        self.name = name
+        self.flavor = flavor
+
+class _ImageTemplate(_Architecture):
+    tag = "imageTemplate"
 
 class Build(xmllib.SerializableObject):
     __slots__ = [ 'name', 'baseFlavor', 'imageType', 'stages', 'imageGroup',
@@ -1201,6 +1270,23 @@
             sources.append(pyObj)
         return sources
 
+    def _processArchitectures(self, architectures):
+        return self._processNFCollection(architectures,
+            _Architectures, _Architecture)
+
+    def _processImageTemplates(self, imageTemplates):
+        return self._processNFCollection(imageTemplates,
+            _ImageTemplates, _ImageTemplate)
+
+    def _processNFCollection(self, collection, ListClass, ItemClass):
+        collObj = ListClass()
+        for node in collection:
+            pyObj = ItemClass(
+                name = node.getAttribute('name'),
+                flavor = node.getAttribute('flavor'))
+            collObj.append(pyObj)
+        return collObj
+
     def _addPlatform(self, node):
         self.platform = PlatformDefinition()
         self.platform.sourceTrove = node.getAttribute('sourceTrove')
@@ -1216,6 +1302,14 @@
         if listNode:
             self.platform.factorySources = self._processFactorySources(
                 listNode[0].getChildren('factorySource'))
+        listNode = node.getChildren('architectures')
+        if listNode:
+            self.platform.architectures = self._processArchitectures(
+                listNode[0].getChildren('architecture'))
+        listNode = node.getChildren('imageTemplates')
+        if listNode:
+            self.platform.imageTemplates = self._processImageTemplates(
+                listNode[0].getChildren('imageTemplate'))
         baseFlavorChildren = node.getChildren('baseFlavor')
         if baseFlavorChildren:
             self.platform.baseFlavor = baseFlavorChildren[0].getText()
@@ -1277,6 +1371,17 @@
             self._addFactorySources(children)
             return
 
+        if chName == self._makeAbsoluteName('architectures'):
+            children = childNode.getChildren('architecture')
+            self._addArchitectures(children)
+            return
+
+        if chName == self._makeAbsoluteName('imageTemplates'):
+            children = childNode.getChildren('imageTemplate')
+            self._addImageTemplates(children)
+            return
+
+
         if chName == self._makeAbsoluteName('buildDefinition'):
             children = childNode.getChildren('build')
             self._addBuildDefinition(children)
@@ -1299,6 +1404,12 @@
 
     def _addFactorySources(self, factorySources):
         self.factorySources = self._processFactorySources(factorySources)
+
+    def _addArchitectures(self, architectures):
+        self.architectures = self._processArchitectures(architectures)
+
+    def _addImageTemplates(self, imageTemplates):
+        self.imageTemplates = self._processImageTemplates(imageTemplates)
 
     def _addBuildDefinition(self, buildNodes):
         dispatcher = xmllib.NodeDispatcher(self._nsMap)
@@ -1350,6 +1461,8 @@
                 attrs['sourceTrove'] = platform.sourceTrove
         self.searchPaths = platform.searchPaths
         self.factorySources = platform.factorySources
+        self.architectures = platform.architectures
+        self.imageTemplates = platform.imageTemplates
         self.baseFlavor = xmllib.StringNode(name = 'baseFlavor').characters(platform.baseFlavor)
         xmllib.BaseNode.__init__(self, attrs, namespaces, name=name)
 
@@ -1359,6 +1472,10 @@
             ret.append(self.searchPaths)
         if self.factorySources:
             ret.append(self.factorySources)
+        if self.architectures:
+            ret.append(self.architectures)
+        if self.imageTemplates:
+            ret.append(self.imageTemplates)
         return ret
 
 class _ProductDefinitionSerialization(xmllib.BaseNode):
@@ -1367,6 +1484,8 @@
         self.stages = prodDef.getStages()
         self.searchPaths = prodDef.searchPaths
         self.factorySources = prodDef.factorySources
+        self.architectures = prodDef.architectures
+        self.imageTemplates = prodDef.imageTemplates
         self.buildDefinition = prodDef.getBuildDefinitions()
         if prodDef.platform:
             self.platform = _PlatformSerialization({}, namespaces,
@@ -1436,6 +1555,10 @@
                  self.searchPaths, ]
         if len(self.factorySources):
             ret.append(self.factorySources)
+        if self.architectures:
+            ret.append(self.architectures)
+        if self.imageTemplates:
+            ret.append(self.imageTemplates)
         ret.append(self.buildDefinition)
         if self.platform:
             ret.append(self.platform)

From misa@rpath.com Wed Jul  2 20:06:05 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m62K65fd010136
	for <rpath-common-commits@lists.rpath.com>; Wed, 2 Jul 2008 20:06:05 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m62K65vi029317
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 2 Jul 2008 16:06:05 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m62K645O008676
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 2 Jul 2008 16:06:04 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m62K64h2019240
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 2 Jul 2008 16:06:04 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m62K63SI019220
	for rpath-common-commits@lists.rpath.com; Wed, 2 Jul 2008 16:06:03 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200807022006.m62K63SI019220@scc.eng.rpath.com>
Date: Wed, 02 Jul 2008 16:06:03 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Saving architectures and image templates in
	the platform def (RPCL-13)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 02 Jul 2008 20:06:05 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Saving architectures and image templates in the platform def (RPCL-13)

diff -r aed648b4b7fa -r a9e1da3e5ae8 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Wed Jul 02 09:57:36 2008 -0400
+++ b/rpath_common/proddef/api1.py	Wed Jul 02 10:13:00 2008 -0400
@@ -928,6 +928,12 @@
         for troveName, label in sPathsList:
             nplat.addSearchPath(troveName=troveName, label=label)
 
+        for arch in self.getArchitectures():
+            nplat.addArchitecture(name = arch.name, flavor = arch.flavor)
+
+        for tmpl in self.getImageTemplates():
+            nplat.addImageTemplate(name = tmpl.name, flavor = tmpl.flavor)
+
         return nplat
 
     def savePlatformToRepository(self, client, message = None):

From misa@rpath.com Wed Jul  2 20:06:06 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m62K66wL010142
	for <rpath-common-commits@lists.rpath.com>; Wed, 2 Jul 2008 20:06:06 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m62K66os029323
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 2 Jul 2008 16:06:06 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m62K65W9008680
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 2 Jul 2008 16:06:05 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m62K65ro019268
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 2 Jul 2008 16:06:05 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m62K64Fd019255
	for rpath-common-commits@lists.rpath.com; Wed, 2 Jul 2008 16:06:04 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200807022006.m62K64Fd019255@scc.eng.rpath.com>
Date: Wed, 02 Jul 2008 16:06:04 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Rebasing architectures and image templates
	(RPCL-13)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 02 Jul 2008 20:06:06 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Rebasing architectures and image templates (RPCL-13)

diff -r a9e1da3e5ae8 -r 9ba1a98811ef rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Wed Jul 02 10:13:00 2008 -0400
+++ b/rpath_common/proddef/api1.py	Wed Jul 02 10:36:14 2008 -0400
@@ -971,6 +971,12 @@
             self.addPlatformFactorySource(troveName=sp.troveName,
                                           label=sp.label,
                                           version=sp.version)
+        for item in nplat.getArchitectures():
+            self.platform.addArchitecture(name = item.name,
+                                          flavor = item.flavor)
+        for item in nplat.getImageTemplates():
+            self.platform.addImageTemplate(name = item.name,
+                                           flavor = item.flavor)
 
     def _initFields(self):
         BaseDefinition._initFields(self)

From misa@rpath.com Wed Jul  2 20:06:07 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m62K67cG010148
	for <rpath-common-commits@lists.rpath.com>; Wed, 2 Jul 2008 20:06:07 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m62K678R029334
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 2 Jul 2008 16:06:07 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m62K66Ou008690
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 2 Jul 2008 16:06:07 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m62K66v9019317
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 2 Jul 2008 16:06:06 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m62K65fW019298
	for rpath-common-commits@lists.rpath.com; Wed, 2 Jul 2008 16:06:05 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200807022006.m62K65fW019298@scc.eng.rpath.com>
Date: Wed, 02 Jul 2008 16:06:05 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Added schema 1.2 and target to validate all
	schema (RPCL-13)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 02 Jul 2008 20:06:08 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       xsd/Makefile xsd/rpd-1.2.xsd

Added schema 1.2 and target to validate all schema (RPCL-13)

diff -r 9ba1a98811ef -r c6824f2a7bb1 xsd/Makefile
--- a/xsd/Makefile	Wed Jul 02 10:36:14 2008 -0400
+++ b/xsd/Makefile	Wed Jul 02 10:52:12 2008 -0400
@@ -13,7 +13,7 @@
 #
 
 dist_files = Makefile $(SCHEMA_FILES)
-SCHEMA_FILES = rpd-1.0.xsd rpd-1.1.xsd
+SCHEMA_FILES = $(wildcard *.xsd)
 
 all: default-all
 
@@ -23,6 +23,9 @@
 $(DESTDIR)$(datadir)/rpath_common:
 	install -d -m755 $@
 
+validate-schema:
+	xmllint -schema http://www.w3.org/2001/XMLSchema.xsd $(SCHEMA_FILES) > /dev/null
+
 dist: default-dist
 
 clean: default-clean
diff -r 9ba1a98811ef -r c6824f2a7bb1 xsd/rpd-1.2.xsd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/xsd/rpd-1.2.xsd	Wed Jul 02 10:52:12 2008 -0400
@@ -0,0 +1,306 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema targetNamespace="http://www.rpath.com/permanent/rpd-1.2.xsd"
+        elementFormDefault="qualified"
+        attributeFormDefault="unqualified"
+        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+        xmlns:rpd="http://www.rpath.com/permanent/rpd-1.2.xsd"
+        xmlns="http://www.rpath.com/permanent/rpd-1.2.xsd">
+
+    <xsd:attributeGroup name="common">
+       <xsd:attribute name="name" type="xsd:string" />
+       <xsd:attribute name="autoResolve" type="xsd:boolean" />
+       <xsd:attribute name="baseFileName" type="xsd:string" />
+       <xsd:attribute name="installLabelPath" type="xsd:string" />
+    </xsd:attributeGroup>
+
+    <xsd:attributeGroup name="specialIsoTroves">
+        <xsd:attribute name="mediaTemplateTrove" type="rpd:troveSpecType" />
+        <xsd:attribute name="anacondaCustomTrove" type="rpd:troveSpecType" />
+        <xsd:attribute name="anacondaTemplatesTrove" type="rpd:troveSpecType" />
+    </xsd:attributeGroup>
+
+    <xsd:simpleType name="troveSpecType">
+        <xsd:restriction base="xsd:string"></xsd:restriction>
+        <!-- TODO: make a proper xsd:restriction here to validate troveSpecs -->
+    </xsd:simpleType>
+
+    <xsd:simpleType name="flavorStringType">
+        <xsd:restriction base="xsd:string">
+            <!-- TODO: make a proper xsd:restriction here to validate flavor xsd:strings -->
+            <!-- this regexp comes from conary.deps.deps.flavorRegexpStr, and it barfs inside of Eclipse (sgp) -->
+            <!-- <pattern value="^(use:)? *(?:((?:!|~!)?(?:~?!?(?:[0-9A-Za-z_-]+))(?:\\.(?:[0-9A-Za-z_-]+))? *(?:, *(?:!|~!)?(?:~?!?(?:[0-9A-Za-z_-]+))(?:\\.(?:[0-9A-Za-z_-]+))?)*)?)? *(?:(is:) *(?: *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?(?:((?:  * *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?)*))?))? *(?:(target:) *(?: *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?(?:((?:  * *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?)*))?))?$" /> -->
+        </xsd:restriction>
+    </xsd:simpleType>
+
+    <xsd:complexType name="stageType">
+        <xsd:attribute name="name" type="xsd:string" use="required" />
+        <xsd:attribute name="labelSuffix" type="xsd:string" use="required" />
+    </xsd:complexType>
+
+    <xsd:complexType name="stageListType">
+        <xsd:sequence>
+            <xsd:element name="stage" type="stageType" minOccurs="1" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="searchPathType">
+        <xsd:attribute name="troveName" type="xsd:string" />
+        <xsd:attribute name="label" type="xsd:string" />
+        <xsd:attribute name="version" type="xsd:string" />
+    </xsd:complexType>
+
+    <xsd:complexType name="searchPathListType">
+        <xsd:sequence>
+            <xsd:element name="searchPath" type="searchPathType" minOccurs="1" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="factorySourceListType">
+        <xsd:sequence>
+            <xsd:element name="factorySource" type="searchPathType" minOccurs="1" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+
+    <xsd:complexType name="amiImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="amiHugeDiskMountpoint" type="xsd:string" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="applianceIsoImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="maxIsoSize" type="xsd:positiveInteger" />
+        <xsd:attribute name="bugsUrl" type="xsd:string" />
+        <xsd:attribute name="showMediaCheck" type="xsd:boolean" />
+        <xsd:attribute name="betaNag" type="xsd:boolean" />
+        <xsd:attributeGroup ref="specialIsoTroves" />
+    </xsd:complexType>
+
+    <xsd:complexType name="installableIsoImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="maxIsoSize" type="xsd:positiveInteger" />
+        <xsd:attribute name="bugsUrl" type="xsd:string" />
+        <xsd:attribute name="showMediaCheck" type="xsd:boolean" />
+        <xsd:attribute name="betaNag" type="xsd:boolean" />
+        <xsd:attributeGroup ref="specialIsoTroves" />
+    </xsd:complexType>
+
+    <xsd:complexType name="liveIsoImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="unionfs" type="xsd:boolean" />
+        <xsd:attribute name="zisofs" type="xsd:boolean" />
+    </xsd:complexType>
+
+    <xsd:complexType name="netbootImageType">
+        <xsd:attributeGroup ref="common" />
+    </xsd:complexType>
+
+    <xsd:complexType name="rawFsImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="rawHdImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="tarballImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="updateIsoImageType">
+        <xsd:attribute name="baseFileName" type="xsd:string" />
+        <xsd:attribute name="mediaTemplateTrove" type="xsd:string" />
+    </xsd:complexType>
+
+    <xsd:complexType name="vhdImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="vhdDiskType">
+            <xsd:simpleType>
+                <xsd:restriction base="xsd:string">
+                    <xsd:enumeration value="fixed" />
+                    <xsd:enumeration value="dynamic" />
+                    <xsd:enumeration value="difference" />
+                </xsd:restriction>
+            </xsd:simpleType>
+        </xsd:attribute>
+    </xsd:complexType>
+
+    <xsd:complexType name="virtualIronImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="vhdDiskType">
+            <xsd:simpleType>
+                <xsd:restriction base="xsd:string">
+                    <xsd:enumeration value="fixed" />
+                    <xsd:enumeration value="dynamic" />
+                    <xsd:enumeration value="difference" />
+                </xsd:restriction>
+            </xsd:simpleType>
+        </xsd:attribute>
+    </xsd:complexType>
+
+    <xsd:complexType name="vmwareEsxImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="natNetworking" type="xsd:boolean" />
+        <xsd:attribute name="vmMemory" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="vmwareImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="natNetworking" type="xsd:boolean" />
+            <xsd:attribute name="diskAdapter">
+                <xsd:simpleType>
+                    <xsd:restriction base="xsd:string">
+                        <xsd:enumeration value="ide" />
+                        <xsd:enumeration value="lsilogic" />
+                    </xsd:restriction>
+                </xsd:simpleType>
+            </xsd:attribute>
+        <xsd:attribute name="vmSnapshots" type="xsd:boolean" />
+        <xsd:attribute name="vmMemory" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="xenOvaImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="vmMemory" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="buildDefinitionType">
+        <xsd:sequence>
+            <xsd:element name="build" type="rpd:buildType" minOccurs="1" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="buildType">
+        <xsd:sequence>
+            <xsd:choice>
+                <xsd:element name="amiImage" type="rpd:amiImageType" />
+                <xsd:element name="applianceIsoImage" type="rpd:applianceIsoImageType" />
+                <xsd:element name="installableIsoImage" type="rpd:installableIsoImageType" />
+                <xsd:element name="liveIsoImage" type="rpd:liveIsoImageType" />
+                <xsd:element name="netbootImage" type="rpd:netbootImageType" />
+                <xsd:element name="rawFsImage" type="rpd:rawFsImageType" />
+                <xsd:element name="rawHdImage" type="rpd:rawHdImageType" />
+                <xsd:element name="tarballImage" type="rpd:tarballImageType" />
+                <xsd:element name="updateIsoImage" type="rpd:updateIsoImageType" />
+                <xsd:element name="vhdImage" type="rpd:vhdImageType" />
+                <xsd:element name="virtualIronImage" type="rpd:virtualIronImageType" />
+                <xsd:element name="vmwareImage" type="rpd:vmwareImageType" />
+                <xsd:element name="vmwareEsxImage" type="rpd:vmwareEsxImageType" />
+                <xsd:element name="xenOvaImage" type="rpd:xenOvaImageType" />
+            </xsd:choice>
+            <xsd:element name="stage" minOccurs="0" maxOccurs="unbounded">
+                <xsd:complexType>
+                    <xsd:attribute name="ref" type="xsd:string" use="required"/>
+                </xsd:complexType>
+            </xsd:element>
+            <xsd:element name="imageGroup" type="rpd:troveSpecType" minOccurs="0" maxOccurs="1" />
+        </xsd:sequence>
+        <xsd:attribute name="name" type="xsd:string" use="required" />
+        <!-- deprecated, use arch and image template references -->
+        <xsd:attribute name="baseFlavor" type="rpd:flavorStringType" />
+        <!-- 1.2: architecture reference and image template reference -->
+        <xsd:attribute name="architectureRef" type="xsd:string" />
+        <xsd:attribute name="imageTemplateRef" type="xsd:string" />
+        <xsd:attribute name="flavor" type="rpd:flavorStringType" />
+    </xsd:complexType>
+
+    <xsd:complexType name="platformDefinitionType">
+      <xsd:sequence>
+        <xsd:element name="baseFlavor" type="rpd:flavorStringType"
+        minOccurs="0" maxOccurs="1" />
+        <xsd:element name="searchPaths" type="rpd:searchPathListType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="factorySources" type="rpd:factorySourceListType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="architectures" type="rpd:architecturesType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="imageTemplates" type="rpd:imageTemplatesType"
+            minOccurs="0" maxOccurs="1" />
+      </xsd:sequence>
+      <xsd:attribute name="version" type="xsd:string" />
+    </xsd:complexType>
+
+    <xsd:complexType name="platformType">
+      <xsd:sequence>
+        <xsd:element name="baseFlavor" type="rpd:flavorStringType"
+        minOccurs="0" maxOccurs="1" />
+        <xsd:element name="searchPaths" type="rpd:searchPathListType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="factorySources" type="rpd:factorySourceListType"
+            minOccurs="0" maxOccurs="1" />
+      </xsd:sequence>
+      <!-- Source of this platform. Will get filled in to a name-version trove
+      spec when the product definition is saved -->
+      <xsd:attribute name="sourceTrove" type="xsd:string" />
+      <!-- If useLatest is "true", the upstream platform is copied verbatim
+      here, with no settling to a specific version. This essentially is a
+      cache of the upstream platform.
+      -->
+      <xsd:attribute name="useLatest" type="xsd:boolean" />
+    </xsd:complexType>
+
+    <xsd:complexType name="nameFlavorType">
+        <xsd:attribute name="name" type="xsd:string" use="required" />
+        <xsd:attribute name="flavor" type="xsd:string" use="required" />
+    </xsd:complexType>
+
+    <xsd:complexType name="architecturesType">
+        <xsd:sequence>
+            <xsd:element name="architecture" type="nameFlavorType" minOccurs="0" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="imageTemplatesType">
+        <xsd:sequence>
+            <xsd:element name="imageTemplate" type="nameFlavorType" minOccurs="0" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <!-- First top-level element we allow -->
+    <xsd:element name="productDefinition">
+        <xsd:complexType>
+            <xsd:sequence>
+                <xsd:element name="productName" type="xsd:string" />
+                <xsd:element name="productShortname" type="xsd:string" />
+                <xsd:element name="productDescription" type="xsd:string" />
+                <xsd:element name="productVersion" type="xsd:string" />
+                <xsd:element name="productVersionDescription" type="xsd:string" />
+                <xsd:element name="conaryRepositoryHostname" type="xsd:string" />
+                <xsd:element name="conaryNamespace" type="xsd:string" />
+                <xsd:element name="imageGroup" type="rpd:troveSpecType" />
+                <xsd:element name="baseFlavor" type="rpd:flavorStringType" minOccurs="0" maxOccurs="1" />
+                <xsd:element name="stages" type="rpd:stageListType" />
+                <xsd:element name="searchPaths" type="rpd:searchPathListType" minOccurs="0" maxOccurs="1" />
+                <xsd:element name="factorySources" type="rpd:factorySourceListType" minOccurs="0" maxOccurs="1" />
+                <xsd:element name="architectures" type="rpd:architecturesType"
+                    minOccurs="0" maxOccurs="1" />
+                <xsd:element name="imageTemplates" type="rpd:imageTemplatesType"
+                    minOccurs="0" maxOccurs="1" />
+                <xsd:element name="buildDefinition" type="rpd:buildDefinitionType" />
+                <xsd:element name="platform" type="rpd:platformType" minOccurs="0" maxOccurs="1" />
+            </xsd:sequence>
+            <xsd:attribute name="version" type="xsd:string" />
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- Second top-level element we allow (although we do allow this as part
+    of a product definition -->
+    <xsd:element name="platformDefinition" type="rpd:platformDefinitionType" />
+
+</xsd:schema>

From misa@rpath.com Wed Jul  2 20:06:08 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m62K68ek010151
	for <rpath-common-commits@lists.rpath.com>; Wed, 2 Jul 2008 20:06:08 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m62K689u029340
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 2 Jul 2008 16:06:08 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m62K67eI008695
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 2 Jul 2008 16:06:07 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m62K67Vg019353
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 2 Jul 2008 16:06:07 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m62K67SO019339
	for rpath-common-commits@lists.rpath.com; Wed, 2 Jul 2008 16:06:07 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200807022006.m62K67SO019339@scc.eng.rpath.com>
Date: Wed, 02 Jul 2008 16:06:06 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Merging flavors (RPCL-13)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 02 Jul 2008 20:06:08 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Merging flavors (RPCL-13)

diff -r c6824f2a7bb1 -r a56a0ee63c2c rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Wed Jul 02 10:52:12 2008 -0400
+++ b/rpath_common/proddef/api1.py	Wed Jul 02 14:36:29 2008 -0400
@@ -26,11 +26,14 @@
             'ProductDefinitionTroveNotFound',
             'ProductDefinitionFileNotFound',
             'RepositoryError',
-            'PlatformLabelMissingError'
+            'PlatformLabelMissingError',
+            'ArchitectureNotFoundError',
+            'ImageTemplateNotFoundError',
             ]
 
 import itertools
 import StringIO
+import weakref
 
 from conary import changelog
 from conary import errors as conaryErrors
@@ -180,12 +183,16 @@
     def getArchitectures(self):
         return self.architectures
 
-    def getArchitecture(self, name):
-        ret = None
+    def hasArchitecture(self, name):
+        return name in [ x.name for x in self.getArchitectures() ]
+
+    def getArchitecture(self, name, default = -1):
         arches = self.getArchitectures()
         for arch in arches:
             if arch.name == name:
                 return arch
+        if default != -1:
+            return default
         raise ArchitectureNotFoundError(name)
 
     def addArchitecture(self, name, flavor):
@@ -198,12 +205,13 @@
     def getImageTemplates(self):
         return self.imageTemplates
 
-    def getImageTemplate(self, name):
-        ret = None
+    def getImageTemplate(self, name, default = -1):
         templates = self.getImageTemplates()
         for tmpl in templates:
             if tmpl.name == name:
                 return tmpl
+        if default != -1:
+            return default
         raise ImageTemplateNotFoundError(name)
 
     def addImageTemplate(self, name, flavor):
@@ -382,6 +390,9 @@
         self.architectures.extend(getattr(xmlObj, 'architectures', []))
         self.imageTemplates.extend(getattr(xmlObj, 'imageTemplates', []))
         self.buildDefinition.extend(getattr(xmlObj, 'buildDefinition', []))
+        # Add (weak) reference to the product definition
+        for bd in self.buildDefinition:
+            bd.setProductDefinition(self)
         self.platform = getattr(xmlObj, 'platform', None)
 
         ver = xmlObj.getAttribute('version')
@@ -566,12 +577,12 @@
         @rtype: C{str}
         """
         flv = conaryDeps.parseFlavor('')
-        if self.baseFlavor is not None:
-            nflv = conaryDeps.parseFlavor(self.baseFlavor)
-            flv.union(nflv)
         platFlv = self.getPlatformBaseFlavor()
         if platFlv is not None:
             nflv = conaryDeps.parseFlavor(platFlv)
+            flv.union(nflv)
+        if self.baseFlavor is not None:
+            nflv = conaryDeps.parseFlavor(self.baseFlavor)
             flv.union(nflv)
         return str(flv)
 
@@ -678,10 +689,14 @@
         return self.buildDefinition
 
     def addBuildDefinition(self, name = None, baseFlavor = None,
-                           imageType = None, stages = None, imageGroup = None):
+                           imageType = None, stages = None, imageGroup = None,
+                           architectureRef = None, imageTemplateRef = None,
+                           flavor = None):
         """
         Add a build definition.
         Image types are specified by calling C{ProductDefinition.imageType}.
+        Note that the usage of baseFlavor is deprecated in favor of using
+        references to architectures and image templates.
         @param name: the name for the build definition
         @type name: C{str} or C{None}
         @param baseFlavor: the base flavor
@@ -694,12 +709,31 @@
         @param imageGroup: An optional image group that will override the
         product definition's image group
         @type imageGroup: C{str}
-        subclass.
+        @param architectureRef: the name of an architecture to inherit flavors
+        from.
+        @type architectureRef: C{str}
+        @param imageTemplateRef: the name of an image template to inherit
+        flavors from.
+        @type imageTemplateRef: C{str}
+        @param flavor: additional flavors
+        @type flavor: C{str}
         """
+        if baseFlavor and (architectureRef or imageTemplateRef or flavor):
+            raise ProductDefinitionError("Both a base flavor and references used")
+        if architectureRef:
+            # Make sure we have the architecture
+            arch = self.getArchitecture(architectureRef)
+        if imageTemplateRef:
+            # Make sure we have the image template
+            arch = self.getImageTemplate(imageTemplateRef)
+
         obj = Build(name = name, baseFlavor = baseFlavor,
                      imageType = imageType, stages = stages,
                      imageGroup = imageGroup,
-                     parentImageGroup = self.imageGroup)
+                     parentImageGroup = self.imageGroup,
+                     architectureRef = architectureRef,
+                     imageTemplateRef = imageTemplateRef,
+                     flavor = flavor, proddef = self)
         self.buildDefinition.append(obj)
 
     def clearBuildDefinition(self):
@@ -806,6 +840,22 @@
     def setPlatformUseLatest(self, useLatest):
         self._ensurePlatformExists()
         self.platform.useLatest = useLatest
+
+    def getPlatformArchitecture(self, name, default = -1):
+        pa = None
+        if self.platform:
+            pa = self.platform.getArchitecture(name, None)
+        if pa is not None or default != -1:
+            return pa
+        raise ArchitectureNotFoundError(name)
+
+    def getPlatformImageTemplate(self, name, default = -1):
+        pa = None
+        if self.platform:
+            pa = self.platform.getImageTemplate(name, None)
+        if pa is not None or default != -1:
+            return pa
+        raise ImageTemplateNotFoundError(name)
 
     def _ensurePlatformExists(self):
         if self.platform is None:
@@ -1191,12 +1241,14 @@
 
 class Build(xmllib.SerializableObject):
     __slots__ = [ 'name', 'baseFlavor', 'imageType', 'stages', 'imageGroup',
-                  'parentImageGroup', ]
+                  'parentImageGroup', 'architectureRef', 'imageTemplateRef',
+                  'flavor', '_proddef']
     tag = "build"
 
     def __init__(self, name = None, baseFlavor = None,
                  imageType = None, stages = None, imageGroup = None,
-                 parentImageGroup = None):
+                 parentImageGroup = None, architectureRef = None,
+                 imageTemplateRef = None, flavor = None, proddef = None):
         xmllib.SlotBasedSerializableObject.__init__(self)
         self.name = name
         self.baseFlavor = baseFlavor
@@ -1204,9 +1256,17 @@
         self.stages = stages or []
         self.imageGroup = imageGroup
         self.parentImageGroup = parentImageGroup
+        self.architectureRef = architectureRef
+        self.imageTemplateRef = imageTemplateRef
+        self.flavor = flavor
+        self._proddef = None
+        self.setProductDefinition(proddef)
 
     def __eq__(self, build):
         for key in self.__slots__:
+            if key == '_proddef':
+                # Ignore the weak ref
+                continue
             if self.__getattribute__(key) != build.__getattribute__(key):
                 return False
         return True
@@ -1229,7 +1289,49 @@
         return self.name
 
     def getBuildBaseFlavor(self):
-        return self.baseFlavor
+        if self.baseFlavor is not None:
+            return self.baseFlavor
+
+        # Grab flavor from the referenced components
+        if self._proddef is None:
+            return ''
+        pd = self._proddef
+        if pd is not None:
+            pd = pd()
+        if pd is None:
+            return ''
+
+        # Grab base flavor from platform + product
+        flv = conaryDeps.parseFlavor(pd.getBaseFlavor())
+
+        try:
+            if self.architectureRef:
+                methods = [ pd.getPlatformArchitecture, pd.getArchitecture ]
+                for meth in methods:
+                    obj = meth(self.architectureRef, None)
+                    if obj is None:
+                        continue
+                    nflv = conaryDeps.parseFlavor(obj.flavor)
+                    flv.union(nflv)
+            if self.imageTemplateRef:
+                methods = [ pd.getImageTemplate, pd.getPlatformImageTemplate ]
+                for meth in methods:
+                    obj = meth(self.imageTemplateRef, None)
+                    if obj is None:
+                        continue
+                    nflv = conaryDeps.parseFlavor(obj.flavor)
+                    flv.union(nflv)
+            if self.flavor:
+                nflv = conaryDeps.parseFlavor(self.flavor)
+                flv.union(nflv)
+        except RuntimeError, e:
+            raise ProductDefinitionError(str(e))
+        return str(flv)
+
+    def setProductDefinition(self, proddef):
+        self._proddef = None
+        if proddef:
+            self._proddef = weakref.ref(proddef)
 
     def _getName(self):
         return self.tag
@@ -1250,6 +1352,11 @@
             yield ('name', self.name)
         if self.baseFlavor is not None:
             yield ('baseFlavor', self.baseFlavor)
+        else:
+            for f in ['architectureRef', 'imageTemplateRef', 'flavor']:
+                attrVal = getattr(self, f)
+                if attrVal is not None:
+                    yield (f, attrVal)
 
 #}
 
@@ -1455,6 +1562,9 @@
                            for x in node.getChildren('stage') ],
                 imageGroup = imageGroup,
                 parentImageGroup = self.imageGroup,
+                architectureRef = node.getAttribute('architectureRef'),
+                imageTemplateRef = node.getAttribute('imageTemplateRef'),
+                flavor = node.getAttribute('flavor'),
                 )
             builds.append(pyobj)
 

From misa@rpath.com Wed Jul  2 20:06:09 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m62K69ZR010157
	for <rpath-common-commits@lists.rpath.com>; Wed, 2 Jul 2008 20:06:09 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m62K685e029346
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 2 Jul 2008 16:06:08 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m62K68r0008699
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 2 Jul 2008 16:06:08 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m62K680u019385
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 2 Jul 2008 16:06:08 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m62K68DR019380
	for rpath-common-commits@lists.rpath.com; Wed, 2 Jul 2008 16:06:08 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200807022006.m62K68DR019380@scc.eng.rpath.com>
Date: Wed, 02 Jul 2008 16:06:07 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Fixed schema for platforms within products
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 02 Jul 2008 20:06:09 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       xsd/rpd-1.2.xsd

Fixed schema for platforms within products

diff -r a56a0ee63c2c -r 84ee03bb066e xsd/rpd-1.2.xsd
--- a/xsd/rpd-1.2.xsd	Wed Jul 02 14:36:29 2008 -0400
+++ b/xsd/rpd-1.2.xsd	Wed Jul 02 15:24:19 2008 -0400
@@ -244,6 +244,10 @@
             minOccurs="0" maxOccurs="1" />
         <xsd:element name="factorySources" type="rpd:factorySourceListType"
             minOccurs="0" maxOccurs="1" />
+        <xsd:element name="architectures" type="rpd:architecturesType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="imageTemplates" type="rpd:imageTemplatesType"
+            minOccurs="0" maxOccurs="1" />
       </xsd:sequence>
       <!-- Source of this platform. Will get filled in to a name-version trove
       spec when the product definition is saved -->

From johnsonm@rpath.com Thu Jul 10 22:00:10 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m6AM0AGL030614
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 10 Jul 2008 22:00:10 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m6AM0A1W017835
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 10 Jul 2008 18:00:10 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m6AM0AsG006895
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 10 Jul 2008 18:00:10 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m6AM09MU010211
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 10 Jul 2008 18:00:09 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m6AM09eL010197
	for rpath-common-commits@lists.rpath.com;
	Thu, 10 Jul 2008 18:00:09 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200807102200.m6AM09eL010197@scc.eng.rpath.com>
Date: Thu, 10 Jul 2008 18:00:09 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Prepare for 1.3 schema changes
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 10 Jul 2008 22:00:10 -0000

user:        Michael K. Johnson <http://issues.rpath.com/>
files:       xsd/rpd-1.3.xsd

Prepare for 1.3 schema changes

diff -r 84ee03bb066e -r e6d298dad4e5 xsd/rpd-1.3.xsd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/xsd/rpd-1.3.xsd	Thu Jul 10 17:33:54 2008 -0400
@@ -0,0 +1,310 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema targetNamespace="http://www.rpath.com/permanent/rpd-1.2.xsd"
+        elementFormDefault="qualified"
+        attributeFormDefault="unqualified"
+        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+        xmlns:rpd="http://www.rpath.com/permanent/rpd-1.2.xsd"
+        xmlns="http://www.rpath.com/permanent/rpd-1.2.xsd">
+
+    <xsd:attributeGroup name="common">
+       <xsd:attribute name="name" type="xsd:string" />
+       <xsd:attribute name="autoResolve" type="xsd:boolean" />
+       <xsd:attribute name="baseFileName" type="xsd:string" />
+       <xsd:attribute name="installLabelPath" type="xsd:string" />
+    </xsd:attributeGroup>
+
+    <xsd:attributeGroup name="specialIsoTroves">
+        <xsd:attribute name="mediaTemplateTrove" type="rpd:troveSpecType" />
+        <xsd:attribute name="anacondaCustomTrove" type="rpd:troveSpecType" />
+        <xsd:attribute name="anacondaTemplatesTrove" type="rpd:troveSpecType" />
+    </xsd:attributeGroup>
+
+    <xsd:simpleType name="troveSpecType">
+        <xsd:restriction base="xsd:string"></xsd:restriction>
+        <!-- TODO: make a proper xsd:restriction here to validate troveSpecs -->
+    </xsd:simpleType>
+
+    <xsd:simpleType name="flavorStringType">
+        <xsd:restriction base="xsd:string">
+            <!-- TODO: make a proper xsd:restriction here to validate flavor xsd:strings -->
+            <!-- this regexp comes from conary.deps.deps.flavorRegexpStr, and it barfs inside of Eclipse (sgp) -->
+            <!-- <pattern value="^(use:)? *(?:((?:!|~!)?(?:~?!?(?:[0-9A-Za-z_-]+))(?:\\.(?:[0-9A-Za-z_-]+))? *(?:, *(?:!|~!)?(?:~?!?(?:[0-9A-Za-z_-]+))(?:\\.(?:[0-9A-Za-z_-]+))?)*)?)? *(?:(is:) *(?: *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?(?:((?:  * *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?)*))?))? *(?:(target:) *(?: *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?(?:((?:  * *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?)*))?))?$" /> -->
+        </xsd:restriction>
+    </xsd:simpleType>
+
+    <xsd:complexType name="stageType">
+        <xsd:attribute name="name" type="xsd:string" use="required" />
+        <xsd:attribute name="labelSuffix" type="xsd:string" use="required" />
+    </xsd:complexType>
+
+    <xsd:complexType name="stageListType">
+        <xsd:sequence>
+            <xsd:element name="stage" type="stageType" minOccurs="1" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="searchPathType">
+        <xsd:attribute name="troveName" type="xsd:string" />
+        <xsd:attribute name="label" type="xsd:string" />
+        <xsd:attribute name="version" type="xsd:string" />
+    </xsd:complexType>
+
+    <xsd:complexType name="searchPathListType">
+        <xsd:sequence>
+            <xsd:element name="searchPath" type="searchPathType" minOccurs="1" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="factorySourceListType">
+        <xsd:sequence>
+            <xsd:element name="factorySource" type="searchPathType" minOccurs="1" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+
+    <xsd:complexType name="amiImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="amiHugeDiskMountpoint" type="xsd:string" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="applianceIsoImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="maxIsoSize" type="xsd:positiveInteger" />
+        <xsd:attribute name="bugsUrl" type="xsd:string" />
+        <xsd:attribute name="showMediaCheck" type="xsd:boolean" />
+        <xsd:attribute name="betaNag" type="xsd:boolean" />
+        <xsd:attributeGroup ref="specialIsoTroves" />
+    </xsd:complexType>
+
+    <xsd:complexType name="installableIsoImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="maxIsoSize" type="xsd:positiveInteger" />
+        <xsd:attribute name="bugsUrl" type="xsd:string" />
+        <xsd:attribute name="showMediaCheck" type="xsd:boolean" />
+        <xsd:attribute name="betaNag" type="xsd:boolean" />
+        <xsd:attributeGroup ref="specialIsoTroves" />
+    </xsd:complexType>
+
+    <xsd:complexType name="liveIsoImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="unionfs" type="xsd:boolean" />
+        <xsd:attribute name="zisofs" type="xsd:boolean" />
+    </xsd:complexType>
+
+    <xsd:complexType name="netbootImageType">
+        <xsd:attributeGroup ref="common" />
+    </xsd:complexType>
+
+    <xsd:complexType name="rawFsImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="rawHdImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="tarballImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="updateIsoImageType">
+        <xsd:attribute name="baseFileName" type="xsd:string" />
+        <xsd:attribute name="mediaTemplateTrove" type="xsd:string" />
+    </xsd:complexType>
+
+    <xsd:complexType name="vhdImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="vhdDiskType">
+            <xsd:simpleType>
+                <xsd:restriction base="xsd:string">
+                    <xsd:enumeration value="fixed" />
+                    <xsd:enumeration value="dynamic" />
+                    <xsd:enumeration value="difference" />
+                </xsd:restriction>
+            </xsd:simpleType>
+        </xsd:attribute>
+    </xsd:complexType>
+
+    <xsd:complexType name="virtualIronImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="vhdDiskType">
+            <xsd:simpleType>
+                <xsd:restriction base="xsd:string">
+                    <xsd:enumeration value="fixed" />
+                    <xsd:enumeration value="dynamic" />
+                    <xsd:enumeration value="difference" />
+                </xsd:restriction>
+            </xsd:simpleType>
+        </xsd:attribute>
+    </xsd:complexType>
+
+    <xsd:complexType name="vmwareEsxImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="natNetworking" type="xsd:boolean" />
+        <xsd:attribute name="vmMemory" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="vmwareImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="natNetworking" type="xsd:boolean" />
+            <xsd:attribute name="diskAdapter">
+                <xsd:simpleType>
+                    <xsd:restriction base="xsd:string">
+                        <xsd:enumeration value="ide" />
+                        <xsd:enumeration value="lsilogic" />
+                    </xsd:restriction>
+                </xsd:simpleType>
+            </xsd:attribute>
+        <xsd:attribute name="vmSnapshots" type="xsd:boolean" />
+        <xsd:attribute name="vmMemory" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="xenOvaImageType">
+        <xsd:attributeGroup ref="common" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="vmMemory" type="xsd:nonNegativeInteger" />
+    </xsd:complexType>
+
+    <xsd:complexType name="buildDefinitionType">
+        <xsd:sequence>
+            <xsd:element name="build" type="rpd:buildType" minOccurs="1" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="buildType">
+        <xsd:sequence>
+            <xsd:choice>
+                <xsd:element name="amiImage" type="rpd:amiImageType" />
+                <xsd:element name="applianceIsoImage" type="rpd:applianceIsoImageType" />
+                <xsd:element name="installableIsoImage" type="rpd:installableIsoImageType" />
+                <xsd:element name="liveIsoImage" type="rpd:liveIsoImageType" />
+                <xsd:element name="netbootImage" type="rpd:netbootImageType" />
+                <xsd:element name="rawFsImage" type="rpd:rawFsImageType" />
+                <xsd:element name="rawHdImage" type="rpd:rawHdImageType" />
+                <xsd:element name="tarballImage" type="rpd:tarballImageType" />
+                <xsd:element name="updateIsoImage" type="rpd:updateIsoImageType" />
+                <xsd:element name="vhdImage" type="rpd:vhdImageType" />
+                <xsd:element name="virtualIronImage" type="rpd:virtualIronImageType" />
+                <xsd:element name="vmwareImage" type="rpd:vmwareImageType" />
+                <xsd:element name="vmwareEsxImage" type="rpd:vmwareEsxImageType" />
+                <xsd:element name="xenOvaImage" type="rpd:xenOvaImageType" />
+            </xsd:choice>
+            <xsd:element name="stage" minOccurs="0" maxOccurs="unbounded">
+                <xsd:complexType>
+                    <xsd:attribute name="ref" type="xsd:string" use="required"/>
+                </xsd:complexType>
+            </xsd:element>
+            <xsd:element name="imageGroup" type="rpd:troveSpecType" minOccurs="0" maxOccurs="1" />
+        </xsd:sequence>
+        <xsd:attribute name="name" type="xsd:string" use="required" />
+        <!-- deprecated, use arch and image template references -->
+        <xsd:attribute name="baseFlavor" type="rpd:flavorStringType" />
+        <!-- 1.2: architecture reference and image template reference -->
+        <xsd:attribute name="architectureRef" type="xsd:string" />
+        <xsd:attribute name="imageTemplateRef" type="xsd:string" />
+        <xsd:attribute name="flavor" type="rpd:flavorStringType" />
+    </xsd:complexType>
+
+    <xsd:complexType name="platformDefinitionType">
+      <xsd:sequence>
+        <xsd:element name="baseFlavor" type="rpd:flavorStringType"
+        minOccurs="0" maxOccurs="1" />
+        <xsd:element name="searchPaths" type="rpd:searchPathListType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="factorySources" type="rpd:factorySourceListType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="architectures" type="rpd:architecturesType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="imageTemplates" type="rpd:imageTemplatesType"
+            minOccurs="0" maxOccurs="1" />
+      </xsd:sequence>
+      <xsd:attribute name="version" type="xsd:string" />
+    </xsd:complexType>
+
+    <xsd:complexType name="platformType">
+      <xsd:sequence>
+        <xsd:element name="baseFlavor" type="rpd:flavorStringType"
+        minOccurs="0" maxOccurs="1" />
+        <xsd:element name="searchPaths" type="rpd:searchPathListType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="factorySources" type="rpd:factorySourceListType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="architectures" type="rpd:architecturesType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="imageTemplates" type="rpd:imageTemplatesType"
+            minOccurs="0" maxOccurs="1" />
+      </xsd:sequence>
+      <!-- Source of this platform. Will get filled in to a name-version trove
+      spec when the product definition is saved -->
+      <xsd:attribute name="sourceTrove" type="xsd:string" />
+      <!-- If useLatest is "true", the upstream platform is copied verbatim
+      here, with no settling to a specific version. This essentially is a
+      cache of the upstream platform.
+      -->
+      <xsd:attribute name="useLatest" type="xsd:boolean" />
+    </xsd:complexType>
+
+    <xsd:complexType name="nameFlavorType">
+        <xsd:attribute name="name" type="xsd:string" use="required" />
+        <xsd:attribute name="flavor" type="xsd:string" use="required" />
+    </xsd:complexType>
+
+    <xsd:complexType name="architecturesType">
+        <xsd:sequence>
+            <xsd:element name="architecture" type="nameFlavorType" minOccurs="0" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="imageTemplatesType">
+        <xsd:sequence>
+            <xsd:element name="imageTemplate" type="nameFlavorType" minOccurs="0" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <!-- First top-level element we allow -->
+    <xsd:element name="productDefinition">
+        <xsd:complexType>
+            <xsd:sequence>
+                <xsd:element name="productName" type="xsd:string" />
+                <xsd:element name="productShortname" type="xsd:string" />
+                <xsd:element name="productDescription" type="xsd:string" />
+                <xsd:element name="productVersion" type="xsd:string" />
+                <xsd:element name="productVersionDescription" type="xsd:string" />
+                <xsd:element name="conaryRepositoryHostname" type="xsd:string" />
+                <xsd:element name="conaryNamespace" type="xsd:string" />
+                <xsd:element name="imageGroup" type="rpd:troveSpecType" />
+                <xsd:element name="baseFlavor" type="rpd:flavorStringType" minOccurs="0" maxOccurs="1" />
+                <xsd:element name="stages" type="rpd:stageListType" />
+                <xsd:element name="searchPaths" type="rpd:searchPathListType" minOccurs="0" maxOccurs="1" />
+                <xsd:element name="factorySources" type="rpd:factorySourceListType" minOccurs="0" maxOccurs="1" />
+                <xsd:element name="architectures" type="rpd:architecturesType"
+                    minOccurs="0" maxOccurs="1" />
+                <xsd:element name="imageTemplates" type="rpd:imageTemplatesType"
+                    minOccurs="0" maxOccurs="1" />
+                <xsd:element name="buildDefinition" type="rpd:buildDefinitionType" />
+                <xsd:element name="platform" type="rpd:platformType" minOccurs="0" maxOccurs="1" />
+            </xsd:sequence>
+            <xsd:attribute name="version" type="xsd:string" />
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- Second top-level element we allow (although we do allow this as part
+    of a product definition -->
+    <xsd:element name="platformDefinition" type="rpd:platformDefinitionType" />
+
+</xsd:schema>

From johnsonm@rpath.com Thu Jul 10 22:00:11 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m6AM0B0d030617
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 10 Jul 2008 22:00:11 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m6AM0Bqj017840
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 10 Jul 2008 18:00:11 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m6AM0BxS006898
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 10 Jul 2008 18:00:11 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m6AM0Acw010252
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 10 Jul 2008 18:00:10 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m6AM0AXE010237
	for rpath-common-commits@lists.rpath.com;
	Thu, 10 Jul 2008 18:00:10 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200807102200.m6AM0AXE010237@scc.eng.rpath.com>
Date: Thu, 10 Jul 2008 18:00:10 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: schema version 1.3
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 10 Jul 2008 22:00:11 -0000

user:        Michael K. Johnson <http://issues.rpath.com/>
files:       xsd/rpd-1.3.xsd

schema version 1.3

diff -r e6d298dad4e5 -r 7fe2fe714712 xsd/rpd-1.3.xsd
--- a/xsd/rpd-1.3.xsd	Thu Jul 10 17:33:54 2008 -0400
+++ b/xsd/rpd-1.3.xsd	Thu Jul 10 17:34:27 2008 -0400
@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema targetNamespace="http://www.rpath.com/permanent/rpd-1.2.xsd"
+<xsd:schema targetNamespace="http://www.rpath.com/permanent/rpd-1.3.xsd"
         elementFormDefault="qualified"
         attributeFormDefault="unqualified"
         xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-        xmlns:rpd="http://www.rpath.com/permanent/rpd-1.2.xsd"
-        xmlns="http://www.rpath.com/permanent/rpd-1.2.xsd">
+        xmlns:rpd="http://www.rpath.com/permanent/rpd-1.3.xsd"
+        xmlns="http://www.rpath.com/permanent/rpd-1.3.xsd">
 
     <xsd:attributeGroup name="common">
        <xsd:attribute name="name" type="xsd:string" />

From johnsonm@rpath.com Thu Jul 10 22:00:12 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m6AM0CsL030620
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 10 Jul 2008 22:00:12 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m6AM0BbA017846
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 10 Jul 2008 18:00:12 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m6AM0BXX006902
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 10 Jul 2008 18:00:11 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m6AM0BZ0010280
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 10 Jul 2008 18:00:11 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m6AM0B4w010274
	for rpath-common-commits@lists.rpath.com;
	Thu, 10 Jul 2008 18:00:11 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200807102200.m6AM0B4w010274@scc.eng.rpath.com>
Date: Thu, 10 Jul 2008 18:00:11 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: NEWS edits for some recent commits
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 10 Jul 2008 22:00:12 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       NEWS

NEWS edits for some recent commits

diff -r 7fe2fe714712 -r 3045801c653a NEWS
--- a/NEWS	Thu Jul 10 17:34:27 2008 -0400
+++ b/NEWS	Thu Jul 10 17:42:45 2008 -0400
@@ -1,3 +1,13 @@
+Changes in @NEW@:
+  o API Changes:
+    * Richer flavor support: for both platform and product, there are
+      base flavor, image flavors, and architecture flavors that are
+      mixed together to discover flavors of groups to cook and images
+      to build. (RPCL-13)
+
+  o Schema Versions:
+    * 1.2: Initial support for richer flavors (RPCL-13)
+
 Changes in 0.1:
   o API Changes:
     * proddef.py moved into rpath_common module.

From misa@rpath.com Thu Jul 31 16:42:46 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m6VGgk2s013459
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 31 Jul 2008 16:42:46 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m6VGgkIU019369
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 31 Jul 2008 12:42:46 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m6VGgjF4014166
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 31 Jul 2008 12:42:45 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m6VGgj5C007499
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 31 Jul 2008 12:42:45 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m6VGgjX5007489
	for rpath-common-commits@lists.rpath.com;
	Thu, 31 Jul 2008 12:42:45 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200807311642.m6VGgjX5007489@scc.eng.rpath.com>
Date: Thu, 31 Jul 2008 12:42:45 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Allow arbitrary base labels when default does not
	work (RPCL-18)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 31 Jul 2008 16:42:46 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       NEWS rpath_common/proddef/_xmlConstants.py rpath_common/proddef/api1.py xsd/rpd-1.3.xsd

Allow arbitrary base labels when default does not work (RPCL-18)

diff -r 3045801c653a -r fccf26dac9a6 NEWS
--- a/NEWS	Thu Jul 10 17:42:45 2008 -0400
+++ b/NEWS	Thu Jul 31 12:42:11 2008 -0400
@@ -4,9 +4,13 @@
       base flavor, image flavors, and architecture flavors that are
       mixed together to discover flavors of groups to cook and images
       to build. (RPCL-13)
+    * When the default label prefix is not the label for a product,
+      a different label prefix ("baseLabel") can be provided.  Stage
+      suffixes will still be appended to this label. (RPCL-18)
 
   o Schema Versions:
     * 1.2: Initial support for richer flavors (RPCL-13)
+    * 1.3: Added baseLabel
 
 Changes in 0.1:
   o API Changes:
diff -r 3045801c653a -r fccf26dac9a6 rpath_common/proddef/_xmlConstants.py
--- a/rpath_common/proddef/_xmlConstants.py	Thu Jul 10 17:42:45 2008 -0400
+++ b/rpath_common/proddef/_xmlConstants.py	Thu Jul 31 12:42:11 2008 -0400
@@ -23,6 +23,6 @@
 @type xmlSchemaLocaltion: C{str}
 """
 
-defaultNamespaceList = [ "http://www.rpath.com/permanent/rpd-1.2.xsd" ]
+defaultNamespaceList = [ "http://www.rpath.com/permanent/rpd-1.3.xsd" ]
 xmlSchemaNamespace = "http://www.w3.org/2001/XMLSchema-instance"
-xmlSchemaLocation = "http://www.rpath.com/permanent/rpd-1.2.xsd rpd-1.2.xsd"
+xmlSchemaLocation = "http://www.rpath.com/permanent/rpd-1.3.xsd rpd-1.3.xsd"
diff -r 3045801c653a -r fccf26dac9a6 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Thu Jul 10 17:42:45 2008 -0400
+++ b/rpath_common/proddef/api1.py	Thu Jul 31 12:42:11 2008 -0400
@@ -85,7 +85,7 @@
 #}
 
 class BaseDefinition(object):
-    version = '1.2'
+    version = '1.3'
     defaultNamespace = _xmlConstants.defaultNamespaceList[0]
     xmlSchemaLocation = _xmlConstants.xmlSchemaLocation
 
@@ -383,6 +383,7 @@
             'conaryRepositoryHostname', None)
         self.conaryNamespace = getattr(xmlObj, 'conaryNamespace', None)
         self.imageGroup = getattr(xmlObj, 'imageGroup', None)
+        self.baseLabel = getattr(xmlObj, 'baseLabel', None)
         self.baseFlavor = getattr(xmlObj, 'baseFlavor', None)
         self.stages.extend(getattr(xmlObj, 'stages', []))
         self.searchPaths.extend(getattr(xmlObj, 'searchPaths', []))
@@ -892,6 +893,12 @@
                 ret.append(build)
         return ret
 
+    def setBaseLabel(self, label):
+        self.baseLabel = label
+
+    def getBaseLabel(self):
+        return self.baseLabel
+
     def getProductDefinitionLabel(self):
         """
         Method that returns the product definition's label
@@ -900,6 +907,9 @@
         @raises MissingInformationError: if there isn't enough information
             in the product definition to generate the label
         """
+        if self.baseLabel is not None:
+            return self.baseLabel
+
         hostname = self.getConaryRepositoryHostname()
         shortname = self.getProductShortname()
         namespace = self.getConaryNamespace()
@@ -1039,6 +1049,7 @@
         self.conaryRepositoryHostname = None
         self.conaryNamespace = None
         self.imageGroup = None
+        self.baseLabel = None
         self.buildDefinition = _BuildDefinition()
         self.platform = None
 
@@ -1248,7 +1259,8 @@
     def __init__(self, name = None, baseFlavor = None,
                  imageType = None, stages = None, imageGroup = None,
                  parentImageGroup = None, architectureRef = None,
-                 imageTemplateRef = None, flavor = None, proddef = None):
+                 imageTemplateRef = None, flavor = None, proddef = None,
+                 baseLabel = None):
         xmllib.SlotBasedSerializableObject.__init__(self)
         self.name = name
         self.baseFlavor = baseFlavor
@@ -1471,6 +1483,10 @@
             self.imageGroup = childNode.getText()
             return
 
+        if chName == self._makeAbsoluteName('baseLabel'):
+            self.baseLabel = childNode.getText()
+            return
+
         if chName == self._makeAbsoluteName('baseFlavor'):
             self.baseFlavor = childNode.getText()
             return
@@ -1660,6 +1676,12 @@
         if imageGroup:
             self.imageGroup.characters(imageGroup)
 
+        self.baseLabel = None
+        baseLabel = prodDef.getBaseLabel()
+        if baseLabel:
+            self.baseLabel = xmllib.StringNode(name = 'baseLabel')
+            self.baseLabel.characters(baseLabel)
+
         self.baseFlavor = xmllib.StringNode(name = 'baseFlavor')
         self.baseFlavor.characters(prodDef.baseFlavor)
 
@@ -1672,6 +1694,7 @@
                  self.conaryRepositoryHostname,
                  self.conaryNamespace,
                  self.imageGroup,
+                 self.baseLabel,
                  self.baseFlavor,
                  self.stages,
                  self.searchPaths, ]
diff -r 3045801c653a -r fccf26dac9a6 xsd/rpd-1.3.xsd
--- a/xsd/rpd-1.3.xsd	Thu Jul 10 17:42:45 2008 -0400
+++ b/xsd/rpd-1.3.xsd	Thu Jul 31 12:42:11 2008 -0400
@@ -288,6 +288,8 @@
                 <xsd:element name="conaryRepositoryHostname" type="xsd:string" />
                 <xsd:element name="conaryNamespace" type="xsd:string" />
                 <xsd:element name="imageGroup" type="rpd:troveSpecType" />
+                <!-- 1.3: explicit label when default is wrong (RPCL-18) -->
+                <xsd:element name="baseLabel" type="xsd:string" minOccurs="0" maxOccurs="1" />
                 <xsd:element name="baseFlavor" type="rpd:flavorStringType" minOccurs="0" maxOccurs="1" />
                 <xsd:element name="stages" type="rpd:stageListType" />
                 <xsd:element name="searchPaths" type="rpd:searchPathListType" minOccurs="0" maxOccurs="1" />

From misa@rpath.com Sat Aug  9 03:55:20 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m793tK5H016174
	for <rpath-common-commits@lists.rpath.com>; Sat, 9 Aug 2008 03:55:20 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m793tJPW011032
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 8 Aug 2008 23:55:20 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m793tJPY030387
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 8 Aug 2008 23:55:19 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m793tJDT028206
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 8 Aug 2008 23:55:19 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m793tJEB028188
	for rpath-common-commits@lists.rpath.com; Fri, 8 Aug 2008 23:55:19 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200808090355.m793tJEB028188@scc.eng.rpath.com>
Date: Fri, 08 Aug 2008 23:55:18 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Properly propagate useLatest (RPCL-29)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Sat, 09 Aug 2008 03:55:20 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Properly propagate useLatest (RPCL-29)

diff -r fccf26dac9a6 -r e0a05a300a5e rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Thu Jul 31 12:42:11 2008 -0400
+++ b/rpath_common/proddef/api1.py	Fri Aug 08 15:12:42 2008 -0400
@@ -1014,7 +1014,7 @@
         nplat = self.toPlatformDefinition()
         nplat.loadFromRepository(client, label)
         nplat.snapshotVersions(client)
-        self._rebase(label, nplat, useLatest = None)
+        self._rebase(label, nplat, useLatest = useLatest)
 
     def _rebase(self, label, nplat, useLatest = None):
         # Create a new platform definition

From misa@rpath.com Sat Aug  9 03:55:21 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m793tLf1016177
	for <rpath-common-commits@lists.rpath.com>; Sat, 9 Aug 2008 03:55:21 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m793tL8T011036
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 8 Aug 2008 23:55:21 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m793tKIA030392
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 8 Aug 2008 23:55:20 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m793tKcV028251
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 8 Aug 2008 23:55:20 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m793tK3p028235
	for rpath-common-commits@lists.rpath.com; Fri, 8 Aug 2008 23:55:20 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200808090355.m793tK3p028235@scc.eng.rpath.com>
Date: Fri, 08 Aug 2008 23:55:20 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Added support for secondary labels and
	promote maps (RPCL-17)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Sat, 09 Aug 2008 03:55:21 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       doc/example.py doc/example.xml rpath_common/proddef/api1.py xsd/rpd-1.3.xsd

Added support for secondary labels and promote maps (RPCL-17)

diff -r e0a05a300a5e -r 9dfdb3bab8a7 doc/example.py
--- a/doc/example.py	Fri Aug 08 15:12:42 2008 -0400
+++ b/doc/example.py	Fri Aug 08 23:54:54 2008 -0400
@@ -98,6 +98,14 @@
                         imageGroup='group-foo-dist',
                         imageType=prodDef.imageType('vmwareImage'))
 
+# Don't use addSecondaryLabel unless you know what you're doing
+prodDef.addSecondaryLabel('Xen', '-xen')
+prodDef.addSecondaryLabel('VMware', 'my@label:vmware')
+
+# Don't use addPromoteMap unless you know what you're doing
+prodDef.addPromoteMap('from@blah:1', 'to@blah:1')
+prodDef.addPromoteMap('from@bar:2', 'to@blip:2')
+
 prodDef.serialize(sys.stdout)
 sys.stdout.flush()
 sys.exit(0)
diff -r e0a05a300a5e -r 9dfdb3bab8a7 doc/example.xml
--- a/doc/example.xml	Fri Aug 08 15:12:42 2008 -0400
+++ b/doc/example.xml	Fri Aug 08 23:54:54 2008 -0400
@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='UTF-8'?>
-<productDefinition xmlns="http://www.rpath.com/permanent/rpd-0.1.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.rpath.com/permanent/rpd-0.1.xsd rpd-0.1.xsd" version="0.1">
+<productDefinition xmlns="http://www.rpath.com/permanent/rpd-1.3.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.rpath.com/permanent/rpd-1.3.xsd rpd-1.3.xsd" version="1.3">
   <productName>My Awesome Appliance</productName>
   <productShortname>awesome</productShortname>
   <productDescription>
@@ -37,6 +37,20 @@
   <factorySources>
     <factorySource troveName="group-factories" label="products.rpath.com@rpath:factories-1"/>
   </factorySources>
+  <secondaryLabels>
+    <secondaryLabel name="Xen">-xen</secondaryLabel>
+    <secondaryLabel name="VMware">my@label:vmware</secondaryLabel>
+  </secondaryLabels>
+  <promoteMaps>
+    <promoteMap>
+      <from>from@blah:1</from>
+      <to>to@blah:1</to>
+    </promoteMap>
+    <promoteMap>
+      <from>from@bar:2</from>
+      <to>to@blip:2</to>
+    </promoteMap>
+  </promoteMaps>
   <buildDefinition>
     <build baseFlavor="is: x86" name="x86 Installable ISO Build">
       <installableIsoImage/>
diff -r e0a05a300a5e -r 9dfdb3bab8a7 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Fri Aug 08 15:12:42 2008 -0400
+++ b/rpath_common/proddef/api1.py	Fri Aug 08 23:54:54 2008 -0400
@@ -395,6 +395,9 @@
         for bd in self.buildDefinition:
             bd.setProductDefinition(self)
         self.platform = getattr(xmlObj, 'platform', None)
+
+        self.secondaryLabels = getattr(xmlObj, 'secondaryLabels', None)
+        self.promoteMaps = getattr(xmlObj, 'promoteMaps', None)
 
         ver = xmlObj.getAttribute('version')
         if ver is not None and ver != self.version:
@@ -664,6 +667,25 @@
                 return self._getLabelForStage(stage)
         raise StageNotFoundError
 
+    def getSecondaryLabelsForStage(self, stageName):
+        stageObj = self.getStage(stageName)
+        if self.secondaryLabels is None:
+            return []
+        prefix = self.getProductDefinitionLabel()
+        labelSuffix = stageObj.labelSuffix or '' # this can be blank
+
+        ret = []
+        for sl in self.secondaryLabels:
+            name = sl.getName()
+            label = sl.getLabel()
+            if '@' in label:
+                # Just append the stage suffix
+                val = str(label + labelSuffix)
+            else:
+                val = str(prefix + label + labelSuffix)
+            ret.append((name, val))
+        return ret
+
     def getSearchPaths(self):
         """
         @return: the search paths from this product definition
@@ -857,6 +879,34 @@
         if pa is not None or default != -1:
             return pa
         raise ImageTemplateNotFoundError(name)
+
+    def addSecondaryLabel(self, name, label):
+        if self.secondaryLabels is None:
+            self.secondaryLabels = _SecondaryLabels()
+        self.secondaryLabels.append(SecondaryLabel(name, label))
+        return self
+
+    def getSecondaryLabels(self):
+        if self.secondaryLabels is None:
+            return []
+        return self.secondaryLabels
+
+    def clearSecondaryLabels(self):
+        self.secondaryLabels = None
+
+    def addPromoteMap(self, fromLabel, toLabel):
+        if self.promoteMaps is None:
+            self.promoteMaps = _PromoteMaps()
+        self.promoteMaps.append(PromoteMap(fromLabel, toLabel))
+        return self
+
+    def getPromoteMaps(self):
+        if self.promoteMaps is None:
+            return []
+        return self.promoteMaps
+
+    def clearPromoteMaps(self):
+        self.promoteMaps = None
 
     def _ensurePlatformExists(self):
         if self.platform is None:
@@ -1052,6 +1102,8 @@
         self.baseLabel = None
         self.buildDefinition = _BuildDefinition()
         self.platform = None
+        self.secondaryLabels = None
+        self.promoteMaps = None
 
     #}
 
@@ -1216,6 +1268,16 @@
 
 # pylint: disable-msg=R0903
 # Too few public methods (1/2): this is an interface
+class _SecondaryLabels(xmllib.SerializableList):
+    tag = "secondaryLabels"
+
+# pylint: disable-msg=R0903
+# Too few public methods (1/2): this is an interface
+class _PromoteMaps(xmllib.SerializableList):
+    tag = "promoteMaps"
+
+# pylint: disable-msg=R0903
+# Too few public methods (1/2): this is an interface
 class _Stage(xmllib.SlotBasedSerializableObject):
     __slots__ = [ 'name', 'labelSuffix' ]
     tag = "stage"
@@ -1372,6 +1434,59 @@
 
 #}
 
+class _BaseSerializableObject(xmllib.SerializableObject):
+    def _getName(self):
+        return self.tag
+
+    def _getLocalNamespaces(self):
+        return {}
+
+    def _iterAttributes(self):
+        for attr in self._attributes:
+            value = getattr(self, attr)
+            if value is not None:
+                yield (attr, value)
+
+class SecondaryLabel(_BaseSerializableObject):
+    __slots__ = [ 'name', 'label' ]
+    _attributes = [ 'name' ]
+
+    tag = 'secondaryLabel'
+
+    def __init__(self, name, label):
+        self.name = name
+        self.label = label
+
+    def getName(self):
+        return self.name
+
+    def getLabel(self):
+        return self.label
+
+    def _iterChildren(self):
+        return [ self.label ]
+
+class PromoteMap(_BaseSerializableObject):
+    __slots__ = [ 'fromLabel', 'toLabel' ]
+    _attributes = []
+
+    tag = 'promoteMap'
+
+    def __init__(self, fromLabel, toLabel):
+        self.fromLabel = xmllib.StringNode(name = 'from').characters(
+            fromLabel)
+        self.toLabel = xmllib.StringNode(name = 'to').characters(
+            toLabel)
+
+    def getFromLabel(self):
+        return self.fromLabel.getText()
+
+    def getToLabel(self):
+        return self.toLabel.getText()
+
+    def _iterChildren(self):
+        return [ self.fromLabel, self.toLabel ]
+
 class BaseXmlNode(xmllib.BaseNode):
     def __init__(self, attributes = None, nsMap = None, name = None):
         xmllib.BaseNode.__init__(self, attributes = attributes, nsMap = nsMap,
@@ -1526,6 +1641,14 @@
             self._addPlatform(childNode)
             return
 
+        if chName == self._makeAbsoluteName('secondaryLabels'):
+            self._addSecondaryLabels(childNode)
+            return
+
+        if chName == self._makeAbsoluteName('promoteMaps'):
+            self._addPromoteMaps(childNode)
+            return
+
     def _addStages(self, stagesNodes):
         stages = self.stages = _Stages()
         for node in stagesNodes:
@@ -1583,6 +1706,21 @@
                 flavor = node.getAttribute('flavor'),
                 )
             builds.append(pyobj)
+
+    def _addSecondaryLabels(self, childNode):
+        self.secondaryLabels = _SecondaryLabels()
+        for node in childNode.getChildren('secondaryLabel'):
+            name = node.getAttribute('name')
+            label = node.getText()
+            self.secondaryLabels.append(SecondaryLabel(name, label))
+        return self
+
+    def _addPromoteMaps(self, childNode):
+        self.promoteMaps = _PromoteMaps()
+        for node in childNode.getChildren('promoteMap'):
+            fromLabel = node.getChildren('from')[0].getText()
+            toLabel = node.getChildren('to')[0].getText()
+            self.promoteMaps.append(PromoteMap(fromLabel, toLabel))
 
 class _PlatformDefinition(BaseXmlNode):
     def finalize(self):
@@ -1685,6 +1823,9 @@
         self.baseFlavor = xmllib.StringNode(name = 'baseFlavor')
         self.baseFlavor.characters(prodDef.baseFlavor)
 
+        self.secondaryLabels = prodDef.getSecondaryLabels() or None
+        self.promoteMaps = prodDef.getPromoteMaps() or None
+
     def iterChildren(self):
         ret =  [ self.productName,
                  self.productShortname,
@@ -1704,6 +1845,10 @@
             ret.append(self.architectures)
         if self.imageTemplates:
             ret.append(self.imageTemplates)
+        if self.secondaryLabels:
+            ret.append(self.secondaryLabels)
+        if self.promoteMaps:
+            ret.append(self.promoteMaps)
         ret.append(self.buildDefinition)
         if self.platform:
             ret.append(self.platform)
diff -r e0a05a300a5e -r 9dfdb3bab8a7 xsd/rpd-1.3.xsd
--- a/xsd/rpd-1.3.xsd	Fri Aug 08 15:12:42 2008 -0400
+++ b/xsd/rpd-1.3.xsd	Fri Aug 08 23:54:54 2008 -0400
@@ -220,6 +220,33 @@
         <xsd:attribute name="flavor" type="rpd:flavorStringType" />
     </xsd:complexType>
 
+    <xsd:complexType name="secondaryLabelsType">
+      <xsd:sequence>
+        <xsd:element name="secondaryLabel" minOccurs="1" maxOccurs="unbounded">
+          <xsd:complexType>
+            <xsd:simpleContent>
+              <xsd:extension base="xsd:string">
+                <xsd:attribute name="name" type="xsd:string" use="required" />
+              </xsd:extension>
+            </xsd:simpleContent>
+          </xsd:complexType>
+        </xsd:element>
+      </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="promoteMapsType">
+      <xsd:sequence>
+        <xsd:element name="promoteMap" type="rpd:promoteMapType" minOccurs="1" maxOccurs="unbounded" />
+      </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="promoteMapType">
+      <xsd:sequence>
+        <xsd:element name="from" type="xsd:string" minOccurs="1" maxOccurs="1" />
+        <xsd:element name="to" type="xsd:string" minOccurs="1" maxOccurs="1" />
+      </xsd:sequence>
+    </xsd:complexType>
+
     <xsd:complexType name="platformDefinitionType">
       <xsd:sequence>
         <xsd:element name="baseFlavor" type="rpd:flavorStringType"
@@ -298,6 +325,8 @@
                     minOccurs="0" maxOccurs="1" />
                 <xsd:element name="imageTemplates" type="rpd:imageTemplatesType"
                     minOccurs="0" maxOccurs="1" />
+                <xsd:element name="secondaryLabels" type="rpd:secondaryLabelsType" minOccurs="0" maxOccurs="1" />
+                <xsd:element name="promoteMaps" type="rpd:promoteMapsType" minOccurs="0" maxOccurs="1" />
                 <xsd:element name="buildDefinition" type="rpd:buildDefinitionType" />
                 <xsd:element name="platform" type="rpd:platformType" minOccurs="0" maxOccurs="1" />
             </xsd:sequence>

From misa@rpath.com Fri Aug 15 02:26:06 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m7F2Q6pM031586
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 15 Aug 2008 02:26:06 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m7F2Q6V9006593
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 14 Aug 2008 22:26:06 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m7F2Q5pM012821
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 14 Aug 2008 22:26:05 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m7F2Q5rg011948
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 14 Aug 2008 22:26:05 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m7F2Q5bF011943
	for rpath-common-commits@lists.rpath.com;
	Thu, 14 Aug 2008 22:26:05 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200808150226.m7F2Q5bF011943@scc.eng.rpath.com>
Date: Thu, 14 Aug 2008 22:26:05 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Added doc strings (RPCL-17)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 15 Aug 2008 02:26:06 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Added doc strings (RPCL-17)

diff -r 9dfdb3bab8a7 -r 1b6a4dbdd141 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Fri Aug 08 23:54:54 2008 -0400
+++ b/rpath_common/proddef/api1.py	Thu Aug 14 22:25:58 2008 -0400
@@ -181,12 +181,30 @@
         self._addSource(troveName, label, version, _FactorySource, self.factorySources)
 
     def getArchitectures(self):
+        """
+        @return: all defined architectures
+        @rtype: C{list}
+        """
         return self.architectures
 
     def hasArchitecture(self, name):
+        """
+        @param name: architecture name
+        @type name: C{str}
+        @rtype: C{bool}
+        """
         return name in [ x.name for x in self.getArchitectures() ]
 
     def getArchitecture(self, name, default = -1):
+        """
+        @param name: architecture name
+        @type name: C{str}
+        @param default: if an architecture with this name is not found, return
+        this value. If not specified, C{ArchitectureNotFoundError} is raised.
+        @rtype: Architecture object
+        @raises C{ArchitectureNotFoundError}: if architecture is not found, and
+        no default was specified.
+        """
         arches = self.getArchitectures()
         for arch in arches:
             if arch.name == name:
@@ -196,16 +214,40 @@
         raise ArchitectureNotFoundError(name)
 
     def addArchitecture(self, name, flavor):
+        """
+        Add an architecture.
+        @param name: name of architecture to add
+        @type name: C{str}
+        @param flavor: flavor of architecture to add
+        @type flavor: C{str}
+        """
         obj = _Architecture(name = name, flavor = flavor)
         self.architectures.append(obj)
 
     def clearArchitectures(self):
+        """
+        Reset architectures.
+        """
         self.architectures = _Architectures()
 
     def getImageTemplates(self):
+        """
+        @return: all defined image templates
+        @rtype: C{list} of ImageTemplate objects
+        """
         return self.imageTemplates
 
     def getImageTemplate(self, name, default = -1):
+        """
+        @param name: image template name
+        @type name: C{str}
+        @param default: if an image template with this name is not found,
+            return this value. If not specified, C{ImageTemplateNotFoundError}
+            is raised.
+        @rtype: ImageTemplate object
+        @raises C{ImageTemplateNotFoundError}: if architecture is not found, and
+        no default was specified.
+        """
         templates = self.getImageTemplates()
         for tmpl in templates:
             if tmpl.name == name:
@@ -215,12 +257,21 @@
         raise ImageTemplateNotFoundError(name)
 
     def addImageTemplate(self, name, flavor):
+        """
+        Add an image template.
+        @param name: name of image template to add
+        @type name: C{str}
+        @param flavor: flavor of image template to add
+        @type flavor: C{str}
+        """
         obj = _ImageTemplate(name = name, flavor = flavor)
         self.imageTemplates.append(obj)
 
     def clearImageTemplates(self):
+        """
+        Reset image templates.
+        """
         self.imageTemplates = _ImageTemplates()
-
 
     def _addSource(self, troveName, label, version, cls, intList):
         "Internal function for adding a Source"
@@ -668,6 +719,12 @@
         raise StageNotFoundError
 
     def getSecondaryLabelsForStage(self, stageName):
+        """
+        @param stageName: A stage name
+        @type stageName: C{str}
+        @return: all secondary labels for the specified stage.
+        @rtype: C{list} of (name, value) tuples
+        """
         stageObj = self.getStage(stageName)
         if self.secondaryLabels is None:
             return []
@@ -838,33 +895,71 @@
                         self.platform.factorySources)
 
     def getPlatformBaseFlavor(self):
+        """
+        @return: the platform's base flavor
+        @rtype: C{str}
+        """
+
         if self.platform is None:
             return None
         return self.platform.baseFlavor
 
     def setPlatformBaseFlavor(self, baseFlavor):
+        """
+        Set the platform's base flavor.
+        @param baseFlavor: A flavor for the platform.
+        @type baseFlavor: C{str}
+        """
         self._ensurePlatformExists()
         self.platform.baseFlavor = baseFlavor
 
     def getPlatformSourceTrove(self):
+        """
+        @return: the source trove the for platform
+        @rtype: C{str}
+        """
         if self.platform is None:
             return None
         return self.platform.sourceTrove
 
     def setPlatformSourceTrove(self, sourceTrove):
+        """
+        Set the platform's source trove.
+        @param sourceTrove: the source trove name for the platform
+        @type sourceTrove: C{str}
+        """
         self._ensurePlatformExists()
         self.platform.sourceTrove = sourceTrove
 
     def getPlatformUseLatest(self):
+        """
+        @return: the platform's useLatest flag.
+        @rtype: C{bool} or None
+        """
         if self.platform is None:
             return None
         return self.platform.useLatest
 
     def setPlatformUseLatest(self, useLatest):
+        """
+        Set the platform's useLatest flag.
+        @param useLatest: value for useLatest flag
+        @type useLatest: C{bool}
+        """
         self._ensurePlatformExists()
         self.platform.useLatest = useLatest
 
     def getPlatformArchitecture(self, name, default = -1):
+        """
+        Retrieve the architecture with the specified name from the platform.
+        @param name: architecture name
+        @type name: C{str}
+        @param default: if an architecture with this name is not found, return
+        this value. If not specified, C{ArchitectureNotFoundError} is raised.
+        @rtype: Architecture object
+        @raises C{ArchitectureNotFoundError}: if architecture is not found, and
+        no default was specified.
+        """
         pa = None
         if self.platform:
             pa = self.platform.getArchitecture(name, None)
@@ -873,6 +968,17 @@
         raise ArchitectureNotFoundError(name)
 
     def getPlatformImageTemplate(self, name, default = -1):
+        """
+        Retrieve the image template with the specified name from the platform.
+        @param name: image template name
+        @type name: C{str}
+        @param default: if an image template with this name is not found,
+            return this value. If not specified, C{ImageTemplateNotFoundError}
+            is raised.
+        @rtype: ImageTemplate object
+        @raises C{ImageTemplateNotFoundError}: if architecture is not found, and
+        no default was specified.
+        """
         pa = None
         if self.platform:
             pa = self.platform.getImageTemplate(name, None)
@@ -881,31 +987,59 @@
         raise ImageTemplateNotFoundError(name)
 
     def addSecondaryLabel(self, name, label):
+        """
+        Add a secondary label to the product definition.
+        @param name: Name for the secondary label
+        @type name: C{str}
+        @param label: Lavel for the secondary label
+        @type label: C{str}
+        """
         if self.secondaryLabels is None:
             self.secondaryLabels = _SecondaryLabels()
         self.secondaryLabels.append(SecondaryLabel(name, label))
         return self
 
     def getSecondaryLabels(self):
+        """
+        @return: the seconary labels for this product definition.
+        @rtype: C{list}
+        """
         if self.secondaryLabels is None:
             return []
         return self.secondaryLabels
 
     def clearSecondaryLabels(self):
+        """
+        Reset secondary label list.
+        """
         self.secondaryLabels = None
 
     def addPromoteMap(self, fromLabel, toLabel):
+        """
+        Add a promote map.
+        @param fromLabel: Promote from this label.
+        @type fromLabel: C{str}
+        @param toLabel: Promote to this label.
+        @type toLabel: C{str}
+        """
         if self.promoteMaps is None:
             self.promoteMaps = _PromoteMaps()
         self.promoteMaps.append(PromoteMap(fromLabel, toLabel))
         return self
 
     def getPromoteMaps(self):
+        """
+        @return: all promote maps for this product definition.
+        @rtype: C{list} of C{PromoteMap} objects.
+        """
         if self.promoteMaps is None:
             return []
         return self.promoteMaps
 
     def clearPromoteMaps(self):
+        """
+        Reset promote maps.
+        """
         self.promoteMaps = None
 
     def _ensurePlatformExists(self):
@@ -944,9 +1078,18 @@
         return ret
 
     def setBaseLabel(self, label):
+        """
+        Set the base label for this product definition.
+        @param label: Value for the base label.
+        @type label: C{str}
+        """
         self.baseLabel = label
 
     def getBaseLabel(self):
+        """
+        @return: the base label for this product definition.
+        @rtype: C{str}
+        """
         return self.baseLabel
 
     def getProductDefinitionLabel(self):

From misa@rpath.com Sat Aug 16 03:49:38 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m7G3nc9Q002422
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 16 Aug 2008 03:49:38 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m7G3ncju021855
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 15 Aug 2008 23:49:38 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m7G3nbre023390
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 15 Aug 2008 23:49:37 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m7G3nb48012184
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 15 Aug 2008 23:49:37 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m7G3nbBg012167
	for rpath-common-commits@lists.rpath.com;
	Fri, 15 Aug 2008 23:49:37 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200808160349.m7G3nbBg012167@scc.eng.rpath.com>
Date: Fri, 15 Aug 2008 23:49:37 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Added platformName and platformVersionTrove
	(RPCL-30, RPCL-31)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Sat, 16 Aug 2008 03:49:38 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py xsd/rpd-1.3.xsd

Added platformName and platformVersionTrove (RPCL-30, RPCL-31)

diff -r 1b6a4dbdd141 -r ab57bca79fd0 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Thu Aug 14 22:25:58 2008 -0400
+++ b/rpath_common/proddef/api1.py	Fri Aug 15 16:30:00 2008 -0400
@@ -344,6 +344,11 @@
         self.factorySources = _FactorySources()
         self.architectures = _Architectures()
         self.imageTemplates = _ImageTemplates()
+
+    @classmethod
+    def _newNode(self, name, value):
+        node = xmllib.StringNode(name = name).characters(value)
+        return node
 
 class ProductDefinition(BaseDefinition):
     """
@@ -894,6 +899,24 @@
         self._addSource(troveName, label, version, _FactorySource,
                         self.platform.factorySources)
 
+    def getPlatformName(self):
+        if self.platform is None:
+            return None
+        return self.platform.getPlatformName()
+
+    def setPlatformName(self, platformName):
+        self._ensurePlatformExists()
+        self.platform.setPlatformName(platformName)
+
+    def getPlatformVersionTrove(self):
+        if self.platform is None:
+            return None
+        return self.platform.getPlatformVersionTrove()
+
+    def setPlatformVersionTrove(self, troveSpec):
+        self._ensurePlatformExists()
+        self.platform.setPlatformVersionTrove(troveSpec)
+
     def getPlatformBaseFlavor(self):
         """
         @return: the platform's base flavor
@@ -1187,6 +1210,9 @@
         for tmpl in self.getImageTemplates():
             nplat.addImageTemplate(name = tmpl.name, flavor = tmpl.flavor)
 
+        nplat.setPlatformName(self.getPlatformName())
+        nplat.setPlatformVersionTrove(self.getPlatformVersionTrove())
+
         return nplat
 
     def savePlatformToRepository(self, client, message = None):
@@ -1277,6 +1303,8 @@
         BaseDefinition._initFields(self)
         self.useLatest = None
         self.sourceTrove = None
+        self.platformName = None
+        self.platformVersionTrove = None
 
     def parseStream(self, stream, validate = False, schemaDir = None):
         """
@@ -1300,6 +1328,8 @@
         self.factorySources = getattr(xmlObj.platform, 'factorySources', None)
         self.architectures = getattr(xmlObj.platform, 'architectures', None)
         self.imageTemplates = getattr(xmlObj.platform, 'imageTemplates', None)
+        self.platformName = getattr(xmlObj.platform, 'platformName', None)
+        self.platformVersionTrove = getattr(xmlObj.platform, 'platformVersionTrove', None)
 
         for nsName, nsVal in xmlObj.iterNamespaces():
             if nsName is None and nsVal != self.defaultNamespace:
@@ -1378,6 +1408,29 @@
                 raise ProductDefinitionTroveNotFound("%s=%s" % (key[0], key[1]))
             nvf = troves[key][0]
             sp.version = str(nvf[1].trailingRevision())
+
+    def getPlatformName(self):
+        if self.platformName is None:
+            return None
+        return self.platformName.getText()
+
+    def setPlatformName(self, platformName):
+        if platformName is None:
+            self.platformName = None
+        else:
+            self.platformName = self._newNode('platformName', platformName)
+
+    def getPlatformVersionTrove(self):
+        if self.platformVersionTrove is None:
+            return None
+        return self.platformVersionTrove.getText()
+
+    def setPlatformVersionTrove(self, troveSpec):
+        if troveSpec is None:
+            self.platformVersionTrove = None
+        else:
+            self.platformVersionTrove = self._newNode('platformVersionTrove',
+            troveSpec)
 
 #{ Objects for the representation of ProductDefinition fields
 
@@ -1702,7 +1755,12 @@
         baseFlavorChildren = node.getChildren('baseFlavor')
         if baseFlavorChildren:
             self.platform.baseFlavor = baseFlavorChildren[0].getText()
-
+        chList = node.getChildren('platformName')
+        if chList:
+            self.platform.platformName = chList[0]
+        chList = node.getChildren('platformVersionTrove')
+        if chList:
+            self.platform.platformVersionTrove = chList[0]
 
 class _ProductDefinition(BaseXmlNode):
 
@@ -1883,10 +1941,17 @@
         self.architectures = platform.architectures
         self.imageTemplates = platform.imageTemplates
         self.baseFlavor = xmllib.StringNode(name = 'baseFlavor').characters(platform.baseFlavor)
+        self.platformName = platform.platformName
+        self.platformVersionTrove = platform.platformVersionTrove
         xmllib.BaseNode.__init__(self, attrs, namespaces, name=name)
 
     def iterChildren(self):
-        ret = [self.baseFlavor]
+        ret = []
+        if self.platformName is not None:
+            ret.append(self.platformName)
+        if self.platformVersionTrove is not None:
+            ret.append(self.platformVersionTrove)
+        ret.append(self.baseFlavor)
         if self.searchPaths:
             ret.append(self.searchPaths)
         if self.factorySources:
diff -r 1b6a4dbdd141 -r ab57bca79fd0 xsd/rpd-1.3.xsd
--- a/xsd/rpd-1.3.xsd	Thu Aug 14 22:25:58 2008 -0400
+++ b/xsd/rpd-1.3.xsd	Fri Aug 15 16:30:00 2008 -0400
@@ -249,6 +249,10 @@
 
     <xsd:complexType name="platformDefinitionType">
       <xsd:sequence>
+        <xsd:element name="platformName" type="xsd:string"
+        minOccurs="0" maxOccurs="1" />
+        <xsd:element name="platformVersionTrove" type="xsd:string"
+        minOccurs="0" maxOccurs="1" />
         <xsd:element name="baseFlavor" type="rpd:flavorStringType"
         minOccurs="0" maxOccurs="1" />
         <xsd:element name="searchPaths" type="rpd:searchPathListType"
@@ -265,6 +269,10 @@
 
     <xsd:complexType name="platformType">
       <xsd:sequence>
+        <xsd:element name="platformName" type="xsd:string"
+        minOccurs="0" maxOccurs="1" />
+        <xsd:element name="platformVersionTrove" type="xsd:string"
+        minOccurs="0" maxOccurs="1" />
         <xsd:element name="baseFlavor" type="rpd:flavorStringType"
         minOccurs="0" maxOccurs="1" />
         <xsd:element name="searchPaths" type="rpd:searchPathListType"

From misa@rpath.com Sat Aug 16 03:49:40 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m7G3neER002428
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 16 Aug 2008 03:49:40 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m7G3neUu021862
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 15 Aug 2008 23:49:40 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m7G3ndw5023402
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 15 Aug 2008 23:49:39 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m7G3nd1T012254
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 15 Aug 2008 23:49:39 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m7G3ndc7012241
	for rpath-common-commits@lists.rpath.com;
	Fri, 15 Aug 2008 23:49:39 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200808160349.m7G3ndc7012241@scc.eng.rpath.com>
Date: Fri, 15 Aug 2008 23:49:38 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Added autoLoadRecipes (RPCL-32)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Sat, 16 Aug 2008 03:49:40 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py xsd/rpd-1.3.xsd

Added autoLoadRecipes (RPCL-32)

diff -r ab57bca79fd0 -r 05db8bb2d459 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Fri Aug 15 16:30:00 2008 -0400
+++ b/rpath_common/proddef/api1.py	Fri Aug 15 23:33:10 2008 -0400
@@ -917,6 +917,20 @@
         self._ensurePlatformExists()
         self.platform.setPlatformVersionTrove(troveSpec)
 
+    def getPlatformAutoLoadRecipes(self):
+        if self.platform is None:
+            return []
+        return self.platform.getAutoLoadRecipes()
+
+    def addPlatformAutoLoadRecipe(self, troveName, label):
+        self._ensurePlatformExists()
+        self.platform.addAutoLoadRecipe(troveName, label)
+
+    def clearPlatformAutoLoadRecipes(self):
+        if self.platform is None:
+            return
+        self.platform.clearPlatformSearchPaths()
+
     def getPlatformBaseFlavor(self):
         """
         @return: the platform's base flavor
@@ -1213,6 +1227,9 @@
         nplat.setPlatformName(self.getPlatformName())
         nplat.setPlatformVersionTrove(self.getPlatformVersionTrove())
 
+        for alr in self.getPlatformAutoLoadRecipes():
+            nplat.addAutoLoadRecipe(alr.getTroveName(), alr.getLabel())
+
         return nplat
 
     def savePlatformToRepository(self, client, message = None):
@@ -1305,6 +1322,7 @@
         self.sourceTrove = None
         self.platformName = None
         self.platformVersionTrove = None
+        self.autoLoadRecipes = None
 
     def parseStream(self, stream, validate = False, schemaDir = None):
         """
@@ -1330,6 +1348,7 @@
         self.imageTemplates = getattr(xmlObj.platform, 'imageTemplates', None)
         self.platformName = getattr(xmlObj.platform, 'platformName', None)
         self.platformVersionTrove = getattr(xmlObj.platform, 'platformVersionTrove', None)
+        self.autoLoadRecipes = getattr(xmlObj.platform, 'autoLoadRecipes', None)
 
         for nsName, nsVal in xmlObj.iterNamespaces():
             if nsName is None and nsVal != self.defaultNamespace:
@@ -1432,6 +1451,20 @@
             self.platformVersionTrove = self._newNode('platformVersionTrove',
             troveSpec)
 
+    def clearAutoLoadRecipes(self):
+        self.autoLoadRecipes = None
+
+    def addAutoLoadRecipe(self, troveName = None, label = None):
+        if self.autoLoadRecipes is None:
+            self.autoLoadRecipes = _AutoLoadRecipes()
+        self.autoLoadRecipes.append(_AutoLoadRecipe(troveName, label))
+        return self
+
+    def getAutoLoadRecipes(self):
+        if self.autoLoadRecipes is None:
+            return []
+        return [ AutoLoadRecipe(x) for x in self.autoLoadRecipes ]
+
 #{ Objects for the representation of ProductDefinition fields
 
 class _Stages(xmllib.SerializableList):
@@ -1441,6 +1474,51 @@
 # Too few public methods (1/2): this is an interface
 class _SearchPaths(xmllib.SerializableList):
     tag = "searchPaths"
+
+class _SimpleElement(xmllib.SerializableObject):
+    _xmlTagName = None
+    def __init__(self, value, attributes = None):
+        self.value = value
+        self._attributes = attributes or {}
+    def _getName(self):
+        return self._xmlTagName
+    def _getLocalNamespaces(self):
+        return {}
+    def _iterAttributes(self):
+        return self._attributes.iteritems()
+    def _iterChildren(self):
+        if self.value is not None:
+            return [ self.value ]
+        return []
+
+# pylint: disable-msg=R0903
+# Too few public methods (1/2): this is an interface
+class _AutoLoadRecipes(xmllib.SerializableList):
+    tag = "autoLoadRecipes"
+
+class _AutoLoadRecipe(_SimpleElement):
+    _xmlTagName = 'autoLoadRecipe'
+    def __init__(self, troveName, label):
+        _SimpleElement.__init__(self, None,
+            dict(troveName = troveName, label = label))
+
+    def getTroveName(self):
+        return self._attributes.get('troveName')
+
+    def getLabel(self):
+        return self._attributes.get('label')
+
+class AutoLoadRecipe(object):
+    __slots__ = [ '_troveName', '_label' ]
+    def __init__(self, node):
+        self._troveName = node.getTroveName()
+        self._label = node.getLabel()
+
+    def getTroveName(self):
+        return self._troveName
+
+    def getLabel(self):
+        return self._label
 
 # pylint: disable-msg=R0903
 # Too few public methods (1/2): this is an interface
@@ -1761,6 +1839,14 @@
         chList = node.getChildren('platformVersionTrove')
         if chList:
             self.platform.platformVersionTrove = chList[0]
+        chList = node.getChildren('autoLoadRecipes')
+        if chList:
+            chList = chList[0].getChildren('autoLoadRecipe')
+            for child in chList:
+                troveName = child.getAttribute('troveName')
+                label = child.getAttribute('label')
+                self.platform.addAutoLoadRecipe(troveName, label)
+
 
 class _ProductDefinition(BaseXmlNode):
 
@@ -1943,6 +2029,7 @@
         self.baseFlavor = xmllib.StringNode(name = 'baseFlavor').characters(platform.baseFlavor)
         self.platformName = platform.platformName
         self.platformVersionTrove = platform.platformVersionTrove
+        self.autoLoadRecipes = platform.autoLoadRecipes
         xmllib.BaseNode.__init__(self, attrs, namespaces, name=name)
 
     def iterChildren(self):
@@ -1956,6 +2043,8 @@
             ret.append(self.searchPaths)
         if self.factorySources:
             ret.append(self.factorySources)
+        if self.autoLoadRecipes:
+            ret.append(self.autoLoadRecipes)
         if self.architectures:
             ret.append(self.architectures)
         if self.imageTemplates:
@@ -2045,8 +2134,9 @@
                  self.imageGroup,
                  self.baseLabel,
                  self.baseFlavor,
-                 self.stages,
-                 self.searchPaths, ]
+                 self.stages, ]
+        if self.searchPaths:
+            ret.append(self.searchPaths)
         if len(self.factorySources):
             ret.append(self.factorySources)
         if self.architectures:
diff -r ab57bca79fd0 -r 05db8bb2d459 xsd/rpd-1.3.xsd
--- a/xsd/rpd-1.3.xsd	Fri Aug 15 16:30:00 2008 -0400
+++ b/xsd/rpd-1.3.xsd	Fri Aug 15 23:33:10 2008 -0400
@@ -43,9 +43,17 @@
         </xsd:sequence>
     </xsd:complexType>
 
-    <xsd:complexType name="searchPathType">
+    <xsd:attributeGroup name="attrGroupNameLabel">
         <xsd:attribute name="troveName" type="xsd:string" />
         <xsd:attribute name="label" type="xsd:string" />
+    </xsd:attributeGroup>
+
+    <xsd:complexType name="nameLabelType">
+        <xsd:attributeGroup ref="attrGroupNameLabel" />
+    </xsd:complexType>
+
+    <xsd:complexType name="searchPathType">
+        <xsd:attributeGroup ref="attrGroupNameLabel" />
         <xsd:attribute name="version" type="xsd:string" />
     </xsd:complexType>
 
@@ -60,6 +68,13 @@
             <xsd:element name="factorySource" type="searchPathType" minOccurs="1" maxOccurs="unbounded" />
         </xsd:sequence>
     </xsd:complexType>
+
+    <xsd:complexType name="autoLoadRecipesType">
+        <xsd:sequence>
+            <xsd:element name="autoLoadRecipe" type="nameLabelType" minOccurs="1" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
 
 
     <xsd:complexType name="amiImageType">
@@ -259,6 +274,8 @@
             minOccurs="0" maxOccurs="1" />
         <xsd:element name="factorySources" type="rpd:factorySourceListType"
             minOccurs="0" maxOccurs="1" />
+        <xsd:element name="autoLoadRecipes" type="rpd:autoLoadRecipesType"
+            minOccurs="0" maxOccurs="1" />
         <xsd:element name="architectures" type="rpd:architecturesType"
             minOccurs="0" maxOccurs="1" />
         <xsd:element name="imageTemplates" type="rpd:imageTemplatesType"
@@ -270,14 +287,16 @@
     <xsd:complexType name="platformType">
       <xsd:sequence>
         <xsd:element name="platformName" type="xsd:string"
-        minOccurs="0" maxOccurs="1" />
+            minOccurs="0" maxOccurs="1" />
         <xsd:element name="platformVersionTrove" type="xsd:string"
-        minOccurs="0" maxOccurs="1" />
+            minOccurs="0" maxOccurs="1" />
         <xsd:element name="baseFlavor" type="rpd:flavorStringType"
-        minOccurs="0" maxOccurs="1" />
+            minOccurs="0" maxOccurs="1" />
         <xsd:element name="searchPaths" type="rpd:searchPathListType"
             minOccurs="0" maxOccurs="1" />
         <xsd:element name="factorySources" type="rpd:factorySourceListType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="autoLoadRecipes" type="rpd:autoLoadRecipesType"
             minOccurs="0" maxOccurs="1" />
         <xsd:element name="architectures" type="rpd:architecturesType"
             minOccurs="0" maxOccurs="1" />

From misa@rpath.com Sat Aug 16 03:49:41 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m7G3nfmS002434
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 16 Aug 2008 03:49:41 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m7G3nfdt021872
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 15 Aug 2008 23:49:41 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m7G3nenH023410
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 15 Aug 2008 23:49:41 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m7G3neew012299
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 15 Aug 2008 23:49:40 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m7G3nefo012293
	for rpath-common-commits@lists.rpath.com;
	Fri, 15 Aug 2008 23:49:40 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200808160349.m7G3nefo012293@scc.eng.rpath.com>
Date: Fri, 15 Aug 2008 23:49:40 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Doc strings (RPCL-30, RPCL-31, RPCL-32)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Sat, 16 Aug 2008 03:49:42 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Doc strings (RPCL-30, RPCL-31, RPCL-32)

diff -r 05db8bb2d459 -r 8d6bbebbb140 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Fri Aug 15 23:33:10 2008 -0400
+++ b/rpath_common/proddef/api1.py	Fri Aug 15 23:49:25 2008 -0400
@@ -900,36 +900,69 @@
                         self.platform.factorySources)
 
     def getPlatformName(self):
+        """
+        @return: The platform name.
+        @rtype: C{str}
+        """
         if self.platform is None:
             return None
         return self.platform.getPlatformName()
 
     def setPlatformName(self, platformName):
+        """
+        Set the platform name.
+        @param platformName: The platform name.
+        @type platformName: C{str}
+        """
         self._ensurePlatformExists()
         self.platform.setPlatformName(platformName)
 
     def getPlatformVersionTrove(self):
+        """
+        @return: the platform version trove.
+        @rtype: C{str}
+        """
         if self.platform is None:
             return None
         return self.platform.getPlatformVersionTrove()
 
     def setPlatformVersionTrove(self, troveSpec):
+        """
+        Set the platform version trove.
+        @param troveSpec: The platfrm version trove
+        @type platformName: C{str}
+        """
         self._ensurePlatformExists()
         self.platform.setPlatformVersionTrove(troveSpec)
 
     def getPlatformAutoLoadRecipes(self):
+        """
+        @return: auto load recipes.
+        @rtype: C{list} of C{AutoLoadRecipe}
+        """
         if self.platform is None:
             return []
         return self.platform.getAutoLoadRecipes()
 
     def addPlatformAutoLoadRecipe(self, troveName, label):
+        """
+        Add an auto load recipe
+        @param troveName: Trove name
+        @type troveName: C{str}
+        @param label: Label for the trove
+        @type label: C{str}
+        """
         self._ensurePlatformExists()
         self.platform.addAutoLoadRecipe(troveName, label)
 
     def clearPlatformAutoLoadRecipes(self):
+        """
+        Clear the list of auto load recipes for the platform
+        """
         if self.platform is None:
             return
         self.platform.clearPlatformSearchPaths()
+        return self
 
     def getPlatformBaseFlavor(self):
         """
@@ -1429,22 +1462,40 @@
             sp.version = str(nvf[1].trailingRevision())
 
     def getPlatformName(self):
+        """
+        @return: The platform name.
+        @rtype: C{str}
+        """
         if self.platformName is None:
             return None
         return self.platformName.getText()
 
     def setPlatformName(self, platformName):
+        """
+        Set the platform name.
+        @param platformName: The platform name.
+        @type platformName: C{str}
+        """
         if platformName is None:
             self.platformName = None
         else:
             self.platformName = self._newNode('platformName', platformName)
 
     def getPlatformVersionTrove(self):
+        """
+        @return: the platform version trove.
+        @rtype: C{str}
+        """
         if self.platformVersionTrove is None:
             return None
         return self.platformVersionTrove.getText()
 
     def setPlatformVersionTrove(self, troveSpec):
+        """
+        Set the platform version trove.
+        @param troveSpec: The platfrm version trove
+        @type platformName: C{str}
+        """
         if troveSpec is None:
             self.platformVersionTrove = None
         else:
@@ -1452,15 +1503,29 @@
             troveSpec)
 
     def clearAutoLoadRecipes(self):
+        """
+        Clear the list of auto load recipes for the platform
+        """
         self.autoLoadRecipes = None
 
     def addAutoLoadRecipe(self, troveName = None, label = None):
+        """
+        Add an auto load recipe
+        @param troveName: Trove name
+        @type troveName: C{str}
+        @param label: Label for the trove
+        @type label: C{str}
+        """
         if self.autoLoadRecipes is None:
             self.autoLoadRecipes = _AutoLoadRecipes()
         self.autoLoadRecipes.append(_AutoLoadRecipe(troveName, label))
         return self
 
     def getAutoLoadRecipes(self):
+        """
+        @return: auto load recipes.
+        @rtype: C{list} of C{AutoLoadRecipe}
+        """
         if self.autoLoadRecipes is None:
             return []
         return [ AutoLoadRecipe(x) for x in self.autoLoadRecipes ]
@@ -1515,9 +1580,17 @@
         self._label = node.getLabel()
 
     def getTroveName(self):
+        """
+        @return: the trove name for the auto load recipe
+        @rtype: C{str}
+        """
         return self._troveName
 
     def getLabel(self):
+        """
+        @return: the label for the auto load recipe
+        @rtype: C{str}
+        """
         return self._label
 
 # pylint: disable-msg=R0903

From misa@rpath.com Mon Aug 18 13:42:51 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m7IDgoR5013100
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 18 Aug 2008 13:42:50 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m7IDgoZx010338
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 18 Aug 2008 09:42:50 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m7IDgoqB027357
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 18 Aug 2008 09:42:50 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m7IDgokj008636
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 18 Aug 2008 09:42:50 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m7IDgnJ6008631
	for rpath-common-commits@lists.rpath.com;
	Mon, 18 Aug 2008 09:42:49 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200808181342.m7IDgnJ6008631@scc.eng.rpath.com>
Date: Mon, 18 Aug 2008 09:42:49 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Fixed an issue in clearPlatformLoadRecipes,
	and removed some dead code (RPCL-32)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 18 Aug 2008 13:42:51 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Fixed an issue in clearPlatformLoadRecipes, and removed some dead code (RPCL-32)

diff -r 8d6bbebbb140 -r f146c31a8914 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Fri Aug 15 23:49:25 2008 -0400
+++ b/rpath_common/proddef/api1.py	Mon Aug 18 09:42:22 2008 -0400
@@ -961,7 +961,7 @@
         """
         if self.platform is None:
             return
-        self.platform.clearPlatformSearchPaths()
+        self.platform.clearAutoLoadRecipes()
         return self
 
     def getPlatformBaseFlavor(self):
@@ -1552,8 +1552,6 @@
     def _iterAttributes(self):
         return self._attributes.iteritems()
     def _iterChildren(self):
-        if self.value is not None:
-            return [ self.value ]
         return []
 
 # pylint: disable-msg=R0903

From johnsonm@rpath.com Mon Aug 18 14:29:36 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m7IETaXa014549
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 18 Aug 2008 14:29:36 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m7IETaEo017303
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 18 Aug 2008 10:29:36 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m7IETaLv031092
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 18 Aug 2008 10:29:36 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m7IETZlr010753
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 18 Aug 2008 10:29:35 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m7IETZXA010748
	for rpath-common-commits@lists.rpath.com;
	Mon, 18 Aug 2008 10:29:35 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200808181429.m7IETZXA010748@scc.eng.rpath.com>
Date: Mon, 18 Aug 2008 10:29:35 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-common: Install in platlib instead of purelib
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 18 Aug 2008 14:29:37 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       Make.defs

Install in platlib instead of purelib

diff -r dba5b6c46426 -r 6c9af9c58f2e Make.defs
--- a/Make.defs	Wed Jun 25 18:48:54 2008 -0400
+++ b/Make.defs	Mon Aug 18 10:29:29 2008 -0400
@@ -16,9 +16,10 @@
 # VERSION can be overridden by snapshot builds to force incompatible versions
 
 export prefix = /usr
+export lib = $(shell arch | sed -r '/x86_64|ppc64|s390x|sparc64/{s/.*/lib64/;q};s/.*/lib/')
 export bindir = $(prefix)/bin
 export sbindir = $(prefix)/sbin
-export libdir = $(prefix)/lib
+export libdir = $(prefix)/$(lib)
 export libexecdir = $(prefix)/libexec
 export datadir = $(prefix)/share
 export mandir = $(datadir)/man

From johnsonm@rpath.com Mon Aug 18 14:29:41 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m7IETeIW014555
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 18 Aug 2008 14:29:40 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m7IETePx017324
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 18 Aug 2008 10:29:40 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m7IETe6n031100
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 18 Aug 2008 10:29:40 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m7IETdQ3010868
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 18 Aug 2008 10:29:39 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m7IETdpU010851
	for rpath-common-commits@lists.rpath.com;
	Mon, 18 Aug 2008 10:29:39 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200808181429.m7IETdpU010851@scc.eng.rpath.com>
Date: Mon, 18 Aug 2008 10:29:39 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: Install in platlib instead of purelib
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 18 Aug 2008 14:29:41 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       Make.defs

Install in platlib instead of purelib

diff -r a6eaa12c46dc -r 8c4fc054502d Make.defs
--- a/Make.defs	Wed Jul 02 15:31:08 2008 -0400
+++ b/Make.defs	Mon Aug 18 10:29:30 2008 -0400
@@ -16,9 +16,10 @@
 # VERSION can be overridden by snapshot builds to force incompatible versions
 
 export prefix = /usr
+export lib = $(shell arch | sed -r '/x86_64|ppc64|s390x|sparc64/{s/.*/lib64/;q};s/.*/lib/')
 export bindir = $(prefix)/bin
 export sbindir = $(prefix)/sbin
-export libdir = $(prefix)/lib
+export libdir = $(prefix)/$(lib)
 export libexecdir = $(prefix)/libexec
 export datadir = $(prefix)/share
 export mandir = $(datadir)/man

From johnsonm@rpath.com Mon Aug 18 14:29:44 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m7IETiVo014565
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 18 Aug 2008 14:29:44 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m7IETi1h017338
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 18 Aug 2008 10:29:44 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m7IETicQ031113
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 18 Aug 2008 10:29:44 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m7IETgEo010943
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 18 Aug 2008 10:29:42 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m7IETf3E010926
	for rpath-common-commits@lists.rpath.com;
	Mon, 18 Aug 2008 10:29:41 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200808181429.m7IETf3E010926@scc.eng.rpath.com>
Date: Mon, 18 Aug 2008 10:29:41 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Install in platlib instead of purelib
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 18 Aug 2008 14:29:45 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       Make.defs

Install in platlib instead of purelib

diff -r f146c31a8914 -r 19c2d10c77f5 Make.defs
--- a/Make.defs	Mon Aug 18 09:42:22 2008 -0400
+++ b/Make.defs	Mon Aug 18 10:29:31 2008 -0400
@@ -16,9 +16,10 @@
 # VERSION can be overridden by snapshot builds to force incompatible versions
 
 export prefix = /usr
+export lib = $(shell arch | sed -r '/x86_64|ppc64|s390x|sparc64/{s/.*/lib64/;q};s/.*/lib/')
 export bindir = $(prefix)/bin
 export sbindir = $(prefix)/sbin
-export libdir = $(prefix)/lib
+export libdir = $(prefix)/$(lib)
 export libexecdir = $(prefix)/libexec
 export datadir = $(prefix)/share
 export mandir = $(datadir)/man

From misa@rpath.com Tue Aug 19 02:38:48 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m7J2cmQU000346
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 19 Aug 2008 02:38:48 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m7J2claT011079
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 18 Aug 2008 22:38:47 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m7J2clG4023384
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 18 Aug 2008 22:38:47 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m7J2clvw011051
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 18 Aug 2008 22:38:47 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m7J2ckrR011029
	for rpath-common-commits@lists.rpath.com;
	Mon, 18 Aug 2008 22:38:46 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200808190238.m7J2ckrR011029@scc.eng.rpath.com>
Date: Mon, 18 Aug 2008 22:38:46 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Promote maps are per-stage (RPCL-17)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 19 Aug 2008 02:38:48 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       doc/example.py doc/example.xml rpath_common/proddef/api1.py xsd/rpd-1.3.xsd

Promote maps are per-stage (RPCL-17)

diff -r f146c31a8914 -r dd8f2ebe2f34 doc/example.py
--- a/doc/example.py	Mon Aug 18 09:42:22 2008 -0400
+++ b/doc/example.py	Mon Aug 18 22:38:13 2008 -0400
@@ -54,7 +54,11 @@
 prodDef.setImageGroup("group-awesome-dist")
 prodDef.setBaseFlavor(baseFlavor)
 prodDef.addStage(name='devel', labelSuffix='-devel')
-prodDef.addStage(name='qa', labelSuffix='-qa')
+
+# Don't use addPromoteMap unless you know what you're doing
+prodDef.addStage(name='qa', labelSuffix='-qa',
+    promoteMaps = [('from1@label11:devel', 'to1@label12:qa'),
+                   ('from2@label21:devel', 'to2@label22:qa') ])
 prodDef.addStage(name='release', labelSuffix='')
 
 prodDef.addSearchPath(troveName='group-rap-standard',
@@ -102,10 +106,6 @@
 prodDef.addSecondaryLabel('Xen', '-xen')
 prodDef.addSecondaryLabel('VMware', 'my@label:vmware')
 
-# Don't use addPromoteMap unless you know what you're doing
-prodDef.addPromoteMap('from@blah:1', 'to@blah:1')
-prodDef.addPromoteMap('from@bar:2', 'to@blip:2')
-
 prodDef.serialize(sys.stdout)
 sys.stdout.flush()
 sys.exit(0)
diff -r f146c31a8914 -r dd8f2ebe2f34 doc/example.xml
--- a/doc/example.xml	Mon Aug 18 09:42:22 2008 -0400
+++ b/doc/example.xml	Mon Aug 18 22:38:13 2008 -0400
@@ -27,7 +27,18 @@
     </baseFlavor>
   <stages>
     <stage labelSuffix="-devel" name="devel"/>
-    <stage labelSuffix="-qa" name="qa"/>
+    <stage labelSuffix="-qa" name="qa">
+      <promoteMaps>
+        <promoteMap>
+          <from>from1@label11:devel</from>
+          <to>to1@label12:qa</to>
+        </promoteMap>
+        <promoteMap>
+          <from>from2@label21:devel</from>
+          <to>to2@label22:qa</to>
+        </promoteMap>
+      </promoteMaps>
+    </stage>
     <stage labelSuffix="" name="release"/>
   </stages>
   <searchPaths>
@@ -41,16 +52,6 @@
     <secondaryLabel name="Xen">-xen</secondaryLabel>
     <secondaryLabel name="VMware">my@label:vmware</secondaryLabel>
   </secondaryLabels>
-  <promoteMaps>
-    <promoteMap>
-      <from>from@blah:1</from>
-      <to>to@blah:1</to>
-    </promoteMap>
-    <promoteMap>
-      <from>from@bar:2</from>
-      <to>to@blip:2</to>
-    </promoteMap>
-  </promoteMaps>
   <buildDefinition>
     <build baseFlavor="is: x86" name="x86 Installable ISO Build">
       <installableIsoImage/>
diff -r f146c31a8914 -r dd8f2ebe2f34 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Mon Aug 18 09:42:22 2008 -0400
+++ b/rpath_common/proddef/api1.py	Mon Aug 18 22:38:13 2008 -0400
@@ -453,7 +453,6 @@
         self.platform = getattr(xmlObj, 'platform', None)
 
         self.secondaryLabels = getattr(xmlObj, 'secondaryLabels', None)
-        self.promoteMaps = getattr(xmlObj, 'promoteMaps', None)
 
         ver = xmlObj.getAttribute('version')
         if ver is not None and ver != self.version:
@@ -667,15 +666,18 @@
                 return stage
         raise StageNotFoundError(stageName)
 
-    def addStage(self, name = None, labelSuffix = None):
+    def addStage(self, name = None, labelSuffix = None, promoteMaps = None):
         """
         Add a stage.
         @param name: the stage's name
         @type name: C{str} or C{None}
         @param labelSuffix: Label suffix (e.g. '-devel') for the stage
         @type labelSuffix: C{str} or C{None}
+        @param promoteMaps: list of promote maps for the stage
+        @type promoteMaps: C{list} of C{(fromLabel, toLabel)} tuples
         """
-        obj = _Stage(name = name, labelSuffix = labelSuffix)
+        obj = _Stage(name = name, labelSuffix = labelSuffix,
+            promoteMaps = promoteMaps)
         self.stages.append(obj)
 
     def clearStages(self):
@@ -1084,34 +1086,6 @@
         """
         self.secondaryLabels = None
 
-    def addPromoteMap(self, fromLabel, toLabel):
-        """
-        Add a promote map.
-        @param fromLabel: Promote from this label.
-        @type fromLabel: C{str}
-        @param toLabel: Promote to this label.
-        @type toLabel: C{str}
-        """
-        if self.promoteMaps is None:
-            self.promoteMaps = _PromoteMaps()
-        self.promoteMaps.append(PromoteMap(fromLabel, toLabel))
-        return self
-
-    def getPromoteMaps(self):
-        """
-        @return: all promote maps for this product definition.
-        @rtype: C{list} of C{PromoteMap} objects.
-        """
-        if self.promoteMaps is None:
-            return []
-        return self.promoteMaps
-
-    def clearPromoteMaps(self):
-        """
-        Reset promote maps.
-        """
-        self.promoteMaps = None
-
     def _ensurePlatformExists(self):
         if self.platform is None:
             self.platform = PlatformDefinition()
@@ -1624,13 +1598,25 @@
 # pylint: disable-msg=R0903
 # Too few public methods (1/2): this is an interface
 class _Stage(xmllib.SlotBasedSerializableObject):
-    __slots__ = [ 'name', 'labelSuffix' ]
+    __slots__ = [ 'name', 'labelSuffix', 'promoteMaps' ]
     tag = "stage"
 
-    def __init__(self, name = None, labelSuffix = None):
+    def __init__(self, name = None, labelSuffix = None, promoteMaps = None):
         xmllib.SlotBasedSerializableObject.__init__(self)
         self.name = name
         self.labelSuffix = labelSuffix
+        if not promoteMaps:
+            self.promoteMaps = None
+            return
+        self.promoteMaps = _PromoteMaps()
+        for ent in promoteMaps:
+            fromLabel, toLabel = ent[:2]
+            self.promoteMaps.append(PromoteMap(fromLabel, toLabel))
+
+    def getPromoteMaps(self):
+        if self.promoteMaps is None:
+            return []
+        return list(self.promoteMaps)
 
 class _SearchPath(xmllib.SlotBasedSerializableObject):
     __slots__ = [ 'troveName', 'label', 'version' ]
@@ -2003,10 +1989,6 @@
             self._addSecondaryLabels(childNode)
             return
 
-        if chName == self._makeAbsoluteName('promoteMaps'):
-            self._addPromoteMaps(childNode)
-            return
-
     def _addStages(self, stagesNodes):
         stages = self.stages = _Stages()
         for node in stagesNodes:
@@ -2014,6 +1996,23 @@
             pyObj = _Stage(name = node.getAttribute('name'),
                            labelSuffix = node.getAttribute('labelSuffix'))
             stages.append(pyObj)
+            self._addPromoteMaps(pyObj, node)
+
+    def _addPromoteMaps(self, stage, node):
+        """
+        Add the promote maps from the node to this stage
+        """
+        stage.promoteMaps = None
+        promoteMaps = _PromoteMaps()
+        nodeList = node.getChildren('promoteMaps')
+        if not nodeList:
+            return
+        for pmNode in nodeList[0].getChildren('promoteMap'):
+            fromLabel = pmNode.getChildren('from')[0].getText()
+            toLabel = pmNode.getChildren('to')[0].getText()
+            promoteMaps.append(PromoteMap(fromLabel, toLabel))
+        stage.promoteMaps = promoteMaps
+
 
     def _addSearchPaths(self, searchPaths):
         self.searchPaths = self._processSearchPaths(searchPaths)
@@ -2072,13 +2071,6 @@
             label = node.getText()
             self.secondaryLabels.append(SecondaryLabel(name, label))
         return self
-
-    def _addPromoteMaps(self, childNode):
-        self.promoteMaps = _PromoteMaps()
-        for node in childNode.getChildren('promoteMap'):
-            fromLabel = node.getChildren('from')[0].getText()
-            toLabel = node.getChildren('to')[0].getText()
-            self.promoteMaps.append(PromoteMap(fromLabel, toLabel))
 
 class _PlatformDefinition(BaseXmlNode):
     def finalize(self):
@@ -2192,7 +2184,6 @@
         self.baseFlavor.characters(prodDef.baseFlavor)
 
         self.secondaryLabels = prodDef.getSecondaryLabels() or None
-        self.promoteMaps = prodDef.getPromoteMaps() or None
 
     def iterChildren(self):
         ret =  [ self.productName,
@@ -2216,8 +2207,6 @@
             ret.append(self.imageTemplates)
         if self.secondaryLabels:
             ret.append(self.secondaryLabels)
-        if self.promoteMaps:
-            ret.append(self.promoteMaps)
         ret.append(self.buildDefinition)
         if self.platform:
             ret.append(self.platform)
diff -r f146c31a8914 -r dd8f2ebe2f34 xsd/rpd-1.3.xsd
--- a/xsd/rpd-1.3.xsd	Mon Aug 18 09:42:22 2008 -0400
+++ b/xsd/rpd-1.3.xsd	Mon Aug 18 22:38:13 2008 -0400
@@ -33,8 +33,11 @@
     </xsd:simpleType>
 
     <xsd:complexType name="stageType">
-        <xsd:attribute name="name" type="xsd:string" use="required" />
-        <xsd:attribute name="labelSuffix" type="xsd:string" use="required" />
+      <xsd:sequence>
+        <xsd:element name="promoteMaps" type="rpd:promoteMapsType" minOccurs="0" maxOccurs="1" />
+      </xsd:sequence>
+      <xsd:attribute name="name" type="xsd:string" use="required" />
+      <xsd:attribute name="labelSuffix" type="xsd:string" use="required" />
     </xsd:complexType>
 
     <xsd:complexType name="stageListType">
@@ -353,7 +356,6 @@
                 <xsd:element name="imageTemplates" type="rpd:imageTemplatesType"
                     minOccurs="0" maxOccurs="1" />
                 <xsd:element name="secondaryLabels" type="rpd:secondaryLabelsType" minOccurs="0" maxOccurs="1" />
-                <xsd:element name="promoteMaps" type="rpd:promoteMapsType" minOccurs="0" maxOccurs="1" />
                 <xsd:element name="buildDefinition" type="rpd:buildDefinitionType" />
                 <xsd:element name="platform" type="rpd:platformType" minOccurs="0" maxOccurs="1" />
             </xsd:sequence>

From mtharp@rpath.com Tue Aug 19 05:38:01 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m7J5c1pP003695
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 19 Aug 2008 05:38:01 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m7J5c1mX003143
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 19 Aug 2008 01:38:01 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m7J5c0mC003406
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 19 Aug 2008 01:38:00 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m7J5c0V1018067
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 19 Aug 2008 01:38:00 -0400
Received: (from mtharp@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m7J5c07w018062
	for rpath-common-commits@lists.rpath.com;
	Tue, 19 Aug 2008 01:38:00 -0400
From: Michael Tharp <mtharp@rpath.com>
Message-Id: <200808190538.m7J5c07w018062@scc.eng.rpath.com>
Date: Tue, 19 Aug 2008 01:38:00 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Function for building a promote map between
	stages. (RPCL-17)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailman-Approved-At: Tue, 19 Aug 2008 13:44:28 +0000
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 19 Aug 2008 05:38:01 -0000

tag:         tip
user:        Michael Tharp <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Function for building a promote map between stages. (RPCL-17)

diff -r 8e55225f81e2 -r 82ce445cb5f3 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Mon Aug 18 22:38:40 2008 -0400
+++ b/rpath_common/proddef/api1.py	Tue Aug 19 01:35:55 2008 -0400
@@ -742,13 +742,47 @@
         for sl in self.secondaryLabels:
             name = sl.getName()
             label = sl.getLabel()
-            if '@' in label:
-                # Just append the stage suffix
-                val = str(label + labelSuffix)
-            else:
-                val = str(prefix + label + labelSuffix)
-            ret.append((name, val))
+            fullLabel = self._getSecondaryLabel(label, labelSuffix)
+            ret.append((name, fullLabel))
         return ret
+
+    def getPromoteMapForStages(self, fromStage, toStage):
+        """
+        Construct a promote map from C{fromStage} to C{toStage}.
+        This will include the "simple" label, all secondary labels, and
+        all promote maps to C{toStage}.
+
+        @param fromStage: Name of stage to promote I{from}
+        @type  fromStage: C{str}
+        @param toStage: Name of stage to promote I{to}
+        @type  toStage: C{str}
+        @return: dictionary mapping labels on C{fromStage} to labels
+            on C{toStage}
+        @rtype: C{dict}
+        """
+        fromStageObj = self.getStage(fromStage)
+        toStageObj = self.getStage(toStage)
+
+        # Default mapping
+        fromTo = {self._getLabelForStage(fromStageObj):
+            self._getLabelForStage(toStageObj)}
+
+        # Secondary labels
+        if self.secondaryLabels is not None:
+            fromSuffix = fromStageObj.labelSuffix
+            toSuffix = toStageObj.labelSuffix
+            for secondaryLabel in self.secondaryLabels:
+                label = secondaryLabel.getLabel()
+                fromLabel = self._getSecondaryLabel(label, fromSuffix)
+                toLabel = self._getSecondaryLabel(label, toSuffix)
+                fromTo[fromLabel] = toLabel
+
+        # Promote maps
+        if toStageObj.promoteMaps is not None:
+            for map in toStageObj.promoteMaps:
+                fromTo[map.getFromLabel()] = map.getToLabel()
+
+        return fromTo
 
     def getSearchPaths(self):
         """
@@ -1063,7 +1097,7 @@
         Add a secondary label to the product definition.
         @param name: Name for the secondary label
         @type name: C{str}
-        @param label: Lavel for the secondary label
+        @param label: Label for the secondary label
         @type label: C{str}
         """
         if self.secondaryLabels is None:
@@ -1281,6 +1315,27 @@
             self.platform.addImageTemplate(name = item.name,
                                            flavor = item.flavor)
 
+    def _getSecondaryLabel(self, label, suffix):
+        """
+        Given a label from C{secondaryStages} and a C{suffix},
+        construct a complete "secondary" label.
+
+        @param label: Base label from C{secondaryStages} to use as
+            a prefix
+        @type  label: C{str}
+        @param suffix: Suffix to append to base label
+        @type  suffix: C{str}
+        @return: constructed secondary label
+        @rtype: C{str}
+        """
+        if '@' in label:
+            # Just append the stage suffix
+            return str(label + suffix)
+        else:
+            # Use the entire product label
+            prefix = self.getProductDefinitionLabel()
+            return str(prefix + label + suffix)
+
     def _initFields(self):
         BaseDefinition._initFields(self)
         self.stages = _Stages()
@@ -1296,7 +1351,6 @@
         self.buildDefinition = _BuildDefinition()
         self.platform = None
         self.secondaryLabels = None
-        self.promoteMaps = None
 
     #}
 

From misa@rpath.com Tue Aug 19 13:50:38 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m7JDoc83017450
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 19 Aug 2008 13:50:38 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m7JDobPd006057
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 19 Aug 2008 09:50:37 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m7JDobhp010117
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 19 Aug 2008 09:50:37 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m7JDob29004329
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 19 Aug 2008 09:50:37 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m7JDoaKN004320
	for rpath-common-commits@lists.rpath.com;
	Tue, 19 Aug 2008 09:50:36 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200808191350.m7JDoaKN004320@scc.eng.rpath.com>
Date: Tue, 19 Aug 2008 09:50:36 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Promote maps now have a name and a label (RPCL-17)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 19 Aug 2008 13:50:38 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       doc/example.xml rpath_common/proddef/api1.py xsd/rpd-1.3.xsd

Promote maps now have a name and a label (RPCL-17)

diff -r 8e55225f81e2 -r 3c94e629e38f doc/example.xml
--- a/doc/example.xml	Mon Aug 18 22:38:40 2008 -0400
+++ b/doc/example.xml	Tue Aug 19 09:49:49 2008 -0400
@@ -29,14 +29,8 @@
     <stage labelSuffix="-devel" name="devel"/>
     <stage labelSuffix="-qa" name="qa">
       <promoteMaps>
-        <promoteMap>
-          <from>from1@label11:devel</from>
-          <to>to1@label12:qa</to>
-        </promoteMap>
-        <promoteMap>
-          <from>from2@label21:devel</from>
-          <to>to2@label22:qa</to>
-        </promoteMap>
+        <promoteMap name="from1@label11:devel" label="to1@label12:qa"/>
+        <promoteMap name="from2@label21:devel" label="to2@label22:qa"/>
       </promoteMaps>
     </stage>
     <stage labelSuffix="" name="release"/>
diff -r 8e55225f81e2 -r 3c94e629e38f rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Mon Aug 18 22:38:40 2008 -0400
+++ b/rpath_common/proddef/api1.py	Tue Aug 19 09:49:49 2008 -0400
@@ -674,7 +674,7 @@
         @param labelSuffix: Label suffix (e.g. '-devel') for the stage
         @type labelSuffix: C{str} or C{None}
         @param promoteMaps: list of promote maps for the stage
-        @type promoteMaps: C{list} of C{(fromLabel, toLabel)} tuples
+        @type promoteMaps: C{list} of C{(mapName, mapLabel)} tuples
         """
         obj = _Stage(name = name, labelSuffix = labelSuffix,
             promoteMaps = promoteMaps)
@@ -1610,8 +1610,8 @@
             return
         self.promoteMaps = _PromoteMaps()
         for ent in promoteMaps:
-            fromLabel, toLabel = ent[:2]
-            self.promoteMaps.append(PromoteMap(fromLabel, toLabel))
+            mapName, mapLabel = ent[:2]
+            self.promoteMaps.append(PromoteMap(mapName, mapLabel))
 
     def getPromoteMaps(self):
         if self.promoteMaps is None:
@@ -1798,25 +1798,23 @@
         return [ self.label ]
 
 class PromoteMap(_BaseSerializableObject):
-    __slots__ = [ 'fromLabel', 'toLabel' ]
-    _attributes = []
+    __slots__ = [ 'name', 'label' ]
+    _attributes = __slots__
 
     tag = 'promoteMap'
 
-    def __init__(self, fromLabel, toLabel):
-        self.fromLabel = xmllib.StringNode(name = 'from').characters(
-            fromLabel)
-        self.toLabel = xmllib.StringNode(name = 'to').characters(
-            toLabel)
+    def __init__(self, mapName, mapLabel):
+        self.name = mapName
+        self.label = mapLabel
 
-    def getFromLabel(self):
-        return self.fromLabel.getText()
+    def getMapLabel(self):
+        return self.label
 
-    def getToLabel(self):
-        return self.toLabel.getText()
+    def getMapName(self):
+        return self.name
 
     def _iterChildren(self):
-        return [ self.fromLabel, self.toLabel ]
+        return []
 
 class BaseXmlNode(xmllib.BaseNode):
     def __init__(self, attributes = None, nsMap = None, name = None):
@@ -2008,9 +2006,9 @@
         if not nodeList:
             return
         for pmNode in nodeList[0].getChildren('promoteMap'):
-            fromLabel = pmNode.getChildren('from')[0].getText()
-            toLabel = pmNode.getChildren('to')[0].getText()
-            promoteMaps.append(PromoteMap(fromLabel, toLabel))
+            mapName = pmNode.getAttribute('name')
+            mapLabel = pmNode.getAttribute('label')
+            promoteMaps.append(PromoteMap(mapName, mapLabel))
         stage.promoteMaps = promoteMaps
 
 
diff -r 8e55225f81e2 -r 3c94e629e38f xsd/rpd-1.3.xsd
--- a/xsd/rpd-1.3.xsd	Mon Aug 18 22:38:40 2008 -0400
+++ b/xsd/rpd-1.3.xsd	Tue Aug 19 09:49:49 2008 -0400
@@ -259,10 +259,8 @@
     </xsd:complexType>
 
     <xsd:complexType name="promoteMapType">
-      <xsd:sequence>
-        <xsd:element name="from" type="xsd:string" minOccurs="1" maxOccurs="1" />
-        <xsd:element name="to" type="xsd:string" minOccurs="1" maxOccurs="1" />
-      </xsd:sequence>
+      <xsd:attribute name="name" type="xsd:string" use="required" />
+      <xsd:attribute name="label" type="xsd:string" use="required" />
     </xsd:complexType>
 
     <xsd:complexType name="platformDefinitionType">

From misa@rpath.com Tue Aug 19 13:50:40 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m7JDoeEx017456
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 19 Aug 2008 13:50:40 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m7JDodaX006079
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 19 Aug 2008 09:50:40 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m7JDoddk010127
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 19 Aug 2008 09:50:39 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m7JDodL6004393
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 19 Aug 2008 09:50:39 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m7JDodWe004378
	for rpath-common-commits@lists.rpath.com;
	Tue, 19 Aug 2008 09:50:39 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200808191350.m7JDodWe004378@scc.eng.rpath.com>
Date: Tue, 19 Aug 2008 09:50:38 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Branch merge
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 19 Aug 2008 13:50:40 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Branch merge

diff -r 3c94e629e38f -r 9f902b8f5b4d rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Tue Aug 19 09:49:49 2008 -0400
+++ b/rpath_common/proddef/api1.py	Tue Aug 19 09:50:31 2008 -0400
@@ -742,13 +742,47 @@
         for sl in self.secondaryLabels:
             name = sl.getName()
             label = sl.getLabel()
-            if '@' in label:
-                # Just append the stage suffix
-                val = str(label + labelSuffix)
-            else:
-                val = str(prefix + label + labelSuffix)
-            ret.append((name, val))
+            fullLabel = self._getSecondaryLabel(label, labelSuffix)
+            ret.append((name, fullLabel))
         return ret
+
+    def getPromoteMapForStages(self, fromStage, toStage):
+        """
+        Construct a promote map from C{fromStage} to C{toStage}.
+        This will include the "simple" label, all secondary labels, and
+        all promote maps to C{toStage}.
+
+        @param fromStage: Name of stage to promote I{from}
+        @type  fromStage: C{str}
+        @param toStage: Name of stage to promote I{to}
+        @type  toStage: C{str}
+        @return: dictionary mapping labels on C{fromStage} to labels
+            on C{toStage}
+        @rtype: C{dict}
+        """
+        fromStageObj = self.getStage(fromStage)
+        toStageObj = self.getStage(toStage)
+
+        # Default mapping
+        fromTo = {self._getLabelForStage(fromStageObj):
+            self._getLabelForStage(toStageObj)}
+
+        # Secondary labels
+        if self.secondaryLabels is not None:
+            fromSuffix = fromStageObj.labelSuffix
+            toSuffix = toStageObj.labelSuffix
+            for secondaryLabel in self.secondaryLabels:
+                label = secondaryLabel.getLabel()
+                fromLabel = self._getSecondaryLabel(label, fromSuffix)
+                toLabel = self._getSecondaryLabel(label, toSuffix)
+                fromTo[fromLabel] = toLabel
+
+        # Promote maps
+        if toStageObj.promoteMaps is not None:
+            for map in toStageObj.promoteMaps:
+                fromTo[map.getFromLabel()] = map.getToLabel()
+
+        return fromTo
 
     def getSearchPaths(self):
         """
@@ -1063,7 +1097,7 @@
         Add a secondary label to the product definition.
         @param name: Name for the secondary label
         @type name: C{str}
-        @param label: Lavel for the secondary label
+        @param label: Label for the secondary label
         @type label: C{str}
         """
         if self.secondaryLabels is None:
@@ -1281,6 +1315,27 @@
             self.platform.addImageTemplate(name = item.name,
                                            flavor = item.flavor)
 
+    def _getSecondaryLabel(self, label, suffix):
+        """
+        Given a label from C{secondaryStages} and a C{suffix},
+        construct a complete "secondary" label.
+
+        @param label: Base label from C{secondaryStages} to use as
+            a prefix
+        @type  label: C{str}
+        @param suffix: Suffix to append to base label
+        @type  suffix: C{str}
+        @return: constructed secondary label
+        @rtype: C{str}
+        """
+        if '@' in label:
+            # Just append the stage suffix
+            return str(label + suffix)
+        else:
+            # Use the entire product label
+            prefix = self.getProductDefinitionLabel()
+            return str(prefix + label + suffix)
+
     def _initFields(self):
         BaseDefinition._initFields(self)
         self.stages = _Stages()
@@ -1296,7 +1351,6 @@
         self.buildDefinition = _BuildDefinition()
         self.platform = None
         self.secondaryLabels = None
-        self.promoteMaps = None
 
     #}
 

From misa@rpath.com Tue Aug 19 16:53:56 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m7JGruoi022740
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 19 Aug 2008 16:53:56 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m7JGruGl009012
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 19 Aug 2008 12:53:56 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m7JGruv4025998
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 19 Aug 2008 12:53:56 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m7JGrtiI012615
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 19 Aug 2008 12:53:55 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m7JGrtu4012610
	for rpath-common-commits@lists.rpath.com;
	Tue, 19 Aug 2008 12:53:55 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200808191653.m7JGrtu4012610@scc.eng.rpath.com>
Date: Tue, 19 Aug 2008 12:53:55 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Updated (after renaming)
	getPromoteMapsForStages (RPCL-17)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 19 Aug 2008 16:53:57 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Updated (after renaming) getPromoteMapsForStages (RPCL-17)

diff -r 9f902b8f5b4d -r 02a29fc064b9 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Tue Aug 19 09:50:31 2008 -0400
+++ b/rpath_common/proddef/api1.py	Tue Aug 19 12:53:22 2008 -0400
@@ -746,7 +746,7 @@
             ret.append((name, fullLabel))
         return ret
 
-    def getPromoteMapForStages(self, fromStage, toStage):
+    def getPromoteMapsForStages(self, fromStage, toStage):
         """
         Construct a promote map from C{fromStage} to C{toStage}.
         This will include the "simple" label, all secondary labels, and
@@ -778,9 +778,13 @@
                 fromTo[fromLabel] = toLabel
 
         # Promote maps
-        if toStageObj.promoteMaps is not None:
-            for map in toStageObj.promoteMaps:
-                fromTo[map.getFromLabel()] = map.getToLabel()
+        promoteMapsDest = dict((x.getMapName(), x.getMapLabel())
+            for x in toStageObj.getPromoteMaps())
+        for pm in fromStageObj.getPromoteMaps():
+            mapName = pm.getMapName()
+            if mapName not in promoteMapsDest:
+                continue
+            fromTo[pm.getMapLabel()] = promoteMapsDest[mapName]
 
         return fromTo
 

From misa@rpath.com Tue Aug 19 18:01:07 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m7JI16KB024645
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 19 Aug 2008 18:01:06 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m7JI16uO020231
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 19 Aug 2008 14:01:06 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m7JI16F7031228
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 19 Aug 2008 14:01:06 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m7JI15T1015415
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 19 Aug 2008 14:01:05 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m7JI15EW015410
	for rpath-common-commits@lists.rpath.com;
	Tue, 19 Aug 2008 14:01:05 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200808191801.m7JI15EW015410@scc.eng.rpath.com>
Date: Tue, 19 Aug 2008 14:01:05 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Grab only the trailing label out of the
	version (RPCL-34)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 19 Aug 2008 18:01:07 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Grab only the trailing label out of the version (RPCL-34)

diff -r 02a29fc064b9 -r cdbb918c68c0 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Tue Aug 19 12:53:22 2008 -0400
+++ b/rpath_common/proddef/api1.py	Tue Aug 19 14:00:59 2008 -0400
@@ -1287,7 +1287,9 @@
             troveSpec = self.getPlatformSourceTrove()
             if troveSpec:
                 tn, tv, tf = cmdline.parseTroveSpec(troveSpec)
-                label = tv
+                if not tv.startswith('/'):
+                    tv = "/" + tv
+                label = str(conaryVersions.VersionFromString(tv).trailingLabel())
             else:
                 label = None
         if label is None:

From mtharp@rpath.com Mon Aug 25 19:21:53 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m7PJLrqu013141
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 25 Aug 2008 19:21:53 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m7PJLq8g001591
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 25 Aug 2008 15:21:52 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m7PJLq3a025779
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 25 Aug 2008 15:21:52 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m7PJLqoQ011367
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 25 Aug 2008 15:21:52 -0400
Received: (from mtharp@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m7PJLqTr011362
	for rpath-common-commits@lists.rpath.com;
	Mon, 25 Aug 2008 15:21:52 -0400
From: Michael Tharp <mtharp@rpath.com>
Message-Id: <200808251921.m7PJLqTr011362@scc.eng.rpath.com>
Date: Mon, 25 Aug 2008 15:21:52 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Don't run pylint by default.
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 25 Aug 2008 19:21:53 -0000

tag:         tip
user:        Michael Tharp <https://issues.rpath.com/>
files:       Makefile

Don't run pylint by default.

diff -r cdbb918c68c0 -r 94e6fb57740f Makefile
--- a/Makefile	Tue Aug 19 14:00:59 2008 -0400
+++ b/Makefile	Mon Aug 25 15:21:36 2008 -0400
@@ -22,7 +22,7 @@
 # the name of packages containing a product definition
 export DISTDIR = $(TOPDIR)/rpath-product-definition-$(VERSION)
 
-SUBDIRS=rpath_common xsd doc pylint
+SUBDIRS=rpath_common xsd doc
 
 dist_files = $(extra_files)
 

From johnsonm@rpath.com Tue Aug 26 17:39:45 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m7QHdjIV015643
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 26 Aug 2008 17:39:45 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m7QHdiRf013594
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 26 Aug 2008 13:39:44 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m7QHdiHv005984
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 26 Aug 2008 13:39:44 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m7QHdire006657
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 26 Aug 2008 13:39:44 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m7QHdhDG006652
	for rpath-common-commits@lists.rpath.com;
	Tue, 26 Aug 2008 13:39:43 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200808261739.m7QHdhDG006652@scc.eng.rpath.com>
Date: Tue, 26 Aug 2008 13:39:43 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: finish fixing bad branch merge
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 26 Aug 2008 17:39:45 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       NEWS

finish fixing bad branch merge

diff -r 8c4fc054502d -r 1801c27f7054 NEWS
--- a/NEWS	Mon Aug 18 10:29:30 2008 -0400
+++ b/NEWS	Tue Aug 26 13:39:36 2008 -0400
@@ -5,8 +5,5 @@
 
 Changes in 0.1:
   o API Changes:
-    * xmldata.py moved into rpath_common module as xmllib
-
-  o Bug Fixes:
     * xmldata.py moved from Conary into rpath_common module as xmllib,
       and interface significantly changed.

From johnsonm@rpath.com Tue Aug 26 17:43:03 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m7QHh3QT015744
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 26 Aug 2008 17:43:03 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m7QHh3FU015009
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 26 Aug 2008 13:43:03 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m7QHh2Xe006298
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 26 Aug 2008 13:43:02 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m7QHh2O8006946
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 26 Aug 2008 13:43:02 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m7QHh2YU006931
	for rpath-common-commits@lists.rpath.com;
	Tue, 26 Aug 2008 13:43:02 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200808261743.m7QHh2YU006931@scc.eng.rpath.com>
Date: Tue, 26 Aug 2008 13:43:02 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-common: Release version 0.2
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 26 Aug 2008 17:43:03 -0000

tag:         rpath-common-0.2
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       Make.defs NEWS

Release version 0.2

diff -r 6c9af9c58f2e -r 90f582907dc1 Make.defs
--- a/Make.defs	Mon Aug 18 10:29:29 2008 -0400
+++ b/Make.defs	Tue Aug 26 13:42:41 2008 -0400
@@ -12,7 +12,7 @@
 # full details.
 #
 
-VERSION=0.1
+VERSION=0.2
 # VERSION can be overridden by snapshot builds to force incompatible versions
 
 export prefix = /usr
diff -r 6c9af9c58f2e -r 90f582907dc1 NEWS
--- a/NEWS	Mon Aug 18 10:29:29 2008 -0400
+++ b/NEWS	Tue Aug 26 13:42:41 2008 -0400
@@ -1,2 +1,6 @@
+Changes in 0.2:
+  o Install in platform library directory instead of pure python
+    library directory.
+
 Changes in 0.1:
   o Initial public release

From johnsonm@rpath.com Tue Aug 26 17:43:05 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m7QHh4oG015750
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 26 Aug 2008 17:43:04 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m7QHh4Gd015024
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 26 Aug 2008 13:43:04 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m7QHh42K006303
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 26 Aug 2008 13:43:04 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m7QHh4CB006977
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 26 Aug 2008 13:43:04 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m7QHh3PH006972
	for rpath-common-commits@lists.rpath.com;
	Tue, 26 Aug 2008 13:43:03 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200808261743.m7QHh3PH006972@scc.eng.rpath.com>
Date: Tue, 26 Aug 2008 13:43:03 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-common: Added tag rpath-common-0.2 for changeset
 90f582907dc1
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 26 Aug 2008 17:43:05 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       .hgtags

Added tag rpath-common-0.2 for changeset 90f582907dc1

diff -r 90f582907dc1 -r 6f213cfdce72 .hgtags
--- a/.hgtags	Tue Aug 26 13:42:41 2008 -0400
+++ b/.hgtags	Tue Aug 26 13:42:51 2008 -0400
@@ -1,1 +1,2 @@
 a4a457a2c3637d84b40c87e9444b39b9603846bc rpath-common-0.1
+90f582907dc12a8a9c4315a55da8388d37cb8a19 rpath-common-0.2

From johnsonm@rpath.com Tue Aug 26 18:18:35 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m7QIIZQF016741
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 26 Aug 2008 18:18:35 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m7QIIZuP023415
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 26 Aug 2008 14:18:35 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m7QIIYjm009361
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 26 Aug 2008 14:18:35 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m7QIIYQM009684
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 26 Aug 2008 14:18:34 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m7QIIYOF009679
	for rpath-common-commits@lists.rpath.com;
	Tue, 26 Aug 2008 14:18:34 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200808261818.m7QIIYOF009679@scc.eng.rpath.com>
Date: Tue, 26 Aug 2008 14:18:34 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: release version 0.2
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 26 Aug 2008 18:18:35 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       Make.defs NEWS

release version 0.2

diff -r 1801c27f7054 -r 5fa829c9faff Make.defs
--- a/Make.defs	Tue Aug 26 13:39:36 2008 -0400
+++ b/Make.defs	Tue Aug 26 14:18:26 2008 -0400
@@ -12,7 +12,7 @@
 # full details.
 #
 
-VERSION=0.1
+VERSION=0.2
 # VERSION can be overridden by snapshot builds to force incompatible versions
 
 export prefix = /usr
diff -r 1801c27f7054 -r 5fa829c9faff NEWS
--- a/NEWS	Tue Aug 26 13:39:36 2008 -0400
+++ b/NEWS	Tue Aug 26 14:18:26 2008 -0400
@@ -1,4 +1,4 @@
-Changes in @NEW@:
+Changes in 0.2:
   o Bug Fixes:
     * parseFile method now seeks before and after attempting to read
       the stream.

From johnsonm@rpath.com Tue Aug 26 18:28:06 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m7QIS65V017121
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 26 Aug 2008 18:28:06 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m7QIS57k024537
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 26 Aug 2008 14:28:05 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m7QIS5WP010043
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 26 Aug 2008 14:28:05 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m7QIS5lu010386
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 26 Aug 2008 14:28:05 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m7QIS5F5010371
	for rpath-common-commits@lists.rpath.com;
	Tue, 26 Aug 2008 14:28:05 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200808261828.m7QIS5F5010371@scc.eng.rpath.com>
Date: Tue, 26 Aug 2008 14:28:04 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: version 0.2
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 26 Aug 2008 18:28:06 -0000

tag:         product-definition-0.2
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       Make.defs NEWS

version 0.2

diff -r 94e6fb57740f -r 03d747942429 Make.defs
--- a/Make.defs	Mon Aug 25 15:21:36 2008 -0400
+++ b/Make.defs	Tue Aug 26 14:27:26 2008 -0400
@@ -12,7 +12,7 @@
 # full details.
 #
 
-VERSION=0.1
+VERSION=0.2
 # VERSION can be overridden by snapshot builds to force incompatible versions
 
 export prefix = /usr
diff -r 94e6fb57740f -r 03d747942429 NEWS
--- a/NEWS	Mon Aug 25 15:21:36 2008 -0400
+++ b/NEWS	Tue Aug 26 14:27:26 2008 -0400
@@ -1,4 +1,4 @@
-Changes in @NEW@:
+Changes in 0.2:
   o API Changes:
     * Richer flavor support: for both platform and product, there are
       base flavor, image flavors, and architecture flavors that are

From johnsonm@rpath.com Tue Aug 26 18:28:07 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m7QIS6Sb017124
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 26 Aug 2008 18:28:06 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m7QIS6hH024550
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 26 Aug 2008 14:28:06 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m7QIS6Ra010047
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 26 Aug 2008 14:28:06 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m7QIS6RH010415
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 26 Aug 2008 14:28:06 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m7QIS5Rv010408
	for rpath-common-commits@lists.rpath.com;
	Tue, 26 Aug 2008 14:28:05 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200808261828.m7QIS5Rv010408@scc.eng.rpath.com>
Date: Tue, 26 Aug 2008 14:28:05 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Added tag product-definition-0.2 for
	changeset 03d747942429
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 26 Aug 2008 18:28:07 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       .hgtags

Added tag product-definition-0.2 for changeset 03d747942429

diff -r 03d747942429 -r eacab7a7f712 .hgtags
--- a/.hgtags	Tue Aug 26 14:27:26 2008 -0400
+++ b/.hgtags	Tue Aug 26 14:27:30 2008 -0400
@@ -1,3 +1,4 @@
 4fb9722782532f27b55a8c6473c6c25a114d51bc product-definition-0.1
 03ef2cdaaceedbd1df0402c65c5b77165df3c8cb product-definition-0.1
 dda1dd574149cd43221a5fcba3669247fd0fdfc0 product-definition-0.1
+03d747942429f09d5f9759deb8cf10c45476adfc product-definition-0.2

From misa@rpath.com Fri Sep  5 19:58:34 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m85JwYTx027694
	for <rpath-common-commits@lists.rpath.com>; Fri, 5 Sep 2008 19:58:34 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m85JwXao002032
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 5 Sep 2008 15:58:33 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m85JwXFU020176
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 5 Sep 2008 15:58:33 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m85JwXFa009361
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 5 Sep 2008 15:58:33 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m85JwX1I009350
	for rpath-common-commits@lists.rpath.com; Fri, 5 Sep 2008 15:58:33 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200809051958.m85JwX1I009350@scc.eng.rpath.com>
Date: Fri, 05 Sep 2008 15:58:32 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Convert label from Unicode to string
 (RPCL-36)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 05 Sep 2008 19:58:34 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Convert label from Unicode to string (RPCL-36)

diff -r eacab7a7f712 -r 0ec46d9e02f2 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Tue Aug 26 14:27:30 2008 -0400
+++ b/rpath_common/proddef/api1.py	Fri Sep 05 15:58:09 2008 -0400
@@ -301,7 +301,7 @@
                                    contact = conaryClient.cfg.contact,
                                    message = message)
         troveName = '%s:source' % self._troveName
-        cs = conaryClient.createSourceTrove(troveName, label,
+        cs = conaryClient.createSourceTrove(troveName, str(label),
             self.__class__.version, pathDict, cLog)
 
         repos = conaryClient.getRepos()

From johnsonm@rpath.com Sat Sep  6 00:31:57 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m860VvDm032379
	for <rpath-common-commits@lists.rpath.com>; Sat, 6 Sep 2008 00:31:57 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m860VuEl029619
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 5 Sep 2008 20:31:57 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m860VuNv004329
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 5 Sep 2008 20:31:56 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m860VuVj015233
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 5 Sep 2008 20:31:56 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m860Vu7q015228
	for rpath-common-commits@lists.rpath.com; Fri, 5 Sep 2008 20:31:56 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200809060031.m860Vu7q015228@scc.eng.rpath.com>
Date: Fri, 05 Sep 2008 20:31:56 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: prepare for 0.3 release
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Sat, 06 Sep 2008 00:31:57 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       Make.defs NEWS

prepare for 0.3 release

diff -r 0ec46d9e02f2 -r 9049959e5527 Make.defs
--- a/Make.defs	Fri Sep 05 15:58:09 2008 -0400
+++ b/Make.defs	Fri Sep 05 20:31:01 2008 -0400
@@ -12,7 +12,7 @@
 # full details.
 #
 
-VERSION=0.2
+VERSION=0.3
 # VERSION can be overridden by snapshot builds to force incompatible versions
 
 export prefix = /usr
diff -r 0ec46d9e02f2 -r 9049959e5527 NEWS
--- a/NEWS	Fri Sep 05 15:58:09 2008 -0400
+++ b/NEWS	Fri Sep 05 20:31:01 2008 -0400
@@ -1,3 +1,8 @@
+Changes in 0.3:
+  Bug Fixes:
+    * The rebase operation now succeeds when an explicit baseLabel
+      is provided in the product definition. (RPCL-36)
+
 Changes in 0.2:
   o API Changes:
     * Richer flavor support: for both platform and product, there are

From johnsonm@rpath.com Sat Sep  6 01:52:28 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m861qS8U001130
	for <rpath-common-commits@lists.rpath.com>; Sat, 6 Sep 2008 01:52:28 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m861qSec005415
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 5 Sep 2008 21:52:28 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m861qRxg008771
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 5 Sep 2008 21:52:27 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m861qRTv016849
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 5 Sep 2008 21:52:27 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m861qRF9016848
	for rpath-common-commits@lists.rpath.com; Fri, 5 Sep 2008 21:52:27 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200809060152.m861qRF9016848@scc.eng.rpath.com>
Date: Fri, 05 Sep 2008 21:52:27 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Added tag product-definition-0.3 for
	changeset 9049959e5527
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Sat, 06 Sep 2008 01:52:28 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       .hgtags

Added tag product-definition-0.3 for changeset 9049959e5527

diff -r 9049959e5527 -r 8e299a50c51e .hgtags
--- a/.hgtags	Fri Sep 05 20:31:01 2008 -0400
+++ b/.hgtags	Fri Sep 05 21:51:46 2008 -0400
@@ -2,3 +2,4 @@
 03ef2cdaaceedbd1df0402c65c5b77165df3c8cb product-definition-0.1
 dda1dd574149cd43221a5fcba3669247fd0fdfc0 product-definition-0.1
 03d747942429f09d5f9759deb8cf10c45476adfc product-definition-0.2
+9049959e5527c9ba666f999ea855fe45a23868c3 product-definition-0.3

From johnsonm@rpath.com Sat Sep  6 05:19:35 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id m865JZEZ005461
	for <rpath-common-commits@lists.rpath.com>; Sat, 6 Sep 2008 05:19:35 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id m865JZQ7028748
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 6 Sep 2008 01:19:35 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id m865JZdM020142
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 6 Sep 2008 01:19:35 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id m865JYVZ020198
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 6 Sep 2008 01:19:34 -0400
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id m865JYN2020187
	for rpath-common-commits@lists.rpath.com; Sat, 6 Sep 2008 01:19:34 -0400
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200809060519.m865JYN2020187@scc.eng.rpath.com>
Date: Sat, 06 Sep 2008 01:19:31 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Add missing RPCL-17 NEWS entry for version
 0.2
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Sat, 06 Sep 2008 05:19:35 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       NEWS

Add missing RPCL-17 NEWS entry for version 0.2

diff -r 8e299a50c51e -r 7785bda1313a NEWS
--- a/NEWS	Fri Sep 05 21:51:46 2008 -0400
+++ b/NEWS	Sat Sep 06 01:19:08 2008 -0400
@@ -12,6 +12,8 @@
     * When the default label prefix is not the label for a product,
       a different label prefix ("baseLabel") can be provided.  Stage
       suffixes will still be appended to this label. (RPCL-18)
+    * Arbitrary label mappings can be provided for promote
+      operations with "promoteMap" elements. (RPCL-17)
 
   o Schema Versions:
     * 1.2: Initial support for richer flavors (RPCL-13)

From smg@rpath.com Fri Nov  7 22:20:54 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mA7MKsQt009041
	for <rpath-common-commits@lists.rpath.com>; Fri, 7 Nov 2008 22:20:54 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mA7MKrGc008611
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 7 Nov 2008 17:20:53 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mA7MKqng024570
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 7 Nov 2008 17:20:52 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mA7MKq6k010163
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 7 Nov 2008 17:20:52 -0500
Received: (from smg@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mA7MKqEH010141
	for rpath-common-commits@lists.rpath.com; Fri, 7 Nov 2008 17:20:52 -0500
From: Stu Gott <smg@rpath.com>
Message-Id: <200811072220.mA7MKqEH010141@scc.eng.rpath.com>
Date: Fri, 07 Nov 2008 17:20:51 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: upgrade to proddef schema 2.0 (RPCL-13)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 07 Nov 2008 22:20:54 -0000

tag:         tip
user:        Stu Gott <http://issues.rpath.com/>
files:       rpath_common/proddef/_xmlConstants.py rpath_common/proddef/api1.py rpath_common/proddef/imageTypes.py xsd/rpd-2.0.xsd

upgrade to proddef schema 2.0 (RPCL-13)

diff -r 7785bda1313a -r 67f8929188c4 rpath_common/proddef/_xmlConstants.py
--- a/rpath_common/proddef/_xmlConstants.py	Sat Sep 06 01:19:08 2008 -0400
+++ b/rpath_common/proddef/_xmlConstants.py	Fri Nov 07 17:19:25 2008 -0500
@@ -23,6 +23,6 @@
 @type xmlSchemaLocaltion: C{str}
 """
 
-defaultNamespaceList = [ "http://www.rpath.com/permanent/rpd-1.3.xsd" ]
+defaultNamespaceList = [ "http://www.rpath.com/permanent/rpd-2.0.xsd" ]
 xmlSchemaNamespace = "http://www.w3.org/2001/XMLSchema-instance"
-xmlSchemaLocation = "http://www.rpath.com/permanent/rpd-1.3.xsd rpd-1.3.xsd"
+xmlSchemaLocation = "http://www.rpath.com/permanent/rpd-2.0.xsd rpd-2.0.xsd"
diff -r 7785bda1313a -r 67f8929188c4 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Sat Sep 06 01:19:08 2008 -0400
+++ b/rpath_common/proddef/api1.py	Fri Nov 07 17:19:25 2008 -0500
@@ -22,16 +22,18 @@
             'ProductDefinition',
             'ProductDefinitionError',
             'StageNotFoundError',
-            'UnsupportedImageType',
             'ProductDefinitionTroveNotFound',
             'ProductDefinitionFileNotFound',
             'RepositoryError',
             'PlatformLabelMissingError',
             'ArchitectureNotFoundError',
-            'ImageTemplateNotFoundError',
+            'FlavorSetNotFoundError',
+            'ContainerTemplateNotFoundError',
+            'BuildTemplateNotFoundError',
             ]
 
 import itertools
+import os
 import StringIO
 import weakref
 
@@ -61,11 +63,14 @@
 class ArchitectureNotFoundError(ProductDefinitionError):
     "Raised when no such architecture exists."
 
-class ImageTemplateNotFoundError(ProductDefinitionError):
-    "Raised when no such image template exists."
+class FlavorSetNotFoundError(ProductDefinitionError):
+    "Raised when no such flavor set exists."
 
-class UnsupportedImageType(ProductDefinitionError):
-    "Raised when an unsupported image type was passed"
+class ContainerTemplateNotFoundError(ProductDefinitionError):
+    "Raised when no such container template exists."
+
+class BuildTemplateNotFoundError(ProductDefinitionError):
+    "Raised when no such build template exists."
 
 class ProductDefinitionTroveNotFound(ProductDefinitionError):
     """
@@ -85,7 +90,7 @@
 #}
 
 class BaseDefinition(object):
-    version = '1.3'
+    version = '2.0'
     defaultNamespace = _xmlConstants.defaultNamespaceList[0]
     xmlSchemaLocation = _xmlConstants.xmlSchemaLocation
 
@@ -182,7 +187,7 @@
 
     def getArchitectures(self):
         """
-        @return: all defined architectures
+        @return: all defined architectures for both proddef and platform
         @rtype: C{list}
         """
         return self.architectures
@@ -213,15 +218,21 @@
             return default
         raise ArchitectureNotFoundError(name)
 
-    def addArchitecture(self, name, flavor):
+    def addArchitecture(self, name, displayName, flavor):
         """
         Add an architecture.
         @param name: name of architecture to add
         @type name: C{str}
+        @param displayName: human readable name of the architecture
+        @type displayName: C{str}
         @param flavor: flavor of architecture to add
         @type flavor: C{str}
         """
-        obj = _Architecture(name = name, flavor = flavor)
+        for obj in self.architectures[:]:
+            if obj.name == name:
+                self.architectures.remove(obj)
+        obj = _Architecture(name = name, displayName = displayName,
+                flavor = flavor)
         self.architectures.append(obj)
 
     def clearArchitectures(self):
@@ -230,48 +241,145 @@
         """
         self.architectures = _Architectures()
 
-    def getImageTemplates(self):
+    def getFlavorSets(self):
         """
-        @return: all defined image templates
-        @rtype: C{list} of ImageTemplate objects
+        @return: all defined flavor sets
+        @rtype: C{list} of FlavorSet objects
         """
-        return self.imageTemplates
+        return self.flavorSets
 
-    def getImageTemplate(self, name, default = -1):
+    def getFlavorSet(self, name, default = -1):
         """
-        @param name: image template name
+        @param name: flavor set name
         @type name: C{str}
-        @param default: if an image template with this name is not found,
-            return this value. If not specified, C{ImageTemplateNotFoundError}
+        @param default: if an flavor set with this name is not found,
+            return this value. If not specified, C{FlavorSetNotFoundError}
             is raised.
-        @rtype: ImageTemplate object
-        @raises C{ImageTemplateNotFoundError}: if architecture is not found, and
+        @rtype: FlavorSet object
+        @raises C{FlavorSetNotFoundError}: if flavor set is not found, and
         no default was specified.
         """
-        templates = self.getImageTemplates()
-        for tmpl in templates:
+        flavorSets = self.getFlavorSets()
+        for fs in flavorSets:
+            if fs.name == name:
+                return fs
+        if default != -1:
+            return default
+        raise FlavorSetNotFoundError(name)
+
+    def addFlavorSet(self, name, displayName, flavor):
+        """
+        add a flavor set.
+        @param name: name of flavor set to add
+        @type name: C{str}
+        @param displayName: human readable name of the architecture
+        @type displayName: C{str}
+        @param flavor: flavor of flavor set to add
+        @type flavor: C{str}
+        """
+        for obj in self.flavorSets[:]:
+            if obj.name == name:
+                self.flavorSets.remove(obj)
+        obj = _FlavorSet(name = name, displayName = displayName,
+                flavor = flavor)
+        self.flavorSets.append(obj)
+
+    def clearFlavorSets(self):
+        """
+        Reset flavor sets.
+        """
+        self.flavorSets = _FlavorSets()
+
+    def getContainerTemplates(self):
+        """
+        @return: all defined container templates
+        @rtype: C{list} of ContainerTemplate objects
+        """
+        return self.containerTemplates
+
+    def getContainerTemplate(self, containerFormat, default = -1):
+        """
+        @param containerFormat: container template containerFormat
+        @type containerFormat: C{str}
+        @param default: if a container template with this containerFormat is not found,
+            return this value. If not specified, C{ContainerTemplateNotFoundError}
+            is raised.
+        @rtype: ContainerTemplate object
+        @raises C{ContainerTemplateNotFoundError}: if container template is not found, and
+        no default was specified.
+        """
+        containerTemplates = self.getContainerTemplates()
+        for tmpl in containerTemplates:
+            if tmpl.containerFormat == containerFormat:
+                return tmpl
+        if default != -1:
+            return default
+        raise ContainerTemplateNotFoundError(containerFormat)
+
+    def addContainerTemplate(self, image):
+        """
+        add a container template.
+        @param image: Image
+        @type image: C{imageTypes.Image}
+        """
+        self.containerTemplates.append(image)
+
+    def clearContainerTemplates(self):
+        """
+        Reset container templates.
+        """
+        self.containerTemplates = _ContainerTemplates()
+
+    def getBuildTemplates(self):
+        """
+        @return: all defined build templates
+        @rtype: C{list} of BuildTemplate objects
+        """
+        return self.buildTemplates
+
+    def getBuildTemplate(self, name, default = -1):
+        """
+        @param name: build template name
+        @type name: C{str}
+        @param default: if a build template with this name is not found,
+            return this value. If not specified, C{BuildTemplateNotFoundError}
+            is raised.
+        @rtype: BuildTemplate object
+        @raises C{BuildTemplateNotFoundError}: if build template is not found, and
+        no default was specified.
+        """
+        buildTemplates = self.getBuildTemplates()
+        for tmpl in buildTemplates:
             if tmpl.name == name:
                 return tmpl
         if default != -1:
             return default
-        raise ImageTemplateNotFoundError(name)
+        raise BuildTemplateNotFoundError(name)
 
-    def addImageTemplate(self, name, flavor):
+    def addBuildTemplate(self, name, displayName, architectureRef,
+            containerTemplateRef, flavorSetRef = None):
         """
-        Add an image template.
-        @param name: name of image template to add
+        add a build template.
+        @param name: name of the build template
         @type name: C{str}
-        @param flavor: flavor of image template to add
-        @type flavor: C{str}
+        @param displayName: human readable name of the build template
+        @type displayName: C{str}
+        @param architectureRef: reference to architecture
+        @type architectureRef: C{str}
+        @param containerTemplateRef: reference to container template
+        @type containerTemplateRef: C{str}
+        @pararm flavorSetRef: reference to flavorSet
+        @type flavorSetRef: C{str}
         """
-        obj = _ImageTemplate(name = name, flavor = flavor)
-        self.imageTemplates.append(obj)
+        tmpl = _BuildTemplate(name, displayName, architectureRef,
+                containerTemplateRef, flavorSetRef = flavorSetRef)
+        self.buildTemplates.append(tmpl)
 
-    def clearImageTemplates(self):
+    def clearBuildTemplates(self):
         """
-        Reset image templates.
+        Reset build templates.
         """
-        self.imageTemplates = _ImageTemplates()
+        self.buildTemplates = _BuildTemplates()
 
     def _addSource(self, troveName, label, version, cls, intList):
         "Internal function for adding a Source"
@@ -280,7 +388,6 @@
                 label = str(label)
         obj = cls(troveName = troveName, label = label, version = version)
         intList.append(obj)
-
 
     def _saveToRepository(self, conaryClient, label, message = None):
         if message is None:
@@ -343,7 +450,9 @@
         self.searchPaths = _SearchPaths()
         self.factorySources = _FactorySources()
         self.architectures = _Architectures()
-        self.imageTemplates = _ImageTemplates()
+        self.flavorSets = _FlavorSets()
+        self.containerTemplates = _ContainerTemplates()
+        self.buildTemplates = _BuildTemplates()
 
     @classmethod
     def _newNode(self, name, value):
@@ -365,7 +474,6 @@
     @type schemaDir: C{str}
     """
     _imageTypeDispatcher = xmllib.NodeDispatcher({})
-    _imageTypeDispatcher.registerClasses(imageTypes, imageTypes.ImageType_Base)
 
     _troveName = 'product-definition'
     _troveFileName = 'product-definition.xml'
@@ -445,7 +553,9 @@
         self.searchPaths.extend(getattr(xmlObj, 'searchPaths', []))
         self.factorySources.extend(getattr(xmlObj, 'factorySources', []))
         self.architectures.extend(getattr(xmlObj, 'architectures', []))
-        self.imageTemplates.extend(getattr(xmlObj, 'imageTemplates', []))
+        self.flavorSets.extend(getattr(xmlObj, 'flavorSets', []))
+        self.containerTemplates.extend(getattr(xmlObj, 'containerTemplates', []))
+        self.buildTemplates.extend(getattr(xmlObj, 'buildTemplates', []))
         self.buildDefinition.extend(getattr(xmlObj, 'buildDefinition', []))
         # Add (weak) reference to the product definition
         for bd in self.buildDefinition:
@@ -453,16 +563,6 @@
         self.platform = getattr(xmlObj, 'platform', None)
 
         self.secondaryLabels = getattr(xmlObj, 'secondaryLabels', None)
-
-        ver = xmlObj.getAttribute('version')
-        if ver is not None and ver != self.version:
-            self.version = ver
-
-        for nsName, nsVal in xmlObj.iterNamespaces():
-            if nsName is None and nsVal != self.defaultNamespace:
-                self.defaultNamespace = nsVal
-                continue
-            # XXX We don't support changing the schema location for now
 
     def serialize(self, stream):
         """
@@ -639,10 +739,12 @@
         platFlv = self.getPlatformBaseFlavor()
         if platFlv is not None:
             nflv = conaryDeps.parseFlavor(platFlv)
-            flv.union(nflv)
+            #flv.union(nflv)
+            flv = conaryDeps.overrideFlavor(flv, nflv)
         if self.baseFlavor is not None:
             nflv = conaryDeps.parseFlavor(self.baseFlavor)
-            flv.union(nflv)
+            #flv.union(nflv)
+            flv = conaryDeps.overrideFlavor(flv, nflv)
         return str(flv)
 
     def getStages(self):
@@ -813,10 +915,10 @@
         """
         return self.buildDefinition
 
-    def addBuildDefinition(self, name = None, baseFlavor = None,
-                           imageType = None, stages = None, imageGroup = None,
-                           architectureRef = None, imageTemplateRef = None,
-                           flavor = None):
+    def addBuildDefinition(self, name = None, image = None, stages = None,
+                           imageGroup = None, architectureRef = None,
+                           containerTemplateRef = None, buildTemplateRef = None,
+                           flavorSetRef = None, flavor = None):
         """
         Add a build definition.
         Image types are specified by calling C{ProductDefinition.imageType}.
@@ -824,11 +926,9 @@
         references to architectures and image templates.
         @param name: the name for the build definition
         @type name: C{str} or C{None}
-        @param baseFlavor: the base flavor
-        @type baseFlavor: C{str}
-        @param imageType: an image type, as returned by
+        @param image: an image type, as returned by
         C{ProductDefinition.imageType}.
-        @type imageType: an instance of an C{imageTypes.ImageType_Base}
+        @type image: an instance of an C{imageTypes.ImageType_Base}
         @param stages: Stages for which to build this image type
         @type stages: C{list} of C{str} referring to a C{_Stage} object's name
         @param imageGroup: An optional image group that will override the
@@ -837,28 +937,42 @@
         @param architectureRef: the name of an architecture to inherit flavors
         from.
         @type architectureRef: C{str}
-        @param imageTemplateRef: the name of an image template to inherit
-        flavors from.
-        @type imageTemplateRef: C{str}
+        @param containerTemplateRef: the name of the containerTemplate for
+        this image. This value overrides the value implied by the
+        buildTemplateRef, if supplied.
+        @type containerTemplateRef: C{str}
+        @param buildTemplateRef: the name of the buildTemplate to derive values
+        for containerTemplateRef and architectureRef.
+        type: buildTemplateRef: C{str}
+        @param flavorSetRef: the name of the flavorSet to use for this image
+        type: flavorSetRef: C{str}
         @param flavor: additional flavors
         @type flavor: C{str}
         """
-        if baseFlavor and (architectureRef or imageTemplateRef or flavor):
-            raise ProductDefinitionError("Both a base flavor and references used")
         if architectureRef:
             # Make sure we have the architecture
-            arch = self.getArchitecture(architectureRef)
-        if imageTemplateRef:
-            # Make sure we have the image template
-            arch = self.getImageTemplate(imageTemplateRef)
+            arch = self.getArchitecture(architectureRef, None)
+            if not arch:
+                self.getPlatformArchitecture(architectureRef)
+        if containerTemplateRef:
+            # make sure we have the containerTemplate
+            tmpl = self.getContainerTemplate(containerTemplateRef, None)
+            if not tmpl:
+                self.getPlatformContainerTemplate(containerTemplateRef)
+        if flavorSetRef:
+            # make sure we have the flavorSet
+            fs = self.getFlavorSet(flavorSetRef, None)
+            if not fs:
+                self.getPlatformFlavorSet(flavorSetRef)
 
-        obj = Build(name = name, baseFlavor = baseFlavor,
-                     imageType = imageType, stages = stages,
-                     imageGroup = imageGroup,
-                     parentImageGroup = self.imageGroup,
-                     architectureRef = architectureRef,
-                     imageTemplateRef = imageTemplateRef,
-                     flavor = flavor, proddef = self)
+        obj = Build(name = name, image = image, stages = stages,
+                imageGroup = imageGroup,
+                parentImageGroup = self.imageGroup,
+                architectureRef = architectureRef,
+                containerTemplateRef = containerTemplateRef,
+                flavorSetRef = flavorSetRef,
+                buildTemplateRef = buildTemplateRef,
+                proddef = self, flavor = flavor)
         self.buildDefinition.append(obj)
 
     def clearBuildDefinition(self):
@@ -1077,24 +1191,59 @@
             return pa
         raise ArchitectureNotFoundError(name)
 
-    def getPlatformImageTemplate(self, name, default = -1):
+    def getPlatformFlavorSet(self, name, default = -1):
         """
-        Retrieve the image template with the specified name from the platform.
-        @param name: image template name
+        Retrieve the flavorSet with the specified name from the platform.
+        @param name: flavorSet name
         @type name: C{str}
-        @param default: if an image template with this name is not found,
-            return this value. If not specified, C{ImageTemplateNotFoundError}
-            is raised.
-        @rtype: ImageTemplate object
-        @raises C{ImageTemplateNotFoundError}: if architecture is not found, and
+        @param default: if a flavorSet with this name is not found, return
+        this value. If not specified, C{FlavorSetNotFoundError} is raised.
+        @rtype: FlavorSet object
+        @raises C{FlavorSetNotFoundError}: if flavorSet is not found, and
         no default was specified.
         """
         pa = None
         if self.platform:
-            pa = self.platform.getImageTemplate(name, None)
+            pa = self.platform.getFlavorSet(name, None)
         if pa is not None or default != -1:
             return pa
-        raise ImageTemplateNotFoundError(name)
+        raise FlavorSetNotFoundError(name)
+
+    def getPlatformContainerTemplate(self, containerFormat, default = -1):
+        """
+        Retrieve the containerTemplate with the specified containerFormat from the platform.
+        @param containerFormat: containerTemplate containerFormat
+        @type containerFormat: C{str}
+        @param default: if a containerTemplate with this containerFormat is not found, return
+        this value. If not specified, C{ContainerTemplateNotFoundError} is raised.
+        @rtype: ContainerTemplate object
+        @raises C{ContainerTemplateNotFoundError}: if containerTemplate is not found, and
+        no default was specified.
+        """
+        pa = None
+        if self.platform:
+            pa = self.platform.getContainerTemplate(containerFormat, None)
+        if pa is not None or default != -1:
+            return pa
+        raise ContainerTemplateNotFoundError(containerFormat)
+
+    def getPlatformBuildTemplate(self, name, default = -1):
+        """
+        Retrieve the buildTemplate with the specified name from the platform.
+        @param name: buildTemplate name
+        @type name: C{str}
+        @param default: if a buildTemplate with this name is not found, return
+        this value. If not specified, C{BuildTemplateNotFoundError} is raised.
+        @rtype: BuildTemplate object
+        @raises C{BuildTemplateNotFoundError}: if buildTemplate is not found, and
+        no default was specified.
+        """
+        pa = None
+        if self.platform:
+            pa = self.platform.getBuildTemplate(name, None)
+        if pa is not None or default != -1:
+            return pa
+        raise BuildTemplateNotFoundError(name)
 
     def addSecondaryLabel(self, name, label):
         """
@@ -1137,13 +1286,11 @@
         @type name: C{str}
         @param fields: Fields to initialize the image type object
         @type fields: C{dict}
-        @raise UnsupportedImageType: when an unsupported image type is passed
         """
-        fnode = _ImageTypeFakeNode(name, fields or {})
-        obj = cls._imageTypeDispatcher.dispatch(fnode)
-        if obj is None:
-            raise UnsupportedImageType(name)
-        return obj
+        fields = fields or {}
+        if name is not None:
+            fields.setdefault('containerFormat', name)
+        return imageTypes.Image(fields)
 
     def getBuildsForStage(self, stageName):
         """
@@ -1264,10 +1411,22 @@
             nplat.addSearchPath(troveName=troveName, label=label)
 
         for arch in self.getArchitectures():
-            nplat.addArchitecture(name = arch.name, flavor = arch.flavor)
+            nplat.addArchitecture(name = arch.name,
+                    displayName = arch.displayName, flavor = arch.flavor)
 
-        for tmpl in self.getImageTemplates():
-            nplat.addImageTemplate(name = tmpl.name, flavor = tmpl.flavor)
+        for flvSet in self.getFlavorSets():
+            nplat.addFlavorSet(name = flvSet.name,
+                    displayName = flvSet.displayName, flavor = flvSet.flavor)
+
+        for ctmpl in self.getContainerTemplates():
+            nplat.addContainerTemplate(ctmpl)
+
+        for btmpl in self.getBuildTemplates():
+            nplat.addBuildTemplate(name = btmpl.name,
+                    displayName = btmpl.displayName,
+                    architectureRef = btmpl.architectureRef,
+                    containerTemplateRef = btmpl.containerTemplateRef,
+                    flavorSetRef = btmpl.flavorSetRef,)
 
         nplat.setPlatformName(self.getPlatformName())
         nplat.setPlatformVersionTrove(self.getPlatformVersionTrove())
@@ -1316,10 +1475,21 @@
                                           version=sp.version)
         for item in nplat.getArchitectures():
             self.platform.addArchitecture(name = item.name,
+                                          displayName = item.displayName,
                                           flavor = item.flavor)
-        for item in nplat.getImageTemplates():
-            self.platform.addImageTemplate(name = item.name,
-                                           flavor = item.flavor)
+        for flvSet in nplat.getFlavorSets():
+            self.platform.addFlavorSet(name = flvSet.name,
+                    displayName = flvSet.displayName, flavor = flvSet.flavor)
+
+        for image in nplat.getContainerTemplates():
+            self.platform.addContainerTemplate(image)
+
+        for btmpl in nplat.getBuildTemplates():
+            self.platform.addBuildTemplate(name = btmpl.name,
+                    displayName = btmpl.displayName,
+                    architectureRef = btmpl.architectureRef,
+                    containerTemplateRef = btmpl.containerTemplateRef,
+                    flavorSetRef = btmpl.flavorSetRef)
 
     def _getSecondaryLabel(self, label, suffix):
         """
@@ -1412,7 +1582,9 @@
         self.searchPaths = getattr(xmlObj.platform, 'searchPaths', None)
         self.factorySources = getattr(xmlObj.platform, 'factorySources', None)
         self.architectures = getattr(xmlObj.platform, 'architectures', None)
-        self.imageTemplates = getattr(xmlObj.platform, 'imageTemplates', None)
+        self.flavorSets = getattr(xmlObj.platform, 'flavorSets', None)
+        self.containerTemplates = getattr(xmlObj.platform, 'containerTemplates', None)
+        self.buildTemplates = getattr(xmlObj.platform, 'buildTemplates', None)
         self.platformName = getattr(xmlObj.platform, 'platformName', None)
         self.platformVersionTrove = getattr(xmlObj.platform, 'platformVersionTrove', None)
         self.autoLoadRecipes = getattr(xmlObj.platform, 'autoLoadRecipes', None)
@@ -1637,8 +1809,18 @@
 
 # pylint: disable-msg=R0903
 # Too few public methods (1/2): this is an interface
-class _ImageTemplates(xmllib.SerializableList):
-    tag = "imageTemplates"
+class _FlavorSets(xmllib.SerializableList):
+    tag = "flavorSets"
+
+# pylint: disable-msg=R0903
+# Too few public methods (1/2): this is an interface
+class _ContainerTemplates(xmllib.SerializableList):
+    tag = "containerTemplates"
+
+# pylint: disable-msg=R0903
+# Too few public methods (1/2): this is an interface
+class _BuildTemplates(xmllib.SerializableList):
+    tag = "buildTemplates"
 
 # pylint: disable-msg=R0903
 # Too few public methods (1/2): this is an interface
@@ -1692,40 +1874,62 @@
     tag = "factorySource"
 
 class _Architecture(xmllib.SlotBasedSerializableObject):
-    __slots__ = [ 'name', 'flavor' ]
+    __slots__ = [ 'name', 'displayName', 'flavor' ]
     tag = "architecture"
 
-    def __init__(self, name, flavor):
+    def __init__(self, name, displayName, flavor):
         xmllib.SlotBasedSerializableObject.__init__(self)
         self.name = name
+        self.displayName = displayName
         self.flavor = flavor
 
-class _ImageTemplate(_Architecture):
-    tag = "imageTemplate"
+class _FlavorSet(xmllib.SlotBasedSerializableObject):
+    __slots__ = [ 'name', 'displayName', 'flavor' ]
+    tag = "flavorSet"
+
+    def __init__(self, name, displayName, flavor):
+        self.name = name
+        self.displayName = displayName
+        self.flavor = flavor
+
+class _BuildTemplate(xmllib.SlotBasedSerializableObject):
+    __slots__ = [ 'name', 'displayName', 'architectureRef',
+            'containerTemplateRef', 'flavorSetRef']
+    tag = "buildTemplate"
+
+    def __init__(self, name, displayName, architectureRef,
+            containerTemplateRef, flavorSetRef = None):
+        self.name = name
+        self.displayName = displayName
+        self.architectureRef = architectureRef
+        self.containerTemplateRef = containerTemplateRef
+        self.flavorSetRef = flavorSetRef
 
 class Build(xmllib.SerializableObject):
-    __slots__ = [ 'name', 'baseFlavor', 'imageType', 'stages', 'imageGroup',
-                  'parentImageGroup', 'architectureRef', 'imageTemplateRef',
-                  'flavor', '_proddef']
+    __slots__ = [ 'name', 'image', 'stages', 'imageGroup', 'parentImageGroup',
+                   'architectureRef', 'flavorSetRef', 'containerTemplateRef',
+                   'buildTemplateRef', 'flavor', '_proddef']
     tag = "build"
 
-    def __init__(self, name = None, baseFlavor = None,
-                 imageType = None, stages = None, imageGroup = None,
-                 parentImageGroup = None, architectureRef = None,
-                 imageTemplateRef = None, flavor = None, proddef = None,
-                 baseLabel = None):
+    def __init__(self, name = None, image = None, stages = None,
+                 imageGroup = None, parentImageGroup = None,
+                 architectureRef = None, flavorSetRef = None,
+                 containerTemplateRef = None,
+                 buildTemplateRef = None, flavor = None,
+                 proddef = None, baseLabel = None):
         xmllib.SlotBasedSerializableObject.__init__(self)
         self.name = name
-        self.baseFlavor = baseFlavor
-        self.imageType = imageType
+        self.image = image
         self.stages = stages or []
         self.imageGroup = imageGroup
         self.parentImageGroup = parentImageGroup
         self.architectureRef = architectureRef
-        self.imageTemplateRef = imageTemplateRef
-        self.flavor = flavor
+        self.containerTemplateRef = containerTemplateRef
+        self.flavorSetRef = flavorSetRef
         self._proddef = None
         self.setProductDefinition(proddef)
+        self.flavor = flavor
+        self.buildTemplateRef = buildTemplateRef
 
     def __eq__(self, build):
         for key in self.__slots__:
@@ -1744,8 +1948,21 @@
             return self.parentImageGroup
         return self.imageGroup
 
-    def getBuildImageType(self):
-        return self.imageType
+    def getBuildImage(self):
+        fields = {}
+        if self._proddef:
+            proddef = self._proddef()
+            tmpl = proddef.getContainerTemplate(self.containerTemplateRef, None)
+            if not tmpl and proddef.platform:
+                tmpl = proddef.getPlatformContainerTemplate( \
+                        self.containerTemplateRef)
+            if tmpl:
+                fields.update(tmpl.fields)
+                fields['containerFormat'] = tmpl.containerFormat
+
+        if self.image:
+            fields.update(self.image.fields)
+        return imageTypes.Image(fields)
 
     def getBuildStages(self):
         return list(self.stages)
@@ -1754,9 +1971,6 @@
         return self.name
 
     def getBuildBaseFlavor(self):
-        if self.baseFlavor is not None:
-            return self.baseFlavor
-
         # Grab flavor from the referenced components
         if self._proddef is None:
             return ''
@@ -1769,26 +1983,39 @@
         # Grab base flavor from platform + product
         flv = conaryDeps.parseFlavor(pd.getBaseFlavor())
 
+        # Dereference the flavorSetRef and architectureRef from
+        # buildTemplateRef if needed
+        flavorSetRef = self.flavorSetRef
+        architectureRef = self.architectureRef
+        buildTemplateRef = self.buildTemplateRef
+        if buildTemplateRef:
+            buildTemplate = pd.getBuildTemplate(buildTemplateRef, None)
+            if not buildTemplate:
+                buildTemplate = pd.getPlatformBuildTemplate(buildTemplateRef)
+            if not architectureRef:
+                architectureRef = buildTemplate.architectureRef
+            if not flavorSetRef:
+                flavorSetRef = buildTemplate.flavorSetRef
         try:
-            if self.architectureRef:
-                methods = [ pd.getPlatformArchitecture, pd.getArchitecture ]
+            if flavorSetRef:
+                methods = [ pd.getPlatformFlavorSet, pd.getFlavorSet ]
                 for meth in methods:
-                    obj = meth(self.architectureRef, None)
+                    obj = meth(flavorSetRef, None)
                     if obj is None:
                         continue
                     nflv = conaryDeps.parseFlavor(obj.flavor)
-                    flv.union(nflv)
-            if self.imageTemplateRef:
-                methods = [ pd.getImageTemplate, pd.getPlatformImageTemplate ]
+                    flv = conaryDeps.overrideFlavor(flv, nflv)
+            if architectureRef:
+                methods = [ pd.getPlatformArchitecture, pd.getArchitecture ]
                 for meth in methods:
-                    obj = meth(self.imageTemplateRef, None)
+                    obj = meth(architectureRef, None)
                     if obj is None:
                         continue
                     nflv = conaryDeps.parseFlavor(obj.flavor)
-                    flv.union(nflv)
+                    flv = conaryDeps.overrideFlavor(flv, nflv)
             if self.flavor:
                 nflv = conaryDeps.parseFlavor(self.flavor)
-                flv.union(nflv)
+                flv = conaryDeps.overrideFlavor(flv, nflv)
         except RuntimeError, e:
             raise ProductDefinitionError(str(e))
         return str(flv)
@@ -1805,7 +2032,9 @@
         return {}
 
     def _iterChildren(self):
-        yield self.imageType
+        if self.image is not None:
+            attrs = self.image._iterAttributes()
+            yield xmllib.NullNode(dict(attrs), name = 'image')
         for stage in self.stages:
             yield xmllib.NullNode(dict(ref=stage), name = 'stage')
         if self.imageGroup is not None:
@@ -1813,16 +2042,11 @@
                 self.imageGroup)
 
     def _iterAttributes(self):
-        if self.name is not None:
-            yield ('name', self.name)
-        if self.baseFlavor is not None:
-            yield ('baseFlavor', self.baseFlavor)
-        else:
-            for f in ['architectureRef', 'imageTemplateRef', 'flavor']:
-                attrVal = getattr(self, f)
-                if attrVal is not None:
-                    yield (f, attrVal)
-
+        for f in ['name', 'architectureRef', 'containerTemplateRef',
+                'flavorSetRef', 'flavor']:
+            attrVal = getattr(self, f)
+            if attrVal is not None:
+                yield (f, attrVal)
 #}
 
 class _BaseSerializableObject(xmllib.SerializableObject):
@@ -1909,17 +2133,42 @@
         return self._processNFCollection(architectures,
             _Architectures, _Architecture)
 
-    def _processImageTemplates(self, imageTemplates):
-        return self._processNFCollection(imageTemplates,
-            _ImageTemplates, _ImageTemplate)
+    def _processFlavorSets(self, flavorSets):
+        return self._processNFCollection(flavorSets, _FlavorSets, _FlavorSet)
+
+    def _processContainerTemplates(self, images):
+        containerTemplates = _ContainerTemplates()
+        for node in images:
+            pyObj = imageTypes.Image(node)
+            containerTemplates.append(pyObj)
+        return containerTemplates
+
+    def _processBuildTemplates(self, buildTemplates):
+        builds = _BuildTemplates()
+        for node in buildTemplates:
+            pyObj = _BuildTemplate(name = node.getAttribute('name'),
+                    displayName = node.getAttribute('displayName'),
+                    architectureRef = node.getAttribute('architectureRef'),
+                    containerTemplateRef = node.getAttribute('containerTemplateRef'),
+                    flavorSetRef = node.getAttribute('flavorSetRef'))
+            builds.append(pyObj)
+        return builds
 
     def _processNFCollection(self, collection, ListClass, ItemClass):
         collObj = ListClass()
         for node in collection:
             pyObj = ItemClass(
                 name = node.getAttribute('name'),
+                displayName = node.getAttribute('displayName'),
                 flavor = node.getAttribute('flavor'))
             collObj.append(pyObj)
+        seen = set()
+        # purge duplicate entries. last one wins (it was added most recently)
+        for node in reversed(collObj):
+            name = node.name
+            if name in seen:
+                collObj.remove(node)
+            seen.add(name)
         return collObj
 
     def _addPlatform(self, node):
@@ -1941,10 +2190,18 @@
         if listNode:
             self.platform.architectures = self._processArchitectures(
                 listNode[0].getChildren('architecture'))
-        listNode = node.getChildren('imageTemplates')
-        if listNode:
-            self.platform.imageTemplates = self._processImageTemplates(
-                listNode[0].getChildren('imageTemplate'))
+        flavorSets = node.getChildren('flavorSets')
+        if flavorSets:
+            self.platform.flavorSets = self._processFlavorSets(
+                    flavorSets[0].getChildren('flavorSet'))
+        containerTemplates = node.getChildren('containerTemplates')
+        if containerTemplates:
+            self.platform.containerTemplates = self._processContainerTemplates(\
+                    containerTemplates[0].getChildren('image'))
+        buildTemplates = node.getChildren('buildTemplates')
+        if buildTemplates:
+            self.platform.buildTemplates = self._processBuildTemplates(
+                    buildTemplates[0].getChildren('buildTemplate'))
         baseFlavorChildren = node.getChildren('baseFlavor')
         if baseFlavorChildren:
             self.platform.baseFlavor = baseFlavorChildren[0].getText()
@@ -1962,9 +2219,17 @@
                 label = child.getAttribute('label')
                 self.platform.addAutoLoadRecipe(troveName, label)
 
+    def _getSchemaVersion(self):
+        nsName = self.getAttributeByNamespace('schemaLocation',
+                xmllib.DataBinder.xmlSchemaNamespace)
+        if not nsName:
+            return None
+        nsName = os.path.basename(nsName).split()[-1]
+        assert nsName[:4] == 'rpd-'
+        assert nsName[-4:] == '.xsd'
+        return nsName[4:-4]
 
 class _ProductDefinition(BaseXmlNode):
-
     def addChild(self, childNode):
         chName = childNode.getAbsoluteName()
 
@@ -2028,11 +2293,20 @@
             self._addArchitectures(children)
             return
 
-        if chName == self._makeAbsoluteName('imageTemplates'):
-            children = childNode.getChildren('imageTemplate')
-            self._addImageTemplates(children)
+        if chName == self._makeAbsoluteName('flavorSets'):
+            children = childNode.getChildren('flavorSet')
+            self._addFlavorSets(children)
             return
 
+        if chName == self._makeAbsoluteName('containerTemplates'):
+            children = childNode.getChildren('image')
+            self._addContainerTemplates(children)
+            return
+
+        if chName == self._makeAbsoluteName('buildTemplates'):
+            children = childNode.getChildren('buildTemplate')
+            self._addBuildTemplates(children)
+            return
 
         if chName == self._makeAbsoluteName('buildDefinition'):
             children = childNode.getChildren('build')
@@ -2081,28 +2355,84 @@
     def _addArchitectures(self, architectures):
         self.architectures = self._processArchitectures(architectures)
 
-    def _addImageTemplates(self, imageTemplates):
-        self.imageTemplates = self._processImageTemplates(imageTemplates)
+    def _addFlavorSets(self, flavorSets):
+        self.flavorSets = self._processFlavorSets(flavorSets)
 
-    def _addBuildDefinition(self, buildNodes):
+    def _addContainerTemplates(self, containerTemplates):
+        self.containerTemplates = \
+                self._processContainerTemplates(containerTemplates)
+
+    def _addBuildTemplates(self, buildTemplates):
+        self.buildTemplates = self._processBuildTemplates(buildTemplates)
+
+    def _addBuildDefinition_1_x(self, buildNodes):
         dispatcher = xmllib.NodeDispatcher(self._nsMap)
-        dispatcher.registerClasses(imageTypes, imageTypes.ImageType_Base)
+        dispatcher.registerClasses(imageTypes, imageTypes.Image)
 
         builds = self.buildDefinition = _BuildDefinition()
         for node in buildNodes:
             imgType = None
             subNode = None
+            legacyImageTypes = ["amiImage", "applianceIsoImage",
+            "installableIsoImage", "liveIsoImage", "netbootImage",
+            "rawFsImage", "rawHdImage", "tarballImage", "updateIsoImage",
+            "vhdImage", "virtualIronImage", "vmwareImage",
+            "vmwareEsxImage", "xenOvaImage", ]
+
+            containerTemplateRef = None
+            for legacyImageType in legacyImageTypes:
+                imgTypes = node.getChildren(legacyImageType)
+                if imgTypes:
+                    # don't assign the containerFormat to the image, it's an
+                    # attribute of the buildDefinition
+                    imgType = imageTypes.Image(imgTypes[0])
+                    containerTemplateRef = legacyImageType
+                    break
+
             for subNode in node.iterChildren():
                 if not isinstance(subNode, xmllib.BaseNode):
                     continue
-                imgType = dispatcher.dispatch(subNode)
-                if imgType is not None:
-                    break
             if subNode is None:
                 # Build node had no children
                 continue
-            if imgType is None:
-                raise UnsupportedImageType(subNode.getName())
+            imageGroup = node.getChildren('imageGroup')
+            if imageGroup:
+                imageGroup = imageGroup[0].getText()
+            else:
+                imageGroup = None
+            baseFlavor = node.getAttribute('baseFlavor')
+            flavor = node.getAttribute('flavor')
+
+            flavor = baseFlavor or flavor
+            if flavor is not None:
+                flavor = str(flavor)
+
+            pyobj = Build(
+                name = node.getAttribute('name'),
+                image = imgType,
+                stages = [ x.getAttribute('ref')
+                           for x in node.getChildren('stage') ],
+                imageGroup = imageGroup,
+                parentImageGroup = self.imageGroup,
+                architectureRef = node.getAttribute('architectureRef'),
+                containerTemplateRef = containerTemplateRef,
+                flavor = flavor,
+                )
+            builds.append(pyobj)
+
+    def _addBuildDefinition(self, buildNodes):
+        # support pre-2.0 schemas
+        schemaVersion = self._getSchemaVersion()
+        if schemaVersion in ('1.0', '1.1', '1.2', '1.3'):
+            return self._addBuildDefinition_1_x(buildNodes)
+
+        dispatcher = xmllib.NodeDispatcher(self._nsMap)
+        dispatcher.registerClasses(imageTypes, imageTypes.Image)
+
+        builds = self.buildDefinition = _BuildDefinition()
+        for node in buildNodes:
+            image = node.getChildren('image')
+            image = image and imageTypes.Image(image[0]) or None
             imageGroup = node.getChildren('imageGroup')
             if imageGroup:
                 imageGroup = imageGroup[0].getText()
@@ -2110,15 +2440,17 @@
                 imageGroup = None
             pyobj = Build(
                 name = node.getAttribute('name'),
-                baseFlavor = node.getAttribute('baseFlavor'),
-                imageType = imgType,
+                image = image,
                 stages = [ x.getAttribute('ref')
                            for x in node.getChildren('stage') ],
                 imageGroup = imageGroup,
                 parentImageGroup = self.imageGroup,
                 architectureRef = node.getAttribute('architectureRef'),
-                imageTemplateRef = node.getAttribute('imageTemplateRef'),
+                flavorSetRef = node.getAttribute('flavorSetRef'),
+                containerTemplateRef = \
+                        node.getAttribute('containerTemplateRef'),
                 flavor = node.getAttribute('flavor'),
+                buildTemplateRef = node.getAttribute('buildTemplateRef')
                 )
             builds.append(pyobj)
 
@@ -2128,6 +2460,145 @@
             name = node.getAttribute('name')
             label = node.getText()
             self.secondaryLabels.append(SecondaryLabel(name, label))
+        return self
+
+    def finalize(self):
+        if self._getSchemaVersion() in ('1.0', '1.1', '1.2', '1.3'):
+            for build in self.buildDefinition:
+                if not build.flavor:
+                    continue
+                flavor = conaryDeps.parseFlavor(build.flavor)
+
+                architectureRef = build.architectureRef
+                if architectureRef:
+                    architectures = hasattr(self, 'architectures') \
+                            and self.architectures or []
+                    arches = [x.flavor for x in architectures \
+                            if x.name == architectureRef]
+                    if not arches:
+                        continue
+                    archFlavor = conaryDeps.parseFlavor(arches[0])
+                    flavor = flavor.difference(archFlavor)
+                flavorStr = str(flavor)
+                build.flavor = flavorStr and str(flavor) or None
+
+            self.baseFlavor = None
+            if not hasattr(self, 'platform'):
+                # we're going to need a platform to store references to the
+                # containerTemplates, architectures and flavorSets
+                self._addPlatform(_PlatformDefinition())
+
+            self.platform.baseFlavor = None
+
+            self.platform.addFlavorSet('generic', 'Generic',
+                    '~!dom0,~!domU,~!xen,~!vmware')
+            self.platform.addFlavorSet('dom0', 'dom0',
+                    '~dom0,~!domU,~xen,~!vmware')
+            self.platform.addFlavorSet('domU', 'domU',
+                    '~!dom0,~domU,~xen,~!vmware')
+            self.platform.addFlavorSet('vmware', 'VMware',
+                    '~!dom0,~!domU,~!xen,~vmware')
+
+            self.platform.addArchitecture('x86', 'x86 (32 bit)',
+                    'is: x86(i486,i586,i686,sse,sse2)')
+            self.platform.addArchitecture('x86_64', 'x86 (64 bit)',
+                    'is: x86(i486,i586,i686,sse,sse2) x86_64')
+
+            legacyImageTypes = ["amiImage", "applianceIsoImage",
+            "installableIsoImage", "liveIsoImage", "netbootImage",
+            "rawFsImage", "rawHdImage", "tarballImage", "updateIsoImage",
+            "vhdImage", "virtualIronImage", "vmwareImage",
+            "vmwareEsxImage", "xenOvaImage", ]
+
+            for containerTemplateRef in legacyImageTypes:
+                self.platform.addContainerTemplate( \
+                        imageTypes.Image({'containerFormat':
+                            containerTemplateRef}))
+
+            self.platform.addBuildTemplate(name="demo_cd",
+                    displayName="Demo CD", architectureRef="x86",
+                    containerTemplateRef="liveIsoImage")
+            self.platform.addBuildTemplate(name="ami_large",
+                    displayName="EC2 AMI Large/Huge", architectureRef="x86_64",
+                    containerTemplateRef="amiImage", flavorSetRef="domU")
+            self.platform.addBuildTemplate(name="ec2_small",
+                    displayName="EC2 AMI Small", architectureRef="x86",
+                    containerTemplateRef="amiImage", flavorSetRef="domU")
+            self.platform.addBuildTemplate(name="iso", displayName="ISO",
+                    architectureRef="x86",
+                    containerTemplateRef="applianceIsoImage")
+            self.platform.addBuildTemplate(name="iso", displayName="ISO",
+                    architectureRef="x86",
+                    containerTemplateRef="installableIsoImage")
+            self.platform.addBuildTemplate(name="iso", displayName="ISO",
+                    architectureRef="x86",
+                    containerTemplateRef="updateIsoImage")
+            self.platform.addBuildTemplate(name="iso", displayName="ISO",
+                    architectureRef="x86_64",
+                    containerTemplateRef="applianceIsoImage")
+            self.platform.addBuildTemplate(name="iso", displayName="ISO",
+                    architectureRef="x86_64",
+                    containerTemplateRef="installableIsoImage")
+            self.platform.addBuildTemplate(name="iso", displayName="ISO",
+                    architectureRef="x86_64",
+                    containerTemplateRef="updateIsoImage")
+            self.platform.addBuildTemplate(name="hyper_v",
+                    displayName="MS Hyper-V", architectureRef="x86",
+                    containerTemplateRef="vhdImage", flavorSetRef="generic")
+            self.platform.addBuildTemplate(name="hyper_v",
+                    displayName="MS Hyper-V", architectureRef="x86_64",
+                    containerTemplateRef="vhdImage", flavorSetRef="generic")
+            self.platform.addBuildTemplate(name="raw_fs",
+                    displayName="Raw Filesystem", architectureRef="x86",
+                    containerTemplateRef="rawFsImage")
+            self.platform.addBuildTemplate(name="raw_fs",
+                    displayName="Raw Filesystem", architectureRef="x86_64",
+                    containerTemplateRef="rawFsImage")
+            self.platform.addBuildTemplate(name="raw_hd",
+                    displayName="Raw Hard Disk", architectureRef="x86",
+                    containerTemplateRef="rawHdImage")
+            self.platform.addBuildTemplate(name="raw_hd",
+                    displayName="Raw Hard Disk", architectureRef="x86_64",
+                    containerTemplateRef="rawHdImage")
+            self.platform.addBuildTemplate(name="tar",
+                    displayName="Tar Image", architectureRef="x86",
+                    containerTemplateRef="tarballImage")
+            self.platform.addBuildTemplate(name="tar",
+                    displayName="Tar Image", architectureRef="x86_64",
+                    containerTemplateRef="tarballImage")
+            self.platform.addBuildTemplate(name="vmware", displayName="VMware",
+                    architectureRef="x86", containerTemplateRef="vmwareImage",
+                    flavorSetRef="vmware")
+            self.platform.addBuildTemplate(name="vmware", displayName="VMware",
+                    architectureRef="x86",
+                    containerTemplateRef="vmwareEsxImage",
+                    flavorSetRef="vmware")
+            self.platform.addBuildTemplate(name="vmware", displayName="VMware",
+                    architectureRef="x86_64",
+                    containerTemplateRef="vmwareImage",
+                    flavorSetRef="vmware")
+            self.platform.addBuildTemplate(name="vmware", displayName="VMware",
+                    architectureRef="x86_64",
+                    containerTemplateRef="vmwareEsxImage",
+                    flavorSetRef="vmware")
+            self.platform.addBuildTemplate(name="virtual_iron",
+                    displayName="Virtual Iron", architectureRef="x86",
+                    containerTemplateRef="virtualIronImage",
+                    flavorSetRef="generic")
+            self.platform.addBuildTemplate(name="virtual_iron",
+                    displayName="Virtual Iron", architectureRef="x86_64",
+                    containerTemplateRef="virtualIronImage",
+                    flavorSetRef="generic")
+            self.platform.addBuildTemplate(name="xen_ova",
+                    displayName="Xen OVA",
+                    architectureRef="x86", containerTemplateRef="xenOvaImage",
+                    flavorSetRef="domU")
+            self.platform.addBuildTemplate(name="xen_ova",
+                    displayName="Xen OVA",
+                    architectureRef="x86_64",
+                    containerTemplateRef="xenOvaImage",
+                    flavorSetRef="domU")
+
         return self
 
 class _PlatformDefinition(BaseXmlNode):
@@ -2146,7 +2617,10 @@
         self.searchPaths = platform.searchPaths
         self.factorySources = platform.factorySources
         self.architectures = platform.architectures
-        self.imageTemplates = platform.imageTemplates
+
+        self.flavorSets = platform.flavorSets
+        self.containerTemplates = platform.containerTemplates
+        self.buildTemplates = platform.buildTemplates
         self.baseFlavor = xmllib.StringNode(name = 'baseFlavor').characters(platform.baseFlavor)
         self.platformName = platform.platformName
         self.platformVersionTrove = platform.platformVersionTrove
@@ -2168,8 +2642,12 @@
             ret.append(self.autoLoadRecipes)
         if self.architectures:
             ret.append(self.architectures)
-        if self.imageTemplates:
-            ret.append(self.imageTemplates)
+        if self.flavorSets:
+            ret.append(self.flavorSets)
+        if self.containerTemplates:
+            ret.append(self.containerTemplates)
+        if self.buildTemplates:
+            ret.append(self.buildTemplates)
         return ret
 
 class _ProductDefinitionSerialization(xmllib.BaseNode):
@@ -2179,7 +2657,9 @@
         self.searchPaths = prodDef.searchPaths
         self.factorySources = prodDef.factorySources
         self.architectures = prodDef.architectures
-        self.imageTemplates = prodDef.imageTemplates
+        self.flavorSets = prodDef.flavorSets
+        self.containerTemplates = prodDef.containerTemplates
+        self.buildTemplates = prodDef.buildTemplates
         self.buildDefinition = prodDef.getBuildDefinitions()
         if prodDef.platform:
             self.platform = _PlatformSerialization({}, namespaces,
@@ -2259,38 +2739,17 @@
             ret.append(self.searchPaths)
         if len(self.factorySources):
             ret.append(self.factorySources)
+        if self.secondaryLabels:
+            ret.append(self.secondaryLabels)
         if self.architectures:
             ret.append(self.architectures)
-        if self.imageTemplates:
-            ret.append(self.imageTemplates)
-        if self.secondaryLabels:
-            ret.append(self.secondaryLabels)
+        if self.flavorSets:
+            ret.append(self.flavorSets)
+        if self.containerTemplates:
+            ret.append(self.containerTemplates)
+        if self.buildTemplates:
+            ret.append(self.buildTemplates)
         ret.append(self.buildDefinition)
         if self.platform:
             ret.append(self.platform)
         return ret
-
-class _ImageTypeFakeNode(object):
-    """Internal class for emulating the interface expected by the node
-    dispatcher for creating image types"""
-    def __init__(self, name, fields = None):
-        self.name = name
-        self.fields = fields or {}
-
-    def getAbsoluteName(self):
-        """
-        @return: the absolute node name
-        @rtype: C{str}
-        """
-        return '{}%s' % self.name
-
-    def getAttribute(self, name):
-        """
-        Get an attribute by name
-        @param name: The attribute name
-        @type name: C{str}
-        @return: The attribute with the specified name, or C{None} if one
-        could not be found.
-        @rtype: C{str} or C{None}
-        """
-        return self.fields.get(name)
diff -r 7785bda1313a -r 67f8929188c4 rpath_common/proddef/imageTypes.py
--- a/rpath_common/proddef/imageTypes.py	Sat Sep 06 01:19:08 2008 -0400
+++ b/rpath_common/proddef/imageTypes.py	Fri Nov 07 17:19:25 2008 -0500
@@ -18,15 +18,35 @@
 from rpath_common import xmllib
 from rpath_common.proddef import _xmlConstants
 
-#{ Image Type Classes
-class ImageType_Base(xmllib.SerializableObject):
+#{ Image Type Class
+class Image(xmllib.SerializableObject):
     _defaultNamespace = _xmlConstants.defaultNamespaceList[0]
+    tag = "image"
 
     _attributes = {
-        'name'              : (str, ),
-        'autoResolve'       : (bool, ),
-        'baseFileName'      : (str, ),
-        'installLabelPath'  : (str, ),
+        'containerFormat'           : (str, ),
+
+        'amiHugeDiskMountpoint'     : (str, ),
+        'anacondaCustomTrove'       : (str, ),
+        'anacondaTemplatesTrove'    : (str, ),
+        'autoResolve'               : (bool, ),
+        'baseFileName'              : (str, ),
+        'betaNag'                   : (bool, ),
+        'bugsUrl'                   : (str, ),
+        'diskAdapter'               : (str, ),
+        'freespace'                 : (int, ),
+        'installLabelPath'          : (str, ),
+        'maxIsoSize'                : (int, ),
+        'mediaTemplateTrove'        : (str, ),
+        'name'                      : (str, ),
+        'natNetworking'             : (bool, ),
+        'showMediaCheck'            : (bool, ),
+        'swapSize'                  : (int, ),
+        'unionfs'                   : (bool, ),
+        'vhdDiskType'               : (str, ),
+        'vmMemory'                  : (int, ),
+        'vmSnapshots'               : (bool, ),
+        'zisofs'                    : (bool, ),
     }
 
     def __init__(self, node = None):
@@ -36,13 +56,25 @@
         """
 
         self.fields = flds = {}
+        self.containerFormat = None
 
         if node is None:
             return
 
-        for attrName, values in self._attributes.items():
+        if isinstance(node, dict):
+            getAttribute = node.get
+            self.containerFormat = node.get('containerFormat')
+        else:
+            getAttribute = node.getAttribute
+            self.containerFormat = getAttribute('containerFormat')
+
+        for attrName, values in sorted(self._attributes.items()):
+            # containerFormat isn't a build option, but may appear in the
+            # fields due to API nuances
+            if attrName == 'containerFormat':
+                continue
             attrType = values[0]
-            val = node.getAttribute(attrName)
+            val = getAttribute(attrName)
             if val is None:
                 continue
             if attrType == bool:
@@ -52,6 +84,14 @@
             flds[attrName] = val
 
     def __eq__(self, obj):
+        if not hasattr(obj, 'containerFormat'):
+            return False
+        if self.containerFormat != obj.containerFormat:
+            return False
+        if not hasattr(obj, 'fields'):
+            return False
+        if self.fields != obj.fields:
+            return False
         return True
 
     def __ne__(self, obj):
@@ -68,140 +108,13 @@
         return {}
 
     def _iterAttributes(self):
-        return self.fields.iteritems()
+        if self.containerFormat is not None:
+            yield ('containerFormat', self.containerFormat)
+        for key, val in self.fields.iteritems():
+            yield key, val
 
     def _iterChildren(self):
         return []
-
-
-class ImageType_AMI(ImageType_Base):
-    tag = "amiImage"
-    _attributes = ImageType_Base._attributes.copy()
-    _attributes.update({
-        'amiHugeDiskMountpoint'     : (str, ),
-        'freespace'                 : (int, ),
-    })
-
-class ImageType_ApplianceIso(ImageType_Base):
-    tag = "applianceIsoImage"
-    _attributes = ImageType_Base._attributes.copy()
-    _attributes.update({
-        'maxIsoSize'                : (int, ),
-        'bugsUrl'                   : (str, ),
-        'showMediaCheck'            : (bool, ),
-        'betaNag'                   : (bool, ),
-        'mediaTemplateTrove'        : (str, ),
-        'anacondaCustomTrove'       : (str, ),
-        'anacondaTemplatesTrove'    : (str, ),
-    })
-
-
-class ImageType_InstallableISO(ImageType_Base):
-    tag = "installableIsoImage"
-    _attributes = ImageType_Base._attributes.copy()
-    _attributes.update({
-        'maxIsoSize'                : (int, ),
-        'bugsUrl'                   : (str, ),
-        'showMediaCheck'            : (bool, ),
-        'betaNag'                   : (bool, ),
-        'mediaTemplateTrove'        : (str, ),
-        'anacondaCustomTrove'       : (str, ),
-        'anacondaTemplatesTrove'    : (str, ),
-    })
-
-class ImageType_LiveIso(ImageType_Base):
-    tag = "liveIsoImage"
-    _attributes = ImageType_Base._attributes.copy()
-    _attributes.update({
-        'unionfs'                   : (bool, ),
-        'zisofs'                    : (bool, ),
-    })
-
-class ImageType_Netboot(ImageType_Base):
-    tag = "netbootImage"
-    _attributes = ImageType_Base._attributes.copy()
-    _attributes.update({
-    })
-
-class ImageType_RawFs(ImageType_Base):
-    tag = "rawFsImage"
-    _attributes = ImageType_Base._attributes.copy()
-    _attributes.update({
-        'swapSize'          : (int, ),
-        'freespace'         : (int, ),
-    })
-
-class ImageType_RawHd(ImageType_Base):
-    tag = "rawHdImage"
-    _attributes = ImageType_Base._attributes.copy()
-    _attributes.update({
-        'swapSize'          : (int, ),
-        'freespace'         : (int, ),
-    })
-
-class ImageType_Tarball(ImageType_Base):
-    tag = "tarballImage"
-    _attributes = ImageType_Base._attributes.copy()
-    _attributes.update({
-        'swapSize'          : (int, ),
-    })
-
-class ImageType_UpdateIso(ImageType_Base):
-    tag = "updateIsoImage"
-    # No inheritance
-    _attributes = {
-        'baseFileName'          : (str, ),
-        'mediaTemplateTrove'    : (str, ),
-    }
-
-class ImageType_VHD(ImageType_Base):
-    tag = "vhdImage"
-    _attributes = ImageType_Base._attributes.copy()
-    _attributes.update({
-        'swapSize'          : (int, ),
-        'freespace'         : (int, ),
-        'vhdDiskType'       : (str, ),
-    })
-
-class ImageType_VirtualIron(ImageType_Base):
-    tag = "virtualIronImage"
-    _attributes = ImageType_Base._attributes.copy()
-    _attributes.update({
-        'swapSize'          : (int, ),
-        'freespace'         : (int, ),
-        'vhdDiskType'       : (str, ),
-    })
-
-class ImageType_VMWare(ImageType_Base):
-    tag = "vmwareImage"
-    _attributes = ImageType_Base._attributes.copy()
-    _attributes.update({
-        'swapSize'          : (int, ),
-        'freespace'         : (int, ),
-        'natNetworking'     : (bool, ),
-        'diskAdapter'       : (str, ),
-        'vmSnapshots'       : (bool, ),
-        'vmMemory'          : (int, ),
-    })
-
-class ImageType_VMWareEsx(ImageType_Base):
-    tag = "vmwareEsxImage"
-    _attributes = ImageType_Base._attributes.copy()
-    _attributes.update({
-        'swapSize'          : (int, ),
-        'freespace'         : (int, ),
-        'natNetworking'     : (bool, ),
-        'vmMemory'          : (int, ),
-    })
-
-class ImageType_XenOva(ImageType_Base):
-    tag = "xenOvaImage"
-    _attributes = ImageType_Base._attributes.copy()
-    _attributes.update({
-        'swapSize'          : (int, ),
-        'freespace'         : (int, ),
-        'vmMemory'          : (int, ),
-    })
 #}
 
 
diff -r 7785bda1313a -r 67f8929188c4 xsd/rpd-2.0.xsd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/xsd/rpd-2.0.xsd	Fri Nov 07 17:19:25 2008 -0500
@@ -0,0 +1,325 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema targetNamespace="http://www.rpath.com/permanent/rpd-2.0.xsd"
+        elementFormDefault="qualified"
+        attributeFormDefault="unqualified"
+        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+        xmlns:rpd="http://www.rpath.com/permanent/rpd-2.0.xsd"
+        xmlns="http://www.rpath.com/permanent/rpd-2.0.xsd">
+
+    <xsd:attributeGroup name="common">
+       <xsd:attribute name="name" type="xsd:string" />
+       <xsd:attribute name="autoResolve" type="xsd:boolean" />
+       <xsd:attribute name="baseFileName" type="xsd:string" />
+       <xsd:attribute name="installLabelPath" type="xsd:string" />
+    </xsd:attributeGroup>
+
+    <xsd:attributeGroup name="specialIsoTroves">
+        <xsd:attribute name="mediaTemplateTrove" type="rpd:troveSpecType" />
+        <xsd:attribute name="anacondaCustomTrove" type="rpd:troveSpecType" />
+        <xsd:attribute name="anacondaTemplatesTrove" type="rpd:troveSpecType" />
+    </xsd:attributeGroup>
+
+    <xsd:simpleType name="troveSpecType">
+        <xsd:restriction base="xsd:string"></xsd:restriction>
+        <!-- TODO: make a proper xsd:restriction here to validate troveSpecs -->
+    </xsd:simpleType>
+
+    <xsd:simpleType name="flavorStringType">
+        <xsd:restriction base="xsd:string">
+            <!-- TODO: make a proper xsd:restriction here to validate flavor xsd:strings -->
+            <!-- this regexp comes from conary.deps.deps.flavorRegexpStr, and it barfs inside of Eclipse (sgp) -->
+            <!-- <pattern value="^(use:)? *(?:((?:!|~!)?(?:~?!?(?:[0-9A-Za-z_-]+))(?:\\.(?:[0-9A-Za-z_-]+))? *(?:, *(?:!|~!)?(?:~?!?(?:[0-9A-Za-z_-]+))(?:\\.(?:[0-9A-Za-z_-]+))?)*)?)? *(?:(is:) *(?: *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?(?:((?:  * *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?)*))?))? *(?:(target:) *(?: *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?(?:((?:  * *(?:((?:[0-9A-Za-z_-]+))(?:\\(( *(?:~?!?(?:[0-9A-Za-z_-]+))(?: *, *(?:~?!?(?:[0-9A-Za-z_-]+)))*)\\))?)?)*))?))?$" /> -->
+        </xsd:restriction>
+    </xsd:simpleType>
+
+    <xsd:complexType name="stageType">
+      <xsd:sequence>
+        <xsd:element name="promoteMaps" type="rpd:promoteMapsType" minOccurs="0" maxOccurs="1" />
+      </xsd:sequence>
+      <xsd:attribute name="name" type="xsd:string" use="required" />
+      <xsd:attribute name="labelSuffix" type="xsd:string" use="required" />
+    </xsd:complexType>
+
+    <xsd:complexType name="stageListType">
+        <xsd:sequence>
+            <xsd:element name="stage" type="stageType" minOccurs="1" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:attributeGroup name="attrGroupNameLabel">
+        <xsd:attribute name="troveName" type="xsd:string" />
+        <xsd:attribute name="label" type="xsd:string" />
+    </xsd:attributeGroup>
+
+    <xsd:complexType name="nameLabelType">
+        <xsd:attributeGroup ref="attrGroupNameLabel" />
+    </xsd:complexType>
+
+    <xsd:complexType name="searchPathType">
+        <xsd:attributeGroup ref="attrGroupNameLabel" />
+        <xsd:attribute name="version" type="xsd:string" />
+    </xsd:complexType>
+
+    <xsd:complexType name="searchPathListType">
+        <xsd:sequence>
+            <xsd:element name="searchPath" type="searchPathType" minOccurs="1" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="factorySourceListType">
+        <xsd:sequence>
+            <xsd:element name="factorySource" type="searchPathType" minOccurs="1" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="autoLoadRecipesType">
+        <xsd:sequence>
+            <xsd:element name="autoLoadRecipe" type="nameLabelType" minOccurs="1" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="buildDefinitionType">
+        <xsd:sequence>
+            <xsd:element name="build" type="rpd:buildType" minOccurs="1" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="imageType">
+        <xsd:attribute name="containerFormat">
+            <xsd:simpleType>
+                <xsd:restriction base="xsd:string">
+                    <xsd:enumeration value="amiImage" />
+                    <xsd:enumeration value="applianceIsoImage" />
+                    <xsd:enumeration value="installableIsoImage" />
+                    <xsd:enumeration value="liveIsoImage" />
+                    <xsd:enumeration value="netbootImage" />
+                    <xsd:enumeration value="rawFsImage" />
+                    <xsd:enumeration value="rawHdImage" />
+                    <xsd:enumeration value="tarballImage" />
+                    <xsd:enumeration value="updateIsoImage" />
+                    <xsd:enumeration value="vhdImage" />
+                    <xsd:enumeration value="virtualIronImage" />
+                    <xsd:enumeration value="vmwareImage" />
+                    <xsd:enumeration value="vmwareEsxImage" />
+                    <xsd:enumeration value="xenOvaImage" />
+                </xsd:restriction>
+            </xsd:simpleType>
+        </xsd:attribute>
+        <xsd:attribute name="diskAdapter">
+            <xsd:simpleType>
+                <xsd:restriction base="xsd:string">
+                    <xsd:enumeration value="ide" />
+                    <xsd:enumeration value="lsilogic" />
+                </xsd:restriction>
+            </xsd:simpleType>
+        </xsd:attribute>
+        <xsd:attribute name="vhdDiskType">
+            <xsd:simpleType>
+                <xsd:restriction base="xsd:string">
+                    <xsd:enumeration value="fixed" />
+                    <xsd:enumeration value="dynamic" />
+                    <xsd:enumeration value="difference" />
+                </xsd:restriction>
+            </xsd:simpleType>
+        </xsd:attribute>
+
+        <xsd:attribute name="amiHugeDiskMountpoint" type="xsd:string" />
+        <xsd:attribute name="anacondaCustomTrove" type="rpd:troveSpecType" />
+        <xsd:attribute name="anacondaTemplatesTrove" type="rpd:troveSpecType" />
+        <xsd:attribute name="autoResolve" type="xsd:boolean" />
+        <xsd:attribute name="baseFileName" type="xsd:string" />
+        <xsd:attribute name="betaNag" type="xsd:boolean" />
+        <xsd:attribute name="bugsUrl" type="xsd:string" />
+        <xsd:attribute name="freespace" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="installLabelPath" type="xsd:string" />
+        <xsd:attribute name="maxIsoSize" type="xsd:positiveInteger" />
+        <xsd:attribute name="mediaTemplateTrove" type="rpd:troveSpecType" />
+        <xsd:attribute name="name" type="xsd:string" />
+        <xsd:attribute name="natNetworking" type="xsd:boolean" />
+        <xsd:attribute name="showMediaCheck" type="xsd:boolean" />
+        <xsd:attribute name="swapSize" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="unionfs" type="xsd:boolean" />
+        <xsd:attribute name="vmMemory" type="xsd:nonNegativeInteger" />
+        <xsd:attribute name="vmSnapshots" type="xsd:boolean" />
+        <xsd:attribute name="zisofs" type="xsd:boolean" />
+    </xsd:complexType>
+
+    <xsd:complexType name="buildType">
+        <xsd:sequence>
+            <xsd:element name="image" type="rpd:imageType" minOccurs="0" maxOccurs="1" />
+            <xsd:element name="stage" minOccurs="0" maxOccurs="unbounded">
+                <xsd:complexType>
+                    <xsd:attribute name="ref" type="xsd:string" use="required"/>
+                </xsd:complexType>
+            </xsd:element>
+            <xsd:element name="imageGroup" type="rpd:troveSpecType" minOccurs="0" maxOccurs="1" />
+        </xsd:sequence>
+        <xsd:attribute name="name" type="xsd:string" use="required" />
+        <xsd:attribute name="architectureRef" type="xsd:string" />
+        <xsd:attribute name="flavorSetRef" type="xsd:string" />
+        <xsd:attribute name="containerTemplateRef" type="xsd:string" />
+    </xsd:complexType>
+
+    <xsd:complexType name="secondaryLabelsType">
+      <xsd:sequence>
+        <xsd:element name="secondaryLabel" minOccurs="1" maxOccurs="unbounded">
+          <xsd:complexType>
+            <xsd:simpleContent>
+              <xsd:extension base="xsd:string">
+                <xsd:attribute name="name" type="xsd:string" use="required" />
+              </xsd:extension>
+            </xsd:simpleContent>
+          </xsd:complexType>
+        </xsd:element>
+      </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="promoteMapsType">
+      <xsd:sequence>
+        <xsd:element name="promoteMap" type="rpd:promoteMapType" minOccurs="1" maxOccurs="unbounded" />
+      </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="promoteMapType">
+      <xsd:attribute name="name" type="xsd:string" use="required" />
+      <xsd:attribute name="label" type="xsd:string" use="required" />
+    </xsd:complexType>
+
+    <xsd:complexType name="platformDefinitionType">
+      <xsd:sequence>
+        <xsd:element name="platformName" type="xsd:string"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="platformVersionTrove" type="xsd:string"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="baseFlavor" type="rpd:flavorStringType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="searchPaths" type="rpd:searchPathListType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="factorySources" type="rpd:factorySourceListType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="autoLoadRecipes" type="rpd:autoLoadRecipesType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="architectures" type="rpd:architecturesType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="flavorSets" type="rpd:flavorSetsType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="containerTemplates" type="rpd:containerTemplatesType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="buildTemplates" type="rpd:buildTemplatesType"
+            minOccurs="0" maxOccurs="1" />
+      </xsd:sequence>
+      <xsd:attribute name="version" type="xsd:string" />
+    </xsd:complexType>
+
+    <xsd:complexType name="platformType">
+      <xsd:sequence>
+        <xsd:element name="platformName" type="xsd:string"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="platformVersionTrove" type="xsd:string"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="baseFlavor" type="rpd:flavorStringType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="searchPaths" type="rpd:searchPathListType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="factorySources" type="rpd:factorySourceListType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="autoLoadRecipes" type="rpd:autoLoadRecipesType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="architectures" type="rpd:architecturesType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="flavorSets" type="rpd:flavorSetsType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="containerTemplates" type="rpd:containerTemplatesType"
+            minOccurs="0" maxOccurs="1" />
+        <xsd:element name="buildTemplates" type="rpd:buildTemplatesType"
+            minOccurs="0" maxOccurs="1" />
+      </xsd:sequence>
+      <!-- Source of this platform. Will get filled in to a name-version trove
+      spec when the product definition is saved -->
+      <xsd:attribute name="sourceTrove" type="xsd:string" />
+      <!-- If useLatest is "true", the upstream platform is copied verbatim
+      here, with no settling to a specific version. This essentially is a
+      cache of the upstream platform.
+      -->
+      <xsd:attribute name="useLatest" type="xsd:boolean" />
+    </xsd:complexType>
+
+    <xsd:complexType name="nameFlavorType">
+        <xsd:attribute name="name" type="xsd:string" use="required" />
+        <xsd:attribute name="displayName" type="xsd:string" use="required" />
+        <xsd:attribute name="flavor" type="xsd:string" use="required" />
+    </xsd:complexType>
+
+    <xsd:complexType name="architecturesType">
+        <xsd:sequence>
+            <xsd:element name="architecture" type="rpd:nameFlavorType" minOccurs="0" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="flavorSetsType">
+        <xsd:sequence>
+            <xsd:element name="flavorSet" type="rpd:nameFlavorType" minOccurs="0" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="containerTemplatesType">
+        <xsd:sequence>
+            <xsd:element name="image" type="rpd:imageType" minOccurs="1" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="buildTemplateType">
+      <xsd:attribute name="name" type="xsd:string" />
+      <xsd:attribute name="displayName" type="xsd:string" />
+      <xsd:attribute name="architectureRef" type="xsd:string" />
+      <xsd:attribute name="containerTemplateRef" type="xsd:string" />
+      <xsd:attribute name="flavorSetRef" type="xsd:string" />
+    </xsd:complexType>
+
+    <xsd:complexType name="buildTemplatesType">
+        <xsd:sequence>
+            <xsd:element name="buildTemplate" type="rpd:buildTemplateType" minOccurs="0" maxOccurs="unbounded" />
+        </xsd:sequence>
+    </xsd:complexType>
+
+
+    <!-- First top-level element we allow -->
+    <xsd:element name="productDefinition">
+        <xsd:complexType>
+            <xsd:sequence>
+                <xsd:element name="productName" type="xsd:string" />
+                <xsd:element name="productShortname" type="xsd:string" />
+                <xsd:element name="productDescription" type="xsd:string" />
+                <xsd:element name="productVersion" type="xsd:string" />
+                <xsd:element name="productVersionDescription" type="xsd:string" />
+                <xsd:element name="conaryRepositoryHostname" type="xsd:string" />
+                <xsd:element name="conaryNamespace" type="xsd:string" />
+                <xsd:element name="imageGroup" type="rpd:troveSpecType" />
+                <!-- 1.3: explicit label when default is wrong (RPCL-18) -->
+                <xsd:element name="baseLabel" type="xsd:string" minOccurs="0" maxOccurs="1" />
+                <xsd:element name="baseFlavor" type="rpd:flavorStringType" minOccurs="0" maxOccurs="1" />
+                <xsd:element name="stages" type="rpd:stageListType" />
+                <xsd:element name="searchPaths" type="rpd:searchPathListType" minOccurs="0" maxOccurs="1" />
+                <xsd:element name="factorySources" type="rpd:factorySourceListType" minOccurs="0" maxOccurs="1" />
+                <xsd:element name="secondaryLabels" type="rpd:secondaryLabelsType" minOccurs="0" maxOccurs="1" />
+                <xsd:element name="architectures" type="rpd:architecturesType"
+                    minOccurs="0" maxOccurs="1" />
+                <xsd:element name="flavorSets" type="rpd:flavorSetsType"
+                    minOccurs="0" maxOccurs="1" />
+                <xsd:element name="containerTemplates"
+                    type="rpd:containerTemplatesType"
+                    minOccurs="0" maxOccurs="1" />
+                <xsd:element name="buildTemplates" type="rpd:buildTemplatesType"
+                    minOccurs="0" maxOccurs="1" />
+                <xsd:element name="buildDefinition" type="rpd:buildDefinitionType" />
+                <xsd:element name="platform" type="rpd:platformType" minOccurs="0" maxOccurs="1" />
+            </xsd:sequence>
+            <xsd:attribute name="version" type="xsd:string" />
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- Second top-level element we allow (although we do allow this as part
+    of a product definition -->
+    <xsd:element name="platformDefinition" type="rpd:platformDefinitionType" />
+
+</xsd:schema>

From smg@rpath.com Tue Nov 11 16:34:48 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mABGYmvD001543
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 11 Nov 2008 16:34:48 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mABGYmOG029299
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 11 Nov 2008 11:34:48 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mABGYl4x030370
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 11 Nov 2008 11:34:47 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mABGYlq8019556
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 11 Nov 2008 11:34:47 -0500
Received: (from smg@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mABGYl6G019541
	for rpath-common-commits@lists.rpath.com;
	Tue, 11 Nov 2008 11:34:47 -0500
From: Stu Gott <smg@rpath.com>
Message-Id: <200811111634.mABGYl6G019541@scc.eng.rpath.com>
Date: Tue, 11 Nov 2008 11:34:47 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: automatically add sane defaults to empty
	product definitions (RPCL-46)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 11 Nov 2008 16:34:48 -0000

tag:         tip
user:        Stu Gott <http://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

automatically add sane defaults to empty product definitions (RPCL-46)

diff -r 67f8929188c4 -r 611fb691aeee rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Fri Nov 07 17:19:25 2008 -0500
+++ b/rpath_common/proddef/api1.py	Tue Nov 11 11:34:14 2008 -0500
@@ -2229,6 +2229,118 @@
         assert nsName[-4:] == '.xsd'
         return nsName[4:-4]
 
+    def _addPlatformDefaults(self, platform):
+        platform.baseFlavor = None
+
+        platform.addFlavorSet('generic', 'Generic',
+                '~!dom0,~!domU,~!xen,~!vmware')
+        platform.addFlavorSet('dom0', 'dom0',
+                '~dom0,~!domU,~xen,~!vmware')
+        platform.addFlavorSet('domU', 'domU',
+                '~!dom0,~domU,~xen,~!vmware')
+        platform.addFlavorSet('vmware', 'VMware',
+                '~!dom0,~!domU,~!xen,~vmware')
+
+        platform.addArchitecture('x86', 'x86 (32 bit)',
+                'is: x86(i486,i586,i686,sse,sse2)')
+        platform.addArchitecture('x86_64', 'x86 (64 bit)',
+                'is: x86(i486,i586,i686,sse,sse2) x86_64')
+
+        legacyImageTypes = ["amiImage", "applianceIsoImage",
+        "installableIsoImage", "liveIsoImage", "netbootImage",
+        "rawFsImage", "rawHdImage", "tarballImage", "updateIsoImage",
+        "vhdImage", "virtualIronImage", "vmwareImage",
+        "vmwareEsxImage", "xenOvaImage", ]
+
+        for containerTemplateRef in legacyImageTypes:
+            platform.addContainerTemplate( \
+                    imageTypes.Image({'containerFormat':
+                        containerTemplateRef}))
+
+        platform.addBuildTemplate(name="demo_cd",
+                displayName="Demo CD", architectureRef="x86",
+                containerTemplateRef="liveIsoImage")
+        platform.addBuildTemplate(name="ami_large",
+                displayName="EC2 AMI Large/Huge", architectureRef="x86_64",
+                containerTemplateRef="amiImage", flavorSetRef="domU")
+        platform.addBuildTemplate(name="ec2_small",
+                displayName="EC2 AMI Small", architectureRef="x86",
+                containerTemplateRef="amiImage", flavorSetRef="domU")
+        platform.addBuildTemplate(name="iso", displayName="ISO",
+                architectureRef="x86",
+                containerTemplateRef="applianceIsoImage")
+        platform.addBuildTemplate(name="iso", displayName="ISO",
+                architectureRef="x86",
+                containerTemplateRef="installableIsoImage")
+        platform.addBuildTemplate(name="iso", displayName="ISO",
+                architectureRef="x86",
+                containerTemplateRef="updateIsoImage")
+        platform.addBuildTemplate(name="iso", displayName="ISO",
+                architectureRef="x86_64",
+                containerTemplateRef="applianceIsoImage")
+        platform.addBuildTemplate(name="iso", displayName="ISO",
+                architectureRef="x86_64",
+                containerTemplateRef="installableIsoImage")
+        platform.addBuildTemplate(name="iso", displayName="ISO",
+                architectureRef="x86_64",
+                containerTemplateRef="updateIsoImage")
+        platform.addBuildTemplate(name="hyper_v",
+                displayName="MS Hyper-V", architectureRef="x86",
+                containerTemplateRef="vhdImage", flavorSetRef="generic")
+        platform.addBuildTemplate(name="hyper_v",
+                displayName="MS Hyper-V", architectureRef="x86_64",
+                containerTemplateRef="vhdImage", flavorSetRef="generic")
+        platform.addBuildTemplate(name="raw_fs",
+                displayName="Raw Filesystem", architectureRef="x86",
+                containerTemplateRef="rawFsImage")
+        platform.addBuildTemplate(name="raw_fs",
+                displayName="Raw Filesystem", architectureRef="x86_64",
+                containerTemplateRef="rawFsImage")
+        platform.addBuildTemplate(name="raw_hd",
+                displayName="Raw Hard Disk", architectureRef="x86",
+                containerTemplateRef="rawHdImage")
+        platform.addBuildTemplate(name="raw_hd",
+                displayName="Raw Hard Disk", architectureRef="x86_64",
+                containerTemplateRef="rawHdImage")
+        platform.addBuildTemplate(name="tar",
+                displayName="Tar Image", architectureRef="x86",
+                containerTemplateRef="tarballImage")
+        platform.addBuildTemplate(name="tar",
+                displayName="Tar Image", architectureRef="x86_64",
+                containerTemplateRef="tarballImage")
+        platform.addBuildTemplate(name="vmware", displayName="VMware",
+                architectureRef="x86", containerTemplateRef="vmwareImage",
+                flavorSetRef="vmware")
+        platform.addBuildTemplate(name="vmware", displayName="VMware",
+                architectureRef="x86",
+                containerTemplateRef="vmwareEsxImage",
+                flavorSetRef="vmware")
+        platform.addBuildTemplate(name="vmware", displayName="VMware",
+                architectureRef="x86_64",
+                containerTemplateRef="vmwareImage",
+                flavorSetRef="vmware")
+        platform.addBuildTemplate(name="vmware", displayName="VMware",
+                architectureRef="x86_64",
+                containerTemplateRef="vmwareEsxImage",
+                flavorSetRef="vmware")
+        platform.addBuildTemplate(name="virtual_iron",
+                displayName="Virtual Iron", architectureRef="x86",
+                containerTemplateRef="virtualIronImage",
+                flavorSetRef="generic")
+        platform.addBuildTemplate(name="virtual_iron",
+                displayName="Virtual Iron", architectureRef="x86_64",
+                containerTemplateRef="virtualIronImage",
+                flavorSetRef="generic")
+        platform.addBuildTemplate(name="xen_ova",
+                displayName="Xen OVA",
+                architectureRef="x86", containerTemplateRef="xenOvaImage",
+                flavorSetRef="domU")
+        platform.addBuildTemplate(name="xen_ova",
+                displayName="Xen OVA",
+                architectureRef="x86_64",
+                containerTemplateRef="xenOvaImage",
+                flavorSetRef="domU")
+
 class _ProductDefinition(BaseXmlNode):
     def addChild(self, childNode):
         chName = childNode.getAbsoluteName()
@@ -2482,128 +2594,28 @@
                 flavorStr = str(flavor)
                 build.flavor = flavorStr and str(flavor) or None
 
-            self.baseFlavor = None
             if not hasattr(self, 'platform'):
                 # we're going to need a platform to store references to the
                 # containerTemplates, architectures and flavorSets
                 self._addPlatform(_PlatformDefinition())
 
-            self.platform.baseFlavor = None
-
-            self.platform.addFlavorSet('generic', 'Generic',
-                    '~!dom0,~!domU,~!xen,~!vmware')
-            self.platform.addFlavorSet('dom0', 'dom0',
-                    '~dom0,~!domU,~xen,~!vmware')
-            self.platform.addFlavorSet('domU', 'domU',
-                    '~!dom0,~domU,~xen,~!vmware')
-            self.platform.addFlavorSet('vmware', 'VMware',
-                    '~!dom0,~!domU,~!xen,~vmware')
-
-            self.platform.addArchitecture('x86', 'x86 (32 bit)',
-                    'is: x86(i486,i586,i686,sse,sse2)')
-            self.platform.addArchitecture('x86_64', 'x86 (64 bit)',
-                    'is: x86(i486,i586,i686,sse,sse2) x86_64')
-
-            legacyImageTypes = ["amiImage", "applianceIsoImage",
-            "installableIsoImage", "liveIsoImage", "netbootImage",
-            "rawFsImage", "rawHdImage", "tarballImage", "updateIsoImage",
-            "vhdImage", "virtualIronImage", "vmwareImage",
-            "vmwareEsxImage", "xenOvaImage", ]
-
-            for containerTemplateRef in legacyImageTypes:
-                self.platform.addContainerTemplate( \
-                        imageTypes.Image({'containerFormat':
-                            containerTemplateRef}))
-
-            self.platform.addBuildTemplate(name="demo_cd",
-                    displayName="Demo CD", architectureRef="x86",
-                    containerTemplateRef="liveIsoImage")
-            self.platform.addBuildTemplate(name="ami_large",
-                    displayName="EC2 AMI Large/Huge", architectureRef="x86_64",
-                    containerTemplateRef="amiImage", flavorSetRef="domU")
-            self.platform.addBuildTemplate(name="ec2_small",
-                    displayName="EC2 AMI Small", architectureRef="x86",
-                    containerTemplateRef="amiImage", flavorSetRef="domU")
-            self.platform.addBuildTemplate(name="iso", displayName="ISO",
-                    architectureRef="x86",
-                    containerTemplateRef="applianceIsoImage")
-            self.platform.addBuildTemplate(name="iso", displayName="ISO",
-                    architectureRef="x86",
-                    containerTemplateRef="installableIsoImage")
-            self.platform.addBuildTemplate(name="iso", displayName="ISO",
-                    architectureRef="x86",
-                    containerTemplateRef="updateIsoImage")
-            self.platform.addBuildTemplate(name="iso", displayName="ISO",
-                    architectureRef="x86_64",
-                    containerTemplateRef="applianceIsoImage")
-            self.platform.addBuildTemplate(name="iso", displayName="ISO",
-                    architectureRef="x86_64",
-                    containerTemplateRef="installableIsoImage")
-            self.platform.addBuildTemplate(name="iso", displayName="ISO",
-                    architectureRef="x86_64",
-                    containerTemplateRef="updateIsoImage")
-            self.platform.addBuildTemplate(name="hyper_v",
-                    displayName="MS Hyper-V", architectureRef="x86",
-                    containerTemplateRef="vhdImage", flavorSetRef="generic")
-            self.platform.addBuildTemplate(name="hyper_v",
-                    displayName="MS Hyper-V", architectureRef="x86_64",
-                    containerTemplateRef="vhdImage", flavorSetRef="generic")
-            self.platform.addBuildTemplate(name="raw_fs",
-                    displayName="Raw Filesystem", architectureRef="x86",
-                    containerTemplateRef="rawFsImage")
-            self.platform.addBuildTemplate(name="raw_fs",
-                    displayName="Raw Filesystem", architectureRef="x86_64",
-                    containerTemplateRef="rawFsImage")
-            self.platform.addBuildTemplate(name="raw_hd",
-                    displayName="Raw Hard Disk", architectureRef="x86",
-                    containerTemplateRef="rawHdImage")
-            self.platform.addBuildTemplate(name="raw_hd",
-                    displayName="Raw Hard Disk", architectureRef="x86_64",
-                    containerTemplateRef="rawHdImage")
-            self.platform.addBuildTemplate(name="tar",
-                    displayName="Tar Image", architectureRef="x86",
-                    containerTemplateRef="tarballImage")
-            self.platform.addBuildTemplate(name="tar",
-                    displayName="Tar Image", architectureRef="x86_64",
-                    containerTemplateRef="tarballImage")
-            self.platform.addBuildTemplate(name="vmware", displayName="VMware",
-                    architectureRef="x86", containerTemplateRef="vmwareImage",
-                    flavorSetRef="vmware")
-            self.platform.addBuildTemplate(name="vmware", displayName="VMware",
-                    architectureRef="x86",
-                    containerTemplateRef="vmwareEsxImage",
-                    flavorSetRef="vmware")
-            self.platform.addBuildTemplate(name="vmware", displayName="VMware",
-                    architectureRef="x86_64",
-                    containerTemplateRef="vmwareImage",
-                    flavorSetRef="vmware")
-            self.platform.addBuildTemplate(name="vmware", displayName="VMware",
-                    architectureRef="x86_64",
-                    containerTemplateRef="vmwareEsxImage",
-                    flavorSetRef="vmware")
-            self.platform.addBuildTemplate(name="virtual_iron",
-                    displayName="Virtual Iron", architectureRef="x86",
-                    containerTemplateRef="virtualIronImage",
-                    flavorSetRef="generic")
-            self.platform.addBuildTemplate(name="virtual_iron",
-                    displayName="Virtual Iron", architectureRef="x86_64",
-                    containerTemplateRef="virtualIronImage",
-                    flavorSetRef="generic")
-            self.platform.addBuildTemplate(name="xen_ova",
-                    displayName="Xen OVA",
-                    architectureRef="x86", containerTemplateRef="xenOvaImage",
-                    flavorSetRef="domU")
-            self.platform.addBuildTemplate(name="xen_ova",
-                    displayName="Xen OVA",
-                    architectureRef="x86_64",
-                    containerTemplateRef="xenOvaImage",
-                    flavorSetRef="domU")
-
+        if hasattr(self, 'platform'):
+            if not self.platform.containerTemplates and \
+                    not self.platform.architectures and \
+                    not self.platform.buildTemplates and \
+                    not self.platform.flavorSets:
+                        self.baseFlavor = None
+                        self._addPlatformDefaults(self.platform)
         return self
 
 class _PlatformDefinition(BaseXmlNode):
     def finalize(self):
         self._addPlatform(self)
+        if not self.platform.containerTemplates and \
+                not self.platform.architectures and \
+                not self.platform.buildTemplates and \
+                not self.platform.flavorSets:
+                    self._addPlatformDefaults(self.platform)
         return self
 
 class _PlatformSerialization(xmllib.BaseNode):

From smg@rpath.com Tue Nov 11 22:14:05 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mABME5dT008068
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 11 Nov 2008 22:14:05 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mABME4KZ029891
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 11 Nov 2008 17:14:04 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mABME4Gb020106
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 11 Nov 2008 17:14:04 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mABME3Mw032235
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 11 Nov 2008 17:14:03 -0500
Received: (from smg@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mABME3om032230
	for rpath-common-commits@lists.rpath.com;
	Tue, 11 Nov 2008 17:14:03 -0500
From: Stu Gott <smg@rpath.com>
Message-Id: <200811112214.mABME3om032230@scc.eng.rpath.com>
Date: Tue, 11 Nov 2008 17:14:03 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: copy missing attributes during rebase
 (RPCL-48)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 11 Nov 2008 22:14:05 -0000

tag:         tip
user:        Stu Gott <http://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

copy missing attributes during rebase (RPCL-48)

diff -r 611fb691aeee -r 66a45bd7a078 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Tue Nov 11 11:34:14 2008 -0500
+++ b/rpath_common/proddef/api1.py	Tue Nov 11 17:13:58 2008 -0500
@@ -1465,6 +1465,11 @@
         self.setPlatformBaseFlavor(nplat.getBaseFlavor())
         self.setPlatformSourceTrove(nplat.sourceTrove)
         self.setPlatformUseLatest(useLatest)
+        self.platform.setPlatformName(nplat.getPlatformName())
+        self.platform.setPlatformVersionTrove(nplat.getPlatformVersionTrove())
+        for alr in nplat.getAutoLoadRecipes():
+            self.addPlatformAutoLoadRecipe(troveName = alr.getTroveName(),
+                    label = alr.getLabel())
         for sp in nplat.getSearchPaths():
             self.addPlatformSearchPath(troveName=sp.troveName,
                                        label=sp.label,

From johnsonm@rpath.com Wed Nov 12 16:30:00 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mACGU0Tv017680
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 16:30:00 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mACGTxH6029675
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 11:29:59 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mACGTxDM002361
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 11:29:59 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mACGTwYK023701
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 11:29:59 -0500
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mACGTwd1023691
	for rpath-common-commits@lists.rpath.com;
	Wed, 12 Nov 2008 11:29:58 -0500
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200811121629.mACGTwd1023691@scc.eng.rpath.com>
Date: Wed, 12 Nov 2008 11:29:58 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: raise meaningful exceptions for invalid
	schema versions, use Error in the name of all exceptions, fix some
	misplaced and incomplete NEWS entries (RPCL-13)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 12 Nov 2008 16:30:00 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       NEWS rpath_common/proddef/api1.py

raise meaningful exceptions for invalid schema versions, use Error in the name of all exceptions, fix some misplaced and incomplete NEWS entries (RPCL-13)

diff -r 66a45bd7a078 -r a621163ae613 NEWS
--- a/NEWS	Tue Nov 11 17:13:58 2008 -0500
+++ b/NEWS	Wed Nov 12 11:29:22 2008 -0500
@@ -1,3 +1,28 @@
+Changes in 0.4:
+  o API Changes:
+    * Richer flavor support: for both platform and product, there are
+      base flavor, image flavors, and architecture flavors that are
+      mixed together to discover flavors of groups to cook and images
+      to build.  As part of this work, the UnsupportedImageType and
+      ImageTemplateNotFoundError exceptions have been removed, and
+      the FlavorSetNotFoundError, ContainerTemplateNotFoundError,
+      and BuildTemplateNotFoundError exceptions have been added.
+      Incompatible schema changes were required, introducing schema
+      version 2.0.  These changes are reflected in API changes that
+      are not backwards-compatible. (RPCL-13)
+    * Exception classes have been changed to have names that consistently
+      end in "Error": ProductDefinitionTroveNotFound is now
+      ProductDefinitionTroveNotFoundError, ProductDefinitionFileNotFound
+      is now ProductDefinitionFileNotFoundError, and the
+
+  Bug Fixes:
+    * Several platform attributes previously were not copied into a
+      product definition during a rebase operation.  This has been
+      fixed. (RPCL-48)
+
+  o Schema Versions:
+    * 2.0: Modifications required for RPCL-13
+
 Changes in 0.3:
   Bug Fixes:
     * The rebase operation now succeeds when an explicit baseLabel
@@ -5,10 +30,6 @@
 
 Changes in 0.2:
   o API Changes:
-    * Richer flavor support: for both platform and product, there are
-      base flavor, image flavors, and architecture flavors that are
-      mixed together to discover flavors of groups to cook and images
-      to build. (RPCL-13)
     * When the default label prefix is not the label for a product,
       a different label prefix ("baseLabel") can be provided.  Stage
       suffixes will still be appended to this label. (RPCL-18)
diff -r 66a45bd7a078 -r a621163ae613 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Tue Nov 11 17:13:58 2008 -0500
+++ b/rpath_common/proddef/api1.py	Wed Nov 12 11:29:22 2008 -0500
@@ -22,14 +22,15 @@
             'ProductDefinition',
             'ProductDefinitionError',
             'StageNotFoundError',
-            'ProductDefinitionTroveNotFound',
-            'ProductDefinitionFileNotFound',
+            'ProductDefinitionTroveNotFoundError',
+            'ProductDefinitionFileNotFoundError',
             'RepositoryError',
             'PlatformLabelMissingError',
             'ArchitectureNotFoundError',
             'FlavorSetNotFoundError',
             'ContainerTemplateNotFoundError',
             'BuildTemplateNotFoundError',
+            'InvalidSchemaVersionError',
             ]
 
 import itertools
@@ -72,13 +73,13 @@
 class BuildTemplateNotFoundError(ProductDefinitionError):
     "Raised when no such build template exists."
 
-class ProductDefinitionTroveNotFound(ProductDefinitionError):
+class ProductDefinitionTroveNotFoundError(ProductDefinitionError):
     """
     Raised when the trove containing the product definition file could not
     be found in the repository
     """
 
-class ProductDefinitionFileNotFound(ProductDefinitionError):
+class ProductDefinitionFileNotFoundError(ProductDefinitionError):
     "Raised when the product definition file was not found in the repository"
 
 class RepositoryError(ProductDefinitionError):
@@ -86,6 +87,9 @@
 
 class PlatformLabelMissingError(ProductDefinitionError):
     "Raised when the platform label is missing, and a rebase was requested"
+
+class InvalidSchemaVersionError(ProductDefinitionError):
+    "Raised when the schema version in a product definition file is not recognized."
 
 #}
 
@@ -421,14 +425,14 @@
         try:
             troves = repos.findTroves(None, [ troveSpec ])
         except conaryErrors.TroveNotFound:
-            raise ProductDefinitionTroveNotFound("%s=%s" % (troveName, label))
+            raise ProductDefinitionTroveNotFoundError("%s=%s" % (troveName, label))
         except conaryErrors.RepositoryError, e:
             raise RepositoryError(str(e))
         # At this point, troveSpec is in troves and its value should not be
         # the empty list.
         nvfs = troves[troveSpec]
         #if not nvfs:
-        #    raise ProductDefinitionTroveNotFound("%s=%s" % (troveName, label))
+        #    raise ProductDefinitionTroveNotFoundError("%s=%s" % (troveName, label))
         trvCsSpec = (nvfs[0][0], (None, None), (nvfs[0][1], nvfs[0][2]), True)
         cs = conaryClient.createChangeSet([ trvCsSpec ], withFiles = True,
                                           withFileContents = True)
@@ -443,7 +447,7 @@
             return fileContents[0].get(), thawTrvCs.getNewNameVersionFlavor()
 
         # Couldn't find the file we expected; die
-        raise ProductDefinitionFileNotFound("%s=%s" % (troveName, label))
+        raise ProductDefinitionFileNotFoundError("%s=%s" % (troveName, label))
 
     def _initFields(self):
         self.baseFlavor = None
@@ -602,8 +606,8 @@
         @param client: A Conary client object
         @type client: C{conaryclient.ConaryClient}
         @raises C{RepositoryError}:
-        @raises C{ProductDefinitionTroveNotFound}:
-        @raises C{ProductDefinitionFileNotFound}:
+        @raises C{ProductDefinitionTroveNotFoundError}:
+        @raises C{ProductDefinitionFileNotFoundError}:
         """
         label = self.getProductDefinitionLabel()
         stream, nvf = self._getStreamFromRepository(client, label)
@@ -739,11 +743,9 @@
         platFlv = self.getPlatformBaseFlavor()
         if platFlv is not None:
             nflv = conaryDeps.parseFlavor(platFlv)
-            #flv.union(nflv)
             flv = conaryDeps.overrideFlavor(flv, nflv)
         if self.baseFlavor is not None:
             nflv = conaryDeps.parseFlavor(self.baseFlavor)
-            #flv.union(nflv)
             flv = conaryDeps.overrideFlavor(flv, nflv)
         return str(flv)
 
@@ -1635,8 +1637,8 @@
         @param client: A Conary client object
         @type client: C{conaryclient.ConaryClient}
         @raises C{RepositoryError}:
-        @raises C{ProductDefinitionTroveNotFound}:
-        @raises C{ProductDefinitionFileNotFound}:
+        @raises C{ProductDefinitionTroveNotFoundError}:
+        @raises C{ProductDefinitionFileNotFoundError}:
         """
         stream, nvf = self._getStreamFromRepository(client, label)
         stream.seek(0)
@@ -1668,7 +1670,7 @@
                                   self.getFactorySources()):
             key = (sp.troveName, sp.label, None)
             if key not in troves:
-                raise ProductDefinitionTroveNotFound("%s=%s" % (key[0], key[1]))
+                raise ProductDefinitionTroveNotFoundError("%s=%s" % (key[0], key[1]))
             nvf = troves[key][0]
             sp.version = str(nvf[1].trailingRevision())
 
@@ -2229,10 +2231,20 @@
                 xmllib.DataBinder.xmlSchemaNamespace)
         if not nsName:
             return None
-        nsName = os.path.basename(nsName).split()[-1]
-        assert nsName[:4] == 'rpd-'
-        assert nsName[-4:] == '.xsd'
-        return nsName[4:-4]
+        try:
+            nsName = os.path.basename(nsName).split()[-1]
+            prefix, nsName = nsName.split('-', 1)
+            if (prefix != 'rpd'):
+                raise InvalidSchemaVersionError(
+                    'Invalid schema prefix %s, expected rpd', prefix)
+            nsName, suffix = nsName.rsplit('.', 1)
+            if (suffix != 'xsd'):
+                raise InvalidSchemaVersionError(
+                    'Invalid schema suffix %s, expected xsd', suffix)
+            return nsName
+        except:
+            raise InvalidSchemaVersionError('Failed to parse schema version %s',
+                                       nsName)
 
     def _addPlatformDefaults(self, platform):
         platform.baseFlavor = None

From johnsonm@rpath.com Wed Nov 12 18:23:38 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mACINbC5018943
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 18:23:37 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mACINb5B032744
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 13:23:37 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mACINbq1007656
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 13:23:37 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mACINbnW027754
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 13:23:37 -0500
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mACINaeh027749
	for rpath-common-commits@lists.rpath.com;
	Wed, 12 Nov 2008 13:23:36 -0500
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200811121823.mACINaeh027749@scc.eng.rpath.com>
Date: Wed, 12 Nov 2008 13:23:36 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: further NEWS edits -- put initial RPCL-13
	work back for 0.2,
	new RPCL-13 work mentioned under other issues (RPCL-21, 
	RPCL-25, RPCL-46)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 12 Nov 2008 18:23:38 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       NEWS

further NEWS edits -- put initial RPCL-13 work back for 0.2, new RPCL-13 work mentioned under other issues (RPCL-21, RPCL-25, RPCL-46)

diff -r a621163ae613 -r fe33e5dfe3b2 NEWS
--- a/NEWS	Wed Nov 12 11:29:22 2008 -0500
+++ b/NEWS	Wed Nov 12 13:23:33 2008 -0500
@@ -1,19 +1,21 @@
 Changes in 0.4:
   o API Changes:
-    * Richer flavor support: for both platform and product, there are
-      base flavor, image flavors, and architecture flavors that are
-      mixed together to discover flavors of groups to cook and images
-      to build.  As part of this work, the UnsupportedImageType and
-      ImageTemplateNotFoundError exceptions have been removed, and
-      the FlavorSetNotFoundError, ContainerTemplateNotFoundError,
-      and BuildTemplateNotFoundError exceptions have been added.
-      Incompatible schema changes were required, introducing schema
-      version 2.0.  These changes are reflected in API changes that
-      are not backwards-compatible. (RPCL-13)
+    * Images are now defined differently.  Platforms provide
+      generic information about image types, architectures, and sets
+      of flavors, which are then referenced from build definitions
+      in individual product-definition.xml files.  As part of this
+      work, the UnsupportedImageType and ImageTemplateNotFoundError
+      exceptions have been removed, and the FlavorSetNotFoundError,
+      ContainerTemplateNotFoundError, and BuildTemplateNotFoundError
+      exceptions have been added.  Incompatible XML schema changes
+      were required, introducing schema version 2.0.  These changes
+      are reflected in extensive API changes that are not
+      backwards-compatible. (RPCL-21, RPCL-25, RPCL-46)
     * Exception classes have been changed to have names that consistently
       end in "Error": ProductDefinitionTroveNotFound is now
       ProductDefinitionTroveNotFoundError, ProductDefinitionFileNotFound
-      is now ProductDefinitionFileNotFoundError, and the
+      is now ProductDefinitionFileNotFoundError, and 
+      InvalidSchemaVersionError has been added.
 
   Bug Fixes:
     * Several platform attributes previously were not copied into a
@@ -21,7 +23,7 @@
       fixed. (RPCL-48)
 
   o Schema Versions:
-    * 2.0: Modifications required for RPCL-13
+    * 2.0: Modifications required for RPCL-21
 
 Changes in 0.3:
   Bug Fixes:
@@ -30,6 +32,10 @@
 
 Changes in 0.2:
   o API Changes:
+    * Richer flavor support: for both platform and product, there are
+      base flavor, image flavors, and architecture flavors that are
+      mixed together to discover flavors of groups to cook and images
+      to build. (RPCL-13)
     * When the default label prefix is not the label for a product,
       a different label prefix ("baseLabel") can be provided.  Stage
       suffixes will still be appended to this label. (RPCL-18)

From johnsonm@rpath.com Wed Nov 12 22:11:12 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mACMBBSu021176
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 22:11:11 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mACMBBs1007267
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 17:11:11 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mACMBBeW019125
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 17:11:11 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mACMBBHa004810
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 17:11:11 -0500
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mACMBAjH004792
	for rpath-common-commits@lists.rpath.com;
	Wed, 12 Nov 2008 17:11:10 -0500
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200811122211.mACMBAjH004792@scc.eng.rpath.com>
Date: Wed, 12 Nov 2008 17:11:10 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: change default platform bits to more closely
	parallel what will be done for rPL2
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 12 Nov 2008 22:11:12 -0000

user:        Michael K. Johnson <http://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

change default platform bits to more closely parallel what will be done for rPL2

diff -r fe33e5dfe3b2 -r 7ae8bfddc619 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Wed Nov 12 13:23:33 2008 -0500
+++ b/rpath_common/proddef/api1.py	Wed Nov 12 17:10:45 2008 -0500
@@ -2249,22 +2249,26 @@
     def _addPlatformDefaults(self, platform):
         platform.baseFlavor = None
 
+        platform.addFlavorSet('ami', 'AMI',
+                '!dom0,domU,xen,!vmware')
         platform.addFlavorSet('generic', 'Generic',
                 '~!dom0,~!domU,~!xen,~!vmware')
-        platform.addFlavorSet('dom0', 'dom0',
-                '~dom0,~!domU,~xen,~!vmware')
-        platform.addFlavorSet('domU', 'domU',
-                '~!dom0,~domU,~xen,~!vmware')
+        platform.addFlavorSet('hyper_v', 'Hyper-V',
+                '!vmware, ~!xen, !dom0')
+        platform.addFlavorSet('virtual_iron', 'Virtual Iron',
+                '!xen,!vmware')
         platform.addFlavorSet('vmware', 'VMware',
                 '~!dom0,~!domU,~!xen,~vmware')
+        platform.addFlavorSet('xen', 'Xen',
+                '~!dom0,~domU,~xen,~!vmware')
 
-        platform.addArchitecture('x86', 'x86 (32 bit)',
-                'is: x86(i486,i586,i686,sse,sse2)')
-        platform.addArchitecture('x86_64', 'x86 (64 bit)',
-                'is: x86(i486,i586,i686,sse,sse2) x86_64')
+        platform.addArchitecture('x86', 'x86 (32-bit)',
+                'is: x86(~i486,~i586,~i686,~sse,~sse2)')
+        platform.addArchitecture('x86_64', 'x86 (64-bit)',
+                'is: x86(~i486,~i586,~i686,~sse,~sse2) x86_64')
 
         legacyImageTypes = ["amiImage", "applianceIsoImage",
-        "installableIsoImage", "liveIsoImage", "netbootImage",
+        "installableIsoImage",
         "rawFsImage", "rawHdImage", "tarballImage", "updateIsoImage",
         "vhdImage", "virtualIronImage", "vmwareImage",
         "vmwareEsxImage", "xenOvaImage", ]
@@ -2274,15 +2278,12 @@
                     imageTypes.Image({'containerFormat':
                         containerTemplateRef}))
 
-        platform.addBuildTemplate(name="demo_cd",
-                displayName="Demo CD", architectureRef="x86",
-                containerTemplateRef="liveIsoImage")
         platform.addBuildTemplate(name="ami_large",
                 displayName="EC2 AMI Large/Huge", architectureRef="x86_64",
-                containerTemplateRef="amiImage", flavorSetRef="domU")
+                containerTemplateRef="amiImage", flavorSetRef="ami")
         platform.addBuildTemplate(name="ec2_small",
                 displayName="EC2 AMI Small", architectureRef="x86",
-                containerTemplateRef="amiImage", flavorSetRef="domU")
+                containerTemplateRef="amiImage", flavorSetRef="ami")
         platform.addBuildTemplate(name="iso", displayName="ISO",
                 architectureRef="x86",
                 containerTemplateRef="applianceIsoImage")
@@ -2343,20 +2344,20 @@
         platform.addBuildTemplate(name="virtual_iron",
                 displayName="Virtual Iron", architectureRef="x86",
                 containerTemplateRef="virtualIronImage",
-                flavorSetRef="generic")
+                flavorSetRef="virtual_iron")
         platform.addBuildTemplate(name="virtual_iron",
                 displayName="Virtual Iron", architectureRef="x86_64",
                 containerTemplateRef="virtualIronImage",
-                flavorSetRef="generic")
+                flavorSetRef="virtual_iron")
         platform.addBuildTemplate(name="xen_ova",
                 displayName="Xen OVA",
                 architectureRef="x86", containerTemplateRef="xenOvaImage",
-                flavorSetRef="domU")
+                flavorSetRef="xen")
         platform.addBuildTemplate(name="xen_ova",
                 displayName="Xen OVA",
                 architectureRef="x86_64",
                 containerTemplateRef="xenOvaImage",
-                flavorSetRef="domU")
+                flavorSetRef="xen")
 
 class _ProductDefinition(BaseXmlNode):
     def addChild(self, childNode):

From johnsonm@rpath.com Wed Nov 12 22:11:12 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mACMBCfH021179
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 22:11:12 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mACMBC12007271
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 17:11:12 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mACMBC8e019130
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 17:11:12 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mACMBBPV004837
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 17:11:11 -0500
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mACMBBVF004832
	for rpath-common-commits@lists.rpath.com;
	Wed, 12 Nov 2008 17:11:11 -0500
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200811122211.mACMBBVF004832@scc.eng.rpath.com>
Date: Wed, 12 Nov 2008 17:11:11 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: branch merge
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 12 Nov 2008 22:11:12 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

branch merge

diff -r 7ae8bfddc619 -r af2669355d0f rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Wed Nov 12 17:10:45 2008 -0500
+++ b/rpath_common/proddef/api1.py	Wed Nov 12 17:11:07 2008 -0500
@@ -550,6 +550,7 @@
         self.conaryRepositoryHostname = getattr(xmlObj,
             'conaryRepositoryHostname', None)
         self.conaryNamespace = getattr(xmlObj, 'conaryNamespace', None)
+        self.sourceGroup = getattr(xmlObj, 'sourceGroup', None)
         self.imageGroup = getattr(xmlObj, 'imageGroup', None)
         self.baseLabel = getattr(xmlObj, 'baseLabel', None)
         self.baseFlavor = getattr(xmlObj, 'baseFlavor', None)
@@ -718,6 +719,24 @@
         @type conaryNamespace: C{str}
         """
         self.conaryNamespace = conaryNamespace
+
+    def getSourceGroup(self):
+        """
+        @return: the source group, if none is set, default to the image group
+        @rtype: C{str}
+        """
+        if self.sourceGroup:
+            return self.sourceGroup
+        else:
+            return None
+
+    def setSourceGroup(self, sourceGroup):
+        """
+        Set the source group name
+        @param sourceGroup: the image group name
+        @type sourceGroup: C{str}
+        """
+        self.sourceGroup = sourceGroup
 
     def getImageGroup(self):
         """
@@ -918,7 +937,8 @@
         return self.buildDefinition
 
     def addBuildDefinition(self, name = None, image = None, stages = None,
-                           imageGroup = None, architectureRef = None,
+                           imageGroup = None, sourceGroup = None, 
+                           architectureRef = None,
                            containerTemplateRef = None, buildTemplateRef = None,
                            flavorSetRef = None, flavor = None):
         """
@@ -936,6 +956,9 @@
         @param imageGroup: An optional image group that will override the
         product definition's image group
         @type imageGroup: C{str}
+        @param sourceGroup: An optional source group that will override the
+        product definition's source group
+        @type sourceGroup: C{str}
         @param architectureRef: the name of an architecture to inherit flavors
         from.
         @type architectureRef: C{str}
@@ -969,7 +992,9 @@
 
         obj = Build(name = name, image = image, stages = stages,
                 imageGroup = imageGroup,
+                sourceGroup = sourceGroup,
                 parentImageGroup = self.imageGroup,
+                parentSourceGroup = self.sourceGroup,
                 architectureRef = architectureRef,
                 containerTemplateRef = containerTemplateRef,
                 flavorSetRef = flavorSetRef,
@@ -1530,6 +1555,7 @@
         self.conaryRepositoryHostname = None
         self.conaryNamespace = None
         self.imageGroup = None
+        self.sourceGroup = None
         self.baseLabel = None
         self.buildDefinition = _BuildDefinition()
         self.platform = None
@@ -1913,13 +1939,15 @@
         self.flavorSetRef = flavorSetRef
 
 class Build(xmllib.SerializableObject):
-    __slots__ = [ 'name', 'image', 'stages', 'imageGroup', 'parentImageGroup',
-                   'architectureRef', 'flavorSetRef', 'containerTemplateRef',
-                   'buildTemplateRef', 'flavor', '_proddef']
+    __slots__ = [ 'name', 'image', 'stages', 'imageGroup', 'sourceGroup',
+                  'parentImageGroup', 'parentSourceGroup',
+                  'architectureRef', 'flavorSetRef', 'containerTemplateRef',
+                  'buildTemplateRef', 'flavor', '_proddef']
     tag = "build"
 
     def __init__(self, name = None, image = None, stages = None,
-                 imageGroup = None, parentImageGroup = None,
+                 imageGroup = None, sourceGroup = None, 
+                 parentImageGroup = None, parentSourceGroup = None,
                  architectureRef = None, flavorSetRef = None,
                  containerTemplateRef = None,
                  buildTemplateRef = None, flavor = None,
@@ -1929,7 +1957,9 @@
         self.image = image
         self.stages = stages or []
         self.imageGroup = imageGroup
+        self.sourceGroup = sourceGroup
         self.parentImageGroup = parentImageGroup
+        self.parentSourceGroup = parentSourceGroup
         self.architectureRef = architectureRef
         self.containerTemplateRef = containerTemplateRef
         self.flavorSetRef = flavorSetRef
@@ -1954,6 +1984,14 @@
         if self.imageGroup is None:
             return self.parentImageGroup
         return self.imageGroup
+
+    def getBuildSourceGroup(self):
+        if self.sourceGroup:
+            return self.sourceGroup
+        elif self.parentSourceGroup:
+            return self.parentSourceGroup
+        else:
+            return None
 
     def getBuildImage(self):
         fields = {}
@@ -2047,6 +2085,9 @@
         if self.imageGroup is not None:
             yield xmllib.StringNode(name = 'imageGroup').characters(
                 self.imageGroup)
+        if self.sourceGroup:
+            yield xmllib.StringNode(name = 'sourceGroup').characters(
+                self.sourceGroup)
 
     def _iterAttributes(self):
         for f in ['name', 'architectureRef', 'containerTemplateRef',
@@ -2395,6 +2436,10 @@
             self.imageGroup = childNode.getText()
             return
 
+        if chName == self._makeAbsoluteName('sourceGroup'):
+            self.sourceGroup = childNode.getText()
+            return
+
         if chName == self._makeAbsoluteName('baseLabel'):
             self.baseLabel = childNode.getText()
             return
@@ -2568,6 +2613,15 @@
                 imageGroup = imageGroup[0].getText()
             else:
                 imageGroup = None
+            sourceGroup = node.getChildren('sourceGroup')
+            if sourceGroup:
+                sourceGroup = sourceGroup[0].getText()
+            else:
+                sourceGroup = None
+            if hasattr(self, 'sourceGroup'):
+                parentSourceGroup = self.sourceGroup
+            else:
+                parentSourceGroup = None
             pyobj = Build(
                 name = node.getAttribute('name'),
                 image = image,
@@ -2575,6 +2629,8 @@
                            for x in node.getChildren('stage') ],
                 imageGroup = imageGroup,
                 parentImageGroup = self.imageGroup,
+                sourceGroup = sourceGroup,
+                parentSourceGroup = parentSourceGroup, 
                 architectureRef = node.getAttribute('architectureRef'),
                 flavorSetRef = node.getAttribute('flavorSetRef'),
                 containerTemplateRef = \
@@ -2742,6 +2798,12 @@
         if imageGroup:
             self.imageGroup.characters(imageGroup)
 
+        self.sourceGroup = None
+        sourceGroup = prodDef.getSourceGroup()
+        if sourceGroup:
+            self.sourceGroup = xmllib.StringNode(name = 'sourceGroup')
+            self.sourceGroup.characters(sourceGroup)
+
         self.baseLabel = None
         baseLabel = prodDef.getBaseLabel()
         if baseLabel:
@@ -2762,6 +2824,7 @@
                  self.conaryRepositoryHostname,
                  self.conaryNamespace,
                  self.imageGroup,
+                 self.sourceGroup,
                  self.baseLabel,
                  self.baseFlavor,
                  self.stages, ]

From johnsonm@rpath.com Wed Nov 12 22:33:35 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mACMXZZp021630
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 22:33:35 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mACMXZ3A008297
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 17:33:35 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mACMXZED020232
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 17:33:35 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mACMXYJe006045
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 17:33:34 -0500
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mACMXYlA006040
	for rpath-common-commits@lists.rpath.com;
	Wed, 12 Nov 2008 17:33:34 -0500
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200811122233.mACMXYlA006040@scc.eng.rpath.com>
Date: Wed, 12 Nov 2008 17:33:34 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: trivial NEWS edits
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 12 Nov 2008 22:33:35 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       NEWS

trivial NEWS edits

diff -r af2669355d0f -r 6b052b429afa NEWS
--- a/NEWS	Wed Nov 12 17:11:07 2008 -0500
+++ b/NEWS	Wed Nov 12 17:33:19 2008 -0500
@@ -16,12 +16,13 @@
       ProductDefinitionTroveNotFoundError, ProductDefinitionFileNotFound
       is now ProductDefinitionFileNotFoundError, and 
       InvalidSchemaVersionError has been added.
-    * New API's for interacting with the sourceGroup element.  sourceGroup
-      specifies the name of the source groups to build when building groups.
-      (RPCL-44).
+    * The sourceGroup element specifies the source from which a group
+      is built.  New APIs have been added to produce and consume the
+      sourceGroup element:
         ProductDefinition.getSourceGroup()
         ProductDefinition.setSourceGroup(sourceGroup)
         Build.getBuildSourceGroup()
+      (RPCL-44)
 
   Bug Fixes:
     * Several platform attributes previously were not copied into a
@@ -29,7 +30,7 @@
       fixed. (RPCL-48)
 
   o Schema Versions:
-    * 2.0: Modifications required for RPCL-21, RPCL-44
+    * 2.0: Modifications required for RPCL-21, RPCL-44, sourceGroup
 
 Changes in 0.3:
   Bug Fixes:

From smg@rpath.com Thu Nov 13 16:20:28 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mADGKSPR001870
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 13 Nov 2008 16:20:28 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mADGKSFh013745
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 13 Nov 2008 11:20:28 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mADGKR8a004303
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 13 Nov 2008 11:20:27 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mADGKRdk001840
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 13 Nov 2008 11:20:27 -0500
Received: (from smg@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mADGKRQJ001825
	for rpath-common-commits@lists.rpath.com;
	Thu, 13 Nov 2008 11:20:27 -0500
From: Stu Gott <smg@rpath.com>
Message-Id: <200811131620.mADGKRQJ001825@scc.eng.rpath.com>
Date: Thu, 13 Nov 2008 11:20:27 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: tweaks to default platform (RPCL-13)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 13 Nov 2008 16:20:28 -0000

user:        Stu Gott <http://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

tweaks to default platform (RPCL-13)

diff -r 6625a89e8be2 -r 6f949fe92e22 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Wed Nov 12 16:49:33 2008 -0500
+++ b/rpath_common/proddef/api1.py	Thu Nov 13 11:16:14 2008 -0500
@@ -2288,42 +2288,146 @@
                                        nsName)
 
     def _addPlatformDefaults(self, platform):
-        platform.baseFlavor = None
+        platform.setBaseFlavor('~X, ~!alternatives, !bootstrap, ~builddocs, ~buildtests, !cross, ~desktop, ~!dom0, ~!domU, ~emacs, ~!gcj, ~gnome, ~gtk, ~ipv6, ~krb, ~ldap, ~nptl, pam, ~pcre, ~perl, ~!pie, ~python, ~readline, ~!sasl, ~!selinux, ~ssl, ~tcl, ~tk, ~!vmware, ~!xen, ~!xfce')
 
+        platform.addFlavorSet('ami', 'AMI',
+                '!dom0,domU,xen,!vmware')
         platform.addFlavorSet('generic', 'Generic',
                 '~!dom0,~!domU,~!xen,~!vmware')
-        platform.addFlavorSet('dom0', 'dom0',
-                '~dom0,~!domU,~xen,~!vmware')
-        platform.addFlavorSet('domU', 'domU',
+        platform.addFlavorSet('hyper_v', 'Hyper-V',
+                '!vmware, ~!xen, !dom0')
+        platform.addFlavorSet('virtual_iron', 'Virtual Iron',
+                '!xen,!vmware')
+        platform.addFlavorSet('vmware', 'VMware',
+                '~!dom0,!domU,~!xen,~vmware')
+        platform.addFlavorSet('xen', 'Xen',
                 '~!dom0,~domU,~xen,~!vmware')
-        platform.addFlavorSet('vmware', 'VMware',
-                '~!dom0,~!domU,~!xen,~vmware')
 
-        platform.addArchitecture('x86', 'x86 (32 bit)',
-                'is: x86(i486,i586,i686,sse,sse2)')
-        platform.addArchitecture('x86_64', 'x86 (64 bit)',
-                'is: x86(i486,i586,i686,sse,sse2) x86_64')
+        platform.addArchitecture('x86', 'x86 (32-bit)',
+                'grub.static,dietlibc is: x86(~i486,~i586,~i686,~sse,~sse2)')
+        platform.addArchitecture('x86_64', 'x86 (64-bit)',
+                '!grub.static,!dietlibc is: x86(~i486,~i586,~i686,~sse,~sse2) x86_64')
 
-        legacyImageTypes = ["amiImage", "applianceIsoImage",
-        "installableIsoImage", "liveIsoImage", "netbootImage",
-        "rawFsImage", "rawHdImage", "tarballImage", "updateIsoImage",
-        "vhdImage", "virtualIronImage", "vmwareImage",
-        "vmwareEsxImage", "xenOvaImage", ]
+        platform.addContainerTemplate(imageTypes.Image( \
+                {"containerFormat": "amiImage",
+                 "autoResolve": False,
+                 "baseFileName": "",
+                 "installLabelPath": "",
+                 "amiHugeDiskMountPoint": False,
+                 "freespace": 1024,
+                 "swapSize": 1024}))
+        platform.addContainerTemplate(imageTypes.Image( \
+                {"containerFormat": "applianceIsoImage",
+                 "autoResolve": False,
+                 "baseFileName": "",
+                 "installLabelPath": "",
+                 "anacondaCustomTrove": "",
+                 "anacondaTemplatesTrove": "conary.rpath.com@rpl:2",
+                 "betaNag": False,
+                 "bugsUrl": "",
+                 "maxIsoSize": None,
+                 "mediaTemplateTrove": "",
+                 "showMediaCheck": False}))
+        platform.addContainerTemplate(imageTypes.Image( \
+                {"containerFormat": "installableIsoImage",
+                 "autoResolve": False,
+                 "baseFileName": "",
+                 "installLabelPath": "",
+                 "anacondaCustomTrove": "",
+                 "anacondaTemplatesTrove": "conary.rpath.com@rpl:2",
+                 "betaNag": False,
+                 "bugsUrl": "",
+                 "maxIsoSize": None,
+                 "mediaTemplateTrove": "",
+                 "showMediaCheck": False}))
+        platform.addContainerTemplate(imageTypes.Image( \
+                {"containerFormat": "netBootImage",
+                 "autoResolve": False,
+                 "baseFileName": "",
+                 "installLabelPath": ""}))
+        platform.addContainerTemplate(imageTypes.Image( \
+                {"containerFormat": "rawFsImage",
+                 "autoResolve": False,
+                 "baseFileName": "",
+                 "installLabelPath": "",
+                 "freespace": 1024,
+                 "swapSize": 512}))
+        platform.addContainerTemplate(imageTypes.Image( \
+                {"containerFormat": "rawHdImage",
+                 "autoResolve": False,
+                 "baseFileName": "",
+                 "installLabelPath": "",
+                 "freespace": 1024,
+                 "swapSize": 512}))
+        platform.addContainerTemplate(imageTypes.Image( \
+                {"containerFormat": "tarballImage",
+                 "autoResolve": False,
+                 "baseFileName": "",
+                 "installLabelPath": "",
+                 "swapSize": "0"}))
+        platform.addContainerTemplate(imageTypes.Image( \
+                {"containerFormat": "updateIsoImage",
+                 "autoResolve": False,
+                 "baseFileName": "",
+                 "installLabelPath": "",
+                 "anacondaCustomTrove": "",
+                 "anacondaTemplatesTrove": "conary.rpath.com@rpl:2",
+                 "betaNag": False,
+                 "bugsUrl": "",
+                 "maxIsoSize": None,
+                 "mediaTemplateTrove": "",
+                 "showMediaCheck": False}))
+        platform.addContainerTemplate(imageTypes.Image( \
+                {"containerFormat": "vhdImage",
+                 "autoResolve": False,
+                 "baseFileName": "",
+                 "installLabelPath": "",
+                 "freespace": 1024,
+                 "swapSize": 512,
+                 "vhdDisktype": "dynamic"}))
+        platform.addContainerTemplate(imageTypes.Image( \
+                {"containerFormat": "virtualIronImage",
+                 "autoResolve": False,
+                 "baseFileName": "",
+                 "installLabelPath": "",
+                 "freespace": 1024,
+                 "swapSize": 512,
+                 "vhdDisktype": "dynamic"}))
+        platform.addContainerTemplate(imageTypes.Image( \
+                {"containerFormat": "vmwareImage",
+                 "autoResolve": False,
+                 "baseFileName": "",
+                 "installLabelPath": "",
+                 "diskAdapter": "lsilogic",
+                 "freespace": 1024,
+                 "natNetworking": True,
+                 "swapSize": 512,
+                 "vmMemory": 256,
+                 "vmSnapshots": False}))
+        platform.addContainerTemplate(imageTypes.Image( \
+                {"containerFormat": "vmwareEsxImage",
+                 "autoResolve": False,
+                 "baseFileName": "",
+                 "installLabelPath": "",
+                 "freespace": 1024,
+                 "natNetworking": True,
+                 "swapSize": 512,
+                 "vmMemory": 256}))
+        platform.addContainerTemplate(imageTypes.Image( \
+                {"containerFormat": "xenOvaImage",
+                 "autoResolve": False,
+                 "baseFileName": "",
+                 "installLabelPath": "",
+                 "freespace": 1024,
+                 "swapSize": 512,
+                 "vmMemory": 256}))
 
-        for containerTemplateRef in legacyImageTypes:
-            platform.addContainerTemplate( \
-                    imageTypes.Image({'containerFormat':
-                        containerTemplateRef}))
-
-        platform.addBuildTemplate(name="demo_cd",
-                displayName="Demo CD", architectureRef="x86",
-                containerTemplateRef="liveIsoImage")
         platform.addBuildTemplate(name="ami_large",
                 displayName="EC2 AMI Large/Huge", architectureRef="x86_64",
-                containerTemplateRef="amiImage", flavorSetRef="domU")
+                containerTemplateRef="amiImage", flavorSetRef="ami")
         platform.addBuildTemplate(name="ec2_small",
                 displayName="EC2 AMI Small", architectureRef="x86",
-                containerTemplateRef="amiImage", flavorSetRef="domU")
+                containerTemplateRef="amiImage", flavorSetRef="ami")
         platform.addBuildTemplate(name="iso", displayName="ISO",
                 architectureRef="x86",
                 containerTemplateRef="applianceIsoImage")
@@ -2384,20 +2488,20 @@
         platform.addBuildTemplate(name="virtual_iron",
                 displayName="Virtual Iron", architectureRef="x86",
                 containerTemplateRef="virtualIronImage",
-                flavorSetRef="generic")
+                flavorSetRef="virtual_iron")
         platform.addBuildTemplate(name="virtual_iron",
                 displayName="Virtual Iron", architectureRef="x86_64",
                 containerTemplateRef="virtualIronImage",
-                flavorSetRef="generic")
+                flavorSetRef="virtual_iron")
         platform.addBuildTemplate(name="xen_ova",
                 displayName="Xen OVA",
                 architectureRef="x86", containerTemplateRef="xenOvaImage",
-                flavorSetRef="domU")
+                flavorSetRef="xen")
         platform.addBuildTemplate(name="xen_ova",
                 displayName="Xen OVA",
                 architectureRef="x86_64",
                 containerTemplateRef="xenOvaImage",
-                flavorSetRef="domU")
+                flavorSetRef="xen")
 
 class _ProductDefinition(BaseXmlNode):
     def addChild(self, childNode):

From smg@rpath.com Thu Nov 13 16:20:29 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mADGKTXt001873
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 13 Nov 2008 16:20:29 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mADGKT79013750
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 13 Nov 2008 11:20:29 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mADGKS8C004306
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 13 Nov 2008 11:20:28 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mADGKSs4001870
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 13 Nov 2008 11:20:28 -0500
Received: (from smg@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mADGKSlp001865
	for rpath-common-commits@lists.rpath.com;
	Thu, 13 Nov 2008 11:20:28 -0500
From: Stu Gott <smg@rpath.com>
Message-Id: <200811131620.mADGKSlp001865@scc.eng.rpath.com>
Date: Thu, 13 Nov 2008 11:20:28 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: branch merge
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 13 Nov 2008 16:20:29 -0000

tag:         tip
user:        Stu Gott <http://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

branch merge


From dbc@rpath.com Thu Nov 13 17:45:38 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mADHjb2T002822
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 13 Nov 2008 17:45:37 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mADHjbup017563
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 13 Nov 2008 12:45:37 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mADHjbbH008613
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 13 Nov 2008 12:45:37 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mADHjaRo004100
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 13 Nov 2008 12:45:36 -0500
Received: (from dbc@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mADHjaM8004094
	for rpath-common-commits@lists.rpath.com;
	Thu, 13 Nov 2008 12:45:36 -0500
From: David Christian <dbc@rpath.com>
Message-Id: <200811131745.mADHjaM8004094@scc.eng.rpath.com>
Date: Thu, 13 Nov 2008 12:45:36 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: merge into staging - copy missing attributes
	during rebase (RPCL-48)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 13 Nov 2008 17:45:38 -0000

tag:         tip
user:        David Christian <http://issues.rpath.com>
files:       rpath_common/proddef/api1.py

merge into staging  - copy missing attributes during rebase (RPCL-48)

diff -r 7785bda1313a -r d2330ade57f6 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Sat Sep 06 01:19:08 2008 -0400
+++ b/rpath_common/proddef/api1.py	Thu Nov 13 12:45:16 2008 -0500
@@ -1306,6 +1306,11 @@
         self.setPlatformBaseFlavor(nplat.getBaseFlavor())
         self.setPlatformSourceTrove(nplat.sourceTrove)
         self.setPlatformUseLatest(useLatest)
+        self.platform.setPlatformName(nplat.getPlatformName())
+        self.platform.setPlatformVersionTrove(nplat.getPlatformVersionTrove())
+        for alr in nplat.getAutoLoadRecipes():
+            self.addPlatformAutoLoadRecipe(troveName = alr.getTroveName(),
+                    label = alr.getLabel())
         for sp in nplat.getSearchPaths():
             self.addPlatformSearchPath(troveName=sp.troveName,
                                        label=sp.label,

From jslagle@rpath.com Wed Nov 12 21:51:10 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mACLpACv020826
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 21:51:10 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mACLp9nv006513
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 16:51:09 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mACLp9HW018001
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 16:51:09 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mACLp970003191
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 16:51:09 -0500
Received: (from jslagle@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mACLp9kp003172
	for rpath-common-commits@lists.rpath.com;
	Wed, 12 Nov 2008 16:51:09 -0500
From: James Slagle <jslagle@rpath.com>
Message-Id: <200811122151.mACLp9kp003172@scc.eng.rpath.com>
Date: Wed, 12 Nov 2008 16:51:08 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: RPCL-44 add support for an optional
	sourceGroup element whereever imageGroup is specified. Don't force it
	to
	be there, and don't write it back out if it's not there to begin with.
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailman-Approved-At: Thu, 13 Nov 2008 17:47:58 +0000
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 12 Nov 2008 21:51:10 -0000

user:        James Slagle <https://issues.rpath.com>
files:       rpath_common/proddef/api1.py xsd/rpd-2.0.xsd

RPCL-44 add support for an optional sourceGroup element whereever imageGroup is specified.  Don't force it to be there, and don't write it back out if it's not there to begin with.

diff -r 611fb691aeee -r c77de1fce083 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Tue Nov 11 11:34:14 2008 -0500
+++ b/rpath_common/proddef/api1.py	Wed Nov 12 16:42:37 2008 -0500
@@ -546,6 +546,7 @@
         self.conaryRepositoryHostname = getattr(xmlObj,
             'conaryRepositoryHostname', None)
         self.conaryNamespace = getattr(xmlObj, 'conaryNamespace', None)
+        self.sourceGroup = getattr(xmlObj, 'sourceGroup', None)
         self.imageGroup = getattr(xmlObj, 'imageGroup', None)
         self.baseLabel = getattr(xmlObj, 'baseLabel', None)
         self.baseFlavor = getattr(xmlObj, 'baseFlavor', None)
@@ -714,6 +715,24 @@
         @type conaryNamespace: C{str}
         """
         self.conaryNamespace = conaryNamespace
+
+    def getSourceGroup(self):
+        """
+        @return: the source group, if none is set, default to the image group
+        @rtype: C{str}
+        """
+        if self.sourceGroup:
+            return self.sourceGroup
+        else:
+            return None
+
+    def setSourceGroup(self, sourceGroup):
+        """
+        Set the source group name
+        @param sourceGroup: the image group name
+        @type sourceGroup: C{str}
+        """
+        self.sourceGroup = sourceGroup
 
     def getImageGroup(self):
         """
@@ -916,7 +935,8 @@
         return self.buildDefinition
 
     def addBuildDefinition(self, name = None, image = None, stages = None,
-                           imageGroup = None, architectureRef = None,
+                           imageGroup = None, sourceGroup = None, 
+                           architectureRef = None,
                            containerTemplateRef = None, buildTemplateRef = None,
                            flavorSetRef = None, flavor = None):
         """
@@ -934,6 +954,9 @@
         @param imageGroup: An optional image group that will override the
         product definition's image group
         @type imageGroup: C{str}
+        @param sourceGroup: An optional source group that will override the
+        product definition's source group
+        @type sourceGroup: C{str}
         @param architectureRef: the name of an architecture to inherit flavors
         from.
         @type architectureRef: C{str}
@@ -967,7 +990,9 @@
 
         obj = Build(name = name, image = image, stages = stages,
                 imageGroup = imageGroup,
+                sourceGroup = sourceGroup,
                 parentImageGroup = self.imageGroup,
+                parentSourceGroup = self.sourceGroup,
                 architectureRef = architectureRef,
                 containerTemplateRef = containerTemplateRef,
                 flavorSetRef = flavorSetRef,
@@ -1523,6 +1548,7 @@
         self.conaryRepositoryHostname = None
         self.conaryNamespace = None
         self.imageGroup = None
+        self.sourceGroup = None
         self.baseLabel = None
         self.buildDefinition = _BuildDefinition()
         self.platform = None
@@ -1906,13 +1932,15 @@
         self.flavorSetRef = flavorSetRef
 
 class Build(xmllib.SerializableObject):
-    __slots__ = [ 'name', 'image', 'stages', 'imageGroup', 'parentImageGroup',
-                   'architectureRef', 'flavorSetRef', 'containerTemplateRef',
-                   'buildTemplateRef', 'flavor', '_proddef']
+    __slots__ = [ 'name', 'image', 'stages', 'imageGroup', 'sourceGroup',
+                  'parentImageGroup', 'parentSourceGroup',
+                  'architectureRef', 'flavorSetRef', 'containerTemplateRef',
+                  'buildTemplateRef', 'flavor', '_proddef']
     tag = "build"
 
     def __init__(self, name = None, image = None, stages = None,
-                 imageGroup = None, parentImageGroup = None,
+                 imageGroup = None, sourceGroup = None, 
+                 parentImageGroup = None, parentSourceGroup = None,
                  architectureRef = None, flavorSetRef = None,
                  containerTemplateRef = None,
                  buildTemplateRef = None, flavor = None,
@@ -1922,7 +1950,9 @@
         self.image = image
         self.stages = stages or []
         self.imageGroup = imageGroup
+        self.sourceGroup = sourceGroup
         self.parentImageGroup = parentImageGroup
+        self.parentSourceGroup = parentSourceGroup
         self.architectureRef = architectureRef
         self.containerTemplateRef = containerTemplateRef
         self.flavorSetRef = flavorSetRef
@@ -1947,6 +1977,14 @@
         if self.imageGroup is None:
             return self.parentImageGroup
         return self.imageGroup
+
+    def getBuildSourceGroup(self):
+        if self.sourceGroup:
+            return self.sourceGroup
+        elif self.parentSourceGroup:
+            return self.parentSourceGroup
+        else:
+            return None
 
     def getBuildImage(self):
         fields = {}
@@ -2040,6 +2078,9 @@
         if self.imageGroup is not None:
             yield xmllib.StringNode(name = 'imageGroup').characters(
                 self.imageGroup)
+        if self.sourceGroup:
+            yield xmllib.StringNode(name = 'sourceGroup').characters(
+                self.sourceGroup)
 
     def _iterAttributes(self):
         for f in ['name', 'architectureRef', 'containerTemplateRef',
@@ -2377,6 +2418,10 @@
             self.imageGroup = childNode.getText()
             return
 
+        if chName == self._makeAbsoluteName('sourceGroup'):
+            self.sourceGroup = childNode.getText()
+            return
+
         if chName == self._makeAbsoluteName('baseLabel'):
             self.baseLabel = childNode.getText()
             return
@@ -2550,6 +2595,15 @@
                 imageGroup = imageGroup[0].getText()
             else:
                 imageGroup = None
+            sourceGroup = node.getChildren('sourceGroup')
+            if sourceGroup:
+                sourceGroup = sourceGroup[0].getText()
+            else:
+                sourceGroup = None
+            if hasattr(self, 'sourceGroup'):
+                parentSourceGroup = self.sourceGroup
+            else:
+                parentSourceGroup = None
             pyobj = Build(
                 name = node.getAttribute('name'),
                 image = image,
@@ -2557,6 +2611,8 @@
                            for x in node.getChildren('stage') ],
                 imageGroup = imageGroup,
                 parentImageGroup = self.imageGroup,
+                sourceGroup = sourceGroup,
+                parentSourceGroup = parentSourceGroup, 
                 architectureRef = node.getAttribute('architectureRef'),
                 flavorSetRef = node.getAttribute('flavorSetRef'),
                 containerTemplateRef = \
@@ -2724,6 +2780,12 @@
         if imageGroup:
             self.imageGroup.characters(imageGroup)
 
+        self.sourceGroup = None
+        sourceGroup = prodDef.getSourceGroup()
+        if sourceGroup:
+            self.sourceGroup = xmllib.StringNode(name = 'sourceGroup')
+            self.sourceGroup.characters(sourceGroup)
+
         self.baseLabel = None
         baseLabel = prodDef.getBaseLabel()
         if baseLabel:
@@ -2744,6 +2806,7 @@
                  self.conaryRepositoryHostname,
                  self.conaryNamespace,
                  self.imageGroup,
+                 self.sourceGroup,
                  self.baseLabel,
                  self.baseFlavor,
                  self.stages, ]
diff -r 611fb691aeee -r c77de1fce083 xsd/rpd-2.0.xsd
--- a/xsd/rpd-2.0.xsd	Tue Nov 11 11:34:14 2008 -0500
+++ b/xsd/rpd-2.0.xsd	Wed Nov 12 16:42:37 2008 -0500
@@ -152,7 +152,10 @@
                     <xsd:attribute name="ref" type="xsd:string" use="required"/>
                 </xsd:complexType>
             </xsd:element>
-            <xsd:element name="imageGroup" type="rpd:troveSpecType" minOccurs="0" maxOccurs="1" />
+            <xsd:sequence>
+                <xsd:element name="imageGroup" type="rpd:troveSpecType" minOccurs="0" maxOccurs="1"/>
+                <xsd:element name="sourceGroup" type="rpd:troveSpecType" minOccurs="0" maxOccurs="1"/>
+            </xsd:sequence>
         </xsd:sequence>
         <xsd:attribute name="name" type="xsd:string" use="required" />
         <xsd:attribute name="architectureRef" type="xsd:string" />
@@ -294,7 +297,10 @@
                 <xsd:element name="productVersionDescription" type="xsd:string" />
                 <xsd:element name="conaryRepositoryHostname" type="xsd:string" />
                 <xsd:element name="conaryNamespace" type="xsd:string" />
-                <xsd:element name="imageGroup" type="rpd:troveSpecType" />
+                <xsd:sequence>
+                    <xsd:element name="imageGroup" type="rpd:troveSpecType"/>
+                    <xsd:element name="sourceGroup" type="rpd:troveSpecType" minOccurs="0" maxOccurs="1"/>
+                </xsd:sequence>
                 <!-- 1.3: explicit label when default is wrong (RPCL-18) -->
                 <xsd:element name="baseLabel" type="xsd:string" minOccurs="0" maxOccurs="1" />
                 <xsd:element name="baseFlavor" type="rpd:flavorStringType" minOccurs="0" maxOccurs="1" />

From jslagle@rpath.com Wed Nov 12 21:51:11 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mACLpBhB020829
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 21:51:11 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mACLpBCP006516
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 16:51:11 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mACLpAo1018007
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 16:51:10 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mACLpAmB003232
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 16:51:10 -0500
Received: (from jslagle@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mACLpAie003213
	for rpath-common-commits@lists.rpath.com;
	Wed, 12 Nov 2008 16:51:10 -0500
From: James Slagle <jslagle@rpath.com>
Message-Id: <200811122151.mACLpAie003213@scc.eng.rpath.com>
Date: Wed, 12 Nov 2008 16:51:09 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Branch Merge
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailman-Approved-At: Thu, 13 Nov 2008 17:47:58 +0000
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 12 Nov 2008 21:51:11 -0000

user:        James Slagle <https://issues.rpath.com>
files:       rpath_common/proddef/api1.py

Branch Merge

diff -r c77de1fce083 -r bac7fbde1cef rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Wed Nov 12 16:42:37 2008 -0500
+++ b/rpath_common/proddef/api1.py	Wed Nov 12 16:42:48 2008 -0500
@@ -22,14 +22,15 @@
             'ProductDefinition',
             'ProductDefinitionError',
             'StageNotFoundError',
-            'ProductDefinitionTroveNotFound',
-            'ProductDefinitionFileNotFound',
+            'ProductDefinitionTroveNotFoundError',
+            'ProductDefinitionFileNotFoundError',
             'RepositoryError',
             'PlatformLabelMissingError',
             'ArchitectureNotFoundError',
             'FlavorSetNotFoundError',
             'ContainerTemplateNotFoundError',
             'BuildTemplateNotFoundError',
+            'InvalidSchemaVersionError',
             ]
 
 import itertools
@@ -72,13 +73,13 @@
 class BuildTemplateNotFoundError(ProductDefinitionError):
     "Raised when no such build template exists."
 
-class ProductDefinitionTroveNotFound(ProductDefinitionError):
+class ProductDefinitionTroveNotFoundError(ProductDefinitionError):
     """
     Raised when the trove containing the product definition file could not
     be found in the repository
     """
 
-class ProductDefinitionFileNotFound(ProductDefinitionError):
+class ProductDefinitionFileNotFoundError(ProductDefinitionError):
     "Raised when the product definition file was not found in the repository"
 
 class RepositoryError(ProductDefinitionError):
@@ -86,6 +87,9 @@
 
 class PlatformLabelMissingError(ProductDefinitionError):
     "Raised when the platform label is missing, and a rebase was requested"
+
+class InvalidSchemaVersionError(ProductDefinitionError):
+    "Raised when the schema version in a product definition file is not recognized."
 
 #}
 
@@ -421,14 +425,14 @@
         try:
             troves = repos.findTroves(None, [ troveSpec ])
         except conaryErrors.TroveNotFound:
-            raise ProductDefinitionTroveNotFound("%s=%s" % (troveName, label))
+            raise ProductDefinitionTroveNotFoundError("%s=%s" % (troveName, label))
         except conaryErrors.RepositoryError, e:
             raise RepositoryError(str(e))
         # At this point, troveSpec is in troves and its value should not be
         # the empty list.
         nvfs = troves[troveSpec]
         #if not nvfs:
-        #    raise ProductDefinitionTroveNotFound("%s=%s" % (troveName, label))
+        #    raise ProductDefinitionTroveNotFoundError("%s=%s" % (troveName, label))
         trvCsSpec = (nvfs[0][0], (None, None), (nvfs[0][1], nvfs[0][2]), True)
         cs = conaryClient.createChangeSet([ trvCsSpec ], withFiles = True,
                                           withFileContents = True)
@@ -443,7 +447,7 @@
             return fileContents[0].get(), thawTrvCs.getNewNameVersionFlavor()
 
         # Couldn't find the file we expected; die
-        raise ProductDefinitionFileNotFound("%s=%s" % (troveName, label))
+        raise ProductDefinitionFileNotFoundError("%s=%s" % (troveName, label))
 
     def _initFields(self):
         self.baseFlavor = None
@@ -603,8 +607,8 @@
         @param client: A Conary client object
         @type client: C{conaryclient.ConaryClient}
         @raises C{RepositoryError}:
-        @raises C{ProductDefinitionTroveNotFound}:
-        @raises C{ProductDefinitionFileNotFound}:
+        @raises C{ProductDefinitionTroveNotFoundError}:
+        @raises C{ProductDefinitionFileNotFoundError}:
         """
         label = self.getProductDefinitionLabel()
         stream, nvf = self._getStreamFromRepository(client, label)
@@ -758,11 +762,9 @@
         platFlv = self.getPlatformBaseFlavor()
         if platFlv is not None:
             nflv = conaryDeps.parseFlavor(platFlv)
-            #flv.union(nflv)
             flv = conaryDeps.overrideFlavor(flv, nflv)
         if self.baseFlavor is not None:
             nflv = conaryDeps.parseFlavor(self.baseFlavor)
-            #flv.union(nflv)
             flv = conaryDeps.overrideFlavor(flv, nflv)
         return str(flv)
 
@@ -1490,6 +1492,11 @@
         self.setPlatformBaseFlavor(nplat.getBaseFlavor())
         self.setPlatformSourceTrove(nplat.sourceTrove)
         self.setPlatformUseLatest(useLatest)
+        self.platform.setPlatformName(nplat.getPlatformName())
+        self.platform.setPlatformVersionTrove(nplat.getPlatformVersionTrove())
+        for alr in nplat.getAutoLoadRecipes():
+            self.addPlatformAutoLoadRecipe(troveName = alr.getTroveName(),
+                    label = alr.getLabel())
         for sp in nplat.getSearchPaths():
             self.addPlatformSearchPath(troveName=sp.troveName,
                                        label=sp.label,
@@ -1656,8 +1663,8 @@
         @param client: A Conary client object
         @type client: C{conaryclient.ConaryClient}
         @raises C{RepositoryError}:
-        @raises C{ProductDefinitionTroveNotFound}:
-        @raises C{ProductDefinitionFileNotFound}:
+        @raises C{ProductDefinitionTroveNotFoundError}:
+        @raises C{ProductDefinitionFileNotFoundError}:
         """
         stream, nvf = self._getStreamFromRepository(client, label)
         stream.seek(0)
@@ -1689,7 +1696,7 @@
                                   self.getFactorySources()):
             key = (sp.troveName, sp.label, None)
             if key not in troves:
-                raise ProductDefinitionTroveNotFound("%s=%s" % (key[0], key[1]))
+                raise ProductDefinitionTroveNotFoundError("%s=%s" % (key[0], key[1]))
             nvf = troves[key][0]
             sp.version = str(nvf[1].trailingRevision())
 
@@ -2265,10 +2272,20 @@
                 xmllib.DataBinder.xmlSchemaNamespace)
         if not nsName:
             return None
-        nsName = os.path.basename(nsName).split()[-1]
-        assert nsName[:4] == 'rpd-'
-        assert nsName[-4:] == '.xsd'
-        return nsName[4:-4]
+        try:
+            nsName = os.path.basename(nsName).split()[-1]
+            prefix, nsName = nsName.split('-', 1)
+            if (prefix != 'rpd'):
+                raise InvalidSchemaVersionError(
+                    'Invalid schema prefix %s, expected rpd', prefix)
+            nsName, suffix = nsName.rsplit('.', 1)
+            if (suffix != 'xsd'):
+                raise InvalidSchemaVersionError(
+                    'Invalid schema suffix %s, expected xsd', suffix)
+            return nsName
+        except:
+            raise InvalidSchemaVersionError('Failed to parse schema version %s',
+                                       nsName)
 
     def _addPlatformDefaults(self, platform):
         platform.baseFlavor = None

From jslagle@rpath.com Wed Nov 12 21:51:13 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mACLpD9X020839
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 21:51:13 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mACLpDAn006522
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 16:51:13 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mACLpCgu018013
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 16:51:12 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mACLpCQY003281
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 12 Nov 2008 16:51:12 -0500
Received: (from jslagle@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mACLpBm6003276
	for rpath-common-commits@lists.rpath.com;
	Wed, 12 Nov 2008 16:51:11 -0500
From: James Slagle <jslagle@rpath.com>
Message-Id: <200811122151.mACLpBm6003276@scc.eng.rpath.com>
Date: Wed, 12 Nov 2008 16:51:11 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: RPCL-44 update NEWS
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailman-Approved-At: Thu, 13 Nov 2008 17:47:58 +0000
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 12 Nov 2008 21:51:13 -0000

tag:         tip
user:        James Slagle <https://issues.rpath.com>
files:       NEWS

RPCL-44 update NEWS

diff -r bac7fbde1cef -r 6625a89e8be2 NEWS
--- a/NEWS	Wed Nov 12 16:42:48 2008 -0500
+++ b/NEWS	Wed Nov 12 16:49:33 2008 -0500
@@ -16,6 +16,12 @@
       ProductDefinitionTroveNotFoundError, ProductDefinitionFileNotFound
       is now ProductDefinitionFileNotFoundError, and 
       InvalidSchemaVersionError has been added.
+    * New API's for interacting with the sourceGroup element.  sourceGroup
+      specifies the name of the source groups to build when building groups.
+      (RPCL-44).
+        ProductDefinition.getSourceGroup()
+        ProductDefinition.setSourceGroup(sourceGroup)
+        Build.getBuildSourceGroup()
 
   Bug Fixes:
     * Several platform attributes previously were not copied into a
@@ -23,7 +29,7 @@
       fixed. (RPCL-48)
 
   o Schema Versions:
-    * 2.0: Modifications required for RPCL-21
+    * 2.0: Modifications required for RPCL-21, RPCL-44
 
 Changes in 0.3:
   Bug Fixes:

From smg@rpath.com Mon Nov 17 22:21:36 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mAHMLaEk004016
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 17 Nov 2008 22:21:36 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mAHMLaJs008743
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 17 Nov 2008 17:21:36 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mAHMLaVg014472
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 17 Nov 2008 17:21:36 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mAHMLZSX003793
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 17 Nov 2008 17:21:35 -0500
Received: (from smg@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mAHMLZii003778
	for rpath-common-commits@lists.rpath.com;
	Mon, 17 Nov 2008 17:21:35 -0500
From: Stu Gott <smg@rpath.com>
Message-Id: <200811172221.mAHMLZii003778@scc.eng.rpath.com>
Date: Mon, 17 Nov 2008 17:21:34 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: mimic rpl:2 for rebase RPCL-13
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 17 Nov 2008 22:21:37 -0000

tag:         tip
user:        Stu Gott <http://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

mimic rpl:2 for rebase RPCL-13

diff -r 49adfac1b84b -r e27c21473628 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Thu Nov 13 11:20:23 2008 -0500
+++ b/rpath_common/proddef/api1.py	Mon Nov 17 17:17:45 2008 -0500
@@ -2287,221 +2287,221 @@
             raise InvalidSchemaVersionError('Failed to parse schema version %s',
                                        nsName)
 
-    def _addPlatformDefaults(self, platform):
-        platform.setBaseFlavor('~X, ~!alternatives, !bootstrap, ~builddocs, ~buildtests, !cross, ~desktop, ~!dom0, ~!domU, ~emacs, ~!gcj, ~gnome, ~gtk, ~ipv6, ~krb, ~ldap, ~nptl, pam, ~pcre, ~perl, ~!pie, ~python, ~readline, ~!sasl, ~!selinux, ~ssl, ~tcl, ~tk, ~!vmware, ~!xen, ~!xfce')
+def _addPlatformDefaults(platform):
+    platform.setBaseFlavor('~X, ~!alternatives, !bootstrap, ~builddocs, ~buildtests, !cross, ~desktop, ~!dom0, ~!domU, ~emacs, ~!gcj, ~gnome, ~gtk, ~ipv6, ~krb, ~ldap, ~nptl, pam, ~pcre, ~perl, ~!pie, ~python, ~readline, ~!sasl, ~!selinux, ~ssl, ~tcl, ~tk, ~!vmware, ~!xen, ~!xfce')
 
-        platform.addFlavorSet('ami', 'AMI',
-                '!dom0,domU,xen,!vmware')
-        platform.addFlavorSet('generic', 'Generic',
-                '~!dom0,~!domU,~!xen,~!vmware')
-        platform.addFlavorSet('hyper_v', 'Hyper-V',
-                '!vmware, ~!xen, !dom0')
-        platform.addFlavorSet('virtual_iron', 'Virtual Iron',
-                '!xen,!vmware')
-        platform.addFlavorSet('vmware', 'VMware',
-                '~!dom0,!domU,~!xen,~vmware')
-        platform.addFlavorSet('xen', 'Xen',
-                '~!dom0,~domU,~xen,~!vmware')
+    platform.addFlavorSet('ami', 'AMI',
+            '!dom0,domU,xen,!vmware')
+    platform.addFlavorSet('generic', 'Generic',
+            '~!dom0,~!domU,~!xen,~!vmware')
+    platform.addFlavorSet('hyper_v', 'Hyper-V',
+            '!vmware, ~!xen, !dom0')
+    platform.addFlavorSet('virtual_iron', 'Virtual Iron',
+            '!xen,!vmware')
+    platform.addFlavorSet('vmware', 'VMware',
+            '~!dom0,!domU,~!xen,~vmware')
+    platform.addFlavorSet('xen', 'Xen',
+            '~!dom0,~domU,~xen,~!vmware')
 
-        platform.addArchitecture('x86', 'x86 (32-bit)',
-                'grub.static,dietlibc is: x86(~i486,~i586,~i686,~sse,~sse2)')
-        platform.addArchitecture('x86_64', 'x86 (64-bit)',
-                '!grub.static,!dietlibc is: x86(~i486,~i586,~i686,~sse,~sse2) x86_64')
+    platform.addArchitecture('x86', 'x86 (32-bit)',
+            'grub.static,dietlibc is: x86(~i486,~i586,~i686,~sse,~sse2)')
+    platform.addArchitecture('x86_64', 'x86 (64-bit)',
+            '!grub.static,!dietlibc is: x86(~i486,~i586,~i686,~sse,~sse2) x86_64')
 
-        platform.addContainerTemplate(imageTypes.Image( \
-                {"containerFormat": "amiImage",
-                 "autoResolve": False,
-                 "baseFileName": "",
-                 "installLabelPath": "",
-                 "amiHugeDiskMountPoint": False,
-                 "freespace": 1024,
-                 "swapSize": 1024}))
-        platform.addContainerTemplate(imageTypes.Image( \
-                {"containerFormat": "applianceIsoImage",
-                 "autoResolve": False,
-                 "baseFileName": "",
-                 "installLabelPath": "",
-                 "anacondaCustomTrove": "",
-                 "anacondaTemplatesTrove": "conary.rpath.com@rpl:2",
-                 "betaNag": False,
-                 "bugsUrl": "",
-                 "maxIsoSize": None,
-                 "mediaTemplateTrove": "",
-                 "showMediaCheck": False}))
-        platform.addContainerTemplate(imageTypes.Image( \
-                {"containerFormat": "installableIsoImage",
-                 "autoResolve": False,
-                 "baseFileName": "",
-                 "installLabelPath": "",
-                 "anacondaCustomTrove": "",
-                 "anacondaTemplatesTrove": "conary.rpath.com@rpl:2",
-                 "betaNag": False,
-                 "bugsUrl": "",
-                 "maxIsoSize": None,
-                 "mediaTemplateTrove": "",
-                 "showMediaCheck": False}))
-        platform.addContainerTemplate(imageTypes.Image( \
-                {"containerFormat": "netBootImage",
-                 "autoResolve": False,
-                 "baseFileName": "",
-                 "installLabelPath": ""}))
-        platform.addContainerTemplate(imageTypes.Image( \
-                {"containerFormat": "rawFsImage",
-                 "autoResolve": False,
-                 "baseFileName": "",
-                 "installLabelPath": "",
-                 "freespace": 1024,
-                 "swapSize": 512}))
-        platform.addContainerTemplate(imageTypes.Image( \
-                {"containerFormat": "rawHdImage",
-                 "autoResolve": False,
-                 "baseFileName": "",
-                 "installLabelPath": "",
-                 "freespace": 1024,
-                 "swapSize": 512}))
-        platform.addContainerTemplate(imageTypes.Image( \
-                {"containerFormat": "tarballImage",
-                 "autoResolve": False,
-                 "baseFileName": "",
-                 "installLabelPath": "",
-                 "swapSize": "0"}))
-        platform.addContainerTemplate(imageTypes.Image( \
-                {"containerFormat": "updateIsoImage",
-                 "autoResolve": False,
-                 "baseFileName": "",
-                 "installLabelPath": "",
-                 "anacondaCustomTrove": "",
-                 "anacondaTemplatesTrove": "conary.rpath.com@rpl:2",
-                 "betaNag": False,
-                 "bugsUrl": "",
-                 "maxIsoSize": None,
-                 "mediaTemplateTrove": "",
-                 "showMediaCheck": False}))
-        platform.addContainerTemplate(imageTypes.Image( \
-                {"containerFormat": "vhdImage",
-                 "autoResolve": False,
-                 "baseFileName": "",
-                 "installLabelPath": "",
-                 "freespace": 1024,
-                 "swapSize": 512,
-                 "vhdDisktype": "dynamic"}))
-        platform.addContainerTemplate(imageTypes.Image( \
-                {"containerFormat": "virtualIronImage",
-                 "autoResolve": False,
-                 "baseFileName": "",
-                 "installLabelPath": "",
-                 "freespace": 1024,
-                 "swapSize": 512,
-                 "vhdDisktype": "dynamic"}))
-        platform.addContainerTemplate(imageTypes.Image( \
-                {"containerFormat": "vmwareImage",
-                 "autoResolve": False,
-                 "baseFileName": "",
-                 "installLabelPath": "",
-                 "diskAdapter": "lsilogic",
-                 "freespace": 1024,
-                 "natNetworking": True,
-                 "swapSize": 512,
-                 "vmMemory": 256,
-                 "vmSnapshots": False}))
-        platform.addContainerTemplate(imageTypes.Image( \
-                {"containerFormat": "vmwareEsxImage",
-                 "autoResolve": False,
-                 "baseFileName": "",
-                 "installLabelPath": "",
-                 "freespace": 1024,
-                 "natNetworking": True,
-                 "swapSize": 512,
-                 "vmMemory": 256}))
-        platform.addContainerTemplate(imageTypes.Image( \
-                {"containerFormat": "xenOvaImage",
-                 "autoResolve": False,
-                 "baseFileName": "",
-                 "installLabelPath": "",
-                 "freespace": 1024,
-                 "swapSize": 512,
-                 "vmMemory": 256}))
+    platform.addContainerTemplate(imageTypes.Image( \
+            {"containerFormat": "amiImage",
+             "autoResolve": False,
+             "baseFileName": "",
+             "installLabelPath": "",
+             "amiHugeDiskMountPoint": False,
+             "freespace": 1024,
+             "swapSize": 1024}))
+    platform.addContainerTemplate(imageTypes.Image( \
+            {"containerFormat": "applianceIsoImage",
+             "autoResolve": False,
+             "baseFileName": "",
+             "installLabelPath": "",
+             "anacondaCustomTrove": "",
+             "anacondaTemplatesTrove": "conary.rpath.com@rpl:2",
+             "betaNag": False,
+             "bugsUrl": "",
+             "maxIsoSize": None,
+             "mediaTemplateTrove": "",
+             "showMediaCheck": False}))
+    platform.addContainerTemplate(imageTypes.Image( \
+            {"containerFormat": "installableIsoImage",
+             "autoResolve": False,
+             "baseFileName": "",
+             "installLabelPath": "",
+             "anacondaCustomTrove": "",
+             "anacondaTemplatesTrove": "conary.rpath.com@rpl:2",
+             "betaNag": False,
+             "bugsUrl": "",
+             "maxIsoSize": None,
+             "mediaTemplateTrove": "",
+             "showMediaCheck": False}))
+    platform.addContainerTemplate(imageTypes.Image( \
+            {"containerFormat": "netBootImage",
+             "autoResolve": False,
+             "baseFileName": "",
+             "installLabelPath": ""}))
+    platform.addContainerTemplate(imageTypes.Image( \
+            {"containerFormat": "rawFsImage",
+             "autoResolve": False,
+             "baseFileName": "",
+             "installLabelPath": "",
+             "freespace": 1024,
+             "swapSize": 512}))
+    platform.addContainerTemplate(imageTypes.Image( \
+            {"containerFormat": "rawHdImage",
+             "autoResolve": False,
+             "baseFileName": "",
+             "installLabelPath": "",
+             "freespace": 1024,
+             "swapSize": 512}))
+    platform.addContainerTemplate(imageTypes.Image( \
+            {"containerFormat": "tarballImage",
+             "autoResolve": False,
+             "baseFileName": "",
+             "installLabelPath": "",
+             "swapSize": "0"}))
+    platform.addContainerTemplate(imageTypes.Image( \
+            {"containerFormat": "updateIsoImage",
+             "autoResolve": False,
+             "baseFileName": "",
+             "installLabelPath": "",
+             "anacondaCustomTrove": "",
+             "anacondaTemplatesTrove": "conary.rpath.com@rpl:2",
+             "betaNag": False,
+             "bugsUrl": "",
+             "maxIsoSize": None,
+             "mediaTemplateTrove": "",
+             "showMediaCheck": False}))
+    platform.addContainerTemplate(imageTypes.Image( \
+            {"containerFormat": "vhdImage",
+             "autoResolve": False,
+             "baseFileName": "",
+             "installLabelPath": "",
+             "freespace": 1024,
+             "swapSize": 512,
+             "vhdDisktype": "dynamic"}))
+    platform.addContainerTemplate(imageTypes.Image( \
+            {"containerFormat": "virtualIronImage",
+             "autoResolve": False,
+             "baseFileName": "",
+             "installLabelPath": "",
+             "freespace": 1024,
+             "swapSize": 512,
+             "vhdDisktype": "dynamic"}))
+    platform.addContainerTemplate(imageTypes.Image( \
+            {"containerFormat": "vmwareImage",
+             "autoResolve": False,
+             "baseFileName": "",
+             "installLabelPath": "",
+             "diskAdapter": "lsilogic",
+             "freespace": 1024,
+             "natNetworking": True,
+             "swapSize": 512,
+             "vmMemory": 256,
+             "vmSnapshots": False}))
+    platform.addContainerTemplate(imageTypes.Image( \
+            {"containerFormat": "vmwareEsxImage",
+             "autoResolve": False,
+             "baseFileName": "",
+             "installLabelPath": "",
+             "freespace": 1024,
+             "natNetworking": True,
+             "swapSize": 512,
+             "vmMemory": 256}))
+    platform.addContainerTemplate(imageTypes.Image( \
+            {"containerFormat": "xenOvaImage",
+             "autoResolve": False,
+             "baseFileName": "",
+             "installLabelPath": "",
+             "freespace": 1024,
+             "swapSize": 512,
+             "vmMemory": 256}))
 
-        platform.addBuildTemplate(name="ami_large",
-                displayName="EC2 AMI Large/Huge", architectureRef="x86_64",
-                containerTemplateRef="amiImage", flavorSetRef="ami")
-        platform.addBuildTemplate(name="ec2_small",
-                displayName="EC2 AMI Small", architectureRef="x86",
-                containerTemplateRef="amiImage", flavorSetRef="ami")
-        platform.addBuildTemplate(name="iso", displayName="ISO",
-                architectureRef="x86",
-                containerTemplateRef="applianceIsoImage")
-        platform.addBuildTemplate(name="iso", displayName="ISO",
-                architectureRef="x86",
-                containerTemplateRef="installableIsoImage")
-        platform.addBuildTemplate(name="iso", displayName="ISO",
-                architectureRef="x86",
-                containerTemplateRef="updateIsoImage")
-        platform.addBuildTemplate(name="iso", displayName="ISO",
-                architectureRef="x86_64",
-                containerTemplateRef="applianceIsoImage")
-        platform.addBuildTemplate(name="iso", displayName="ISO",
-                architectureRef="x86_64",
-                containerTemplateRef="installableIsoImage")
-        platform.addBuildTemplate(name="iso", displayName="ISO",
-                architectureRef="x86_64",
-                containerTemplateRef="updateIsoImage")
-        platform.addBuildTemplate(name="hyper_v",
-                displayName="MS Hyper-V", architectureRef="x86",
-                containerTemplateRef="vhdImage", flavorSetRef="generic")
-        platform.addBuildTemplate(name="hyper_v",
-                displayName="MS Hyper-V", architectureRef="x86_64",
-                containerTemplateRef="vhdImage", flavorSetRef="generic")
-        platform.addBuildTemplate(name="raw_fs",
-                displayName="Raw Filesystem", architectureRef="x86",
-                containerTemplateRef="rawFsImage")
-        platform.addBuildTemplate(name="raw_fs",
-                displayName="Raw Filesystem", architectureRef="x86_64",
-                containerTemplateRef="rawFsImage")
-        platform.addBuildTemplate(name="raw_hd",
-                displayName="Raw Hard Disk", architectureRef="x86",
-                containerTemplateRef="rawHdImage")
-        platform.addBuildTemplate(name="raw_hd",
-                displayName="Raw Hard Disk", architectureRef="x86_64",
-                containerTemplateRef="rawHdImage")
-        platform.addBuildTemplate(name="tar",
-                displayName="Tar Image", architectureRef="x86",
-                containerTemplateRef="tarballImage")
-        platform.addBuildTemplate(name="tar",
-                displayName="Tar Image", architectureRef="x86_64",
-                containerTemplateRef="tarballImage")
-        platform.addBuildTemplate(name="vmware", displayName="VMware",
-                architectureRef="x86", containerTemplateRef="vmwareImage",
-                flavorSetRef="vmware")
-        platform.addBuildTemplate(name="vmware", displayName="VMware",
-                architectureRef="x86",
-                containerTemplateRef="vmwareEsxImage",
-                flavorSetRef="vmware")
-        platform.addBuildTemplate(name="vmware", displayName="VMware",
-                architectureRef="x86_64",
-                containerTemplateRef="vmwareImage",
-                flavorSetRef="vmware")
-        platform.addBuildTemplate(name="vmware", displayName="VMware",
-                architectureRef="x86_64",
-                containerTemplateRef="vmwareEsxImage",
-                flavorSetRef="vmware")
-        platform.addBuildTemplate(name="virtual_iron",
-                displayName="Virtual Iron", architectureRef="x86",
-                containerTemplateRef="virtualIronImage",
-                flavorSetRef="virtual_iron")
-        platform.addBuildTemplate(name="virtual_iron",
-                displayName="Virtual Iron", architectureRef="x86_64",
-                containerTemplateRef="virtualIronImage",
-                flavorSetRef="virtual_iron")
-        platform.addBuildTemplate(name="xen_ova",
-                displayName="Xen OVA",
-                architectureRef="x86", containerTemplateRef="xenOvaImage",
-                flavorSetRef="xen")
-        platform.addBuildTemplate(name="xen_ova",
-                displayName="Xen OVA",
-                architectureRef="x86_64",
-                containerTemplateRef="xenOvaImage",
-                flavorSetRef="xen")
+    platform.addBuildTemplate(name="ami_large",
+            displayName="EC2 AMI Large/Huge", architectureRef="x86_64",
+            containerTemplateRef="amiImage", flavorSetRef="ami")
+    platform.addBuildTemplate(name="ec2_small",
+            displayName="EC2 AMI Small", architectureRef="x86",
+            containerTemplateRef="amiImage", flavorSetRef="ami")
+    platform.addBuildTemplate(name="iso", displayName="ISO",
+            architectureRef="x86",
+            containerTemplateRef="applianceIsoImage")
+    platform.addBuildTemplate(name="iso", displayName="ISO",
+            architectureRef="x86",
+            containerTemplateRef="installableIsoImage")
+    platform.addBuildTemplate(name="iso", displayName="ISO",
+            architectureRef="x86",
+            containerTemplateRef="updateIsoImage")
+    platform.addBuildTemplate(name="iso", displayName="ISO",
+            architectureRef="x86_64",
+            containerTemplateRef="applianceIsoImage")
+    platform.addBuildTemplate(name="iso", displayName="ISO",
+            architectureRef="x86_64",
+            containerTemplateRef="installableIsoImage")
+    platform.addBuildTemplate(name="iso", displayName="ISO",
+            architectureRef="x86_64",
+            containerTemplateRef="updateIsoImage")
+    platform.addBuildTemplate(name="hyper_v",
+            displayName="MS Hyper-V", architectureRef="x86",
+            containerTemplateRef="vhdImage", flavorSetRef="generic")
+    platform.addBuildTemplate(name="hyper_v",
+            displayName="MS Hyper-V", architectureRef="x86_64",
+            containerTemplateRef="vhdImage", flavorSetRef="generic")
+    platform.addBuildTemplate(name="raw_fs",
+            displayName="Raw Filesystem", architectureRef="x86",
+            containerTemplateRef="rawFsImage")
+    platform.addBuildTemplate(name="raw_fs",
+            displayName="Raw Filesystem", architectureRef="x86_64",
+            containerTemplateRef="rawFsImage")
+    platform.addBuildTemplate(name="raw_hd",
+            displayName="Raw Hard Disk", architectureRef="x86",
+            containerTemplateRef="rawHdImage")
+    platform.addBuildTemplate(name="raw_hd",
+            displayName="Raw Hard Disk", architectureRef="x86_64",
+            containerTemplateRef="rawHdImage")
+    platform.addBuildTemplate(name="tar",
+            displayName="Tar Image", architectureRef="x86",
+            containerTemplateRef="tarballImage")
+    platform.addBuildTemplate(name="tar",
+            displayName="Tar Image", architectureRef="x86_64",
+            containerTemplateRef="tarballImage")
+    platform.addBuildTemplate(name="vmware", displayName="VMware",
+            architectureRef="x86", containerTemplateRef="vmwareImage",
+            flavorSetRef="vmware")
+    platform.addBuildTemplate(name="vmware", displayName="VMware",
+            architectureRef="x86",
+            containerTemplateRef="vmwareEsxImage",
+            flavorSetRef="vmware")
+    platform.addBuildTemplate(name="vmware", displayName="VMware",
+            architectureRef="x86_64",
+            containerTemplateRef="vmwareImage",
+            flavorSetRef="vmware")
+    platform.addBuildTemplate(name="vmware", displayName="VMware",
+            architectureRef="x86_64",
+            containerTemplateRef="vmwareEsxImage",
+            flavorSetRef="vmware")
+    platform.addBuildTemplate(name="virtual_iron",
+            displayName="Virtual Iron", architectureRef="x86",
+            containerTemplateRef="virtualIronImage",
+            flavorSetRef="virtual_iron")
+    platform.addBuildTemplate(name="virtual_iron",
+            displayName="Virtual Iron", architectureRef="x86_64",
+            containerTemplateRef="virtualIronImage",
+            flavorSetRef="virtual_iron")
+    platform.addBuildTemplate(name="xen_ova",
+            displayName="Xen OVA",
+            architectureRef="x86", containerTemplateRef="xenOvaImage",
+            flavorSetRef="xen")
+    platform.addBuildTemplate(name="xen_ova",
+            displayName="Xen OVA",
+            architectureRef="x86_64",
+            containerTemplateRef="xenOvaImage",
+            flavorSetRef="xen")
 
 class _ProductDefinition(BaseXmlNode):
     def addChild(self, childNode):
@@ -2782,7 +2782,7 @@
                     not self.platform.buildTemplates and \
                     not self.platform.flavorSets:
                         self.baseFlavor = None
-                        self._addPlatformDefaults(self.platform)
+                        _addPlatformDefaults(self.platform)
         return self
 
 class _PlatformDefinition(BaseXmlNode):
@@ -2792,7 +2792,7 @@
                 not self.platform.architectures and \
                 not self.platform.buildTemplates and \
                 not self.platform.flavorSets:
-                    self._addPlatformDefaults(self.platform)
+                    _addPlatformDefaults(self.platform)
         return self
 
 class _PlatformSerialization(xmllib.BaseNode):

From smg@rpath.com Tue Nov 18 17:52:54 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mAIHqrq3016894
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 18 Nov 2008 17:52:53 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mAIHqrqB013558
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 18 Nov 2008 12:52:53 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mAIHqrTO002655
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 18 Nov 2008 12:52:53 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mAIHqrJC029033
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 18 Nov 2008 12:52:53 -0500
Received: (from smg@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mAIHqqpE029028
	for rpath-common-commits@lists.rpath.com;
	Tue, 18 Nov 2008 12:52:52 -0500
From: Stu Gott <smg@rpath.com>
Message-Id: <200811181752.mAIHqqpE029028@scc.eng.rpath.com>
Date: Tue, 18 Nov 2008 12:52:52 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: follow rpl:2 defaults
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 18 Nov 2008 17:52:54 -0000

tag:         tip
user:        Stu Gott <http://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

follow rpl:2 defaults

diff -r e27c21473628 -r 152c1ea13fcd rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Mon Nov 17 17:17:45 2008 -0500
+++ b/rpath_common/proddef/api1.py	Tue Nov 18 12:52:44 2008 -0500
@@ -2291,7 +2291,7 @@
     platform.setBaseFlavor('~X, ~!alternatives, !bootstrap, ~builddocs, ~buildtests, !cross, ~desktop, ~!dom0, ~!domU, ~emacs, ~!gcj, ~gnome, ~gtk, ~ipv6, ~krb, ~ldap, ~nptl, pam, ~pcre, ~perl, ~!pie, ~python, ~readline, ~!sasl, ~!selinux, ~ssl, ~tcl, ~tk, ~!vmware, ~!xen, ~!xfce')
 
     platform.addFlavorSet('ami', 'AMI',
-            '!dom0,domU,xen,!vmware')
+            '~!dom0,~domU,~xen,~!vmware')
     platform.addFlavorSet('generic', 'Generic',
             '~!dom0,~!domU,~!xen,~!vmware')
     platform.addFlavorSet('hyper_v', 'Hyper-V',

From johnsonm@rpath.com Wed Nov 19 18:46:06 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mAJIk6uY002488
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 19 Nov 2008 18:46:06 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mAJIk5rY001221
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 19 Nov 2008 13:46:05 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mAJIk4EH008616
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 19 Nov 2008 13:46:05 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mAJIk4Te032668
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 19 Nov 2008 13:46:04 -0500
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mAJIk479032663
	for rpath-common-commits@lists.rpath.com;
	Wed, 19 Nov 2008 13:46:04 -0500
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200811191846.mAJIk479032663@scc.eng.rpath.com>
Date: Wed, 19 Nov 2008 13:46:04 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: synchronize with further changes to rPath
	Linux 2 platform definition
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 19 Nov 2008 18:46:06 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

synchronize with further changes to rPath Linux 2 platform definition

diff -r 152c1ea13fcd -r d4ae83b5ce5c rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Tue Nov 18 12:52:44 2008 -0500
+++ b/rpath_common/proddef/api1.py	Wed Nov 19 13:46:01 2008 -0500
@@ -2304,9 +2304,9 @@
             '~!dom0,~domU,~xen,~!vmware')
 
     platform.addArchitecture('x86', 'x86 (32-bit)',
-            'grub.static,dietlibc is: x86(~i486,~i586,~i686,~sse,~sse2)')
+            'is: x86(~i486,~i586,~i686,~cmov,~mmx,~sse,~sse2)')
     platform.addArchitecture('x86_64', 'x86 (64-bit)',
-            '!grub.static,!dietlibc is: x86(~i486,~i586,~i686,~sse,~sse2) x86_64')
+            'is: x86(~i486,~i586,~i686,~cmov,~mmx,~sse,~sse2) x86_64')
 
     platform.addContainerTemplate(imageTypes.Image( \
             {"containerFormat": "amiImage",

From smg@rpath.com Fri Nov 21 16:05:54 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mALG5sk5030887
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 21 Nov 2008 16:05:54 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mALG5rrM010846
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 21 Nov 2008 11:05:53 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mALG5rER030585
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 21 Nov 2008 11:05:53 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mALG5rPj030120
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 21 Nov 2008 11:05:53 -0500
Received: (from smg@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mALG5q36030112
	for rpath-common-commits@lists.rpath.com;
	Fri, 21 Nov 2008 11:05:52 -0500
From: Stu Gott <smg@rpath.com>
Message-Id: <200811211605.mALG5q36030112@scc.eng.rpath.com>
Date: Fri, 21 Nov 2008 11:05:52 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: branch merge
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 21 Nov 2008 16:05:54 -0000

tag:         tip
user:        Stu Gott <http://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

branch merge


From smg@rpath.com Mon Nov 24 20:30:28 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mAOKUS7b013239
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 24 Nov 2008 20:30:28 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mAOKURSd026618
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 24 Nov 2008 15:30:27 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mAOKURhP026488
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 24 Nov 2008 15:30:27 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mAOKUR7w021969
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 24 Nov 2008 15:30:27 -0500
Received: (from smg@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mAOKURpW021961
	for rpath-common-commits@lists.rpath.com;
	Mon, 24 Nov 2008 15:30:27 -0500
From: Stu Gott <smg@rpath.com>
Message-Id: <200811242030.mAOKURpW021961@scc.eng.rpath.com>
Date: Mon, 24 Nov 2008 15:30:26 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: better migration for architectures and
	flavorSets (RBL-3867)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 24 Nov 2008 20:30:28 -0000

tag:         tip
user:        Stu Gott <http://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

better migration for architectures and flavorSets (RBL-3867)

diff -r 41ded1f19b75 -r a50d6b0bbd69 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Fri Nov 21 10:43:51 2008 -0500
+++ b/rpath_common/proddef/api1.py	Mon Nov 24 15:30:04 2008 -0500
@@ -2753,24 +2753,6 @@
 
     def finalize(self):
         if self._getSchemaVersion() in ('1.0', '1.1', '1.2', '1.3'):
-            for build in self.buildDefinition:
-                if not build.flavor:
-                    continue
-                flavor = conaryDeps.parseFlavor(build.flavor)
-
-                architectureRef = build.architectureRef
-                if architectureRef:
-                    architectures = hasattr(self, 'architectures') \
-                            and self.architectures or []
-                    arches = [x.flavor for x in architectures \
-                            if x.name == architectureRef]
-                    if not arches:
-                        continue
-                    archFlavor = conaryDeps.parseFlavor(arches[0])
-                    flavor = flavor.difference(archFlavor)
-                flavorStr = str(flavor)
-                build.flavor = flavorStr and str(flavor) or None
-
             if not hasattr(self, 'platform'):
                 # we're going to need a platform to store references to the
                 # containerTemplates, architectures and flavorSets
@@ -2783,6 +2765,85 @@
                     not self.platform.flavorSets:
                         self.baseFlavor = None
                         _addPlatformDefaults(self.platform)
+
+        if self._getSchemaVersion() in ('1.0', '1.1', '1.2', '1.3'):
+            for build in self.buildDefinition:
+                if not build.flavor:
+                    continue
+                flavor = conaryDeps.parseFlavor(build.flavor)
+
+                # we need to use all available information to get our
+                # inferences as right as we can. limit our arch and flavorSet
+                # guesses to those that are valid in the platform
+                matchingTemplates = [x for x in self.platform.buildTemplates \
+                        if x.containerTemplateRef == build.containerTemplateRef]
+                arches = dict([(x.name, conaryDeps.parseFlavor(x.flavor)) \
+                        for x in self.platform.architectures if x.name in \
+                        [y.architectureRef for y in matchingTemplates]])
+                if not arches:
+                    arches = dict([(x.name, conaryDeps.parseFlavor(x.flavor)) \
+                            for x in self.platform.architectures])
+                flavorSets = dict([(x.name, conaryDeps.parseFlavor(x.flavor)) \
+                        for x in self.platform.flavorSets if x.name in \
+                        [y.flavorSetRef for y in matchingTemplates]])
+                if not flavorSets:
+                    flavorSets = dict([(x.name, conaryDeps.parseFlavor(x.flavor)) \
+                            for x in self.platform.flavorSets])
+
+                def getMajorArch(flv):
+                    from conary.deps import arch
+                    if flv.members and conaryDeps.DEP_CLASS_IS in flv.members:
+                        depClass = flv.members[conaryDeps.DEP_CLASS_IS]
+                        return arch.getMajorArch(depClass.getDeps()).name
+                    return None
+
+                architectureRef = flavorSetRef = None
+                matchingArches = [x for x in arches.iteritems() \
+                        if x[1].satisfies(flavor) and \
+                        getMajorArch(x[1]) == getMajorArch(flavor)]
+                if matchingArches:
+                    architectureRef = max([(x[1].score(flavor), x[0]) \
+                            for x in matchingArches])[1]
+                else:
+                    # do what we can to infer the proper arch. this will likely
+                    # work for arches currently in the wild
+                    depName = getMajorArch(flavor)
+                    if depName in arches:
+                        architectureRef = depName
+
+                matchingFlavorSets = [x for x in flavorSets.iteritems() \
+                        if flavor.satisfies(x[1])]
+                if matchingFlavorSets:
+                    # strong Flavors is really not optimal, but historical
+                    # proddefs used flavors that were too strong,
+                    # leading to weird flavors matching over more logical ones
+                    # if we just score
+                    maxScore = max([flavor.toStrongFlavor().score( \
+                            x[1].toStrongFlavor()) for x in matchingFlavorSets])
+                    bestFlavors = [x for x in matchingFlavorSets if \
+                        flavor.toStrongFlavor().score(x[1].toStrongFlavor()) \
+                            == maxScore]
+                    if 'generic' in [x[0] for x in bestFlavors]:
+                        # if generic made the list, it's very likely the right
+                        # flavor to use
+                        flavorSetRef = 'generic'
+                    else:
+                        flavorNames = [x[0] for x in bestFlavors]
+                        # Xen and AMI are identicle on rPL 2. we will have to
+                        # resort to the container name to disambiguate
+                        if 'ami' in flavorNames and 'xen' in flavorNames:
+                            if build.containerTemplateRef == 'amiImage':
+                                flavorSetRef = 'ami'
+                            else:
+                                flavorSetRef = 'xen'
+                        else:
+                            flavorSetRef = bestFlavors[0][0]
+
+                flavorStr = str(flavor)
+                build.flavor = flavorStr and str(flavor) or None
+                build.architectureRef = architectureRef
+                build.flavorSetRef = flavorSetRef
+
         return self
 
 class _PlatformDefinition(BaseXmlNode):

From mtharp@rpath.com Tue Nov 25 20:56:19 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mAPKuJ5h030995
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 25 Nov 2008 20:56:19 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mAPKuIqQ007735
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 25 Nov 2008 15:56:18 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mAPKuISV001365
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 25 Nov 2008 15:56:18 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mAPKuIb5000501
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 25 Nov 2008 15:56:18 -0500
Received: (from mtharp@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mAPKuIiO000496
	for rpath-common-commits@lists.rpath.com; Tue, 25 Nov 2008 20:56:18 GMT
From: Michael Tharp <mtharp@rpath.com>
Message-Id: <200811252056.mAPKuIiO000496@scc.eng.rpath.com>
Date: Tue, 25 Nov 2008 20:56:18 +0000
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Add a getTroveTup() method to _SearchPath to
	simplify usage. (RPCL-51)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2008 20:56:19 -0000

tag:         tip
user:        Michael Tharp <mtharp@rpath.com>
files:       NEWS rpath_common/proddef/api1.py

Add a getTroveTup() method to _SearchPath to simplify usage. (RPCL-51)

diff -r a50d6b0bbd69 -r e578697fb2dd NEWS
--- a/NEWS	Mon Nov 24 15:30:04 2008 -0500
+++ b/NEWS	Tue Nov 25 20:56:08 2008 +0000
@@ -23,6 +23,9 @@
         ProductDefinition.setSourceGroup(sourceGroup)
         Build.getBuildSourceGroup()
       (RPCL-44)
+    * Search path entries now have a getTroveTup() method to
+      produce a consistent trovespec tuple for both the search path item
+      and the label from which it was selected. (RPCL-51)
 
   Bug Fixes:
     * Several platform attributes previously were not copied into a
diff -r a50d6b0bbd69 -r e578697fb2dd rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Mon Nov 24 15:30:04 2008 -0500
+++ b/rpath_common/proddef/api1.py	Tue Nov 25 20:56:08 2008 +0000
@@ -1684,8 +1684,7 @@
         # XXX We are ignoring the flavors for now.
         for sp in itertools.chain(self.getSearchPaths(),
                                   self.getFactorySources()):
-            key = (sp.troveName, sp.label, None)
-            troveSpecs.add(key)
+            troveSpecs.add(sp.getTroveTup(template=True))
         troveSpecs = sorted(troveSpecs)
         try:
             troves = repos.findTroves(None, troveSpecs, allowMissing = True)
@@ -1694,10 +1693,12 @@
 
         for sp in itertools.chain(self.getSearchPaths(),
                                   self.getFactorySources()):
-            key = (sp.troveName, sp.label, None)
+            key = sp.getTroveTup(template=True)
             if key not in troves:
-                raise ProductDefinitionTroveNotFoundError("%s=%s" % (key[0], key[1]))
-            nvf = troves[key][0]
+                raise ProductDefinitionTroveNotFoundError("%s=%s" % key[:2])
+            # Use the latest version, if for some reason there is more
+            # than one in the result set.
+            nvf = max(troves[key])
             sp.version = str(nvf[1].trailingRevision())
 
     def getPlatformName(self):
@@ -1902,6 +1903,23 @@
         self.troveName = troveName
         self.label = label
         self.version = version
+
+    def getTroveTup(self, template=False):
+        """
+        Get a trovespec tuple for the search path or its template.
+
+        @param template: If C{True}, use the template path; otherwise
+            return the "pinned" path.
+        @type  template: C{bool}
+        @return: (name, version, flavor)
+        """
+        if template:
+            return (self.troveName, self.label, None)
+        else:
+            version = self.label
+            if self.version:
+                version += '/' + self.version
+            return (self.troveName, version, None)
 
 class _FactorySource(_SearchPath):
     tag = "factorySource"

From smg@rpath.com Tue Nov 25 21:20:17 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mAPLKHVL031273
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 25 Nov 2008 21:20:17 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mAPLKHdi008488
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 25 Nov 2008 16:20:17 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mAPLKGWx002518
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 25 Nov 2008 16:20:17 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mAPLKGHg001099
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 25 Nov 2008 16:20:16 -0500
Received: (from smg@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mAPLKGLD001094
	for rpath-common-commits@lists.rpath.com;
	Tue, 25 Nov 2008 16:20:16 -0500
From: Stu Gott <smg@rpath.com>
Message-Id: <200811252120.mAPLKGLD001094@scc.eng.rpath.com>
Date: Tue, 25 Nov 2008 16:20:16 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: do not preserve flavor during migration (RBL-3886)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2008 21:20:17 -0000

tag:         tip
user:        Stu Gott <http://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

do not preserve flavor during migration (RBL-3886)

diff -r a50d6b0bbd69 -r 08ffa6e9572b rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Mon Nov 24 15:30:04 2008 -0500
+++ b/rpath_common/proddef/api1.py	Tue Nov 25 16:19:39 2008 -0500
@@ -2839,8 +2839,9 @@
                         else:
                             flavorSetRef = bestFlavors[0][0]
 
-                flavorStr = str(flavor)
-                build.flavor = flavorStr and str(flavor) or None
+                # RBL-3886 do not preserve flavor during migration. it does
+                # more harm than good
+                build.flavor = None
                 build.architectureRef = architectureRef
                 build.flavorSetRef = flavorSetRef
 

From smg@rpath.com Tue Nov 25 21:31:04 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mAPLV4UQ031336
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 25 Nov 2008 21:31:04 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mAPLV4nv008680
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 25 Nov 2008 16:31:04 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mAPLV3EH002989
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 25 Nov 2008 16:31:04 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mAPLV3jv001468
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 25 Nov 2008 16:31:03 -0500
Received: (from smg@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mAPLV3QC001463
	for rpath-common-commits@lists.rpath.com;
	Tue, 25 Nov 2008 16:31:03 -0500
From: Stu Gott <smg@rpath.com>
Message-Id: <200811252131.mAPLV3QC001463@scc.eng.rpath.com>
Date: Tue, 25 Nov 2008 16:31:03 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: branch merge
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2008 21:31:05 -0000

tag:         tip
user:        Stu Gott <http://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

branch merge

diff -r 08ffa6e9572b -r b5c747c0c1bb rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Tue Nov 25 16:19:39 2008 -0500
+++ b/rpath_common/proddef/api1.py	Tue Nov 25 16:30:59 2008 -0500
@@ -1684,8 +1684,7 @@
         # XXX We are ignoring the flavors for now.
         for sp in itertools.chain(self.getSearchPaths(),
                                   self.getFactorySources()):
-            key = (sp.troveName, sp.label, None)
-            troveSpecs.add(key)
+            troveSpecs.add(sp.getTroveTup(template=True))
         troveSpecs = sorted(troveSpecs)
         try:
             troves = repos.findTroves(None, troveSpecs, allowMissing = True)
@@ -1694,10 +1693,12 @@
 
         for sp in itertools.chain(self.getSearchPaths(),
                                   self.getFactorySources()):
-            key = (sp.troveName, sp.label, None)
+            key = sp.getTroveTup(template=True)
             if key not in troves:
-                raise ProductDefinitionTroveNotFoundError("%s=%s" % (key[0], key[1]))
-            nvf = troves[key][0]
+                raise ProductDefinitionTroveNotFoundError("%s=%s" % key[:2])
+            # Use the latest version, if for some reason there is more
+            # than one in the result set.
+            nvf = max(troves[key])
             sp.version = str(nvf[1].trailingRevision())
 
     def getPlatformName(self):
@@ -1902,6 +1903,23 @@
         self.troveName = troveName
         self.label = label
         self.version = version
+
+    def getTroveTup(self, template=False):
+        """
+        Get a trovespec tuple for the search path or its template.
+
+        @param template: If C{True}, use the template path; otherwise
+            return the "pinned" path.
+        @type  template: C{bool}
+        @return: (name, version, flavor)
+        """
+        if template:
+            return (self.troveName, self.label, None)
+        else:
+            version = self.label
+            if self.version:
+                version += '/' + self.version
+            return (self.troveName, version, None)
 
 class _FactorySource(_SearchPath):
     tag = "factorySource"

From johnsonm@rpath.com Wed Dec  3 22:28:08 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mB3MS88c001213
	for <rpath-common-commits@lists.rpath.com>; Wed, 3 Dec 2008 22:28:08 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mB3MS8Kp030602
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 3 Dec 2008 17:28:08 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mB3MS7BE032581
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 3 Dec 2008 17:28:07 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mB3MS7eH022132
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 3 Dec 2008 17:28:07 -0500
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mB3MS681022103
	for rpath-common-commits@lists.rpath.com; Wed, 3 Dec 2008 17:28:06 -0500
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200812032228.mB3MS681022103@scc.eng.rpath.com>
Date: Wed, 03 Dec 2008 17:28:06 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: prepare 0.4 release
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 03 Dec 2008 22:28:08 -0000

tag:         product-definition-0.4
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       Make.defs

prepare 0.4 release

diff -r b5c747c0c1bb -r b57c486bfce2 Make.defs
--- a/Make.defs	Tue Nov 25 16:30:59 2008 -0500
+++ b/Make.defs	Wed Dec 03 17:26:46 2008 -0500
@@ -12,7 +12,7 @@
 # full details.
 #
 
-VERSION=0.3
+VERSION=0.4
 # VERSION can be overridden by snapshot builds to force incompatible versions
 
 export prefix = /usr

From johnsonm@rpath.com Wed Dec  3 22:28:09 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mB3MS985001219
	for <rpath-common-commits@lists.rpath.com>; Wed, 3 Dec 2008 22:28:09 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mB3MS8mb030608
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 3 Dec 2008 17:28:08 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mB3MS8C4032586
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 3 Dec 2008 17:28:08 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mB3MS7gF022148
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 3 Dec 2008 17:28:07 -0500
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mB3MS7oN022136
	for rpath-common-commits@lists.rpath.com; Wed, 3 Dec 2008 17:28:07 -0500
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200812032228.mB3MS7oN022136@scc.eng.rpath.com>
Date: Wed, 03 Dec 2008 17:28:07 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Added tag product-definition-0.4 for
	changeset b57c486bfce2
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 03 Dec 2008 22:28:09 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       .hgtags

Added tag product-definition-0.4 for changeset b57c486bfce2

diff -r b57c486bfce2 -r 96cefbac4ea6 .hgtags
--- a/.hgtags	Wed Dec 03 17:26:46 2008 -0500
+++ b/.hgtags	Wed Dec 03 17:27:15 2008 -0500
@@ -3,3 +3,4 @@
 dda1dd574149cd43221a5fcba3669247fd0fdfc0 product-definition-0.1
 03d747942429f09d5f9759deb8cf10c45476adfc product-definition-0.2
 9049959e5527c9ba666f999ea855fe45a23868c3 product-definition-0.3
+b57c486bfce2ff37b8e030a60d41d9996db5433e product-definition-0.4

From smg@rpath.com Tue Dec  9 15:32:44 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mB9FWiUu028683
	for <rpath-common-commits@lists.rpath.com>; Tue, 9 Dec 2008 15:32:44 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mB9FWhB8015687
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 9 Dec 2008 10:32:43 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mB9FWhfe015383
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 9 Dec 2008 10:32:43 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mB9FWgrd031494
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 9 Dec 2008 10:32:43 -0500
Received: (from smg@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mB9FWgia031488
	for rpath-common-commits@lists.rpath.com; Tue, 9 Dec 2008 10:32:42 -0500
From: Stu Gott <smg@rpath.com>
Message-Id: <200812091532.mB9FWgia031488@scc.eng.rpath.com>
Date: Tue, 09 Dec 2008 10:32:40 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: remove unused code (RPCL-52)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 09 Dec 2008 15:32:44 -0000

tag:         tip
user:        Stu Gott <http://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

remove unused code (RPCL-52)

diff -r 96cefbac4ea6 -r 9088b917a9f3 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Wed Dec 03 17:27:15 2008 -0500
+++ b/rpath_common/proddef/api1.py	Tue Dec 09 10:32:25 2008 -0500
@@ -2798,9 +2798,6 @@
                 arches = dict([(x.name, conaryDeps.parseFlavor(x.flavor)) \
                         for x in self.platform.architectures if x.name in \
                         [y.architectureRef for y in matchingTemplates]])
-                if not arches:
-                    arches = dict([(x.name, conaryDeps.parseFlavor(x.flavor)) \
-                            for x in self.platform.architectures])
                 flavorSets = dict([(x.name, conaryDeps.parseFlavor(x.flavor)) \
                         for x in self.platform.flavorSets if x.name in \
                         [y.flavorSetRef for y in matchingTemplates]])
@@ -2847,13 +2844,11 @@
                         flavorSetRef = 'generic'
                     else:
                         flavorNames = [x[0] for x in bestFlavors]
-                        # Xen and AMI are identicle on rPL 2. we will have to
-                        # resort to the container name to disambiguate
+                        # Xen and AMI are identicle on rPL 2, but only ami will
+                        # be rpesent if it's an amiImage, thus xen is more
+                        # dominant.
                         if 'ami' in flavorNames and 'xen' in flavorNames:
-                            if build.containerTemplateRef == 'amiImage':
-                                flavorSetRef = 'ami'
-                            else:
-                                flavorSetRef = 'xen'
+                            flavorSetRef = 'xen'
                         else:
                             flavorSetRef = bestFlavors[0][0]
 

From smg@rpath.com Tue Dec 16 15:50:15 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mBGFoFob006998
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 16 Dec 2008 15:50:15 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mBGFoF7R009240
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 16 Dec 2008 10:50:15 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mBGFoFJj017134
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 16 Dec 2008 10:50:15 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mBGFoELW002038
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 16 Dec 2008 10:50:14 -0500
Received: (from smg@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mBGFoE22002033
	for rpath-common-commits@lists.rpath.com;
	Tue, 16 Dec 2008 10:50:14 -0500
From: Stu Gott <smg@rpath.com>
Message-Id: <200812161550.mBGFoE22002033@scc.eng.rpath.com>
Date: Tue, 16 Dec 2008 10:50:14 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: content flags for searchPaths (RPCL-53)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 16 Dec 2008 15:50:16 -0000

tag:         tip
user:        Stu Gott <http://issues.rpath.com/>
files:       rpath_common/proddef/api1.py xsd/rpd-2.0.xsd

content flags for searchPaths (RPCL-53)

diff -r 9088b917a9f3 -r a5855f412f3a rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Tue Dec 09 10:32:25 2008 -0500
+++ b/rpath_common/proddef/api1.py	Tue Dec 16 10:49:46 2008 -0500
@@ -142,6 +142,24 @@
         """
         return self.searchPaths
 
+    def getResolveTroves(self):
+        """
+        @return: the search paths from this product definition, filtering
+                 any results that have the notResolveTrove attribute. This
+                 is a subset of the results from getSearchPaths
+        @rtype: C{list} of C{_SearchPath} objects
+        """
+        return [x for x in self.searchPaths if not x.notResolveTrove]
+
+    def getGroupSearchPaths(self):
+        """
+        @return: the search paths from this product definition, filtering
+                 any results that have the notGroupSearchPath attribute. This
+                 is a subset of the results from getSearchPaths
+        @rtype: C{list} of C{_SearchPath} objects
+        """
+        return [x for x in self.searchPaths if not x.notGroupSearchPath]
+
     def clearSearchPaths(self):
         """
         Delete all searchPaths.
@@ -165,7 +183,8 @@
         """
         self.factorySources = _FactorySources()
 
-    def addSearchPath(self, troveName = None, label = None, version = None):
+    def addSearchPath(self, troveName = None, label = None, version = None,
+            notResolveTrove = None, notGroupSearchPath = None):
         """
         Add an search path.
         @param troveName: the trove name for the search path.
@@ -175,7 +194,9 @@
         @param version: Version for the search path
         @param version: C{str} or C{None}
         """
-        self._addSource(troveName, label, version, _SearchPath, self.searchPaths)
+        self._addSource(troveName, label, version, _SearchPath,
+                self.searchPaths, notResolveTrove = notResolveTrove,
+                notGroupSearchPath = notGroupSearchPath)
 
     def addFactorySource(self, troveName = None, label = None, version = None):
         """
@@ -385,12 +406,13 @@
         """
         self.buildTemplates = _BuildTemplates()
 
-    def _addSource(self, troveName, label, version, cls, intList):
+    def _addSource(self, troveName, label, version, cls, intList, **kwargs):
         "Internal function for adding a Source"
         if label is not None:
             if isinstance(label, conaryVersions.Label):
                 label = str(label)
-        obj = cls(troveName = troveName, label = label, version = version)
+        obj = cls(troveName = troveName, label = label, version = version,
+                **kwargs)
         intList.append(obj)
 
     def _saveToRepository(self, conaryClient, label, message = None):
@@ -920,6 +942,36 @@
             return self.searchPaths
         return self.getPlatformSearchPaths()
 
+    def getResolveTroves(self):
+        """
+        @return: the search paths from this product definition, filtering
+                 any results that have the notResolveTrove attribute. This
+                 is a subset of the results from getSearchPaths
+        @rtype: C{list} of C{_SearchPath} objects
+        """
+        if self.searchPaths:
+            searchPaths = self.searchPaths
+        else:
+            searchPaths = self.getPlatformSearchPaths()
+        if searchPaths:
+            searchPaths = [x for x in searchPaths if not x.notResolveTrove]
+        return searchPaths
+
+    def getGroupSearchPaths(self):
+        """
+        @return: the search paths from this product definition, filtering
+                 any results that have the notGroupSearchPath attribute. This
+                 is a subset of the results from getSearchPaths
+        @rtype: C{list} of C{_SearchPath} objects
+        """
+        if self.searchPaths:
+            searchPaths = self.searchPaths
+        else:
+            searchPaths = self.getPlatformSearchPaths()
+        if searchPaths:
+            searchPaths = [x for x in searchPaths if not x.notGroupSearchPath]
+        return searchPaths
+
     def getFactorySources(self):
         """
         @return: the factory sources from this product definition
@@ -1030,7 +1082,8 @@
         self.platform.searchPaths = _SearchPaths()
 
     def addPlatformSearchPath(self, troveName = None, label = None,
-                              version = None):
+                              version = None, notResolveTrove = None,
+                              notGroupSearchPath = None):
         """
         Add an search path.
         @param troveName: the trove name for the search path.
@@ -1043,7 +1096,9 @@
         if self.platform is None:
             self.platform = PlatformDefinition()
         self._addSource(troveName, label, version, _SearchPath,
-                        self.platform.searchPaths)
+                        self.platform.searchPaths,
+                        notResolveTrove = notResolveTrove,
+                        notGroupSearchPath = notGroupSearchPath)
 
     def getPlatformFactorySources(self):
         """
@@ -1412,12 +1467,12 @@
         for build in self.buildDefinition:
             if not build.imageGroup:
                 continue
-            key = (build.imageGroup, label)
+            key = (build.imageGroup, label, tuple())
             if key not in sPathsSet:
                 sPathsList.append(key)
                 sPathsSet.add(key)
         # Append the global image group
-        key = (self.getImageGroup(), label)
+        key = (self.getImageGroup(), label, tuple())
         if key not in sPathsSet:
             sPathsList.append(key)
             sPathsSet.add(key)
@@ -1429,13 +1484,18 @@
 
         sPaths = self.getSearchPaths()
         for sp in sPaths or []:
-            key = (sp.troveName, sp.label)
+            attrs = []
+            for key in ('notResolveTrove', 'notGroupSearchPath'):
+                val = sp.__getattribute__(key)
+                if val is not None:
+                    attrs.append((key, val))
+            key = (sp.troveName, sp.label, tuple(attrs))
             if key not in sPathsSet:
                 sPathsList.append(key)
                 sPathsSet.add(key)
 
-        for troveName, label in sPathsList:
-            nplat.addSearchPath(troveName=troveName, label=label)
+        for troveName, label, attrs in sPathsList:
+            nplat.addSearchPath(troveName=troveName, label=label, **dict(attrs))
 
         for arch in self.getArchitectures():
             nplat.addArchitecture(name = arch.name,
@@ -1500,11 +1560,13 @@
         for sp in nplat.getSearchPaths():
             self.addPlatformSearchPath(troveName=sp.troveName,
                                        label=sp.label,
-                                       version=sp.version)
-        for sp in nplat.getFactorySources():
-            self.addPlatformFactorySource(troveName=sp.troveName,
-                                          label=sp.label,
-                                          version=sp.version)
+                                       version=sp.version,
+                                       notResolveTrove=sp.notResolveTrove,
+                                       notGroupSearchPath=sp.notGroupSearchPath)
+        for fs in nplat.getFactorySources():
+            self.addPlatformFactorySource(troveName=fs.troveName,
+                                          label=fs.label,
+                                          version=fs.version)
         for item in nplat.getArchitectures():
             self.platform.addArchitecture(name = item.name,
                                           displayName = item.displayName,
@@ -1895,14 +1957,18 @@
         return list(self.promoteMaps)
 
 class _SearchPath(xmllib.SlotBasedSerializableObject):
-    __slots__ = [ 'troveName', 'label', 'version' ]
+    __slots__ = ['troveName', 'label', 'version', 'notResolveTrove',
+                 'notGroupSearchPath']
     tag = "searchPath"
 
-    def __init__(self, troveName = None, label = None, version = None):
+    def __init__(self, troveName = None, label = None, version = None,
+            notResolveTrove = None, notGroupSearchPath = None):
         xmllib.SlotBasedSerializableObject.__init__(self)
         self.troveName = troveName
         self.label = label
         self.version = version
+        self.notResolveTrove = notResolveTrove
+        self.notGroupSearchPath = notGroupSearchPath
 
     def getTroveTup(self, template=False):
         """
@@ -2181,7 +2247,9 @@
             pyObj = _SearchPath(
                 troveName = node.getAttribute('troveName'),
                 label = node.getAttribute('label'),
-                version = node.getAttribute('version'))
+                version = node.getAttribute('version'),
+                notResolveTrove = node.getAttribute('notResolveTrove'),
+                notGroupSearchPath = node.getAttribute('notGroupSearchPath'))
             sources.append(pyObj)
         return sources
 
diff -r 9088b917a9f3 -r a5855f412f3a xsd/rpd-2.0.xsd
--- a/xsd/rpd-2.0.xsd	Tue Dec 09 10:32:25 2008 -0500
+++ b/xsd/rpd-2.0.xsd	Tue Dec 16 10:49:46 2008 -0500
@@ -58,6 +58,8 @@
     <xsd:complexType name="searchPathType">
         <xsd:attributeGroup ref="attrGroupNameLabel" />
         <xsd:attribute name="version" type="xsd:string" />
+        <xsd:attribute name="notResolveTrove" type="xsd:boolean" />
+        <xsd:attribute name="notGroupSearchPath" type="xsd:boolean" />
     </xsd:complexType>
 
     <xsd:complexType name="searchPathListType">

From johnsonm@rpath.com Thu Dec 18 02:53:27 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mBI2rRAZ006484
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 18 Dec 2008 02:53:27 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mBI2rRNL009793
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 17 Dec 2008 21:53:27 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mBI2rRY3015074
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 17 Dec 2008 21:53:27 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mBI2rP3H029662
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 17 Dec 2008 21:53:25 -0500
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mBI2rPPP029657
	for rpath-common-commits@lists.rpath.com;
	Wed, 17 Dec 2008 21:53:25 -0500
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200812180253.mBI2rPPP029657@scc.eng.rpath.com>
Date: Wed, 17 Dec 2008 21:53:25 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: add missing NEWS entry for RPCL-50
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 18 Dec 2008 02:53:28 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       NEWS

add missing NEWS entry for RPCL-50

diff -r a5855f412f3a -r a87e8c375c62 NEWS
--- a/NEWS	Tue Dec 16 10:49:46 2008 -0500
+++ b/NEWS	Wed Dec 17 21:53:15 2008 -0500
@@ -1,3 +1,18 @@
+Changes in @NEW@:
+  o API Changes:
+    * searchPath elements now have additional attributes exposed
+      which denote contexts to which they apply.  Right now, the
+      two attributes exposed are notResolveTrove and notGroupSearchPath
+      which default to False (no change in behavior) but can be
+      set to limit the applicability of an element.  In addition,
+      product definition objects have additional getResolveTroves
+      and getGroupSearchPaths methods which filter the searchPaths
+      by the attributes exposed. (RPCL-50)
+
+  o Schema Versions:
+    * 2.0: Backward-compatible extension to support RPCL-50.
+
+
 Changes in 0.4:
   o API Changes:
     * Images are now defined differently.  Platforms provide

From dbc@rpath.com Thu Dec 18 16:49:45 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mBIGnj5f017842
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 18 Dec 2008 16:49:45 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mBIGnjbQ012462
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 18 Dec 2008 11:49:45 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mBIGniu6028905
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 18 Dec 2008 11:49:45 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mBIGnhV8019278
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 18 Dec 2008 11:49:43 -0500
Received: (from dbc@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mBIGngL1019266
	for rpath-common-commits@lists.rpath.com;
	Thu, 18 Dec 2008 11:49:42 -0500
From: David Christian <dbc@rpath.com>
Message-Id: <200812181649.mBIGngL1019266@scc.eng.rpath.com>
Date: Thu, 18 Dec 2008 11:49:42 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Switch to isResolveTrove and
	isGroupSearchPathTrove from notResolveTrove and
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 18 Dec 2008 16:49:45 -0000

user:        David Christian <http://issues.rpath.com>
files:       rpath_common/proddef/api1.py xsd/rpd-2.0.xsd

Switch to isResolveTrove and isGroupSearchPathTrove from notResolveTrove and
notGroupSearchPath.  Make sure the variables get converted to bools

diff -r a5855f412f3a -r 93ffdbcc49d3 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Tue Dec 16 10:49:46 2008 -0500
+++ b/rpath_common/proddef/api1.py	Thu Dec 18 11:39:36 2008 -0500
@@ -145,20 +145,24 @@
     def getResolveTroves(self):
         """
         @return: the search paths from this product definition, filtering
-                 any results that have the notResolveTrove attribute. This
-                 is a subset of the results from getSearchPaths
+                 any results that have the isResolveTrove attribute set to 
+                 False. This is a subset of the results from getSearchPaths
         @rtype: C{list} of C{_SearchPath} objects
         """
-        return [x for x in self.searchPaths if not x.notResolveTrove]
+        return [x for x in self.searchPaths 
+                if x.isResolveTrove or x.isResolveTrove is None]
 
     def getGroupSearchPaths(self):
         """
         @return: the search paths from this product definition, filtering
-                 any results that have the notGroupSearchPath attribute. This
-                 is a subset of the results from getSearchPaths
+                 any results that do not have isGroupSearchPathTrove attribute
+                 set to False. This is a subset of the results 
+                 from getSearchPaths
         @rtype: C{list} of C{_SearchPath} objects
         """
-        return [x for x in self.searchPaths if not x.notGroupSearchPath]
+        return  [x for x in self.searchPaths 
+                 if x.isGroupSearchPathTrove 
+                    or x.isGroupSearchPathTrove is None]
 
     def clearSearchPaths(self):
         """
@@ -184,7 +188,7 @@
         self.factorySources = _FactorySources()
 
     def addSearchPath(self, troveName = None, label = None, version = None,
-            notResolveTrove = None, notGroupSearchPath = None):
+                      isResolveTrove = True, isGroupSearchPathTrove = True):
         """
         Add an search path.
         @param troveName: the trove name for the search path.
@@ -193,10 +197,15 @@
         @type label: C{str} or C{None}
         @param version: Version for the search path
         @param version: C{str} or C{None}
+        @param isResolveTrove: set to False if this element should be not
+               be returned for getResolveTroves()  (defaults to True)
+        @param isGroupSearchPathTrove: set to False if this element should be 
+               not be returned for getGroupSearchPaths() (defaults to True)
         """
+        assert(isResolveTrove or isGroupSearchPathTrove)
         self._addSource(troveName, label, version, _SearchPath,
-                self.searchPaths, notResolveTrove = notResolveTrove,
-                notGroupSearchPath = notGroupSearchPath)
+                self.searchPaths, isResolveTrove = isResolveTrove,
+                isGroupSearchPathTrove = isGroupSearchPathTrove)
 
     def addFactorySource(self, troveName = None, label = None, version = None):
         """
@@ -945,7 +954,7 @@
     def getResolveTroves(self):
         """
         @return: the search paths from this product definition, filtering
-                 any results that have the notResolveTrove attribute. This
+                 any results that have isResolveTrove set to false. This
                  is a subset of the results from getSearchPaths
         @rtype: C{list} of C{_SearchPath} objects
         """
@@ -954,14 +963,16 @@
         else:
             searchPaths = self.getPlatformSearchPaths()
         if searchPaths:
-            searchPaths = [x for x in searchPaths if not x.notResolveTrove]
+            searchPaths = [x for x in searchPaths 
+                           if x.isResolveTrove or x.isResolveTrove is None]
         return searchPaths
 
     def getGroupSearchPaths(self):
         """
         @return: the search paths from this product definition, filtering
-                 any results that have the notGroupSearchPath attribute. This
-                 is a subset of the results from getSearchPaths
+                 any results that have the isGroupSearchPathTrove attribute
+                 set to False. This is a subset of the results from 
+                 getSearchPaths
         @rtype: C{list} of C{_SearchPath} objects
         """
         if self.searchPaths:
@@ -969,7 +980,9 @@
         else:
             searchPaths = self.getPlatformSearchPaths()
         if searchPaths:
-            searchPaths = [x for x in searchPaths if not x.notGroupSearchPath]
+            searchPaths = [x for x in searchPaths 
+                           if x.isGroupSearchPathTrove 
+                              or x.isGroupSearchPathTrove is None]
         return searchPaths
 
     def getFactorySources(self):
@@ -1082,8 +1095,8 @@
         self.platform.searchPaths = _SearchPaths()
 
     def addPlatformSearchPath(self, troveName = None, label = None,
-                              version = None, notResolveTrove = None,
-                              notGroupSearchPath = None):
+                              version = None, isResolveTrove = True,
+                              isGroupSearchPathTrove = True):
         """
         Add an search path.
         @param troveName: the trove name for the search path.
@@ -1092,13 +1105,17 @@
         @type label: C{str} or C{None}
         @param version: Version for the search path
         @param version: C{str} or C{None}
+        @param isResolveTrove: set to False if this element should be not
+               be returned for getResolveTroves()  (defaults to True)
+        @param isGroupSearchPathTrove: set to False if this element should be 
+               not be returned for getGroupSearchPath() (defaults to True)
         """
         if self.platform is None:
             self.platform = PlatformDefinition()
         self._addSource(troveName, label, version, _SearchPath,
                         self.platform.searchPaths,
-                        notResolveTrove = notResolveTrove,
-                        notGroupSearchPath = notGroupSearchPath)
+                        isResolveTrove = isResolveTrove,
+                        isGroupSearchPathTrove = isGroupSearchPathTrove)
 
     def getPlatformFactorySources(self):
         """
@@ -1485,7 +1502,7 @@
         sPaths = self.getSearchPaths()
         for sp in sPaths or []:
             attrs = []
-            for key in ('notResolveTrove', 'notGroupSearchPath'):
+            for key in ('isResolveTrove', 'isGroupSearchPathTrove'):
                 val = sp.__getattribute__(key)
                 if val is not None:
                     attrs.append((key, val))
@@ -1559,10 +1576,10 @@
                     label = alr.getLabel())
         for sp in nplat.getSearchPaths():
             self.addPlatformSearchPath(troveName=sp.troveName,
-                                       label=sp.label,
-                                       version=sp.version,
-                                       notResolveTrove=sp.notResolveTrove,
-                                       notGroupSearchPath=sp.notGroupSearchPath)
+                               label=sp.label,
+                               version=sp.version,
+                               isResolveTrove=sp.isResolveTrove,
+                               isGroupSearchPathTrove=sp.isGroupSearchPathTrove)
         for fs in nplat.getFactorySources():
             self.addPlatformFactorySource(troveName=fs.troveName,
                                           label=fs.label,
@@ -1956,19 +1973,13 @@
             return []
         return list(self.promoteMaps)
 
-class _SearchPath(xmllib.SlotBasedSerializableObject):
-    __slots__ = ['troveName', 'label', 'version', 'notResolveTrove',
-                 'notGroupSearchPath']
-    tag = "searchPath"
+class _TroveSpec(xmllib.SlotBasedSerializableObject):
+    __slots__ = ['troveName', 'label', 'version']
 
-    def __init__(self, troveName = None, label = None, version = None,
-            notResolveTrove = None, notGroupSearchPath = None):
-        xmllib.SlotBasedSerializableObject.__init__(self)
+    def __init__(self, troveName = None, label = None, version = None):
         self.troveName = troveName
         self.label = label
         self.version = version
-        self.notResolveTrove = notResolveTrove
-        self.notGroupSearchPath = notGroupSearchPath
 
     def getTroveTup(self, template=False):
         """
@@ -1987,7 +1998,20 @@
                 version += '/' + self.version
             return (self.troveName, version, None)
 
-class _FactorySource(_SearchPath):
+
+class _SearchPath(_TroveSpec):
+    __slots__ = ['troveName', 'label', 'version', 'isResolveTrove',
+                 'isGroupSearchPathTrove']
+    tag = "searchPath"
+
+    def __init__(self, troveName = None, label = None, version = None,
+                 isResolveTrove = True, isGroupSearchPathTrove = True):
+        _TroveSpec.__init__(self, troveName=troveName, label=label,
+                            version=version)
+        self.isResolveTrove = isResolveTrove
+        self.isGroupSearchPathTrove = isGroupSearchPathTrove
+
+class _FactorySource(_TroveSpec):
     tag = "factorySource"
 
 class _Architecture(xmllib.SlotBasedSerializableObject):
@@ -2244,12 +2268,19 @@
     def _processSearchPaths(self, searchPaths):
         sources = _SearchPaths()
         for node in searchPaths:
+            isResolveTrove = node.getAttribute('isResolveTrove')
+            if isResolveTrove is not None:
+                isResolveTrove = xmllib.BooleanNode.fromString(isResolveTrove)
+            isGroupSearchPathTrove = node.getAttribute('isGroupSearchPathTrove')
+            if isGroupSearchPathTrove is not None:
+                isGroupSearchPathTrove = xmllib.BooleanNode.fromString(
+                                                    isGroupSearchPathTrove)
             pyObj = _SearchPath(
                 troveName = node.getAttribute('troveName'),
                 label = node.getAttribute('label'),
                 version = node.getAttribute('version'),
-                notResolveTrove = node.getAttribute('notResolveTrove'),
-                notGroupSearchPath = node.getAttribute('notGroupSearchPath'))
+                isResolveTrove = isResolveTrove,
+                isGroupSearchPathTrove = isGroupSearchPathTrove)
             sources.append(pyObj)
         return sources
 
diff -r a5855f412f3a -r 93ffdbcc49d3 xsd/rpd-2.0.xsd
--- a/xsd/rpd-2.0.xsd	Tue Dec 16 10:49:46 2008 -0500
+++ b/xsd/rpd-2.0.xsd	Thu Dec 18 11:39:36 2008 -0500
@@ -58,8 +58,8 @@
     <xsd:complexType name="searchPathType">
         <xsd:attributeGroup ref="attrGroupNameLabel" />
         <xsd:attribute name="version" type="xsd:string" />
-        <xsd:attribute name="notResolveTrove" type="xsd:boolean" />
-        <xsd:attribute name="notGroupSearchPath" type="xsd:boolean" />
+        <xsd:attribute name="isResolveTrove" type="xsd:boolean" />
+        <xsd:attribute name="isGroupSearchPathTrove" type="xsd:boolean" />
     </xsd:complexType>
 
     <xsd:complexType name="searchPathListType">

From dbc@rpath.com Thu Dec 18 16:49:49 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mBIGnnGa017848
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 18 Dec 2008 16:49:49 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mBIGnmdM012488
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 18 Dec 2008 11:49:49 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mBIGnmG6028917
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 18 Dec 2008 11:49:48 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mBIGnmR9019333
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 18 Dec 2008 11:49:48 -0500
Received: (from dbc@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mBIGnlnB019318
	for rpath-common-commits@lists.rpath.com;
	Thu, 18 Dec 2008 11:49:47 -0500
From: David Christian <dbc@rpath.com>
Message-Id: <200812181649.mBIGnlnB019318@scc.eng.rpath.com>
Date: Thu, 18 Dec 2008 11:49:47 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: * searchPath entries now have isResolveTrove
	and isGroupSearchPathTrove
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 18 Dec 2008 16:49:49 -0000

user:        David Christian <http://issues.rpath.com>
files:       NEWS

* searchPath entries now have isResolveTrove and isGroupSearchPathTrove
  flags. (RPCL-53)

diff -r 93ffdbcc49d3 -r 3f90d7aabed9 NEWS
--- a/NEWS	Thu Dec 18 11:39:36 2008 -0500
+++ b/NEWS	Thu Dec 18 11:48:13 2008 -0500
@@ -1,3 +1,7 @@
+Changes in @NEW@:
+    * searchPath entries now have isResolveTrove and isGroupSearchPathTrove
+      flags. (RPCL-53)
+
 Changes in 0.4:
   o API Changes:
     * Images are now defined differently.  Platforms provide

From dbc@rpath.com Thu Dec 18 16:49:50 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mBIGnow2017852
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 18 Dec 2008 16:49:50 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mBIGnn77012491
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 18 Dec 2008 11:49:50 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mBIGnnkU028922
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 18 Dec 2008 11:49:49 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mBIGnnrt019378
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 18 Dec 2008 11:49:49 -0500
Received: (from dbc@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mBIGnnPH019373
	for rpath-common-commits@lists.rpath.com;
	Thu, 18 Dec 2008 11:49:49 -0500
From: David Christian <dbc@rpath.com>
Message-Id: <200812181649.mBIGnnPH019373@scc.eng.rpath.com>
Date: Thu, 18 Dec 2008 11:49:49 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: branch merge
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 18 Dec 2008 16:49:50 -0000

tag:         tip
user:        David Christian <http://issues.rpath.com>
files:       NEWS

branch merge

diff -r 3f90d7aabed9 -r 3d753c22c0ff NEWS
--- a/NEWS	Thu Dec 18 11:48:13 2008 -0500
+++ b/NEWS	Thu Dec 18 11:49:15 2008 -0500
@@ -1,6 +1,15 @@
 Changes in @NEW@:
-    * searchPath entries now have isResolveTrove and isGroupSearchPathTrove
-      flags. (RPCL-53)
+  o API Changes:
+    * searchPath elements now have additional attributes exposed
+      which denote contexts to which they apply.  Right now, the
+      two attributes exposed are isResolveTrove and isGroupSearchPathTrove
+      which default to True (no change in behavior) but can be
+      set to limit the applicability of an element.  In addition,
+      product definition objects have additional getResolveTroves
+      and getGroupSearchPaths methods which filter the searchPaths
+      by the attributes exposed. (RPCL-53)
+  o Schema Versions:
+    * 2.0: Backward-compatible extension to support RPCL-53.
 
 Changes in 0.4:
   o API Changes:

From johnsonm@rpath.com Thu Dec 18 21:55:24 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mBILtOZJ023514
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 18 Dec 2008 21:55:24 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mBILtNQd016522
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 18 Dec 2008 16:55:23 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mBILtNxY016972
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 18 Dec 2008 16:55:23 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mBILtMDa031580
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 18 Dec 2008 16:55:22 -0500
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mBILtM0v031574
	for rpath-common-commits@lists.rpath.com;
	Thu, 18 Dec 2008 16:55:22 -0500
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200812182155.mBILtM0v031574@scc.eng.rpath.com>
Date: Thu, 18 Dec 2008 16:55:21 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: NEWS edits
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 18 Dec 2008 21:55:24 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       NEWS

NEWS edits

diff -r 3d753c22c0ff -r 5245f281531e NEWS
--- a/NEWS	Thu Dec 18 11:49:15 2008 -0500
+++ b/NEWS	Thu Dec 18 16:55:08 2008 -0500
@@ -8,6 +8,7 @@
       product definition objects have additional getResolveTroves
       and getGroupSearchPaths methods which filter the searchPaths
       by the attributes exposed. (RPCL-53)
+
   o Schema Versions:
     * 2.0: Backward-compatible extension to support RPCL-53.
 

From johnsonm@rpath.com Thu Dec 18 21:57:47 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mBILvlSu023532
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 18 Dec 2008 21:57:47 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mBILvkFe016823
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 18 Dec 2008 16:57:46 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mBILvk8W017121
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 18 Dec 2008 16:57:46 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mBILvjRn031652
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 18 Dec 2008 16:57:45 -0500
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mBILvj9d031647
	for rpath-common-commits@lists.rpath.com;
	Thu, 18 Dec 2008 16:57:45 -0500
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200812182157.mBILvj9d031647@scc.eng.rpath.com>
Date: Thu, 18 Dec 2008 16:57:45 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: fix comment typos
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 18 Dec 2008 21:57:47 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

fix comment typos

diff -r 5245f281531e -r beb0af887b9e rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Thu Dec 18 16:55:08 2008 -0500
+++ b/rpath_common/proddef/api1.py	Thu Dec 18 16:57:39 2008 -0500
@@ -2943,8 +2943,8 @@
                         flavorSetRef = 'generic'
                     else:
                         flavorNames = [x[0] for x in bestFlavors]
-                        # Xen and AMI are identicle on rPL 2, but only ami will
-                        # be rpesent if it's an amiImage, thus xen is more
+                        # Xen and AMI are identical on rPL 2, but only AMI will
+                        # be present if it is an amiImage; thus xen is more
                         # dominant.
                         if 'ami' in flavorNames and 'xen' in flavorNames:
                             flavorSetRef = 'xen'

From johnsonm@rpath.com Fri Dec 19 16:48:33 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mBJGmXBg008382
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 19 Dec 2008 16:48:33 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mBJGmXYU009546
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 19 Dec 2008 11:48:33 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mBJGmW90019466
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 19 Dec 2008 11:48:33 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mBJGmVIP031159
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 19 Dec 2008 11:48:31 -0500
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mBJGmVMU031144
	for rpath-common-commits@lists.rpath.com;
	Fri, 19 Dec 2008 11:48:31 -0500
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200812191648.mBJGmVMU031144@scc.eng.rpath.com>
Date: Fri, 19 Dec 2008 11:48:31 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: prepare version 0.5
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 19 Dec 2008 16:48:34 -0000

tag:         product-definition-0.5
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       Make.defs NEWS

prepare version 0.5

diff -r beb0af887b9e -r 2490a2962ee2 Make.defs
--- a/Make.defs	Thu Dec 18 16:57:39 2008 -0500
+++ b/Make.defs	Fri Dec 19 11:47:30 2008 -0500
@@ -12,7 +12,7 @@
 # full details.
 #
 
-VERSION=0.4
+VERSION=0.5
 # VERSION can be overridden by snapshot builds to force incompatible versions
 
 export prefix = /usr
diff -r beb0af887b9e -r 2490a2962ee2 NEWS
--- a/NEWS	Thu Dec 18 16:57:39 2008 -0500
+++ b/NEWS	Fri Dec 19 11:47:30 2008 -0500
@@ -1,4 +1,4 @@
-Changes in @NEW@:
+Changes in 0.5:
   o API Changes:
     * searchPath elements now have additional attributes exposed
       which denote contexts to which they apply.  Right now, the

From johnsonm@rpath.com Fri Dec 19 16:48:36 2008
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id mBJGmaGa008388
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 19 Dec 2008 16:48:36 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id mBJGmZXl009552
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 19 Dec 2008 11:48:35 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id mBJGmZe5019475
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 19 Dec 2008 11:48:35 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id mBJGmZBn031217
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 19 Dec 2008 11:48:35 -0500
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id mBJGmYpV031203
	for rpath-common-commits@lists.rpath.com;
	Fri, 19 Dec 2008 11:48:34 -0500
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200812191648.mBJGmYpV031203@scc.eng.rpath.com>
Date: Fri, 19 Dec 2008 11:48:34 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Added tag product-definition-0.5 for
	changeset 2490a2962ee2
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 19 Dec 2008 16:48:36 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       .hgtags

Added tag product-definition-0.5 for changeset 2490a2962ee2

diff -r 2490a2962ee2 -r c05917992dd8 .hgtags
--- a/.hgtags	Fri Dec 19 11:47:30 2008 -0500
+++ b/.hgtags	Fri Dec 19 11:47:47 2008 -0500
@@ -4,3 +4,4 @@
 03d747942429f09d5f9759deb8cf10c45476adfc product-definition-0.2
 9049959e5527c9ba666f999ea855fe45a23868c3 product-definition-0.3
 b57c486bfce2ff37b8e030a60d41d9996db5433e product-definition-0.4
+2490a2962ee2ed29a334c0447095a9d30834cbe1 product-definition-0.5

From smg@rpath.com Fri Jan  2 17:50:06 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id n02Ho6nv022471
	for <rpath-common-commits@lists.rpath.com>; Fri, 2 Jan 2009 17:50:06 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n02Ho62g020624
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 Jan 2009 12:50:06 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n02HoBO1017274
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 Jan 2009 12:50:11 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n02HoBCl027851
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 Jan 2009 12:50:11 -0500
Received: (from smg@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n02HoBPc027846
	for rpath-common-commits@lists.rpath.com; Fri, 2 Jan 2009 12:50:11 -0500
From: Stu Gott <smg@rpath.com>
Message-Id: <200901021750.n02HoBPc027846@scc.eng.rpath.com>
Date: Fri, 02 Jan 2009 12:50:11 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: be a little less aggressive about adding
	platform defaults (RPCL-54)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 02 Jan 2009 17:50:06 -0000

tag:         tip
user:        Stu Gott <http://issues.rpath.com/>
files:       NEWS rpath_common/proddef/api1.py

be a little less aggressive about adding platform defaults (RPCL-54)

diff -r 3d753c22c0ff -r 9e8e072407e7 NEWS
--- a/NEWS	Thu Dec 18 11:49:15 2008 -0500
+++ b/NEWS	Fri Jan 02 12:49:34 2009 -0500
@@ -10,6 +10,8 @@
       by the attributes exposed. (RPCL-53)
   o Schema Versions:
     * 2.0: Backward-compatible extension to support RPCL-53.
+    * 2.0: Don't add platform defaults if proddef defines any of
+      containerTemplates, architectures, buildTemplates, flavorSets (RPCL-54).
 
 Changes in 0.4:
   o API Changes:
diff -r 3d753c22c0ff -r 9e8e072407e7 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Thu Dec 18 11:49:15 2008 -0500
+++ b/rpath_common/proddef/api1.py	Fri Jan 02 12:49:34 2009 -0500
@@ -2876,7 +2876,16 @@
                 self._addPlatform(_PlatformDefinition())
 
         if hasattr(self, 'platform'):
-            if not self.platform.containerTemplates and \
+            # if the XML didn't have one of the 4 attributes here, then
+            # it simply won't be present, hence the usage of hasattr
+            found = False
+            for attr in ('containerTemplates', 'architectures',
+                    'buildTemplates', 'flavorSets'):
+                if hasattr(self, attr) and getattr(self, attr):
+                    found = True
+                    break
+            if not found and \
+                    not self.platform.containerTemplates and \
                     not self.platform.architectures and \
                     not self.platform.buildTemplates and \
                     not self.platform.flavorSets:

From smg@rpath.com Fri Jan  2 18:03:24 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id n02I3NTF022662
	for <rpath-common-commits@lists.rpath.com>; Fri, 2 Jan 2009 18:03:23 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n02I3N7o022678
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 Jan 2009 13:03:23 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n02I3TIW018136
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 Jan 2009 13:03:29 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n02I3Sra028080
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 Jan 2009 13:03:28 -0500
Received: (from smg@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n02I3S4M028075
	for rpath-common-commits@lists.rpath.com; Fri, 2 Jan 2009 13:03:28 -0500
From: Stu Gott <smg@rpath.com>
Message-Id: <200901021803.n02I3S4M028075@scc.eng.rpath.com>
Date: Fri, 02 Jan 2009 13:03:28 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: move NEWS entry (RPCL-54)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 02 Jan 2009 18:03:24 -0000

tag:         tip
user:        Stu Gott <http://issues.rpath.com/>
files:       NEWS

move NEWS entry (RPCL-54)

diff -r 9e8e072407e7 -r 2bd497782129 NEWS
--- a/NEWS	Fri Jan 02 12:49:34 2009 -0500
+++ b/NEWS	Fri Jan 02 13:02:54 2009 -0500
@@ -8,9 +8,12 @@
       product definition objects have additional getResolveTroves
       and getGroupSearchPaths methods which filter the searchPaths
       by the attributes exposed. (RPCL-53)
-  o Schema Versions:
+
+  o Bug Fixes:
     * 2.0: Backward-compatible extension to support RPCL-53.
     * 2.0: Don't add platform defaults if proddef defines any of
+
+  o Schema Versions:
       containerTemplates, architectures, buildTemplates, flavorSets (RPCL-54).
 
 Changes in 0.4:

From smg@rpath.com Fri Jan  2 18:04:30 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id n02I4UKS022691
	for <rpath-common-commits@lists.rpath.com>; Fri, 2 Jan 2009 18:04:30 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n02I4UD7022836
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 Jan 2009 13:04:30 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n02I4aj6018207
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 Jan 2009 13:04:36 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n02I4Z5T028175
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 Jan 2009 13:04:35 -0500
Received: (from smg@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n02I4ZT4028160
	for rpath-common-commits@lists.rpath.com; Fri, 2 Jan 2009 13:04:35 -0500
From: Stu Gott <smg@rpath.com>
Message-Id: <200901021804.n02I4ZT4028160@scc.eng.rpath.com>
Date: Fri, 02 Jan 2009 13:04:35 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: branch merge
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 02 Jan 2009 18:04:31 -0000

user:        Stu Gott <http://issues.rpath.com/>
files:       NEWS rpath_common/proddef/api1.py

branch merge

diff -r c05917992dd8 -r 20a63555a4cd NEWS
--- a/NEWS	Fri Dec 19 11:47:47 2008 -0500
+++ b/NEWS	Fri Jan 02 13:01:54 2009 -0500
@@ -11,6 +11,8 @@
 
   o Schema Versions:
     * 2.0: Backward-compatible extension to support RPCL-53.
+    * 2.0: Don't add platform defaults if proddef defines any of
+      containerTemplates, architectures, buildTemplates, flavorSets (RPCL-54).
 
 Changes in 0.4:
   o API Changes:
diff -r c05917992dd8 -r 20a63555a4cd rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Fri Dec 19 11:47:47 2008 -0500
+++ b/rpath_common/proddef/api1.py	Fri Jan 02 13:01:54 2009 -0500
@@ -2876,7 +2876,16 @@
                 self._addPlatform(_PlatformDefinition())
 
         if hasattr(self, 'platform'):
-            if not self.platform.containerTemplates and \
+            # if the XML didn't have one of the 4 attributes here, then
+            # it simply won't be present, hence the usage of hasattr
+            found = False
+            for attr in ('containerTemplates', 'architectures',
+                    'buildTemplates', 'flavorSets'):
+                if hasattr(self, attr) and getattr(self, attr):
+                    found = True
+                    break
+            if not found and \
+                    not self.platform.containerTemplates and \
                     not self.platform.architectures and \
                     not self.platform.buildTemplates and \
                     not self.platform.flavorSets:

From smg@rpath.com Fri Jan  2 18:04:32 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id n02I4WnO022697
	for <rpath-common-commits@lists.rpath.com>; Fri, 2 Jan 2009 18:04:32 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n02I4WTk022842
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 Jan 2009 13:04:32 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n02I4b6S018211
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 Jan 2009 13:04:38 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n02I4b8k028241
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 Jan 2009 13:04:37 -0500
Received: (from smg@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n02I4aXA028234
	for rpath-common-commits@lists.rpath.com; Fri, 2 Jan 2009 13:04:36 -0500
From: Stu Gott <smg@rpath.com>
Message-Id: <200901021804.n02I4aXA028234@scc.eng.rpath.com>
Date: Fri, 02 Jan 2009 13:04:36 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: branch merge
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 02 Jan 2009 18:04:33 -0000

tag:         tip
user:        Stu Gott <http://issues.rpath.com/>
files:       NEWS

branch merge

diff -r 20a63555a4cd -r 6ef1b34d3c37 NEWS
--- a/NEWS	Fri Jan 02 13:01:54 2009 -0500
+++ b/NEWS	Fri Jan 02 13:03:52 2009 -0500
@@ -9,10 +9,12 @@
       and getGroupSearchPaths methods which filter the searchPaths
       by the attributes exposed. (RPCL-53)
 
+  o Bug Fixes:
+    * 2.0: Don't add platform defaults if proddef defines any of
+      containerTemplates, architectures, buildTemplates, flavorSets (RPCL-54).
+
   o Schema Versions:
     * 2.0: Backward-compatible extension to support RPCL-53.
-    * 2.0: Don't add platform defaults if proddef defines any of
-      containerTemplates, architectures, buildTemplates, flavorSets (RPCL-54).
 
 Changes in 0.4:
   o API Changes:

From johnsonm@rpath.com Fri Jan  2 18:29:46 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id n02ITk15023059
	for <rpath-common-commits@lists.rpath.com>; Fri, 2 Jan 2009 18:29:46 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n02ITjH3025000
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 Jan 2009 13:29:45 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n02ITpSo019664
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 Jan 2009 13:29:51 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n02ITp1C028987
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 Jan 2009 13:29:51 -0500
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n02IToT9028982
	for rpath-common-commits@lists.rpath.com; Fri, 2 Jan 2009 13:29:50 -0500
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200901021829.n02IToT9028982@scc.eng.rpath.com>
Date: Fri, 02 Jan 2009 13:29:50 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: NEWS edits
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 02 Jan 2009 18:29:46 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       NEWS

NEWS edits

diff -r 6ef1b34d3c37 -r 181d94f0faf2 NEWS
--- a/NEWS	Fri Jan 02 13:03:52 2009 -0500
+++ b/NEWS	Fri Jan 02 13:08:29 2009 -0500
@@ -10,8 +10,9 @@
       by the attributes exposed. (RPCL-53)
 
   o Bug Fixes:
-    * 2.0: Don't add platform defaults if proddef defines any of
-      containerTemplates, architectures, buildTemplates, flavorSets (RPCL-54).
+    * Don't add platform defaults if proddef defines any of
+      containerTemplates, architectures, buildTemplates, or
+      flavorSets. (RPCL-54)
 
   o Schema Versions:
     * 2.0: Backward-compatible extension to support RPCL-53.

From johnsonm@rpath.com Fri Jan  2 19:43:41 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id n02Jhess024031
	for <rpath-common-commits@lists.rpath.com>; Fri, 2 Jan 2009 19:43:40 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n02Jhej3000631
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 Jan 2009 14:43:40 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n02Jhegf024735
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 Jan 2009 14:43:40 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n02JheBB031694
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 2 Jan 2009 14:43:40 -0500
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n02Jhd3P031689
	for rpath-common-commits@lists.rpath.com; Fri, 2 Jan 2009 14:43:39 -0500
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200901021943.n02Jhd3P031689@scc.eng.rpath.com>
Date: Fri, 02 Jan 2009 14:43:39 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Added tag product-definition-0.5 for
	changeset 181d94f0faf2
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 02 Jan 2009 19:43:41 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       .hgtags

Added tag product-definition-0.5 for changeset 181d94f0faf2

diff -r 181d94f0faf2 -r 5fcfd53617f6 .hgtags
--- a/.hgtags	Fri Jan 02 13:08:29 2009 -0500
+++ b/.hgtags	Fri Jan 02 14:43:24 2009 -0500
@@ -5,3 +5,4 @@
 9049959e5527c9ba666f999ea855fe45a23868c3 product-definition-0.3
 b57c486bfce2ff37b8e030a60d41d9996db5433e product-definition-0.4
 2490a2962ee2ed29a334c0447095a9d30834cbe1 product-definition-0.5
+181d94f0faf2b2bc338c61a7a98c35c2b1f55601 product-definition-0.5

From johnsonm@rpath.com Thu Jan 15 19:59:24 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id n0FJxOST002573
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 15 Jan 2009 19:59:24 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n0FJxNft032669
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 15 Jan 2009 14:59:24 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n0FJxNgU017532
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 15 Jan 2009 14:59:23 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n0FJxNuK021365
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 15 Jan 2009 14:59:23 -0500
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n0FJxMJQ021360
	for rpath-common-commits@lists.rpath.com;
	Thu, 15 Jan 2009 14:59:22 -0500
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200901151959.n0FJxMJQ021360@scc.eng.rpath.com>
Date: Thu, 15 Jan 2009 14:59:22 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: improve promoteMap documentation
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 15 Jan 2009 19:59:24 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       NEWS doc/example.py doc/example.xml

improve promoteMap documentation

diff -r 5fcfd53617f6 -r a7d15e4fed8f NEWS
--- a/NEWS	Fri Jan 02 14:43:24 2009 -0500
+++ b/NEWS	Thu Jan 15 14:59:20 2009 -0500
@@ -1,3 +1,8 @@
+Changes in @NEW@:
+  o Documentation Fixes:
+    * The documentation for promoteMap specification was incorrect,
+      and has been improved. (RPCL-37)
+
 Changes in 0.5:
   o API Changes:
     * searchPath elements now have additional attributes exposed
diff -r 5fcfd53617f6 -r a7d15e4fed8f doc/example.py
--- a/doc/example.py	Fri Jan 02 14:43:24 2009 -0500
+++ b/doc/example.py	Thu Jan 15 14:59:20 2009 -0500
@@ -53,13 +53,19 @@
 prodDef.setConaryNamespace("exm")
 prodDef.setImageGroup("group-awesome-dist")
 prodDef.setBaseFlavor(baseFlavor)
-prodDef.addStage(name='devel', labelSuffix='-devel')
-
-# Don't use addPromoteMap unless you know what you're doing
+# Don't use addPromoteMap unless you know what you're doing; see
+# https://issues.rpath.com/browse/RPCL-17 for more information on
+# how to use them.  These maps cause packages in devel groups to
+# be flattened into the main label on promote to QA and promotes
+# from example to be flattened into an alternate label.
+prodDef.addStage(name='devel', labelSuffix='-devel',
+    promoteMaps = [('contrib', 'contrib.rpath.org@rpl:2'),
+                   ('other', 'example.rpath.org@rpl:2')])
 prodDef.addStage(name='qa', labelSuffix='-qa',
-    promoteMaps = [('from1@label11:devel', 'to1@label12:qa'),
-                   ('from2@label21:devel', 'to2@label22:qa') ])
-prodDef.addStage(name='release', labelSuffix='')
+    promoteMaps = [('contrib', '/product.example.com@exm:group-awesome-dist-1-qa'),
+                   ('other', '/product.example.com@exm:other-1-qa') ])
+prodDef.addStage(name='release', labelSuffix='',
+    promoteMaps = [('other', '/product.example.com@exm:other-1')])
 
 prodDef.addSearchPath(troveName='group-rap-standard',
                         label='rap.rpath.com@rpath:linux-1')
diff -r 5fcfd53617f6 -r a7d15e4fed8f doc/example.xml
--- a/doc/example.xml	Fri Jan 02 14:43:24 2009 -0500
+++ b/doc/example.xml	Thu Jan 15 14:59:20 2009 -0500
@@ -27,13 +27,22 @@
     </baseFlavor>
   <stages>
     <stage labelSuffix="-devel" name="devel"/>
+      <promoteMaps>
+        <promoteMap name="contrib" label="contrib.rpath.org@rpl:2"/>
+
+        <promoteMap name="other" label="example.rpath.org@rpl:2"/>
+      </promoteMaps>
     <stage labelSuffix="-qa" name="qa">
       <promoteMaps>
-        <promoteMap name="from1@label11:devel" label="to1@label12:qa"/>
-        <promoteMap name="from2@label21:devel" label="to2@label22:qa"/>
+        <promoteMap name="contrib" label="product.example.com@exm:group-awesome-dist-1-qa"/>
+        <promoteMap name="other" label="product.example.com@exm:other-1-qa"/>
       </promoteMaps>
     </stage>
-    <stage labelSuffix="" name="release"/>
+    <stage labelSuffix="" name="release"
+      <promoteMaps>
+        <promoteMap name="other" label="product.example.com@exm:other-1-qa"/>
+      </promoteMaps>
+    </stage>
   </stages>
   <searchPaths>
     <searchPath troveName="group-rap-standard" label="rap.rpath.com@rpath:linux-1"/>

From mtharp@rpath.com Thu Jan 15 20:14:37 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id n0FKEbAD002799
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 15 Jan 2009 20:14:37 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n0FKEaXP002595
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 15 Jan 2009 15:14:37 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n0FKEa54018850
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 15 Jan 2009 15:14:36 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n0FKEahg021984
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 15 Jan 2009 15:14:36 -0500
Received: (from mtharp@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n0FKEZLX021964
	for rpath-common-commits@lists.rpath.com; Thu, 15 Jan 2009 20:14:35 GMT
From: Michael Tharp <mtharp@rpath.com>
Message-Id: <200901152014.n0FKEZLX021964@scc.eng.rpath.com>
Date: Thu, 15 Jan 2009 20:14:35 +0000
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Promote map improvements (RPCL-55)
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 15 Jan 2009 20:14:37 -0000

user:        Michael Tharp <mtharp@rpath.com>
files:       NEWS rpath_common/proddef/api1.py

Promote map improvements (RPCL-55)

diff -r 5fcfd53617f6 -r f9bd1fb38ae0 NEWS
--- a/NEWS	Fri Jan 02 14:43:24 2009 -0500
+++ b/NEWS	Thu Jan 15 20:12:55 2009 +0000
@@ -1,3 +1,12 @@
+Changes in @NEW@:
+  o API Changes:
+    * getAllLabelsFromTroves now returns a map that will re-root all
+      implicit promotes in order to eliminate shadows. This behavior can
+      be overridden by specifying re-roots all implicit promotes in order
+      to eliminate shadows. (RPCL-55)
+    * getAllLabelsFromTroves now accepts an optional list of labels to
+      "flatten" to the target label. (RPCL-55)
+
 Changes in 0.5:
   o API Changes:
     * searchPath elements now have additional attributes exposed
diff -r 5fcfd53617f6 -r f9bd1fb38ae0 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Fri Jan 02 14:43:24 2009 -0500
+++ b/rpath_common/proddef/api1.py	Thu Jan 15 20:12:55 2009 +0000
@@ -900,26 +900,36 @@
             ret.append((name, fullLabel))
         return ret
 
-    def getPromoteMapsForStages(self, fromStage, toStage):
+    def getPromoteMapsForStages(self, fromStage, toStage, flattenLabels=()):
         """
         Construct a promote map from C{fromStage} to C{toStage}.
+
         This will include the "simple" label, all secondary labels, and
-        all promote maps to C{toStage}.
+        all promote maps to C{toStage}. All implicit promotes (primary
+        label, secondary labels, and flattened labels) are re-rooted at
+        the new label rather than preserving any shadows.
 
         @param fromStage: Name of stage to promote I{from}
         @type  fromStage: C{str}
         @param toStage: Name of stage to promote I{to}
         @type  toStage: C{str}
+        @param flattenLabels: Extra labels to "flatten" by promoting to the
+                              target label.
+        @type  flattenLabels: C{sequence or set}
         @return: dictionary mapping labels on C{fromStage} to labels
             on C{toStage}
         @rtype: C{dict}
         """
         fromStageObj = self.getStage(fromStage)
         toStageObj = self.getStage(toStage)
+        toStageBranch = '/' + self._getLabelForStage(toStageObj)
 
-        # Default mapping
-        fromTo = {self._getLabelForStage(fromStageObj):
-            self._getLabelForStage(toStageObj)}
+        # Flattened labels - these come first so proddef-supplied maps 
+        # will override them.
+        fromTo = dict.fromkeys(flattenLabels, toStageBranch)
+
+        # Primary label
+        fromTo[self._getLabelForStage(fromStageObj)] = toStageBranch
 
         # Secondary labels
         if self.secondaryLabels is not None:
@@ -929,7 +939,7 @@
                 label = secondaryLabel.getLabel()
                 fromLabel = self._getSecondaryLabel(label, fromSuffix)
                 toLabel = self._getSecondaryLabel(label, toSuffix)
-                fromTo[fromLabel] = toLabel
+                fromTo[fromLabel] = '/' + toLabel
 
         # Promote maps
         promoteMapsDest = dict((x.getMapName(), x.getMapLabel())

From mtharp@rpath.com Thu Jan 15 20:14:38 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id n0FKEcKU002805
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 15 Jan 2009 20:14:38 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n0FKEcHr002599
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 15 Jan 2009 15:14:38 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n0FKEcVe018853
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 15 Jan 2009 15:14:38 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n0FKEblT022010
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 15 Jan 2009 15:14:37 -0500
Received: (from mtharp@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n0FKEbRe022005
	for rpath-common-commits@lists.rpath.com; Thu, 15 Jan 2009 20:14:37 GMT
From: Michael Tharp <mtharp@rpath.com>
Message-Id: <200901152014.n0FKEbRe022005@scc.eng.rpath.com>
Date: Thu, 15 Jan 2009 20:14:36 +0000
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Branch merge
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 15 Jan 2009 20:14:39 -0000

tag:         tip
user:        Michael Tharp <mtharp@rpath.com>
files:       NEWS

Branch merge

diff -r f9bd1fb38ae0 -r 528b273d33d9 NEWS
--- a/NEWS	Thu Jan 15 20:12:55 2009 +0000
+++ b/NEWS	Thu Jan 15 20:14:33 2009 +0000
@@ -6,6 +6,10 @@
       to eliminate shadows. (RPCL-55)
     * getAllLabelsFromTroves now accepts an optional list of labels to
       "flatten" to the target label. (RPCL-55)
+
+  o Documentation Fixes:
+    * The documentation for promoteMap specification was incorrect,
+      and has been improved. (RPCL-37)      
 
 Changes in 0.5:
   o API Changes:

From johnsonm@rpath.com Sat Jan 17 03:15:37 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id n0H3FbOE032246
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 17 Jan 2009 03:15:37 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n0H3Fb7P008307
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 16 Jan 2009 22:15:37 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n0H3FbSk000931
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 16 Jan 2009 22:15:37 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n0H3FaA8004443
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 16 Jan 2009 22:15:36 -0500
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n0H3FaRa004429
	for rpath-common-commits@lists.rpath.com;
	Fri, 16 Jan 2009 22:15:36 -0500
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200901170315.n0H3FaRa004429@scc.eng.rpath.com>
Date: Fri, 16 Jan 2009 22:15:36 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: version 0.6
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Sat, 17 Jan 2009 03:15:37 -0000

tag:         product-definition-0.6
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       Make.defs NEWS

version 0.6

diff -r 528b273d33d9 -r ce447e509cd1 Make.defs
--- a/Make.defs	Thu Jan 15 20:14:33 2009 +0000
+++ b/Make.defs	Fri Jan 16 22:14:13 2009 -0500
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2006-2007 rPath, Inc.
+# Copyright (c) 2006-2009 rPath, Inc.
 #
 # This program is distributed under the terms of the Common Public License,
 # version 1.0. A copy of this license should have been distributed with this
@@ -12,7 +12,7 @@
 # full details.
 #
 
-VERSION=0.5
+VERSION=0.6
 # VERSION can be overridden by snapshot builds to force incompatible versions
 
 export prefix = /usr
diff -r 528b273d33d9 -r ce447e509cd1 NEWS
--- a/NEWS	Thu Jan 15 20:14:33 2009 +0000
+++ b/NEWS	Fri Jan 16 22:14:13 2009 -0500
@@ -1,4 +1,4 @@
-Changes in @NEW@:
+Changes in 0.6:
   o API Changes:
     * getAllLabelsFromTroves now returns a map that will re-root all
       implicit promotes in order to eliminate shadows. This behavior can

From johnsonm@rpath.com Sat Jan 17 03:15:39 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id n0H3FdMl032252
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 17 Jan 2009 03:15:39 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n0H3Fcrl008316
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 16 Jan 2009 22:15:39 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n0H3FcCM000938
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 16 Jan 2009 22:15:38 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n0H3FcWn004488
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 16 Jan 2009 22:15:38 -0500
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n0H3FcQ5004470
	for rpath-common-commits@lists.rpath.com;
	Fri, 16 Jan 2009 22:15:38 -0500
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200901170315.n0H3FcQ5004470@scc.eng.rpath.com>
Date: Fri, 16 Jan 2009 22:15:37 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Added tag product-definition-0.6 for
	changeset ce447e509cd1
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Sat, 17 Jan 2009 03:15:39 -0000

user:        Michael K. Johnson <http://issues.rpath.com/>
files:       .hgtags

Added tag product-definition-0.6 for changeset ce447e509cd1

diff -r ce447e509cd1 -r 78ab5455ba99 .hgtags
--- a/.hgtags	Fri Jan 16 22:14:13 2009 -0500
+++ b/.hgtags	Fri Jan 16 22:14:52 2009 -0500
@@ -6,3 +6,4 @@
 b57c486bfce2ff37b8e030a60d41d9996db5433e product-definition-0.4
 2490a2962ee2ed29a334c0447095a9d30834cbe1 product-definition-0.5
 181d94f0faf2b2bc338c61a7a98c35c2b1f55601 product-definition-0.5
+ce447e509cd1278e40e84eb62b3e48b04a9a828f product-definition-0.6

From johnsonm@rpath.com Sat Jan 17 03:15:40 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by localhost.localdomain (8.13.7/8.13.7) with ESMTP id n0H3Fdmw032255
	for <rpath-common-commits@lists.rpath.com>;
	Sat, 17 Jan 2009 03:15:39 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n0H3Fdds008322
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 16 Jan 2009 22:15:39 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n0H3FdsE000945
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 16 Jan 2009 22:15:39 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n0H3FdrB004512
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 16 Jan 2009 22:15:39 -0500
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n0H3Fc1F004507
	for rpath-common-commits@lists.rpath.com;
	Fri, 16 Jan 2009 22:15:38 -0500
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200901170315.n0H3Fc1F004507@scc.eng.rpath.com>
Date: Fri, 16 Jan 2009 22:15:38 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: prepare for next version
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Sat, 17 Jan 2009 03:15:40 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       NEWS

prepare for next version

diff -r 78ab5455ba99 -r 67c9d8f7e302 NEWS
--- a/NEWS	Fri Jan 16 22:14:52 2009 -0500
+++ b/NEWS	Fri Jan 16 22:15:32 2009 -0500
@@ -1,3 +1,5 @@
+Changes in @NEW@:
+
 Changes in 0.6:
   o API Changes:
     * getAllLabelsFromTroves now returns a map that will re-root all

From johnsonm@rpath.com Mon Jan 26 10:14:53 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n0QFErqm008894 for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 15:14:53 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n0QFEqNa014039
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:14:52 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n0QFEqYQ011749
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:14:52 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n0QFEqPk027875
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:14:52 -0500
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n0QFEpsw027853
	for rpath-common-commits@lists.rpath.com;
	Mon, 26 Jan 2009 10:14:51 -0500
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200901261514.n0QFEpsw027853@scc.eng.rpath.com>
Date: Mon, 26 Jan 2009 10:14:51 -0500
To: rpath-common-commits@lists.rpath.com
Subject: rpath-common: 1.0: General Availability
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 26 Jan 2009 15:14:53 -0000

tag:         rpath-common-1.0
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       Make.defs NEWS README

1.0: General Availability

diff -r 6f213cfdce72 -r e33a4ca93ff2 Make.defs
--- a/Make.defs	Tue Aug 26 13:42:51 2008 -0400
+++ b/Make.defs	Mon Jan 26 10:13:58 2009 -0500
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2006-2007 rPath, Inc.
+# Copyright (c) 2006-2009 rPath, Inc.
 #
 # This program is distributed under the terms of the Common Public License,
 # version 1.0. A copy of this license should have been distributed with this
@@ -12,7 +12,7 @@
 # full details.
 #
 
-VERSION=0.2
+VERSION=1.0
 # VERSION can be overridden by snapshot builds to force incompatible versions
 
 export prefix = /usr
diff -r 6f213cfdce72 -r e33a4ca93ff2 NEWS
--- a/NEWS	Tue Aug 26 13:42:51 2008 -0400
+++ b/NEWS	Mon Jan 26 10:13:58 2009 -0500
@@ -1,3 +1,6 @@
+Changes in 1.0:
+  o General Availability
+
 Changes in 0.2:
   o Install in platform library directory instead of pure python
     library directory.
diff -r 6f213cfdce72 -r e33a4ca93ff2 README
--- a/README	Tue Aug 26 13:42:51 2008 -0400
+++ b/README	Mon Jan 26 10:13:58 2009 -0500
@@ -3,9 +3,9 @@
 and technologies.
 
 To select an API version explicitly:
-    from rpath_common.<modulename> import api<version>
+    from rpath_common.<modulename> import api<version> as <modulename>
 For example:
-    from rpath_common.xmldata import api1
+    from rpath_common.xmldata import api1 as xmldata
 
 Please report bugs at https://issues.rpath.com/ in the rPath Common
 Libraries project.

From johnsonm@rpath.com Mon Jan 26 10:14:53 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n0QFErlS008897 for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 15:14:53 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n0QFErpp014043
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:14:53 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n0QFEr5H011753
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:14:53 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n0QFEqSO027902
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:14:52 -0500
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n0QFEqdb027884
	for rpath-common-commits@lists.rpath.com;
	Mon, 26 Jan 2009 10:14:52 -0500
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200901261514.n0QFEqdb027884@scc.eng.rpath.com>
Date: Mon, 26 Jan 2009 10:14:52 -0500
To: rpath-common-commits@lists.rpath.com
Subject: rpath-common: Added tag rpath-common-1.0 for changeset
 e33a4ca93ff2
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 26 Jan 2009 15:14:54 -0000

user:        Michael K. Johnson <http://issues.rpath.com/>
files:       .hgtags

Added tag rpath-common-1.0 for changeset e33a4ca93ff2

diff -r e33a4ca93ff2 -r bb8ef2f7ea8a .hgtags
--- a/.hgtags	Mon Jan 26 10:13:58 2009 -0500
+++ b/.hgtags	Mon Jan 26 10:14:23 2009 -0500
@@ -1,2 +1,3 @@
 a4a457a2c3637d84b40c87e9444b39b9603846bc rpath-common-0.1
 90f582907dc12a8a9c4315a55da8388d37cb8a19 rpath-common-0.2
+e33a4ca93ff27b3e59c6bf7ff90f4bcd91f3b92d rpath-common-1.0

From johnsonm@rpath.com Mon Jan 26 10:14:55 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n0QFEsMw008903 for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 15:14:54 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n0QFEsDb014057
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:14:54 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n0QFEsfE011759
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:14:54 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n0QFEr22027935
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:14:53 -0500
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n0QFErj3027930
	for rpath-common-commits@lists.rpath.com;
	Mon, 26 Jan 2009 10:14:53 -0500
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200901261514.n0QFErj3027930@scc.eng.rpath.com>
Date: Mon, 26 Jan 2009 10:14:53 -0500
To: rpath-common-commits@lists.rpath.com
Subject: rpath-common: prepare for future versions
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 26 Jan 2009 15:14:55 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       NEWS

prepare for future versions

diff -r bb8ef2f7ea8a -r df4ad461cd9b NEWS
--- a/NEWS	Mon Jan 26 10:14:23 2009 -0500
+++ b/NEWS	Mon Jan 26 10:14:49 2009 -0500
@@ -1,3 +1,5 @@
+Changes in @NEW@:
+
 Changes in 1.0:
   o General Availability
 

From johnsonm@rpath.com Mon Jan 26 10:23:59 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n0QFNxpD008979 for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 15:23:59 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n0QFNwT6015005
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:23:58 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n0QFNw2O012396
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:23:58 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n0QFNwat028313
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:23:58 -0500
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n0QFNw1G028294
	for rpath-common-commits@lists.rpath.com;
	Mon, 26 Jan 2009 10:23:58 -0500
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200901261523.n0QFNw1G028294@scc.eng.rpath.com>
Date: Mon, 26 Jan 2009 10:23:57 -0500
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: Added tag rpath-xmllib-0.2 for changeset
 5fa829c9faff
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 26 Jan 2009 15:23:59 -0000

user:        Michael K. Johnson <http://issues.rpath.com/>
files:       .hgtags

Added tag rpath-xmllib-0.2 for changeset 5fa829c9faff

diff -r 5fa829c9faff -r ca275036bdc8 .hgtags
--- a/.hgtags	Tue Aug 26 14:18:26 2008 -0400
+++ b/.hgtags	Tue Aug 26 14:18:37 2008 -0400
@@ -1,1 +1,2 @@
 3768adef74c75b945f89762704991dbb1a61ec71 rpath-xmllib-0.1
+5fa829c9faff35a6d2060df3c0dd259401eaa1a4 rpath-xmllib-0.2

From johnsonm@rpath.com Mon Jan 26 10:24:01 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n0QFO13E008994 for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 15:24:01 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n0QFO1c9015022
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:24:01 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n0QFO1oj012405
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:24:01 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n0QFO00h028346
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:24:00 -0500
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n0QFO0IF028336
	for rpath-common-commits@lists.rpath.com;
	Mon, 26 Jan 2009 10:24:00 -0500
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200901261524.n0QFO0IF028336@scc.eng.rpath.com>
Date: Mon, 26 Jan 2009 10:24:00 -0500
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: 1.0: General Availability
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 26 Jan 2009 15:24:02 -0000

tag:         rpath-xmllib-1.0
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       Make.defs NEWS README

1.0: General Availability

diff -r ca275036bdc8 -r da545d2476e8 Make.defs
--- a/Make.defs	Tue Aug 26 14:18:37 2008 -0400
+++ b/Make.defs	Mon Jan 26 10:23:15 2009 -0500
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2006-2008 rPath, Inc.
+# Copyright (c) 2006-2009 rPath, Inc.
 #
 # This program is distributed under the terms of the Common Public License,
 # version 1.0. A copy of this license should have been distributed with this
@@ -12,7 +12,7 @@
 # full details.
 #
 
-VERSION=0.2
+VERSION=1.0
 # VERSION can be overridden by snapshot builds to force incompatible versions
 
 export prefix = /usr
diff -r ca275036bdc8 -r da545d2476e8 NEWS
--- a/NEWS	Tue Aug 26 14:18:37 2008 -0400
+++ b/NEWS	Mon Jan 26 10:23:15 2009 -0500
@@ -1,3 +1,7 @@
+Changes in 1.0:
+  o General Availability:
+    * rpath-xmllib is now stable software released for general use.
+
 Changes in 0.2:
   o Bug Fixes:
     * parseFile method now seeks before and after attempting to read
diff -r ca275036bdc8 -r da545d2476e8 README
--- a/README	Tue Aug 26 14:18:37 2008 -0400
+++ b/README	Mon Jan 26 10:23:15 2009 -0500
@@ -2,8 +2,7 @@
 a stable interface for reading and writing rPath-generated XML
 files.
 
-Note that until version 1.0 is released, public APIs are subject to
-change.  All documentation regarding stable interfaces is relevant
+Note that all documentation regarding stable interfaces is relevant
 only to published stable releases; it is not in force for alpha
 and beta releases, including 0.x releases and any automated builds.
 

From johnsonm@rpath.com Mon Jan 26 10:24:03 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n0QFO3aw009000 for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 15:24:03 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n0QFO31A015027
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:24:03 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n0QFO2Ft012413
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:24:02 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n0QFO18w028388
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:24:02 -0500
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n0QFO1cu028378
	for rpath-common-commits@lists.rpath.com;
	Mon, 26 Jan 2009 10:24:01 -0500
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200901261524.n0QFO1cu028378@scc.eng.rpath.com>
Date: Mon, 26 Jan 2009 10:24:01 -0500
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: Added tag rpath-xmllib-1.0 for changeset
 da545d2476e8
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 26 Jan 2009 15:24:03 -0000

user:        Michael K. Johnson <http://issues.rpath.com/>
files:       .hgtags

Added tag rpath-xmllib-1.0 for changeset da545d2476e8

diff -r da545d2476e8 -r bddf45f6aea5 .hgtags
--- a/.hgtags	Mon Jan 26 10:23:15 2009 -0500
+++ b/.hgtags	Mon Jan 26 10:23:18 2009 -0500
@@ -1,2 +1,3 @@
 3768adef74c75b945f89762704991dbb1a61ec71 rpath-xmllib-0.1
 5fa829c9faff35a6d2060df3c0dd259401eaa1a4 rpath-xmllib-0.2
+da545d2476e8d3e8e6f91a55b552318e8e58d5b0 rpath-xmllib-1.0

From johnsonm@rpath.com Mon Jan 26 10:24:04 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n0QFO48L009003 for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 15:24:04 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n0QFO4mE015033
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:24:04 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n0QFO3ba012418
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:24:03 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n0QFO2Qf028424
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:24:02 -0500
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n0QFO2JY028419
	for rpath-common-commits@lists.rpath.com;
	Mon, 26 Jan 2009 10:24:02 -0500
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200901261524.n0QFO2JY028419@scc.eng.rpath.com>
Date: Mon, 26 Jan 2009 10:24:02 -0500
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: prepare for future versions
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 26 Jan 2009 15:24:04 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       NEWS

prepare for future versions

diff -r bddf45f6aea5 -r 3c198b600588 NEWS
--- a/NEWS	Mon Jan 26 10:23:18 2009 -0500
+++ b/NEWS	Mon Jan 26 10:23:50 2009 -0500
@@ -1,3 +1,5 @@
+Changes in @NEW@:
+
 Changes in 1.0:
   o General Availability:
     * rpath-xmllib is now stable software released for general use.

From johnsonm@rpath.com Mon Jan 26 10:33:49 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n0QFXnrB009074 for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 15:33:49 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n0QFXn2q015805
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:33:49 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n0QFXnOu012997
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:33:49 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n0QFXmNx029398
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:33:48 -0500
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n0QFXmjO029382
	for rpath-common-commits@lists.rpath.com;
	Mon, 26 Jan 2009 10:33:48 -0500
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200901261533.n0QFXmjO029382@scc.eng.rpath.com>
Date: Mon, 26 Jan 2009 10:33:48 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: 1.0: General Availability
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 26 Jan 2009 15:33:49 -0000

tag:         product-definition-1.0
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       Make.defs NEWS README

1.0: General Availability

diff -r 67c9d8f7e302 -r f007b4fa8b9b Make.defs
--- a/Make.defs	Fri Jan 16 22:15:32 2009 -0500
+++ b/Make.defs	Mon Jan 26 10:32:45 2009 -0500
@@ -12,7 +12,7 @@
 # full details.
 #
 
-VERSION=0.6
+VERSION=1.0
 # VERSION can be overridden by snapshot builds to force incompatible versions
 
 export prefix = /usr
diff -r 67c9d8f7e302 -r f007b4fa8b9b NEWS
--- a/NEWS	Fri Jan 16 22:15:32 2009 -0500
+++ b/NEWS	Mon Jan 26 10:32:45 2009 -0500
@@ -1,4 +1,8 @@
-Changes in @NEW@:
+Changes in 1.0:
+  o General Availability
+    * rpath-product-definition is now released as generally available
+      software with a stable API.  See the README file for more
+      information.
 
 Changes in 0.6:
   o API Changes:
diff -r 67c9d8f7e302 -r f007b4fa8b9b README
--- a/README	Fri Jan 16 22:15:32 2009 -0500
+++ b/README	Mon Jan 26 10:32:45 2009 -0500
@@ -2,10 +2,9 @@
 a stable interface for managing rPath product definition components
 as stored in rBuilder.
 
-Note that until version 1.0 is released, public APIs are subject to
-change.  All documentation regarding stable interfaces is relevant
-only to published stable releases; it is not in force for alpha
-and beta releases, including 0.x releases and any automated builds.
+All documentation regarding stable interfaces is relevant only to
+published stable releases; it is not in force for alpha and beta
+releases, including 0.x releases and any automated builds.
 
 To use the latest version of the interface:
     from rpath_common import proddef
@@ -21,8 +20,8 @@
 The schema version is included in the filename: rpd-1.0.xsd
 implements version 1.0 of the schema.  (From schema version 1.0
 to 1.1 there is a slight incompatibility; the schema version
-rules will not be strictly enforced until the software version
-reaches 1.0.)
+rules was not strictly enforced until the software version
+reached 1.0.)
 
 API documentation is available at
 http://cvs.rpath.com/product-definition-docs/ or by running "make

From johnsonm@rpath.com Mon Jan 26 10:33:51 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n0QFXoub009078 for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 15:33:50 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n0QFXoC4015810
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:33:50 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n0QFXoHo013002
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:33:50 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n0QFXnft029440
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:33:49 -0500
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n0QFXnmi029425
	for rpath-common-commits@lists.rpath.com;
	Mon, 26 Jan 2009 10:33:49 -0500
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200901261533.n0QFXnmi029425@scc.eng.rpath.com>
Date: Mon, 26 Jan 2009 10:33:49 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Added tag product-definition-1.0 for
	changeset f007b4fa8b9b
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 26 Jan 2009 15:33:51 -0000

user:        Michael K. Johnson <http://issues.rpath.com/>
files:       .hgtags

Added tag product-definition-1.0 for changeset f007b4fa8b9b

diff -r f007b4fa8b9b -r 02757001e4b4 .hgtags
--- a/.hgtags	Mon Jan 26 10:32:45 2009 -0500
+++ b/.hgtags	Mon Jan 26 10:32:49 2009 -0500
@@ -7,3 +7,4 @@
 2490a2962ee2ed29a334c0447095a9d30834cbe1 product-definition-0.5
 181d94f0faf2b2bc338c61a7a98c35c2b1f55601 product-definition-0.5
 ce447e509cd1278e40e84eb62b3e48b04a9a828f product-definition-0.6
+f007b4fa8b9be4a9d11e418340ced2346ac3c014 product-definition-1.0

From johnsonm@rpath.com Mon Jan 26 10:33:52 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n0QFXqEE009083 for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 15:33:52 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n0QFXqwn015818
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:33:52 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n0QFXpr9013007
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:33:51 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n0QFXpXD029468
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 26 Jan 2009 10:33:51 -0500
Received: (from johnsonm@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n0QFXo6U029462
	for rpath-common-commits@lists.rpath.com;
	Mon, 26 Jan 2009 10:33:50 -0500
From: "Michael K. Johnson" <johnsonm@rpath.com>
Message-Id: <200901261533.n0QFXo6U029462@scc.eng.rpath.com>
Date: Mon, 26 Jan 2009 10:33:50 -0500
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: prepare for future versions
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 26 Jan 2009 15:33:52 -0000

tag:         tip
user:        Michael K. Johnson <http://issues.rpath.com/>
files:       NEWS

prepare for future versions

diff -r 02757001e4b4 -r e922b13a25fd NEWS
--- a/NEWS	Mon Jan 26 10:32:49 2009 -0500
+++ b/NEWS	Mon Jan 26 10:33:01 2009 -0500
@@ -1,3 +1,5 @@
+Changes in @NEW@:
+
 Changes in 1.0:
   o General Availability
     * rpath-product-definition is now released as generally available

From mtharp@rpath.com Fri Jan 30 13:00:16 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n0UI0FP3018493 for <rpath-common-commits@lists.rpath.com>;
	Fri, 30 Jan 2009 18:00:15 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n0UI0Fa2025947
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 30 Jan 2009 13:00:15 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n0UI0FmC018040
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 30 Jan 2009 13:00:15 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n0UI0F1l032696
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 30 Jan 2009 13:00:15 -0500
Received: (from mtharp@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n0UI0Ejs032691
	for rpath-common-commits@lists.rpath.com; Fri, 30 Jan 2009 18:00:14 GMT
From: Michael Tharp <mtharp@rpath.com>
Message-Id: <200901301800.n0UI0Ejs032691@scc.eng.rpath.com>
Date: Fri, 30 Jan 2009 18:00:14 +0000
To: rpath-common-commits@lists.rpath.com
Subject: rpath-common: Python 2.6 compatibility tweak
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 30 Jan 2009 18:00:16 -0000

tag:         tip
user:        Michael Tharp <mtharp@rpath.com>
files:       Make.rules

Python 2.6 compatibility tweak

diff -r df4ad461cd9b -r 7215cb132eb9 Make.rules
--- a/Make.rules	Mon Jan 26 10:14:49 2009 -0500
+++ b/Make.rules	Fri Jan 30 17:40:23 2009 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2006-2008 rPath, Inc.
+# Copyright (c) 2006-2009 rPath, Inc.
 #
 # This program is distributed under the terms of the Common Public License,
 # version 1.0. A copy of this license should have been distributed with this
@@ -12,7 +12,7 @@
 # full details.
 #
 
-PYTHON = $(shell [ -x /usr/bin/python2.4 ] && echo /usr/bin/python2.4)
+PYTHON = $(shell [ -x /usr/bin/python ] && echo /usr/bin/python)
 PYVERSION = $(shell $(PYTHON) -c 'import os, sys; print sys.version[:3]')
 PYINCLUDE = $(shell $(PYTHON) -c 'import os, sys; print os.sep.join((sys.prefix, "include", "python" + sys.version[:3]))')
 

From mtharp@rpath.com Fri Jan 30 13:06:19 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n0UI6JxS018512 for <rpath-common-commits@lists.rpath.com>;
	Fri, 30 Jan 2009 18:06:19 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n0UI6Jlg026230
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 30 Jan 2009 13:06:19 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n0UI6Jiw018363
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 30 Jan 2009 13:06:19 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n0UI6JH1000483
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 30 Jan 2009 13:06:19 -0500
Received: (from mtharp@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n0UI6I5o000478
	for rpath-common-commits@lists.rpath.com; Fri, 30 Jan 2009 18:06:18 GMT
From: Michael Tharp <mtharp@rpath.com>
Message-Id: <200901301806.n0UI6I5o000478@scc.eng.rpath.com>
Date: Fri, 30 Jan 2009 18:06:18 +0000
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: Python 2.6 compatibility tweak
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 30 Jan 2009 18:06:20 -0000

tag:         tip
user:        Michael Tharp <mtharp@rpath.com>
files:       Make.rules

Python 2.6 compatibility tweak

diff -r 3c198b600588 -r c7317912a29e Make.rules
--- a/Make.rules	Mon Jan 26 10:23:50 2009 -0500
+++ b/Make.rules	Fri Jan 30 17:41:40 2009 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2006-2008 rPath, Inc.
+# Copyright (c) 2006-2009 rPath, Inc.
 #
 # This program is distributed under the terms of the Common Public License,
 # version 1.0. A copy of this license should have been distributed with this
@@ -12,7 +12,7 @@
 # full details.
 #
 
-PYTHON = $(shell [ -x /usr/bin/python2.4 ] && echo /usr/bin/python2.4)
+PYTHON = $(shell [ -x /usr/bin/python ] && echo /usr/bin/python)
 PYVERSION = $(shell $(PYTHON) -c 'import os, sys; print sys.version[:3]')
 PYINCLUDE = $(shell $(PYTHON) -c 'import os, sys; print os.sep.join((sys.prefix, "include", "python" + sys.version[:3]))')
 

From misa@rpath.com Thu Feb 26 13:21:25 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n1QILPRV016497 for <rpath-common-commits@lists.rpath.com>;
	Thu, 26 Feb 2009 18:21:25 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n1QILPNl031682
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 26 Feb 2009 13:21:25 -0500
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n1QILPnp011281
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 26 Feb 2009 13:21:25 -0500
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n1QILPCM005620
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 26 Feb 2009 13:21:25 -0500
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n1QILPp7005615
	for rpath-common-commits@lists.rpath.com;
	Thu, 26 Feb 2009 13:21:25 -0500
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200902261821.n1QILPp7005615@scc.eng.rpath.com>
Date: Thu, 26 Feb 2009 13:21:25 -0500
To: rpath-common-commits@lists.rpath.com
Subject: rpath-storage: Added symlink to rpath-xmllib to make the
	catalog-service testsuite work on developer boxes
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 26 Feb 2009 18:21:26 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       .hgignore rpath_common/Makefile

Added symlink to rpath-xmllib to make the catalog-service testsuite work on developer boxes

diff -r 1b56c8d30465 -r e91f3ec21221 .hgignore
--- a/.hgignore	Wed Feb 25 16:41:12 2009 -0500
+++ b/.hgignore	Thu Feb 26 13:21:21 2009 -0500
@@ -7,5 +7,6 @@
 ^tmp/
 docs/developer/.*
 rpath_common/storage/storage_constants.pyc?$
+rpath_common/xmllib
 ^pylint/reports/
 ^rpath-common-.*.tar.bz2
diff -r 1b56c8d30465 -r e91f3ec21221 rpath_common/Makefile
--- a/rpath_common/Makefile	Wed Feb 25 16:41:12 2009 -0500
+++ b/rpath_common/Makefile	Thu Feb 26 13:21:21 2009 -0500
@@ -17,16 +17,24 @@
 # file is provided by the rpath-common package instead.
 
 SUBDIRS=storage
+SYMLINKS = xmllib
 
 dist_files = Makefile __init__.py
 
-all: default-all default-subdirs
+all: default-all default-subdirs symlinks
 
 install: all default-install install-subdirs
 
 dist: default-dist
 
-clean: default-clean
+clean: default-clean clean-symlinks
+
+clean-symlinks:
+	@rm -f $(SYMLINKS)
+
+symlinks:
+	[ -z "$$XMLLIB_PATH" ] || [ -h xmllib ] || ln -s $$XMLLIB_PATH/rpath_common/xmllib .
+
 
 include ../Make.rules
 include ../Make.defs

From misa@rpath.com Fri Mar 13 13:37:34 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n2DHbYCC021475 for <rpath-common-commits@lists.rpath.com>;
	Fri, 13 Mar 2009 17:37:34 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n2DHbYj2024561
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 13 Mar 2009 13:37:34 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n2DHbXii024499
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 13 Mar 2009 13:37:33 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n2DHbXCN017932
	for <rpath-common-commits@lists.rpath.com>;
	Fri, 13 Mar 2009 13:37:33 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n2DHbXtL017927
	for rpath-common-commits@lists.rpath.com;
	Fri, 13 Mar 2009 13:37:33 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200903131737.n2DHbXtL017927@scc.eng.rpath.com>
Date: Fri, 13 Mar 2009 13:37:33 -0400
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: Don't traceback if one compares a class with an int
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Fri, 13 Mar 2009 17:37:34 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/xmllib/api1.py

Don't traceback if one compares a class with an int

diff -r c7317912a29e -r 1aa501a2fef8 rpath_common/xmllib/api1.py
--- a/rpath_common/xmllib/api1.py	Fri Jan 30 17:41:40 2009 +0000
+++ b/rpath_common/xmllib/api1.py	Fri Mar 13 13:37:29 2009 -0400
@@ -514,6 +514,9 @@
     tag = None
 
     def __eq__(self, obj):
+        # We should only compare class instances
+        if type(self) != type(obj):
+            return False
         for key in self.__slots__:
             val = self.__getattribute__(key)
             val2 = obj.__getattribute__(key)

From mtharp@rpath.com Thu Mar 19 18:36:36 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n2JMaaAD016602 for <rpath-common-commits@lists.rpath.com>;
	Thu, 19 Mar 2009 22:36:36 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n2JMaasr009193
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 19 Mar 2009 18:36:36 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n2JMaZer010311
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 19 Mar 2009 18:36:35 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n2JMaZgA012599
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 19 Mar 2009 18:36:35 -0400
Received: (from mtharp@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n2JMaZAY012594
	for rpath-common-commits@lists.rpath.com; Thu, 19 Mar 2009 22:36:35 GMT
From: Michael Tharp <mtharp@rpath.com>
Message-Id: <200903192236.n2JMaZAY012594@scc.eng.rpath.com>
Date: Thu, 19 Mar 2009 22:36:35 +0000
To: rpath-common-commits@lists.rpath.com
Subject: rpath-storage: Don't run pylint in the default target
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 19 Mar 2009 22:36:36 -0000

tag:         tip
user:        Michael Tharp <mtharp@rpath.com>
files:       Makefile

Don't run pylint in the default target

diff -r e91f3ec21221 -r b51ffe8a7761 Makefile
--- a/Makefile	Thu Feb 26 13:21:21 2009 -0500
+++ b/Makefile	Thu Mar 19 22:36:32 2009 +0000
@@ -19,7 +19,7 @@
 export TOPDIR = $(shell pwd)
 export DISTDIR = $(TOPDIR)/rpath-storage-$(VERSION)
 
-SUBDIRS=rpath_common pylint
+SUBDIRS=rpath_common
 
 dist_files = $(extra_files)
 

From dbc@rpath.com Tue Apr  7 17:53:26 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n37LrQDj005878
	for <rpath-common-commits@lists.rpath.com>; Tue, 7 Apr 2009 21:53:26 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n37LrQ40015183
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 7 Apr 2009 17:53:26 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n37LrPxs007166
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 7 Apr 2009 17:53:25 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n37LrPKl015389
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 7 Apr 2009 17:53:25 -0400
Received: (from dbc@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n37LrPYJ015384
	for rpath-common-commits@lists.rpath.com; Tue, 7 Apr 2009 17:53:25 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200904072153.n37LrPYJ015384@scc.eng.rpath.com>
Date: Tue, 07 Apr 2009 17:53:25 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Use faster interface for getting product
	definitions.
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 07 Apr 2009 21:53:26 -0000

tag:         tip
user:        David Christian <http://issues.rpath.com>
files:       rpath_common/proddef/api1.py

Use faster interface for getting product definitions.

diff -r e922b13a25fd -r 59c78bdea0d3 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Mon Jan 26 10:33:01 2009 -0500
+++ b/rpath_common/proddef/api1.py	Tue Apr 07 17:53:16 2009 -0400
@@ -464,21 +464,13 @@
         nvfs = troves[troveSpec]
         #if not nvfs:
         #    raise ProductDefinitionTroveNotFoundError("%s=%s" % (troveName, label))
-        trvCsSpec = (nvfs[0][0], (None, None), (nvfs[0][1], nvfs[0][2]), True)
-        cs = conaryClient.createChangeSet([ trvCsSpec ], withFiles = True,
-                                          withFileContents = True)
-        for thawTrvCs in cs.iterNewTroveList():
-            paths = [ x for x in thawTrvCs.getNewFileList()
-                      if x[1] == self._troveFileName ]
-            if not paths:
-                continue
-            # Fetch file from changeset
-            fileSpecs = [ (fId, fVer) for (_, _, fId, fVer) in paths ]
-            fileContents = repos.getFileContents(fileSpecs)
-            return fileContents[0].get(), thawTrvCs.getNewNameVersionFlavor()
+        # At this point, troveSpec is in troves and its value should not be
+        # the empty list.
+        nvfs = troves[troveSpec]
+        contents = repos.getFileContentsFromTrove(nvfs[0],
+                                      [self._troveFileName])[0]
+        return contents.get(), nvfs[0]
 
-        # Couldn't find the file we expected; die
-        raise ProductDefinitionFileNotFoundError("%s=%s" % (troveName, label))
 
     def _initFields(self):
         self.baseFlavor = None

From dbc@rpath.com Wed Apr  8 13:26:09 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n38HQ9rf009881
	for <rpath-common-commits@lists.rpath.com>; Wed, 8 Apr 2009 17:26:09 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n38HQ9P8022884
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 8 Apr 2009 13:26:09 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n38HQ9o7009955
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 8 Apr 2009 13:26:09 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n38HQ9Hl020364
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 8 Apr 2009 13:26:09 -0400
Received: (from dbc@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n38HQ92s020359
	for rpath-common-commits@lists.rpath.com; Wed, 8 Apr 2009 13:26:09 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200904081726.n38HQ92s020359@scc.eng.rpath.com>
Date: Wed, 08 Apr 2009 13:26:08 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Support for older conarys
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 08 Apr 2009 17:26:10 -0000

tag:         tip
user:        David Christian <http://issues.rpath.com>
files:       rpath_common/proddef/api1.py

Support for older conarys

diff -r 59c78bdea0d3 -r 2d61b4c5dbb6 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Tue Apr 07 17:53:16 2009 -0400
+++ b/rpath_common/proddef/api1.py	Wed Apr 08 13:26:00 2009 -0400
@@ -464,13 +464,26 @@
         nvfs = troves[troveSpec]
         #if not nvfs:
         #    raise ProductDefinitionTroveNotFoundError("%s=%s" % (troveName, label))
-        # At this point, troveSpec is in troves and its value should not be
-        # the empty list.
-        nvfs = troves[troveSpec]
-        contents = repos.getFileContentsFromTrove(nvfs[0],
-                                      [self._troveFileName])[0]
-        return contents.get(), nvfs[0]
+        if hasattr(repos, 'getFileContentsFromTrove'):
+            nvfs = troves[troveSpec]
+            contents = repos.getFileContentsFromTrove(nvfs[0],
+                                          [self._troveFileName])[0]
+            return contents.get(), nvfs[0]
+        trvCsSpec = (nvfs[0][0], (None, None), (nvfs[0][1], nvfs[0][2]), True)
+        cs = conaryClient.createChangeSet([ trvCsSpec ], withFiles = True,
+                                          withFileContents = True)
+        for thawTrvCs in cs.iterNewTroveList():
+            paths = [ x for x in thawTrvCs.getNewFileList()
+                      if x[1] == self._troveFileName ]
+            if not paths:
+                continue
+            # Fetch file from changeset
+            fileSpecs = [ (fId, fVer) for (_, _, fId, fVer) in paths ]
+            fileContents = repos.getFileContents(fileSpecs)
+            return fileContents[0].get(), thawTrvCs.getNewNameVersionFlavor()
 
+        # Couldn't find the file we expected; die
+        raise ProductDefinitionFileNotFoundError("%s=%s" % (troveName, label))
 
     def _initFields(self):
         self.baseFlavor = None

From dbc@rpath.com Thu Apr  9 09:44:40 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n39DienW013379
	for <rpath-common-commits@lists.rpath.com>; Thu, 9 Apr 2009 13:44:40 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n39DieWN027020
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 9 Apr 2009 09:44:40 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n39DieFC018210
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 9 Apr 2009 09:44:40 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n39Didi8024725
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 9 Apr 2009 09:44:39 -0400
Received: (from dbc@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n39DidDN024720
	for rpath-common-commits@lists.rpath.com; Thu, 9 Apr 2009 09:44:39 -0400
From: David Christian <dbc@rpath.com>
Message-Id: <200904091344.n39DidDN024720@scc.eng.rpath.com>
Date: Thu, 09 Apr 2009 09:44:39 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Fixed getFileContentsFromTrove api
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 09 Apr 2009 13:44:41 -0000

tag:         tip
user:        David Christian <http://issues.rpath.com>
files:       rpath_common/proddef/api1.py

Fixed getFileContentsFromTrove api

diff -r 2d61b4c5dbb6 -r 9936a22968ee rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Wed Apr 08 13:26:00 2009 -0400
+++ b/rpath_common/proddef/api1.py	Thu Apr 09 09:44:30 2009 -0400
@@ -464,12 +464,13 @@
         nvfs = troves[troveSpec]
         #if not nvfs:
         #    raise ProductDefinitionTroveNotFoundError("%s=%s" % (troveName, label))
+        nvfs = troves[troveSpec]
+        n,v,f = nvfs[0]
         if hasattr(repos, 'getFileContentsFromTrove'):
-            nvfs = troves[troveSpec]
-            contents = repos.getFileContentsFromTrove(nvfs[0],
+            contents = repos.getFileContentsFromTrove(n,v,f,
                                           [self._troveFileName])[0]
-            return contents.get(), nvfs[0]
-        trvCsSpec = (nvfs[0][0], (None, None), (nvfs[0][1], nvfs[0][2]), True)
+            return contents.get(), (n,v,f)
+        trvCsSpec = (n, (None, None), (v, f), True)
         cs = conaryClient.createChangeSet([ trvCsSpec ], withFiles = True,
                                           withFileContents = True)
         for thawTrvCs in cs.iterNewTroveList():

From misa@rpath.com Thu Apr  9 11:41:49 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n39FfmI7013802
	for <rpath-common-commits@lists.rpath.com>; Thu, 9 Apr 2009 15:41:49 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n39Ffmn0031657
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 9 Apr 2009 11:41:48 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n39FfmrM026308
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 9 Apr 2009 11:41:48 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n39FfmOY028804
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 9 Apr 2009 11:41:48 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n39FfmLq028799
	for rpath-common-commits@lists.rpath.com; Thu, 9 Apr 2009 11:41:48 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200904091541.n39FfmLq028799@scc.eng.rpath.com>
Date: Thu, 09 Apr 2009 11:41:48 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Fixed error codepath to catch and reraise the
	PathsNotFound exception properly
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 09 Apr 2009 15:41:49 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Fixed error codepath to catch and reraise the PathsNotFound exception properly

diff -r 9936a22968ee -r 81f184d86244 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Thu Apr 09 09:44:30 2009 -0400
+++ b/rpath_common/proddef/api1.py	Thu Apr 09 11:41:45 2009 -0400
@@ -43,6 +43,7 @@
 from conary import versions as conaryVersions
 from conary.conaryclient import filetypes, cmdline
 from conary.deps import deps as conaryDeps
+from conary.repository import errors as repositoryErrors
 
 from rpath_common.xmllib import api1 as xmllib
 from rpath_common.proddef import _xmlConstants
@@ -467,8 +468,11 @@
         nvfs = troves[troveSpec]
         n,v,f = nvfs[0]
         if hasattr(repos, 'getFileContentsFromTrove'):
-            contents = repos.getFileContentsFromTrove(n,v,f,
-                                          [self._troveFileName])[0]
+            try:
+                contents = repos.getFileContentsFromTrove((n,v,f),
+                                              [self._troveFileName])[0]
+            except repositoryErrors.PathsNotFound:
+                raise ProductDefinitionFileNotFoundError()
             return contents.get(), (n,v,f)
         trvCsSpec = (n, (None, None), (v, f), True)
         cs = conaryClient.createChangeSet([ trvCsSpec ], withFiles = True,
@@ -1049,9 +1053,9 @@
         @type containerTemplateRef: C{str}
         @param buildTemplateRef: the name of the buildTemplate to derive values
         for containerTemplateRef and architectureRef.
-        type: buildTemplateRef: C{str}
+        @type: buildTemplateRef: C{str}
         @param flavorSetRef: the name of the flavorSet to use for this image
-        type: flavorSetRef: C{str}
+        @type: flavorSetRef: C{str}
         @param flavor: additional flavors
         @type flavor: C{str}
         """

From misa@rpath.com Thu Apr  9 12:14:21 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n39GELjK013900
	for <rpath-common-commits@lists.rpath.com>; Thu, 9 Apr 2009 16:14:21 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n39GEKnT000512
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 9 Apr 2009 12:14:20 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n39GEK2t028301
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 9 Apr 2009 12:14:20 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n39GEKOE030153
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 9 Apr 2009 12:14:20 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n39GEKjV030148
	for rpath-common-commits@lists.rpath.com; Thu, 9 Apr 2009 12:14:20 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200904091614.n39GEKjV030148@scc.eng.rpath.com>
Date: Thu, 09 Apr 2009 12:14:19 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Using latest conary interface for
	getFileContentsFromTrove
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 09 Apr 2009 16:14:21 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/proddef/api1.py

Using latest conary interface for getFileContentsFromTrove

diff -r 81f184d86244 -r 700ee70a5d99 rpath_common/proddef/api1.py
--- a/rpath_common/proddef/api1.py	Thu Apr 09 11:41:45 2009 -0400
+++ b/rpath_common/proddef/api1.py	Thu Apr 09 12:14:03 2009 -0400
@@ -469,7 +469,7 @@
         n,v,f = nvfs[0]
         if hasattr(repos, 'getFileContentsFromTrove'):
             try:
-                contents = repos.getFileContentsFromTrove((n,v,f),
+                contents = repos.getFileContentsFromTrove(n,v,f,
                                               [self._troveFileName])[0]
             except repositoryErrors.PathsNotFound:
                 raise ProductDefinitionFileNotFoundError()

From misa@rpath.com Thu Apr  9 14:19:53 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n39IJrD5014275
	for <rpath-common-commits@lists.rpath.com>; Thu, 9 Apr 2009 18:19:53 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n39IJrQh004857
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 9 Apr 2009 14:19:53 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n39IJrq7004019
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 9 Apr 2009 14:19:53 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.13.7/8.13.7) with ESMTP id n39IJrZV001929
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 9 Apr 2009 14:19:53 -0400
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.13.7/8.13.7/Submit) id n39IJqS6001924
	for rpath-common-commits@lists.rpath.com; Thu, 9 Apr 2009 14:19:52 -0400
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200904091819.n39IJqS6001924@scc.eng.rpath.com>
Date: Thu, 09 Apr 2009 14:19:52 -0400
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Added news entry for the faster way of
	retriving files from troves
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 09 Apr 2009 18:19:54 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       NEWS

Added news entry for the faster way of retriving files from troves

diff -r 700ee70a5d99 -r 50cac6eb9d48 NEWS
--- a/NEWS	Thu Apr 09 12:14:03 2009 -0400
+++ b/NEWS	Thu Apr 09 14:19:49 2009 -0400
@@ -1,4 +1,7 @@
 Changes in @NEW@:
+  o Bug Fixes:
+    * Use the faster getFileContentsFromTrove Conary interface, when
+      available, for getting product definitions from repositories.
 
 Changes in 1.0:
   o General Availability

From jslagle@rpath.com Tue Jun  2 17:06:14 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n52L6DIs003431
	for <rpath-common-commits@lists.rpath.com>; Tue, 2 Jun 2009 21:06:13 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n52L6Dbx001929
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 2 Jun 2009 17:06:13 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n52L6BXP025036
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 2 Jun 2009 17:06:11 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.14.2/8.14.2) with ESMTP id n52L6B2g025583
	for <rpath-common-commits@lists.rpath.com>; Tue, 2 Jun 2009 21:06:11 GMT
Received: (from jslagle@localhost)
	by scc.eng.rpath.com (8.14.2/8.14.2/Submit) id n52L6BVR025579
	for rpath-common-commits@lists.rpath.com; Tue, 2 Jun 2009 21:06:11 GMT
From: James Slagle <jslagle@rpath.com>
Message-Id: <200906022106.n52L6BVR025579@scc.eng.rpath.com>
Date: Tue, 02 Jun 2009 21:06:11 +0000
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Add buildOVF1_0 image option
User-Agent: Heirloom mailx 12.3 7/15/07
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 02 Jun 2009 21:06:14 -0000

tag:         tip
user:        James Slagle <https://issues.rpath.com>
files:       rpath_common/proddef/imageTypes.py

Add buildOVF1_0 image option

diff -r 50cac6eb9d48 -r 62b5a2b919ce rpath_common/proddef/imageTypes.py
--- a/rpath_common/proddef/imageTypes.py	Thu Apr 09 14:19:49 2009 -0400
+++ b/rpath_common/proddef/imageTypes.py	Tue Jun 02 17:06:06 2009 -0400
@@ -33,6 +33,7 @@
         'baseFileName'              : (str, ),
         'betaNag'                   : (bool, ),
         'bugsUrl'                   : (str, ),
+        'buildOVF1_0'               : (bool, ),
         'diskAdapter'               : (str, ),
         'freespace'                 : (int, ),
         'installLabelPath'          : (str, ),

From jslagle@rpath.com Wed Jun  3 17:43:40 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n53Lhe0w008212
	for <rpath-common-commits@lists.rpath.com>; Wed, 3 Jun 2009 21:43:40 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n53LhdTI026912
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 3 Jun 2009 17:43:40 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n53LhdUh031915
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 3 Jun 2009 17:43:39 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.14.2/8.14.2) with ESMTP id n53LhcQB029137
	for <rpath-common-commits@lists.rpath.com>; Wed, 3 Jun 2009 21:43:38 GMT
Received: (from jslagle@localhost)
	by scc.eng.rpath.com (8.14.2/8.14.2/Submit) id n53LhcYV029133
	for rpath-common-commits@lists.rpath.com; Wed, 3 Jun 2009 21:43:38 GMT
From: James Slagle <jslagle@rpath.com>
Message-Id: <200906032143.n53LhcYV029133@scc.eng.rpath.com>
Date: Wed, 03 Jun 2009 21:43:38 +0000
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Remove underscore from option name, it might
	be causing problems.
User-Agent: Heirloom mailx 12.3 7/15/07
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 03 Jun 2009 21:43:40 -0000

tag:         tip
user:        James Slagle <https://issues.rpath.com>
files:       rpath_common/proddef/imageTypes.py

Remove underscore from option name, it might be causing problems.

diff -r 62b5a2b919ce -r 045734090ff0 rpath_common/proddef/imageTypes.py
--- a/rpath_common/proddef/imageTypes.py	Tue Jun 02 17:06:06 2009 -0400
+++ b/rpath_common/proddef/imageTypes.py	Wed Jun 03 17:43:25 2009 -0400
@@ -33,7 +33,7 @@
         'baseFileName'              : (str, ),
         'betaNag'                   : (bool, ),
         'bugsUrl'                   : (str, ),
-        'buildOVF1_0'               : (bool, ),
+        'buildOVF10'               : (bool, ),
         'diskAdapter'               : (str, ),
         'freespace'                 : (int, ),
         'installLabelPath'          : (str, ),

From misa@rpath.com Thu Jun  4 11:32:14 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n54FWERj011888
	for <rpath-common-commits@lists.rpath.com>; Thu, 4 Jun 2009 15:32:14 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n54FWEi8001195
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 4 Jun 2009 11:32:14 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n54FWDJ7004661
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 4 Jun 2009 11:32:13 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.14.2/8.14.2) with ESMTP id n54FWC7B020111
	for <rpath-common-commits@lists.rpath.com>; Thu, 4 Jun 2009 15:32:12 GMT
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.14.2/8.14.2/Submit) id n54FWCTv020093
	for rpath-common-commits@lists.rpath.com; Thu, 4 Jun 2009 15:32:12 GMT
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200906041532.n54FWCTv020093@scc.eng.rpath.com>
Date: Thu, 04 Jun 2009 15:32:12 +0000
To: rpath-common-commits@lists.rpath.com
Subject: rpath-storage: Added a getFileFromKey method to return the
	contents as a file path
User-Agent: Heirloom mailx 12.3 7/15/07
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 04 Jun 2009 15:32:14 -0000

user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       rpath_common/storage/api1.py

Added a getFileFromKey method to return the contents as a file path

diff -r e91f3ec21221 -r bf59d89d2493 rpath_common/storage/api1.py
--- a/rpath_common/storage/api1.py	Thu Feb 26 13:21:21 2009 -0500
+++ b/rpath_common/storage/api1.py	Thu Jun 04 11:29:11 2009 -0400
@@ -172,6 +172,10 @@
             return self._real_delete_collection(key)
         return self._real_delete(key)
 
+    def getFileFromKey(self, key):
+        key = self._sanitizeKey(key)
+        return self._real_get_file_from_key(key)
+
     #{ Methods that could be overwritten in subclasses
     def _generateString(self, length):
         """Generate a string
@@ -220,6 +224,8 @@
     def _real_is_collection(self, key):
         raise NotImplementedError()
 
+    def _real_get_file_from_key(self, key):
+        raise NotImplementedError()
     #}
 
 class DiskStorage(BaseStorage):
@@ -299,6 +305,8 @@
             util.mkdirChain(os.path.dirname(ret))
         return ret
 
+    _real_get_file_from_key = _getFileForKey
+
 class StorageConfig(object):
     """
     Storage configuration object.

From bmurphy@rpath.com Tue Jun 23 14:53:30 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n5NIrUTE029651 for <rpath-common-commits@lists.rpath.com>;
	Tue, 23 Jun 2009 18:53:30 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n5NIrUdS025635
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 23 Jun 2009 14:53:30 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n5NIrUNR021244
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 23 Jun 2009 14:53:30 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.14.2/8.14.2) with ESMTP id n5NIrTlt000597
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 23 Jun 2009 18:53:29 GMT
Received: (from bmurphy@localhost)
	by scc.eng.rpath.com (8.14.2/8.14.2/Submit) id n5NIrSDo000592
	for rpath-common-commits@lists.rpath.com; Tue, 23 Jun 2009 18:53:28 GMT
From: Brad Murphy <bmurphy@rpath.com>
Message-Id: <200906231853.n5NIrSDo000592@scc.eng.rpath.com>
Date: Tue, 23 Jun 2009 18:53:28 +0000
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Added tag rba_5.2.0 for changeset
 045734090ff0
User-Agent: Heirloom mailx 12.3 7/15/07
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailman-Approved-At: Tue, 23 Jun 2009 16:18:05 -0400
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 23 Jun 2009 18:53:31 -0000

tag:         tip
user:        Brad Murphy <https://issues.rpath.com>
files:       .hgtags

Added tag rba_5.2.0 for changeset 045734090ff0

diff -r 045734090ff0 -r de554cce15d4 .hgtags
--- a/.hgtags	Wed Jun 03 17:43:25 2009 -0400
+++ b/.hgtags	Tue Jun 23 14:53:13 2009 -0400
@@ -8,3 +8,4 @@
 181d94f0faf2b2bc338c61a7a98c35c2b1f55601 product-definition-0.5
 ce447e509cd1278e40e84eb62b3e48b04a9a828f product-definition-0.6
 f007b4fa8b9be4a9d11e418340ced2346ac3c014 product-definition-1.0
+045734090ff036957487a9f0e55187632b5d2261 rba_5.2.0

From bmurphy@rpath.com Tue Jun 23 16:19:05 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n5NKJ5w2029948 for <rpath-common-commits@lists.rpath.com>;
	Tue, 23 Jun 2009 20:19:05 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n5NKJ4x0028965
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 23 Jun 2009 16:19:04 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.13.6/8.13.4) with ESMTP id n5NKJ4Rq027154
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 23 Jun 2009 16:19:04 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.14.2/8.14.2) with ESMTP id n5NKJ2YJ003961
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 23 Jun 2009 20:19:02 GMT
Received: (from bmurphy@localhost)
	by scc.eng.rpath.com (8.14.2/8.14.2/Submit) id n5NKJ0bf003957
	for rpath-common-commits@lists.rpath.com; Tue, 23 Jun 2009 20:19:00 GMT
From: Brad Murphy <bmurphy@rpath.com>
Message-Id: <200906232019.n5NKJ0bf003957@scc.eng.rpath.com>
Date: Tue, 23 Jun 2009 20:19:00 +0000
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: Added tag rba_5.2.0 for changeset 1aa501a2fef8
User-Agent: Heirloom mailx 12.3 7/15/07
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 23 Jun 2009 20:19:05 -0000

tag:         tip
user:        Brad Murphy <https://issues.rpath.com>
files:       .hgtags

Added tag rba_5.2.0 for changeset 1aa501a2fef8

diff -r 1aa501a2fef8 -r 98d451c341cd .hgtags
--- a/.hgtags	Fri Mar 13 13:37:29 2009 -0400
+++ b/.hgtags	Tue Jun 23 16:18:56 2009 -0400
@@ -1,3 +1,4 @@
 3768adef74c75b945f89762704991dbb1a61ec71 rpath-xmllib-0.1
 5fa829c9faff35a6d2060df3c0dd259401eaa1a4 rpath-xmllib-0.2
 da545d2476e8d3e8e6f91a55b552318e8e58d5b0 rpath-xmllib-1.0
+1aa501a2fef8aca804c3f59fe70101cd59fd702f rba_5.2.0

From mtharp@rpath.com Mon Jul  6 18:09:34 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n66M9Yno023187
	for <rpath-common-commits@lists.rpath.com>; Mon, 6 Jul 2009 22:09:34 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n66M9XHo003681
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 6 Jul 2009 18:09:33 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.14.2/8.14.2) with ESMTP id n66M8VLg015826
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Mon, 6 Jul 2009 18:08:31 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.14.2/8.14.2) with ESMTP id n66M9XRE023854
	for <rpath-common-commits@lists.rpath.com>; Mon, 6 Jul 2009 22:09:33 GMT
Received: (from mtharp@localhost)
	by scc.eng.rpath.com (8.14.2/8.14.2/Submit) id n66M9W2F023849
	for rpath-common-commits@lists.rpath.com; Mon, 6 Jul 2009 22:09:32 GMT
From: Michael Tharp <mtharp@rpath.com>
Message-Id: <200907062209.n66M9W2F023849@scc.eng.rpath.com>
Date: Mon, 06 Jul 2009 22:09:31 +0000
To: rpath-common-commits@lists.rpath.com
Subject: rpath-xmllib: Don't run pylint by default
User-Agent: Heirloom mailx 12.3 7/15/07
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Mon, 06 Jul 2009 22:09:34 -0000

tag:         tip
user:        Michael Tharp <mtharp@rpath.com>
files:       Makefile

Don't run pylint by default

diff -r 98d451c341cd -r ee1504dc2250 Makefile
--- a/Makefile	Tue Jun 23 16:18:56 2009 -0400
+++ b/Makefile	Mon Jul 06 18:09:11 2009 -0400
@@ -19,7 +19,7 @@
 export TOPDIR = $(shell pwd)
 export DISTDIR = $(TOPDIR)/rpath-xmllib-$(VERSION)
 
-SUBDIRS=rpath_common pylint
+SUBDIRS=rpath_common
 
 dist_files = $(extra_files)
 

From misa@rpath.com Wed Jul  8 12:01:25 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n68G1PQn030997
	for <rpath-common-commits@lists.rpath.com>; Wed, 8 Jul 2009 16:01:25 GMT
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n68G1PNC028297
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 8 Jul 2009 12:01:25 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.14.2/8.14.2) with ESMTP id n68G0822003142
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Wed, 8 Jul 2009 12:00:08 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.14.2/8.14.2) with ESMTP id n68G1INg018334
	for <rpath-common-commits@lists.rpath.com>; Wed, 8 Jul 2009 16:01:18 GMT
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.14.2/8.14.2/Submit) id n68G1HsL018332
	for rpath-common-commits@lists.rpath.com; Wed, 8 Jul 2009 16:01:17 GMT
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200907081601.n68G1HsL018332@scc.eng.rpath.com>
Date: Wed, 08 Jul 2009 16:01:17 +0000
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Branch merge from rbuilder/rbo
User-Agent: Heirloom mailx 12.3 7/15/07
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Wed, 08 Jul 2009 16:01:25 -0000

tag:         tip
user:        Mihai Ibanescu <https://issues.rpath.com/>
files:       .hgtags

Branch merge from rbuilder/rbo

diff -r de554cce15d4 -r bb4c02b6d08f .hgtags
--- a/.hgtags	Tue Jun 23 14:53:13 2009 -0400
+++ b/.hgtags	Wed Jul 08 12:00:55 2009 -0400
@@ -9,3 +9,4 @@
 ce447e509cd1278e40e84eb62b3e48b04a9a828f product-definition-0.6
 f007b4fa8b9be4a9d11e418340ced2346ac3c014 product-definition-1.0
 045734090ff036957487a9f0e55187632b5d2261 rba_5.2.0
+045734090ff036957487a9f0e55187632b5d2261 rba-5.2.1

From misa@rpath.com Tue Aug 25 11:29:47 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n7PFTlsS009049 for <rpath-common-commits@lists.rpath.com>;
	Tue, 25 Aug 2009 11:29:47 -0400
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n7PFTlUP032309
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 25 Aug 2009 11:29:47 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.14.2/8.14.2) with ESMTP id n7PFTlHU029901
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 25 Aug 2009 11:29:47 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.14.2/8.14.2) with ESMTP id n7PFTnmQ005853
	for <rpath-common-commits@lists.rpath.com>;
	Tue, 25 Aug 2009 15:29:49 GMT
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.14.2/8.14.2/Submit) id n7PFTnO1005840
	for rpath-common-commits@lists.rpath.com; Tue, 25 Aug 2009 15:29:49 GMT
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200908251529.n7PFTnO1005840@scc.eng.rpath.com>
Date: Tue, 25 Aug 2009 15:29:49 +0000
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Branch merge from 5.2
User-Agent: Heirloom mailx 12.3 7/15/07
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Tue, 25 Aug 2009 15:29:48 -0000

changeset:   c73649ab75c6
user:        Mihai Ibanescu <https://issues.rpath.com/>
date:        Tue, 25 Aug 2009 11:29:13 -0400

Branch merge from 5.2

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -8,5 +8,6 @@
 181d94f0faf2b2bc338c61a7a98c35c2b1f55601 product-definition-0.5
 ce447e509cd1278e40e84eb62b3e48b04a9a828f product-definition-0.6
 f007b4fa8b9be4a9d11e418340ced2346ac3c014 product-definition-1.0
+045734090ff036957487a9f0e55187632b5d2261 rba_5.2.0
 045734090ff036957487a9f0e55187632b5d2261 rba-5.2.1
 b98b6d4f0e184149401b17787178818335174492 rba-5.2.2

From misa@rpath.com Thu Aug 27 14:51:22 2009
Received: from mx2.rpath.com (proxy1.eqx-dc2-be.rpath.com [172.16.180.40])
	by lists-app.eqx-dc2-be.rpath.com (8.13.7/8.13.7) with ESMTP id
	n7RIpLwQ018644 for <rpath-common-commits@lists.rpath.com>;
	Thu, 27 Aug 2009 14:51:21 -0400
Received: from rdu-nat.rpath.com (rdu-nat.rpath.com [66.192.95.194])
	by mx2.rpath.com (8.13.7/8.13.7) with ESMTP id n7RIpHkZ004432
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 27 Aug 2009 14:51:17 -0400
Received: from scc.eng.rpath.com (scc.eng.rpath.com [172.16.160.77])
	by rdu-nat.rpath.com (8.14.2/8.14.2) with ESMTP id n7RIpG7b015856
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 27 Aug 2009 14:51:16 -0400
Received: from scc.eng.rpath.com (localhost.localdomain [127.0.0.1])
	by scc.eng.rpath.com (8.14.2/8.14.2) with ESMTP id n7RIpIUY009990
	for <rpath-common-commits@lists.rpath.com>;
	Thu, 27 Aug 2009 18:51:18 GMT
Received: (from misa@localhost)
	by scc.eng.rpath.com (8.14.2/8.14.2/Submit) id n7RIpHvA009986
	for rpath-common-commits@lists.rpath.com; Thu, 27 Aug 2009 18:51:17 GMT
From: Mihai Ibanescu <misa@rpath.com>
Message-Id: <200908271851.n7RIpHvA009986@scc.eng.rpath.com>
Date: Thu, 27 Aug 2009 18:51:17 +0000
To: rpath-common-commits@lists.rpath.com
Subject: product-definition: Use automatically generated classes.
 (RBL-5082)
User-Agent: Heirloom mailx 12.3 7/15/07
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: rpath-common-commits@lists.rpath.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <rpath-common-commits.lists.rpath.com>
List-Unsubscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=unsubscribe>
List-Archive: <http://lists.rpath.com/pipermail/rpath-common-commits>
List-Post: <mailto:rpath-common-commits@lists.rpath.com>
List-Help: <mailto:rpath-common-commits-request@lists.rpath.com?subject=help>
List-Subscribe: <http://lists.rpath.com/mailman/listinfo/rpath-common-commits>, 
	<mailto:rpath-common-commits-request@lists.rpath.com?subject=subscribe>
X-List-Received-Date: Thu, 27 Aug 2009 18:51:22 -0000

changeset:   da9352907950
user:        Mihai Ibanescu <https://issues.rpath.com/>
date:        Thu, 27 Aug 2009 14:25:45 -0400

Use automatically generated classes. (RBL-5082)

diff --git a/rpath_proddef/Makefile b/rpath_proddef/Makefile
--- a/rpath_proddef/Makefile
+++ b/rpath_proddef/Makefile
@@ -32,5 +32,24 @@
 clean: default-clean
 	rm -f proddef_constants.py
 
+GENERATE_DS=~/hg/generateDS/generateDS.py
+xmlDir = $(subst .,_,$(patsubst rule-%,xml_%,$(1)))
+xmlVer = $(patsubst rule-%,%,$(1))
+
+generate: $(patsubst ../xsd/rpd-%.xsd,rule-%,$(wildcard ../xsd/rpd-*.xsd))
+
+rule-%:
+	mkdir -p $(call xmlDir,$@)
+	touch $(call xmlDir,$@)/__init__.py
+	cp generatedssuper.py $(call xmlDir,$@)/
+	$(GENERATE_DS) -f --silence \
+                --no-dates \
+                --super=supers \
+                --external-encoding=utf-8 \
+                -o $(call xmlDir,$@)/supers.py \
+                -s $(call xmlDir,$@)/subs.py \
+                --user-methods=gends_user_methods \
+                ../xsd/rpd-$(call xmlVer,$@).xsd
+
 include ../Make.rules
 include ../Make.defs
diff --git a/rpath_proddef/_xmlConstants.py b/rpath_proddef/_xmlConstants.py
--- a/rpath_proddef/_xmlConstants.py
+++ b/rpath_proddef/_xmlConstants.py
@@ -23,6 +23,6 @@
 @type xmlSchemaLocaltion: C{str}
 """
 
-defaultNamespaceList = [ "http://www.rpath.com/permanent/rpd-3.0.xsd" ]
+defaultNamespaceList = [ "http://www.rpath.com/permanent/rpd-3.1.xsd" ]
 xmlSchemaNamespace = "http://www.w3.org/2001/XMLSchema-instance"
-xmlSchemaLocation = "http://www.rpath.com/permanent/rpd-3.0.xsd rpd-3.0.xsd"
+xmlSchemaLocation = "http://www.rpath.com/permanent/rpd-3.1.xsd rpd-3.1.xsd"
diff --git a/rpath_proddef/api1.py b/rpath_proddef/api1.py
--- a/rpath_proddef/api1.py
+++ b/rpath_proddef/api1.py
@@ -43,11 +43,11 @@
 from conary import versions as conaryVersions
 from conary.conaryclient import filetypes, cmdline
 from conary.deps import deps as conaryDeps
+from conary.lib import util
 from conary.repository import errors as repositoryErrors
 
 from rpath_xmllib import api1 as xmllib
 from rpath_proddef import _xmlConstants
-from rpath_proddef import imageTypes
 
 #{ Exception classes
 class ProductDefinitionError(Exception):
@@ -95,7 +95,8 @@
 #}
 
 class BaseDefinition(object):
-    version = '3.0'
+    version = '3.1'
+    Versioned = True
     defaultNamespace = _xmlConstants.defaultNamespaceList[0]
     xmlSchemaLocation = _xmlConstants.xmlSchemaLocation
 
@@ -116,17 +117,82 @@
         self._initFields()
 
         if fromStream:
-            if isinstance(fromStream, (str, unicode)):
-                fromStream = StringIO.StringIO(fromStream)
             self.parseStream(fromStream, validate = validate,
                              schemaDir = schemaDir)
 
+    def parseStream(self, fromStream, validate = False, schemaDir = None):
+        """
+        Initialize the current object from an XML stream.
+        @param stream: An XML stream
+        @type stream: C{file}
+        @param validate: Validate before parsing (off by default)
+        @type validate: C{bool}
+        @param schemaDir: A directory where schema files are stored
+        @type schemaDir: C{str}
+        """
+        self._initFields()
+
+        from xml.dom import minidom
+        if isinstance(fromStream, (str, unicode)):
+            func = minidom.parseString
+        else:
+            func = minidom.parse
+        doc = func(fromStream)
+        rootNode = doc.documentElement
+        if rootNode.attributes.has_key('version'):
+            version = rootNode.attributes['version'].value.encode('ascii')
+        else:
+            # XXX default to the current version, hope for the best
+            version = self.version
+        xmlns = rootNode.attributes.get('xmlns')
+
+        module = self.loadModule(version)
+
+        rootObj = getattr(module, self.ClassFactoryName).factory()
+        rootObj.build(rootNode)
+        doc.unlink()
+        if version != self.version:
+            migr = MigrationManager(version)
+            rootObj = migr.migrate(rootObj)
+        self._rootObj = rootObj
+        self._postinit()
+
+    @classmethod
+    def loadModule(cls, version):
+        moduleName = "xml_%s.subs" % version.replace('.', '_')
+        module = __import__(moduleName, globals(), fromlist = [moduleName])
+        return module
+
+    def serialize(self, stream):
+        """
+        Serialize the current object as an XML stream.
+        @param stream: stream to write the serialized object
+        @type stream: C{file}
+        """
+        attrs = [
+            ('xmlns', self.defaultNamespace),
+            ('xmlns:xsi', xmllib.DataBinder.xmlSchemaNamespace),
+            ("xsi:schemaLocation", self.xmlSchemaLocation),
+        ]
+        namespacedef = ' '.join('%s="%s"' % a for a in attrs)
+
+        # Write to a temporary file. We are paranoid and want to verify that
+        # the output we produce doesn't break lxml
+        bsio = util.BoundedStringIO()
+        self._rootObj.export(bsio, 0, namespace_ = '', name_ = self.RootNode,
+            namespacedef_ = namespacedef)
+        bsio.seek(0)
+        from lxml import etree
+        tree = etree.parse(bsio)
+        tree.write(stream, encoding = 'UTF-8', pretty_print = True,
+            xml_declaration = True)
+
     def getBaseFlavor(self):
         """
         @return: the base flavor
         @rtype: C{str}
         """
-        return self.baseFlavor
+        return self._rootObj.get_baseFlavor()
 
     def setBaseFlavor(self, baseFlavor):
         """
@@ -134,14 +200,22 @@
         @param baseFlavor: the base flavor
         @type baseFlavor: C{str}
         """
-        self.baseFlavor = baseFlavor
+        self._rootObj.set_baseFlavor(baseFlavor)
+
+    baseFlavor = property(getBaseFlavor, setBaseFlavor)
 
     def getSearchPaths(self):
         """
         @return: the search paths from this product definition
         @rtype: C{list} of C{_SearchPath} objects
         """
-        return self.searchPaths
+
+        sp = self._rootObj.get_searchPaths()
+        if sp is None:
+            return []
+        return sp.get_searchPath()
+
+    searchPaths = property(getSearchPaths)
 
     def getResolveTroves(self):
         """
@@ -171,14 +245,19 @@
         @return: None
         @rtype None
         """
-        self.searchPaths = _SearchPaths()
+        self._rootObj.set_searchPaths(None)
 
     def getFactorySources(self):
         """
         @return: the factory sources from this product definition
         @rtype: C{list} of C{_FactorySource} objects
         """
-        return self.factorySources
+        fs = self._rootObj.get_factorySources()
+        if fs is None:
+            return []
+        return fs.get_factorySource()
+
+    factorySources = property(getFactorySources)
 
     def clearFactorySources(self):
         """
@@ -186,7 +265,7 @@
         @return: None
         @rtype None
         """
-        self.factorySources = _FactorySources()
+        self._rootObj.set_factorySources(None)
 
     def addSearchPath(self, troveName = None, label = None, version = None,
                       isResolveTrove = True, isGroupSearchPathTrove = True):
@@ -204,8 +283,14 @@
                not be returned for getGroupSearchPaths() (defaults to True)
         """
         assert(isResolveTrove or isGroupSearchPathTrove)
-        self._addSource(troveName, label, version, _SearchPath,
-                self.searchPaths, isResolveTrove = isResolveTrove,
+        xmlsubs = self.xmlFactory()
+        sp = self._rootObj.get_searchPaths()
+        if sp is None:
+            sp = xmlsubs.searchPathListTypeSub.factory()
+            self._rootObj.set_searchPaths(sp)
+        self._addSource(troveName, label, version,
+                xmlsubs.searchPathTypeSub.factory, sp.add_searchPath,
+                isResolveTrove = isResolveTrove,
                 isGroupSearchPathTrove = isGroupSearchPathTrove)
 
     def addFactorySource(self, troveName = None, label = None, version = None):
@@ -218,14 +303,25 @@
         @param version: Version for the factory source
         @param version: C{str} or C{None}
         """
-        self._addSource(troveName, label, version, _FactorySource, self.factorySources)
+        sp = self._rootObj.get_factorySources()
+        xmlsubs = self.xmlFactory()
+        if sp is None:
+            sp = xmlsubs.factorySourceListTypeSub.factory()
+            self._rootObj.set_factorySources(sp)
+        self._addSource(troveName, label, version,
+            xmlsubs.searchPathTypeSub.factory, sp.add_factorySource)
 
     def getArchitectures(self):
         """
         @return: all defined architectures for both proddef and platform
         @rtype: C{list}
         """
-        return self.architectures
+        vals = self._rootObj.get_architectures()
+        if vals is None:
+            return []
+        return vals.get_architecture()
+
+    architectures = property(getArchitectures)
 
     def hasArchitecture(self, name):
         """
@@ -263,25 +359,40 @@
         @param flavor: flavor of architecture to add
         @type flavor: C{str}
         """
-        for obj in self.architectures[:]:
-            if obj.name == name:
-                self.architectures.remove(obj)
-        obj = _Architecture(name = name, displayName = displayName,
-                flavor = flavor)
-        self.architectures.append(obj)
+        xmlsubs = self.xmlFactory()
+        # Replace architecture with the same name
+        arches = self._rootObj.get_architectures()
+        if arches is None:
+            arches = []
+        else:
+            arches = arches.get_architecture()
+        narches = xmlsubs.architecturesTypeSub.factory()
+        for arch in (arches or []):
+            if arch.get_name() == name:
+                continue
+            narches.add_architecture(arch)
+        newVal = xmlsubs.nameFlavorTypeSub.factory(name = name,
+            displayName = displayName, flavor = flavor)
+        narches.add_architecture(newVal)
+        self._rootObj.set_architectures(narches)
 
     def clearArchitectures(self):
         """
         Reset architectures.
         """
-        self.architectures = _Architectures()
+        self._rootObj.set_architectures(None)
 
     def getFlavorSets(self):
         """
         @return: all defined flavor sets
         @rtype: C{list} of FlavorSet objects
         """
-        return self.flavorSets
+        fsets = self._rootObj.get_flavorSets()
+        if fsets is None:
+            return []
+        return fsets.get_flavorSet()
+
+    flavorSets = property(getFlavorSets)
 
     def getFlavorSet(self, name, default = -1):
         """
@@ -312,25 +423,36 @@
         @param flavor: flavor of flavor set to add
         @type flavor: C{str}
         """
-        for obj in self.flavorSets[:]:
-            if obj.name == name:
-                self.flavorSets.remove(obj)
-        obj = _FlavorSet(name = name, displayName = displayName,
-                flavor = flavor)
-        self.flavorSets.append(obj)
+        xmlsubs = self.xmlFactory()
+        # Replace flavor sets with the same name
+        fsets = self._rootObj.get_flavorSets()
+        nfsets = xmlsubs.flavorSetsTypeSub.factory()
+        for fset in ((fsets and fsets.get_flavorSet()) or []):
+            if fset.get_name() == name:
+                continue
+            nfsets.add_flavorSet(fset)
+        newVal = xmlsubs.nameFlavorTypeSub.factory(name = name,
+            displayName = displayName, flavor = flavor)
+        nfsets.add_flavorSet(newVal)
+        self._rootObj.set_flavorSets(nfsets)
 
     def clearFlavorSets(self):
         """
         Reset flavor sets.
         """
-        self.flavorSets = _FlavorSets()
+        self._rootObj.set_flavorSets(None)
 
     def getContainerTemplates(self):
         """
         @return: all defined container templates
         @rtype: C{list} of ContainerTemplate objects
         """
-        return self.containerTemplates
+        vals = self._rootObj.get_containerTemplates()
+        if vals is None:
+            return []
+        return vals.get_image()
+
+    containerTemplates = property(getContainerTemplates)
 
     def getContainerTemplate(self, containerFormat, default = -1):
         """
@@ -353,24 +475,34 @@
 
     def addContainerTemplate(self, image):
         """
-        add a container template.
+        dd a container template.
         @param image: Image
         @type image: C{imageTypes.Image}
         """
-        self.containerTemplates.append(image)
+        xmlsubs = self.xmlFactory()
+        vals = self._rootObj.get_containerTemplates()
+        if vals is None:
+            vals = xmlsubs.containerTemplatesTypeSub.factory()
+            self._rootObj.set_containerTemplates(vals)
+        vals.add_image(image)
 
     def clearContainerTemplates(self):
         """
         Reset container templates.
         """
-        self.containerTemplates = _ContainerTemplates()
+        self._rootObj.set_containerTemplates(None)
 
     def getBuildTemplates(self):
         """
         @return: all defined build templates
         @rtype: C{list} of BuildTemplate objects
         """
-        return self.buildTemplates
+        vals = self._rootObj.get_buildTemplates()
+        if vals is None:
+            return []
+        return vals.get_buildTemplate()
+
+    buildTemplates = property(getBuildTemplates)
 
     def getBuildTemplate(self, name, default = -1):
         """
@@ -406,24 +538,62 @@
         @pararm flavorSetRef: reference to flavorSet
         @type flavorSetRef: C{str}
         """
-        tmpl = _BuildTemplate(name, displayName, architectureRef,
-                containerTemplateRef, flavorSetRef = flavorSetRef)
-        self.buildTemplates.append(tmpl)
+        xmlsubs = self.xmlFactory()
+        # Replace architecture with the same name
+        values = self._rootObj.get_buildTemplates()
+        if values is not None:
+            values = values.get_buildTemplate()
+        nvalues = xmlsubs.buildTemplatesTypeSub.factory()
+        for val in (values or []):
+            # XXX
+            # Don't remove already existing templates, we did not enforce
+            # name uniqueness before
+            #if arch.get_name() == name:
+            #    continue
+            nvalues.add_buildTemplate(val)
+        newVal = xmlsubs.buildTemplateTypeSub.factory(name = name,
+            displayName = displayName, architectureRef = architectureRef,
+            containerTemplateRef = containerTemplateRef,
+            flavorSetRef = flavorSetRef)
+        nvalues.add_buildTemplate(newVal)
+        self._rootObj.set_buildTemplates(nvalues)
 
     def clearBuildTemplates(self):
         """
         Reset build templates.
         """
-        self.buildTemplates = _BuildTemplates()
+        self._rootObj.set_buildTemplates(None)
 
-    def _addSource(self, troveName, label, version, cls, intList, **kwargs):
+    def imageType(self, name, fields = None):
+        """
+        Image type factory. Given an image type name, it will instantiate an
+        object of the proper type.
+        @param name: The name of the image type.
+        @type name: C{str}
+        @param fields: Fields to initialize the image type object
+        @type fields: C{dict}
+        """
+        xmlsubs = self.xmlFactory()
+        fields = fields or {}
+        if name is not None:
+            fields.setdefault('containerFormat', name)
+        return xmlsubs.imageTypeSub.factory(**fields)
+
+    @classmethod
+    def parseFlavor(cls, flv):
+        try:
+            return conaryDeps.parseFlavor(flv)
+        except RuntimeError, e:
+            raise ProductDefinitionError(str(e))
+
+    def _addSource(self, troveName, label, version, factory, addMethod, **kwargs):
         "Internal function for adding a Source"
         if label is not None:
             if isinstance(label, conaryVersions.Label):
                 label = str(label)
-        obj = cls(troveName = troveName, label = label, version = version,
+        obj = factory(troveName = troveName, label = label, version = version,
                 **kwargs)
-        intList.append(obj)
+        addMethod(obj)
 
     def _saveToRepository(self, conaryClient, label, message = None):
         if message is None:
@@ -504,20 +674,43 @@
         # Couldn't find the file we expected; die
         raise ProductDefinitionFileNotFoundError("%s=%s" % (troveName, label))
 
+    def xmlFactory(self):
+        return self.loadModule(self.version)
+
     def _initFields(self):
-        self.baseFlavor = None
-        self.searchPaths = _SearchPaths()
-        self.factorySources = _FactorySources()
-        self.architectures = _Architectures()
-        self.flavorSets = _FlavorSets()
-        self.containerTemplates = _ContainerTemplates()
-        self.buildTemplates = _BuildTemplates()
+        xmlsubs = self.xmlFactory()
+        self._rootObj = getattr(xmlsubs, self.ClassFactoryName)()
+        # Initialize some required fields
+        # XXX we should probably try to get generateDS to initialize them for
+        # us
+        reqFields = [ 'productName', 'productShortname', 'productDescription',
+            'productVersion', 'productVersionDescription',
+            'conaryRepositoryHostname', 'conaryNamespace', 'imageGroup',
+            'baseFlavor' ]
+        for field in reqFields:
+            setattr(self._rootObj, field, '')
+        if self.Versioned:
+            self._rootObj.set_version(self.version)
+        self._defaultNamespace = None
+
+    def _postinit(self):
+        pass
 
     @classmethod
     def _newNode(self, name, value):
         node = xmllib.StringNode(name = name).characters(value)
         return node
 
+    def _setDefault(self, field, factory):
+        getter = getattr(self._rootObj, 'get_%s' % field)
+        vals = getter()
+        if vals is not None:
+            return vals
+        vals = factory.factory()
+        setter = getattr(self._rootObj, 'set_%s' % field)
+        setter(vals)
+        return vals
+
 class ProductDefinition(BaseDefinition):
     """
     Represents the definition of a product.
@@ -532,6 +725,9 @@
     @cvar schemaDir: Directory where schema definitions are stored
     @type schemaDir: C{str}
     """
+    ClassFactoryName = 'productDefinitionSub'
+    RootNode = 'productDefinition'
+
     _imageTypeDispatcher = xmllib.NodeDispatcher({})
 
     _troveName = 'product-definition'
@@ -568,11 +764,9 @@
         return "<Product Definition: %s=%s>" % (troveName, prodDefLabel)
 
     def __eq__(self, obj):
-        for key, val in self.__dict__.iteritems():
-            val2 = obj.__getattribute__(key)
-            if val != val2:
-                return False
-        return True
+        if not hasattr(obj, '_rootObj'):
+            return False
+        return self._rootObj.__eq__(obj._rootObj)
 
     def __ne__(self, obj):
         return not self.__eq__(obj)
@@ -583,66 +777,6 @@
         inStr = StringIO.StringIO(outStr.getvalue())
         return ProductDefinition(inStr)
 
-    def parseStream(self, stream, validate = False, schemaDir = None):
-        """
-        Initialize the current object from an XML stream.
-        @param stream: An XML stream
-        @type stream: C{file}
-        @param validate: Validate before parsing (off by default)
-        @type validate: C{bool}
-        @param schemaDir: A directory where schema files are stored
-        @type schemaDir: C{str}
-        """
-        self._initFields()
-        binder = xmllib.DataBinder()
-        binder.registerType(_ProductDefinition, 'productDefinition')
-        xmlObj = binder.parseFile(stream, validate = validate,
-                                  schemaDir = schemaDir or self.schemaDir)
-        self.productName = getattr(xmlObj, 'productName', None)
-        self.productDescription = getattr(xmlObj, 'productDescription', None)
-        self.productShortname = getattr(xmlObj, 'productShortname', None)
-        self.productVersion = getattr(xmlObj, 'productVersion', None)
-        self.productVersionDescription = getattr(xmlObj,
-            'productVersionDescription', None)
-        self.conaryRepositoryHostname = getattr(xmlObj,
-            'conaryRepositoryHostname', None)
-        self.conaryNamespace = getattr(xmlObj, 'conaryNamespace', None)
-        self.sourceGroup = getattr(xmlObj, 'sourceGroup', None)
-        self.imageGroup = getattr(xmlObj, 'imageGroup', None)
-        self.baseLabel = getattr(xmlObj, 'baseLabel', None)
-        self.baseFlavor = getattr(xmlObj, 'baseFlavor', None)
-        self.stages.extend(getattr(xmlObj, 'stages', []))
-        self.searchPaths.extend(getattr(xmlObj, 'searchPaths', []))
-        self.factorySources.extend(getattr(xmlObj, 'factorySources', []))
-        self.architectures.extend(getattr(xmlObj, 'architectures', []))
-        self.flavorSets.extend(getattr(xmlObj, 'flavorSets', []))
-        self.containerTemplates.extend(getattr(xmlObj, 'containerTemplates', []))
-        self.buildTemplates.extend(getattr(xmlObj, 'buildTemplates', []))
-        self.buildDefinition.extend(getattr(xmlObj, 'buildDefinition', []))
-        # Add (weak) reference to the product definition
-        for bd in self.buildDefinition:
-            bd.setProductDefinition(self)
-        self.platform = getattr(xmlObj, 'platform', None)
-
-        self.secondaryLabels = getattr(xmlObj, 'secondaryLabels', None)
-
-    def serialize(self, stream):
-        """
-        Serialize the current object as an XML stream.
-        @param stream: stream to write the serialized object
-        @type stream: C{file}
-        """
-        attrs = {'version' : self.version,
-                 'xmlns' : self.defaultNamespace,
-                 'xmlns:xsi' : xmllib.DataBinder.xmlSchemaNamespace,
-                 "xsi:schemaLocation" : self.xmlSchemaLocation,
-        }
-        nameSpaces = {}
-        serObj = _ProductDefinitionSerialization("productDefinition",
-            attrs, nameSpaces, self)
-        binder = xmllib.DataBinder()
-        stream.write(binder.toXml(serObj))
-
     def saveToRepository(self, client, message = None):
         """
         Save a C{ProductDefinition} object to a Conary repository.
@@ -677,7 +811,7 @@
         @return: the product name
         @rtype: C{str}
         """
-        return self.productName
+        return self._rootObj.get_productName()
 
     def setProductName(self, productName):
         """
@@ -685,14 +819,14 @@
         @param productName: the product name
         @type productName: C{str}
         """
-        self.productName = productName
+        self._rootObj.set_productName(productName)
 
     def getProductDescription(self):
         """
         @return: the product description
         @rtype: C{str}
         """
-        return self.productDescription
+        return self._rootObj.get_productDescription()
 
     def setProductDescription(self, productDescription):
         """
@@ -700,28 +834,28 @@
         @param productDescription: the product description
         @type productDescription: C{str}
         """
-        self.productDescription = productDescription
+        self._rootObj.set_productDescription(productDescription)
 
     def getProductShortname(self):
         """
         @return: the product shortname
         @rtype: C{str}
         """
-        return self.productShortname
+        return self._rootObj.get_productShortname()
 
     def setProductShortname(self, productShortname):
         """
         @param productShortname: the product's shortname
         @type productShortname: C{str}
         """
-        self.productShortname = productShortname
+        self._rootObj.set_productShortname(productShortname)
 
     def getProductVersion(self):
         """
         @return: the product version
         @rtype: C{str}
         """
-        return self.productVersion
+        return self._rootObj.get_productVersion()
 
     def setProductVersion(self, productVersion):
         """
@@ -729,14 +863,14 @@
         @param productVersion: the product version
         @type productVersion: C{str}
         """
-        self.productVersion = productVersion
+        self._rootObj.set_productVersion(productVersion)
 
     def getProductVersionDescription(self):
         """
         @return: the product version description
         @rtype: C{str}
         """
-        return self.productVersionDescription
+        return self._rootObj.get_productVersionDescription()
 
     def setProductVersionDescription(self, productVersionDescription):
         """
@@ -744,14 +878,14 @@
         @param productVersionDescription: the product version description
         @type productVersionDescription: C{str}
         """
-        self.productVersionDescription = productVersionDescription
+        self._rootObj.set_productVersionDescription(productVersionDescription)
 
     def getConaryRepositoryHostname(self):
         """
         @return: the Conary repository's hostname (e.g. conary.example.com)
         @rtype: C{str}
         """
-        return self.conaryRepositoryHostname
+        return self._rootObj.get_conaryRepositoryHostname()
 
     def setConaryRepositoryHostname(self, conaryRepositoryHostname):
         """
@@ -760,14 +894,14 @@
            the repository
         @type conaryRepositoryHostname: C{str}
         """
-        self.conaryRepositoryHostname = conaryRepositoryHostname
+        self._rootObj.set_conaryRepositoryHostname(conaryRepositoryHostname)
 
     def getConaryNamespace(self):
         """
         @return: the Conary namespace to use for this product
         @rtype: C{str}
         """
-        return self.conaryNamespace
+        return self._rootObj.get_conaryNamespace()
 
     def setConaryNamespace(self, conaryNamespace):
         """
@@ -775,17 +909,14 @@
         @param conaryNamespace: the Conary namespace
         @type conaryNamespace: C{str}
         """
-        self.conaryNamespace = conaryNamespace
+        self._rootObj.set_conaryNamespace(conaryNamespace)
 
     def getSourceGroup(self):
         """
         @return: the source group, if none is set, default to the image group
         @rtype: C{str}
         """
-        if self.sourceGroup:
-            return self.sourceGroup
-        else:
-            return None
+        return self._rootObj.get_sourceGroup()
 
     def setSourceGroup(self, sourceGroup):
         """
@@ -793,14 +924,15 @@
         @param sourceGroup: the image group name
         @type sourceGroup: C{str}
         """
-        self.sourceGroup = sourceGroup
+        self._rootObj.set_sourceGroup(sourceGroup)
 
     def getImageGroup(self):
         """
         @return: the image group
         @rtype: C{str}
         """
-        return self.imageGroup
+        # XXX Old code relied on the image group being None, not empty string
+        return self._rootObj.get_imageGroup() or None
 
     def setImageGroup(self, imageGroup):
         """
@@ -808,7 +940,7 @@
         @param imageGroup: the image group name
         @type imageGroup: C{str}
         """
-        self.imageGroup = imageGroup
+        self._rootObj.set_imageGroup(imageGroup)
 
     def getBaseFlavor(self):
         """
@@ -818,19 +950,31 @@
         flv = conaryDeps.parseFlavor('')
         platFlv = self.getPlatformBaseFlavor()
         if platFlv is not None:
-            nflv = conaryDeps.parseFlavor(platFlv)
+            nflv = self.parseFlavor(platFlv)
             flv = conaryDeps.overrideFlavor(flv, nflv)
-        if self.baseFlavor is not None:
-            nflv = conaryDeps.parseFlavor(self.baseFlavor)
+        bf = BaseDefinition.getBaseFlavor(self)
+        if bf is not None:
+            nflv = self.parseFlavor(bf)
             flv = conaryDeps.overrideFlavor(flv, nflv)
         return str(flv)
 
+    # self.baseFlavor will refer to the flavor of the product, as defined, not
+    # the one inherited from the platform.
+    # This line is commented out because we inherit the base flavor from the
+    # parent object.
+    #baseFlavor = property(BaseDefinition.getBaseFlavor, BaseDefinition.setBaseFlavor)
+
     def getStages(self):
         """
         @return: the stages from this product definition
         @rtype: C{list} of C{_Stage} objects
         """
-        return self.stages
+        stages = self._rootObj.get_stages()
+        if stages is None:
+            return []
+        return stages.get_stage()
+
+    stages = property(getStages)
 
     def getStage(self, stageName):
         """
@@ -856,9 +1000,20 @@
         @param promoteMaps: list of promote maps for the stage
         @type promoteMaps: C{list} of C{(mapName, mapLabel)} tuples
         """
-        obj = _Stage(name = name, labelSuffix = labelSuffix,
-            promoteMaps = promoteMaps)
-        self.stages.append(obj)
+        xmlsubs = self.xmlFactory()
+        stages = self._setDefault('stages', xmlsubs.stageListTypeSub)
+        if promoteMaps is None:
+            nvals = None
+        else:
+            nvals = xmlsubs.promoteMapsTypeSub.factory()
+            for pm in promoteMaps:
+                if isinstance(pm, tuple):
+                    pm = xmlsubs.promoteMapTypeSub.factory(name = pm[0],
+                        label = pm[1])
+                nvals.add_promoteMap(pm)
+        stages.add_stage(xmlsubs.stageTypeSub.factory(
+            name = name, labelSuffix = labelSuffix,
+            promoteMaps = nvals))
 
     def clearStages(self):
         """
@@ -866,7 +1021,7 @@
         @return: None
         @rtype None
         """
-        self.stages = _Stages()
+        self._rootObj.set_stages(None)
 
     def getLabelForStage(self, stageName):
         """
@@ -913,13 +1068,14 @@
         @rtype: C{list} of (name, value) tuples
         """
         stageObj = self.getStage(stageName)
-        if self.secondaryLabels is None:
+        secondaryLabels = self.getSecondaryLabels()
+        if not secondaryLabels:
             return []
         prefix = self.getProductDefinitionLabel()
         labelSuffix = stageObj.labelSuffix or '' # this can be blank
 
         ret = []
-        for sl in self.secondaryLabels:
+        for sl in secondaryLabels:
             name = sl.getName()
             label = sl.getLabel()
             fullLabel = self._getSecondaryLabel(label, labelSuffix)
@@ -958,10 +1114,11 @@
         fromTo[self._getLabelForStage(fromStageObj)] = toStageBranch
 
         # Secondary labels
-        if self.secondaryLabels is not None:
+        secondaryLabels = self.getSecondaryLabels()
+        if secondaryLabels:
             fromSuffix = fromStageObj.labelSuffix
             toSuffix = toStageObj.labelSuffix
-            for secondaryLabel in self.secondaryLabels:
+            for secondaryLabel in secondaryLabels:
                 label = secondaryLabel.getLabel()
                 fromLabel = self._getSecondaryLabel(label, fromSuffix)
                 toLabel = self._getSecondaryLabel(label, toSuffix)
@@ -983,8 +1140,9 @@
         @return: the search paths from this product definition
         @rtype: C{list} of C{_SearchPath} objects
         """
-        if self.searchPaths:
-            return self.searchPaths
+        sp = BaseDefinition.getSearchPaths(self)
+        if sp:
+            return sp
         return self.getPlatformSearchPaths()
 
     def getResolveTroves(self):
@@ -994,12 +1152,11 @@
                  is a subset of the results from getSearchPaths
         @rtype: C{list} of C{_SearchPath} objects
         """
-        if self.searchPaths:
-            searchPaths = self.searchPaths
-        else:
+        searchPaths = self.getSearchPaths()
+        if not searchPaths:
             searchPaths = self.getPlatformSearchPaths()
         if searchPaths:
-            searchPaths = [x for x in searchPaths 
+            searchPaths = [x for x in searchPaths
                            if x.isResolveTrove or x.isResolveTrove is None]
         return searchPaths
 
@@ -1011,14 +1168,12 @@
                  getSearchPaths
         @rtype: C{list} of C{_SearchPath} objects
         """
-        if self.searchPaths:
-            searchPaths = self.searchPaths
-        else:
-            searchPaths = self.getPlatformSearchPaths()
-        if searchPaths:
-            searchPaths = [x for x in searchPaths 
-                           if x.isGroupSearchPathTrove 
-                              or x.isGroupSearchPathTrove is None]
+        searchPaths = BaseDefinition.getGroupSearchPaths(self)
+        if not searchPaths and self.platform:
+            searchPaths = self.platform.getGroupSearchPaths()
+        searchPaths = [x for x in (searchPaths or [])
+                       if x.isGroupSearchPathTrove
+                          or x.isGroupSearchPathTrove is None]
         return searchPaths
 
     def getFactorySources(self):
@@ -1026,8 +1181,9 @@
         @return: the factory sources from this product definition
         @rtype: C{list} of C{_FactorySource} objects
         """
-        if self.factorySources:
-            return self.factorySources
+        fs = BaseDefinition.getFactorySources(self)
+        if fs:
+            return fs
         return self.getPlatformFactorySources()
 
     def getBuildDefinitions(self):
@@ -1035,7 +1191,12 @@
         @return: The build definitions from this product definition
         @rtype: C{list} of C{Build} objects
         """
-        return self.buildDefinition
+        bd = self._rootObj.get_buildDefinition()
+        if bd is None:
+            return []
+        return bd.get_build()
+
+    buildDefinition = property(getBuildDefinitions)
 
     def addBuildDefinition(self, name = None, image = None, stages = None,
                            imageGroup = None, sourceGroup = None, 
@@ -1075,6 +1236,7 @@
         @param flavor: additional flavors
         @type flavor: C{str}
         """
+        xmlsubs = self.xmlFactory()
         if architectureRef:
             # Make sure we have the architecture
             arch = self.getArchitecture(architectureRef, None)
@@ -1091,17 +1253,22 @@
             if not fs:
                 self.getPlatformFlavorSet(flavorSetRef)
 
-        obj = Build(name = name, image = image, stages = stages,
+        obj = xmlsubs.buildTypeSub.factory(name = name, image = image,
                 imageGroup = imageGroup,
                 sourceGroup = sourceGroup,
-                parentImageGroup = self.imageGroup,
-                parentSourceGroup = self.sourceGroup,
                 architectureRef = architectureRef,
                 containerTemplateRef = containerTemplateRef,
-                flavorSetRef = flavorSetRef,
-                buildTemplateRef = buildTemplateRef,
-                proddef = self, flavor = flavor)
-        self.buildDefinition.append(obj)
+                flavorSetRef = flavorSetRef)
+        obj.parentImageGroup = self.getImageGroup()
+        obj.parentSourceGroup = self.getSourceGroup()
+        obj.buildFlavor = self._getFlavorByRefs(flavorSetRef,
+            architectureRef, buildTemplateRef, flavor)
+        obj.containerTemplateFields = self._getBuildContainerTemplateFields(
+            containerTemplateRef)
+        for stage in (stages or []):
+            obj.add_stage(xmlsubs.stageSub.factory(ref = stage))
+        bdef = self._setDefault('buildDefinition', xmlsubs.buildDefinitionTypeSub)
+        bdef.add_build(obj)
 
     def clearBuildDefinition(self):
         """
@@ -1109,7 +1276,7 @@
         @return: None
         @rtype None
         """
-        self.buildDefinition = _BuildDefinition()
+        self._rootObj.set_buildDefinition(None)
 
     def getPlatformSearchPaths(self):
         """
@@ -1128,7 +1295,7 @@
         """
         if self.platform is None:
             return
-        self.platform.searchPaths = _SearchPaths()
+        self.platform.clearSearchPaths()
 
     def addPlatformSearchPath(self, troveName = None, label = None,
                               version = None, isResolveTrove = True,
@@ -1146,12 +1313,10 @@
         @param isGroupSearchPathTrove: set to False if this element should be 
                not be returned for getGroupSearchPath() (defaults to True)
         """
-        if self.platform is None:
-            self.platform = PlatformDefinition()
-        self._addSource(troveName, label, version, _SearchPath,
-                        self.platform.searchPaths,
-                        isResolveTrove = isResolveTrove,
-                        isGroupSearchPathTrove = isGroupSearchPathTrove)
+        self._ensurePlatformExists()
+        self.platform.addSearchPath(troveName = troveName, label = label,
+            version = version, isResolveTrove = isResolveTrove,
+            isGroupSearchPathTrove = isGroupSearchPathTrove)
 
     def getPlatformFactorySources(self):
         """
@@ -1160,7 +1325,7 @@
         """
         if self.platform is None:
             return []
-        return self.platform.factorySources
+        return self.platform.getFactorySources()
 
     def clearPlatformFactorySources(self):
         """
@@ -1170,7 +1335,7 @@
         """
         if self.platform is None:
             return
-        self.platform.factorySources = _FactorySources()
+        self.platform.clearFactorySources()
 
     def addPlatformFactorySource(self, troveName = None, label = None,
                                  version = None):
@@ -1183,10 +1348,9 @@
         @param version: Version for the factory source
         @param version: C{str} or C{None}
         """
-        if self.platform is None:
-            self.platform = PlatformDefinition()
-        self._addSource(troveName, label, version, _FactorySource,
-                        self.platform.factorySources)
+        self._ensurePlatformExists()
+        self.platform.addFactorySource(troveName = troveName, label = label,
+            version = version)
 
     def getPlatformName(self):
         """
@@ -1261,7 +1425,7 @@
 
         if self.platform is None:
             return None
-        return self.platform.baseFlavor
+        return self.platform.getBaseFlavor()
 
     def setPlatformBaseFlavor(self, baseFlavor):
         """
@@ -1270,7 +1434,7 @@
         @type baseFlavor: C{str}
         """
         self._ensurePlatformExists()
-        self.platform.baseFlavor = baseFlavor
+        self.platform.setBaseFlavor(baseFlavor)
 
     def getPlatformSourceTrove(self):
         """
@@ -1279,7 +1443,7 @@
         """
         if self.platform is None:
             return None
-        return self.platform.sourceTrove
+        return self.platform.getPlatformSourceTrove()
 
     def setPlatformSourceTrove(self, sourceTrove):
         """
@@ -1288,7 +1452,7 @@
         @type sourceTrove: C{str}
         """
         self._ensurePlatformExists()
-        self.platform.sourceTrove = sourceTrove
+        self.platform.setPlatformSourceTrove(sourceTrove)
 
     def getPlatformUseLatest(self):
         """
@@ -1297,7 +1461,7 @@
         """
         if self.platform is None:
             return None
-        return self.platform.useLatest
+        return self.platform.getPlatformUseLatest()
 
     def setPlatformUseLatest(self, useLatest):
         """
@@ -1306,7 +1470,7 @@
         @type useLatest: C{bool}
         """
         self._ensurePlatformExists()
-        self.platform.useLatest = useLatest
+        self.platform.setPlatformUseLatest(useLatest)
 
     def getPlatformArchitecture(self, name, default = -1):
         """
@@ -1388,9 +1552,11 @@
         @param label: Label for the secondary label
         @type label: C{str}
         """
-        if self.secondaryLabels is None:
-            self.secondaryLabels = _SecondaryLabels()
-        self.secondaryLabels.append(SecondaryLabel(name, label))
+        xmlsubs = self.xmlFactory()
+        labels = self._setDefault('secondaryLabels',
+            xmlsubs.secondaryLabelsTypeSub)
+        labels.add_secondaryLabel(xmlsubs.secondaryLabelSub(
+            name = name, valueOf_ = label))
         return self
 
     def getSecondaryLabels(self):
@@ -1398,34 +1564,21 @@
         @return: the seconary labels for this product definition.
         @rtype: C{list}
         """
-        if self.secondaryLabels is None:
+        vals = self._rootObj.get_secondaryLabels()
+        if vals is None:
             return []
-        return self.secondaryLabels
+        return vals.get_secondaryLabel()
 
     def clearSecondaryLabels(self):
         """
         Reset secondary label list.
         """
-        self.secondaryLabels = None
+        self._rootObj.set_secondaryLabels(None)
 
     def _ensurePlatformExists(self):
         if self.platform is None:
-            self.platform = PlatformDefinition()
-
-    @classmethod
-    def imageType(cls, name, fields = None):
-        """
-        Image type factory. Given an image type name, it will instantiate an
-        object of the proper type.
-        @param name: The name of the image type.
-        @type name: C{str}
-        @param fields: Fields to initialize the image type object
-        @type fields: C{dict}
-        """
-        fields = fields or {}
-        if name is not None:
-            fields.setdefault('containerFormat', name)
-        return imageTypes.Image(fields)
+            self.platform = Platform()
+            self._rootObj.set_platform(self.platform._rootObj)
 
     def getBuildsForStage(self, stageName):
         """
@@ -1437,7 +1590,7 @@
         """
         ret = []
         for build in self.getBuildDefinitions():
-            if stageName in build.stages:
+            if stageName in build.getBuildStages():
                 ret.append(build)
         return ret
 
@@ -1447,14 +1600,14 @@
         @param label: Value for the base label.
         @type label: C{str}
         """
-        self.baseLabel = label
+        self._rootObj.set_baseLabel(label)
 
     def getBaseLabel(self):
         """
         @return: the base label for this product definition.
         @rtype: C{str}
         """
-        return self.baseLabel
+        return self._rootObj.get_baseLabel()
 
     def getProductDefinitionLabel(self):
         """
@@ -1464,8 +1617,9 @@
         @raises MissingInformationError: if there isn't enough information
             in the product definition to generate the label
         """
-        if self.baseLabel is not None:
-            return self.baseLabel
+        baseLabel = self.getBaseLabel()
+        if baseLabel:
+            return baseLabel
 
         hostname = self.getConaryRepositoryHostname()
         shortname = self.getProductShortname()
@@ -1599,44 +1753,27 @@
         self._rebase(label, nplat, useLatest = useLatest)
 
     def _rebase(self, label, nplat, useLatest = None):
-        # Create a new platform definition
-        self.platform = PlatformDefinition()
-        # Fill it in with fields from the upstream one
-        self.setPlatformBaseFlavor(nplat.getBaseFlavor())
-        self.setPlatformSourceTrove(nplat.sourceTrove)
-        self.setPlatformUseLatest(useLatest)
-        self.platform.setPlatformName(nplat.getPlatformName())
-        self.platform.setPlatformVersionTrove(nplat.getPlatformVersionTrove())
-        for alr in nplat.getAutoLoadRecipes():
-            self.addPlatformAutoLoadRecipe(troveName = alr.getTroveName(),
-                    label = alr.getLabel())
-        for sp in nplat.getSearchPaths():
-            self.addPlatformSearchPath(troveName=sp.troveName,
-                               label=sp.label,
-                               version=sp.version,
-                               isResolveTrove=sp.isResolveTrove,
-                               isGroupSearchPathTrove=sp.isGroupSearchPathTrove)
-        for fs in nplat.getFactorySources():
-            self.addPlatformFactorySource(troveName=fs.troveName,
-                                          label=fs.label,
-                                          version=fs.version)
-        for item in nplat.getArchitectures():
-            self.platform.addArchitecture(name = item.name,
-                                          displayName = item.displayName,
-                                          flavor = item.flavor)
-        for flvSet in nplat.getFlavorSets():
-            self.platform.addFlavorSet(name = flvSet.name,
-                    displayName = flvSet.displayName, flavor = flvSet.flavor)
-
-        for image in nplat.getContainerTemplates():
-            self.platform.addContainerTemplate(image)
-
-        for btmpl in nplat.getBuildTemplates():
-            self.platform.addBuildTemplate(name = btmpl.name,
-                    displayName = btmpl.displayName,
-                    architectureRef = btmpl.architectureRef,
-                    containerTemplateRef = btmpl.containerTemplateRef,
-                    flavorSetRef = btmpl.flavorSetRef)
+        # Create a new platform
+        xmlsubs = self.xmlFactory()
+        self.platform = Platform()
+        uroot = nplat._rootObj
+        platobj = xmlsubs.platformTypeSub.factory(
+            platformName = uroot.get_platformName(),
+            platformVersionTrove = uroot.get_platformVersionTrove(),
+            sourceTrove = nplat.getPlatformSourceTrove(),
+            useLatest = useLatest,
+            baseFlavor = uroot.get_baseFlavor(),
+            searchPaths = uroot.get_searchPaths(),
+            factorySources = uroot.get_factorySources(),
+            autoLoadRecipes = uroot.get_autoLoadRecipes(),
+            architectures = uroot.get_architectures(),
+            flavorSets = uroot.get_flavorSets(),
+            containerTemplates = uroot.get_containerTemplates(),
+            buildTemplates = uroot.get_buildTemplates(),
+            )
+        self._rootObj.set_platform(platobj)
+        self.platform._rootObj = platobj
+        self._postinit()
 
     def _getSecondaryLabel(self, label, suffix):
         """
@@ -1659,27 +1796,194 @@
             prefix = self.getProductDefinitionLabel()
             return str(prefix + label + suffix)
 
+    def _getFlavorByRefs(self, flavorSetRef, architectureRef,
+            buildTemplateRef, extraFlavor):
+        # Grab base flavor from platform + product
+        flv = self.parseFlavor(self.getBaseFlavor())
+
+        if buildTemplateRef:
+            buildTemplate = self.getBuildTemplate(buildTemplateRef, None)
+            if not buildTemplate:
+                buildTemplate = self.getPlatformBuildTemplate(buildTemplateRef)
+            if not architectureRef:
+                architectureRef = buildTemplate.architectureRef
+            if not flavorSetRef:
+                flavorSetRef = buildTemplate.flavorSetRef
+        if flavorSetRef:
+            methods = [ self.getPlatformFlavorSet, self.getFlavorSet ]
+            for meth in methods:
+                obj = meth(flavorSetRef, None)
+                if obj is None:
+                    continue
+                nflv = self.parseFlavor(obj.flavor)
+                flv = conaryDeps.overrideFlavor(flv, nflv)
+        if architectureRef:
+            methods = [ self.getPlatformArchitecture, self.getArchitecture ]
+            for meth in methods:
+                obj = meth(architectureRef, None)
+                if obj is None:
+                    continue
+                nflv = self.parseFlavor(obj.flavor)
+                flv = conaryDeps.overrideFlavor(flv, nflv)
+        if extraFlavor:
+            nflv = self.parseFlavor(extraFlavor)
+            flv = conaryDeps.overrideFlavor(flv, nflv)
+        return str(flv)
+
+    def _getBuildContainerTemplateFields(self, containerTemplateRef):
+        tmpl = self.getContainerTemplate(containerTemplateRef, None)
+        if not tmpl:
+            tmpl = self.getPlatformContainerTemplate(containerTemplateRef,
+                None)
+        # if we didn't find the container, the previous function would raise
+        # an exeption
+        fields = {}
+        if tmpl:
+            fields['containerFormat'] = tmpl.containerFormat
+            fields.update(tmpl.getFields())
+
+        return fields
+
     def _initFields(self):
         BaseDefinition._initFields(self)
-        self.stages = _Stages()
-        self.productName = None
-        self.productShortname = None
-        self.productDescription = None
-        self.productVersion = None
-        self.productVersionDescription = None
-        self.conaryRepositoryHostname = None
-        self.conaryNamespace = None
-        self.imageGroup = None
-        self.sourceGroup = None
-        self.baseLabel = None
-        self.buildDefinition = _BuildDefinition()
         self.platform = None
-        self.secondaryLabels = None
+
+    def _postinit(self):
+        platform = self._rootObj.get_platform()
+        if platform is None:
+            self.platform = None
+        else:
+            self.platform = Platform()
+            self.platform._rootObj = platform
+        # Pass some parent information into the build objects
+        for build in self.getBuildDefinitions():
+            build.parentImageGroup = self.getImageGroup()
+            build.parentSourceGroup = self.getSourceGroup()
+            build.buildFlavor = self._getFlavorByRefs(build.flavorSetRef,
+                build.architectureRef, None, None)
+            build.containerTemplateFields = self._getBuildContainerTemplateFields(build.containerTemplateRef)
+
+        # Adding the platform was part of the migration from 1.3 to 2.0
+        if self.platform:
+            self._addPlatformDefaults()
+
+    def _addPlatformDefaults(self):
+        fields = ['containerTemplates', 'architectures',
+                  'buildTemplates', 'flavorSets']
+        for field in fields:
+            if getattr(self, field) or getattr(self.platform, field):
+                return
+        # the fields were not set in the platform or product
+        _addPlatformDefaults(self.platform)
 
     #}
 
+class BasePlatform(BaseDefinition):
+    """
+    Base platform node. This corresponds to the common data between
+    platformType and platformDefinitionType
+    """
+    def getPlatformName(self):
+        """
+        @return: The platform name.
+        @rtype: C{str}
+        """
+        return self._rootObj.get_platformName()
 
-class PlatformDefinition(BaseDefinition):
+    def setPlatformName(self, platformName):
+        """
+        Set the platform name.
+        @param platformName: The platform name.
+        @type platformName: C{str}
+        """
+        return self._rootObj.set_platformName(platformName)
+
+    def getPlatformVersionTrove(self):
+        """
+        @return: the platform version trove.
+        @rtype: C{str}
+        """
+        return self._rootObj.get_platformVersionTrove()
+
+    def setPlatformVersionTrove(self, troveSpec):
+        """
+        Set the platform version trove.
+        @param troveSpec: The platform version trove
+        @type platformName: C{str}
+        """
+        self._rootObj.set_platformVersionTrove(troveSpec)
+
+    def clearAutoLoadRecipes(self):
+        """
+        Clear the list of auto load recipes for the platform
+        """
+        self._rootObj.set_autoLoadRecipes(None)
+
+    def addAutoLoadRecipe(self, troveName = None, label = None):
+        """
+        Add an auto load recipe
+        @param troveName: Trove name
+        @type troveName: C{str}
+        @param label: Label for the trove
+        @type label: C{str}
+        """
+        xmlsubs = self.xmlFactory()
+        vals = self._setDefault('autoLoadRecipes', xmlsubs.autoLoadRecipesTypeSub)
+        vals.add_autoLoadRecipe(xmlsubs.nameLabelTypeSub.factory(
+            troveName = troveName, label = label))
+
+    def getAutoLoadRecipes(self):
+        """
+        @return: auto load recipes.
+        @rtype: C{list} of C{AutoLoadRecipe}
+        """
+        vals = self._rootObj.get_autoLoadRecipes()
+        if vals is None:
+            return []
+        return vals.get_autoLoadRecipe()
+
+class Platform(BasePlatform):
+    ClassFactoryName = 'platformTypeSub'
+    RootNode = 'platform'
+    Versioned = False
+
+    _troveName = None
+
+    def getPlatformUseLatest(self):
+        """
+        @return: the platform version trove.
+        @rtype: C{bool}
+        """
+        return self._rootObj.get_useLatest()
+
+    def setPlatformUseLatest(self, useLatest):
+        """
+        @return: the platform version trove.
+        @rtype: C{bool}
+        """
+        return self._rootObj.set_useLatest(useLatest)
+
+    def getPlatformSourceTrove(self):
+        """
+        @return: the platform source trove.
+        @rtype: C{str}
+        """
+        return self._rootObj.get_sourceTrove()
+
+    def setPlatformSourceTrove(self, troveSpec):
+        """
+        Set the platform source trove.
+        @param troveSpec: The platform source trove
+        @type platformName: C{str}
+        """
+        self._rootObj.set_sourceTrove(troveSpec)
+
+    sourceTrove = property(getPlatformSourceTrove, setPlatformSourceTrove)
+
+class PlatformDefinition(BasePlatform):
+    ClassFactoryName = 'platformDefinitionTypeSub'
+    RootNode = 'platformDefinition'
+
     _troveName = 'platform-definition'
 
     # list of files to search for in the trove, ordered by priority.
@@ -1706,65 +2010,6 @@
         """
 '''
 
-    def _initFields(self):
-        BaseDefinition._initFields(self)
-        self.useLatest = None
-        self.sourceTrove = None
-        self.platformName = None
-        self.platformVersionTrove = None
-        self.autoLoadRecipes = None
-
-    def parseStream(self, stream, validate = False, schemaDir = None):
-        """
-        Initialize the current object from an XML stream.
-        @param stream: An XML stream
-        @type stream: C{file}
-        @param validate: Validate before parsing (off by default)
-        @type validate: C{bool}
-        @param schemaDir: A directory where schema files are stored
-        @type schemaDir: C{str}
-        """
-        self._initFields()
-        binder = xmllib.DataBinder()
-        binder.registerType(_PlatformDefinition, 'platformDefinition')
-        xmlObj = binder.parseFile(stream, validate = validate,
-                                  schemaDir = schemaDir or self.schemaDir)
-        self.baseFlavor = getattr(xmlObj.platform, 'baseFlavor', None)
-        self.sourceTrove = getattr(xmlObj.platform, 'sourceTrove', None)
-        self.useLatest = getattr(xmlObj.platform, 'useLatest', None)
-        self.searchPaths = getattr(xmlObj.platform, 'searchPaths', None)
-        self.factorySources = getattr(xmlObj.platform, 'factorySources', None)
-        self.architectures = getattr(xmlObj.platform, 'architectures', None)
-        self.flavorSets = getattr(xmlObj.platform, 'flavorSets', None)
-        self.containerTemplates = getattr(xmlObj.platform, 'containerTemplates', None)
-        self.buildTemplates = getattr(xmlObj.platform, 'buildTemplates', None)
-        self.platformName = getattr(xmlObj.platform, 'platformName', None)
-        self.platformVersionTrove = getattr(xmlObj.platform, 'platformVersionTrove', None)
-        self.autoLoadRecipes = getattr(xmlObj.platform, 'autoLoadRecipes', None)
-
-        for nsName, nsVal in xmlObj.iterNamespaces():
-            if nsName is None and nsVal != self.defaultNamespace:
-                self.defaultNamespace = nsVal
-                continue
-            # XXX We don't support changing the schema location for now
-
-    def serialize(self, stream):
-        """
-        Serialize the current object as an XML stream.
-        @param stream: stream to write the serialized object
-        @type stream: C{file}
-        """
-        attrs = {'version' : self.version,
-                 'xmlns' : self.defaultNamespace,
-                 'xmlns:xsi' : xmllib.DataBinder.xmlSchemaNamespace,
-                 "xsi:schemaLocation" : self.xmlSchemaLocation,
-        }
-        nameSpaces = {}
-        serObj = _PlatformSerialization(attrs, nameSpaces, self,
-            name="platformDefinition")
-        binder = xmllib.DataBinder()
-        stream.write(binder.toXml(serObj))
-
     def saveToRepository(self, client, label, message = None):
         """
         Save a C{PlatformDefinition} object to a Conary repository.
@@ -1790,7 +2035,7 @@
         stream.seek(0)
         self.parseStream(stream)
         # Set the source trove version we used
-        self.sourceTrove = "%s=%s" % (self._troveName, nvf[1])
+        self._sourceTrove = "%s=%s" % (self._troveName, nvf[1])
 
     def snapshotVersions(self, conaryClient):
         """
@@ -1821,629 +2066,21 @@
             nvf = max(troves[key])
             sp.version = str(nvf[1].trailingRevision())
 
-    def getPlatformName(self):
-        """
-        @return: The platform name.
-        @rtype: C{str}
-        """
-        if self.platformName is None:
-            return None
-        return self.platformName.getText()
+    # sourceTrove is set when we load the trove from the repository. It is not
+    # part of the XML stream, so we set it separately in this object.
+    # It will, however, become part of the XML stream for Platform objects.
 
-    def setPlatformName(self, platformName):
-        """
-        Set the platform name.
-        @param platformName: The platform name.
-        @type platformName: C{str}
-        """
-        if platformName is None:
-            self.platformName = None
-        else:
-            self.platformName = self._newNode('platformName', platformName)
+    def getPlatformSourceTrove(self):
+        return self._sourceTrove
 
-    def getPlatformVersionTrove(self):
-        """
-        @return: the platform version trove.
-        @rtype: C{str}
-        """
-        if self.platformVersionTrove is None:
-            return None
-        return self.platformVersionTrove.getText()
+    def setPlatformSourceTrove(self, sourceTrove):
+        self._sourceTrove = sourceTrove
 
-    def setPlatformVersionTrove(self, troveSpec):
-        """
-        Set the platform version trove.
-        @param troveSpec: The platfrm version trove
-        @type platformName: C{str}
-        """
-        if troveSpec is None:
-            self.platformVersionTrove = None
-        else:
-            self.platformVersionTrove = self._newNode('platformVersionTrove',
-            troveSpec)
+    sourceTrove = property(getPlatformSourceTrove, setPlatformSourceTrove)
 
-    def clearAutoLoadRecipes(self):
-        """
-        Clear the list of auto load recipes for the platform
-        """
-        self.autoLoadRecipes = None
-
-    def addAutoLoadRecipe(self, troveName = None, label = None):
-        """
-        Add an auto load recipe
-        @param troveName: Trove name
-        @type troveName: C{str}
-        @param label: Label for the trove
-        @type label: C{str}
-        """
-        if self.autoLoadRecipes is None:
-            self.autoLoadRecipes = _AutoLoadRecipes()
-        self.autoLoadRecipes.append(_AutoLoadRecipe(troveName, label))
-        return self
-
-    def getAutoLoadRecipes(self):
-        """
-        @return: auto load recipes.
-        @rtype: C{list} of C{AutoLoadRecipe}
-        """
-        if self.autoLoadRecipes is None:
-            return []
-        return [ AutoLoadRecipe(x) for x in self.autoLoadRecipes ]
-
-#{ Objects for the representation of ProductDefinition fields
-
-class _Stages(xmllib.SerializableList):
-    tag = "stages"
-
-# pylint: disable-msg=R0903
-# Too few public methods (1/2): this is an interface
-class _SearchPaths(xmllib.SerializableList):
-    tag = "searchPaths"
-
-class _SimpleElement(xmllib.SerializableObject):
-    _xmlTagName = None
-    def __init__(self, value, attributes = None):
-        self.value = value
-        self._attributes = attributes or {}
-    def _getName(self):
-        return self._xmlTagName
-    def _getLocalNamespaces(self):
-        return {}
-    def _iterAttributes(self):
-        return self._attributes.iteritems()
-    def _iterChildren(self):
-        return []
-
-# pylint: disable-msg=R0903
-# Too few public methods (1/2): this is an interface
-class _AutoLoadRecipes(xmllib.SerializableList):
-    tag = "autoLoadRecipes"
-
-class _AutoLoadRecipe(_SimpleElement):
-    _xmlTagName = 'autoLoadRecipe'
-    def __init__(self, troveName, label):
-        _SimpleElement.__init__(self, None,
-            dict(troveName = troveName, label = label))
-
-    def getTroveName(self):
-        return self._attributes.get('troveName')
-
-    def getLabel(self):
-        return self._attributes.get('label')
-
-class AutoLoadRecipe(object):
-    __slots__ = [ '_troveName', '_label' ]
-    def __init__(self, node):
-        self._troveName = node.getTroveName()
-        self._label = node.getLabel()
-
-    def getTroveName(self):
-        """
-        @return: the trove name for the auto load recipe
-        @rtype: C{str}
-        """
-        return self._troveName
-
-    def getLabel(self):
-        """
-        @return: the label for the auto load recipe
-        @rtype: C{str}
-        """
-        return self._label
-
-# pylint: disable-msg=R0903
-# Too few public methods (1/2): this is an interface
-class _FactorySources(xmllib.SerializableList):
-    tag = "factorySources"
-
-# pylint: disable-msg=R0903
-# Too few public methods (1/2): this is an interface
-class _Architectures(xmllib.SerializableList):
-    tag = "architectures"
-
-# pylint: disable-msg=R0903
-# Too few public methods (1/2): this is an interface
-class _FlavorSets(xmllib.SerializableList):
-    tag = "flavorSets"
-
-# pylint: disable-msg=R0903
-# Too few public methods (1/2): this is an interface
-class _ContainerTemplates(xmllib.SerializableList):
-    tag = "containerTemplates"
-
-# pylint: disable-msg=R0903
-# Too few public methods (1/2): this is an interface
-class _BuildTemplates(xmllib.SerializableList):
-    tag = "buildTemplates"
-
-# pylint: disable-msg=R0903
-# Too few public methods (1/2): this is an interface
-class _BuildDefinition(xmllib.SerializableList):
-    tag = "buildDefinition"
-
-# pylint: disable-msg=R0903
-# Too few public methods (1/2): this is an interface
-class _SecondaryLabels(xmllib.SerializableList):
-    tag = "secondaryLabels"
-
-# pylint: disable-msg=R0903
-# Too few public methods (1/2): this is an interface
-class _PromoteMaps(xmllib.SerializableList):
-    tag = "promoteMaps"
-
-# pylint: disable-msg=R0903
-# Too few public methods (1/2): this is an interface
-class _Stage(xmllib.SlotBasedSerializableObject):
-    __slots__ = [ 'name', 'labelSuffix', 'promoteMaps' ]
-    tag = "stage"
-
-    def __init__(self, name = None, labelSuffix = None, promoteMaps = None):
-        xmllib.SlotBasedSerializableObject.__init__(self)
-        self.name = name
-        self.labelSuffix = labelSuffix
-        if not promoteMaps:
-            self.promoteMaps = None
-            return
-        self.promoteMaps = _PromoteMaps()
-        for ent in promoteMaps:
-            mapName, mapLabel = ent[:2]
-            self.promoteMaps.append(PromoteMap(mapName, mapLabel))
-
-    def getPromoteMaps(self):
-        if self.promoteMaps is None:
-            return []
-        return list(self.promoteMaps)
-
-class _TroveSpec(xmllib.SlotBasedSerializableObject):
-    __slots__ = ['troveName', 'label', 'version']
-
-    def __init__(self, troveName = None, label = None, version = None):
-        self.troveName = troveName
-        self.label = label
-        self.version = version
-
-    def getTroveTup(self, template=False):
-        """
-        Get a trovespec tuple for the search path or its template.
-
-        @param template: If C{True}, use the template path; otherwise
-            return the "pinned" path.
-        @type  template: C{bool}
-        @return: (name, version, flavor)
-        """
-        if template:
-            return (self.troveName, self.label, None)
-        else:
-            version = self.label
-            if self.version:
-                version += '/' + self.version
-            return (self.troveName, version, None)
-
-
-class _SearchPath(_TroveSpec):
-    __slots__ = ['troveName', 'label', 'version', 'isResolveTrove',
-                 'isGroupSearchPathTrove']
-    tag = "searchPath"
-
-    def __init__(self, troveName = None, label = None, version = None,
-                 isResolveTrove = True, isGroupSearchPathTrove = True):
-        _TroveSpec.__init__(self, troveName=troveName, label=label,
-                            version=version)
-        self.isResolveTrove = isResolveTrove
-        self.isGroupSearchPathTrove = isGroupSearchPathTrove
-
-class _FactorySource(_TroveSpec):
-    tag = "factorySource"
-
-class _Architecture(xmllib.SlotBasedSerializableObject):
-    __slots__ = [ 'name', 'displayName', 'flavor' ]
-    tag = "architecture"
-
-    def __init__(self, name, displayName, flavor):
-        xmllib.SlotBasedSerializableObject.__init__(self)
-        self.name = name
-        self.displayName = displayName
-        self.flavor = flavor
-
-class _FlavorSet(xmllib.SlotBasedSerializableObject):
-    __slots__ = [ 'name', 'displayName', 'flavor' ]
-    tag = "flavorSet"
-
-    def __init__(self, name, displayName, flavor):
-        self.name = name
-        self.displayName = displayName
-        self.flavor = flavor
-
-class _BuildTemplate(xmllib.SlotBasedSerializableObject):
-    __slots__ = [ 'name', 'displayName', 'architectureRef',
-            'containerTemplateRef', 'flavorSetRef']
-    tag = "buildTemplate"
-
-    def __init__(self, name, displayName, architectureRef,
-            containerTemplateRef, flavorSetRef = None):
-        self.name = name
-        self.displayName = displayName
-        self.architectureRef = architectureRef
-        self.containerTemplateRef = containerTemplateRef
-        self.flavorSetRef = flavorSetRef
-
-class Build(xmllib.SerializableObject):
-    __slots__ = [ 'name', 'image', 'stages', 'imageGroup', 'sourceGroup',
-                  'parentImageGroup', 'parentSourceGroup',
-                  'architectureRef', 'flavorSetRef', 'containerTemplateRef',
-                  'buildTemplateRef', 'flavor', '_proddef']
-    tag = "build"
-
-    def __init__(self, name = None, image = None, stages = None,
-                 imageGroup = None, sourceGroup = None, 
-                 parentImageGroup = None, parentSourceGroup = None,
-                 architectureRef = None, flavorSetRef = None,
-                 containerTemplateRef = None,
-                 buildTemplateRef = None, flavor = None,
-                 proddef = None, baseLabel = None):
-        xmllib.SlotBasedSerializableObject.__init__(self)
-        self.name = name
-        self.image = image
-        self.stages = stages or []
-        self.imageGroup = imageGroup
-        self.sourceGroup = sourceGroup
-        self.parentImageGroup = parentImageGroup
-        self.parentSourceGroup = parentSourceGroup
-        self.architectureRef = architectureRef
-        self.containerTemplateRef = containerTemplateRef
-        self.flavorSetRef = flavorSetRef
-        self._proddef = None
-        self.setProductDefinition(proddef)
-        self.flavor = flavor
-        self.buildTemplateRef = buildTemplateRef
-
-    def __eq__(self, build):
-        for key in self.__slots__:
-            if key == '_proddef':
-                # Ignore the weak ref
-                continue
-            if self.__getattribute__(key) != build.__getattribute__(key):
-                return False
-        return True
-
-    def __ne__(self, build):
-        return not self.__eq__(build)
-
-    def getBuildImageGroup(self):
-        if self.imageGroup is None:
-            return self.parentImageGroup
-        return self.imageGroup
-
-    def getBuildSourceGroup(self):
-        if self.sourceGroup:
-            return self.sourceGroup
-        elif self.parentSourceGroup:
-            return self.parentSourceGroup
-        else:
-            return None
-
-    def getBuildImage(self):
-        fields = {}
-        if self._proddef:
-            proddef = self._proddef()
-            tmpl = proddef.getContainerTemplate(self.containerTemplateRef, None)
-            if not tmpl and proddef.platform:
-                tmpl = proddef.getPlatformContainerTemplate( \
-                        self.containerTemplateRef)
-            if tmpl:
-                fields.update(tmpl.fields)
-                fields['containerFormat'] = tmpl.containerFormat
-
-        if self.image:
-            fields.update(self.image.fields)
-        return imageTypes.Image(fields)
-
-    def getBuildStages(self):
-        return list(self.stages)
-
-    def getBuildName(self):
-        return self.name
-
-    def getBuildBaseFlavor(self):
-        # Grab flavor from the referenced components
-        if self._proddef is None:
-            return ''
-        pd = self._proddef
-        if pd is not None:
-            pd = pd()
-        if pd is None:
-            return ''
-
-        # Grab base flavor from platform + product
-        flv = conaryDeps.parseFlavor(pd.getBaseFlavor())
-
-        # Dereference the flavorSetRef and architectureRef from
-        # buildTemplateRef if needed
-        flavorSetRef = self.flavorSetRef
-        architectureRef = self.architectureRef
-        buildTemplateRef = self.buildTemplateRef
-        if buildTemplateRef:
-            buildTemplate = pd.getBuildTemplate(buildTemplateRef, None)
-            if not buildTemplate:
-                buildTemplate = pd.getPlatformBuildTemplate(buildTemplateRef)
-            if not architectureRef:
-                architectureRef = buildTemplate.architectureRef
-            if not flavorSetRef:
-                flavorSetRef = buildTemplate.flavorSetRef
-        try:
-            if flavorSetRef:
-                methods = [ pd.getPlatformFlavorSet, pd.getFlavorSet ]
-                for meth in methods:
-                    obj = meth(flavorSetRef, None)
-                    if obj is None:
-                        continue
-                    nflv = conaryDeps.parseFlavor(obj.flavor)
-                    flv = conaryDeps.overrideFlavor(flv, nflv)
-            if architectureRef:
-                methods = [ pd.getPlatformArchitecture, pd.getArchitecture ]
-                for meth in methods:
-                    obj = meth(architectureRef, None)
-                    if obj is None:
-                        continue
-                    nflv = conaryDeps.parseFlavor(obj.flavor)
-                    flv = conaryDeps.overrideFlavor(flv, nflv)
-            if self.flavor:
-                nflv = conaryDeps.parseFlavor(self.flavor)
-                flv = conaryDeps.overrideFlavor(flv, nflv)
-        except RuntimeError, e:
-            raise ProductDefinitionError(str(e))
-        return str(flv)
-
-    def setProductDefinition(self, proddef):
-        self._proddef = None
-        if proddef:
-            self._proddef = weakref.ref(proddef)
-
-    def _getName(self):
-        return self.tag
-
-    def _getLocalNamespaces(self):
-        return {}
-
-    def _iterChildren(self):
-        if self.image is not None:
-            attrs = self.image._iterAttributes()
-            yield xmllib.NullNode(dict(attrs), name = 'image')
-        for stage in self.stages:
-            yield xmllib.NullNode(dict(ref=stage), name = 'stage')
-        if self.imageGroup is not None:
-            yield xmllib.StringNode(name = 'imageGroup').characters(
-                self.imageGroup)
-        if self.sourceGroup:
-            yield xmllib.StringNode(name = 'sourceGroup').characters(
-                self.sourceGroup)
-
-    def _iterAttributes(self):
-        for f in ['name', 'architectureRef', 'containerTemplateRef',
-                'flavorSetRef', 'flavor']:
-            attrVal = getattr(self, f)
-            if attrVal is not None:
-                yield (f, attrVal)
-#}
-
-class _BaseSerializableObject(xmllib.SerializableObject):
-    def _getName(self):
-        return self.tag
-
-    def _getLocalNamespaces(self):
-        return {}
-
-    def _iterAttributes(self):
-        for attr in self._attributes:
-            value = getattr(self, attr)
-            if value is not None:
-                yield (attr, value)
-
-class SecondaryLabel(_BaseSerializableObject):
-    __slots__ = [ 'name', 'label' ]
-    _attributes = [ 'name' ]
-
-    tag = 'secondaryLabel'
-
-    def __init__(self, name, label):
-        self.name = name
-        self.label = label
-
-    def getName(self):
-        return self.name
-
-    def getLabel(self):
-        return self.label
-
-    def _iterChildren(self):
-        return [ self.label ]
-
-class PromoteMap(_BaseSerializableObject):
-    __slots__ = [ 'name', 'label' ]
-    _attributes = __slots__
-
-    tag = 'promoteMap'
-
-    def __init__(self, mapName, mapLabel):
-        self.name = mapName
-        self.label = mapLabel
-
-    def getMapLabel(self):
-        return self.label
-
-    def getMapName(self):
-        return self.name
-
-    def _iterChildren(self):
-        return []
-
-class BaseXmlNode(xmllib.BaseNode):
-    def __init__(self, attributes = None, nsMap = None, name = None):
-        xmllib.BaseNode.__init__(self, attributes = attributes, nsMap = nsMap,
-                                 name = name)
-        self.defaultNamespace = self.getNamespaceMap().get(None)
-
-    def _makeAbsoluteName(self, name):
-        return "{%s}%s" % (self.defaultNamespace, name)
-
-    def _processSearchPaths(self, searchPaths):
-        sources = _SearchPaths()
-        for node in searchPaths:
-            isResolveTrove = node.getAttribute('isResolveTrove')
-            if isResolveTrove is not None:
-                isResolveTrove = xmllib.BooleanNode.fromString(isResolveTrove)
-            isGroupSearchPathTrove = node.getAttribute('isGroupSearchPathTrove')
-            if isGroupSearchPathTrove is not None:
-                isGroupSearchPathTrove = xmllib.BooleanNode.fromString(
-                                                    isGroupSearchPathTrove)
-            pyObj = _SearchPath(
-                troveName = node.getAttribute('troveName'),
-                label = node.getAttribute('label'),
-                version = node.getAttribute('version'),
-                isResolveTrove = isResolveTrove,
-                isGroupSearchPathTrove = isGroupSearchPathTrove)
-            sources.append(pyObj)
-        return sources
-
-    def _processFactorySources(self, factorySources):
-        sources = _FactorySources()
-        for node in factorySources:
-            pyObj = _FactorySource(
-                troveName = node.getAttribute('troveName'),
-                label = node.getAttribute('label'),
-                version = node.getAttribute('version'))
-            sources.append(pyObj)
-        return sources
-
-    def _processArchitectures(self, architectures):
-        return self._processNFCollection(architectures,
-            _Architectures, _Architecture)
-
-    def _processFlavorSets(self, flavorSets):
-        return self._processNFCollection(flavorSets, _FlavorSets, _FlavorSet)
-
-    def _processContainerTemplates(self, images):
-        containerTemplates = _ContainerTemplates()
-        for node in images:
-            pyObj = imageTypes.Image(node)
-            containerTemplates.append(pyObj)
-        return containerTemplates
-
-    def _processBuildTemplates(self, buildTemplates):
-        builds = _BuildTemplates()
-        for node in buildTemplates:
-            pyObj = _BuildTemplate(name = node.getAttribute('name'),
-                    displayName = node.getAttribute('displayName'),
-                    architectureRef = node.getAttribute('architectureRef'),
-                    containerTemplateRef = node.getAttribute('containerTemplateRef'),
-                    flavorSetRef = node.getAttribute('flavorSetRef'))
-            builds.append(pyObj)
-        return builds
-
-    def _processNFCollection(self, collection, ListClass, ItemClass):
-        collObj = ListClass()
-        for node in collection:
-            pyObj = ItemClass(
-                name = node.getAttribute('name'),
-                displayName = node.getAttribute('displayName'),
-                flavor = node.getAttribute('flavor'))
-            collObj.append(pyObj)
-        seen = set()
-        # purge duplicate entries. last one wins (it was added most recently)
-        for node in reversed(collObj):
-            name = node.name
-            if name in seen:
-                collObj.remove(node)
-            seen.add(name)
-        return collObj
-
-    def _addPlatform(self, node):
-        self.platform = PlatformDefinition()
-        self.platform.sourceTrove = node.getAttribute('sourceTrove')
-        useLatest = node.getAttribute('useLatest')
-        if useLatest is not None:
-            useLatest = xmllib.BooleanNode.fromString(useLatest)
-        self.platform.useLatest = useLatest
-        listNode = node.getChildren('searchPaths')
-        if listNode:
-            self.platform.searchPaths = self._processSearchPaths(
-                listNode[0].getChildren('searchPath'))
-        listNode = node.getChildren('factorySources')
-        if listNode:
-            self.platform.factorySources = self._processFactorySources(
-                listNode[0].getChildren('factorySource'))
-        listNode = node.getChildren('architectures')
-        if listNode:
-            self.platform.architectures = self._processArchitectures(
-                listNode[0].getChildren('architecture'))
-        flavorSets = node.getChildren('flavorSets')
-        if flavorSets:
-            self.platform.flavorSets = self._processFlavorSets(
-                    flavorSets[0].getChildren('flavorSet'))
-        containerTemplates = node.getChildren('containerTemplates')
-        if containerTemplates:
-            self.platform.containerTemplates = self._processContainerTemplates(\
-                    containerTemplates[0].getChildren('image'))
-        buildTemplates = node.getChildren('buildTemplates')
-        if buildTemplates:
-            self.platform.buildTemplates = self._processBuildTemplates(
-                    buildTemplates[0].getChildren('buildTemplate'))
-        baseFlavorChildren = node.getChildren('baseFlavor')
-        if baseFlavorChildren:
-            self.platform.baseFlavor = baseFlavorChildren[0].getText()
-        chList = node.getChildren('platformName')
-        if chList:
-            self.platform.platformName = chList[0]
-        chList = node.getChildren('platformVersionTrove')
-        if chList:
-            self.platform.platformVersionTrove = chList[0]
-        chList = node.getChildren('autoLoadRecipes')
-        if chList:
-            chList = chList[0].getChildren('autoLoadRecipe')
-            for child in chList:
-                troveName = child.getAttribute('troveName')
-                label = child.getAttribute('label')
-                self.platform.addAutoLoadRecipe(troveName, label)
-
-    def _getSchemaVersion(self):
-        nsName = self.getAttributeByNamespace('schemaLocation',
-                xmllib.DataBinder.xmlSchemaNamespace)
-        if not nsName:
-            return None
-        try:
-            nsName = os.path.basename(nsName).split()[-1]
-            prefix, nsName = nsName.split('-', 1)
-            if (prefix != 'rpd'):
-                raise InvalidSchemaVersionError(
-                    'Invalid schema prefix %s, expected rpd', prefix)
-            nsName, suffix = nsName.rsplit('.', 1)
-            if (suffix != 'xsd'):
-                raise InvalidSchemaVersionError(
-                    'Invalid schema suffix %s, expected xsd', suffix)
-            return nsName
-        except:
-            raise InvalidSchemaVersionError('Failed to parse schema version %s',
-                                       nsName)
+    def _initFields(self):
+        BasePlatform._initFields(self)
+        self._sourceTrove = None
 
 def _addPlatformDefaults(platform):
     platform.setBaseFlavor('~X, ~!alternatives, !bootstrap, ~builddocs, ~buildtests, !cross, ~desktop, ~!dom0, ~!domU, ~emacs, ~!gcj, ~gnome, ~gtk, ~ipv6, ~krb, ~ldap, ~nptl, pam, ~pcre, ~perl, ~!pie, ~python, ~readline, ~!sasl, ~!selinux, ~ssl, ~tcl, ~tk, ~!vmware, ~!xen, ~!xfce')
@@ -2466,16 +2103,16 @@
     platform.addArchitecture('x86_64', 'x86 (64-bit)',
             'is: x86(~i486,~i586,~i686,~cmov,~mmx,~sse,~sse2) x86_64')
 
-    platform.addContainerTemplate(imageTypes.Image( \
-            {"containerFormat": "amiImage",
+    platform.addContainerTemplate(platform.imageType("amiImage",
+            {
              "autoResolve": False,
              "baseFileName": "",
              "installLabelPath": "",
-             "amiHugeDiskMountPoint": False,
+             "amiHugeDiskMountpoint": False,
              "freespace": 1024,
              "swapSize": 1024}))
-    platform.addContainerTemplate(imageTypes.Image( \
-            {"containerFormat": "applianceIsoImage",
+    platform.addContainerTemplate(platform.imageType("applianceIsoImage",
+            {
              "autoResolve": False,
              "baseFileName": "",
              "installLabelPath": "",
@@ -2486,8 +2123,8 @@
              "maxIsoSize": None,
              "mediaTemplateTrove": "",
              "showMediaCheck": False}))
-    platform.addContainerTemplate(imageTypes.Image( \
-            {"containerFormat": "installableIsoImage",
+    platform.addContainerTemplate(platform.imageType("installableIsoImage",
+            {
              "autoResolve": False,
              "baseFileName": "",
              "installLabelPath": "",
@@ -2498,33 +2135,33 @@
              "maxIsoSize": None,
              "mediaTemplateTrove": "",
              "showMediaCheck": False}))
-    platform.addContainerTemplate(imageTypes.Image( \
-            {"containerFormat": "netBootImage",
+    platform.addContainerTemplate(platform.imageType("netBootImage",
+            {
              "autoResolve": False,
              "baseFileName": "",
              "installLabelPath": ""}))
-    platform.addContainerTemplate(imageTypes.Image( \
-            {"containerFormat": "rawFsImage",
+    platform.addContainerTemplate(platform.imageType("rawFsImage",
+            {
              "autoResolve": False,
              "baseFileName": "",
              "installLabelPath": "",
              "freespace": 1024,
              "swapSize": 512}))
-    platform.addContainerTemplate(imageTypes.Image( \
-            {"containerFormat": "rawHdImage",
+    platform.addContainerTemplate(platform.imageType("rawHdImage",
+            {
              "autoResolve": False,
              "baseFileName": "",
              "installLabelPath": "",
              "freespace": 1024,
              "swapSize": 512}))
-    platform.addContainerTemplate(imageTypes.Image( \
-            {"containerFormat": "tarballImage",
+    platform.addContainerTemplate(platform.imageType("tarballImage",
+            {
              "autoResolve": False,
              "baseFileName": "",
              "installLabelPath": "",
              "swapSize": "0"}))
-    platform.addContainerTemplate(imageTypes.Image( \
-            {"containerFormat": "updateIsoImage",
+    platform.addContainerTemplate(platform.imageType("updateIsoImage",
+            {
              "autoResolve": False,
              "baseFileName": "",
              "installLabelPath": "",
@@ -2535,24 +2172,24 @@
              "maxIsoSize": None,
              "mediaTemplateTrove": "",
              "showMediaCheck": False}))
-    platform.addContainerTemplate(imageTypes.Image( \
-            {"containerFormat": "vhdImage",
+    platform.addContainerTemplate(platform.imageType("vhdImage",
+            {
              "autoResolve": False,
              "baseFileName": "",
              "installLabelPath": "",
              "freespace": 1024,
              "swapSize": 512,
-             "vhdDisktype": "dynamic"}))
-    platform.addContainerTemplate(imageTypes.Image( \
-            {"containerFormat": "virtualIronImage",
+             "vhdDiskType": "dynamic"}))
+    platform.addContainerTemplate(platform.imageType("virtualIronImage",
+            {
              "autoResolve": False,
              "baseFileName": "",
              "installLabelPath": "",
              "freespace": 1024,
              "swapSize": 512,
-             "vhdDisktype": "dynamic"}))
-    platform.addContainerTemplate(imageTypes.Image( \
-            {"containerFormat": "vmwareImage",
+             "vhdDiskType": "dynamic"}))
+    platform.addContainerTemplate(platform.imageType("vmwareImage",
+            {
              "autoResolve": False,
              "baseFileName": "",
              "installLabelPath": "",
@@ -2562,8 +2199,8 @@
              "swapSize": 512,
              "vmMemory": 256,
              "vmSnapshots": False}))
-    platform.addContainerTemplate(imageTypes.Image( \
-            {"containerFormat": "vmwareEsxImage",
+    platform.addContainerTemplate(platform.imageType("vmwareEsxImage",
+            {
              "autoResolve": False,
              "baseFileName": "",
              "installLabelPath": "",
@@ -2571,8 +2208,8 @@
              "natNetworking": True,
              "swapSize": 512,
              "vmMemory": 256}))
-    platform.addContainerTemplate(imageTypes.Image( \
-            {"containerFormat": "xenOvaImage",
+    platform.addContainerTemplate(platform.imageType("xenOvaImage",
+            {
              "autoResolve": False,
              "baseFileName": "",
              "installLabelPath": "",
@@ -2661,515 +2298,333 @@
             containerTemplateRef="xenOvaImage",
             flavorSetRef="xen")
 
-class _ProductDefinition(BaseXmlNode):
-    def addChild(self, childNode):
-        chName = childNode.getAbsoluteName()
+def getMajorArch(flv):
+    from conary.deps import arch
+    if flv.members and conaryDeps.DEP_CLASS_IS in flv.members:
+        depClass = flv.members[conaryDeps.DEP_CLASS_IS]
+        return arch.getMajorArch(depClass.getDeps()).name
+    return None
 
-        if chName == self._makeAbsoluteName('productName'):
-            self.productName = childNode.getText()
+def _convertBuildTemplate(fromObj, proddef, build):
+    # we need to use all available information to get our
+    # inferences as right as we can. limit our arch and flavorSet
+    # guesses to those that are valid in the platform
+    legacyImageTypes = [ x.name for x in build._member_data_items
+        if x.name.endswith('Image') ]
+    vals = [ x for x in legacyImageTypes if getattr(build, x, None) ]
+    if vals:
+        containerTemplateRef = vals[0]
+    else:
+        containerTemplateRef = None
+
+    matchingTemplates = [x for x in proddef.platform.buildTemplates
+            if x.containerTemplateRef == containerTemplateRef ]
+
+    flavor = build.baseFlavor or build.flavor
+    if not flavor:
+        return (build.architectureRef, None, containerTemplateRef)
+
+    flavor = BaseDefinition.parseFlavor(flavor)
+    matchingArchRefs = set(x.architectureRef for x in matchingTemplates)
+    matchingFlavorSetRefs = set(x.flavorSetRef for x in matchingTemplates
+        if x.flavorSetRef)
+    arches = dict((x.name, BaseDefinition.parseFlavor(x.flavor))
+            for x in proddef.platform.architectures
+            if x.name in matchingArchRefs)
+    allFlavorSets = [ (x.name, BaseDefinition.parseFlavor(x.flavor))
+                for x in proddef.platform.flavorSets ]
+    flavorSets = dict((name, flv)
+            for (name, flv) in allFlavorSets
+            if name in matchingFlavorSetRefs)
+    if not flavorSets:
+        flavorSets = dict(allFlavorSets)
+
+    architectureRef = flavorSetRef = None
+    matchingArches = [ x for x in arches.iteritems()
+            if x[1].satisfies(flavor) and 
+                getMajorArch(x[1]) == getMajorArch(flavor) ]
+    if matchingArches:
+        architectureRef = max((x[1].score(flavor), x[0])
+                for x in matchingArches)[1]
+    else:
+        # do what we can to infer the proper arch. this will likely
+        # work for arches currently in the wild
+        depName = getMajorArch(flavor)
+        if depName in arches:
+            architectureRef = depName
+
+    matchingFlavorSets = [x for x in flavorSets.iteritems()
+            if flavor.satisfies(x[1])]
+    if matchingFlavorSets:
+        # strong Flavors is really not optimal, but historical
+        # proddefs used flavors that were too strong,
+        # leading to weird flavors matching over more logical ones
+        # if we just score
+        maxScore = max([flavor.toStrongFlavor().score( \
+                x[1].toStrongFlavor()) for x in matchingFlavorSets])
+        bestFlavors = [x for x in matchingFlavorSets if \
+            flavor.toStrongFlavor().score(x[1].toStrongFlavor()) \
+                == maxScore]
+        bestFlavorNames = set(x[0] for x in bestFlavors)
+        if 'generic' in bestFlavorNames:
+            # if generic made the list, it's very likely the right
+            # flavor to use
+            flavorSetRef = 'generic'
+        else:
+            flavorNames = bestFlavorNames
+            # Xen and AMI are identical on rPL 2, but only AMI will
+            # be present if it is an amiImage; thus xen is more
+            # dominant.
+            if 'ami' in flavorNames and 'xen' in flavorNames:
+                flavorSetRef = 'xen'
+            else:
+                flavorSetRef = bestFlavors[0][0]
+
+    # RBL-3886 do not preserve flavor during migration. it does
+    # more harm than good
+    return (architectureRef, flavorSetRef, containerTemplateRef)
+
+def _convertBuildTemplates(fromObj, proddef, newModule):
+    bdef = fromObj.get_buildDefinition()
+    if bdef is None:
+        return
+    bdef = bdef.get_build()
+    nbdef = proddef.getBuildDefinitions()
+
+    for build, nbuild in zip(bdef, nbdef):
+        ret = _convertBuildTemplate(fromObj, proddef, build)
+        architectureRef, flavorSetRef, containerTemplateRef = ret
+        nbuild.architectureRef = architectureRef
+        nbuild.flavorSetRef = flavorSetRef
+        nbuild.containerTemplateRef = containerTemplateRef
+
+def _mergeFlavors(*flavors):
+    ret = conaryDeps.parseFlavor('')
+    for flv in flavors:
+        if flv is None:
+            continue
+        flv = BaseDefinition.parseFlavor(flv)
+        ret = conaryDeps.overrideFlavor(ret, flv)
+    return str(ret)
+
+class MigrationManager(object):
+    __slots__ = [ '_version', '_path' ]
+    _transitions = {}
+    CurrentVersion = BaseDefinition.version
+
+    @classmethod
+    def register(cls, klass):
+        vals = cls._transitions.setdefault(klass.fromVersion, {})
+        vals = vals.setdefault(klass.toVersion, [])
+        vals.append(klass)
+
+    def __init__(self, version):
+        """Migration from the specified version"""
+        # Look for a way to get to the latest version
+        v = version
+        path = [ v ]
+        while v != self.CurrentVersion:
+            if v not in self._transitions:
+                raise RuntimeError("Unable to migrate")
+            v = self._transitions[v].keys()[0]
+            path.append(v)
+        self._version = version
+        self._path = path
+
+    def migrate(self, rootObj):
+        if self._version == self.CurrentVersion:
+            return rootObj
+        v = self._path.pop(0)
+        className = rootObj.__class__.__name__
+        while self._path:
+            nv = self._path.pop(0)
+            transitions = self._transitions[v][nv]
+            for MigrateClass in transitions:
+                module = BaseDefinition.loadModule(nv)
+                rootObj = MigrateClass().migrate(rootObj, module)
+                rootObj.version = nv
+            v = nv
+        return rootObj
+
+
+class BaseMigration(object):
+    fromVersion = None
+    toVersion = None
+
+    skipFields = set()
+    reinitFields = set()
+
+    def migrate(self, fromObj, newModule):
+        toObj = self.copyFrom(fromObj, newModule)
+        if fromObj.__class__.__name__ == 'platformDefinitionTypeSub':
+            method = self.migratePlatform
+        else:
+            method = self.migrateProduct
+        self.migrateCommon(fromObj, toObj, newModule)
+        method(fromObj, toObj, newModule)
+        return toObj
+
+    def migrateCommon(self, fromObj, toObj, newModule):
+        pass
+
+    def migratePlatform(self, fromObj, toObj, newModule):
+        pass
+
+    def migrateProduct(self, fromObj, toObj, newModule):
+        pass
+
+    @classmethod
+    def copyFrom(cls, fromObj, newModule):
+        objName = fromObj.__class__.__name__
+        if not hasattr(newModule, objName):
+            return None
+
+        toObj = getattr(newModule, fromObj.__class__.__name__)()
+        newMemberItems = set(x.name for x in toObj._member_data_items)
+        for field in fromObj._member_data_items:
+            fieldName = field.name
+            if fieldName not in newMemberItems:
+                # This field does not exist in the destination module, we'll
+                # have to handle it in a special way
+                continue
+            if fieldName in cls.skipFields:
+                continue
+            val = getattr(fromObj, fieldName)
+            if fieldName in cls.reinitFields:
+                if val is None:
+                    continue
+                val = getattr(newModule, val.__class__.__name__)()
+            elif isinstance(val, list):
+                if not val:
+                    # Empty list
+                    continue
+                # Lists should be homogenous at this point
+                if hasattr(val[0], '_member_data_items'):
+                    nval = [ cls.copyFrom(x, newModule) for x in val ]
+                    val = [ x for x in nval if x is not None ]
+            elif hasattr(val, '_member_data_items'):
+                val = cls.copyFrom(val, newModule)
+                if val is None:
+                    # This field does not exist in the new schema
+                    continue
+            # Add the new object
+            setattr(toObj, fieldName, val)
+        return toObj
+
+
+class Migrate_10_11(BaseMigration):
+    fromVersion = '1.0'
+    toVersion = '1.1'
+
+    def migrateCommon(self, fromObj, toObj, newModule):
+        self._migrateSearchPaths(fromObj, toObj, newModule)
+
+    def _migrateSearchPaths(self, fromObj, toObj, newModule):
+        searchPaths = fromObj.get_upstreamSources()
+        if not searchPaths:
             return
+        searchPaths = searchPaths.get_upstreamSource()
+        if not searchPaths:
+            return
+        newSearchPaths = newModule.searchPathListTypeSub()
+        for sp in searchPaths:
+            nsp = newModule.searchPathTypeSub(troveName = sp.troveName,
+                label = sp.label)
+            newSearchPaths.add_searchPath(nsp)
+        toObj.set_searchPaths(newSearchPaths)
 
-        if chName == self._makeAbsoluteName('productShortname'):
-            self.productShortname = childNode.getText()
+MigrationManager.register(Migrate_10_11)
+
+
+class Migrate_11_12(BaseMigration):
+    fromVersion = '1.1'
+    toVersion = '1.2'
+
+    def migrateProduct(self, fromObj, toObj, newModule):
+        self._migratePlatformSource(fromObj, toObj, newModule)
+        self._migrateBuildFlavor(fromObj, toObj, newModule)
+
+    def _migratePlatformSource(self, fromObj, toObj, newModule):
+        platform = fromObj.get_platform()
+        if not platform:
             return
+        sourceTrove = platform.get_source()
+        toObj.get_platform().set_sourceTrove(sourceTrove)
 
-        if chName == self._makeAbsoluteName('productDescription'):
-            self.productDescription = childNode.getText()
+    def _migrateBuildFlavor(self, fromObj, toObj, newModule):
+        builds = toObj.get_buildDefinition()
+        if not builds:
             return
+        builds = builds.get_build()
+        for build in builds:
+            build.flavor = build.baseFlavor
+            build.baseFlavor = None
 
-        if chName == self._makeAbsoluteName('productVersion'):
-            self.productVersion = childNode.getText()
+MigrationManager.register(Migrate_11_12)
+
+
+class Migrate_12_13(BaseMigration):
+    fromVersion = '1.2'
+    toVersion = '1.3'
+
+MigrationManager.register(Migrate_12_13)
+
+
+class Migrate_13_20(BaseMigration):
+    fromVersion = '1.3'
+    toVersion = '2.0'
+
+    def migrateProduct(self, fromObj, toObj, newModule):
+        pd = ProductDefinition()
+        pd._rootObj = toObj
+        plat = pd.platform = Platform()
+        # XXX this seems fragile. We need to set the version, so xmlFactory
+        # loads the proper module
+        plat.version = self.toVersion
+
+        platobj = toObj.get_platform()
+        plat._rootObj = platobj
+        if platobj is None:
+            platobj = newModule.platformTypeSub()
+            toObj.set_platform(platobj)
+            plat._rootObj = platobj
+        pd._addPlatformDefaults()
+
+        _convertBuildTemplates(fromObj, pd, newModule)
+
+MigrationManager.register(Migrate_13_20)
+
+
+class Migrate_20_30(BaseMigration):
+    fromVersion = '2.0'
+    toVersion = '3.0'
+
+MigrationManager.register(Migrate_20_30)
+
+class Migrate_30_31(BaseMigration):
+    fromVersion = '3.0'
+    toVersion = '3.1'
+
+    def _migrateContainerTemplates(self, fromObj, toObj):
+        containerTemplates = fromObj.get_containerTemplates()
+        if not containerTemplates:
             return
+        cTemplFrom = containerTemplates.get_image()
+        cTemplTo = toObj.get_containerTemplates().get_image()
+        for oldImg, newImg in zip(cTemplFrom, cTemplTo):
+            obsoleteVal = oldImg.amiHugeDiskMountPoint
+            if obsoleteVal and not newImg.amiHugeDiskMountpoint:
+                newImg.amiHugeDiskMountpoint = obsoleteVal
+            obsoleteVal = oldImg.vhdDisktype
+            if obsoleteVal and not newImg.vhdDiskType:
+                newImg.vhdDiskType = obsoleteVal
 
-        if chName == self._makeAbsoluteName('productVersionDescription'):
-            self.productVersionDescription = childNode.getText()
-            return
+    def migrateCommon(self, fromObj, toObj, newModule):
+        self._migrateContainerTemplates(fromObj, toObj)
 
-        if chName == self._makeAbsoluteName('conaryRepositoryHostname'):
-            self.conaryRepositoryHostname = childNode.getText()
-            return
+    def migrateProduct(self, fromObj, toObj, newModule):
+        platobj = fromObj.get_platform()
+        if platobj:
+            self._migrateContainerTemplates(platobj, toObj.get_platform())
 
-        if chName == self._makeAbsoluteName('conaryNamespace'):
-            self.conaryNamespace = childNode.getText()
-            return
-
-        if chName == self._makeAbsoluteName('imageGroup'):
-            self.imageGroup = childNode.getText()
-            return
-
-        if chName == self._makeAbsoluteName('sourceGroup'):
-            self.sourceGroup = childNode.getText()
-            return
-
-        if chName == self._makeAbsoluteName('baseLabel'):
-            self.baseLabel = childNode.getText()
-            return
-
-        if chName == self._makeAbsoluteName('baseFlavor'):
-            self.baseFlavor = childNode.getText()
-            return
-
-        if chName == self._makeAbsoluteName('stages'):
-            children = childNode.getChildren('stage')
-            self._addStages(children)
-            return
-
-        if chName == self._makeAbsoluteName('searchPaths'):
-            children = childNode.getChildren('searchPath')
-            self._addSearchPaths(children)
-            return
-
-        if chName == self._makeAbsoluteName('factorySources'):
-            children = childNode.getChildren('factorySource')
-            self._addFactorySources(children)
-            return
-
-        if chName == self._makeAbsoluteName('architectures'):
-            children = childNode.getChildren('architecture')
-            self._addArchitectures(children)
-            return
-
-        if chName == self._makeAbsoluteName('flavorSets'):
-            children = childNode.getChildren('flavorSet')
-            self._addFlavorSets(children)
-            return
-
-        if chName == self._makeAbsoluteName('containerTemplates'):
-            children = childNode.getChildren('image')
-            self._addContainerTemplates(children)
-            return
-
-        if chName == self._makeAbsoluteName('buildTemplates'):
-            children = childNode.getChildren('buildTemplate')
-            self._addBuildTemplates(children)
-            return
-
-        if chName == self._makeAbsoluteName('buildDefinition'):
-            children = childNode.getChildren('build')
-            self._addBuildDefinition(children)
-            return
-
-        if chName == self._makeAbsoluteName('platform'):
-            self._addPlatform(childNode)
-            return
-
-        if chName == self._makeAbsoluteName('secondaryLabels'):
-            self._addSecondaryLabels(childNode)
-            return
-
-    def _addStages(self, stagesNodes):
-        stages = self.stages = _Stages()
-        for node in stagesNodes:
-            # XXX getAttribute should be getAbsoluteAttribute
-            pyObj = _Stage(name = node.getAttribute('name'),
-                           labelSuffix = node.getAttribute('labelSuffix'))
-            stages.append(pyObj)
-            self._addPromoteMaps(pyObj, node)
-
-    def _addPromoteMaps(self, stage, node):
-        """
-        Add the promote maps from the node to this stage
-        """
-        stage.promoteMaps = None
-        promoteMaps = _PromoteMaps()
-        nodeList = node.getChildren('promoteMaps')
-        if not nodeList:
-            return
-        for pmNode in nodeList[0].getChildren('promoteMap'):
-            mapName = pmNode.getAttribute('name')
-            mapLabel = pmNode.getAttribute('label')
-            promoteMaps.append(PromoteMap(mapName, mapLabel))
-        stage.promoteMaps = promoteMaps
-
-
-    def _addSearchPaths(self, searchPaths):
-        self.searchPaths = self._processSearchPaths(searchPaths)
-
-    def _addFactorySources(self, factorySources):
-        self.factorySources = self._processFactorySources(factorySources)
-
-    def _addArchitectures(self, architectures):
-        self.architectures = self._processArchitectures(architectures)
-
-    def _addFlavorSets(self, flavorSets):
-        self.flavorSets = self._processFlavorSets(flavorSets)
-
-    def _addContainerTemplates(self, containerTemplates):
-        self.containerTemplates = \
-                self._processContainerTemplates(containerTemplates)
-
-    def _addBuildTemplates(self, buildTemplates):
-        self.buildTemplates = self._processBuildTemplates(buildTemplates)
-
-    def _addBuildDefinition_1_x(self, buildNodes):
-        dispatcher = xmllib.NodeDispatcher(self._nsMap)
-        dispatcher.registerClasses(imageTypes, imageTypes.Image)
-
-        builds = self.buildDefinition = _BuildDefinition()
-        for node in buildNodes:
-            imgType = None
-            subNode = None
-            legacyImageTypes = ["amiImage", "applianceIsoImage",
-            "installableIsoImage", "liveIsoImage", "netbootImage",
-            "rawFsImage", "rawHdImage", "tarballImage", "updateIsoImage",
-            "vhdImage", "virtualIronImage", "vmwareImage",
-            "vmwareEsxImage", "xenOvaImage", ]
-
-            containerTemplateRef = None
-            for legacyImageType in legacyImageTypes:
-                imgTypes = node.getChildren(legacyImageType)
-                if imgTypes:
-                    # don't assign the containerFormat to the image, it's an
-                    # attribute of the buildDefinition
-                    imgType = imageTypes.Image(imgTypes[0])
-                    containerTemplateRef = legacyImageType
-                    break
-
-            for subNode in node.iterChildren():
-                if not isinstance(subNode, xmllib.BaseNode):
-                    continue
-            if subNode is None:
-                # Build node had no children
-                continue
-            imageGroup = node.getChildren('imageGroup')
-            if imageGroup:
-                imageGroup = imageGroup[0].getText()
-            else:
-                imageGroup = None
-            baseFlavor = node.getAttribute('baseFlavor')
-            flavor = node.getAttribute('flavor')
-
-            flavor = baseFlavor or flavor
-            if flavor is not None:
-                flavor = str(flavor)
-
-            pyobj = Build(
-                name = node.getAttribute('name'),
-                image = imgType,
-                stages = [ x.getAttribute('ref')
-                           for x in node.getChildren('stage') ],
-                imageGroup = imageGroup,
-                parentImageGroup = self.imageGroup,
-                architectureRef = node.getAttribute('architectureRef'),
-                containerTemplateRef = containerTemplateRef,
-                flavor = flavor,
-                )
-            builds.append(pyobj)
-
-    def _addBuildDefinition(self, buildNodes):
-        # support pre-2.0 schemas
-        schemaVersion = self._getSchemaVersion()
-        if schemaVersion in ('1.0', '1.1', '1.2', '1.3'):
-            return self._addBuildDefinition_1_x(buildNodes)
-
-        dispatcher = xmllib.NodeDispatcher(self._nsMap)
-        dispatcher.registerClasses(imageTypes, imageTypes.Image)
-
-        builds = self.buildDefinition = _BuildDefinition()
-        for node in buildNodes:
-            image = node.getChildren('image')
-            image = image and imageTypes.Image(image[0]) or None
-            imageGroup = node.getChildren('imageGroup')
-            if imageGroup:
-                imageGroup = imageGroup[0].getText()
-            else:
-                imageGroup = None
-            sourceGroup = node.getChildren('sourceGroup')
-            if sourceGroup:
-                sourceGroup = sourceGroup[0].getText()
-            else:
-                sourceGroup = None
-            if hasattr(self, 'sourceGroup'):
-                parentSourceGroup = self.sourceGroup
-            else:
-                parentSourceGroup = None
-            pyobj = Build(
-                name = node.getAttribute('name'),
-                image = image,
-                stages = [ x.getAttribute('ref')
-                           for x in node.getChildren('stage') ],
-                imageGroup = imageGroup,
-                parentImageGroup = self.imageGroup,
-                sourceGroup = sourceGroup,
-                parentSourceGroup = parentSourceGroup, 
-                architectureRef = node.getAttribute('architectureRef'),
-                flavorSetRef = node.getAttribute('flavorSetRef'),
-                containerTemplateRef = \
-                        node.getAttribute('containerTemplateRef'),
-                flavor = node.getAttribute('flavor'),
-                buildTemplateRef = node.getAttribute('buildTemplateRef')
-                )
-            builds.append(pyobj)
-
-    def _addSecondaryLabels(self, childNode):
-        self.secondaryLabels = _SecondaryLabels()
-        for node in childNode.getChildren('secondaryLabel'):
-            name = node.getAttribute('name')
-            label = node.getText()
-            self.secondaryLabels.append(SecondaryLabel(name, label))
-        return self
-
-    def finalize(self):
-        if self._getSchemaVersion() in ('1.0', '1.1', '1.2', '1.3'):
-            if not hasattr(self, 'platform'):
-                # we're going to need a platform to store references to the
-                # containerTemplates, architectures and flavorSets
-                self._addPlatform(_PlatformDefinition())
-
-        if hasattr(self, 'platform'):
-            # if the XML didn't have one of the 4 attributes here, then
-            # it simply won't be present, hence the usage of hasattr
-            found = False
-            for attr in ('containerTemplates', 'architectures',
-                    'buildTemplates', 'flavorSets'):
-                if hasattr(self, attr) and getattr(self, attr):
-                    found = True
-                    break
-            if not found and \
-                    not self.platform.containerTemplates and \
-                    not self.platform.architectures and \
-                    not self.platform.buildTemplates and \
-                    not self.platform.flavorSets:
-                        self.baseFlavor = None
-                        _addPlatformDefaults(self.platform)
-
-        if self._getSchemaVersion() in ('1.0', '1.1', '1.2', '1.3'):
-            for build in self.buildDefinition:
-                if not build.flavor:
-                    continue
-                flavor = conaryDeps.parseFlavor(build.flavor)
-
-                # we need to use all available information to get our
-                # inferences as right as we can. limit our arch and flavorSet
-                # guesses to those that are valid in the platform
-                matchingTemplates = [x for x in self.platform.buildTemplates \
-                        if x.containerTemplateRef == build.containerTemplateRef]
-                arches = dict([(x.name, conaryDeps.parseFlavor(x.flavor)) \
-                        for x in self.platform.architectures if x.name in \
-                        [y.architectureRef for y in matchingTemplates]])
-                flavorSets = dict([(x.name, conaryDeps.parseFlavor(x.flavor)) \
-                        for x in self.platform.flavorSets if x.name in \
-                        [y.flavorSetRef for y in matchingTemplates]])
-                if not flavorSets:
-                    flavorSets = dict([(x.name, conaryDeps.parseFlavor(x.flavor)) \
-                            for x in self.platform.flavorSets])
-
-                def getMajorArch(flv):
-                    from conary.deps import arch
-                    if flv.members and conaryDeps.DEP_CLASS_IS in flv.members:
-                        depClass = flv.members[conaryDeps.DEP_CLASS_IS]
-                        return arch.getMajorArch(depClass.getDeps()).name
-                    return None
-
-                architectureRef = flavorSetRef = None
-                matchingArches = [x for x in arches.iteritems() \
-                        if x[1].satisfies(flavor) and \
-                        getMajorArch(x[1]) == getMajorArch(flavor)]
-                if matchingArches:
-                    architectureRef = max([(x[1].score(flavor), x[0]) \
-                            for x in matchingArches])[1]
-                else:
-                    # do what we can to infer the proper arch. this will likely
-                    # work for arches currently in the wild
-                    depName = getMajorArch(flavor)
-                    if depName in arches:
-                        architectureRef = depName
-
-                matchingFlavorSets = [x for x in flavorSets.iteritems() \
-                        if flavor.satisfies(x[1])]
-                if matchingFlavorSets:
-                    # strong Flavors is really not optimal, but historical
-                    # proddefs used flavors that were too strong,
-                    # leading to weird flavors matching over more logical ones
-                    # if we just score
-                    maxScore = max([flavor.toStrongFlavor().score( \
-                            x[1].toStrongFlavor()) for x in matchingFlavorSets])
-                    bestFlavors = [x for x in matchingFlavorSets if \
-                        flavor.toStrongFlavor().score(x[1].toStrongFlavor()) \
-                            == maxScore]
-                    if 'generic' in [x[0] for x in bestFlavors]:
-                        # if generic made the list, it's very likely the right
-                        # flavor to use
-                        flavorSetRef = 'generic'
-                    else:
-                        flavorNames = [x[0] for x in bestFlavors]
-                        # Xen and AMI are identical on rPL 2, but only AMI will
-                        # be present if it is an amiImage; thus xen is more
-                        # dominant.
-                        if 'ami' in flavorNames and 'xen' in flavorNames:
-                            flavorSetRef = 'xen'
-                        else:
-                            flavorSetRef = bestFlavors[0][0]
-
-                # RBL-3886 do not preserve flavor during migration. it does
-                # more harm than good
-                build.flavor = None
-                build.architectureRef = architectureRef
-                build.flavorSetRef = flavorSetRef
-
-        return self
-
-class _PlatformDefinition(BaseXmlNode):
-    def finalize(self):
-        self._addPlatform(self)
-        if not self.platform.containerTemplates and \
-                not self.platform.architectures and \
-                not self.platform.buildTemplates and \
-                not self.platform.flavorSets:
-                    _addPlatformDefaults(self.platform)
-        return self
-
-class _PlatformSerialization(xmllib.BaseNode):
-    def __init__(self, attrs, namespaces, platform, name='platform'):
-        # Some attributes don't make sense for a productDefinition node
-        if name == 'platform':
-            if platform.useLatest:
-                attrs['useLatest'] = True
-            if platform.sourceTrove:
-                attrs['sourceTrove'] = platform.sourceTrove
-        self.searchPaths = platform.searchPaths
-        self.factorySources = platform.factorySources
-        self.architectures = platform.architectures
-
-        self.flavorSets = platform.flavorSets
-        self.containerTemplates = platform.containerTemplates
-        self.buildTemplates = platform.buildTemplates
-        self.baseFlavor = xmllib.StringNode(name = 'baseFlavor').characters(platform.baseFlavor)
-        self.platformName = platform.platformName
-        self.platformVersionTrove = platform.platformVersionTrove
-        self.autoLoadRecipes = platform.autoLoadRecipes
-        xmllib.BaseNode.__init__(self, attrs, namespaces, name=name)
-
-    def iterChildren(self):
-        ret = []
-        if self.platformName is not None:
-            ret.append(self.platformName)
-        if self.platformVersionTrove is not None:
-            ret.append(self.platformVersionTrove)
-        ret.append(self.baseFlavor)
-        if self.searchPaths:
-            ret.append(self.searchPaths)
-        if self.factorySources:
-            ret.append(self.factorySources)
-        if self.autoLoadRecipes:
-            ret.append(self.autoLoadRecipes)
-        if self.architectures:
-            ret.append(self.architectures)
-        if self.flavorSets:
-            ret.append(self.flavorSets)
-        if self.containerTemplates:
-            ret.append(self.containerTemplates)
-        if self.buildTemplates:
-            ret.append(self.buildTemplates)
-        return ret
-
-class _ProductDefinitionSerialization(xmllib.BaseNode):
-    def __init__(self, name, attrs, namespaces, prodDef):
-        xmllib.BaseNode.__init__(self, attrs, namespaces, name = name)
-        self.stages = prodDef.getStages()
-        self.searchPaths = prodDef.searchPaths
-        self.factorySources = prodDef.factorySources
-        self.architectures = prodDef.architectures
-        self.flavorSets = prodDef.flavorSets
-        self.containerTemplates = prodDef.containerTemplates
-        self.buildTemplates = prodDef.buildTemplates
-        self.buildDefinition = prodDef.getBuildDefinitions()
-        if prodDef.platform:
-            self.platform = _PlatformSerialization({}, namespaces,
-                prodDef.platform)
-        else:
-            self.platform = None
-
-        self.productName = xmllib.StringNode(name = 'productName')
-        productName = prodDef.getProductName()
-        if productName:
-            self.productName.characters(productName)
-
-        self.productShortname = \
-                xmllib.StringNode(name = 'productShortname')
-        productShortname = prodDef.getProductShortname()
-        if productShortname:
-            self.productShortname.characters(productShortname)
-
-        self.productDescription = \
-                xmllib.StringNode(name = 'productDescription')
-        productDescription = prodDef.getProductDescription()
-        if productDescription:
-            self.productDescription.characters(productDescription)
-
-        self.productVersion = \
-                xmllib.StringNode(name = 'productVersion')
-        productVersion  = prodDef.getProductVersion()
-        if productVersion:
-            self.productVersion.characters(productVersion)
-
-        self.productVersionDescription = \
-                xmllib.StringNode(name = 'productVersionDescription')
-        productVersionDescription = prodDef.getProductVersionDescription()
-        if productVersionDescription:
-            self.productVersionDescription.characters(productVersionDescription)
-
-        self.conaryRepositoryHostname = \
-                xmllib.StringNode(name = 'conaryRepositoryHostname')
-        conaryRepositoryHostname = prodDef.getConaryRepositoryHostname()
-        if conaryRepositoryHostname:
-            self.conaryRepositoryHostname.characters(conaryRepositoryHostname)
-
-        self.conaryNamespace = xmllib.StringNode(name = 'conaryNamespace')
-        conaryNamespace = prodDef.getConaryNamespace()
-        if conaryNamespace:
-            self.conaryNamespace.characters(conaryNamespace)
-
-        self.imageGroup = xmllib.StringNode(name = 'imageGroup')
-        imageGroup = prodDef.getImageGroup()
-        if imageGroup:
-            self.imageGroup.characters(imageGroup)
-
-        self.sourceGroup = None
-        sourceGroup = prodDef.getSourceGroup()
-        if sourceGroup:
-            self.sourceGroup = xmllib.StringNode(name = 'sourceGroup')
-            self.sourceGroup.characters(sourceGroup)
-
-        self.baseLabel = None
-        baseLabel = prodDef.getBaseLabel()
-        if baseLabel:
-            self.baseLabel = xmllib.StringNode(name = 'baseLabel')
-            self.baseLabel.characters(baseLabel)
-
-        self.baseFlavor = xmllib.StringNode(name = 'baseFlavor')
-        self.baseFlavor.characters(prodDef.baseFlavor)
-
-        self.secondaryLabels = prodDef.getSecondaryLabels() or None
-
-    def iterChildren(self):
-        ret =  [ self.productName,
-                 self.productShortname,
-                 self.productDescription,
-                 self.productVersion,
-                 self.productVersionDescription,
-                 self.conaryRepositoryHostname,
-                 self.conaryNamespace,
-                 self.imageGroup,
-                 self.sourceGroup,
-                 self.baseLabel,
-                 self.baseFlavor,
-                 self.stages, ]
-        if self.searchPaths:
-            ret.append(self.searchPaths)
-        if len(self.factorySources):
-            ret.append(self.factorySources)
-        if self.secondaryLabels:
-            ret.append(self.secondaryLabels)
-        if self.architectures:
-            ret.append(self.architectures)
-        if self.flavorSets:
-            ret.append(self.flavorSets)
-        if self.containerTemplates:
-            ret.append(self.containerTemplates)
-        if self.buildTemplates:
-            ret.append(self.buildTemplates)
-        ret.append(self.buildDefinition)
-        if self.platform:
-            ret.append(self.platform)
-        return ret
+MigrationManager.register(Migrate_30_31)
diff --git a/rpath_proddef/gends_user_methods.py b/rpath_proddef/gends_user_methods.py
new file mode 100644
--- /dev/null
+++ b/rpath_proddef/gends_user_methods.py
@@ -0,0 +1,215 @@
+#!/usr/bin/env python
+# -*- mode: pymode; coding: latin1; -*-
+
+import sys
+import re
+
+#
+# You must include the following class definition at the top of
+#   your method specification file.
+#
+class MethodSpec(object):
+    def __init__(self, name='', source='', class_names='',
+            class_names_compiled=None):
+        """MethodSpec -- A specification of a method.
+        Member variables:
+            name -- The method name
+            source -- The source code for the method.  Must be
+                indented to fit in a class definition.
+            class_names -- A regular expression that must match the
+                class names in which the method is to be inserted.
+            class_names_compiled -- The compiled class names.
+                generateDS.py will do this compile for you.
+        """
+        self.name = name
+        self.source = source
+        if class_names is None:
+            self.class_names = ('.*', )
+        else:
+            self.class_names = class_names
+        if class_names_compiled is None:
+            self.class_names_compiled = re.compile(self.class_names)
+        else:
+            self.class_names_compiled = class_names_compiled
+    def get_name(self):
+        return self.name
+    def set_name(self, name):
+        self.name = name
+    def get_source(self):
+        return self.source
+    def set_source(self, source):
+        self.source = source
+    def get_class_names(self):
+        return self.class_names
+    def set_class_names(self, class_names):
+        self.class_names = class_names
+        self.class_names_compiled = re.compile(class_names)
+    def get_class_names_compiled(self):
+        return self.class_names_compiled
+    def set_class_names_compiled(self, class_names_compiled):
+        self.class_names_compiled = class_names_compiled
+    def match_name(self, class_name):
+        """Match against the name of the class currently being generated.
+        If this method returns True, the method will be inserted in
+          the generated class.
+        """
+        if self.class_names_compiled.search(class_name):
+            return True
+        else:
+            return False
+    def get_interpolated_source(self, values_dict):
+        """Get the method source code, interpolating values from values_dict
+        into it.  The source returned by this method is inserted into
+        the generated class.
+        """
+        source = self.source % values_dict
+        return source
+    def show(self):
+        print 'specification:'
+        print '    name: %s' % (self.name, )
+        print self.source
+        print '    class_names: %s' % (self.class_names, )
+        print '    names pat  : %s' % (self.class_names_compiled.pattern, )
+
+#
+# Provide one or more method specification such as the following.
+# Notes:
+# - Each generated class contains a class variable _member_data_items.
+#   This variable contains a list of instances of class _MemberSpec.
+#   See the definition of class _MemberSpec near the top of the
+#   generated superclass file and also section "User Methods" in
+#   the documentation, as well as the examples below.
+
+#
+# Replace the following method specifications with your own.
+
+#
+# Sample method specification #1
+#
+getTroveTup = MethodSpec(name='getTroveTup',
+    source='''
+    def getTroveTup(self, template=False):
+        """
+        Get a trovespec tuple for the search path or its template.
+
+        @param template: If C{True}, use the template path; otherwise
+            return the "pinned" path.
+        @type  template: C{bool}
+        @return: (name, version, flavor)
+        """
+        if template:
+            return (self.troveName, self.label, None)
+        else:
+            version = self.label
+            if self.version:
+                version += '/' + self.version
+            return (self.troveName, version, None)
+''',
+    class_names = r'^searchPathType$',
+    )
+
+imageTypeGetFields = MethodSpec(name='getTroveTup',
+    source='''
+    def getFields(self):
+        fieldNames = [ x.get_name()
+            for x in self._member_data_items ]
+        fields = ((x, getattr(self, x)) for x in fieldNames)
+        fields = dict((x, y) for (x, y) in fields if y is not None)
+        return fields
+
+    fields = property(getFields)
+''',
+    class_names = r'^imageType$',
+    )
+
+buildTypeMethods = MethodSpec('buildTypeMethods',
+    source = '''
+    def getBuildStages(self):
+        return [ x.get_ref() for x in self.get_stage() ]
+
+    def getBuildImageGroup(self):
+        val = self.get_imageGroup()
+        if val is None:
+            return self.parentImageGroup
+        return val
+
+    def getBuildSourceGroup(self):
+        val = self.get_sourceGroup()
+        if val is None:
+            return self.parentSourceGroup
+        return val
+
+    def getBuildBaseFlavor(self):
+        return self.buildFlavor
+
+    def getBuildImage(self):
+        fields = self.containerTemplateFields.copy()
+        if self.image:
+            fields.update(self.image.getFields())
+        return imageType.subclass.factory(**fields)
+
+    getBuildName = get_name
+''',
+    class_names = r'^buildType$',
+    )
+
+secondaryLabelMethods = MethodSpec('secondaryLabelMethods',
+    source = '''
+    getName = get_name
+    getLabel = getValueOf_
+    setLabel = setValueOf_
+    label = property(getLabel, setLabel)
+''',
+    class_names = r'^secondaryLabel$',
+    )
+
+stageTypeMethods = MethodSpec('stageTypeMethods',
+    source = '''
+    def getPromoteMaps(self):
+        vals = self.get_promoteMaps()
+        if vals is None:
+            return []
+        return vals.get_promoteMap()
+''',
+    class_names = r'^stageType$',
+    )
+
+promoteMapTypeMethods = MethodSpec('promoteMapTypeMethods',
+    source = '''
+    getMapName = get_name
+    getMapLabel = get_label
+''',
+    class_names = r'^promoteMapType$',
+    )
+
+nameLabelTypeMethods = MethodSpec('nameLabelTypeMethods',
+    source = '''
+    getTroveName = get_troveName
+    getLabel = get_label
+''',
+    class_names = r'^nameLabelType$',
+    )
+
+
+METHOD_SPECS = (
+    getTroveTup,
+    buildTypeMethods,
+    imageTypeGetFields,
+    secondaryLabelMethods,
+    stageTypeMethods,
+    promoteMapTypeMethods,
+    nameLabelTypeMethods,
+)
+
+def test():
+    for spec in METHOD_SPECS:
+        spec.show()
+
+def main():
+    test()
+
+
+if __name__ == '__main__':
+    main()
+
+
diff --git a/rpath_proddef/generatedssuper.py b/rpath_proddef/generatedssuper.py
new file mode 100644
--- /dev/null
+++ b/rpath_proddef/generatedssuper.py
@@ -0,0 +1,34 @@
+class GeneratedsSuper(object):
+    def format_string(self, input_data, input_name=''):
+        return input_data
+    def format_integer(self, input_data, input_name=''):
+        return '%d' % input_data
+    def format_float(self, input_data, input_name=''):
+        return '%f' % input_data
+    def format_double(self, input_data, input_name=''):
+        return '%e' % input_data
+    def format_boolean(self, input_data, input_name=''):
+        return '%s' % input_data
+
+    def __eq__(self, obj):
+        if not isinstance(obj, self.__class__):
+            return False
+        if len(self._member_data_items) != len(obj._member_data_items):
+            return False
+        fields = (x.name for x in self._member_data_items)
+        for field in fields:
+            objL = getattr(self, field)
+            objR = getattr(obj, field)
+            if isinstance(objL, list):
+                if not isinstance(objR, list) or len(objL) != len(objR):
+                    return False
+                for (L, R) in zip(objL, objR):
+                    if L != R:
+                        return False
+                continue
+            if objL != objR:
+                return False
+        return True
+
+    def __ne__(self, obj):
+        return not self.__eq__(obj)
diff --git a/rpath_proddef/imageTypes.py b/rpath_proddef/imageTypes.py
--- a/rpath_proddef/imageTypes.py
+++ b/rpath_proddef/imageTypes.py
@@ -13,109 +13,13 @@
 #
 """
 Image types.
+Kept for compatibility, you should use the imageType factory from a
+ProductDefinition or PlatformDefinition object.
 """
 
-import rpath_xmllib as xmllib
-from rpath_proddef import _xmlConstants
+import api1
 
-#{ Image Type Class
-class Image(xmllib.SerializableObject):
-    _defaultNamespace = _xmlConstants.defaultNamespaceList[0]
-    tag = "image"
-
-    _attributes = {
-        'containerFormat'           : (str, ),
-
-        'amiHugeDiskMountpoint'     : (str, ),
-        'anacondaCustomTrove'       : (str, ),
-        'anacondaTemplatesTrove'    : (str, ),
-        'autoResolve'               : (bool, ),
-        'baseFileName'              : (str, ),
-        'betaNag'                   : (bool, ),
-        'bugsUrl'                   : (str, ),
-        'buildOVF10'               : (bool, ),
-        'diskAdapter'               : (str, ),
-        'freespace'                 : (int, ),
-        'installLabelPath'          : (str, ),
-        'maxIsoSize'                : (int, ),
-        'mediaTemplateTrove'        : (str, ),
-        'name'                      : (str, ),
-        'natNetworking'             : (bool, ),
-        'showMediaCheck'            : (bool, ),
-        'swapSize'                  : (int, ),
-        'unionfs'                   : (bool, ),
-        'vhdDiskType'               : (str, ),
-        'vmMemory'                  : (int, ),
-        'vmSnapshots'               : (bool, ),
-        'zisofs'                    : (bool, ),
-    }
-
-    def __init__(self, node = None):
-        """
-        Initialize an ImageType object, either from a Node, or from a
-        dictionary of fields.
-        """
-
-        self.fields = flds = {}
-        self.containerFormat = None
-
-        if node is None:
-            return
-
-        if isinstance(node, dict):
-            getAttribute = node.get
-            self.containerFormat = node.get('containerFormat')
-        else:
-            getAttribute = node.getAttribute
-            self.containerFormat = getAttribute('containerFormat')
-
-        for attrName, values in sorted(self._attributes.items()):
-            # containerFormat isn't a build option, but may appear in the
-            # fields due to API nuances
-            if attrName == 'containerFormat':
-                continue
-            attrType = values[0]
-            val = getAttribute(attrName)
-            if val is None:
-                continue
-            if attrType == bool:
-                val = xmllib.BooleanNode.fromString(val)
-            elif attrType == int:
-                val = int(val)
-            flds[attrName] = val
-
-    def __eq__(self, obj):
-        if not hasattr(obj, 'containerFormat'):
-            return False
-        if self.containerFormat != obj.containerFormat:
-            return False
-        if not hasattr(obj, 'fields'):
-            return False
-        if self.fields != obj.fields:
-            return False
-        return True
-
-    def __ne__(self, obj):
-        return not self.__eq__(obj)
-
-    @classmethod
-    def getTag(kls):
-        return kls.tag
-
-    def _getName(self):
-        return self.tag
-
-    def _getLocalNamespaces(self):
-        return {}
-
-    def _iterAttributes(self):
-        if self.containerFormat is not None:
-            yield ('containerFormat', self.containerFormat)
-        for key, val in self.fields.iteritems():
-            yield key, val
-
-    def _iterChildren(self):
-        return []
-#}
-
-
+module = api1.BaseDefinition.loadModule(api1.BaseDefinition.version)
+class Image(module.imageTypeSub):
+    def __init__(self, fields):
+        module.imageTypeSub.__init__(self, **fields)
diff --git a/rpath_proddef/xml_1_0/__init__.py b/rpath_proddef/xml_1_0/__init__.py
new file mode 100644
diff --git a/rpath_proddef/xml_1_0/generatedssuper.py b/rpath_proddef/xml_1_0/generatedssuper.py
new file mode 100644
--- /dev/null
+++ b/rpath_proddef/xml_1_0/generatedssuper.py
@@ -0,0 +1,34 @@
+class GeneratedsSuper(object):
+    def format_string(self, input_data, input_name=''):
+        return input_data
+    def format_integer(self, input_data, input_name=''):
+        return '%d' % input_data
+    def format_float(self, input_data, input_name=''):
+        return '%f' % input_data
+    def format_double(self, input_data, input_name=''):
+        return '%e' % input_data
+    def format_boolean(self, input_data, input_name=''):
+        return '%s' % input_data
+
+    def __eq__(self, obj):
+        if not isinstance(obj, self.__class__):
+            return False
+        if len(self._member_data_items) != len(obj._member_data_items):
+            return False
+        fields = (x.name for x in self._member_data_items)
+        for field in fields:
+            objL = getattr(self, field)
+            objR = getattr(obj, field)
+            if isinstance(objL, list):
+                if not isinstance(objR, list) or len(objL) != len(objR):
+                    return False
+                for (L, R) in zip(objL, objR):
+                    if L != R:
+                        return False
+                continue
+            if objL != objR:
+                return False
+        return True
+
+    def __ne__(self, obj):
+        return not self.__eq__(obj)
diff --git a/rpath_proddef/xml_1_0/subs.py b/rpath_proddef/xml_1_0/subs.py
new file mode 100644
--- /dev/null
+++ b/rpath_proddef/xml_1_0/subs.py
@@ -0,0 +1,316 @@
+#!/usr/bin/env python
+
+#
+# Generated  by generateDS.py version 1.18c.
+#
+
+import sys
+from string import lower as str_lower
+from xml.dom import minidom
+from xml.sax import handler, make_parser
+
+import supers as supermod
+
+#
+# Globals
+#
+
+ExternalEncoding = 'utf-8'
+
+#
+# Data representation classes
+#
+
+class stageTypeSub(supermod.stageType):
+    def __init__(self, labelSuffix=None, name=None, valueOf_=''):
+        supermod.stageType.__init__(self, labelSuffix, name, valueOf_)
+supermod.stageType.subclass = stageTypeSub
+# end class stageTypeSub
+
+
+class stageListTypeSub(supermod.stageListType):
+    def __init__(self, stage=None):
+        supermod.stageListType.__init__(self, stage)
+supermod.stageListType.subclass = stageListTypeSub
+# end class stageListTypeSub
+
+
+class upstreamSourceTypeSub(supermod.upstreamSourceType):
+    def __init__(self, troveName=None, label=None, valueOf_=''):
+        supermod.upstreamSourceType.__init__(self, troveName, label, valueOf_)
+supermod.upstreamSourceType.subclass = upstreamSourceTypeSub
+# end class upstreamSourceTypeSub
+
+
+class upstreamSourceListTypeSub(supermod.upstreamSourceListType):
+    def __init__(self, upstreamSource=None):
+        supermod.upstreamSourceListType.__init__(self, upstreamSource)
+supermod.upstreamSourceListType.subclass = upstreamSourceListTypeSub
+# end class upstreamSourceListTypeSub
+
+
+class factorySourceListTypeSub(supermod.factorySourceListType):
+    def __init__(self, factorySource=None):
+        supermod.factorySourceListType.__init__(self, factorySource)
+supermod.factorySourceListType.subclass = factorySourceListTypeSub
+# end class factorySourceListTypeSub
+
+
+class amiImageTypeSub(supermod.amiImageType):
+    def __init__(self, autoResolve=None, freespace=None, name=None, baseFileName=None, installLabelPath=None, amiHugeDiskMountpoint=None, valueOf_=''):
+        supermod.amiImageType.__init__(self, autoResolve, freespace, name, baseFileName, installLabelPath, amiHugeDiskMountpoint, valueOf_)
+supermod.amiImageType.subclass = amiImageTypeSub
+# end class amiImageTypeSub
+
+
+class applianceIsoImageTypeSub(supermod.applianceIsoImageType):
+    def __init__(self, maxIsoSize=None, autoResolve=None, bugsUrl=None, name=None, anacondaCustomTrove=None, betaNag=None, mediaTemplateTrove=None, installLabelPath=None, anacondaTemplatesTrove=None, baseFileName=None, showMediaCheck=None, valueOf_=''):
+        supermod.applianceIsoImageType.__init__(self, maxIsoSize, autoResolve, bugsUrl, name, anacondaCustomTrove, betaNag, mediaTemplateTrove, installLabelPath, anacondaTemplatesTrove, baseFileName, showMediaCheck, valueOf_)
+supermod.applianceIsoImageType.subclass = applianceIsoImageTypeSub
+# end class applianceIsoImageTypeSub
+
+
+class installableIsoImageTypeSub(supermod.installableIsoImageType):
+    def __init__(self, maxIsoSize=None, autoResolve=None, bugsUrl=None, name=None, anacondaCustomTrove=None, betaNag=None, mediaTemplateTrove=None, installLabelPath=None, anacondaTemplatesTrove=None, baseFileName=None, showMediaCheck=None, valueOf_=''):
+        supermod.installableIsoImageType.__init__(self, maxIsoSize, autoResolve, bugsUrl, name, anacondaCustomTrove, betaNag, mediaTemplateTrove, installLabelPath, anacondaTemplatesTrove, baseFileName, showMediaCheck, valueOf_)
+supermod.installableIsoImageType.subclass = installableIsoImageTypeSub
+# end class installableIsoImageTypeSub
+
+
+class liveIsoImageTypeSub(supermod.liveIsoImageType):
+    def __init__(self, autoResolve=None, name=None, zisofs=None, baseFileName=None, unionfs=None, installLabelPath=None, valueOf_=''):
+        supermod.liveIsoImageType.__init__(self, autoResolve, name, zisofs, baseFileName, unionfs, installLabelPath, valueOf_)
+supermod.liveIsoImageType.subclass = liveIsoImageTypeSub
+# end class liveIsoImageTypeSub
+
+
+class netbootImageTypeSub(supermod.netbootImageType):
+    def __init__(self, autoResolve=None, baseFileName=None, installLabelPath=None, name=None, valueOf_=''):
+        supermod.netbootImageType.__init__(self, autoResolve, baseFileName, installLabelPath, name, valueOf_)
+supermod.netbootImageType.subclass = netbootImageTypeSub
+# end class netbootImageTypeSub
+
+
+class rawFsImageTypeSub(supermod.rawFsImageType):
+    def __init__(self, autoResolve=None, freespace=None, name=None, swapSize=None, baseFileName=None, installLabelPath=None, valueOf_=''):
+        supermod.rawFsImageType.__init__(self, autoResolve, freespace, name, swapSize, baseFileName, installLabelPath, valueOf_)
+supermod.rawFsImageType.subclass = rawFsImageTypeSub
+# end class rawFsImageTypeSub
+
+
+class rawHdImageTypeSub(supermod.rawHdImageType):
+    def __init__(self, autoResolve=None, freespace=None, name=None, swapSize=None, baseFileName=None, installLabelPath=None, valueOf_=''):
+        supermod.rawHdImageType.__init__(self, autoResolve, freespace, name, swapSize, baseFileName, installLabelPath, valueOf_)
+supermod.rawHdImageType.subclass = rawHdImageTypeSub
+# end class rawHdImageTypeSub
+
+
+class tarballImageTypeSub(supermod.tarballImageType):
+    def __init__(self, autoResolve=None, baseFileName=None, installLabelPath=None, name=None, swapSize=None, valueOf_=''):
+        supermod.tarballImageType.__init__(self, autoResolve, baseFileName, installLabelPath, name, swapSize, valueOf_)
+supermod.tarballImageType.subclass = tarballImageTypeSub
+# end class tarballImageTypeSub
+
+
+class updateIsoImageTypeSub(supermod.updateIsoImageType):
+    def __init__(self, mediaTemplateTrove=None, baseFileName=None, valueOf_=''):
+        supermod.updateIsoImageType.__init__(self, mediaTemplateTrove, baseFileName, valueOf_)
+supermod.updateIsoImageType.subclass = updateIsoImageTypeSub
+# end class updateIsoImageTypeSub
+
+
+class vhdImageTypeSub(supermod.vhdImageType):
+    def __init__(self, autoResolve=None, freespace=None, name=None, vhdDiskType=None, swapSize=None, baseFileName=None, installLabelPath=None, valueOf_=''):
+        supermod.vhdImageType.__init__(self, autoResolve, freespace, name, vhdDiskType, swapSize, baseFileName, installLabelPath, valueOf_)
+supermod.vhdImageType.subclass = vhdImageTypeSub
+# end class vhdImageTypeSub
+
+
+class virtualIronImageTypeSub(supermod.virtualIronImageType):
+    def __init__(self, autoResolve=None, freespace=None, name=None, vhdDiskType=None, swapSize=None, baseFileName=None, installLabelPath=None, valueOf_=''):
+        supermod.virtualIronImageType.__init__(self, autoResolve, freespace, name, vhdDiskType, swapSize, baseFileName, installLabelPath, valueOf_)
+supermod.virtualIronImageType.subclass = virtualIronImageTypeSub
+# end class virtualIronImageTypeSub
+
+
+class vmwareEsxImageTypeSub(supermod.vmwareEsxImageType):
+    def __init__(self, autoResolve=None, freespace=None, name=None, natNetworking=None, vmMemory=None, swapSize=None, installLabelPath=None, baseFileName=None, valueOf_=''):
+        supermod.vmwareEsxImageType.__init__(self, autoResolve, freespace, name, natNetworking, vmMemory, swapSize, installLabelPath, baseFileName, valueOf_)
+supermod.vmwareEsxImageType.subclass = vmwareEsxImageTypeSub
+# end class vmwareEsxImageTypeSub
+
+
+class vmwareImageTypeSub(supermod.vmwareImageType):
+    def __init__(self, autoResolve=None, freespace=None, name=None, natNetworking=None, vmMemory=None, swapSize=None, diskAdapter=None, installLabelPath=None, baseFileName=None, vmSnapshots=None, valueOf_=''):
+        supermod.vmwareImageType.__init__(self, autoResolve, freespace, name, natNetworking, vmMemory, swapSize, diskAdapter, installLabelPath, baseFileName, vmSnapshots, valueOf_)
+supermod.vmwareImageType.subclass = vmwareImageTypeSub
+# end class vmwareImageTypeSub
+
+
+class xenOvaImageTypeSub(supermod.xenOvaImageType):
+    def __init__(self, autoResolve=None, freespace=None, name=None, vmMemory=None, swapSize=None, baseFileName=None, installLabelPath=None, valueOf_=''):
+        supermod.xenOvaImageType.__init__(self, autoResolve, freespace, name, vmMemory, swapSize, baseFileName, installLabelPath, valueOf_)
+supermod.xenOvaImageType.subclass = xenOvaImageTypeSub
+# end class xenOvaImageTypeSub
+
+
+class buildDefinitionTypeSub(supermod.buildDefinitionType):
+    def __init__(self, build_=None):
+        supermod.buildDefinitionType.__init__(self, build_)
+supermod.buildDefinitionType.subclass = buildDefinitionTypeSub
+# end class buildDefinitionTypeSub
+
+
+class buildTypeSub(supermod.buildType):
+    def __init__(self, baseFlavor=None, name=None, amiImage=None, applianceIsoImage=None, installableIsoImage=None, liveIsoImage=None, netbootImage=None, rawFsImage=None, rawHdImage=None, tarballImage=None, updateIsoImage=None, vhdImage=None, virtualIronImage=None, vmwareImage=None, vmwareEsxImage=None, xenOvaImage=None, stage=None, imageGroup=None):
+        supermod.buildType.__init__(self, baseFlavor, name, amiImage, applianceIsoImage, installableIsoImage, liveIsoImage, netbootImage, rawFsImage, rawHdImage, tarballImage, updateIsoImage, vhdImage, virtualIronImage, vmwareImage, vmwareEsxImage, xenOvaImage, stage, imageGroup)
+supermod.buildType.subclass = buildTypeSub
+# end class buildTypeSub
+
+
+class stageSub(supermod.stage):
+    def __init__(self, ref=None, valueOf_=''):
+        supermod.stage.__init__(self, ref, valueOf_)
+supermod.stage.subclass = stageSub
+# end class stageSub
+
+
+class productDefinitionSub(supermod.productDefinition):
+    def __init__(self, version=None, productName=None, productShortname=None, productDescription=None, productVersion=None, productVersionDescription=None, conaryRepositoryHostname=None, conaryNamespace=None, imageGroup=None, baseFlavor=None, stages=None, upstreamSources=None, factorySources=None, buildDefinition=None):
+        supermod.productDefinition.__init__(self, version, productName, productShortname, productDescription, productVersion, productVersionDescription, conaryRepositoryHostname, conaryNamespace, imageGroup, baseFlavor, stages, upstreamSources, factorySources, buildDefinition)
+supermod.productDefinition.subclass = productDefinitionSub
+# end class productDefinitionSub
+
+
+
+#
+# SAX handler used to determine the top level element.
+#
+class SaxSelectorHandler(handler.ContentHandler):
+    def __init__(self):
+        self.topElementName = None
+    def getTopElementName(self):
+        return self.topElementName
+    def startElement(self, name, attrs):
+        self.topElementName = name
+        raise StopIteration
+
+
+def parseSelect(inFileName):
+    infile = file(inFileName, 'r')
+    topElementName = None
+    parser = make_parser()
+    documentHandler = SaxSelectorHandler()
+    parser.setContentHandler(documentHandler)
+    try:
+        try:
+            parser.parse(infile)
+        except StopIteration:
+            topElementName = documentHandler.getTopElementName()
+        if topElementName is None:
+            raise RuntimeError, 'no top level element'
+        topElementName = topElementName.replace('-', '_').replace(':', '_')
+        if topElementName not in supermod.__dict__:
+            raise RuntimeError, 'no class for top element: %s' % topElementName
+        topElement = supermod.__dict__[topElementName]
+        infile.seek(0)
+        doc = minidom.parse(infile)
+    finally:
+        infile.close()
+    rootNode = doc.childNodes[0]
+    rootObj = topElement.factory()
+    rootObj.build(rootNode)
+    # Enable Python to collect the space used by the DOM.
+    doc = None
+##     sys.stdout.write('<?xml version="1.0" ?>\n')
+##     rootObj.export(sys.stdout, 0)
+    return rootObj
+
+
+def saxParse(inFileName):
+    parser = make_parser()
+    documentHandler = supermod.Sax_stageTypeHandler()
+    parser.setDocumentHandler(documentHandler)
+    parser.parse('file:%s' % inFileName)
+    rootObj = documentHandler.getRoot()
+    #sys.stdout.write('<?xml version="1.0" ?>\n')
+    #rootObj.export(sys.stdout, 0)
+    return rootObj
+
+
+def saxParseString(inString):
+    parser = make_parser()
+    documentHandler = supermod.SaxContentHandler()
+    parser.setDocumentHandler(documentHandler)
+    parser.feed(inString)
+    parser.close()
+    rootObj = documentHandler.getRoot()
+    #sys.stdout.write('<?xml version="1.0" ?>\n')
+    #rootObj.export(sys.stdout, 0)
+    return rootObj
+
+
+def parse(inFilename):
+    doc = minidom.parse(inFilename)
+    rootNode = doc.documentElement
+    rootObj = supermod.stageType.factory()
+    rootObj.build(rootNode)
+    # Enable Python to collect the space used by the DOM.
+    doc = None
+##     sys.stdout.write('<?xml version="1.0" ?>\n')
+##     rootObj.export(sys.stdout, 0, name_="stageType",
+##         namespacedef_='')
+    doc = None
+    return rootObj
+
+
+def parseString(inString):
+    doc = minidom.parseString(inString)
+    rootNode = doc.documentElement
+    rootObj = supermod.stageType.factory()
+    rootObj.build(rootNode)
+    # Enable Python to collect the space used by the DOM.
+    doc = None
+##     sys.stdout.write('<?xml version="1.0" ?>\n')
+##     rootObj.export(sys.stdout, 0, name_="stageType",
+##         namespacedef_='')
+    return rootObj
+
+
+def parseLiteral(inFilename):
+    doc = minidom.parse(inFilename)
+    rootNode = doc.documentElement
+    rootObj = supermod.stageType.factory()
+    rootObj.build(rootNode)
+    # Enable Python to collect the space used by the DOM.
+    doc = None
+##     sys.stdout.write('from supers import *\n\n')
+##     sys.stdout.write('rootObj = stageType(\n')
+##     rootObj.exportLiteral(sys.stdout, 0, name_="stageType")
+##     sys.stdout.write(')\n')
+    return rootObj
+
+
+USAGE_TEXT = """
+Usage: python ???.py <infilename>
+"""
+
+def usage():
+    print USAGE_TEXT
+    sys.exit(1)
+
+
+def main():
+    args = sys.argv[1:]
+    if len(args) != 1:
+        usage()
+    infilename = args[0]
+    root = parse(infilename)
+
+
+if __name__ == '__main__':
+    main()
+    #import pdb
+    #pdb.run('main()')
+
+
diff --git a/rpath_proddef/xml_1_0/supers.py b/rpath_proddef/xml_1_0/supers.py
new file mode 100644
--- /dev/null
+++ b/rpath_proddef/xml_1_0/supers.py
@@ -0,0 +1,3709 @@
+#!/usr/bin/env python
+
+#
+# Generated  by generateDS.py version 1.18c.
+#
+
+import sys
+import getopt
+from string import lower as str_lower
+from xml.dom import minidom
+from xml.dom import Node
+
+#
+# User methods
+#
+# Calls to the methods in these classes are generated by generateDS.py.
+# You can replace these methods by re-implementing the following class
+#   in a module named generatedssuper.py.
+
+try:
+    from generatedssuper import GeneratedsSuper
+except ImportError, exp:
+
+    class GeneratedsSuper:
+        def format_string(self, input_data, input_name=''):
+            return input_data
+        def format_integer(self, input_data, input_name=''):
+            return '%d' % input_data
+        def format_float(self, input_data, input_name=''):
+            return '%f' % input_data
+        def format_double(self, input_data, input_name=''):
+            return '%e' % input_data
+        def format_boolean(self, input_data, input_name=''):
+            return '%s' % input_data
+
+
+#
+# If you have installed IPython you can uncomment and use the following.
+# IPython is available from http://ipython.scipy.org/.
+#
+
+## from IPython.Shell import IPShellEmbed
+## args = ''
+## ipshell = IPShellEmbed(args,
+##     banner = 'Dropping into IPython',
+##     exit_msg = 'Leaving Interpreter, back to program.')
+
+# Then use the following line where and when you want to drop into the
+# IPython shell:
+#    ipshell('<some message> -- Entering ipshell.\nHit Ctrl-D to exit')
+
+#
+# Globals
+#
+
+ExternalEncoding = 'utf-8'
+
+#
+# Support/utility functions.
+#
+
+def showIndent(outfile, level):
+    for idx in range(level):
+        outfile.write('    ')
+
+def quote_xml(inStr):
+    s1 = (isinstance(inStr, basestring) and inStr or
+          '%s' % inStr)
+    s1 = s1.replace('&', '&amp;')
+    s1 = s1.replace('<', '&lt;')
+    s1 = s1.replace('>', '&gt;')
+    return s1
+
+def quote_attrib(inStr):
+    s1 = (isinstance(inStr, basestring) and inStr or
+          '%s' % inStr)
+    s1 = s1.replace('&', '&amp;')
+    s1 = s1.replace('<', '&lt;')
+    s1 = s1.replace('>', '&gt;')
+    if '"' in s1:
+        if "'" in s1:
+            s1 = '"%s"' % s1.replace('"', "&quot;")
+        else:
+            s1 = "'%s'" % s1
+    else:
+        s1 = '"%s"' % s1
+    return s1
+
+def quote_python(inStr):
+    s1 = inStr
+    if s1.find("'") == -1:
+        if s1.find('\n') == -1:
+            return "'%s'" % s1
+        else:
+            return "'''%s'''" % s1
+    else:
+        if s1.find('"') != -1:
+            s1 = s1.replace('"', '\\"')
+        if s1.find('\n') == -1:
+            return '"%s"' % s1
+        else:
+            return '"""%s"""' % s1
+
+
+class MixedContainer:
+    # Constants for category:
+    CategoryNone = 0
+    CategoryText = 1
+    CategorySimple = 2
+    CategoryComplex = 3
+    # Constants for content_type:
+    TypeNone = 0
+    TypeText = 1
+    TypeString = 2
+    TypeInteger = 3
+    TypeFloat = 4
+    TypeDecimal = 5
+    TypeDouble = 6
+    TypeBoolean = 7
+    def __init__(self, category, content_type, name, value):
+        self.category = category
+        self.content_type = content_type
+        self.name = name
+        self.value = value
+    def getCategory(self):
+        return self.category
+    def getContenttype(self, content_type):
+        return self.content_type
+    def getValue(self):
+        return self.value
+    def getName(self):
+        return self.name
+    def export(self, outfile, level, name, namespace):
+        if self.category == MixedContainer.CategoryText:
+            outfile.write(self.value)
+        elif self.category == MixedContainer.CategorySimple:
+            self.exportSimple(outfile, level, name)
+        else:    # category == MixedContainer.CategoryComplex
+            self.value.export(outfile, level, namespace,name)
+    def exportSimple(self, outfile, level, name):
+        if self.content_type == MixedContainer.TypeString:
+            outfile.write('<%s>%s</%s>' % (self.name, self.value, self.name))
+        elif self.content_type == MixedContainer.TypeInteger or \
+                self.content_type == MixedContainer.TypeBoolean:
+            outfile.write('<%s>%d</%s>' % (self.name, self.value, self.name))
+        elif self.content_type == MixedContainer.TypeFloat or \
+                self.content_type == MixedContainer.TypeDecimal:
+            outfile.write('<%s>%f</%s>' % (self.name, self.value, self.name))
+        elif self.content_type == MixedContainer.TypeDouble:
+            outfile.write('<%s>%g</%s>' % (self.name, self.value, self.name))
+    def exportLiteral(self, outfile, level, name):
+        if self.category == MixedContainer.CategoryText:
+            showIndent(outfile, level)
+            outfile.write('MixedContainer(%d, %d, "%s", "%s"),\n' % \
+                (self.category, self.content_type, self.name, self.value))
+        elif self.category == MixedContainer.CategorySimple:
+            showIndent(outfile, level)
+            outfile.write('MixedContainer(%d, %d, "%s", "%s"),\n' % \
+                (self.category, self.content_type, self.name, self.value))
+        else:    # category == MixedContainer.CategoryComplex
+            showIndent(outfile, level)
+            outfile.write('MixedContainer(%d, %d, "%s",\n' % \
+                (self.category, self.content_type, self.name,))
+            self.value.exportLiteral(outfile, level + 1)
+            showIndent(outfile, level)
+            outfile.write(')\n')
+
+
+class _MemberSpec(object):
+    def __init__(self, name='', data_type='', container=0):
+        self.name = name
+        self.data_type = data_type
+        self.container = container
+    def set_name(self, name): self.name = name
+    def get_name(self): return self.name
+    def set_data_type(self, data_type): self.data_type = data_type
+    def get_data_type(self): return self.data_type
+    def set_container(self, container): self.container = container
+    def get_container(self): return self.container
+
+def _cast(typ, value):
+    if typ is None or value is None:
+        return value
+    return typ(value)
+
+#
+# Data representation classes.
+#
+
+class stageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('labelSuffix', 'xsd:string', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, labelSuffix=None, name=None, valueOf_=''):
+        self.labelSuffix = _cast(None, labelSuffix)
+        self.name = _cast(None, name)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if stageType.subclass:
+            return stageType.subclass(*args_, **kwargs_)
+        else:
+            return stageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_labelSuffix(self): return self.labelSuffix
+    def set_labelSuffix(self, labelSuffix): self.labelSuffix = labelSuffix
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='stageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='stageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='stageType'):
+        outfile.write(' labelSuffix=%s' % (self.format_string(quote_attrib(self.labelSuffix).encode(ExternalEncoding), input_name='labelSuffix'), ))
+        outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='stageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='stageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.labelSuffix is not None:
+            showIndent(outfile, level)
+            outfile.write('labelSuffix = %s,\n' % (self.labelSuffix,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('labelSuffix'):
+            self.labelSuffix = attrs.get('labelSuffix').value
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+
+    def getPromoteMaps(self):
+        vals = self.get_promoteMaps()
+        if vals is None:
+            return []
+        return vals.get_promoteMap()
+# end class stageType
+
+
+class stageListType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('stage', 'stageType', 1),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, stage=None):
+        if stage is None:
+            self.stage = []
+        else:
+            self.stage = stage
+    def factory(*args_, **kwargs_):
+        if stageListType.subclass:
+            return stageListType.subclass(*args_, **kwargs_)
+        else:
+            return stageListType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_stage(self): return self.stage
+    def set_stage(self, stage): self.stage = stage
+    def add_stage(self, value): self.stage.append(value)
+    def insert_stage(self, index, value): self.stage[index] = value
+    def export(self, outfile, level, namespace_='rpd:', name_='stageListType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='stageListType')
+        if self.hasContent_():
+            outfile.write('>\n')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            showIndent(outfile, level)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='stageListType'):
+        pass
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='stageListType'):
+        for stage_ in self.stage:
+            stage_.export(outfile, level, namespace_, name_='stage')
+    def hasContent_(self):
+        if (
+            self.stage
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='stageListType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        pass
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('stage=[\n')
+        level += 1
+        for stage in self.stage:
+            showIndent(outfile, level)
+            outfile.write('model_.stage(\n')
+            stage.exportLiteral(outfile, level, name_='stage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        level -= 1
+        showIndent(outfile, level)
+        outfile.write('],\n')
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        pass
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'stage':
+            obj_ = stageType.factory()
+            obj_.build(child_)
+            self.stage.append(obj_)
+# end class stageListType
+
+
+class upstreamSourceType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('troveName', 'xsd:string', 0),
+        _MemberSpec('label', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, troveName=None, label=None, valueOf_=''):
+        self.troveName = _cast(None, troveName)
+        self.label = _cast(None, label)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if upstreamSourceType.subclass:
+            return upstreamSourceType.subclass(*args_, **kwargs_)
+        else:
+            return upstreamSourceType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_troveName(self): return self.troveName
+    def set_troveName(self, troveName): self.troveName = troveName
+    def get_label(self): return self.label
+    def set_label(self, label): self.label = label
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='upstreamSourceType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='upstreamSourceType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='upstreamSourceType'):
+        if self.troveName is not None:
+            outfile.write(' troveName=%s' % (self.format_string(quote_attrib(self.troveName).encode(ExternalEncoding), input_name='troveName'), ))
+        if self.label is not None:
+            outfile.write(' label=%s' % (self.format_string(quote_attrib(self.label).encode(ExternalEncoding), input_name='label'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='upstreamSourceType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='upstreamSourceType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.troveName is not None:
+            showIndent(outfile, level)
+            outfile.write('troveName = %s,\n' % (self.troveName,))
+        if self.label is not None:
+            showIndent(outfile, level)
+            outfile.write('label = %s,\n' % (self.label,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('troveName'):
+            self.troveName = attrs.get('troveName').value
+        if attrs.get('label'):
+            self.label = attrs.get('label').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class upstreamSourceType
+
+
+class upstreamSourceListType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('upstreamSource', 'upstreamSourceType', 1),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, upstreamSource=None):
+        if upstreamSource is None:
+            self.upstreamSource = []
+        else:
+            self.upstreamSource = upstreamSource
+    def factory(*args_, **kwargs_):
+        if upstreamSourceListType.subclass:
+            return upstreamSourceListType.subclass(*args_, **kwargs_)
+        else:
+            return upstreamSourceListType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_upstreamSource(self): return self.upstreamSource
+    def set_upstreamSource(self, upstreamSource): self.upstreamSource = upstreamSource
+    def add_upstreamSource(self, value): self.upstreamSource.append(value)
+    def insert_upstreamSource(self, index, value): self.upstreamSource[index] = value
+    def export(self, outfile, level, namespace_='rpd:', name_='upstreamSourceListType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='upstreamSourceListType')
+        if self.hasContent_():
+            outfile.write('>\n')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            showIndent(outfile, level)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='upstreamSourceListType'):
+        pass
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='upstreamSourceListType'):
+        for upstreamSource_ in self.upstreamSource:
+            upstreamSource_.export(outfile, level, namespace_, name_='upstreamSource')
+    def hasContent_(self):
+        if (
+            self.upstreamSource
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='upstreamSourceListType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        pass
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('upstreamSource=[\n')
+        level += 1
+        for upstreamSource in self.upstreamSource:
+            showIndent(outfile, level)
+            outfile.write('model_.upstreamSource(\n')
+            upstreamSource.exportLiteral(outfile, level, name_='upstreamSource')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        level -= 1
+        showIndent(outfile, level)
+        outfile.write('],\n')
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        pass
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'upstreamSource':
+            obj_ = upstreamSourceType.factory()
+            obj_.build(child_)
+            self.upstreamSource.append(obj_)
+# end class upstreamSourceListType
+
+
+class factorySourceListType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('factorySource', 'upstreamSourceType', 1),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, factorySource=None):
+        if factorySource is None:
+            self.factorySource = []
+        else:
+            self.factorySource = factorySource
+    def factory(*args_, **kwargs_):
+        if factorySourceListType.subclass:
+            return factorySourceListType.subclass(*args_, **kwargs_)
+        else:
+            return factorySourceListType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_factorySource(self): return self.factorySource
+    def set_factorySource(self, factorySource): self.factorySource = factorySource
+    def add_factorySource(self, value): self.factorySource.append(value)
+    def insert_factorySource(self, index, value): self.factorySource[index] = value
+    def export(self, outfile, level, namespace_='rpd:', name_='factorySourceListType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='factorySourceListType')
+        if self.hasContent_():
+            outfile.write('>\n')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            showIndent(outfile, level)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='factorySourceListType'):
+        pass
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='factorySourceListType'):
+        for factorySource_ in self.factorySource:
+            factorySource_.export(outfile, level, namespace_, name_='factorySource')
+    def hasContent_(self):
+        if (
+            self.factorySource
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='factorySourceListType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        pass
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('factorySource=[\n')
+        level += 1
+        for factorySource in self.factorySource:
+            showIndent(outfile, level)
+            outfile.write('model_.factorySource(\n')
+            factorySource.exportLiteral(outfile, level, name_='factorySource')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        level -= 1
+        showIndent(outfile, level)
+        outfile.write('],\n')
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        pass
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'factorySource':
+            obj_ = upstreamSourceType.factory()
+            obj_.build(child_)
+            self.factorySource.append(obj_)
+# end class factorySourceListType
+
+
+class amiImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('freespace', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        _MemberSpec('amiHugeDiskMountpoint', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, autoResolve=None, freespace=None, name=None, baseFileName=None, installLabelPath=None, amiHugeDiskMountpoint=None, valueOf_=''):
+        self.autoResolve = _cast(bool, autoResolve)
+        self.freespace = _cast(int, freespace)
+        self.name = _cast(None, name)
+        self.baseFileName = _cast(None, baseFileName)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.amiHugeDiskMountpoint = _cast(None, amiHugeDiskMountpoint)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if amiImageType.subclass:
+            return amiImageType.subclass(*args_, **kwargs_)
+        else:
+            return amiImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_freespace(self): return self.freespace
+    def set_freespace(self, freespace): self.freespace = freespace
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def get_amiHugeDiskMountpoint(self): return self.amiHugeDiskMountpoint
+    def set_amiHugeDiskMountpoint(self, amiHugeDiskMountpoint): self.amiHugeDiskMountpoint = amiHugeDiskMountpoint
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='amiImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='amiImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='amiImageType'):
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.freespace is not None:
+            outfile.write(' freespace="%s"' % self.format_integer(self.freespace, input_name='freespace'))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+        if self.installLabelPath is not None:
+            outfile.write(' installLabelPath=%s' % (self.format_string(quote_attrib(self.installLabelPath).encode(ExternalEncoding), input_name='installLabelPath'), ))
+        if self.amiHugeDiskMountpoint is not None:
+            outfile.write(' amiHugeDiskMountpoint=%s' % (self.format_string(quote_attrib(self.amiHugeDiskMountpoint).encode(ExternalEncoding), input_name='amiHugeDiskMountpoint'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='amiImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='amiImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.autoResolve is not None:
+            showIndent(outfile, level)
+            outfile.write('autoResolve = %s,\n' % (self.autoResolve,))
+        if self.freespace is not None:
+            showIndent(outfile, level)
+            outfile.write('freespace = %s,\n' % (self.freespace,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+        if self.installLabelPath is not None:
+            showIndent(outfile, level)
+            outfile.write('installLabelPath = %s,\n' % (self.installLabelPath,))
+        if self.amiHugeDiskMountpoint is not None:
+            showIndent(outfile, level)
+            outfile.write('amiHugeDiskMountpoint = %s,\n' % (self.amiHugeDiskMountpoint,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('autoResolve'):
+            if attrs.get('autoResolve').value in ('true', '1'):
+                self.autoResolve = True
+            elif attrs.get('autoResolve').value in ('false', '0'):
+                self.autoResolve = False
+            else:
+                raise ValueError('Bad boolean attribute (autoResolve)')
+        if attrs.get('freespace'):
+            try:
+                self.freespace = int(attrs.get('freespace').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (freespace): %s' % exp)
+            if self.freespace < 0:
+                raise ValueError('Invalid NonNegativeInteger (freespace)')
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+        if attrs.get('installLabelPath'):
+            self.installLabelPath = attrs.get('installLabelPath').value
+        if attrs.get('amiHugeDiskMountpoint'):
+            self.amiHugeDiskMountpoint = attrs.get('amiHugeDiskMountpoint').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class amiImageType
+
+
+class applianceIsoImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('maxIsoSize', 'xsd:positiveInteger', 0),
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('bugsUrl', 'xsd:string', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('anacondaCustomTrove', 'rpd:troveSpecType', 0),
+        _MemberSpec('betaNag', 'xsd:boolean', 0),
+        _MemberSpec('mediaTemplateTrove', 'rpd:troveSpecType', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        _MemberSpec('anacondaTemplatesTrove', 'rpd:troveSpecType', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        _MemberSpec('showMediaCheck', 'xsd:boolean', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, maxIsoSize=None, autoResolve=None, bugsUrl=None, name=None, anacondaCustomTrove=None, betaNag=None, mediaTemplateTrove=None, installLabelPath=None, anacondaTemplatesTrove=None, baseFileName=None, showMediaCheck=None, valueOf_=''):
+        self.maxIsoSize = _cast(int, maxIsoSize)
+        self.autoResolve = _cast(bool, autoResolve)
+        self.bugsUrl = _cast(None, bugsUrl)
+        self.name = _cast(None, name)
+        self.anacondaCustomTrove = _cast(None, anacondaCustomTrove)
+        self.betaNag = _cast(bool, betaNag)
+        self.mediaTemplateTrove = _cast(None, mediaTemplateTrove)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.anacondaTemplatesTrove = _cast(None, anacondaTemplatesTrove)
+        self.baseFileName = _cast(None, baseFileName)
+        self.showMediaCheck = _cast(bool, showMediaCheck)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if applianceIsoImageType.subclass:
+            return applianceIsoImageType.subclass(*args_, **kwargs_)
+        else:
+            return applianceIsoImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_maxIsoSize(self): return self.maxIsoSize
+    def set_maxIsoSize(self, maxIsoSize): self.maxIsoSize = maxIsoSize
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_bugsUrl(self): return self.bugsUrl
+    def set_bugsUrl(self, bugsUrl): self.bugsUrl = bugsUrl
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def get_anacondaCustomTrove(self): return self.anacondaCustomTrove
+    def set_anacondaCustomTrove(self, anacondaCustomTrove): self.anacondaCustomTrove = anacondaCustomTrove
+    def get_betaNag(self): return self.betaNag
+    def set_betaNag(self, betaNag): self.betaNag = betaNag
+    def get_mediaTemplateTrove(self): return self.mediaTemplateTrove
+    def set_mediaTemplateTrove(self, mediaTemplateTrove): self.mediaTemplateTrove = mediaTemplateTrove
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def get_anacondaTemplatesTrove(self): return self.anacondaTemplatesTrove
+    def set_anacondaTemplatesTrove(self, anacondaTemplatesTrove): self.anacondaTemplatesTrove = anacondaTemplatesTrove
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def get_showMediaCheck(self): return self.showMediaCheck
+    def set_showMediaCheck(self, showMediaCheck): self.showMediaCheck = showMediaCheck
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='applianceIsoImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='applianceIsoImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='applianceIsoImageType'):
+        if self.maxIsoSize is not None:
+            outfile.write(' maxIsoSize="%s"' % self.format_integer(self.maxIsoSize, input_name='maxIsoSize'))
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.bugsUrl is not None:
+            outfile.write(' bugsUrl=%s' % (self.format_string(quote_attrib(self.bugsUrl).encode(ExternalEncoding), input_name='bugsUrl'), ))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+        if self.anacondaCustomTrove is not None:
+            outfile.write(' anacondaCustomTrove=%s' % (quote_attrib(self.anacondaCustomTrove), ))
+        if self.betaNag is not None:
+            outfile.write(' betaNag="%s"' % self.format_boolean(str_lower(str(self.betaNag)), input_name='betaNag'))
+        if self.mediaTemplateTrove is not None:
+            outfile.write(' mediaTemplateTrove=%s' % (quote_attrib(self.mediaTemplateTrove), ))
+        if self.installLabelPath is not None:
+            outfile.write(' installLabelPath=%s' % (self.format_string(quote_attrib(self.installLabelPath).encode(ExternalEncoding), input_name='installLabelPath'), ))
+        if self.anacondaTemplatesTrove is not None:
+            outfile.write(' anacondaTemplatesTrove=%s' % (quote_attrib(self.anacondaTemplatesTrove), ))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+        if self.showMediaCheck is not None:
+            outfile.write(' showMediaCheck="%s"' % self.format_boolean(str_lower(str(self.showMediaCheck)), input_name='showMediaCheck'))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='applianceIsoImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='applianceIsoImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.maxIsoSize is not None:
+            showIndent(outfile, level)
+            outfile.write('maxIsoSize = %s,\n' % (self.maxIsoSize,))
+        if self.autoResolve is not None:
+            showIndent(outfile, level)
+            outfile.write('autoResolve = %s,\n' % (self.autoResolve,))
+        if self.bugsUrl is not None:
+            showIndent(outfile, level)
+            outfile.write('bugsUrl = %s,\n' % (self.bugsUrl,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+        if self.anacondaCustomTrove is not None:
+            showIndent(outfile, level)
+            outfile.write('anacondaCustomTrove = "%s",\n' % (self.anacondaCustomTrove,))
+        if self.betaNag is not None:
+            showIndent(outfile, level)
+            outfile.write('betaNag = %s,\n' % (self.betaNag,))
+        if self.mediaTemplateTrove is not None:
+            showIndent(outfile, level)
+            outfile.write('mediaTemplateTrove = "%s",\n' % (self.mediaTemplateTrove,))
+        if self.installLabelPath is not None:
+            showIndent(outfile, level)
+            outfile.write('installLabelPath = %s,\n' % (self.installLabelPath,))
+        if self.anacondaTemplatesTrove is not None:
+            showIndent(outfile, level)
+            outfile.write('anacondaTemplatesTrove = "%s",\n' % (self.anacondaTemplatesTrove,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+        if self.showMediaCheck is not None:
+            showIndent(outfile, level)
+            outfile.write('showMediaCheck = %s,\n' % (self.showMediaCheck,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('maxIsoSize'):
+            try:
+                self.maxIsoSize = int(attrs.get('maxIsoSize').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (maxIsoSize): %s' % exp)
+            if self.maxIsoSize <= 0:
+                raise ValueError('Invalid PositiveInteger (maxIsoSize)')
+        if attrs.get('autoResolve'):
+            if attrs.get('autoResolve').value in ('true', '1'):
+                self.autoResolve = True
+            elif attrs.get('autoResolve').value in ('false', '0'):
+                self.autoResolve = False
+            else:
+                raise ValueError('Bad boolean attribute (autoResolve)')
+        if attrs.get('bugsUrl'):
+            self.bugsUrl = attrs.get('bugsUrl').value
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+        if attrs.get('anacondaCustomTrove'):
+            self.anacondaCustomTrove = attrs.get('anacondaCustomTrove').value
+        if attrs.get('betaNag'):
+            if attrs.get('betaNag').value in ('true', '1'):
+                self.betaNag = True
+            elif attrs.get('betaNag').value in ('false', '0'):
+                self.betaNag = False
+            else:
+                raise ValueError('Bad boolean attribute (betaNag)')
+        if attrs.get('mediaTemplateTrove'):
+            self.mediaTemplateTrove = attrs.get('mediaTemplateTrove').value
+        if attrs.get('installLabelPath'):
+            self.installLabelPath = attrs.get('installLabelPath').value
+        if attrs.get('anacondaTemplatesTrove'):
+            self.anacondaTemplatesTrove = attrs.get('anacondaTemplatesTrove').value
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+        if attrs.get('showMediaCheck'):
+            if attrs.get('showMediaCheck').value in ('true', '1'):
+                self.showMediaCheck = True
+            elif attrs.get('showMediaCheck').value in ('false', '0'):
+                self.showMediaCheck = False
+            else:
+                raise ValueError('Bad boolean attribute (showMediaCheck)')
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class applianceIsoImageType
+
+
+class installableIsoImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('maxIsoSize', 'xsd:positiveInteger', 0),
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('bugsUrl', 'xsd:string', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('anacondaCustomTrove', 'rpd:troveSpecType', 0),
+        _MemberSpec('betaNag', 'xsd:boolean', 0),
+        _MemberSpec('mediaTemplateTrove', 'rpd:troveSpecType', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        _MemberSpec('anacondaTemplatesTrove', 'rpd:troveSpecType', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        _MemberSpec('showMediaCheck', 'xsd:boolean', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, maxIsoSize=None, autoResolve=None, bugsUrl=None, name=None, anacondaCustomTrove=None, betaNag=None, mediaTemplateTrove=None, installLabelPath=None, anacondaTemplatesTrove=None, baseFileName=None, showMediaCheck=None, valueOf_=''):
+        self.maxIsoSize = _cast(int, maxIsoSize)
+        self.autoResolve = _cast(bool, autoResolve)
+        self.bugsUrl = _cast(None, bugsUrl)
+        self.name = _cast(None, name)
+        self.anacondaCustomTrove = _cast(None, anacondaCustomTrove)
+        self.betaNag = _cast(bool, betaNag)
+        self.mediaTemplateTrove = _cast(None, mediaTemplateTrove)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.anacondaTemplatesTrove = _cast(None, anacondaTemplatesTrove)
+        self.baseFileName = _cast(None, baseFileName)
+        self.showMediaCheck = _cast(bool, showMediaCheck)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if installableIsoImageType.subclass:
+            return installableIsoImageType.subclass(*args_, **kwargs_)
+        else:
+            return installableIsoImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_maxIsoSize(self): return self.maxIsoSize
+    def set_maxIsoSize(self, maxIsoSize): self.maxIsoSize = maxIsoSize
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_bugsUrl(self): return self.bugsUrl
+    def set_bugsUrl(self, bugsUrl): self.bugsUrl = bugsUrl
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def get_anacondaCustomTrove(self): return self.anacondaCustomTrove
+    def set_anacondaCustomTrove(self, anacondaCustomTrove): self.anacondaCustomTrove = anacondaCustomTrove
+    def get_betaNag(self): return self.betaNag
+    def set_betaNag(self, betaNag): self.betaNag = betaNag
+    def get_mediaTemplateTrove(self): return self.mediaTemplateTrove
+    def set_mediaTemplateTrove(self, mediaTemplateTrove): self.mediaTemplateTrove = mediaTemplateTrove
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def get_anacondaTemplatesTrove(self): return self.anacondaTemplatesTrove
+    def set_anacondaTemplatesTrove(self, anacondaTemplatesTrove): self.anacondaTemplatesTrove = anacondaTemplatesTrove
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def get_showMediaCheck(self): return self.showMediaCheck
+    def set_showMediaCheck(self, showMediaCheck): self.showMediaCheck = showMediaCheck
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='installableIsoImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='installableIsoImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='installableIsoImageType'):
+        if self.maxIsoSize is not None:
+            outfile.write(' maxIsoSize="%s"' % self.format_integer(self.maxIsoSize, input_name='maxIsoSize'))
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.bugsUrl is not None:
+            outfile.write(' bugsUrl=%s' % (self.format_string(quote_attrib(self.bugsUrl).encode(ExternalEncoding), input_name='bugsUrl'), ))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+        if self.anacondaCustomTrove is not None:
+            outfile.write(' anacondaCustomTrove=%s' % (quote_attrib(self.anacondaCustomTrove), ))
+        if self.betaNag is not None:
+            outfile.write(' betaNag="%s"' % self.format_boolean(str_lower(str(self.betaNag)), input_name='betaNag'))
+        if self.mediaTemplateTrove is not None:
+            outfile.write(' mediaTemplateTrove=%s' % (quote_attrib(self.mediaTemplateTrove), ))
+        if self.installLabelPath is not None:
+            outfile.write(' installLabelPath=%s' % (self.format_string(quote_attrib(self.installLabelPath).encode(ExternalEncoding), input_name='installLabelPath'), ))
+        if self.anacondaTemplatesTrove is not None:
+            outfile.write(' anacondaTemplatesTrove=%s' % (quote_attrib(self.anacondaTemplatesTrove), ))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+        if self.showMediaCheck is not None:
+            outfile.write(' showMediaCheck="%s"' % self.format_boolean(str_lower(str(self.showMediaCheck)), input_name='showMediaCheck'))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='installableIsoImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='installableIsoImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.maxIsoSize is not None:
+            showIndent(outfile, level)
+            outfile.write('maxIsoSize = %s,\n' % (self.maxIsoSize,))
+        if self.autoResolve is not None:
+            showIndent(outfile, level)
+            outfile.write('autoResolve = %s,\n' % (self.autoResolve,))
+        if self.bugsUrl is not None:
+            showIndent(outfile, level)
+            outfile.write('bugsUrl = %s,\n' % (self.bugsUrl,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+        if self.anacondaCustomTrove is not None:
+            showIndent(outfile, level)
+            outfile.write('anacondaCustomTrove = "%s",\n' % (self.anacondaCustomTrove,))
+        if self.betaNag is not None:
+            showIndent(outfile, level)
+            outfile.write('betaNag = %s,\n' % (self.betaNag,))
+        if self.mediaTemplateTrove is not None:
+            showIndent(outfile, level)
+            outfile.write('mediaTemplateTrove = "%s",\n' % (self.mediaTemplateTrove,))
+        if self.installLabelPath is not None:
+            showIndent(outfile, level)
+            outfile.write('installLabelPath = %s,\n' % (self.installLabelPath,))
+        if self.anacondaTemplatesTrove is not None:
+            showIndent(outfile, level)
+            outfile.write('anacondaTemplatesTrove = "%s",\n' % (self.anacondaTemplatesTrove,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+        if self.showMediaCheck is not None:
+            showIndent(outfile, level)
+            outfile.write('showMediaCheck = %s,\n' % (self.showMediaCheck,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('maxIsoSize'):
+            try:
+                self.maxIsoSize = int(attrs.get('maxIsoSize').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (maxIsoSize): %s' % exp)
+            if self.maxIsoSize <= 0:
+                raise ValueError('Invalid PositiveInteger (maxIsoSize)')
+        if attrs.get('autoResolve'):
+            if attrs.get('autoResolve').value in ('true', '1'):
+                self.autoResolve = True
+            elif attrs.get('autoResolve').value in ('false', '0'):
+                self.autoResolve = False
+            else:
+                raise ValueError('Bad boolean attribute (autoResolve)')
+        if attrs.get('bugsUrl'):
+            self.bugsUrl = attrs.get('bugsUrl').value
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+        if attrs.get('anacondaCustomTrove'):
+            self.anacondaCustomTrove = attrs.get('anacondaCustomTrove').value
+        if attrs.get('betaNag'):
+            if attrs.get('betaNag').value in ('true', '1'):
+                self.betaNag = True
+            elif attrs.get('betaNag').value in ('false', '0'):
+                self.betaNag = False
+            else:
+                raise ValueError('Bad boolean attribute (betaNag)')
+        if attrs.get('mediaTemplateTrove'):
+            self.mediaTemplateTrove = attrs.get('mediaTemplateTrove').value
+        if attrs.get('installLabelPath'):
+            self.installLabelPath = attrs.get('installLabelPath').value
+        if attrs.get('anacondaTemplatesTrove'):
+            self.anacondaTemplatesTrove = attrs.get('anacondaTemplatesTrove').value
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+        if attrs.get('showMediaCheck'):
+            if attrs.get('showMediaCheck').value in ('true', '1'):
+                self.showMediaCheck = True
+            elif attrs.get('showMediaCheck').value in ('false', '0'):
+                self.showMediaCheck = False
+            else:
+                raise ValueError('Bad boolean attribute (showMediaCheck)')
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class installableIsoImageType
+
+
+class liveIsoImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('zisofs', 'xsd:boolean', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        _MemberSpec('unionfs', 'xsd:boolean', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, autoResolve=None, name=None, zisofs=None, baseFileName=None, unionfs=None, installLabelPath=None, valueOf_=''):
+        self.autoResolve = _cast(bool, autoResolve)
+        self.name = _cast(None, name)
+        self.zisofs = _cast(bool, zisofs)
+        self.baseFileName = _cast(None, baseFileName)
+        self.unionfs = _cast(bool, unionfs)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if liveIsoImageType.subclass:
+            return liveIsoImageType.subclass(*args_, **kwargs_)
+        else:
+            return liveIsoImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def get_zisofs(self): return self.zisofs
+    def set_zisofs(self, zisofs): self.zisofs = zisofs
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def get_unionfs(self): return self.unionfs
+    def set_unionfs(self, unionfs): self.unionfs = unionfs
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='liveIsoImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='liveIsoImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='liveIsoImageType'):
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+        if self.zisofs is not None:
+            outfile.write(' zisofs="%s"' % self.format_boolean(str_lower(str(self.zisofs)), input_name='zisofs'))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+        if self.unionfs is not None:
+            outfile.write(' unionfs="%s"' % self.format_boolean(str_lower(str(self.unionfs)), input_name='unionfs'))
+        if self.installLabelPath is not None:
+            outfile.write(' installLabelPath=%s' % (self.format_string(quote_attrib(self.installLabelPath).encode(ExternalEncoding), input_name='installLabelPath'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='liveIsoImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='liveIsoImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.autoResolve is not None:
+            showIndent(outfile, level)
+            outfile.write('autoResolve = %s,\n' % (self.autoResolve,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+        if self.zisofs is not None:
+            showIndent(outfile, level)
+            outfile.write('zisofs = %s,\n' % (self.zisofs,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+        if self.unionfs is not None:
+            showIndent(outfile, level)
+            outfile.write('unionfs = %s,\n' % (self.unionfs,))
+        if self.installLabelPath is not None:
+            showIndent(outfile, level)
+            outfile.write('installLabelPath = %s,\n' % (self.installLabelPath,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('autoResolve'):
+            if attrs.get('autoResolve').value in ('true', '1'):
+                self.autoResolve = True
+            elif attrs.get('autoResolve').value in ('false', '0'):
+                self.autoResolve = False
+            else:
+                raise ValueError('Bad boolean attribute (autoResolve)')
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+        if attrs.get('zisofs'):
+            if attrs.get('zisofs').value in ('true', '1'):
+                self.zisofs = True
+            elif attrs.get('zisofs').value in ('false', '0'):
+                self.zisofs = False
+            else:
+                raise ValueError('Bad boolean attribute (zisofs)')
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+        if attrs.get('unionfs'):
+            if attrs.get('unionfs').value in ('true', '1'):
+                self.unionfs = True
+            elif attrs.get('unionfs').value in ('false', '0'):
+                self.unionfs = False
+            else:
+                raise ValueError('Bad boolean attribute (unionfs)')
+        if attrs.get('installLabelPath'):
+            self.installLabelPath = attrs.get('installLabelPath').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class liveIsoImageType
+
+
+class netbootImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, autoResolve=None, baseFileName=None, installLabelPath=None, name=None, valueOf_=''):
+        self.autoResolve = _cast(bool, autoResolve)
+        self.baseFileName = _cast(None, baseFileName)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.name = _cast(None, name)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if netbootImageType.subclass:
+            return netbootImageType.subclass(*args_, **kwargs_)
+        else:
+            return netbootImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='netbootImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='netbootImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='netbootImageType'):
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+        if self.installLabelPath is not None:
+            outfile.write(' installLabelPath=%s' % (self.format_string(quote_attrib(self.installLabelPath).encode(ExternalEncoding), input_name='installLabelPath'), ))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='netbootImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='netbootImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.autoResolve is not None:
+            showIndent(outfile, level)
+            outfile.write('autoResolve = %s,\n' % (self.autoResolve,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+        if self.installLabelPath is not None:
+            showIndent(outfile, level)
+            outfile.write('installLabelPath = %s,\n' % (self.installLabelPath,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('autoResolve'):
+            if attrs.get('autoResolve').value in ('true', '1'):
+                self.autoResolve = True
+            elif attrs.get('autoResolve').value in ('false', '0'):
+                self.autoResolve = False
+            else:
+                raise ValueError('Bad boolean attribute (autoResolve)')
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+        if attrs.get('installLabelPath'):
+            self.installLabelPath = attrs.get('installLabelPath').value
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class netbootImageType
+
+
+class rawFsImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('freespace', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('swapSize', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, autoResolve=None, freespace=None, name=None, swapSize=None, baseFileName=None, installLabelPath=None, valueOf_=''):
+        self.autoResolve = _cast(bool, autoResolve)
+        self.freespace = _cast(int, freespace)
+        self.name = _cast(None, name)
+        self.swapSize = _cast(int, swapSize)
+        self.baseFileName = _cast(None, baseFileName)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if rawFsImageType.subclass:
+            return rawFsImageType.subclass(*args_, **kwargs_)
+        else:
+            return rawFsImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_freespace(self): return self.freespace
+    def set_freespace(self, freespace): self.freespace = freespace
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def get_swapSize(self): return self.swapSize
+    def set_swapSize(self, swapSize): self.swapSize = swapSize
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='rawFsImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='rawFsImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='rawFsImageType'):
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.freespace is not None:
+            outfile.write(' freespace="%s"' % self.format_integer(self.freespace, input_name='freespace'))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+        if self.swapSize is not None:
+            outfile.write(' swapSize="%s"' % self.format_integer(self.swapSize, input_name='swapSize'))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+        if self.installLabelPath is not None:
+            outfile.write(' installLabelPath=%s' % (self.format_string(quote_attrib(self.installLabelPath).encode(ExternalEncoding), input_name='installLabelPath'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='rawFsImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='rawFsImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.autoResolve is not None:
+            showIndent(outfile, level)
+            outfile.write('autoResolve = %s,\n' % (self.autoResolve,))
+        if self.freespace is not None:
+            showIndent(outfile, level)
+            outfile.write('freespace = %s,\n' % (self.freespace,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+        if self.swapSize is not None:
+            showIndent(outfile, level)
+            outfile.write('swapSize = %s,\n' % (self.swapSize,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+        if self.installLabelPath is not None:
+            showIndent(outfile, level)
+            outfile.write('installLabelPath = %s,\n' % (self.installLabelPath,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('autoResolve'):
+            if attrs.get('autoResolve').value in ('true', '1'):
+                self.autoResolve = True
+            elif attrs.get('autoResolve').value in ('false', '0'):
+                self.autoResolve = False
+            else:
+                raise ValueError('Bad boolean attribute (autoResolve)')
+        if attrs.get('freespace'):
+            try:
+                self.freespace = int(attrs.get('freespace').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (freespace): %s' % exp)
+            if self.freespace < 0:
+                raise ValueError('Invalid NonNegativeInteger (freespace)')
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+        if attrs.get('swapSize'):
+            try:
+                self.swapSize = int(attrs.get('swapSize').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (swapSize): %s' % exp)
+            if self.swapSize < 0:
+                raise ValueError('Invalid NonNegativeInteger (swapSize)')
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+        if attrs.get('installLabelPath'):
+            self.installLabelPath = attrs.get('installLabelPath').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class rawFsImageType
+
+
+class rawHdImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('freespace', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('swapSize', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, autoResolve=None, freespace=None, name=None, swapSize=None, baseFileName=None, installLabelPath=None, valueOf_=''):
+        self.autoResolve = _cast(bool, autoResolve)
+        self.freespace = _cast(int, freespace)
+        self.name = _cast(None, name)
+        self.swapSize = _cast(int, swapSize)
+        self.baseFileName = _cast(None, baseFileName)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if rawHdImageType.subclass:
+            return rawHdImageType.subclass(*args_, **kwargs_)
+        else:
+            return rawHdImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_freespace(self): return self.freespace
+    def set_freespace(self, freespace): self.freespace = freespace
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def get_swapSize(self): return self.swapSize
+    def set_swapSize(self, swapSize): self.swapSize = swapSize
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='rawHdImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='rawHdImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='rawHdImageType'):
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.freespace is not None:
+            outfile.write(' freespace="%s"' % self.format_integer(self.freespace, input_name='freespace'))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+        if self.swapSize is not None:
+            outfile.write(' swapSize="%s"' % self.format_integer(self.swapSize, input_name='swapSize'))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+        if self.installLabelPath is not None:
+            outfile.write(' installLabelPath=%s' % (self.format_string(quote_attrib(self.installLabelPath).encode(ExternalEncoding), input_name='installLabelPath'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='rawHdImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='rawHdImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.autoResolve is not None:
+            showIndent(outfile, level)
+            outfile.write('autoResolve = %s,\n' % (self.autoResolve,))
+        if self.freespace is not None:
+            showIndent(outfile, level)
+            outfile.write('freespace = %s,\n' % (self.freespace,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+        if self.swapSize is not None:
+            showIndent(outfile, level)
+            outfile.write('swapSize = %s,\n' % (self.swapSize,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+        if self.installLabelPath is not None:
+            showIndent(outfile, level)
+            outfile.write('installLabelPath = %s,\n' % (self.installLabelPath,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('autoResolve'):
+            if attrs.get('autoResolve').value in ('true', '1'):
+                self.autoResolve = True
+            elif attrs.get('autoResolve').value in ('false', '0'):
+                self.autoResolve = False
+            else:
+                raise ValueError('Bad boolean attribute (autoResolve)')
+        if attrs.get('freespace'):
+            try:
+                self.freespace = int(attrs.get('freespace').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (freespace): %s' % exp)
+            if self.freespace < 0:
+                raise ValueError('Invalid NonNegativeInteger (freespace)')
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+        if attrs.get('swapSize'):
+            try:
+                self.swapSize = int(attrs.get('swapSize').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (swapSize): %s' % exp)
+            if self.swapSize < 0:
+                raise ValueError('Invalid NonNegativeInteger (swapSize)')
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+        if attrs.get('installLabelPath'):
+            self.installLabelPath = attrs.get('installLabelPath').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class rawHdImageType
+
+
+class tarballImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('swapSize', 'xsd:nonNegativeInteger', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, autoResolve=None, baseFileName=None, installLabelPath=None, name=None, swapSize=None, valueOf_=''):
+        self.autoResolve = _cast(bool, autoResolve)
+        self.baseFileName = _cast(None, baseFileName)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.name = _cast(None, name)
+        self.swapSize = _cast(int, swapSize)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if tarballImageType.subclass:
+            return tarballImageType.subclass(*args_, **kwargs_)
+        else:
+            return tarballImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def get_swapSize(self): return self.swapSize
+    def set_swapSize(self, swapSize): self.swapSize = swapSize
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='tarballImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='tarballImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='tarballImageType'):
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+        if self.installLabelPath is not None:
+            outfile.write(' installLabelPath=%s' % (self.format_string(quote_attrib(self.installLabelPath).encode(ExternalEncoding), input_name='installLabelPath'), ))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+        if self.swapSize is not None:
+            outfile.write(' swapSize="%s"' % self.format_integer(self.swapSize, input_name='swapSize'))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='tarballImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='tarballImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.autoResolve is not None:
+            showIndent(outfile, level)
+            outfile.write('autoResolve = %s,\n' % (self.autoResolve,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+        if self.installLabelPath is not None:
+            showIndent(outfile, level)
+            outfile.write('installLabelPath = %s,\n' % (self.installLabelPath,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+        if self.swapSize is not None:
+            showIndent(outfile, level)
+            outfile.write('swapSize = %s,\n' % (self.swapSize,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('autoResolve'):
+            if attrs.get('autoResolve').value in ('true', '1'):
+                self.autoResolve = True
+            elif attrs.get('autoResolve').value in ('false', '0'):
+                self.autoResolve = False
+            else:
+                raise ValueError('Bad boolean attribute (autoResolve)')
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+        if attrs.get('installLabelPath'):
+            self.installLabelPath = attrs.get('installLabelPath').value
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+        if attrs.get('swapSize'):
+            try:
+                self.swapSize = int(attrs.get('swapSize').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (swapSize): %s' % exp)
+            if self.swapSize < 0:
+                raise ValueError('Invalid NonNegativeInteger (swapSize)')
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class tarballImageType
+
+
+class updateIsoImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('mediaTemplateTrove', 'xsd:string', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, mediaTemplateTrove=None, baseFileName=None, valueOf_=''):
+        self.mediaTemplateTrove = _cast(None, mediaTemplateTrove)
+        self.baseFileName = _cast(None, baseFileName)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if updateIsoImageType.subclass:
+            return updateIsoImageType.subclass(*args_, **kwargs_)
+        else:
+            return updateIsoImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_mediaTemplateTrove(self): return self.mediaTemplateTrove
+    def set_mediaTemplateTrove(self, mediaTemplateTrove): self.mediaTemplateTrove = mediaTemplateTrove
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='updateIsoImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='updateIsoImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='updateIsoImageType'):
+        if self.mediaTemplateTrove is not None:
+            outfile.write(' mediaTemplateTrove=%s' % (self.format_string(quote_attrib(self.mediaTemplateTrove).encode(ExternalEncoding), input_name='mediaTemplateTrove'), ))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='updateIsoImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='updateIsoImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.mediaTemplateTrove is not None:
+            showIndent(outfile, level)
+            outfile.write('mediaTemplateTrove = %s,\n' % (self.mediaTemplateTrove,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('mediaTemplateTrove'):
+            self.mediaTemplateTrove = attrs.get('mediaTemplateTrove').value
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class updateIsoImageType
+
+
+class vhdImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('freespace', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('vhdDiskType', 'xsd:string', 0),
+        _MemberSpec('swapSize', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, autoResolve=None, freespace=None, name=None, vhdDiskType=None, swapSize=None, baseFileName=None, installLabelPath=None, valueOf_=''):
+        self.autoResolve = _cast(bool, autoResolve)
+        self.freespace = _cast(int, freespace)
+        self.name = _cast(None, name)
+        self.vhdDiskType = _cast(None, vhdDiskType)
+        self.swapSize = _cast(int, swapSize)
+        self.baseFileName = _cast(None, baseFileName)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if vhdImageType.subclass:
+            return vhdImageType.subclass(*args_, **kwargs_)
+        else:
+            return vhdImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_freespace(self): return self.freespace
+    def set_freespace(self, freespace): self.freespace = freespace
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def get_vhdDiskType(self): return self.vhdDiskType
+    def set_vhdDiskType(self, vhdDiskType): self.vhdDiskType = vhdDiskType
+    def get_swapSize(self): return self.swapSize
+    def set_swapSize(self, swapSize): self.swapSize = swapSize
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='vhdImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='vhdImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='vhdImageType'):
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.freespace is not None:
+            outfile.write(' freespace="%s"' % self.format_integer(self.freespace, input_name='freespace'))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+        if self.vhdDiskType is not None:
+            outfile.write(' vhdDiskType=%s' % (self.format_string(quote_attrib(self.vhdDiskType).encode(ExternalEncoding), input_name='vhdDiskType'), ))
+        if self.swapSize is not None:
+            outfile.write(' swapSize="%s"' % self.format_integer(self.swapSize, input_name='swapSize'))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+        if self.installLabelPath is not None:
+            outfile.write(' installLabelPath=%s' % (self.format_string(quote_attrib(self.installLabelPath).encode(ExternalEncoding), input_name='installLabelPath'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='vhdImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='vhdImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.autoResolve is not None:
+            showIndent(outfile, level)
+            outfile.write('autoResolve = %s,\n' % (self.autoResolve,))
+        if self.freespace is not None:
+            showIndent(outfile, level)
+            outfile.write('freespace = %s,\n' % (self.freespace,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+        if self.vhdDiskType is not None:
+            showIndent(outfile, level)
+            outfile.write('vhdDiskType = %s,\n' % (self.vhdDiskType,))
+        if self.swapSize is not None:
+            showIndent(outfile, level)
+            outfile.write('swapSize = %s,\n' % (self.swapSize,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+        if self.installLabelPath is not None:
+            showIndent(outfile, level)
+            outfile.write('installLabelPath = %s,\n' % (self.installLabelPath,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('autoResolve'):
+            if attrs.get('autoResolve').value in ('true', '1'):
+                self.autoResolve = True
+            elif attrs.get('autoResolve').value in ('false', '0'):
+                self.autoResolve = False
+            else:
+                raise ValueError('Bad boolean attribute (autoResolve)')
+        if attrs.get('freespace'):
+            try:
+                self.freespace = int(attrs.get('freespace').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (freespace): %s' % exp)
+            if self.freespace < 0:
+                raise ValueError('Invalid NonNegativeInteger (freespace)')
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+        if attrs.get('vhdDiskType'):
+            self.vhdDiskType = attrs.get('vhdDiskType').value
+        if attrs.get('swapSize'):
+            try:
+                self.swapSize = int(attrs.get('swapSize').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (swapSize): %s' % exp)
+            if self.swapSize < 0:
+                raise ValueError('Invalid NonNegativeInteger (swapSize)')
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+        if attrs.get('installLabelPath'):
+            self.installLabelPath = attrs.get('installLabelPath').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class vhdImageType
+
+
+class virtualIronImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('freespace', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('vhdDiskType', 'xsd:string', 0),
+        _MemberSpec('swapSize', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, autoResolve=None, freespace=None, name=None, vhdDiskType=None, swapSize=None, baseFileName=None, installLabelPath=None, valueOf_=''):
+        self.autoResolve = _cast(bool, autoResolve)
+        self.freespace = _cast(int, freespace)
+        self.name = _cast(None, name)
+        self.vhdDiskType = _cast(None, vhdDiskType)
+        self.swapSize = _cast(int, swapSize)
+        self.baseFileName = _cast(None, baseFileName)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if virtualIronImageType.subclass:
+            return virtualIronImageType.subclass(*args_, **kwargs_)
+        else:
+            return virtualIronImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_freespace(self): return self.freespace
+    def set_freespace(self, freespace): self.freespace = freespace
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def get_vhdDiskType(self): return self.vhdDiskType
+    def set_vhdDiskType(self, vhdDiskType): self.vhdDiskType = vhdDiskType
+    def get_swapSize(self): return self.swapSize
+    def set_swapSize(self, swapSize): self.swapSize = swapSize
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='virtualIronImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='virtualIronImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='virtualIronImageType'):
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.freespace is not None:
+            outfile.write(' freespace="%s"' % self.format_integer(self.freespace, input_name='freespace'))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+        if self.vhdDiskType is not None:
+            outfile.write(' vhdDiskType=%s' % (self.format_string(quote_attrib(self.vhdDiskType).encode(ExternalEncoding), input_name='vhdDiskType'), ))
+        if self.swapSize is not None:
+            outfile.write(' swapSize="%s"' % self.format_integer(self.swapSize, input_name='swapSize'))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+        if self.installLabelPath is not None:
+            outfile.write(' installLabelPath=%s' % (self.format_string(quote_attrib(self.installLabelPath).encode(ExternalEncoding), input_name='installLabelPath'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='virtualIronImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='virtualIronImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.autoResolve is not None:
+            showIndent(outfile, level)
+            outfile.write('autoResolve = %s,\n' % (self.autoResolve,))
+        if self.freespace is not None:
+            showIndent(outfile, level)
+            outfile.write('freespace = %s,\n' % (self.freespace,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+        if self.vhdDiskType is not None:
+            showIndent(outfile, level)
+            outfile.write('vhdDiskType = %s,\n' % (self.vhdDiskType,))
+        if self.swapSize is not None:
+            showIndent(outfile, level)
+            outfile.write('swapSize = %s,\n' % (self.swapSize,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+        if self.installLabelPath is not None:
+            showIndent(outfile, level)
+            outfile.write('installLabelPath = %s,\n' % (self.installLabelPath,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('autoResolve'):
+            if attrs.get('autoResolve').value in ('true', '1'):
+                self.autoResolve = True
+            elif attrs.get('autoResolve').value in ('false', '0'):
+                self.autoResolve = False
+            else:
+                raise ValueError('Bad boolean attribute (autoResolve)')
+        if attrs.get('freespace'):
+            try:
+                self.freespace = int(attrs.get('freespace').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (freespace): %s' % exp)
+            if self.freespace < 0:
+                raise ValueError('Invalid NonNegativeInteger (freespace)')
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+        if attrs.get('vhdDiskType'):
+            self.vhdDiskType = attrs.get('vhdDiskType').value
+        if attrs.get('swapSize'):
+            try:
+                self.swapSize = int(attrs.get('swapSize').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (swapSize): %s' % exp)
+            if self.swapSize < 0:
+                raise ValueError('Invalid NonNegativeInteger (swapSize)')
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+        if attrs.get('installLabelPath'):
+            self.installLabelPath = attrs.get('installLabelPath').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class virtualIronImageType
+
+
+class vmwareEsxImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('freespace', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('natNetworking', 'xsd:boolean', 0),
+        _MemberSpec('vmMemory', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('swapSize', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, autoResolve=None, freespace=None, name=None, natNetworking=None, vmMemory=None, swapSize=None, installLabelPath=None, baseFileName=None, valueOf_=''):
+        self.autoResolve = _cast(bool, autoResolve)
+        self.freespace = _cast(int, freespace)
+        self.name = _cast(None, name)
+        self.natNetworking = _cast(bool, natNetworking)
+        self.vmMemory = _cast(int, vmMemory)
+        self.swapSize = _cast(int, swapSize)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.baseFileName = _cast(None, baseFileName)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if vmwareEsxImageType.subclass:
+            return vmwareEsxImageType.subclass(*args_, **kwargs_)
+        else:
+            return vmwareEsxImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_freespace(self): return self.freespace
+    def set_freespace(self, freespace): self.freespace = freespace
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def get_natNetworking(self): return self.natNetworking
+    def set_natNetworking(self, natNetworking): self.natNetworking = natNetworking
+    def get_vmMemory(self): return self.vmMemory
+    def set_vmMemory(self, vmMemory): self.vmMemory = vmMemory
+    def get_swapSize(self): return self.swapSize
+    def set_swapSize(self, swapSize): self.swapSize = swapSize
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='vmwareEsxImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='vmwareEsxImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='vmwareEsxImageType'):
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.freespace is not None:
+            outfile.write(' freespace="%s"' % self.format_integer(self.freespace, input_name='freespace'))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+        if self.natNetworking is not None:
+            outfile.write(' natNetworking="%s"' % self.format_boolean(str_lower(str(self.natNetworking)), input_name='natNetworking'))
+        if self.vmMemory is not None:
+            outfile.write(' vmMemory="%s"' % self.format_integer(self.vmMemory, input_name='vmMemory'))
+        if self.swapSize is not None:
+            outfile.write(' swapSize="%s"' % self.format_integer(self.swapSize, input_name='swapSize'))
+        if self.installLabelPath is not None:
+            outfile.write(' installLabelPath=%s' % (self.format_string(quote_attrib(self.installLabelPath).encode(ExternalEncoding), input_name='installLabelPath'), ))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='vmwareEsxImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='vmwareEsxImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.autoResolve is not None:
+            showIndent(outfile, level)
+            outfile.write('autoResolve = %s,\n' % (self.autoResolve,))
+        if self.freespace is not None:
+            showIndent(outfile, level)
+            outfile.write('freespace = %s,\n' % (self.freespace,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+        if self.natNetworking is not None:
+            showIndent(outfile, level)
+            outfile.write('natNetworking = %s,\n' % (self.natNetworking,))
+        if self.vmMemory is not None:
+            showIndent(outfile, level)
+            outfile.write('vmMemory = %s,\n' % (self.vmMemory,))
+        if self.swapSize is not None:
+            showIndent(outfile, level)
+            outfile.write('swapSize = %s,\n' % (self.swapSize,))
+        if self.installLabelPath is not None:
+            showIndent(outfile, level)
+            outfile.write('installLabelPath = %s,\n' % (self.installLabelPath,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('autoResolve'):
+            if attrs.get('autoResolve').value in ('true', '1'):
+                self.autoResolve = True
+            elif attrs.get('autoResolve').value in ('false', '0'):
+                self.autoResolve = False
+            else:
+                raise ValueError('Bad boolean attribute (autoResolve)')
+        if attrs.get('freespace'):
+            try:
+                self.freespace = int(attrs.get('freespace').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (freespace): %s' % exp)
+            if self.freespace < 0:
+                raise ValueError('Invalid NonNegativeInteger (freespace)')
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+        if attrs.get('natNetworking'):
+            if attrs.get('natNetworking').value in ('true', '1'):
+                self.natNetworking = True
+            elif attrs.get('natNetworking').value in ('false', '0'):
+                self.natNetworking = False
+            else:
+                raise ValueError('Bad boolean attribute (natNetworking)')
+        if attrs.get('vmMemory'):
+            try:
+                self.vmMemory = int(attrs.get('vmMemory').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (vmMemory): %s' % exp)
+            if self.vmMemory < 0:
+                raise ValueError('Invalid NonNegativeInteger (vmMemory)')
+        if attrs.get('swapSize'):
+            try:
+                self.swapSize = int(attrs.get('swapSize').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (swapSize): %s' % exp)
+            if self.swapSize < 0:
+                raise ValueError('Invalid NonNegativeInteger (swapSize)')
+        if attrs.get('installLabelPath'):
+            self.installLabelPath = attrs.get('installLabelPath').value
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class vmwareEsxImageType
+
+
+class vmwareImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('freespace', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('natNetworking', 'xsd:boolean', 0),
+        _MemberSpec('vmMemory', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('swapSize', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('diskAdapter', 'xsd:string', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        _MemberSpec('vmSnapshots', 'xsd:boolean', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, autoResolve=None, freespace=None, name=None, natNetworking=None, vmMemory=None, swapSize=None, diskAdapter=None, installLabelPath=None, baseFileName=None, vmSnapshots=None, valueOf_=''):
+        self.autoResolve = _cast(bool, autoResolve)
+        self.freespace = _cast(int, freespace)
+        self.name = _cast(None, name)
+        self.natNetworking = _cast(bool, natNetworking)
+        self.vmMemory = _cast(int, vmMemory)
+        self.swapSize = _cast(int, swapSize)
+        self.diskAdapter = _cast(None, diskAdapter)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.baseFileName = _cast(None, baseFileName)
+        self.vmSnapshots = _cast(bool, vmSnapshots)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if vmwareImageType.subclass:
+            return vmwareImageType.subclass(*args_, **kwargs_)
+        else:
+            return vmwareImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_freespace(self): return self.freespace
+    def set_freespace(self, freespace): self.freespace = freespace
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def get_natNetworking(self): return self.natNetworking
+    def set_natNetworking(self, natNetworking): self.natNetworking = natNetworking
+    def get_vmMemory(self): return self.vmMemory
+    def set_vmMemory(self, vmMemory): self.vmMemory = vmMemory
+    def get_swapSize(self): return self.swapSize
+    def set_swapSize(self, swapSize): self.swapSize = swapSize
+    def get_diskAdapter(self): return self.diskAdapter
+    def set_diskAdapter(self, diskAdapter): self.diskAdapter = diskAdapter
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def get_vmSnapshots(self): return self.vmSnapshots
+    def set_vmSnapshots(self, vmSnapshots): self.vmSnapshots = vmSnapshots
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='vmwareImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='vmwareImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='vmwareImageType'):
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.freespace is not None:
+            outfile.write(' freespace="%s"' % self.format_integer(self.freespace, input_name='freespace'))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+        if self.natNetworking is not None:
+            outfile.write(' natNetworking="%s"' % self.format_boolean(str_lower(str(self.natNetworking)), input_name='natNetworking'))
+        if self.vmMemory is not None:
+            outfile.write(' vmMemory="%s"' % self.format_integer(self.vmMemory, input_name='vmMemory'))
+        if self.swapSize is not None:
+            outfile.write(' swapSize="%s"' % self.format_integer(self.swapSize, input_name='swapSize'))
+        if self.diskAdapter is not None:
+            outfile.write(' diskAdapter=%s' % (self.format_string(quote_attrib(self.diskAdapter).encode(ExternalEncoding), input_name='diskAdapter'), ))
+        if self.installLabelPath is not None:
+            outfile.write(' installLabelPath=%s' % (self.format_string(quote_attrib(self.installLabelPath).encode(ExternalEncoding), input_name='installLabelPath'), ))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+        if self.vmSnapshots is not None:
+            outfile.write(' vmSnapshots="%s"' % self.format_boolean(str_lower(str(self.vmSnapshots)), input_name='vmSnapshots'))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='vmwareImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='vmwareImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.autoResolve is not None:
+            showIndent(outfile, level)
+            outfile.write('autoResolve = %s,\n' % (self.autoResolve,))
+        if self.freespace is not None:
+            showIndent(outfile, level)
+            outfile.write('freespace = %s,\n' % (self.freespace,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+        if self.natNetworking is not None:
+            showIndent(outfile, level)
+            outfile.write('natNetworking = %s,\n' % (self.natNetworking,))
+        if self.vmMemory is not None:
+            showIndent(outfile, level)
+            outfile.write('vmMemory = %s,\n' % (self.vmMemory,))
+        if self.swapSize is not None:
+            showIndent(outfile, level)
+            outfile.write('swapSize = %s,\n' % (self.swapSize,))
+        if self.diskAdapter is not None:
+            showIndent(outfile, level)
+            outfile.write('diskAdapter = %s,\n' % (self.diskAdapter,))
+        if self.installLabelPath is not None:
+            showIndent(outfile, level)
+            outfile.write('installLabelPath = %s,\n' % (self.installLabelPath,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+        if self.vmSnapshots is not None:
+            showIndent(outfile, level)
+            outfile.write('vmSnapshots = %s,\n' % (self.vmSnapshots,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('autoResolve'):
+            if attrs.get('autoResolve').value in ('true', '1'):
+                self.autoResolve = True
+            elif attrs.get('autoResolve').value in ('false', '0'):
+                self.autoResolve = False
+            else:
+                raise ValueError('Bad boolean attribute (autoResolve)')
+        if attrs.get('freespace'):
+            try:
+                self.freespace = int(attrs.get('freespace').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (freespace): %s' % exp)
+            if self.freespace < 0:
+                raise ValueError('Invalid NonNegativeInteger (freespace)')
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+        if attrs.get('natNetworking'):
+            if attrs.get('natNetworking').value in ('true', '1'):
+                self.natNetworking = True
+            elif attrs.get('natNetworking').value in ('false', '0'):
+                self.natNetworking = False
+            else:
+                raise ValueError('Bad boolean attribute (natNetworking)')
+        if attrs.get('vmMemory'):
+            try:
+                self.vmMemory = int(attrs.get('vmMemory').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (vmMemory): %s' % exp)
+            if self.vmMemory < 0:
+                raise ValueError('Invalid NonNegativeInteger (vmMemory)')
+        if attrs.get('swapSize'):
+            try:
+                self.swapSize = int(attrs.get('swapSize').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (swapSize): %s' % exp)
+            if self.swapSize < 0:
+                raise ValueError('Invalid NonNegativeInteger (swapSize)')
+        if attrs.get('diskAdapter'):
+            self.diskAdapter = attrs.get('diskAdapter').value
+        if attrs.get('installLabelPath'):
+            self.installLabelPath = attrs.get('installLabelPath').value
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+        if attrs.get('vmSnapshots'):
+            if attrs.get('vmSnapshots').value in ('true', '1'):
+                self.vmSnapshots = True
+            elif attrs.get('vmSnapshots').value in ('false', '0'):
+                self.vmSnapshots = False
+            else:
+                raise ValueError('Bad boolean attribute (vmSnapshots)')
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class vmwareImageType
+
+
+class xenOvaImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('freespace', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('vmMemory', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('swapSize', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, autoResolve=None, freespace=None, name=None, vmMemory=None, swapSize=None, baseFileName=None, installLabelPath=None, valueOf_=''):
+        self.autoResolve = _cast(bool, autoResolve)
+        self.freespace = _cast(int, freespace)
+        self.name = _cast(None, name)
+        self.vmMemory = _cast(int, vmMemory)
+        self.swapSize = _cast(int, swapSize)
+        self.baseFileName = _cast(None, baseFileName)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if xenOvaImageType.subclass:
+            return xenOvaImageType.subclass(*args_, **kwargs_)
+        else:
+            return xenOvaImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_freespace(self): return self.freespace
+    def set_freespace(self, freespace): self.freespace = freespace
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def get_vmMemory(self): return self.vmMemory
+    def set_vmMemory(self, vmMemory): self.vmMemory = vmMemory
+    def get_swapSize(self): return self.swapSize
+    def set_swapSize(self, swapSize): self.swapSize = swapSize
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='xenOvaImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='xenOvaImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='xenOvaImageType'):
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.freespace is not None:
+            outfile.write(' freespace="%s"' % self.format_integer(self.freespace, input_name='freespace'))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+        if self.vmMemory is not None:
+            outfile.write(' vmMemory="%s"' % self.format_integer(self.vmMemory, input_name='vmMemory'))
+        if self.swapSize is not None:
+            outfile.write(' swapSize="%s"' % self.format_integer(self.swapSize, input_name='swapSize'))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+        if self.installLabelPath is not None:
+            outfile.write(' installLabelPath=%s' % (self.format_string(quote_attrib(self.installLabelPath).encode(ExternalEncoding), input_name='installLabelPath'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='xenOvaImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='xenOvaImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.autoResolve is not None:
+            showIndent(outfile, level)
+            outfile.write('autoResolve = %s,\n' % (self.autoResolve,))
+        if self.freespace is not None:
+            showIndent(outfile, level)
+            outfile.write('freespace = %s,\n' % (self.freespace,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+        if self.vmMemory is not None:
+            showIndent(outfile, level)
+            outfile.write('vmMemory = %s,\n' % (self.vmMemory,))
+        if self.swapSize is not None:
+            showIndent(outfile, level)
+            outfile.write('swapSize = %s,\n' % (self.swapSize,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+        if self.installLabelPath is not None:
+            showIndent(outfile, level)
+            outfile.write('installLabelPath = %s,\n' % (self.installLabelPath,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('autoResolve'):
+            if attrs.get('autoResolve').value in ('true', '1'):
+                self.autoResolve = True
+            elif attrs.get('autoResolve').value in ('false', '0'):
+                self.autoResolve = False
+            else:
+                raise ValueError('Bad boolean attribute (autoResolve)')
+        if attrs.get('freespace'):
+            try:
+                self.freespace = int(attrs.get('freespace').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (freespace): %s' % exp)
+            if self.freespace < 0:
+                raise ValueError('Invalid NonNegativeInteger (freespace)')
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+        if attrs.get('vmMemory'):
+            try:
+                self.vmMemory = int(attrs.get('vmMemory').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (vmMemory): %s' % exp)
+            if self.vmMemory < 0:
+                raise ValueError('Invalid NonNegativeInteger (vmMemory)')
+        if attrs.get('swapSize'):
+            try:
+                self.swapSize = int(attrs.get('swapSize').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (swapSize): %s' % exp)
+            if self.swapSize < 0:
+                raise ValueError('Invalid NonNegativeInteger (swapSize)')
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+        if attrs.get('installLabelPath'):
+            self.installLabelPath = attrs.get('installLabelPath').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class xenOvaImageType
+
+
+class buildDefinitionType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('build_', 'buildType', 1),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, build_=None):
+        if build_ is None:
+            self.build_ = []
+        else:
+            self.build_ = build_
+    def factory(*args_, **kwargs_):
+        if buildDefinitionType.subclass:
+            return buildDefinitionType.subclass(*args_, **kwargs_)
+        else:
+            return buildDefinitionType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_build(self): return self.build_
+    def set_build(self, build_): self.build_ = build_
+    def add_build(self, value): self.build_.append(value)
+    def insert_build(self, index, value): self.build_[index] = value
+    def export(self, outfile, level, namespace_='rpd:', name_='buildDefinitionType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='buildDefinitionType')
+        if self.hasContent_():
+            outfile.write('>\n')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            showIndent(outfile, level)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='buildDefinitionType'):
+        pass
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='buildDefinitionType'):
+        for build_ in self.build_:
+            build_.export(outfile, level, namespace_, name_='build')
+    def hasContent_(self):
+        if (
+            self.build_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='buildDefinitionType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        pass
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('build=[\n')
+        level += 1
+        for build in self.build:
+            showIndent(outfile, level)
+            outfile.write('model_.build(\n')
+            build.exportLiteral(outfile, level, name_='build')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        level -= 1
+        showIndent(outfile, level)
+        outfile.write('],\n')
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        pass
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'build':
+            obj_ = buildType.factory()
+            obj_.build(child_)
+            self.build_.append(obj_)
+# end class buildDefinitionType
+
+
+class buildType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('baseFlavor', 'rpd:flavorStringType', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('amiImage', 'amiImageType', 0),
+        _MemberSpec('applianceIsoImage', 'applianceIsoImageType', 0),
+        _MemberSpec('installableIsoImage', 'installableIsoImageType', 0),
+        _MemberSpec('liveIsoImage', 'liveIsoImageType', 0),
+        _MemberSpec('netbootImage', 'netbootImageType', 0),
+        _MemberSpec('rawFsImage', 'rawFsImageType', 0),
+        _MemberSpec('rawHdImage', 'rawHdImageType', 0),
+        _MemberSpec('tarballImage', 'tarballImageType', 0),
+        _MemberSpec('updateIsoImage', 'updateIsoImageType', 0),
+        _MemberSpec('vhdImage', 'vhdImageType', 0),
+        _MemberSpec('virtualIronImage', 'virtualIronImageType', 0),
+        _MemberSpec('vmwareImage', 'vmwareImageType', 0),
+        _MemberSpec('vmwareEsxImage', 'vmwareEsxImageType', 0),
+        _MemberSpec('xenOvaImage', 'xenOvaImageType', 0),
+        _MemberSpec('stage', 'stage', 1),
+        _MemberSpec('imageGroup', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, baseFlavor=None, name=None, amiImage=None, applianceIsoImage=None, installableIsoImage=None, liveIsoImage=None, netbootImage=None, rawFsImage=None, rawHdImage=None, tarballImage=None, updateIsoImage=None, vhdImage=None, virtualIronImage=None, vmwareImage=None, vmwareEsxImage=None, xenOvaImage=None, stage=None, imageGroup=None):
+        self.baseFlavor = _cast(None, baseFlavor)
+        self.name = _cast(None, name)
+        self.amiImage = amiImage
+        self.applianceIsoImage = applianceIsoImage
+        self.installableIsoImage = installableIsoImage
+        self.liveIsoImage = liveIsoImage
+        self.netbootImage = netbootImage
+        self.rawFsImage = rawFsImage
+        self.rawHdImage = rawHdImage
+        self.tarballImage = tarballImage
+        self.updateIsoImage = updateIsoImage
+        self.vhdImage = vhdImage
+        self.virtualIronImage = virtualIronImage
+        self.vmwareImage = vmwareImage
+        self.vmwareEsxImage = vmwareEsxImage
+        self.xenOvaImage = xenOvaImage
+        if stage is None:
+            self.stage = []
+        else:
+            self.stage = stage
+        self.imageGroup = imageGroup
+    def factory(*args_, **kwargs_):
+        if buildType.subclass:
+            return buildType.subclass(*args_, **kwargs_)
+        else:
+            return buildType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_amiImage(self): return self.amiImage
+    def set_amiImage(self, amiImage): self.amiImage = amiImage
+    def get_applianceIsoImage(self): return self.applianceIsoImage
+    def set_applianceIsoImage(self, applianceIsoImage): self.applianceIsoImage = applianceIsoImage
+    def get_installableIsoImage(self): return self.installableIsoImage
+    def set_installableIsoImage(self, installableIsoImage): self.installableIsoImage = installableIsoImage
+    def get_liveIsoImage(self): return self.liveIsoImage
+    def set_liveIsoImage(self, liveIsoImage): self.liveIsoImage = liveIsoImage
+    def get_netbootImage(self): return self.netbootImage
+    def set_netbootImage(self, netbootImage): self.netbootImage = netbootImage
+    def get_rawFsImage(self): return self.rawFsImage
+    def set_rawFsImage(self, rawFsImage): self.rawFsImage = rawFsImage
+    def get_rawHdImage(self): return self.rawHdImage
+    def set_rawHdImage(self, rawHdImage): self.rawHdImage = rawHdImage
+    def get_tarballImage(self): return self.tarballImage
+    def set_tarballImage(self, tarballImage): self.tarballImage = tarballImage
+    def get_updateIsoImage(self): return self.updateIsoImage
+    def set_updateIsoImage(self, updateIsoImage): self.updateIsoImage = updateIsoImage
+    def get_vhdImage(self): return self.vhdImage
+    def set_vhdImage(self, vhdImage): self.vhdImage = vhdImage
+    def get_virtualIronImage(self): return self.virtualIronImage
+    def set_virtualIronImage(self, virtualIronImage): self.virtualIronImage = virtualIronImage
+    def get_vmwareImage(self): return self.vmwareImage
+    def set_vmwareImage(self, vmwareImage): self.vmwareImage = vmwareImage
+    def get_vmwareEsxImage(self): return self.vmwareEsxImage
+    def set_vmwareEsxImage(self, vmwareEsxImage): self.vmwareEsxImage = vmwareEsxImage
+    def get_xenOvaImage(self): return self.xenOvaImage
+    def set_xenOvaImage(self, xenOvaImage): self.xenOvaImage = xenOvaImage
+    def get_stage(self): return self.stage
+    def set_stage(self, stage): self.stage = stage
+    def add_stage(self, value): self.stage.append(value)
+    def insert_stage(self, index, value): self.stage[index] = value
+    def get_imageGroup(self): return self.imageGroup
+    def set_imageGroup(self, imageGroup): self.imageGroup = imageGroup
+    def validate_imageGroup(self, value):
+        # validate type imageGroup
+        pass
+    def get_baseFlavor(self): return self.baseFlavor
+    def set_baseFlavor(self, baseFlavor): self.baseFlavor = baseFlavor
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def export(self, outfile, level, namespace_='rpd:', name_='buildType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='buildType')
+        if self.hasContent_():
+            outfile.write('>\n')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            showIndent(outfile, level)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='buildType'):
+        if self.baseFlavor is not None:
+            outfile.write(' baseFlavor=%s' % (quote_attrib(self.baseFlavor), ))
+        outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='buildType'):
+        if self.amiImage:
+            self.amiImage.export(outfile, level, namespace_, name_='amiImage', )
+        if self.applianceIsoImage:
+            self.applianceIsoImage.export(outfile, level, namespace_, name_='applianceIsoImage', )
+        if self.installableIsoImage:
+            self.installableIsoImage.export(outfile, level, namespace_, name_='installableIsoImage', )
+        if self.liveIsoImage:
+            self.liveIsoImage.export(outfile, level, namespace_, name_='liveIsoImage', )
+        if self.netbootImage:
+            self.netbootImage.export(outfile, level, namespace_, name_='netbootImage', )
+        if self.rawFsImage:
+            self.rawFsImage.export(outfile, level, namespace_, name_='rawFsImage', )
+        if self.rawHdImage:
+            self.rawHdImage.export(outfile, level, namespace_, name_='rawHdImage', )
+        if self.tarballImage:
+            self.tarballImage.export(outfile, level, namespace_, name_='tarballImage', )
+        if self.updateIsoImage:
+            self.updateIsoImage.export(outfile, level, namespace_, name_='updateIsoImage', )
+        if self.vhdImage:
+            self.vhdImage.export(outfile, level, namespace_, name_='vhdImage', )
+        if self.virtualIronImage:
+            self.virtualIronImage.export(outfile, level, namespace_, name_='virtualIronImage', )
+        if self.vmwareImage:
+            self.vmwareImage.export(outfile, level, namespace_, name_='vmwareImage', )
+        if self.vmwareEsxImage:
+            self.vmwareEsxImage.export(outfile, level, namespace_, name_='vmwareEsxImage', )
+        if self.xenOvaImage:
+            self.xenOvaImage.export(outfile, level, namespace_, name_='xenOvaImage', )
+        for stage_ in self.stage:
+            stage_.export(outfile, level, namespace_, name_='stage')
+        if self.imageGroup is not None:
+            showIndent(outfile, level)
+            outfile.write('<%simageGroup>%s</%simageGroup>\n' % (namespace_, self.format_string(quote_xml(self.imageGroup).encode(ExternalEncoding), input_name='imageGroup'), namespace_))
+    def hasContent_(self):
+        if (
+            self.amiImage is not None or
+            self.applianceIsoImage is not None or
+            self.installableIsoImage is not None or
+            self.liveIsoImage is not None or
+            self.netbootImage is not None or
+            self.rawFsImage is not None or
+            self.rawHdImage is not None or
+            self.tarballImage is not None or
+            self.updateIsoImage is not None or
+            self.vhdImage is not None or
+            self.virtualIronImage is not None or
+            self.vmwareImage is not None or
+            self.vmwareEsxImage is not None or
+            self.xenOvaImage is not None or
+            self.stage or
+            self.imageGroup is not None
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='buildType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.baseFlavor is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFlavor = "%s",\n' % (self.baseFlavor,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        if self.amiImage:
+            showIndent(outfile, level)
+            outfile.write('amiImage=model_.amiImageType(\n')
+            self.amiImage.exportLiteral(outfile, level, name_='amiImage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.applianceIsoImage:
+            showIndent(outfile, level)
+            outfile.write('applianceIsoImage=model_.applianceIsoImageType(\n')
+            self.applianceIsoImage.exportLiteral(outfile, level, name_='applianceIsoImage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.installableIsoImage:
+            showIndent(outfile, level)
+            outfile.write('installableIsoImage=model_.installableIsoImageType(\n')
+            self.installableIsoImage.exportLiteral(outfile, level, name_='installableIsoImage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.liveIsoImage:
+            showIndent(outfile, level)
+            outfile.write('liveIsoImage=model_.liveIsoImageType(\n')
+            self.liveIsoImage.exportLiteral(outfile, level, name_='liveIsoImage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.netbootImage:
+            showIndent(outfile, level)
+            outfile.write('netbootImage=model_.netbootImageType(\n')
+            self.netbootImage.exportLiteral(outfile, level, name_='netbootImage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.rawFsImage:
+            showIndent(outfile, level)
+            outfile.write('rawFsImage=model_.rawFsImageType(\n')
+            self.rawFsImage.exportLiteral(outfile, level, name_='rawFsImage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.rawHdImage:
+            showIndent(outfile, level)
+            outfile.write('rawHdImage=model_.rawHdImageType(\n')
+            self.rawHdImage.exportLiteral(outfile, level, name_='rawHdImage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.tarballImage:
+            showIndent(outfile, level)
+            outfile.write('tarballImage=model_.tarballImageType(\n')
+            self.tarballImage.exportLiteral(outfile, level, name_='tarballImage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.updateIsoImage:
+            showIndent(outfile, level)
+            outfile.write('updateIsoImage=model_.updateIsoImageType(\n')
+            self.updateIsoImage.exportLiteral(outfile, level, name_='updateIsoImage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.vhdImage:
+            showIndent(outfile, level)
+            outfile.write('vhdImage=model_.vhdImageType(\n')
+            self.vhdImage.exportLiteral(outfile, level, name_='vhdImage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.virtualIronImage:
+            showIndent(outfile, level)
+            outfile.write('virtualIronImage=model_.virtualIronImageType(\n')
+            self.virtualIronImage.exportLiteral(outfile, level, name_='virtualIronImage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.vmwareImage:
+            showIndent(outfile, level)
+            outfile.write('vmwareImage=model_.vmwareImageType(\n')
+            self.vmwareImage.exportLiteral(outfile, level, name_='vmwareImage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.vmwareEsxImage:
+            showIndent(outfile, level)
+            outfile.write('vmwareEsxImage=model_.vmwareEsxImageType(\n')
+            self.vmwareEsxImage.exportLiteral(outfile, level, name_='vmwareEsxImage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.xenOvaImage:
+            showIndent(outfile, level)
+            outfile.write('xenOvaImage=model_.xenOvaImageType(\n')
+            self.xenOvaImage.exportLiteral(outfile, level, name_='xenOvaImage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        showIndent(outfile, level)
+        outfile.write('stage=[\n')
+        level += 1
+        for stage in self.stage:
+            showIndent(outfile, level)
+            outfile.write('model_.stage(\n')
+            stage.exportLiteral(outfile, level)
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        level -= 1
+        showIndent(outfile, level)
+        outfile.write('],\n')
+        showIndent(outfile, level)
+        outfile.write('imageGroup=%s,\n' % quote_python(self.imageGroup).encode(ExternalEncoding))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('baseFlavor'):
+            self.baseFlavor = attrs.get('baseFlavor').value
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'amiImage':
+            obj_ = amiImageType.factory()
+            obj_.build(child_)
+            self.set_amiImage(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'applianceIsoImage':
+            obj_ = applianceIsoImageType.factory()
+            obj_.build(child_)
+            self.set_applianceIsoImage(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'installableIsoImage':
+            obj_ = installableIsoImageType.factory()
+            obj_.build(child_)
+            self.set_installableIsoImage(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'liveIsoImage':
+            obj_ = liveIsoImageType.factory()
+            obj_.build(child_)
+            self.set_liveIsoImage(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'netbootImage':
+            obj_ = netbootImageType.factory()
+            obj_.build(child_)
+            self.set_netbootImage(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'rawFsImage':
+            obj_ = rawFsImageType.factory()
+            obj_.build(child_)
+            self.set_rawFsImage(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'rawHdImage':
+            obj_ = rawHdImageType.factory()
+            obj_.build(child_)
+            self.set_rawHdImage(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'tarballImage':
+            obj_ = tarballImageType.factory()
+            obj_.build(child_)
+            self.set_tarballImage(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'updateIsoImage':
+            obj_ = updateIsoImageType.factory()
+            obj_.build(child_)
+            self.set_updateIsoImage(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'vhdImage':
+            obj_ = vhdImageType.factory()
+            obj_.build(child_)
+            self.set_vhdImage(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'virtualIronImage':
+            obj_ = virtualIronImageType.factory()
+            obj_.build(child_)
+            self.set_virtualIronImage(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'vmwareImage':
+            obj_ = vmwareImageType.factory()
+            obj_.build(child_)
+            self.set_vmwareImage(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'vmwareEsxImage':
+            obj_ = vmwareEsxImageType.factory()
+            obj_.build(child_)
+            self.set_vmwareEsxImage(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'xenOvaImage':
+            obj_ = xenOvaImageType.factory()
+            obj_.build(child_)
+            self.set_xenOvaImage(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'stage':
+            obj_ = stage.factory()
+            obj_.build(child_)
+            self.stage.append(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'imageGroup':
+            imageGroup_ = ''
+            for text__content_ in child_.childNodes:
+                imageGroup_ += text__content_.nodeValue
+            self.imageGroup = imageGroup_
+            self.validate_imageGroup(self.imageGroup)    # validate type imageGroup
+
+    def getBuildStages(self):
+        return [ x.get_ref() for x in self.get_stage() ]
+
+    def getBuildImageGroup(self):
+        val = self.get_imageGroup()
+        if val is None:
+            return self.parentImageGroup
+        return val
+
+    def getBuildSourceGroup(self):
+        val = self.get_sourceGroup()
+        if val is None:
+            return self.parentSourceGroup
+        return val
+
+    def getBuildBaseFlavor(self):
+        return self.buildFlavor
+
+    def getBuildImage(self):
+        fields = self.containerTemplateFields.copy()
+        if self.image:
+            fields.update(self.image.getFields())
+        return imageType.subclass.factory(**fields)
+
+    getBuildName = get_name
+# end class buildType
+
+
+class stage(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('ref', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, ref=None, valueOf_=''):
+        self.ref = _cast(None, ref)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if stage.subclass:
+            return stage.subclass(*args_, **kwargs_)
+        else:
+            return stage(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_ref(self): return self.ref
+    def set_ref(self, ref): self.ref = ref
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='stage', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='stage')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='stage'):
+        outfile.write(' ref=%s' % (self.format_string(quote_attrib(self.ref).encode(ExternalEncoding), input_name='ref'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='stage'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='stage'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.ref is not None:
+            showIndent(outfile, level)
+            outfile.write('ref = %s,\n' % (self.ref,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('ref'):
+            self.ref = attrs.get('ref').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class stage
+
+
+class productDefinition(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('version', 'xsd:string', 0),
+        _MemberSpec('productName', 'xsd:string', 0),
+        _MemberSpec('productShortname', 'xsd:string', 0),
+        _MemberSpec('productDescription', 'xsd:string', 0),
+        _MemberSpec('productVersion', 'xsd:string', 0),
+        _MemberSpec('productVersionDescription', 'xsd:string', 0),
+        _MemberSpec('conaryRepositoryHostname', 'xsd:string', 0),
+        _MemberSpec('conaryNamespace', 'xsd:string', 0),
+        _MemberSpec('imageGroup', 'xsd:string', 0),
+        _MemberSpec('baseFlavor', 'xsd:string', 0),
+        _MemberSpec('stages', 'stageListType', 0),
+        _MemberSpec('upstreamSources', 'upstreamSourceListType', 0),
+        _MemberSpec('factorySources', 'factorySourceListType', 0),
+        _MemberSpec('buildDefinition', 'buildDefinitionType', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, version=None, productName=None, productShortname=None, productDescription=None, productVersion=None, productVersionDescription=None, conaryRepositoryHostname=None, conaryNamespace=None, imageGroup=None, baseFlavor=None, stages=None, upstreamSources=None, factorySources=None, buildDefinition=None):
+        self.version = _cast(None, version)
+        self.productName = productName
+        self.productShortname = productShortname
+        self.productDescription = productDescription
+        self.productVersion = productVersion
+        self.productVersionDescription = productVersionDescription
+        self.conaryRepositoryHostname = conaryRepositoryHostname
+        self.conaryNamespace = conaryNamespace
+        self.imageGroup = imageGroup
+        self.baseFlavor = baseFlavor
+        self.stages = stages
+        self.upstreamSources = upstreamSources
+        self.factorySources = factorySources
+        self.buildDefinition = buildDefinition
+    def factory(*args_, **kwargs_):
+        if productDefinition.subclass:
+            return productDefinition.subclass(*args_, **kwargs_)
+        else:
+            return productDefinition(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_productName(self): return self.productName
+    def set_productName(self, productName): self.productName = productName
+    def get_productShortname(self): return self.productShortname
+    def set_productShortname(self, productShortname): self.productShortname = productShortname
+    def get_productDescription(self): return self.productDescription
+    def set_productDescription(self, productDescription): self.productDescription = productDescription
+    def get_productVersion(self): return self.productVersion
+    def set_productVersion(self, productVersion): self.productVersion = productVersion
+    def get_productVersionDescription(self): return self.productVersionDescription
+    def set_productVersionDescription(self, productVersionDescription): self.productVersionDescription = productVersionDescription
+    def get_conaryRepositoryHostname(self): return self.conaryRepositoryHostname
+    def set_conaryRepositoryHostname(self, conaryRepositoryHostname): self.conaryRepositoryHostname = conaryRepositoryHostname
+    def get_conaryNamespace(self): return self.conaryNamespace
+    def set_conaryNamespace(self, conaryNamespace): self.conaryNamespace = conaryNamespace
+    def get_imageGroup(self): return self.imageGroup
+    def set_imageGroup(self, imageGroup): self.imageGroup = imageGroup
+    def validate_imageGroup(self, value):
+        # validate type imageGroup
+        pass
+    def get_baseFlavor(self): return self.baseFlavor
+    def set_baseFlavor(self, baseFlavor): self.baseFlavor = baseFlavor
+    def validate_baseFlavor(self, value):
+        # validate type baseFlavor
+        pass
+    def get_stages(self): return self.stages
+    def set_stages(self, stages): self.stages = stages
+    def get_upstreamSources(self): return self.upstreamSources
+    def set_upstreamSources(self, upstreamSources): self.upstreamSources = upstreamSources
+    def get_factorySources(self): return self.factorySources
+    def set_factorySources(self, factorySources): self.factorySources = factorySources
+    def get_buildDefinition(self): return self.buildDefinition
+    def set_buildDefinition(self, buildDefinition): self.buildDefinition = buildDefinition
+    def get_version(self): return self.version
+    def set_version(self, version): self.version = version
+    def export(self, outfile, level, namespace_='rpd:', name_='productDefinition', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='productDefinition')
+        if self.hasContent_():
+            outfile.write('>\n')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            showIndent(outfile, level)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='productDefinition'):
+        if self.version is not None:
+            outfile.write(' version=%s' % (self.format_string(quote_attrib(self.version).encode(ExternalEncoding), input_name='version'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='productDefinition'):
+        if self.productName is not None:
+            showIndent(outfile, level)
+            outfile.write('<%sproductName>%s</%sproductName>\n' % (namespace_, self.format_string(quote_xml(self.productName).encode(ExternalEncoding), input_name='productName'), namespace_))
+        if self.productShortname is not None:
+            showIndent(outfile, level)
+            outfile.write('<%sproductShortname>%s</%sproductShortname>\n' % (namespace_, self.format_string(quote_xml(self.productShortname).encode(ExternalEncoding), input_name='productShortname'), namespace_))
+        if self.productDescription is not None:
+            showIndent(outfile, level)
+            outfile.write('<%sproductDescription>%s</%sproductDescription>\n' % (namespace_, self.format_string(quote_xml(self.productDescription).encode(ExternalEncoding), input_name='productDescription'), namespace_))
+        if self.productVersion is not None:
+            showIndent(outfile, level)
+            outfile.write('<%sproductVersion>%s</%sproductVersion>\n' % (namespace_, self.format_string(quote_xml(self.productVersion).encode(ExternalEncoding), input_name='productVersion'), namespace_))
+        if self.productVersionDescription is not None:
+            showIndent(outfile, level)
+            outfile.write('<%sproductVersionDescription>%s</%sproductVersionDescription>\n' % (namespace_, self.format_string(quote_xml(self.productVersionDescription).encode(ExternalEncoding), input_name='productVersionDescription'), namespace_))
+        if self.conaryRepositoryHostname is not None:
+            showIndent(outfile, level)
+            outfile.write('<%sconaryRepositoryHostname>%s</%sconaryRepositoryHostname>\n' % (namespace_, self.format_string(quote_xml(self.conaryRepositoryHostname).encode(ExternalEncoding), input_name='conaryRepositoryHostname'), namespace_))
+        if self.conaryNamespace is not None:
+            showIndent(outfile, level)
+            outfile.write('<%sconaryNamespace>%s</%sconaryNamespace>\n' % (namespace_, self.format_string(quote_xml(self.conaryNamespace).encode(ExternalEncoding), input_name='conaryNamespace'), namespace_))
+        if self.imageGroup is not None:
+            showIndent(outfile, level)
+            outfile.write('<%simageGroup>%s</%simageGroup>\n' % (namespace_, self.format_string(quote_xml(self.imageGroup).encode(ExternalEncoding), input_name='imageGroup'), namespace_))
+        if self.baseFlavor is not None:
+            showIndent(outfile, level)
+            outfile.write('<%sbaseFlavor>%s</%sbaseFlavor>\n' % (namespace_, self.format_string(quote_xml(self.baseFlavor).encode(ExternalEncoding), input_name='baseFlavor'), namespace_))
+        if self.stages:
+            self.stages.export(outfile, level, namespace_, name_='stages', )
+        if self.upstreamSources:
+            self.upstreamSources.export(outfile, level, namespace_, name_='upstreamSources', )
+        if self.factorySources:
+            self.factorySources.export(outfile, level, namespace_, name_='factorySources')
+        if self.buildDefinition:
+            self.buildDefinition.export(outfile, level, namespace_, name_='buildDefinition', )
+    def hasContent_(self):
+        if (
+            self.productName is not None or
+            self.productShortname is not None or
+            self.productDescription is not None or
+            self.productVersion is not None or
+            self.productVersionDescription is not None or
+            self.conaryRepositoryHostname is not None or
+            self.conaryNamespace is not None or
+            self.imageGroup is not None or
+            self.baseFlavor is not None or
+            self.stages is not None or
+            self.upstreamSources is not None or
+            self.factorySources is not None or
+            self.buildDefinition is not None
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='productDefinition'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.version is not None:
+            showIndent(outfile, level)
+            outfile.write('version = %s,\n' % (self.version,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('productName=%s,\n' % quote_python(self.productName).encode(ExternalEncoding))
+        showIndent(outfile, level)
+        outfile.write('productShortname=%s,\n' % quote_python(self.productShortname).encode(ExternalEncoding))
+        showIndent(outfile, level)
+        outfile.write('productDescription=%s,\n' % quote_python(self.productDescription).encode(ExternalEncoding))
+        showIndent(outfile, level)
+        outfile.write('productVersion=%s,\n' % quote_python(self.productVersion).encode(ExternalEncoding))
+        showIndent(outfile, level)
+        outfile.write('productVersionDescription=%s,\n' % quote_python(self.productVersionDescription).encode(ExternalEncoding))
+        showIndent(outfile, level)
+        outfile.write('conaryRepositoryHostname=%s,\n' % quote_python(self.conaryRepositoryHostname).encode(ExternalEncoding))
+        showIndent(outfile, level)
+        outfile.write('conaryNamespace=%s,\n' % quote_python(self.conaryNamespace).encode(ExternalEncoding))
+        showIndent(outfile, level)
+        outfile.write('imageGroup=%s,\n' % quote_python(self.imageGroup).encode(ExternalEncoding))
+        showIndent(outfile, level)
+        outfile.write('baseFlavor=%s,\n' % quote_python(self.baseFlavor).encode(ExternalEncoding))
+        if self.stages:
+            showIndent(outfile, level)
+            outfile.write('stages=model_.stageListType(\n')
+            self.stages.exportLiteral(outfile, level, name_='stages')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.upstreamSources:
+            showIndent(outfile, level)
+            outfile.write('upstreamSources=model_.upstreamSourceListType(\n')
+            self.upstreamSources.exportLiteral(outfile, level, name_='upstreamSources')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.factorySources:
+            showIndent(outfile, level)
+            outfile.write('factorySources=model_.factorySourceListType(\n')
+            self.factorySources.exportLiteral(outfile, level, name_='factorySources')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.buildDefinition:
+            showIndent(outfile, level)
+            outfile.write('buildDefinition=model_.buildDefinitionType(\n')
+            self.buildDefinition.exportLiteral(outfile, level, name_='buildDefinition')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('version'):
+            self.version = attrs.get('version').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'productName':
+            productName_ = ''
+            for text__content_ in child_.childNodes:
+                productName_ += text__content_.nodeValue
+            self.productName = productName_
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'productShortname':
+            productShortname_ = ''
+            for text__content_ in child_.childNodes:
+                productShortname_ += text__content_.nodeValue
+            self.productShortname = productShortname_
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'productDescription':
+            productDescription_ = ''
+            for text__content_ in child_.childNodes:
+                productDescription_ += text__content_.nodeValue
+            self.productDescription = productDescription_
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'productVersion':
+            productVersion_ = ''
+            for text__content_ in child_.childNodes:
+                productVersion_ += text__content_.nodeValue
+            self.productVersion = productVersion_
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'productVersionDescription':
+            productVersionDescription_ = ''
+            for text__content_ in child_.childNodes:
+                productVersionDescription_ += text__content_.nodeValue
+            self.productVersionDescription = productVersionDescription_
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'conaryRepositoryHostname':
+            conaryRepositoryHostname_ = ''
+            for text__content_ in child_.childNodes:
+                conaryRepositoryHostname_ += text__content_.nodeValue
+            self.conaryRepositoryHostname = conaryRepositoryHostname_
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'conaryNamespace':
+            conaryNamespace_ = ''
+            for text__content_ in child_.childNodes:
+                conaryNamespace_ += text__content_.nodeValue
+            self.conaryNamespace = conaryNamespace_
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'imageGroup':
+            imageGroup_ = ''
+            for text__content_ in child_.childNodes:
+                imageGroup_ += text__content_.nodeValue
+            self.imageGroup = imageGroup_
+            self.validate_imageGroup(self.imageGroup)    # validate type imageGroup
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'baseFlavor':
+            baseFlavor_ = ''
+            for text__content_ in child_.childNodes:
+                baseFlavor_ += text__content_.nodeValue
+            self.baseFlavor = baseFlavor_
+            self.validate_baseFlavor(self.baseFlavor)    # validate type baseFlavor
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'stages':
+            obj_ = stageListType.factory()
+            obj_.build(child_)
+            self.set_stages(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'upstreamSources':
+            obj_ = upstreamSourceListType.factory()
+            obj_.build(child_)
+            self.set_upstreamSources(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'factorySources':
+            obj_ = factorySourceListType.factory()
+            obj_.build(child_)
+            self.set_factorySources(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'buildDefinition':
+            obj_ = buildDefinitionType.factory()
+            obj_.build(child_)
+            self.set_buildDefinition(obj_)
+# end class productDefinition
+
+
+USAGE_TEXT = """
+Usage: python <Parser>.py [ -s ] <in_xml_file>
+Options:
+    -s        Use the SAX parser, not the minidom parser.
+"""
+
+def usage():
+    print USAGE_TEXT
+    sys.exit(1)
+
+
+def parse(inFileName):
+    doc = minidom.parse(inFileName)
+    rootNode = doc.documentElement
+    rootObj = stageType.factory()
+    rootObj.build(rootNode)
+    # Enable Python to collect the space used by the DOM.
+    doc = None
+##     sys.stdout.write('<?xml version="1.0" ?>\n')
+##     rootObj.export(sys.stdout, 0, name_="stageType", 
+##         namespacedef_='')
+    return rootObj
+
+
+def parseString(inString):
+    doc = minidom.parseString(inString)
+    rootNode = doc.documentElement
+    rootObj = stageType.factory()
+    rootObj.build(rootNode)
+    # Enable Python to collect the space used by the DOM.
+    doc = None
+##     sys.stdout.write('<?xml version="1.0" ?>\n')
+##     rootObj.export(sys.stdout, 0, name_="stageType",
+##         namespacedef_='')
+    return rootObj
+
+
+def parseLiteral(inFileName):
+    doc = minidom.parse(inFileName)
+    rootNode = doc.documentElement
+    rootObj = stageType.factory()
+    rootObj.build(rootNode)
+    # Enable Python to collect the space used by the DOM.
+    doc = None
+##     sys.stdout.write('from supers import *\n\n')
+##     sys.stdout.write('rootObj = stageType(\n')
+##     rootObj.exportLiteral(sys.stdout, 0, name_="stageType")
+##     sys.stdout.write(')\n')
+    return rootObj
+
+
+def main():
+    args = sys.argv[1:]
+    if len(args) == 1:
+        parse(args[0])
+    else:
+        usage()
+
+
+if __name__ == '__main__':
+    main()
+    #import pdb
+    #pdb.run('main()')
+
diff --git a/rpath_proddef/xml_1_1/__init__.py b/rpath_proddef/xml_1_1/__init__.py
new file mode 100644
diff --git a/rpath_proddef/xml_1_1/generatedssuper.py b/rpath_proddef/xml_1_1/generatedssuper.py
new file mode 100644
--- /dev/null
+++ b/rpath_proddef/xml_1_1/generatedssuper.py
@@ -0,0 +1,34 @@
+class GeneratedsSuper(object):
+    def format_string(self, input_data, input_name=''):
+        return input_data
+    def format_integer(self, input_data, input_name=''):
+        return '%d' % input_data
+    def format_float(self, input_data, input_name=''):
+        return '%f' % input_data
+    def format_double(self, input_data, input_name=''):
+        return '%e' % input_data
+    def format_boolean(self, input_data, input_name=''):
+        return '%s' % input_data
+
+    def __eq__(self, obj):
+        if not isinstance(obj, self.__class__):
+            return False
+        if len(self._member_data_items) != len(obj._member_data_items):
+            return False
+        fields = (x.name for x in self._member_data_items)
+        for field in fields:
+            objL = getattr(self, field)
+            objR = getattr(obj, field)
+            if isinstance(objL, list):
+                if not isinstance(objR, list) or len(objL) != len(objR):
+                    return False
+                for (L, R) in zip(objL, objR):
+                    if L != R:
+                        return False
+                continue
+            if objL != objR:
+                return False
+        return True
+
+    def __ne__(self, obj):
+        return not self.__eq__(obj)
diff --git a/rpath_proddef/xml_1_1/subs.py b/rpath_proddef/xml_1_1/subs.py
new file mode 100644
--- /dev/null
+++ b/rpath_proddef/xml_1_1/subs.py
@@ -0,0 +1,330 @@
+#!/usr/bin/env python
+
+#
+# Generated  by generateDS.py version 1.18c.
+#
+
+import sys
+from string import lower as str_lower
+from xml.dom import minidom
+from xml.sax import handler, make_parser
+
+import supers as supermod
+
+#
+# Globals
+#
+
+ExternalEncoding = 'utf-8'
+
+#
+# Data representation classes
+#
+
+class stageTypeSub(supermod.stageType):
+    def __init__(self, labelSuffix=None, name=None, valueOf_=''):
+        supermod.stageType.__init__(self, labelSuffix, name, valueOf_)
+supermod.stageType.subclass = stageTypeSub
+# end class stageTypeSub
+
+
+class stageListTypeSub(supermod.stageListType):
+    def __init__(self, stage=None):
+        supermod.stageListType.__init__(self, stage)
+supermod.stageListType.subclass = stageListTypeSub
+# end class stageListTypeSub
+
+
+class searchPathTypeSub(supermod.searchPathType):
+    def __init__(self, troveName=None, version=None, label=None, valueOf_=''):
+        supermod.searchPathType.__init__(self, troveName, version, label, valueOf_)
+supermod.searchPathType.subclass = searchPathTypeSub
+# end class searchPathTypeSub
+
+
+class searchPathListTypeSub(supermod.searchPathListType):
+    def __init__(self, searchPath=None):
+        supermod.searchPathListType.__init__(self, searchPath)
+supermod.searchPathListType.subclass = searchPathListTypeSub
+# end class searchPathListTypeSub
+
+
+class factorySourceListTypeSub(supermod.factorySourceListType):
+    def __init__(self, factorySource=None):
+        supermod.factorySourceListType.__init__(self, factorySource)
+supermod.factorySourceListType.subclass = factorySourceListTypeSub
+# end class factorySourceListTypeSub
+
+
+class amiImageTypeSub(supermod.amiImageType):
+    def __init__(self, autoResolve=None, freespace=None, name=None, baseFileName=None, installLabelPath=None, amiHugeDiskMountpoint=None, valueOf_=''):
+        supermod.amiImageType.__init__(self, autoResolve, freespace, name, baseFileName, installLabelPath, amiHugeDiskMountpoint, valueOf_)
+supermod.amiImageType.subclass = amiImageTypeSub
+# end class amiImageTypeSub
+
+
+class applianceIsoImageTypeSub(supermod.applianceIsoImageType):
+    def __init__(self, maxIsoSize=None, autoResolve=None, bugsUrl=None, name=None, anacondaCustomTrove=None, betaNag=None, mediaTemplateTrove=None, installLabelPath=None, anacondaTemplatesTrove=None, baseFileName=None, showMediaCheck=None, valueOf_=''):
+        supermod.applianceIsoImageType.__init__(self, maxIsoSize, autoResolve, bugsUrl, name, anacondaCustomTrove, betaNag, mediaTemplateTrove, installLabelPath, anacondaTemplatesTrove, baseFileName, showMediaCheck, valueOf_)
+supermod.applianceIsoImageType.subclass = applianceIsoImageTypeSub
+# end class applianceIsoImageTypeSub
+
+
+class installableIsoImageTypeSub(supermod.installableIsoImageType):
+    def __init__(self, maxIsoSize=None, autoResolve=None, bugsUrl=None, name=None, anacondaCustomTrove=None, betaNag=None, mediaTemplateTrove=None, installLabelPath=None, anacondaTemplatesTrove=None, baseFileName=None, showMediaCheck=None, valueOf_=''):
+        supermod.installableIsoImageType.__init__(self, maxIsoSize, autoResolve, bugsUrl, name, anacondaCustomTrove, betaNag, mediaTemplateTrove, installLabelPath, anacondaTemplatesTrove, baseFileName, showMediaCheck, valueOf_)
+supermod.installableIsoImageType.subclass = installableIsoImageTypeSub
+# end class installableIsoImageTypeSub
+
+
+class liveIsoImageTypeSub(supermod.liveIsoImageType):
+    def __init__(self, autoResolve=None, name=None, zisofs=None, baseFileName=None, unionfs=None, installLabelPath=None, valueOf_=''):
+        supermod.liveIsoImageType.__init__(self, autoResolve, name, zisofs, baseFileName, unionfs, installLabelPath, valueOf_)
+supermod.liveIsoImageType.subclass = liveIsoImageTypeSub
+# end class liveIsoImageTypeSub
+
+
+class netbootImageTypeSub(supermod.netbootImageType):
+    def __init__(self, autoResolve=None, baseFileName=None, installLabelPath=None, name=None, valueOf_=''):
+        supermod.netbootImageType.__init__(self, autoResolve, baseFileName, installLabelPath, name, valueOf_)
+supermod.netbootImageType.subclass = netbootImageTypeSub
+# end class netbootImageTypeSub
+
+
+class rawFsImageTypeSub(supermod.rawFsImageType):
+    def __init__(self, autoResolve=None, freespace=None, name=None, swapSize=None, baseFileName=None, installLabelPath=None, valueOf_=''):
+        supermod.rawFsImageType.__init__(self, autoResolve, freespace, name, swapSize, baseFileName, installLabelPath, valueOf_)
+supermod.rawFsImageType.subclass = rawFsImageTypeSub
+# end class rawFsImageTypeSub
+
+
+class rawHdImageTypeSub(supermod.rawHdImageType):
+    def __init__(self, autoResolve=None, freespace=None, name=None, swapSize=None, baseFileName=None, installLabelPath=None, valueOf_=''):
+        supermod.rawHdImageType.__init__(self, autoResolve, freespace, name, swapSize, baseFileName, installLabelPath, valueOf_)
+supermod.rawHdImageType.subclass = rawHdImageTypeSub
+# end class rawHdImageTypeSub
+
+
+class tarballImageTypeSub(supermod.tarballImageType):
+    def __init__(self, autoResolve=None, baseFileName=None, installLabelPath=None, name=None, swapSize=None, valueOf_=''):
+        supermod.tarballImageType.__init__(self, autoResolve, baseFileName, installLabelPath, name, swapSize, valueOf_)
+supermod.tarballImageType.subclass = tarballImageTypeSub
+# end class tarballImageTypeSub
+
+
+class updateIsoImageTypeSub(supermod.updateIsoImageType):
+    def __init__(self, mediaTemplateTrove=None, baseFileName=None, valueOf_=''):
+        supermod.updateIsoImageType.__init__(self, mediaTemplateTrove, baseFileName, valueOf_)
+supermod.updateIsoImageType.subclass = updateIsoImageTypeSub
+# end class updateIsoImageTypeSub
+
+
+class vhdImageTypeSub(supermod.vhdImageType):
+    def __init__(self, autoResolve=None, freespace=None, name=None, vhdDiskType=None, swapSize=None, baseFileName=None, installLabelPath=None, valueOf_=''):
+        supermod.vhdImageType.__init__(self, autoResolve, freespace, name, vhdDiskType, swapSize, baseFileName, installLabelPath, valueOf_)
+supermod.vhdImageType.subclass = vhdImageTypeSub
+# end class vhdImageTypeSub
+
+
+class virtualIronImageTypeSub(supermod.virtualIronImageType):
+    def __init__(self, autoResolve=None, freespace=None, name=None, vhdDiskType=None, swapSize=None, baseFileName=None, installLabelPath=None, valueOf_=''):
+        supermod.virtualIronImageType.__init__(self, autoResolve, freespace, name, vhdDiskType, swapSize, baseFileName, installLabelPath, valueOf_)
+supermod.virtualIronImageType.subclass = virtualIronImageTypeSub
+# end class virtualIronImageTypeSub
+
+
+class vmwareEsxImageTypeSub(supermod.vmwareEsxImageType):
+    def __init__(self, autoResolve=None, freespace=None, name=None, natNetworking=None, vmMemory=None, swapSize=None, installLabelPath=None, baseFileName=None, valueOf_=''):
+        supermod.vmwareEsxImageType.__init__(self, autoResolve, freespace, name, natNetworking, vmMemory, swapSize, installLabelPath, baseFileName, valueOf_)
+supermod.vmwareEsxImageType.subclass = vmwareEsxImageTypeSub
+# end class vmwareEsxImageTypeSub
+
+
+class vmwareImageTypeSub(supermod.vmwareImageType):
+    def __init__(self, autoResolve=None, freespace=None, name=None, natNetworking=None, vmMemory=None, swapSize=None, diskAdapter=None, installLabelPath=None, baseFileName=None, vmSnapshots=None, valueOf_=''):
+        supermod.vmwareImageType.__init__(self, autoResolve, freespace, name, natNetworking, vmMemory, swapSize, diskAdapter, installLabelPath, baseFileName, vmSnapshots, valueOf_)
+supermod.vmwareImageType.subclass = vmwareImageTypeSub
+# end class vmwareImageTypeSub
+
+
+class xenOvaImageTypeSub(supermod.xenOvaImageType):
+    def __init__(self, autoResolve=None, freespace=None, name=None, vmMemory=None, swapSize=None, baseFileName=None, installLabelPath=None, valueOf_=''):
+        supermod.xenOvaImageType.__init__(self, autoResolve, freespace, name, vmMemory, swapSize, baseFileName, installLabelPath, valueOf_)
+supermod.xenOvaImageType.subclass = xenOvaImageTypeSub
+# end class xenOvaImageTypeSub
+
+
+class buildDefinitionTypeSub(supermod.buildDefinitionType):
+    def __init__(self, build_=None):
+        supermod.buildDefinitionType.__init__(self, build_)
+supermod.buildDefinitionType.subclass = buildDefinitionTypeSub
+# end class buildDefinitionTypeSub
+
+
+class buildTypeSub(supermod.buildType):
+    def __init__(self, baseFlavor=None, name=None, amiImage=None, applianceIsoImage=None, installableIsoImage=None, liveIsoImage=None, netbootImage=None, rawFsImage=None, rawHdImage=None, tarballImage=None, updateIsoImage=None, vhdImage=None, virtualIronImage=None, vmwareImage=None, vmwareEsxImage=None, xenOvaImage=None, stage=None, imageGroup=None):
+        supermod.buildType.__init__(self, baseFlavor, name, amiImage, applianceIsoImage, installableIsoImage, liveIsoImage, netbootImage, rawFsImage, rawHdImage, tarballImage, updateIsoImage, vhdImage, virtualIronImage, vmwareImage, vmwareEsxImage, xenOvaImage, stage, imageGroup)
+supermod.buildType.subclass = buildTypeSub
+# end class buildTypeSub
+
+
+class stageSub(supermod.stage):
+    def __init__(self, ref=None, valueOf_=''):
+        supermod.stage.__init__(self, ref, valueOf_)
+supermod.stage.subclass = stageSub
+# end class stageSub
+
+
+class platformDefinitionTypeSub(supermod.platformDefinitionType):
+    def __init__(self, version=None, baseFlavor=None, searchPaths=None, factorySources=None):
+        supermod.platformDefinitionType.__init__(self, version, baseFlavor, searchPaths, factorySources)
+supermod.platformDefinitionType.subclass = platformDefinitionTypeSub
+# end class platformDefinitionTypeSub
+
+
+class platformTypeSub(supermod.platformType):
+    def __init__(self, source=None, useLatest=None, baseFlavor=None, searchPaths=None, factorySources=None):
+        supermod.platformType.__init__(self, source, useLatest, baseFlavor, searchPaths, factorySources)
+supermod.platformType.subclass = platformTypeSub
+# end class platformTypeSub
+
+
+class productDefinitionSub(supermod.productDefinition):
+    def __init__(self, version=None, productName=None, productShortname=None, productDescription=None, productVersion=None, productVersionDescription=None, conaryRepositoryHostname=None, conaryNamespace=None, imageGroup=None, baseFlavor=None, stages=None, searchPaths=None, factorySources=None, buildDefinition=None, platform=None):
+        supermod.productDefinition.__init__(self, version, productName, productShortname, productDescription, productVersion, productVersionDescription, conaryRepositoryHostname, conaryNamespace, imageGroup, baseFlavor, stages, searchPaths, factorySources, buildDefinition, platform)
+supermod.productDefinition.subclass = productDefinitionSub
+# end class productDefinitionSub
+
+
+
+#
+# SAX handler used to determine the top level element.
+#
+class SaxSelectorHandler(handler.ContentHandler):
+    def __init__(self):
+        self.topElementName = None
+    def getTopElementName(self):
+        return self.topElementName
+    def startElement(self, name, attrs):
+        self.topElementName = name
+        raise StopIteration
+
+
+def parseSelect(inFileName):
+    infile = file(inFileName, 'r')
+    topElementName = None
+    parser = make_parser()
+    documentHandler = SaxSelectorHandler()
+    parser.setContentHandler(documentHandler)
+    try:
+        try:
+            parser.parse(infile)
+        except StopIteration:
+            topElementName = documentHandler.getTopElementName()
+        if topElementName is None:
+            raise RuntimeError, 'no top level element'
+        topElementName = topElementName.replace('-', '_').replace(':', '_')
+        if topElementName not in supermod.__dict__:
+            raise RuntimeError, 'no class for top element: %s' % topElementName
+        topElement = supermod.__dict__[topElementName]
+        infile.seek(0)
+        doc = minidom.parse(infile)
+    finally:
+        infile.close()
+    rootNode = doc.childNodes[0]
+    rootObj = topElement.factory()
+    rootObj.build(rootNode)
+    # Enable Python to collect the space used by the DOM.
+    doc = None
+##     sys.stdout.write('<?xml version="1.0" ?>\n')
+##     rootObj.export(sys.stdout, 0)
+    return rootObj
+
+
+def saxParse(inFileName):
+    parser = make_parser()
+    documentHandler = supermod.Sax_stageTypeHandler()
+    parser.setDocumentHandler(documentHandler)
+    parser.parse('file:%s' % inFileName)
+    rootObj = documentHandler.getRoot()
+    #sys.stdout.write('<?xml version="1.0" ?>\n')
+    #rootObj.export(sys.stdout, 0)
+    return rootObj
+
+
+def saxParseString(inString):
+    parser = make_parser()
+    documentHandler = supermod.SaxContentHandler()
+    parser.setDocumentHandler(documentHandler)
+    parser.feed(inString)
+    parser.close()
+    rootObj = documentHandler.getRoot()
+    #sys.stdout.write('<?xml version="1.0" ?>\n')
+    #rootObj.export(sys.stdout, 0)
+    return rootObj
+
+
+def parse(inFilename):
+    doc = minidom.parse(inFilename)
+    rootNode = doc.documentElement
+    rootObj = supermod.stageType.factory()
+    rootObj.build(rootNode)
+    # Enable Python to collect the space used by the DOM.
+    doc = None
+##     sys.stdout.write('<?xml version="1.0" ?>\n')
+##     rootObj.export(sys.stdout, 0, name_="stageType",
+##         namespacedef_='')
+    doc = None
+    return rootObj
+
+
+def parseString(inString):
+    doc = minidom.parseString(inString)
+    rootNode = doc.documentElement
+    rootObj = supermod.stageType.factory()
+    rootObj.build(rootNode)
+    # Enable Python to collect the space used by the DOM.
+    doc = None
+##     sys.stdout.write('<?xml version="1.0" ?>\n')
+##     rootObj.export(sys.stdout, 0, name_="stageType",
+##         namespacedef_='')
+    return rootObj
+
+
+def parseLiteral(inFilename):
+    doc = minidom.parse(inFilename)
+    rootNode = doc.documentElement
+    rootObj = supermod.stageType.factory()
+    rootObj.build(rootNode)
+    # Enable Python to collect the space used by the DOM.
+    doc = None
+##     sys.stdout.write('from supers import *\n\n')
+##     sys.stdout.write('rootObj = stageType(\n')
+##     rootObj.exportLiteral(sys.stdout, 0, name_="stageType")
+##     sys.stdout.write(')\n')
+    return rootObj
+
+
+USAGE_TEXT = """
+Usage: python ???.py <infilename>
+"""
+
+def usage():
+    print USAGE_TEXT
+    sys.exit(1)
+
+
+def main():
+    args = sys.argv[1:]
+    if len(args) != 1:
+        usage()
+    infilename = args[0]
+    root = parse(infilename)
+
+
+if __name__ == '__main__':
+    main()
+    #import pdb
+    #pdb.run('main()')
+
+
diff --git a/rpath_proddef/xml_1_1/supers.py b/rpath_proddef/xml_1_1/supers.py
new file mode 100644
--- /dev/null
+++ b/rpath_proddef/xml_1_1/supers.py
@@ -0,0 +1,4003 @@
+#!/usr/bin/env python
+
+#
+# Generated  by generateDS.py version 1.18c.
+#
+
+import sys
+import getopt
+from string import lower as str_lower
+from xml.dom import minidom
+from xml.dom import Node
+
+#
+# User methods
+#
+# Calls to the methods in these classes are generated by generateDS.py.
+# You can replace these methods by re-implementing the following class
+#   in a module named generatedssuper.py.
+
+try:
+    from generatedssuper import GeneratedsSuper
+except ImportError, exp:
+
+    class GeneratedsSuper:
+        def format_string(self, input_data, input_name=''):
+            return input_data
+        def format_integer(self, input_data, input_name=''):
+            return '%d' % input_data
+        def format_float(self, input_data, input_name=''):
+            return '%f' % input_data
+        def format_double(self, input_data, input_name=''):
+            return '%e' % input_data
+        def format_boolean(self, input_data, input_name=''):
+            return '%s' % input_data
+
+
+#
+# If you have installed IPython you can uncomment and use the following.
+# IPython is available from http://ipython.scipy.org/.
+#
+
+## from IPython.Shell import IPShellEmbed
+## args = ''
+## ipshell = IPShellEmbed(args,
+##     banner = 'Dropping into IPython',
+##     exit_msg = 'Leaving Interpreter, back to program.')
+
+# Then use the following line where and when you want to drop into the
+# IPython shell:
+#    ipshell('<some message> -- Entering ipshell.\nHit Ctrl-D to exit')
+
+#
+# Globals
+#
+
+ExternalEncoding = 'utf-8'
+
+#
+# Support/utility functions.
+#
+
+def showIndent(outfile, level):
+    for idx in range(level):
+        outfile.write('    ')
+
+def quote_xml(inStr):
+    s1 = (isinstance(inStr, basestring) and inStr or
+          '%s' % inStr)
+    s1 = s1.replace('&', '&amp;')
+    s1 = s1.replace('<', '&lt;')
+    s1 = s1.replace('>', '&gt;')
+    return s1
+
+def quote_attrib(inStr):
+    s1 = (isinstance(inStr, basestring) and inStr or
+          '%s' % inStr)
+    s1 = s1.replace('&', '&amp;')
+    s1 = s1.replace('<', '&lt;')
+    s1 = s1.replace('>', '&gt;')
+    if '"' in s1:
+        if "'" in s1:
+            s1 = '"%s"' % s1.replace('"', "&quot;")
+        else:
+            s1 = "'%s'" % s1
+    else:
+        s1 = '"%s"' % s1
+    return s1
+
+def quote_python(inStr):
+    s1 = inStr
+    if s1.find("'") == -1:
+        if s1.find('\n') == -1:
+            return "'%s'" % s1
+        else:
+            return "'''%s'''" % s1
+    else:
+        if s1.find('"') != -1:
+            s1 = s1.replace('"', '\\"')
+        if s1.find('\n') == -1:
+            return '"%s"' % s1
+        else:
+            return '"""%s"""' % s1
+
+
+class MixedContainer:
+    # Constants for category:
+    CategoryNone = 0
+    CategoryText = 1
+    CategorySimple = 2
+    CategoryComplex = 3
+    # Constants for content_type:
+    TypeNone = 0
+    TypeText = 1
+    TypeString = 2
+    TypeInteger = 3
+    TypeFloat = 4
+    TypeDecimal = 5
+    TypeDouble = 6
+    TypeBoolean = 7
+    def __init__(self, category, content_type, name, value):
+        self.category = category
+        self.content_type = content_type
+        self.name = name
+        self.value = value
+    def getCategory(self):
+        return self.category
+    def getContenttype(self, content_type):
+        return self.content_type
+    def getValue(self):
+        return self.value
+    def getName(self):
+        return self.name
+    def export(self, outfile, level, name, namespace):
+        if self.category == MixedContainer.CategoryText:
+            outfile.write(self.value)
+        elif self.category == MixedContainer.CategorySimple:
+            self.exportSimple(outfile, level, name)
+        else:    # category == MixedContainer.CategoryComplex
+            self.value.export(outfile, level, namespace,name)
+    def exportSimple(self, outfile, level, name):
+        if self.content_type == MixedContainer.TypeString:
+            outfile.write('<%s>%s</%s>' % (self.name, self.value, self.name))
+        elif self.content_type == MixedContainer.TypeInteger or \
+                self.content_type == MixedContainer.TypeBoolean:
+            outfile.write('<%s>%d</%s>' % (self.name, self.value, self.name))
+        elif self.content_type == MixedContainer.TypeFloat or \
+                self.content_type == MixedContainer.TypeDecimal:
+            outfile.write('<%s>%f</%s>' % (self.name, self.value, self.name))
+        elif self.content_type == MixedContainer.TypeDouble:
+            outfile.write('<%s>%g</%s>' % (self.name, self.value, self.name))
+    def exportLiteral(self, outfile, level, name):
+        if self.category == MixedContainer.CategoryText:
+            showIndent(outfile, level)
+            outfile.write('MixedContainer(%d, %d, "%s", "%s"),\n' % \
+                (self.category, self.content_type, self.name, self.value))
+        elif self.category == MixedContainer.CategorySimple:
+            showIndent(outfile, level)
+            outfile.write('MixedContainer(%d, %d, "%s", "%s"),\n' % \
+                (self.category, self.content_type, self.name, self.value))
+        else:    # category == MixedContainer.CategoryComplex
+            showIndent(outfile, level)
+            outfile.write('MixedContainer(%d, %d, "%s",\n' % \
+                (self.category, self.content_type, self.name,))
+            self.value.exportLiteral(outfile, level + 1)
+            showIndent(outfile, level)
+            outfile.write(')\n')
+
+
+class _MemberSpec(object):
+    def __init__(self, name='', data_type='', container=0):
+        self.name = name
+        self.data_type = data_type
+        self.container = container
+    def set_name(self, name): self.name = name
+    def get_name(self): return self.name
+    def set_data_type(self, data_type): self.data_type = data_type
+    def get_data_type(self): return self.data_type
+    def set_container(self, container): self.container = container
+    def get_container(self): return self.container
+
+def _cast(typ, value):
+    if typ is None or value is None:
+        return value
+    return typ(value)
+
+#
+# Data representation classes.
+#
+
+class stageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('labelSuffix', 'xsd:string', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, labelSuffix=None, name=None, valueOf_=''):
+        self.labelSuffix = _cast(None, labelSuffix)
+        self.name = _cast(None, name)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if stageType.subclass:
+            return stageType.subclass(*args_, **kwargs_)
+        else:
+            return stageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_labelSuffix(self): return self.labelSuffix
+    def set_labelSuffix(self, labelSuffix): self.labelSuffix = labelSuffix
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='stageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='stageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='stageType'):
+        outfile.write(' labelSuffix=%s' % (self.format_string(quote_attrib(self.labelSuffix).encode(ExternalEncoding), input_name='labelSuffix'), ))
+        outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='stageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='stageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.labelSuffix is not None:
+            showIndent(outfile, level)
+            outfile.write('labelSuffix = %s,\n' % (self.labelSuffix,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('labelSuffix'):
+            self.labelSuffix = attrs.get('labelSuffix').value
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+
+    def getPromoteMaps(self):
+        vals = self.get_promoteMaps()
+        if vals is None:
+            return []
+        return vals.get_promoteMap()
+# end class stageType
+
+
+class stageListType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('stage', 'stageType', 1),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, stage=None):
+        if stage is None:
+            self.stage = []
+        else:
+            self.stage = stage
+    def factory(*args_, **kwargs_):
+        if stageListType.subclass:
+            return stageListType.subclass(*args_, **kwargs_)
+        else:
+            return stageListType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_stage(self): return self.stage
+    def set_stage(self, stage): self.stage = stage
+    def add_stage(self, value): self.stage.append(value)
+    def insert_stage(self, index, value): self.stage[index] = value
+    def export(self, outfile, level, namespace_='rpd:', name_='stageListType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='stageListType')
+        if self.hasContent_():
+            outfile.write('>\n')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            showIndent(outfile, level)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='stageListType'):
+        pass
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='stageListType'):
+        for stage_ in self.stage:
+            stage_.export(outfile, level, namespace_, name_='stage')
+    def hasContent_(self):
+        if (
+            self.stage
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='stageListType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        pass
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('stage=[\n')
+        level += 1
+        for stage in self.stage:
+            showIndent(outfile, level)
+            outfile.write('model_.stage(\n')
+            stage.exportLiteral(outfile, level, name_='stage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        level -= 1
+        showIndent(outfile, level)
+        outfile.write('],\n')
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        pass
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'stage':
+            obj_ = stageType.factory()
+            obj_.build(child_)
+            self.stage.append(obj_)
+# end class stageListType
+
+
+class searchPathType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('troveName', 'xsd:string', 0),
+        _MemberSpec('version', 'xsd:string', 0),
+        _MemberSpec('label', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, troveName=None, version=None, label=None, valueOf_=''):
+        self.troveName = _cast(None, troveName)
+        self.version = _cast(None, version)
+        self.label = _cast(None, label)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if searchPathType.subclass:
+            return searchPathType.subclass(*args_, **kwargs_)
+        else:
+            return searchPathType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_troveName(self): return self.troveName
+    def set_troveName(self, troveName): self.troveName = troveName
+    def get_version(self): return self.version
+    def set_version(self, version): self.version = version
+    def get_label(self): return self.label
+    def set_label(self, label): self.label = label
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='searchPathType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='searchPathType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='searchPathType'):
+        if self.troveName is not None:
+            outfile.write(' troveName=%s' % (self.format_string(quote_attrib(self.troveName).encode(ExternalEncoding), input_name='troveName'), ))
+        if self.version is not None:
+            outfile.write(' version=%s' % (self.format_string(quote_attrib(self.version).encode(ExternalEncoding), input_name='version'), ))
+        if self.label is not None:
+            outfile.write(' label=%s' % (self.format_string(quote_attrib(self.label).encode(ExternalEncoding), input_name='label'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='searchPathType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='searchPathType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.troveName is not None:
+            showIndent(outfile, level)
+            outfile.write('troveName = %s,\n' % (self.troveName,))
+        if self.version is not None:
+            showIndent(outfile, level)
+            outfile.write('version = %s,\n' % (self.version,))
+        if self.label is not None:
+            showIndent(outfile, level)
+            outfile.write('label = %s,\n' % (self.label,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('troveName'):
+            self.troveName = attrs.get('troveName').value
+        if attrs.get('version'):
+            self.version = attrs.get('version').value
+        if attrs.get('label'):
+            self.label = attrs.get('label').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+
+    def getTroveTup(self, template=False):
+        """
+        Get a trovespec tuple for the search path or its template.
+
+        @param template: If C{True}, use the template path; otherwise
+            return the "pinned" path.
+        @type  template: C{bool}
+        @return: (name, version, flavor)
+        """
+        if template:
+            return (self.troveName, self.label, None)
+        else:
+            version = self.label
+            if self.version:
+                version += '/' + self.version
+            return (self.troveName, version, None)
+# end class searchPathType
+
+
+class searchPathListType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('searchPath', 'searchPathType', 1),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, searchPath=None):
+        if searchPath is None:
+            self.searchPath = []
+        else:
+            self.searchPath = searchPath
+    def factory(*args_, **kwargs_):
+        if searchPathListType.subclass:
+            return searchPathListType.subclass(*args_, **kwargs_)
+        else:
+            return searchPathListType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_searchPath(self): return self.searchPath
+    def set_searchPath(self, searchPath): self.searchPath = searchPath
+    def add_searchPath(self, value): self.searchPath.append(value)
+    def insert_searchPath(self, index, value): self.searchPath[index] = value
+    def export(self, outfile, level, namespace_='rpd:', name_='searchPathListType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='searchPathListType')
+        if self.hasContent_():
+            outfile.write('>\n')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            showIndent(outfile, level)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='searchPathListType'):
+        pass
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='searchPathListType'):
+        for searchPath_ in self.searchPath:
+            searchPath_.export(outfile, level, namespace_, name_='searchPath')
+    def hasContent_(self):
+        if (
+            self.searchPath
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='searchPathListType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        pass
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('searchPath=[\n')
+        level += 1
+        for searchPath in self.searchPath:
+            showIndent(outfile, level)
+            outfile.write('model_.searchPath(\n')
+            searchPath.exportLiteral(outfile, level, name_='searchPath')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        level -= 1
+        showIndent(outfile, level)
+        outfile.write('],\n')
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        pass
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'searchPath':
+            obj_ = searchPathType.factory()
+            obj_.build(child_)
+            self.searchPath.append(obj_)
+# end class searchPathListType
+
+
+class factorySourceListType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('factorySource', 'searchPathType', 1),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, factorySource=None):
+        if factorySource is None:
+            self.factorySource = []
+        else:
+            self.factorySource = factorySource
+    def factory(*args_, **kwargs_):
+        if factorySourceListType.subclass:
+            return factorySourceListType.subclass(*args_, **kwargs_)
+        else:
+            return factorySourceListType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_factorySource(self): return self.factorySource
+    def set_factorySource(self, factorySource): self.factorySource = factorySource
+    def add_factorySource(self, value): self.factorySource.append(value)
+    def insert_factorySource(self, index, value): self.factorySource[index] = value
+    def export(self, outfile, level, namespace_='rpd:', name_='factorySourceListType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='factorySourceListType')
+        if self.hasContent_():
+            outfile.write('>\n')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            showIndent(outfile, level)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='factorySourceListType'):
+        pass
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='factorySourceListType'):
+        for factorySource_ in self.factorySource:
+            factorySource_.export(outfile, level, namespace_, name_='factorySource')
+    def hasContent_(self):
+        if (
+            self.factorySource
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='factorySourceListType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        pass
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('factorySource=[\n')
+        level += 1
+        for factorySource in self.factorySource:
+            showIndent(outfile, level)
+            outfile.write('model_.factorySource(\n')
+            factorySource.exportLiteral(outfile, level, name_='factorySource')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        level -= 1
+        showIndent(outfile, level)
+        outfile.write('],\n')
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        pass
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'factorySource':
+            obj_ = searchPathType.factory()
+            obj_.build(child_)
+            self.factorySource.append(obj_)
+# end class factorySourceListType
+
+
+class amiImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('freespace', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        _MemberSpec('amiHugeDiskMountpoint', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, autoResolve=None, freespace=None, name=None, baseFileName=None, installLabelPath=None, amiHugeDiskMountpoint=None, valueOf_=''):
+        self.autoResolve = _cast(bool, autoResolve)
+        self.freespace = _cast(int, freespace)
+        self.name = _cast(None, name)
+        self.baseFileName = _cast(None, baseFileName)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.amiHugeDiskMountpoint = _cast(None, amiHugeDiskMountpoint)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if amiImageType.subclass:
+            return amiImageType.subclass(*args_, **kwargs_)
+        else:
+            return amiImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_freespace(self): return self.freespace
+    def set_freespace(self, freespace): self.freespace = freespace
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def get_amiHugeDiskMountpoint(self): return self.amiHugeDiskMountpoint
+    def set_amiHugeDiskMountpoint(self, amiHugeDiskMountpoint): self.amiHugeDiskMountpoint = amiHugeDiskMountpoint
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='amiImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='amiImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='amiImageType'):
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.freespace is not None:
+            outfile.write(' freespace="%s"' % self.format_integer(self.freespace, input_name='freespace'))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+        if self.installLabelPath is not None:
+            outfile.write(' installLabelPath=%s' % (self.format_string(quote_attrib(self.installLabelPath).encode(ExternalEncoding), input_name='installLabelPath'), ))
+        if self.amiHugeDiskMountpoint is not None:
+            outfile.write(' amiHugeDiskMountpoint=%s' % (self.format_string(quote_attrib(self.amiHugeDiskMountpoint).encode(ExternalEncoding), input_name='amiHugeDiskMountpoint'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='amiImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='amiImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.autoResolve is not None:
+            showIndent(outfile, level)
+            outfile.write('autoResolve = %s,\n' % (self.autoResolve,))
+        if self.freespace is not None:
+            showIndent(outfile, level)
+            outfile.write('freespace = %s,\n' % (self.freespace,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+        if self.installLabelPath is not None:
+            showIndent(outfile, level)
+            outfile.write('installLabelPath = %s,\n' % (self.installLabelPath,))
+        if self.amiHugeDiskMountpoint is not None:
+            showIndent(outfile, level)
+            outfile.write('amiHugeDiskMountpoint = %s,\n' % (self.amiHugeDiskMountpoint,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('autoResolve'):
+            if attrs.get('autoResolve').value in ('true', '1'):
+                self.autoResolve = True
+            elif attrs.get('autoResolve').value in ('false', '0'):
+                self.autoResolve = False
+            else:
+                raise ValueError('Bad boolean attribute (autoResolve)')
+        if attrs.get('freespace'):
+            try:
+                self.freespace = int(attrs.get('freespace').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (freespace): %s' % exp)
+            if self.freespace < 0:
+                raise ValueError('Invalid NonNegativeInteger (freespace)')
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+        if attrs.get('installLabelPath'):
+            self.installLabelPath = attrs.get('installLabelPath').value
+        if attrs.get('amiHugeDiskMountpoint'):
+            self.amiHugeDiskMountpoint = attrs.get('amiHugeDiskMountpoint').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class amiImageType
+
+
+class applianceIsoImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('maxIsoSize', 'xsd:positiveInteger', 0),
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('bugsUrl', 'xsd:string', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('anacondaCustomTrove', 'rpd:troveSpecType', 0),
+        _MemberSpec('betaNag', 'xsd:boolean', 0),
+        _MemberSpec('mediaTemplateTrove', 'rpd:troveSpecType', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        _MemberSpec('anacondaTemplatesTrove', 'rpd:troveSpecType', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        _MemberSpec('showMediaCheck', 'xsd:boolean', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, maxIsoSize=None, autoResolve=None, bugsUrl=None, name=None, anacondaCustomTrove=None, betaNag=None, mediaTemplateTrove=None, installLabelPath=None, anacondaTemplatesTrove=None, baseFileName=None, showMediaCheck=None, valueOf_=''):
+        self.maxIsoSize = _cast(int, maxIsoSize)
+        self.autoResolve = _cast(bool, autoResolve)
+        self.bugsUrl = _cast(None, bugsUrl)
+        self.name = _cast(None, name)
+        self.anacondaCustomTrove = _cast(None, anacondaCustomTrove)
+        self.betaNag = _cast(bool, betaNag)
+        self.mediaTemplateTrove = _cast(None, mediaTemplateTrove)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.anacondaTemplatesTrove = _cast(None, anacondaTemplatesTrove)
+        self.baseFileName = _cast(None, baseFileName)
+        self.showMediaCheck = _cast(bool, showMediaCheck)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if applianceIsoImageType.subclass:
+            return applianceIsoImageType.subclass(*args_, **kwargs_)
+        else:
+            return applianceIsoImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_maxIsoSize(self): return self.maxIsoSize
+    def set_maxIsoSize(self, maxIsoSize): self.maxIsoSize = maxIsoSize
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_bugsUrl(self): return self.bugsUrl
+    def set_bugsUrl(self, bugsUrl): self.bugsUrl = bugsUrl
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def get_anacondaCustomTrove(self): return self.anacondaCustomTrove
+    def set_anacondaCustomTrove(self, anacondaCustomTrove): self.anacondaCustomTrove = anacondaCustomTrove
+    def get_betaNag(self): return self.betaNag
+    def set_betaNag(self, betaNag): self.betaNag = betaNag
+    def get_mediaTemplateTrove(self): return self.mediaTemplateTrove
+    def set_mediaTemplateTrove(self, mediaTemplateTrove): self.mediaTemplateTrove = mediaTemplateTrove
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def get_anacondaTemplatesTrove(self): return self.anacondaTemplatesTrove
+    def set_anacondaTemplatesTrove(self, anacondaTemplatesTrove): self.anacondaTemplatesTrove = anacondaTemplatesTrove
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def get_showMediaCheck(self): return self.showMediaCheck
+    def set_showMediaCheck(self, showMediaCheck): self.showMediaCheck = showMediaCheck
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='applianceIsoImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='applianceIsoImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='applianceIsoImageType'):
+        if self.maxIsoSize is not None:
+            outfile.write(' maxIsoSize="%s"' % self.format_integer(self.maxIsoSize, input_name='maxIsoSize'))
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.bugsUrl is not None:
+            outfile.write(' bugsUrl=%s' % (self.format_string(quote_attrib(self.bugsUrl).encode(ExternalEncoding), input_name='bugsUrl'), ))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+        if self.anacondaCustomTrove is not None:
+            outfile.write(' anacondaCustomTrove=%s' % (quote_attrib(self.anacondaCustomTrove), ))
+        if self.betaNag is not None:
+            outfile.write(' betaNag="%s"' % self.format_boolean(str_lower(str(self.betaNag)), input_name='betaNag'))
+        if self.mediaTemplateTrove is not None:
+            outfile.write(' mediaTemplateTrove=%s' % (quote_attrib(self.mediaTemplateTrove), ))
+        if self.installLabelPath is not None:
+            outfile.write(' installLabelPath=%s' % (self.format_string(quote_attrib(self.installLabelPath).encode(ExternalEncoding), input_name='installLabelPath'), ))
+        if self.anacondaTemplatesTrove is not None:
+            outfile.write(' anacondaTemplatesTrove=%s' % (quote_attrib(self.anacondaTemplatesTrove), ))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+        if self.showMediaCheck is not None:
+            outfile.write(' showMediaCheck="%s"' % self.format_boolean(str_lower(str(self.showMediaCheck)), input_name='showMediaCheck'))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='applianceIsoImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='applianceIsoImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.maxIsoSize is not None:
+            showIndent(outfile, level)
+            outfile.write('maxIsoSize = %s,\n' % (self.maxIsoSize,))
+        if self.autoResolve is not None:
+            showIndent(outfile, level)
+            outfile.write('autoResolve = %s,\n' % (self.autoResolve,))
+        if self.bugsUrl is not None:
+            showIndent(outfile, level)
+            outfile.write('bugsUrl = %s,\n' % (self.bugsUrl,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+        if self.anacondaCustomTrove is not None:
+            showIndent(outfile, level)
+            outfile.write('anacondaCustomTrove = "%s",\n' % (self.anacondaCustomTrove,))
+        if self.betaNag is not None:
+            showIndent(outfile, level)
+            outfile.write('betaNag = %s,\n' % (self.betaNag,))
+        if self.mediaTemplateTrove is not None:
+            showIndent(outfile, level)
+            outfile.write('mediaTemplateTrove = "%s",\n' % (self.mediaTemplateTrove,))
+        if self.installLabelPath is not None:
+            showIndent(outfile, level)
+            outfile.write('installLabelPath = %s,\n' % (self.installLabelPath,))
+        if self.anacondaTemplatesTrove is not None:
+            showIndent(outfile, level)
+            outfile.write('anacondaTemplatesTrove = "%s",\n' % (self.anacondaTemplatesTrove,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+        if self.showMediaCheck is not None:
+            showIndent(outfile, level)
+            outfile.write('showMediaCheck = %s,\n' % (self.showMediaCheck,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('maxIsoSize'):
+            try:
+                self.maxIsoSize = int(attrs.get('maxIsoSize').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (maxIsoSize): %s' % exp)
+            if self.maxIsoSize <= 0:
+                raise ValueError('Invalid PositiveInteger (maxIsoSize)')
+        if attrs.get('autoResolve'):
+            if attrs.get('autoResolve').value in ('true', '1'):
+                self.autoResolve = True
+            elif attrs.get('autoResolve').value in ('false', '0'):
+                self.autoResolve = False
+            else:
+                raise ValueError('Bad boolean attribute (autoResolve)')
+        if attrs.get('bugsUrl'):
+            self.bugsUrl = attrs.get('bugsUrl').value
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+        if attrs.get('anacondaCustomTrove'):
+            self.anacondaCustomTrove = attrs.get('anacondaCustomTrove').value
+        if attrs.get('betaNag'):
+            if attrs.get('betaNag').value in ('true', '1'):
+                self.betaNag = True
+            elif attrs.get('betaNag').value in ('false', '0'):
+                self.betaNag = False
+            else:
+                raise ValueError('Bad boolean attribute (betaNag)')
+        if attrs.get('mediaTemplateTrove'):
+            self.mediaTemplateTrove = attrs.get('mediaTemplateTrove').value
+        if attrs.get('installLabelPath'):
+            self.installLabelPath = attrs.get('installLabelPath').value
+        if attrs.get('anacondaTemplatesTrove'):
+            self.anacondaTemplatesTrove = attrs.get('anacondaTemplatesTrove').value
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+        if attrs.get('showMediaCheck'):
+            if attrs.get('showMediaCheck').value in ('true', '1'):
+                self.showMediaCheck = True
+            elif attrs.get('showMediaCheck').value in ('false', '0'):
+                self.showMediaCheck = False
+            else:
+                raise ValueError('Bad boolean attribute (showMediaCheck)')
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class applianceIsoImageType
+
+
+class installableIsoImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('maxIsoSize', 'xsd:positiveInteger', 0),
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('bugsUrl', 'xsd:string', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('anacondaCustomTrove', 'rpd:troveSpecType', 0),
+        _MemberSpec('betaNag', 'xsd:boolean', 0),
+        _MemberSpec('mediaTemplateTrove', 'rpd:troveSpecType', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        _MemberSpec('anacondaTemplatesTrove', 'rpd:troveSpecType', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        _MemberSpec('showMediaCheck', 'xsd:boolean', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, maxIsoSize=None, autoResolve=None, bugsUrl=None, name=None, anacondaCustomTrove=None, betaNag=None, mediaTemplateTrove=None, installLabelPath=None, anacondaTemplatesTrove=None, baseFileName=None, showMediaCheck=None, valueOf_=''):
+        self.maxIsoSize = _cast(int, maxIsoSize)
+        self.autoResolve = _cast(bool, autoResolve)
+        self.bugsUrl = _cast(None, bugsUrl)
+        self.name = _cast(None, name)
+        self.anacondaCustomTrove = _cast(None, anacondaCustomTrove)
+        self.betaNag = _cast(bool, betaNag)
+        self.mediaTemplateTrove = _cast(None, mediaTemplateTrove)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.anacondaTemplatesTrove = _cast(None, anacondaTemplatesTrove)
+        self.baseFileName = _cast(None, baseFileName)
+        self.showMediaCheck = _cast(bool, showMediaCheck)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if installableIsoImageType.subclass:
+            return installableIsoImageType.subclass(*args_, **kwargs_)
+        else:
+            return installableIsoImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_maxIsoSize(self): return self.maxIsoSize
+    def set_maxIsoSize(self, maxIsoSize): self.maxIsoSize = maxIsoSize
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_bugsUrl(self): return self.bugsUrl
+    def set_bugsUrl(self, bugsUrl): self.bugsUrl = bugsUrl
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def get_anacondaCustomTrove(self): return self.anacondaCustomTrove
+    def set_anacondaCustomTrove(self, anacondaCustomTrove): self.anacondaCustomTrove = anacondaCustomTrove
+    def get_betaNag(self): return self.betaNag
+    def set_betaNag(self, betaNag): self.betaNag = betaNag
+    def get_mediaTemplateTrove(self): return self.mediaTemplateTrove
+    def set_mediaTemplateTrove(self, mediaTemplateTrove): self.mediaTemplateTrove = mediaTemplateTrove
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def get_anacondaTemplatesTrove(self): return self.anacondaTemplatesTrove
+    def set_anacondaTemplatesTrove(self, anacondaTemplatesTrove): self.anacondaTemplatesTrove = anacondaTemplatesTrove
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def get_showMediaCheck(self): return self.showMediaCheck
+    def set_showMediaCheck(self, showMediaCheck): self.showMediaCheck = showMediaCheck
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='installableIsoImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='installableIsoImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='installableIsoImageType'):
+        if self.maxIsoSize is not None:
+            outfile.write(' maxIsoSize="%s"' % self.format_integer(self.maxIsoSize, input_name='maxIsoSize'))
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.bugsUrl is not None:
+            outfile.write(' bugsUrl=%s' % (self.format_string(quote_attrib(self.bugsUrl).encode(ExternalEncoding), input_name='bugsUrl'), ))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+        if self.anacondaCustomTrove is not None:
+            outfile.write(' anacondaCustomTrove=%s' % (quote_attrib(self.anacondaCustomTrove), ))
+        if self.betaNag is not None:
+            outfile.write(' betaNag="%s"' % self.format_boolean(str_lower(str(self.betaNag)), input_name='betaNag'))
+        if self.mediaTemplateTrove is not None:
+            outfile.write(' mediaTemplateTrove=%s' % (quote_attrib(self.mediaTemplateTrove), ))
+        if self.installLabelPath is not None:
+            outfile.write(' installLabelPath=%s' % (self.format_string(quote_attrib(self.installLabelPath).encode(ExternalEncoding), input_name='installLabelPath'), ))
+        if self.anacondaTemplatesTrove is not None:
+            outfile.write(' anacondaTemplatesTrove=%s' % (quote_attrib(self.anacondaTemplatesTrove), ))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+        if self.showMediaCheck is not None:
+            outfile.write(' showMediaCheck="%s"' % self.format_boolean(str_lower(str(self.showMediaCheck)), input_name='showMediaCheck'))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='installableIsoImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='installableIsoImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.maxIsoSize is not None:
+            showIndent(outfile, level)
+            outfile.write('maxIsoSize = %s,\n' % (self.maxIsoSize,))
+        if self.autoResolve is not None:
+            showIndent(outfile, level)
+            outfile.write('autoResolve = %s,\n' % (self.autoResolve,))
+        if self.bugsUrl is not None:
+            showIndent(outfile, level)
+            outfile.write('bugsUrl = %s,\n' % (self.bugsUrl,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+        if self.anacondaCustomTrove is not None:
+            showIndent(outfile, level)
+            outfile.write('anacondaCustomTrove = "%s",\n' % (self.anacondaCustomTrove,))
+        if self.betaNag is not None:
+            showIndent(outfile, level)
+            outfile.write('betaNag = %s,\n' % (self.betaNag,))
+        if self.mediaTemplateTrove is not None:
+            showIndent(outfile, level)
+            outfile.write('mediaTemplateTrove = "%s",\n' % (self.mediaTemplateTrove,))
+        if self.installLabelPath is not None:
+            showIndent(outfile, level)
+            outfile.write('installLabelPath = %s,\n' % (self.installLabelPath,))
+        if self.anacondaTemplatesTrove is not None:
+            showIndent(outfile, level)
+            outfile.write('anacondaTemplatesTrove = "%s",\n' % (self.anacondaTemplatesTrove,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+        if self.showMediaCheck is not None:
+            showIndent(outfile, level)
+            outfile.write('showMediaCheck = %s,\n' % (self.showMediaCheck,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('maxIsoSize'):
+            try:
+                self.maxIsoSize = int(attrs.get('maxIsoSize').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (maxIsoSize): %s' % exp)
+            if self.maxIsoSize <= 0:
+                raise ValueError('Invalid PositiveInteger (maxIsoSize)')
+        if attrs.get('autoResolve'):
+            if attrs.get('autoResolve').value in ('true', '1'):
+                self.autoResolve = True
+            elif attrs.get('autoResolve').value in ('false', '0'):
+                self.autoResolve = False
+            else:
+                raise ValueError('Bad boolean attribute (autoResolve)')
+        if attrs.get('bugsUrl'):
+            self.bugsUrl = attrs.get('bugsUrl').value
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+        if attrs.get('anacondaCustomTrove'):
+            self.anacondaCustomTrove = attrs.get('anacondaCustomTrove').value
+        if attrs.get('betaNag'):
+            if attrs.get('betaNag').value in ('true', '1'):
+                self.betaNag = True
+            elif attrs.get('betaNag').value in ('false', '0'):
+                self.betaNag = False
+            else:
+                raise ValueError('Bad boolean attribute (betaNag)')
+        if attrs.get('mediaTemplateTrove'):
+            self.mediaTemplateTrove = attrs.get('mediaTemplateTrove').value
+        if attrs.get('installLabelPath'):
+            self.installLabelPath = attrs.get('installLabelPath').value
+        if attrs.get('anacondaTemplatesTrove'):
+            self.anacondaTemplatesTrove = attrs.get('anacondaTemplatesTrove').value
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+        if attrs.get('showMediaCheck'):
+            if attrs.get('showMediaCheck').value in ('true', '1'):
+                self.showMediaCheck = True
+            elif attrs.get('showMediaCheck').value in ('false', '0'):
+                self.showMediaCheck = False
+            else:
+                raise ValueError('Bad boolean attribute (showMediaCheck)')
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class installableIsoImageType
+
+
+class liveIsoImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('zisofs', 'xsd:boolean', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        _MemberSpec('unionfs', 'xsd:boolean', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, autoResolve=None, name=None, zisofs=None, baseFileName=None, unionfs=None, installLabelPath=None, valueOf_=''):
+        self.autoResolve = _cast(bool, autoResolve)
+        self.name = _cast(None, name)
+        self.zisofs = _cast(bool, zisofs)
+        self.baseFileName = _cast(None, baseFileName)
+        self.unionfs = _cast(bool, unionfs)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if liveIsoImageType.subclass:
+            return liveIsoImageType.subclass(*args_, **kwargs_)
+        else:
+            return liveIsoImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def get_zisofs(self): return self.zisofs
+    def set_zisofs(self, zisofs): self.zisofs = zisofs
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def get_unionfs(self): return self.unionfs
+    def set_unionfs(self, unionfs): self.unionfs = unionfs
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='liveIsoImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='liveIsoImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='liveIsoImageType'):
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+        if self.zisofs is not None:
+            outfile.write(' zisofs="%s"' % self.format_boolean(str_lower(str(self.zisofs)), input_name='zisofs'))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+        if self.unionfs is not None:
+            outfile.write(' unionfs="%s"' % self.format_boolean(str_lower(str(self.unionfs)), input_name='unionfs'))
+        if self.installLabelPath is not None:
+            outfile.write(' installLabelPath=%s' % (self.format_string(quote_attrib(self.installLabelPath).encode(ExternalEncoding), input_name='installLabelPath'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='liveIsoImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='liveIsoImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.autoResolve is not None:
+            showIndent(outfile, level)
+            outfile.write('autoResolve = %s,\n' % (self.autoResolve,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+        if self.zisofs is not None:
+            showIndent(outfile, level)
+            outfile.write('zisofs = %s,\n' % (self.zisofs,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+        if self.unionfs is not None:
+            showIndent(outfile, level)
+            outfile.write('unionfs = %s,\n' % (self.unionfs,))
+        if self.installLabelPath is not None:
+            showIndent(outfile, level)
+            outfile.write('installLabelPath = %s,\n' % (self.installLabelPath,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('autoResolve'):
+            if attrs.get('autoResolve').value in ('true', '1'):
+                self.autoResolve = True
+            elif attrs.get('autoResolve').value in ('false', '0'):
+                self.autoResolve = False
+            else:
+                raise ValueError('Bad boolean attribute (autoResolve)')
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+        if attrs.get('zisofs'):
+            if attrs.get('zisofs').value in ('true', '1'):
+                self.zisofs = True
+            elif attrs.get('zisofs').value in ('false', '0'):
+                self.zisofs = False
+            else:
+                raise ValueError('Bad boolean attribute (zisofs)')
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+        if attrs.get('unionfs'):
+            if attrs.get('unionfs').value in ('true', '1'):
+                self.unionfs = True
+            elif attrs.get('unionfs').value in ('false', '0'):
+                self.unionfs = False
+            else:
+                raise ValueError('Bad boolean attribute (unionfs)')
+        if attrs.get('installLabelPath'):
+            self.installLabelPath = attrs.get('installLabelPath').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class liveIsoImageType
+
+
+class netbootImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, autoResolve=None, baseFileName=None, installLabelPath=None, name=None, valueOf_=''):
+        self.autoResolve = _cast(bool, autoResolve)
+        self.baseFileName = _cast(None, baseFileName)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.name = _cast(None, name)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if netbootImageType.subclass:
+            return netbootImageType.subclass(*args_, **kwargs_)
+        else:
+            return netbootImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='netbootImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='netbootImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='netbootImageType'):
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+        if self.installLabelPath is not None:
+            outfile.write(' installLabelPath=%s' % (self.format_string(quote_attrib(self.installLabelPath).encode(ExternalEncoding), input_name='installLabelPath'), ))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='netbootImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='netbootImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.autoResolve is not None:
+            showIndent(outfile, level)
+            outfile.write('autoResolve = %s,\n' % (self.autoResolve,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+        if self.installLabelPath is not None:
+            showIndent(outfile, level)
+            outfile.write('installLabelPath = %s,\n' % (self.installLabelPath,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('autoResolve'):
+            if attrs.get('autoResolve').value in ('true', '1'):
+                self.autoResolve = True
+            elif attrs.get('autoResolve').value in ('false', '0'):
+                self.autoResolve = False
+            else:
+                raise ValueError('Bad boolean attribute (autoResolve)')
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+        if attrs.get('installLabelPath'):
+            self.installLabelPath = attrs.get('installLabelPath').value
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class netbootImageType
+
+
+class rawFsImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('freespace', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('swapSize', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, autoResolve=None, freespace=None, name=None, swapSize=None, baseFileName=None, installLabelPath=None, valueOf_=''):
+        self.autoResolve = _cast(bool, autoResolve)
+        self.freespace = _cast(int, freespace)
+        self.name = _cast(None, name)
+        self.swapSize = _cast(int, swapSize)
+        self.baseFileName = _cast(None, baseFileName)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if rawFsImageType.subclass:
+            return rawFsImageType.subclass(*args_, **kwargs_)
+        else:
+            return rawFsImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_freespace(self): return self.freespace
+    def set_freespace(self, freespace): self.freespace = freespace
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def get_swapSize(self): return self.swapSize
+    def set_swapSize(self, swapSize): self.swapSize = swapSize
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='rawFsImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='rawFsImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='rawFsImageType'):
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.freespace is not None:
+            outfile.write(' freespace="%s"' % self.format_integer(self.freespace, input_name='freespace'))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+        if self.swapSize is not None:
+            outfile.write(' swapSize="%s"' % self.format_integer(self.swapSize, input_name='swapSize'))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+        if self.installLabelPath is not None:
+            outfile.write(' installLabelPath=%s' % (self.format_string(quote_attrib(self.installLabelPath).encode(ExternalEncoding), input_name='installLabelPath'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='rawFsImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='rawFsImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.autoResolve is not None:
+            showIndent(outfile, level)
+            outfile.write('autoResolve = %s,\n' % (self.autoResolve,))
+        if self.freespace is not None:
+            showIndent(outfile, level)
+            outfile.write('freespace = %s,\n' % (self.freespace,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+        if self.swapSize is not None:
+            showIndent(outfile, level)
+            outfile.write('swapSize = %s,\n' % (self.swapSize,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+        if self.installLabelPath is not None:
+            showIndent(outfile, level)
+            outfile.write('installLabelPath = %s,\n' % (self.installLabelPath,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('autoResolve'):
+            if attrs.get('autoResolve').value in ('true', '1'):
+                self.autoResolve = True
+            elif attrs.get('autoResolve').value in ('false', '0'):
+                self.autoResolve = False
+            else:
+                raise ValueError('Bad boolean attribute (autoResolve)')
+        if attrs.get('freespace'):
+            try:
+                self.freespace = int(attrs.get('freespace').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (freespace): %s' % exp)
+            if self.freespace < 0:
+                raise ValueError('Invalid NonNegativeInteger (freespace)')
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+        if attrs.get('swapSize'):
+            try:
+                self.swapSize = int(attrs.get('swapSize').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (swapSize): %s' % exp)
+            if self.swapSize < 0:
+                raise ValueError('Invalid NonNegativeInteger (swapSize)')
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+        if attrs.get('installLabelPath'):
+            self.installLabelPath = attrs.get('installLabelPath').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class rawFsImageType
+
+
+class rawHdImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('freespace', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('swapSize', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, autoResolve=None, freespace=None, name=None, swapSize=None, baseFileName=None, installLabelPath=None, valueOf_=''):
+        self.autoResolve = _cast(bool, autoResolve)
+        self.freespace = _cast(int, freespace)
+        self.name = _cast(None, name)
+        self.swapSize = _cast(int, swapSize)
+        self.baseFileName = _cast(None, baseFileName)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if rawHdImageType.subclass:
+            return rawHdImageType.subclass(*args_, **kwargs_)
+        else:
+            return rawHdImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_freespace(self): return self.freespace
+    def set_freespace(self, freespace): self.freespace = freespace
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def get_swapSize(self): return self.swapSize
+    def set_swapSize(self, swapSize): self.swapSize = swapSize
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='rawHdImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='rawHdImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='rawHdImageType'):
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.freespace is not None:
+            outfile.write(' freespace="%s"' % self.format_integer(self.freespace, input_name='freespace'))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+        if self.swapSize is not None:
+            outfile.write(' swapSize="%s"' % self.format_integer(self.swapSize, input_name='swapSize'))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+        if self.installLabelPath is not None:
+            outfile.write(' installLabelPath=%s' % (self.format_string(quote_attrib(self.installLabelPath).encode(ExternalEncoding), input_name='installLabelPath'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='rawHdImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='rawHdImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.autoResolve is not None:
+            showIndent(outfile, level)
+            outfile.write('autoResolve = %s,\n' % (self.autoResolve,))
+        if self.freespace is not None:
+            showIndent(outfile, level)
+            outfile.write('freespace = %s,\n' % (self.freespace,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+        if self.swapSize is not None:
+            showIndent(outfile, level)
+            outfile.write('swapSize = %s,\n' % (self.swapSize,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+        if self.installLabelPath is not None:
+            showIndent(outfile, level)
+            outfile.write('installLabelPath = %s,\n' % (self.installLabelPath,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('autoResolve'):
+            if attrs.get('autoResolve').value in ('true', '1'):
+                self.autoResolve = True
+            elif attrs.get('autoResolve').value in ('false', '0'):
+                self.autoResolve = False
+            else:
+                raise ValueError('Bad boolean attribute (autoResolve)')
+        if attrs.get('freespace'):
+            try:
+                self.freespace = int(attrs.get('freespace').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (freespace): %s' % exp)
+            if self.freespace < 0:
+                raise ValueError('Invalid NonNegativeInteger (freespace)')
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+        if attrs.get('swapSize'):
+            try:
+                self.swapSize = int(attrs.get('swapSize').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (swapSize): %s' % exp)
+            if self.swapSize < 0:
+                raise ValueError('Invalid NonNegativeInteger (swapSize)')
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+        if attrs.get('installLabelPath'):
+            self.installLabelPath = attrs.get('installLabelPath').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class rawHdImageType
+
+
+class tarballImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('swapSize', 'xsd:nonNegativeInteger', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, autoResolve=None, baseFileName=None, installLabelPath=None, name=None, swapSize=None, valueOf_=''):
+        self.autoResolve = _cast(bool, autoResolve)
+        self.baseFileName = _cast(None, baseFileName)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.name = _cast(None, name)
+        self.swapSize = _cast(int, swapSize)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if tarballImageType.subclass:
+            return tarballImageType.subclass(*args_, **kwargs_)
+        else:
+            return tarballImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def get_swapSize(self): return self.swapSize
+    def set_swapSize(self, swapSize): self.swapSize = swapSize
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='tarballImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='tarballImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='tarballImageType'):
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+        if self.installLabelPath is not None:
+            outfile.write(' installLabelPath=%s' % (self.format_string(quote_attrib(self.installLabelPath).encode(ExternalEncoding), input_name='installLabelPath'), ))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+        if self.swapSize is not None:
+            outfile.write(' swapSize="%s"' % self.format_integer(self.swapSize, input_name='swapSize'))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='tarballImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='tarballImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.autoResolve is not None:
+            showIndent(outfile, level)
+            outfile.write('autoResolve = %s,\n' % (self.autoResolve,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+        if self.installLabelPath is not None:
+            showIndent(outfile, level)
+            outfile.write('installLabelPath = %s,\n' % (self.installLabelPath,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+        if self.swapSize is not None:
+            showIndent(outfile, level)
+            outfile.write('swapSize = %s,\n' % (self.swapSize,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('autoResolve'):
+            if attrs.get('autoResolve').value in ('true', '1'):
+                self.autoResolve = True
+            elif attrs.get('autoResolve').value in ('false', '0'):
+                self.autoResolve = False
+            else:
+                raise ValueError('Bad boolean attribute (autoResolve)')
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+        if attrs.get('installLabelPath'):
+            self.installLabelPath = attrs.get('installLabelPath').value
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+        if attrs.get('swapSize'):
+            try:
+                self.swapSize = int(attrs.get('swapSize').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (swapSize): %s' % exp)
+            if self.swapSize < 0:
+                raise ValueError('Invalid NonNegativeInteger (swapSize)')
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class tarballImageType
+
+
+class updateIsoImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('mediaTemplateTrove', 'xsd:string', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, mediaTemplateTrove=None, baseFileName=None, valueOf_=''):
+        self.mediaTemplateTrove = _cast(None, mediaTemplateTrove)
+        self.baseFileName = _cast(None, baseFileName)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if updateIsoImageType.subclass:
+            return updateIsoImageType.subclass(*args_, **kwargs_)
+        else:
+            return updateIsoImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_mediaTemplateTrove(self): return self.mediaTemplateTrove
+    def set_mediaTemplateTrove(self, mediaTemplateTrove): self.mediaTemplateTrove = mediaTemplateTrove
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='updateIsoImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='updateIsoImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='updateIsoImageType'):
+        if self.mediaTemplateTrove is not None:
+            outfile.write(' mediaTemplateTrove=%s' % (self.format_string(quote_attrib(self.mediaTemplateTrove).encode(ExternalEncoding), input_name='mediaTemplateTrove'), ))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='updateIsoImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='updateIsoImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.mediaTemplateTrove is not None:
+            showIndent(outfile, level)
+            outfile.write('mediaTemplateTrove = %s,\n' % (self.mediaTemplateTrove,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('mediaTemplateTrove'):
+            self.mediaTemplateTrove = attrs.get('mediaTemplateTrove').value
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class updateIsoImageType
+
+
+class vhdImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('freespace', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('vhdDiskType', 'xsd:string', 0),
+        _MemberSpec('swapSize', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, autoResolve=None, freespace=None, name=None, vhdDiskType=None, swapSize=None, baseFileName=None, installLabelPath=None, valueOf_=''):
+        self.autoResolve = _cast(bool, autoResolve)
+        self.freespace = _cast(int, freespace)
+        self.name = _cast(None, name)
+        self.vhdDiskType = _cast(None, vhdDiskType)
+        self.swapSize = _cast(int, swapSize)
+        self.baseFileName = _cast(None, baseFileName)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if vhdImageType.subclass:
+            return vhdImageType.subclass(*args_, **kwargs_)
+        else:
+            return vhdImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_freespace(self): return self.freespace
+    def set_freespace(self, freespace): self.freespace = freespace
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def get_vhdDiskType(self): return self.vhdDiskType
+    def set_vhdDiskType(self, vhdDiskType): self.vhdDiskType = vhdDiskType
+    def get_swapSize(self): return self.swapSize
+    def set_swapSize(self, swapSize): self.swapSize = swapSize
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='vhdImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='vhdImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='vhdImageType'):
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.freespace is not None:
+            outfile.write(' freespace="%s"' % self.format_integer(self.freespace, input_name='freespace'))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+        if self.vhdDiskType is not None:
+            outfile.write(' vhdDiskType=%s' % (self.format_string(quote_attrib(self.vhdDiskType).encode(ExternalEncoding), input_name='vhdDiskType'), ))
+        if self.swapSize is not None:
+            outfile.write(' swapSize="%s"' % self.format_integer(self.swapSize, input_name='swapSize'))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+        if self.installLabelPath is not None:
+            outfile.write(' installLabelPath=%s' % (self.format_string(quote_attrib(self.installLabelPath).encode(ExternalEncoding), input_name='installLabelPath'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='vhdImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='vhdImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.autoResolve is not None:
+            showIndent(outfile, level)
+            outfile.write('autoResolve = %s,\n' % (self.autoResolve,))
+        if self.freespace is not None:
+            showIndent(outfile, level)
+            outfile.write('freespace = %s,\n' % (self.freespace,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+        if self.vhdDiskType is not None:
+            showIndent(outfile, level)
+            outfile.write('vhdDiskType = %s,\n' % (self.vhdDiskType,))
+        if self.swapSize is not None:
+            showIndent(outfile, level)
+            outfile.write('swapSize = %s,\n' % (self.swapSize,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+        if self.installLabelPath is not None:
+            showIndent(outfile, level)
+            outfile.write('installLabelPath = %s,\n' % (self.installLabelPath,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('autoResolve'):
+            if attrs.get('autoResolve').value in ('true', '1'):
+                self.autoResolve = True
+            elif attrs.get('autoResolve').value in ('false', '0'):
+                self.autoResolve = False
+            else:
+                raise ValueError('Bad boolean attribute (autoResolve)')
+        if attrs.get('freespace'):
+            try:
+                self.freespace = int(attrs.get('freespace').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (freespace): %s' % exp)
+            if self.freespace < 0:
+                raise ValueError('Invalid NonNegativeInteger (freespace)')
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+        if attrs.get('vhdDiskType'):
+            self.vhdDiskType = attrs.get('vhdDiskType').value
+        if attrs.get('swapSize'):
+            try:
+                self.swapSize = int(attrs.get('swapSize').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (swapSize): %s' % exp)
+            if self.swapSize < 0:
+                raise ValueError('Invalid NonNegativeInteger (swapSize)')
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+        if attrs.get('installLabelPath'):
+            self.installLabelPath = attrs.get('installLabelPath').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class vhdImageType
+
+
+class virtualIronImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('freespace', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('vhdDiskType', 'xsd:string', 0),
+        _MemberSpec('swapSize', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, autoResolve=None, freespace=None, name=None, vhdDiskType=None, swapSize=None, baseFileName=None, installLabelPath=None, valueOf_=''):
+        self.autoResolve = _cast(bool, autoResolve)
+        self.freespace = _cast(int, freespace)
+        self.name = _cast(None, name)
+        self.vhdDiskType = _cast(None, vhdDiskType)
+        self.swapSize = _cast(int, swapSize)
+        self.baseFileName = _cast(None, baseFileName)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if virtualIronImageType.subclass:
+            return virtualIronImageType.subclass(*args_, **kwargs_)
+        else:
+            return virtualIronImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_freespace(self): return self.freespace
+    def set_freespace(self, freespace): self.freespace = freespace
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def get_vhdDiskType(self): return self.vhdDiskType
+    def set_vhdDiskType(self, vhdDiskType): self.vhdDiskType = vhdDiskType
+    def get_swapSize(self): return self.swapSize
+    def set_swapSize(self, swapSize): self.swapSize = swapSize
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='virtualIronImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='virtualIronImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='virtualIronImageType'):
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.freespace is not None:
+            outfile.write(' freespace="%s"' % self.format_integer(self.freespace, input_name='freespace'))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+        if self.vhdDiskType is not None:
+            outfile.write(' vhdDiskType=%s' % (self.format_string(quote_attrib(self.vhdDiskType).encode(ExternalEncoding), input_name='vhdDiskType'), ))
+        if self.swapSize is not None:
+            outfile.write(' swapSize="%s"' % self.format_integer(self.swapSize, input_name='swapSize'))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+        if self.installLabelPath is not None:
+            outfile.write(' installLabelPath=%s' % (self.format_string(quote_attrib(self.installLabelPath).encode(ExternalEncoding), input_name='installLabelPath'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='virtualIronImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='virtualIronImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.autoResolve is not None:
+            showIndent(outfile, level)
+            outfile.write('autoResolve = %s,\n' % (self.autoResolve,))
+        if self.freespace is not None:
+            showIndent(outfile, level)
+            outfile.write('freespace = %s,\n' % (self.freespace,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+        if self.vhdDiskType is not None:
+            showIndent(outfile, level)
+            outfile.write('vhdDiskType = %s,\n' % (self.vhdDiskType,))
+        if self.swapSize is not None:
+            showIndent(outfile, level)
+            outfile.write('swapSize = %s,\n' % (self.swapSize,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+        if self.installLabelPath is not None:
+            showIndent(outfile, level)
+            outfile.write('installLabelPath = %s,\n' % (self.installLabelPath,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('autoResolve'):
+            if attrs.get('autoResolve').value in ('true', '1'):
+                self.autoResolve = True
+            elif attrs.get('autoResolve').value in ('false', '0'):
+                self.autoResolve = False
+            else:
+                raise ValueError('Bad boolean attribute (autoResolve)')
+        if attrs.get('freespace'):
+            try:
+                self.freespace = int(attrs.get('freespace').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (freespace): %s' % exp)
+            if self.freespace < 0:
+                raise ValueError('Invalid NonNegativeInteger (freespace)')
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+        if attrs.get('vhdDiskType'):
+            self.vhdDiskType = attrs.get('vhdDiskType').value
+        if attrs.get('swapSize'):
+            try:
+                self.swapSize = int(attrs.get('swapSize').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (swapSize): %s' % exp)
+            if self.swapSize < 0:
+                raise ValueError('Invalid NonNegativeInteger (swapSize)')
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+        if attrs.get('installLabelPath'):
+            self.installLabelPath = attrs.get('installLabelPath').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class virtualIronImageType
+
+
+class vmwareEsxImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('freespace', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('natNetworking', 'xsd:boolean', 0),
+        _MemberSpec('vmMemory', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('swapSize', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, autoResolve=None, freespace=None, name=None, natNetworking=None, vmMemory=None, swapSize=None, installLabelPath=None, baseFileName=None, valueOf_=''):
+        self.autoResolve = _cast(bool, autoResolve)
+        self.freespace = _cast(int, freespace)
+        self.name = _cast(None, name)
+        self.natNetworking = _cast(bool, natNetworking)
+        self.vmMemory = _cast(int, vmMemory)
+        self.swapSize = _cast(int, swapSize)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.baseFileName = _cast(None, baseFileName)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if vmwareEsxImageType.subclass:
+            return vmwareEsxImageType.subclass(*args_, **kwargs_)
+        else:
+            return vmwareEsxImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_freespace(self): return self.freespace
+    def set_freespace(self, freespace): self.freespace = freespace
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def get_natNetworking(self): return self.natNetworking
+    def set_natNetworking(self, natNetworking): self.natNetworking = natNetworking
+    def get_vmMemory(self): return self.vmMemory
+    def set_vmMemory(self, vmMemory): self.vmMemory = vmMemory
+    def get_swapSize(self): return self.swapSize
+    def set_swapSize(self, swapSize): self.swapSize = swapSize
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='vmwareEsxImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='vmwareEsxImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='vmwareEsxImageType'):
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.freespace is not None:
+            outfile.write(' freespace="%s"' % self.format_integer(self.freespace, input_name='freespace'))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+        if self.natNetworking is not None:
+            outfile.write(' natNetworking="%s"' % self.format_boolean(str_lower(str(self.natNetworking)), input_name='natNetworking'))
+        if self.vmMemory is not None:
+            outfile.write(' vmMemory="%s"' % self.format_integer(self.vmMemory, input_name='vmMemory'))
+        if self.swapSize is not None:
+            outfile.write(' swapSize="%s"' % self.format_integer(self.swapSize, input_name='swapSize'))
+        if self.installLabelPath is not None:
+            outfile.write(' installLabelPath=%s' % (self.format_string(quote_attrib(self.installLabelPath).encode(ExternalEncoding), input_name='installLabelPath'), ))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='vmwareEsxImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='vmwareEsxImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.autoResolve is not None:
+            showIndent(outfile, level)
+            outfile.write('autoResolve = %s,\n' % (self.autoResolve,))
+        if self.freespace is not None:
+            showIndent(outfile, level)
+            outfile.write('freespace = %s,\n' % (self.freespace,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+        if self.natNetworking is not None:
+            showIndent(outfile, level)
+            outfile.write('natNetworking = %s,\n' % (self.natNetworking,))
+        if self.vmMemory is not None:
+            showIndent(outfile, level)
+            outfile.write('vmMemory = %s,\n' % (self.vmMemory,))
+        if self.swapSize is not None:
+            showIndent(outfile, level)
+            outfile.write('swapSize = %s,\n' % (self.swapSize,))
+        if self.installLabelPath is not None:
+            showIndent(outfile, level)
+            outfile.write('installLabelPath = %s,\n' % (self.installLabelPath,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('autoResolve'):
+            if attrs.get('autoResolve').value in ('true', '1'):
+                self.autoResolve = True
+            elif attrs.get('autoResolve').value in ('false', '0'):
+                self.autoResolve = False
+            else:
+                raise ValueError('Bad boolean attribute (autoResolve)')
+        if attrs.get('freespace'):
+            try:
+                self.freespace = int(attrs.get('freespace').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (freespace): %s' % exp)
+            if self.freespace < 0:
+                raise ValueError('Invalid NonNegativeInteger (freespace)')
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+        if attrs.get('natNetworking'):
+            if attrs.get('natNetworking').value in ('true', '1'):
+                self.natNetworking = True
+            elif attrs.get('natNetworking').value in ('false', '0'):
+                self.natNetworking = False
+            else:
+                raise ValueError('Bad boolean attribute (natNetworking)')
+        if attrs.get('vmMemory'):
+            try:
+                self.vmMemory = int(attrs.get('vmMemory').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (vmMemory): %s' % exp)
+            if self.vmMemory < 0:
+                raise ValueError('Invalid NonNegativeInteger (vmMemory)')
+        if attrs.get('swapSize'):
+            try:
+                self.swapSize = int(attrs.get('swapSize').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (swapSize): %s' % exp)
+            if self.swapSize < 0:
+                raise ValueError('Invalid NonNegativeInteger (swapSize)')
+        if attrs.get('installLabelPath'):
+            self.installLabelPath = attrs.get('installLabelPath').value
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class vmwareEsxImageType
+
+
+class vmwareImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('freespace', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('natNetworking', 'xsd:boolean', 0),
+        _MemberSpec('vmMemory', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('swapSize', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('diskAdapter', 'xsd:string', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        _MemberSpec('vmSnapshots', 'xsd:boolean', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, autoResolve=None, freespace=None, name=None, natNetworking=None, vmMemory=None, swapSize=None, diskAdapter=None, installLabelPath=None, baseFileName=None, vmSnapshots=None, valueOf_=''):
+        self.autoResolve = _cast(bool, autoResolve)
+        self.freespace = _cast(int, freespace)
+        self.name = _cast(None, name)
+        self.natNetworking = _cast(bool, natNetworking)
+        self.vmMemory = _cast(int, vmMemory)
+        self.swapSize = _cast(int, swapSize)
+        self.diskAdapter = _cast(None, diskAdapter)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.baseFileName = _cast(None, baseFileName)
+        self.vmSnapshots = _cast(bool, vmSnapshots)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if vmwareImageType.subclass:
+            return vmwareImageType.subclass(*args_, **kwargs_)
+        else:
+            return vmwareImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_freespace(self): return self.freespace
+    def set_freespace(self, freespace): self.freespace = freespace
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def get_natNetworking(self): return self.natNetworking
+    def set_natNetworking(self, natNetworking): self.natNetworking = natNetworking
+    def get_vmMemory(self): return self.vmMemory
+    def set_vmMemory(self, vmMemory): self.vmMemory = vmMemory
+    def get_swapSize(self): return self.swapSize
+    def set_swapSize(self, swapSize): self.swapSize = swapSize
+    def get_diskAdapter(self): return self.diskAdapter
+    def set_diskAdapter(self, diskAdapter): self.diskAdapter = diskAdapter
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def get_vmSnapshots(self): return self.vmSnapshots
+    def set_vmSnapshots(self, vmSnapshots): self.vmSnapshots = vmSnapshots
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='vmwareImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='vmwareImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='vmwareImageType'):
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.freespace is not None:
+            outfile.write(' freespace="%s"' % self.format_integer(self.freespace, input_name='freespace'))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+        if self.natNetworking is not None:
+            outfile.write(' natNetworking="%s"' % self.format_boolean(str_lower(str(self.natNetworking)), input_name='natNetworking'))
+        if self.vmMemory is not None:
+            outfile.write(' vmMemory="%s"' % self.format_integer(self.vmMemory, input_name='vmMemory'))
+        if self.swapSize is not None:
+            outfile.write(' swapSize="%s"' % self.format_integer(self.swapSize, input_name='swapSize'))
+        if self.diskAdapter is not None:
+            outfile.write(' diskAdapter=%s' % (self.format_string(quote_attrib(self.diskAdapter).encode(ExternalEncoding), input_name='diskAdapter'), ))
+        if self.installLabelPath is not None:
+            outfile.write(' installLabelPath=%s' % (self.format_string(quote_attrib(self.installLabelPath).encode(ExternalEncoding), input_name='installLabelPath'), ))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+        if self.vmSnapshots is not None:
+            outfile.write(' vmSnapshots="%s"' % self.format_boolean(str_lower(str(self.vmSnapshots)), input_name='vmSnapshots'))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='vmwareImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='vmwareImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.autoResolve is not None:
+            showIndent(outfile, level)
+            outfile.write('autoResolve = %s,\n' % (self.autoResolve,))
+        if self.freespace is not None:
+            showIndent(outfile, level)
+            outfile.write('freespace = %s,\n' % (self.freespace,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+        if self.natNetworking is not None:
+            showIndent(outfile, level)
+            outfile.write('natNetworking = %s,\n' % (self.natNetworking,))
+        if self.vmMemory is not None:
+            showIndent(outfile, level)
+            outfile.write('vmMemory = %s,\n' % (self.vmMemory,))
+        if self.swapSize is not None:
+            showIndent(outfile, level)
+            outfile.write('swapSize = %s,\n' % (self.swapSize,))
+        if self.diskAdapter is not None:
+            showIndent(outfile, level)
+            outfile.write('diskAdapter = %s,\n' % (self.diskAdapter,))
+        if self.installLabelPath is not None:
+            showIndent(outfile, level)
+            outfile.write('installLabelPath = %s,\n' % (self.installLabelPath,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+        if self.vmSnapshots is not None:
+            showIndent(outfile, level)
+            outfile.write('vmSnapshots = %s,\n' % (self.vmSnapshots,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('autoResolve'):
+            if attrs.get('autoResolve').value in ('true', '1'):
+                self.autoResolve = True
+            elif attrs.get('autoResolve').value in ('false', '0'):
+                self.autoResolve = False
+            else:
+                raise ValueError('Bad boolean attribute (autoResolve)')
+        if attrs.get('freespace'):
+            try:
+                self.freespace = int(attrs.get('freespace').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (freespace): %s' % exp)
+            if self.freespace < 0:
+                raise ValueError('Invalid NonNegativeInteger (freespace)')
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+        if attrs.get('natNetworking'):
+            if attrs.get('natNetworking').value in ('true', '1'):
+                self.natNetworking = True
+            elif attrs.get('natNetworking').value in ('false', '0'):
+                self.natNetworking = False
+            else:
+                raise ValueError('Bad boolean attribute (natNetworking)')
+        if attrs.get('vmMemory'):
+            try:
+                self.vmMemory = int(attrs.get('vmMemory').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (vmMemory): %s' % exp)
+            if self.vmMemory < 0:
+                raise ValueError('Invalid NonNegativeInteger (vmMemory)')
+        if attrs.get('swapSize'):
+            try:
+                self.swapSize = int(attrs.get('swapSize').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (swapSize): %s' % exp)
+            if self.swapSize < 0:
+                raise ValueError('Invalid NonNegativeInteger (swapSize)')
+        if attrs.get('diskAdapter'):
+            self.diskAdapter = attrs.get('diskAdapter').value
+        if attrs.get('installLabelPath'):
+            self.installLabelPath = attrs.get('installLabelPath').value
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+        if attrs.get('vmSnapshots'):
+            if attrs.get('vmSnapshots').value in ('true', '1'):
+                self.vmSnapshots = True
+            elif attrs.get('vmSnapshots').value in ('false', '0'):
+                self.vmSnapshots = False
+            else:
+                raise ValueError('Bad boolean attribute (vmSnapshots)')
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class vmwareImageType
+
+
+class xenOvaImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('freespace', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('vmMemory', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('swapSize', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, autoResolve=None, freespace=None, name=None, vmMemory=None, swapSize=None, baseFileName=None, installLabelPath=None, valueOf_=''):
+        self.autoResolve = _cast(bool, autoResolve)
+        self.freespace = _cast(int, freespace)
+        self.name = _cast(None, name)
+        self.vmMemory = _cast(int, vmMemory)
+        self.swapSize = _cast(int, swapSize)
+        self.baseFileName = _cast(None, baseFileName)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if xenOvaImageType.subclass:
+            return xenOvaImageType.subclass(*args_, **kwargs_)
+        else:
+            return xenOvaImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_freespace(self): return self.freespace
+    def set_freespace(self, freespace): self.freespace = freespace
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def get_vmMemory(self): return self.vmMemory
+    def set_vmMemory(self, vmMemory): self.vmMemory = vmMemory
+    def get_swapSize(self): return self.swapSize
+    def set_swapSize(self, swapSize): self.swapSize = swapSize
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='xenOvaImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='xenOvaImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='xenOvaImageType'):
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.freespace is not None:
+            outfile.write(' freespace="%s"' % self.format_integer(self.freespace, input_name='freespace'))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+        if self.vmMemory is not None:
+            outfile.write(' vmMemory="%s"' % self.format_integer(self.vmMemory, input_name='vmMemory'))
+        if self.swapSize is not None:
+            outfile.write(' swapSize="%s"' % self.format_integer(self.swapSize, input_name='swapSize'))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+        if self.installLabelPath is not None:
+            outfile.write(' installLabelPath=%s' % (self.format_string(quote_attrib(self.installLabelPath).encode(ExternalEncoding), input_name='installLabelPath'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='xenOvaImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='xenOvaImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.autoResolve is not None:
+            showIndent(outfile, level)
+            outfile.write('autoResolve = %s,\n' % (self.autoResolve,))
+        if self.freespace is not None:
+            showIndent(outfile, level)
+            outfile.write('freespace = %s,\n' % (self.freespace,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+        if self.vmMemory is not None:
+            showIndent(outfile, level)
+            outfile.write('vmMemory = %s,\n' % (self.vmMemory,))
+        if self.swapSize is not None:
+            showIndent(outfile, level)
+            outfile.write('swapSize = %s,\n' % (self.swapSize,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+        if self.installLabelPath is not None:
+            showIndent(outfile, level)
+            outfile.write('installLabelPath = %s,\n' % (self.installLabelPath,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('autoResolve'):
+            if attrs.get('autoResolve').value in ('true', '1'):
+                self.autoResolve = True
+            elif attrs.get('autoResolve').value in ('false', '0'):
+                self.autoResolve = False
+            else:
+                raise ValueError('Bad boolean attribute (autoResolve)')
+        if attrs.get('freespace'):
+            try:
+                self.freespace = int(attrs.get('freespace').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (freespace): %s' % exp)
+            if self.freespace < 0:
+                raise ValueError('Invalid NonNegativeInteger (freespace)')
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+        if attrs.get('vmMemory'):
+            try:
+                self.vmMemory = int(attrs.get('vmMemory').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (vmMemory): %s' % exp)
+            if self.vmMemory < 0:
+                raise ValueError('Invalid NonNegativeInteger (vmMemory)')
+        if attrs.get('swapSize'):
+            try:
+                self.swapSize = int(attrs.get('swapSize').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (swapSize): %s' % exp)
+            if self.swapSize < 0:
+                raise ValueError('Invalid NonNegativeInteger (swapSize)')
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+        if attrs.get('installLabelPath'):
+            self.installLabelPath = attrs.get('installLabelPath').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class xenOvaImageType
+
+
+class buildDefinitionType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('build_', 'buildType', 1),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, build_=None):
+        if build_ is None:
+            self.build_ = []
+        else:
+            self.build_ = build_
+    def factory(*args_, **kwargs_):
+        if buildDefinitionType.subclass:
+            return buildDefinitionType.subclass(*args_, **kwargs_)
+        else:
+            return buildDefinitionType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_build(self): return self.build_
+    def set_build(self, build_): self.build_ = build_
+    def add_build(self, value): self.build_.append(value)
+    def insert_build(self, index, value): self.build_[index] = value
+    def export(self, outfile, level, namespace_='rpd:', name_='buildDefinitionType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='buildDefinitionType')
+        if self.hasContent_():
+            outfile.write('>\n')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            showIndent(outfile, level)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='buildDefinitionType'):
+        pass
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='buildDefinitionType'):
+        for build_ in self.build_:
+            build_.export(outfile, level, namespace_, name_='build')
+    def hasContent_(self):
+        if (
+            self.build_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='buildDefinitionType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        pass
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('build=[\n')
+        level += 1
+        for build in self.build:
+            showIndent(outfile, level)
+            outfile.write('model_.build(\n')
+            build.exportLiteral(outfile, level, name_='build')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        level -= 1
+        showIndent(outfile, level)
+        outfile.write('],\n')
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        pass
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'build':
+            obj_ = buildType.factory()
+            obj_.build(child_)
+            self.build_.append(obj_)
+# end class buildDefinitionType
+
+
+class buildType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('baseFlavor', 'rpd:flavorStringType', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('amiImage', 'amiImageType', 0),
+        _MemberSpec('applianceIsoImage', 'applianceIsoImageType', 0),
+        _MemberSpec('installableIsoImage', 'installableIsoImageType', 0),
+        _MemberSpec('liveIsoImage', 'liveIsoImageType', 0),
+        _MemberSpec('netbootImage', 'netbootImageType', 0),
+        _MemberSpec('rawFsImage', 'rawFsImageType', 0),
+        _MemberSpec('rawHdImage', 'rawHdImageType', 0),
+        _MemberSpec('tarballImage', 'tarballImageType', 0),
+        _MemberSpec('updateIsoImage', 'updateIsoImageType', 0),
+        _MemberSpec('vhdImage', 'vhdImageType', 0),
+        _MemberSpec('virtualIronImage', 'virtualIronImageType', 0),
+        _MemberSpec('vmwareImage', 'vmwareImageType', 0),
+        _MemberSpec('vmwareEsxImage', 'vmwareEsxImageType', 0),
+        _MemberSpec('xenOvaImage', 'xenOvaImageType', 0),
+        _MemberSpec('stage', 'stage', 1),
+        _MemberSpec('imageGroup', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, baseFlavor=None, name=None, amiImage=None, applianceIsoImage=None, installableIsoImage=None, liveIsoImage=None, netbootImage=None, rawFsImage=None, rawHdImage=None, tarballImage=None, updateIsoImage=None, vhdImage=None, virtualIronImage=None, vmwareImage=None, vmwareEsxImage=None, xenOvaImage=None, stage=None, imageGroup=None):
+        self.baseFlavor = _cast(None, baseFlavor)
+        self.name = _cast(None, name)
+        self.amiImage = amiImage
+        self.applianceIsoImage = applianceIsoImage
+        self.installableIsoImage = installableIsoImage
+        self.liveIsoImage = liveIsoImage
+        self.netbootImage = netbootImage
+        self.rawFsImage = rawFsImage
+        self.rawHdImage = rawHdImage
+        self.tarballImage = tarballImage
+        self.updateIsoImage = updateIsoImage
+        self.vhdImage = vhdImage
+        self.virtualIronImage = virtualIronImage
+        self.vmwareImage = vmwareImage
+        self.vmwareEsxImage = vmwareEsxImage
+        self.xenOvaImage = xenOvaImage
+        if stage is None:
+            self.stage = []
+        else:
+            self.stage = stage
+        self.imageGroup = imageGroup
+    def factory(*args_, **kwargs_):
+        if buildType.subclass:
+            return buildType.subclass(*args_, **kwargs_)
+        else:
+            return buildType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_amiImage(self): return self.amiImage
+    def set_amiImage(self, amiImage): self.amiImage = amiImage
+    def get_applianceIsoImage(self): return self.applianceIsoImage
+    def set_applianceIsoImage(self, applianceIsoImage): self.applianceIsoImage = applianceIsoImage
+    def get_installableIsoImage(self): return self.installableIsoImage
+    def set_installableIsoImage(self, installableIsoImage): self.installableIsoImage = installableIsoImage
+    def get_liveIsoImage(self): return self.liveIsoImage
+    def set_liveIsoImage(self, liveIsoImage): self.liveIsoImage = liveIsoImage
+    def get_netbootImage(self): return self.netbootImage
+    def set_netbootImage(self, netbootImage): self.netbootImage = netbootImage
+    def get_rawFsImage(self): return self.rawFsImage
+    def set_rawFsImage(self, rawFsImage): self.rawFsImage = rawFsImage
+    def get_rawHdImage(self): return self.rawHdImage
+    def set_rawHdImage(self, rawHdImage): self.rawHdImage = rawHdImage
+    def get_tarballImage(self): return self.tarballImage
+    def set_tarballImage(self, tarballImage): self.tarballImage = tarballImage
+    def get_updateIsoImage(self): return self.updateIsoImage
+    def set_updateIsoImage(self, updateIsoImage): self.updateIsoImage = updateIsoImage
+    def get_vhdImage(self): return self.vhdImage
+    def set_vhdImage(self, vhdImage): self.vhdImage = vhdImage
+    def get_virtualIronImage(self): return self.virtualIronImage
+    def set_virtualIronImage(self, virtualIronImage): self.virtualIronImage = virtualIronImage
+    def get_vmwareImage(self): return self.vmwareImage
+    def set_vmwareImage(self, vmwareImage): self.vmwareImage = vmwareImage
+    def get_vmwareEsxImage(self): return self.vmwareEsxImage
+    def set_vmwareEsxImage(self, vmwareEsxImage): self.vmwareEsxImage = vmwareEsxImage
+    def get_xenOvaImage(self): return self.xenOvaImage
+    def set_xenOvaImage(self, xenOvaImage): self.xenOvaImage = xenOvaImage
+    def get_stage(self): return self.stage
+    def set_stage(self, stage): self.stage = stage
+    def add_stage(self, value): self.stage.append(value)
+    def insert_stage(self, index, value): self.stage[index] = value
+    def get_imageGroup(self): return self.imageGroup
+    def set_imageGroup(self, imageGroup): self.imageGroup = imageGroup
+    def validate_imageGroup(self, value):
+        # validate type imageGroup
+        pass
+    def get_baseFlavor(self): return self.baseFlavor
+    def set_baseFlavor(self, baseFlavor): self.baseFlavor = baseFlavor
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def export(self, outfile, level, namespace_='rpd:', name_='buildType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='buildType')
+        if self.hasContent_():
+            outfile.write('>\n')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            showIndent(outfile, level)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='buildType'):
+        if self.baseFlavor is not None:
+            outfile.write(' baseFlavor=%s' % (quote_attrib(self.baseFlavor), ))
+        outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='buildType'):
+        if self.amiImage:
+            self.amiImage.export(outfile, level, namespace_, name_='amiImage', )
+        if self.applianceIsoImage:
+            self.applianceIsoImage.export(outfile, level, namespace_, name_='applianceIsoImage', )
+        if self.installableIsoImage:
+            self.installableIsoImage.export(outfile, level, namespace_, name_='installableIsoImage', )
+        if self.liveIsoImage:
+            self.liveIsoImage.export(outfile, level, namespace_, name_='liveIsoImage', )
+        if self.netbootImage:
+            self.netbootImage.export(outfile, level, namespace_, name_='netbootImage', )
+        if self.rawFsImage:
+            self.rawFsImage.export(outfile, level, namespace_, name_='rawFsImage', )
+        if self.rawHdImage:
+            self.rawHdImage.export(outfile, level, namespace_, name_='rawHdImage', )
+        if self.tarballImage:
+            self.tarballImage.export(outfile, level, namespace_, name_='tarballImage', )
+        if self.updateIsoImage:
+            self.updateIsoImage.export(outfile, level, namespace_, name_='updateIsoImage', )
+        if self.vhdImage:
+            self.vhdImage.export(outfile, level, namespace_, name_='vhdImage', )
+        if self.virtualIronImage:
+            self.virtualIronImage.export(outfile, level, namespace_, name_='virtualIronImage', )
+        if self.vmwareImage:
+            self.vmwareImage.export(outfile, level, namespace_, name_='vmwareImage', )
+        if self.vmwareEsxImage:
+            self.vmwareEsxImage.export(outfile, level, namespace_, name_='vmwareEsxImage', )
+        if self.xenOvaImage:
+            self.xenOvaImage.export(outfile, level, namespace_, name_='xenOvaImage', )
+        for stage_ in self.stage:
+            stage_.export(outfile, level, namespace_, name_='stage')
+        if self.imageGroup is not None:
+            showIndent(outfile, level)
+            outfile.write('<%simageGroup>%s</%simageGroup>\n' % (namespace_, self.format_string(quote_xml(self.imageGroup).encode(ExternalEncoding), input_name='imageGroup'), namespace_))
+    def hasContent_(self):
+        if (
+            self.amiImage is not None or
+            self.applianceIsoImage is not None or
+            self.installableIsoImage is not None or
+            self.liveIsoImage is not None or
+            self.netbootImage is not None or
+            self.rawFsImage is not None or
+            self.rawHdImage is not None or
+            self.tarballImage is not None or
+            self.updateIsoImage is not None or
+            self.vhdImage is not None or
+            self.virtualIronImage is not None or
+            self.vmwareImage is not None or
+            self.vmwareEsxImage is not None or
+            self.xenOvaImage is not None or
+            self.stage or
+            self.imageGroup is not None
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='buildType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.baseFlavor is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFlavor = "%s",\n' % (self.baseFlavor,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        if self.amiImage:
+            showIndent(outfile, level)
+            outfile.write('amiImage=model_.amiImageType(\n')
+            self.amiImage.exportLiteral(outfile, level, name_='amiImage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.applianceIsoImage:
+            showIndent(outfile, level)
+            outfile.write('applianceIsoImage=model_.applianceIsoImageType(\n')
+            self.applianceIsoImage.exportLiteral(outfile, level, name_='applianceIsoImage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.installableIsoImage:
+            showIndent(outfile, level)
+            outfile.write('installableIsoImage=model_.installableIsoImageType(\n')
+            self.installableIsoImage.exportLiteral(outfile, level, name_='installableIsoImage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.liveIsoImage:
+            showIndent(outfile, level)
+            outfile.write('liveIsoImage=model_.liveIsoImageType(\n')
+            self.liveIsoImage.exportLiteral(outfile, level, name_='liveIsoImage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.netbootImage:
+            showIndent(outfile, level)
+            outfile.write('netbootImage=model_.netbootImageType(\n')
+            self.netbootImage.exportLiteral(outfile, level, name_='netbootImage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.rawFsImage:
+            showIndent(outfile, level)
+            outfile.write('rawFsImage=model_.rawFsImageType(\n')
+            self.rawFsImage.exportLiteral(outfile, level, name_='rawFsImage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.rawHdImage:
+            showIndent(outfile, level)
+            outfile.write('rawHdImage=model_.rawHdImageType(\n')
+            self.rawHdImage.exportLiteral(outfile, level, name_='rawHdImage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.tarballImage:
+            showIndent(outfile, level)
+            outfile.write('tarballImage=model_.tarballImageType(\n')
+            self.tarballImage.exportLiteral(outfile, level, name_='tarballImage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.updateIsoImage:
+            showIndent(outfile, level)
+            outfile.write('updateIsoImage=model_.updateIsoImageType(\n')
+            self.updateIsoImage.exportLiteral(outfile, level, name_='updateIsoImage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.vhdImage:
+            showIndent(outfile, level)
+            outfile.write('vhdImage=model_.vhdImageType(\n')
+            self.vhdImage.exportLiteral(outfile, level, name_='vhdImage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.virtualIronImage:
+            showIndent(outfile, level)
+            outfile.write('virtualIronImage=model_.virtualIronImageType(\n')
+            self.virtualIronImage.exportLiteral(outfile, level, name_='virtualIronImage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.vmwareImage:
+            showIndent(outfile, level)
+            outfile.write('vmwareImage=model_.vmwareImageType(\n')
+            self.vmwareImage.exportLiteral(outfile, level, name_='vmwareImage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.vmwareEsxImage:
+            showIndent(outfile, level)
+            outfile.write('vmwareEsxImage=model_.vmwareEsxImageType(\n')
+            self.vmwareEsxImage.exportLiteral(outfile, level, name_='vmwareEsxImage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.xenOvaImage:
+            showIndent(outfile, level)
+            outfile.write('xenOvaImage=model_.xenOvaImageType(\n')
+            self.xenOvaImage.exportLiteral(outfile, level, name_='xenOvaImage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        showIndent(outfile, level)
+        outfile.write('stage=[\n')
+        level += 1
+        for stage in self.stage:
+            showIndent(outfile, level)
+            outfile.write('model_.stage(\n')
+            stage.exportLiteral(outfile, level)
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        level -= 1
+        showIndent(outfile, level)
+        outfile.write('],\n')
+        showIndent(outfile, level)
+        outfile.write('imageGroup=%s,\n' % quote_python(self.imageGroup).encode(ExternalEncoding))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('baseFlavor'):
+            self.baseFlavor = attrs.get('baseFlavor').value
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'amiImage':
+            obj_ = amiImageType.factory()
+            obj_.build(child_)
+            self.set_amiImage(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'applianceIsoImage':
+            obj_ = applianceIsoImageType.factory()
+            obj_.build(child_)
+            self.set_applianceIsoImage(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'installableIsoImage':
+            obj_ = installableIsoImageType.factory()
+            obj_.build(child_)
+            self.set_installableIsoImage(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'liveIsoImage':
+            obj_ = liveIsoImageType.factory()
+            obj_.build(child_)
+            self.set_liveIsoImage(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'netbootImage':
+            obj_ = netbootImageType.factory()
+            obj_.build(child_)
+            self.set_netbootImage(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'rawFsImage':
+            obj_ = rawFsImageType.factory()
+            obj_.build(child_)
+            self.set_rawFsImage(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'rawHdImage':
+            obj_ = rawHdImageType.factory()
+            obj_.build(child_)
+            self.set_rawHdImage(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'tarballImage':
+            obj_ = tarballImageType.factory()
+            obj_.build(child_)
+            self.set_tarballImage(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'updateIsoImage':
+            obj_ = updateIsoImageType.factory()
+            obj_.build(child_)
+            self.set_updateIsoImage(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'vhdImage':
+            obj_ = vhdImageType.factory()
+            obj_.build(child_)
+            self.set_vhdImage(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'virtualIronImage':
+            obj_ = virtualIronImageType.factory()
+            obj_.build(child_)
+            self.set_virtualIronImage(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'vmwareImage':
+            obj_ = vmwareImageType.factory()
+            obj_.build(child_)
+            self.set_vmwareImage(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'vmwareEsxImage':
+            obj_ = vmwareEsxImageType.factory()
+            obj_.build(child_)
+            self.set_vmwareEsxImage(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'xenOvaImage':
+            obj_ = xenOvaImageType.factory()
+            obj_.build(child_)
+            self.set_xenOvaImage(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'stage':
+            obj_ = stage.factory()
+            obj_.build(child_)
+            self.stage.append(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'imageGroup':
+            imageGroup_ = ''
+            for text__content_ in child_.childNodes:
+                imageGroup_ += text__content_.nodeValue
+            self.imageGroup = imageGroup_
+            self.validate_imageGroup(self.imageGroup)    # validate type imageGroup
+
+    def getBuildStages(self):
+        return [ x.get_ref() for x in self.get_stage() ]
+
+    def getBuildImageGroup(self):
+        val = self.get_imageGroup()
+        if val is None:
+            return self.parentImageGroup
+        return val
+
+    def getBuildSourceGroup(self):
+        val = self.get_sourceGroup()
+        if val is None:
+            return self.parentSourceGroup
+        return val
+
+    def getBuildBaseFlavor(self):
+        return self.buildFlavor
+
+    def getBuildImage(self):
+        fields = self.containerTemplateFields.copy()
+        if self.image:
+            fields.update(self.image.getFields())
+        return imageType.subclass.factory(**fields)
+
+    getBuildName = get_name
+# end class buildType
+
+
+class stage(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('ref', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, ref=None, valueOf_=''):
+        self.ref = _cast(None, ref)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if stage.subclass:
+            return stage.subclass(*args_, **kwargs_)
+        else:
+            return stage(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_ref(self): return self.ref
+    def set_ref(self, ref): self.ref = ref
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='stage', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='stage')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='stage'):
+        outfile.write(' ref=%s' % (self.format_string(quote_attrib(self.ref).encode(ExternalEncoding), input_name='ref'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='stage'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='stage'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.ref is not None:
+            showIndent(outfile, level)
+            outfile.write('ref = %s,\n' % (self.ref,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('ref'):
+            self.ref = attrs.get('ref').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class stage
+
+
+class platformDefinitionType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('version', 'xsd:string', 0),
+        _MemberSpec('baseFlavor', 'xsd:string', 0),
+        _MemberSpec('searchPaths', 'searchPathListType', 0),
+        _MemberSpec('factorySources', 'factorySourceListType', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, version=None, baseFlavor=None, searchPaths=None, factorySources=None):
+        self.version = _cast(None, version)
+        self.baseFlavor = baseFlavor
+        self.searchPaths = searchPaths
+        self.factorySources = factorySources
+    def factory(*args_, **kwargs_):
+        if platformDefinitionType.subclass:
+            return platformDefinitionType.subclass(*args_, **kwargs_)
+        else:
+            return platformDefinitionType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_baseFlavor(self): return self.baseFlavor
+    def set_baseFlavor(self, baseFlavor): self.baseFlavor = baseFlavor
+    def validate_baseFlavor(self, value):
+        # validate type baseFlavor
+        pass
+    def get_searchPaths(self): return self.searchPaths
+    def set_searchPaths(self, searchPaths): self.searchPaths = searchPaths
+    def get_factorySources(self): return self.factorySources
+    def set_factorySources(self, factorySources): self.factorySources = factorySources
+    def get_version(self): return self.version
+    def set_version(self, version): self.version = version
+    def export(self, outfile, level, namespace_='rpd:', name_='platformDefinitionType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='platformDefinitionType')
+        if self.hasContent_():
+            outfile.write('>\n')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            showIndent(outfile, level)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='platformDefinitionType'):
+        if self.version is not None:
+            outfile.write(' version=%s' % (self.format_string(quote_attrib(self.version).encode(ExternalEncoding), input_name='version'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='platformDefinitionType'):
+        if self.baseFlavor is not None:
+            showIndent(outfile, level)
+            outfile.write('<%sbaseFlavor>%s</%sbaseFlavor>\n' % (namespace_, self.format_string(quote_xml(self.baseFlavor).encode(ExternalEncoding), input_name='baseFlavor'), namespace_))
+        if self.searchPaths:
+            self.searchPaths.export(outfile, level, namespace_, name_='searchPaths')
+        if self.factorySources:
+            self.factorySources.export(outfile, level, namespace_, name_='factorySources')
+    def hasContent_(self):
+        if (
+            self.baseFlavor is not None or
+            self.searchPaths is not None or
+            self.factorySources is not None
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='platformDefinitionType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.version is not None:
+            showIndent(outfile, level)
+            outfile.write('version = %s,\n' % (self.version,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('baseFlavor=%s,\n' % quote_python(self.baseFlavor).encode(ExternalEncoding))
+        if self.searchPaths:
+            showIndent(outfile, level)
+            outfile.write('searchPaths=model_.searchPathListType(\n')
+            self.searchPaths.exportLiteral(outfile, level, name_='searchPaths')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.factorySources:
+            showIndent(outfile, level)
+            outfile.write('factorySources=model_.factorySourceListType(\n')
+            self.factorySources.exportLiteral(outfile, level, name_='factorySources')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('version'):
+            self.version = attrs.get('version').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'baseFlavor':
+            baseFlavor_ = ''
+            for text__content_ in child_.childNodes:
+                baseFlavor_ += text__content_.nodeValue
+            self.baseFlavor = baseFlavor_
+            self.validate_baseFlavor(self.baseFlavor)    # validate type baseFlavor
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'searchPaths':
+            obj_ = searchPathListType.factory()
+            obj_.build(child_)
+            self.set_searchPaths(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'factorySources':
+            obj_ = factorySourceListType.factory()
+            obj_.build(child_)
+            self.set_factorySources(obj_)
+# end class platformDefinitionType
+
+
+class platformType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('source', 'xsd:string', 0),
+        _MemberSpec('useLatest', 'xsd:boolean', 0),
+        _MemberSpec('baseFlavor', 'xsd:string', 0),
+        _MemberSpec('searchPaths', 'searchPathListType', 0),
+        _MemberSpec('factorySources', 'factorySourceListType', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, source=None, useLatest=None, baseFlavor=None, searchPaths=None, factorySources=None):
+        self.source = _cast(None, source)
+        self.useLatest = _cast(bool, useLatest)
+        self.baseFlavor = baseFlavor
+        self.searchPaths = searchPaths
+        self.factorySources = factorySources
+    def factory(*args_, **kwargs_):
+        if platformType.subclass:
+            return platformType.subclass(*args_, **kwargs_)
+        else:
+            return platformType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_baseFlavor(self): return self.baseFlavor
+    def set_baseFlavor(self, baseFlavor): self.baseFlavor = baseFlavor
+    def validate_baseFlavor(self, value):
+        # validate type baseFlavor
+        pass
+    def get_searchPaths(self): return self.searchPaths
+    def set_searchPaths(self, searchPaths): self.searchPaths = searchPaths
+    def get_factorySources(self): return self.factorySources
+    def set_factorySources(self, factorySources): self.factorySources = factorySources
+    def get_source(self): return self.source
+    def set_source(self, source): self.source = source
+    def get_useLatest(self): return self.useLatest
+    def set_useLatest(self, useLatest): self.useLatest = useLatest
+    def export(self, outfile, level, namespace_='rpd:', name_='platformType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='platformType')
+        if self.hasContent_():
+            outfile.write('>\n')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            showIndent(outfile, level)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='platformType'):
+        if self.source is not None:
+            outfile.write(' source=%s' % (self.format_string(quote_attrib(self.source).encode(ExternalEncoding), input_name='source'), ))
+        if self.useLatest is not None:
+            outfile.write(' useLatest="%s"' % self.format_boolean(str_lower(str(self.useLatest)), input_name='useLatest'))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='platformType'):
+        if self.baseFlavor is not None:
+            showIndent(outfile, level)
+            outfile.write('<%sbaseFlavor>%s</%sbaseFlavor>\n' % (namespace_, self.format_string(quote_xml(self.baseFlavor).encode(ExternalEncoding), input_name='baseFlavor'), namespace_))
+        if self.searchPaths:
+            self.searchPaths.export(outfile, level, namespace_, name_='searchPaths')
+        if self.factorySources:
+            self.factorySources.export(outfile, level, namespace_, name_='factorySources')
+    def hasContent_(self):
+        if (
+            self.baseFlavor is not None or
+            self.searchPaths is not None or
+            self.factorySources is not None
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='platformType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.source is not None:
+            showIndent(outfile, level)
+            outfile.write('source = %s,\n' % (self.source,))
+        if self.useLatest is not None:
+            showIndent(outfile, level)
+            outfile.write('useLatest = %s,\n' % (self.useLatest,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('baseFlavor=%s,\n' % quote_python(self.baseFlavor).encode(ExternalEncoding))
+        if self.searchPaths:
+            showIndent(outfile, level)
+            outfile.write('searchPaths=model_.searchPathListType(\n')
+            self.searchPaths.exportLiteral(outfile, level, name_='searchPaths')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.factorySources:
+            showIndent(outfile, level)
+            outfile.write('factorySources=model_.factorySourceListType(\n')
+            self.factorySources.exportLiteral(outfile, level, name_='factorySources')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('source'):
+            self.source = attrs.get('source').value
+        if attrs.get('useLatest'):
+            if attrs.get('useLatest').value in ('true', '1'):
+                self.useLatest = True
+            elif attrs.get('useLatest').value in ('false', '0'):
+                self.useLatest = False
+            else:
+                raise ValueError('Bad boolean attribute (useLatest)')
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'baseFlavor':
+            baseFlavor_ = ''
+            for text__content_ in child_.childNodes:
+                baseFlavor_ += text__content_.nodeValue
+            self.baseFlavor = baseFlavor_
+            self.validate_baseFlavor(self.baseFlavor)    # validate type baseFlavor
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'searchPaths':
+            obj_ = searchPathListType.factory()
+            obj_.build(child_)
+            self.set_searchPaths(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'factorySources':
+            obj_ = factorySourceListType.factory()
+            obj_.build(child_)
+            self.set_factorySources(obj_)
+# end class platformType
+
+
+class productDefinition(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('version', 'xsd:string', 0),
+        _MemberSpec('productName', 'xsd:string', 0),
+        _MemberSpec('productShortname', 'xsd:string', 0),
+        _MemberSpec('productDescription', 'xsd:string', 0),
+        _MemberSpec('productVersion', 'xsd:string', 0),
+        _MemberSpec('productVersionDescription', 'xsd:string', 0),
+        _MemberSpec('conaryRepositoryHostname', 'xsd:string', 0),
+        _MemberSpec('conaryNamespace', 'xsd:string', 0),
+        _MemberSpec('imageGroup', 'xsd:string', 0),
+        _MemberSpec('baseFlavor', 'xsd:string', 0),
+        _MemberSpec('stages', 'stageListType', 0),
+        _MemberSpec('searchPaths', 'searchPathListType', 0),
+        _MemberSpec('factorySources', 'factorySourceListType', 0),
+        _MemberSpec('buildDefinition', 'buildDefinitionType', 0),
+        _MemberSpec('platform', 'platformType', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, version=None, productName=None, productShortname=None, productDescription=None, productVersion=None, productVersionDescription=None, conaryRepositoryHostname=None, conaryNamespace=None, imageGroup=None, baseFlavor=None, stages=None, searchPaths=None, factorySources=None, buildDefinition=None, platform=None):
+        self.version = _cast(None, version)
+        self.productName = productName
+        self.productShortname = productShortname
+        self.productDescription = productDescription
+        self.productVersion = productVersion
+        self.productVersionDescription = productVersionDescription
+        self.conaryRepositoryHostname = conaryRepositoryHostname
+        self.conaryNamespace = conaryNamespace
+        self.imageGroup = imageGroup
+        self.baseFlavor = baseFlavor
+        self.stages = stages
+        self.searchPaths = searchPaths
+        self.factorySources = factorySources
+        self.buildDefinition = buildDefinition
+        self.platform = platform
+    def factory(*args_, **kwargs_):
+        if productDefinition.subclass:
+            return productDefinition.subclass(*args_, **kwargs_)
+        else:
+            return productDefinition(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_productName(self): return self.productName
+    def set_productName(self, productName): self.productName = productName
+    def get_productShortname(self): return self.productShortname
+    def set_productShortname(self, productShortname): self.productShortname = productShortname
+    def get_productDescription(self): return self.productDescription
+    def set_productDescription(self, productDescription): self.productDescription = productDescription
+    def get_productVersion(self): return self.productVersion
+    def set_productVersion(self, productVersion): self.productVersion = productVersion
+    def get_productVersionDescription(self): return self.productVersionDescription
+    def set_productVersionDescription(self, productVersionDescription): self.productVersionDescription = productVersionDescription
+    def get_conaryRepositoryHostname(self): return self.conaryRepositoryHostname
+    def set_conaryRepositoryHostname(self, conaryRepositoryHostname): self.conaryRepositoryHostname = conaryRepositoryHostname
+    def get_conaryNamespace(self): return self.conaryNamespace
+    def set_conaryNamespace(self, conaryNamespace): self.conaryNamespace = conaryNamespace
+    def get_imageGroup(self): return self.imageGroup
+    def set_imageGroup(self, imageGroup): self.imageGroup = imageGroup
+    def validate_imageGroup(self, value):
+        # validate type imageGroup
+        pass
+    def get_baseFlavor(self): return self.baseFlavor
+    def set_baseFlavor(self, baseFlavor): self.baseFlavor = baseFlavor
+    def validate_baseFlavor(self, value):
+        # validate type baseFlavor
+        pass
+    def get_stages(self): return self.stages
+    def set_stages(self, stages): self.stages = stages
+    def get_searchPaths(self): return self.searchPaths
+    def set_searchPaths(self, searchPaths): self.searchPaths = searchPaths
+    def get_factorySources(self): return self.factorySources
+    def set_factorySources(self, factorySources): self.factorySources = factorySources
+    def get_buildDefinition(self): return self.buildDefinition
+    def set_buildDefinition(self, buildDefinition): self.buildDefinition = buildDefinition
+    def get_platform(self): return self.platform
+    def set_platform(self, platform): self.platform = platform
+    def get_version(self): return self.version
+    def set_version(self, version): self.version = version
+    def export(self, outfile, level, namespace_='rpd:', name_='productDefinition', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='productDefinition')
+        if self.hasContent_():
+            outfile.write('>\n')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            showIndent(outfile, level)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='productDefinition'):
+        if self.version is not None:
+            outfile.write(' version=%s' % (self.format_string(quote_attrib(self.version).encode(ExternalEncoding), input_name='version'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='productDefinition'):
+        if self.productName is not None:
+            showIndent(outfile, level)
+            outfile.write('<%sproductName>%s</%sproductName>\n' % (namespace_, self.format_string(quote_xml(self.productName).encode(ExternalEncoding), input_name='productName'), namespace_))
+        if self.productShortname is not None:
+            showIndent(outfile, level)
+            outfile.write('<%sproductShortname>%s</%sproductShortname>\n' % (namespace_, self.format_string(quote_xml(self.productShortname).encode(ExternalEncoding), input_name='productShortname'), namespace_))
+        if self.productDescription is not None:
+            showIndent(outfile, level)
+            outfile.write('<%sproductDescription>%s</%sproductDescription>\n' % (namespace_, self.format_string(quote_xml(self.productDescription).encode(ExternalEncoding), input_name='productDescription'), namespace_))
+        if self.productVersion is not None:
+            showIndent(outfile, level)
+            outfile.write('<%sproductVersion>%s</%sproductVersion>\n' % (namespace_, self.format_string(quote_xml(self.productVersion).encode(ExternalEncoding), input_name='productVersion'), namespace_))
+        if self.productVersionDescription is not None:
+            showIndent(outfile, level)
+            outfile.write('<%sproductVersionDescription>%s</%sproductVersionDescription>\n' % (namespace_, self.format_string(quote_xml(self.productVersionDescription).encode(ExternalEncoding), input_name='productVersionDescription'), namespace_))
+        if self.conaryRepositoryHostname is not None:
+            showIndent(outfile, level)
+            outfile.write('<%sconaryRepositoryHostname>%s</%sconaryRepositoryHostname>\n' % (namespace_, self.format_string(quote_xml(self.conaryRepositoryHostname).encode(ExternalEncoding), input_name='conaryRepositoryHostname'), namespace_))
+        if self.conaryNamespace is not None:
+            showIndent(outfile, level)
+            outfile.write('<%sconaryNamespace>%s</%sconaryNamespace>\n' % (namespace_, self.format_string(quote_xml(self.conaryNamespace).encode(ExternalEncoding), input_name='conaryNamespace'), namespace_))
+        if self.imageGroup is not None:
+            showIndent(outfile, level)
+            outfile.write('<%simageGroup>%s</%simageGroup>\n' % (namespace_, self.format_string(quote_xml(self.imageGroup).encode(ExternalEncoding), input_name='imageGroup'), namespace_))
+        if self.baseFlavor is not None:
+            showIndent(outfile, level)
+            outfile.write('<%sbaseFlavor>%s</%sbaseFlavor>\n' % (namespace_, self.format_string(quote_xml(self.baseFlavor).encode(ExternalEncoding), input_name='baseFlavor'), namespace_))
+        if self.stages:
+            self.stages.export(outfile, level, namespace_, name_='stages', )
+        if self.searchPaths:
+            self.searchPaths.export(outfile, level, namespace_, name_='searchPaths')
+        if self.factorySources:
+            self.factorySources.export(outfile, level, namespace_, name_='factorySources')
+        if self.buildDefinition:
+            self.buildDefinition.export(outfile, level, namespace_, name_='buildDefinition', )
+        if self.platform:
+            self.platform.export(outfile, level, namespace_, name_='platform')
+    def hasContent_(self):
+        if (
+            self.productName is not None or
+            self.productShortname is not None or
+            self.productDescription is not None or
+            self.productVersion is not None or
+            self.productVersionDescription is not None or
+            self.conaryRepositoryHostname is not None or
+            self.conaryNamespace is not None or
+            self.imageGroup is not None or
+            self.baseFlavor is not None or
+            self.stages is not None or
+            self.searchPaths is not None or
+            self.factorySources is not None or
+            self.buildDefinition is not None or
+            self.platform is not None
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='productDefinition'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.version is not None:
+            showIndent(outfile, level)
+            outfile.write('version = %s,\n' % (self.version,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('productName=%s,\n' % quote_python(self.productName).encode(ExternalEncoding))
+        showIndent(outfile, level)
+        outfile.write('productShortname=%s,\n' % quote_python(self.productShortname).encode(ExternalEncoding))
+        showIndent(outfile, level)
+        outfile.write('productDescription=%s,\n' % quote_python(self.productDescription).encode(ExternalEncoding))
+        showIndent(outfile, level)
+        outfile.write('productVersion=%s,\n' % quote_python(self.productVersion).encode(ExternalEncoding))
+        showIndent(outfile, level)
+        outfile.write('productVersionDescription=%s,\n' % quote_python(self.productVersionDescription).encode(ExternalEncoding))
+        showIndent(outfile, level)
+        outfile.write('conaryRepositoryHostname=%s,\n' % quote_python(self.conaryRepositoryHostname).encode(ExternalEncoding))
+        showIndent(outfile, level)
+        outfile.write('conaryNamespace=%s,\n' % quote_python(self.conaryNamespace).encode(ExternalEncoding))
+        showIndent(outfile, level)
+        outfile.write('imageGroup=%s,\n' % quote_python(self.imageGroup).encode(ExternalEncoding))
+        showIndent(outfile, level)
+        outfile.write('baseFlavor=%s,\n' % quote_python(self.baseFlavor).encode(ExternalEncoding))
+        if self.stages:
+            showIndent(outfile, level)
+            outfile.write('stages=model_.stageListType(\n')
+            self.stages.exportLiteral(outfile, level, name_='stages')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.searchPaths:
+            showIndent(outfile, level)
+            outfile.write('searchPaths=model_.searchPathListType(\n')
+            self.searchPaths.exportLiteral(outfile, level, name_='searchPaths')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.factorySources:
+            showIndent(outfile, level)
+            outfile.write('factorySources=model_.factorySourceListType(\n')
+            self.factorySources.exportLiteral(outfile, level, name_='factorySources')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.buildDefinition:
+            showIndent(outfile, level)
+            outfile.write('buildDefinition=model_.buildDefinitionType(\n')
+            self.buildDefinition.exportLiteral(outfile, level, name_='buildDefinition')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        if self.platform:
+            showIndent(outfile, level)
+            outfile.write('platform=model_.platformType(\n')
+            self.platform.exportLiteral(outfile, level, name_='platform')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('version'):
+            self.version = attrs.get('version').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'productName':
+            productName_ = ''
+            for text__content_ in child_.childNodes:
+                productName_ += text__content_.nodeValue
+            self.productName = productName_
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'productShortname':
+            productShortname_ = ''
+            for text__content_ in child_.childNodes:
+                productShortname_ += text__content_.nodeValue
+            self.productShortname = productShortname_
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'productDescription':
+            productDescription_ = ''
+            for text__content_ in child_.childNodes:
+                productDescription_ += text__content_.nodeValue
+            self.productDescription = productDescription_
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'productVersion':
+            productVersion_ = ''
+            for text__content_ in child_.childNodes:
+                productVersion_ += text__content_.nodeValue
+            self.productVersion = productVersion_
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'productVersionDescription':
+            productVersionDescription_ = ''
+            for text__content_ in child_.childNodes:
+                productVersionDescription_ += text__content_.nodeValue
+            self.productVersionDescription = productVersionDescription_
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'conaryRepositoryHostname':
+            conaryRepositoryHostname_ = ''
+            for text__content_ in child_.childNodes:
+                conaryRepositoryHostname_ += text__content_.nodeValue
+            self.conaryRepositoryHostname = conaryRepositoryHostname_
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'conaryNamespace':
+            conaryNamespace_ = ''
+            for text__content_ in child_.childNodes:
+                conaryNamespace_ += text__content_.nodeValue
+            self.conaryNamespace = conaryNamespace_
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'imageGroup':
+            imageGroup_ = ''
+            for text__content_ in child_.childNodes:
+                imageGroup_ += text__content_.nodeValue
+            self.imageGroup = imageGroup_
+            self.validate_imageGroup(self.imageGroup)    # validate type imageGroup
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'baseFlavor':
+            baseFlavor_ = ''
+            for text__content_ in child_.childNodes:
+                baseFlavor_ += text__content_.nodeValue
+            self.baseFlavor = baseFlavor_
+            self.validate_baseFlavor(self.baseFlavor)    # validate type baseFlavor
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'stages':
+            obj_ = stageListType.factory()
+            obj_.build(child_)
+            self.set_stages(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'searchPaths':
+            obj_ = searchPathListType.factory()
+            obj_.build(child_)
+            self.set_searchPaths(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'factorySources':
+            obj_ = factorySourceListType.factory()
+            obj_.build(child_)
+            self.set_factorySources(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'buildDefinition':
+            obj_ = buildDefinitionType.factory()
+            obj_.build(child_)
+            self.set_buildDefinition(obj_)
+        elif child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'platform':
+            obj_ = platformType.factory()
+            obj_.build(child_)
+            self.set_platform(obj_)
+# end class productDefinition
+
+
+USAGE_TEXT = """
+Usage: python <Parser>.py [ -s ] <in_xml_file>
+Options:
+    -s        Use the SAX parser, not the minidom parser.
+"""
+
+def usage():
+    print USAGE_TEXT
+    sys.exit(1)
+
+
+def parse(inFileName):
+    doc = minidom.parse(inFileName)
+    rootNode = doc.documentElement
+    rootObj = stageType.factory()
+    rootObj.build(rootNode)
+    # Enable Python to collect the space used by the DOM.
+    doc = None
+##     sys.stdout.write('<?xml version="1.0" ?>\n')
+##     rootObj.export(sys.stdout, 0, name_="stageType", 
+##         namespacedef_='')
+    return rootObj
+
+
+def parseString(inString):
+    doc = minidom.parseString(inString)
+    rootNode = doc.documentElement
+    rootObj = stageType.factory()
+    rootObj.build(rootNode)
+    # Enable Python to collect the space used by the DOM.
+    doc = None
+##     sys.stdout.write('<?xml version="1.0" ?>\n')
+##     rootObj.export(sys.stdout, 0, name_="stageType",
+##         namespacedef_='')
+    return rootObj
+
+
+def parseLiteral(inFileName):
+    doc = minidom.parse(inFileName)
+    rootNode = doc.documentElement
+    rootObj = stageType.factory()
+    rootObj.build(rootNode)
+    # Enable Python to collect the space used by the DOM.
+    doc = None
+##     sys.stdout.write('from supers import *\n\n')
+##     sys.stdout.write('rootObj = stageType(\n')
+##     rootObj.exportLiteral(sys.stdout, 0, name_="stageType")
+##     sys.stdout.write(')\n')
+    return rootObj
+
+
+def main():
+    args = sys.argv[1:]
+    if len(args) == 1:
+        parse(args[0])
+    else:
+        usage()
+
+
+if __name__ == '__main__':
+    main()
+    #import pdb
+    #pdb.run('main()')
+
diff --git a/rpath_proddef/xml_1_2/__init__.py b/rpath_proddef/xml_1_2/__init__.py
new file mode 100644
diff --git a/rpath_proddef/xml_1_2/generatedssuper.py b/rpath_proddef/xml_1_2/generatedssuper.py
new file mode 100644
--- /dev/null
+++ b/rpath_proddef/xml_1_2/generatedssuper.py
@@ -0,0 +1,34 @@
+class GeneratedsSuper(object):
+    def format_string(self, input_data, input_name=''):
+        return input_data
+    def format_integer(self, input_data, input_name=''):
+        return '%d' % input_data
+    def format_float(self, input_data, input_name=''):
+        return '%f' % input_data
+    def format_double(self, input_data, input_name=''):
+        return '%e' % input_data
+    def format_boolean(self, input_data, input_name=''):
+        return '%s' % input_data
+
+    def __eq__(self, obj):
+        if not isinstance(obj, self.__class__):
+            return False
+        if len(self._member_data_items) != len(obj._member_data_items):
+            return False
+        fields = (x.name for x in self._member_data_items)
+        for field in fields:
+            objL = getattr(self, field)
+            objR = getattr(obj, field)
+            if isinstance(objL, list):
+                if not isinstance(objR, list) or len(objL) != len(objR):
+                    return False
+                for (L, R) in zip(objL, objR):
+                    if L != R:
+                        return False
+                continue
+            if objL != objR:
+                return False
+        return True
+
+    def __ne__(self, obj):
+        return not self.__eq__(obj)
diff --git a/rpath_proddef/xml_1_2/subs.py b/rpath_proddef/xml_1_2/subs.py
new file mode 100644
--- /dev/null
+++ b/rpath_proddef/xml_1_2/subs.py
@@ -0,0 +1,351 @@
+#!/usr/bin/env python
+
+#
+# Generated  by generateDS.py version 1.18c.
+#
+
+import sys
+from string import lower as str_lower
+from xml.dom import minidom
+from xml.sax import handler, make_parser
+
+import supers as supermod
+
+#
+# Globals
+#
+
+ExternalEncoding = 'utf-8'
+
+#
+# Data representation classes
+#
+
+class stageTypeSub(supermod.stageType):
+    def __init__(self, labelSuffix=None, name=None, valueOf_=''):
+        supermod.stageType.__init__(self, labelSuffix, name, valueOf_)
+supermod.stageType.subclass = stageTypeSub
+# end class stageTypeSub
+
+
+class stageListTypeSub(supermod.stageListType):
+    def __init__(self, stage=None):
+        supermod.stageListType.__init__(self, stage)
+supermod.stageListType.subclass = stageListTypeSub
+# end class stageListTypeSub
+
+
+class searchPathTypeSub(supermod.searchPathType):
+    def __init__(self, troveName=None, version=None, label=None, valueOf_=''):
+        supermod.searchPathType.__init__(self, troveName, version, label, valueOf_)
+supermod.searchPathType.subclass = searchPathTypeSub
+# end class searchPathTypeSub
+
+
+class searchPathListTypeSub(supermod.searchPathListType):
+    def __init__(self, searchPath=None):
+        supermod.searchPathListType.__init__(self, searchPath)
+supermod.searchPathListType.subclass = searchPathListTypeSub
+# end class searchPathListTypeSub
+
+
+class factorySourceListTypeSub(supermod.factorySourceListType):
+    def __init__(self, factorySource=None):
+        supermod.factorySourceListType.__init__(self, factorySource)
+supermod.factorySourceListType.subclass = factorySourceListTypeSub
+# end class factorySourceListTypeSub
+
+
+class amiImageTypeSub(supermod.amiImageType):
+    def __init__(self, autoResolve=None, freespace=None, name=None, baseFileName=None, installLabelPath=None, amiHugeDiskMountpoint=None, valueOf_=''):
+        supermod.amiImageType.__init__(self, autoResolve, freespace, name, baseFileName, installLabelPath, amiHugeDiskMountpoint, valueOf_)
+supermod.amiImageType.subclass = amiImageTypeSub
+# end class amiImageTypeSub
+
+
+class applianceIsoImageTypeSub(supermod.applianceIsoImageType):
+    def __init__(self, maxIsoSize=None, autoResolve=None, bugsUrl=None, name=None, anacondaCustomTrove=None, betaNag=None, mediaTemplateTrove=None, installLabelPath=None, anacondaTemplatesTrove=None, baseFileName=None, showMediaCheck=None, valueOf_=''):
+        supermod.applianceIsoImageType.__init__(self, maxIsoSize, autoResolve, bugsUrl, name, anacondaCustomTrove, betaNag, mediaTemplateTrove, installLabelPath, anacondaTemplatesTrove, baseFileName, showMediaCheck, valueOf_)
+supermod.applianceIsoImageType.subclass = applianceIsoImageTypeSub
+# end class applianceIsoImageTypeSub
+
+
+class installableIsoImageTypeSub(supermod.installableIsoImageType):
+    def __init__(self, maxIsoSize=None, autoResolve=None, bugsUrl=None, name=None, anacondaCustomTrove=None, betaNag=None, mediaTemplateTrove=None, installLabelPath=None, anacondaTemplatesTrove=None, baseFileName=None, showMediaCheck=None, valueOf_=''):
+        supermod.installableIsoImageType.__init__(self, maxIsoSize, autoResolve, bugsUrl, name, anacondaCustomTrove, betaNag, mediaTemplateTrove, installLabelPath, anacondaTemplatesTrove, baseFileName, showMediaCheck, valueOf_)
+supermod.installableIsoImageType.subclass = installableIsoImageTypeSub
+# end class installableIsoImageTypeSub
+
+
+class liveIsoImageTypeSub(supermod.liveIsoImageType):
+    def __init__(self, autoResolve=None, name=None, zisofs=None, baseFileName=None, unionfs=None, installLabelPath=None, valueOf_=''):
+        supermod.liveIsoImageType.__init__(self, autoResolve, name, zisofs, baseFileName, unionfs, installLabelPath, valueOf_)
+supermod.liveIsoImageType.subclass = liveIsoImageTypeSub
+# end class liveIsoImageTypeSub
+
+
+class netbootImageTypeSub(supermod.netbootImageType):
+    def __init__(self, autoResolve=None, baseFileName=None, installLabelPath=None, name=None, valueOf_=''):
+        supermod.netbootImageType.__init__(self, autoResolve, baseFileName, installLabelPath, name, valueOf_)
+supermod.netbootImageType.subclass = netbootImageTypeSub
+# end class netbootImageTypeSub
+
+
+class rawFsImageTypeSub(supermod.rawFsImageType):
+    def __init__(self, autoResolve=None, freespace=None, name=None, swapSize=None, baseFileName=None, installLabelPath=None, valueOf_=''):
+        supermod.rawFsImageType.__init__(self, autoResolve, freespace, name, swapSize, baseFileName, installLabelPath, valueOf_)
+supermod.rawFsImageType.subclass = rawFsImageTypeSub
+# end class rawFsImageTypeSub
+
+
+class rawHdImageTypeSub(supermod.rawHdImageType):
+    def __init__(self, autoResolve=None, freespace=None, name=None, swapSize=None, baseFileName=None, installLabelPath=None, valueOf_=''):
+        supermod.rawHdImageType.__init__(self, autoResolve, freespace, name, swapSize, baseFileName, installLabelPath, valueOf_)
+supermod.rawHdImageType.subclass = rawHdImageTypeSub
+# end class rawHdImageTypeSub
+
+
+class tarballImageTypeSub(supermod.tarballImageType):
+    def __init__(self, autoResolve=None, baseFileName=None, installLabelPath=None, name=None, swapSize=None, valueOf_=''):
+        supermod.tarballImageType.__init__(self, autoResolve, baseFileName, installLabelPath, name, swapSize, valueOf_)
+supermod.tarballImageType.subclass = tarballImageTypeSub
+# end class tarballImageTypeSub
+
+
+class updateIsoImageTypeSub(supermod.updateIsoImageType):
+    def __init__(self, mediaTemplateTrove=None, baseFileName=None, valueOf_=''):
+        supermod.updateIsoImageType.__init__(self, mediaTemplateTrove, baseFileName, valueOf_)
+supermod.updateIsoImageType.subclass = updateIsoImageTypeSub
+# end class updateIsoImageTypeSub
+
+
+class vhdImageTypeSub(supermod.vhdImageType):
+    def __init__(self, autoResolve=None, freespace=None, name=None, vhdDiskType=None, swapSize=None, baseFileName=None, installLabelPath=None, valueOf_=''):
+        supermod.vhdImageType.__init__(self, autoResolve, freespace, name, vhdDiskType, swapSize, baseFileName, installLabelPath, valueOf_)
+supermod.vhdImageType.subclass = vhdImageTypeSub
+# end class vhdImageTypeSub
+
+
+class virtualIronImageTypeSub(supermod.virtualIronImageType):
+    def __init__(self, autoResolve=None, freespace=None, name=None, vhdDiskType=None, swapSize=None, baseFileName=None, installLabelPath=None, valueOf_=''):
+        supermod.virtualIronImageType.__init__(self, autoResolve, freespace, name, vhdDiskType, swapSize, baseFileName, installLabelPath, valueOf_)
+supermod.virtualIronImageType.subclass = virtualIronImageTypeSub
+# end class virtualIronImageTypeSub
+
+
+class vmwareEsxImageTypeSub(supermod.vmwareEsxImageType):
+    def __init__(self, autoResolve=None, freespace=None, name=None, natNetworking=None, vmMemory=None, swapSize=None, installLabelPath=None, baseFileName=None, valueOf_=''):
+        supermod.vmwareEsxImageType.__init__(self, autoResolve, freespace, name, natNetworking, vmMemory, swapSize, installLabelPath, baseFileName, valueOf_)
+supermod.vmwareEsxImageType.subclass = vmwareEsxImageTypeSub
+# end class vmwareEsxImageTypeSub
+
+
+class vmwareImageTypeSub(supermod.vmwareImageType):
+    def __init__(self, autoResolve=None, freespace=None, name=None, natNetworking=None, vmMemory=None, swapSize=None, diskAdapter=None, installLabelPath=None, baseFileName=None, vmSnapshots=None, valueOf_=''):
+        supermod.vmwareImageType.__init__(self, autoResolve, freespace, name, natNetworking, vmMemory, swapSize, diskAdapter, installLabelPath, baseFileName, vmSnapshots, valueOf_)
+supermod.vmwareImageType.subclass = vmwareImageTypeSub
+# end class vmwareImageTypeSub
+
+
+class xenOvaImageTypeSub(supermod.xenOvaImageType):
+    def __init__(self, autoResolve=None, freespace=None, name=None, vmMemory=None, swapSize=None, baseFileName=None, installLabelPath=None, valueOf_=''):
+        supermod.xenOvaImageType.__init__(self, autoResolve, freespace, name, vmMemory, swapSize, baseFileName, installLabelPath, valueOf_)
+supermod.xenOvaImageType.subclass = xenOvaImageTypeSub
+# end class xenOvaImageTypeSub
+
+
+class buildDefinitionTypeSub(supermod.buildDefinitionType):
+    def __init__(self, build_=None):
+        supermod.buildDefinitionType.__init__(self, build_)
+supermod.buildDefinitionType.subclass = buildDefinitionTypeSub
+# end class buildDefinitionTypeSub
+
+
+class buildTypeSub(supermod.buildType):
+    def __init__(self, baseFlavor=None, flavor=None, architectureRef=None, imageTemplateRef=None, name=None, amiImage=None, applianceIsoImage=None, installableIsoImage=None, liveIsoImage=None, netbootImage=None, rawFsImage=None, rawHdImage=None, tarballImage=None, updateIsoImage=None, vhdImage=None, virtualIronImage=None, vmwareImage=None, vmwareEsxImage=None, xenOvaImage=None, stage=None, imageGroup=None):
+        supermod.buildType.__init__(self, baseFlavor, flavor, architectureRef, imageTemplateRef, name, amiImage, applianceIsoImage, installableIsoImage, liveIsoImage, netbootImage, rawFsImage, rawHdImage, tarballImage, updateIsoImage, vhdImage, virtualIronImage, vmwareImage, vmwareEsxImage, xenOvaImage, stage, imageGroup)
+supermod.buildType.subclass = buildTypeSub
+# end class buildTypeSub
+
+
+class stageSub(supermod.stage):
+    def __init__(self, ref=None, valueOf_=''):
+        supermod.stage.__init__(self, ref, valueOf_)
+supermod.stage.subclass = stageSub
+# end class stageSub
+
+
+class platformDefinitionTypeSub(supermod.platformDefinitionType):
+    def __init__(self, version=None, baseFlavor=None, searchPaths=None, factorySources=None, architectures=None, imageTemplates=None):
+        supermod.platformDefinitionType.__init__(self, version, baseFlavor, searchPaths, factorySources, architectures, imageTemplates)
+supermod.platformDefinitionType.subclass = platformDefinitionTypeSub
+# end class platformDefinitionTypeSub
+
+
+class platformTypeSub(supermod.platformType):
+    def __init__(self, sourceTrove=None, useLatest=None, baseFlavor=None, searchPaths=None, factorySources=None, architectures=None, imageTemplates=None):
+        supermod.platformType.__init__(self, sourceTrove, useLatest, baseFlavor, searchPaths, factorySources, architectures, imageTemplates)
+supermod.platformType.subclass = platformTypeSub
+# end class platformTypeSub
+
+
+class nameFlavorTypeSub(supermod.nameFlavorType):
+    def __init__(self, flavor=None, name=None, valueOf_=''):
+        supermod.nameFlavorType.__init__(self, flavor, name, valueOf_)
+supermod.nameFlavorType.subclass = nameFlavorTypeSub
+# end class nameFlavorTypeSub
+
+
+class architecturesTypeSub(supermod.architecturesType):
+    def __init__(self, architecture=None):
+        supermod.architecturesType.__init__(self, architecture)
+supermod.architecturesType.subclass = architecturesTypeSub
+# end class architecturesTypeSub
+
+
+class imageTemplatesTypeSub(supermod.imageTemplatesType):
+    def __init__(self, imageTemplate=None):
+        supermod.imageTemplatesType.__init__(self, imageTemplate)
+supermod.imageTemplatesType.subclass = imageTemplatesTypeSub
+# end class imageTemplatesTypeSub
+
+
+class productDefinitionSub(supermod.productDefinition):
+    def __init__(self, version=None, productName=None, productShortname=None, productDescription=None, productVersion=None, productVersionDescription=None, conaryRepositoryHostname=None, conaryNamespace=None, imageGroup=None, baseFlavor=None, stages=None, searchPaths=None, factorySources=None, architectures=None, imageTemplates=None, buildDefinition=None, platform=None):
+        supermod.productDefinition.__init__(self, version, productName, productShortname, productDescription, productVersion, productVersionDescription, conaryRepositoryHostname, conaryNamespace, imageGroup, baseFlavor, stages, searchPaths, factorySources, architectures, imageTemplates, buildDefinition, platform)
+supermod.productDefinition.subclass = productDefinitionSub
+# end class productDefinitionSub
+
+
+
+#
+# SAX handler used to determine the top level element.
+#
+class SaxSelectorHandler(handler.ContentHandler):
+    def __init__(self):
+        self.topElementName = None
+    def getTopElementName(self):
+        return self.topElementName
+    def startElement(self, name, attrs):
+        self.topElementName = name
+        raise StopIteration
+
+
+def parseSelect(inFileName):
+    infile = file(inFileName, 'r')
+    topElementName = None
+    parser = make_parser()
+    documentHandler = SaxSelectorHandler()
+    parser.setContentHandler(documentHandler)
+    try:
+        try:
+            parser.parse(infile)
+        except StopIteration:
+            topElementName = documentHandler.getTopElementName()
+        if topElementName is None:
+            raise RuntimeError, 'no top level element'
+        topElementName = topElementName.replace('-', '_').replace(':', '_')
+        if topElementName not in supermod.__dict__:
+            raise RuntimeError, 'no class for top element: %s' % topElementName
+        topElement = supermod.__dict__[topElementName]
+        infile.seek(0)
+        doc = minidom.parse(infile)
+    finally:
+        infile.close()
+    rootNode = doc.childNodes[0]
+    rootObj = topElement.factory()
+    rootObj.build(rootNode)
+    # Enable Python to collect the space used by the DOM.
+    doc = None
+##     sys.stdout.write('<?xml version="1.0" ?>\n')
+##     rootObj.export(sys.stdout, 0)
+    return rootObj
+
+
+def saxParse(inFileName):
+    parser = make_parser()
+    documentHandler = supermod.Sax_stageTypeHandler()
+    parser.setDocumentHandler(documentHandler)
+    parser.parse('file:%s' % inFileName)
+    rootObj = documentHandler.getRoot()
+    #sys.stdout.write('<?xml version="1.0" ?>\n')
+    #rootObj.export(sys.stdout, 0)
+    return rootObj
+
+
+def saxParseString(inString):
+    parser = make_parser()
+    documentHandler = supermod.SaxContentHandler()
+    parser.setDocumentHandler(documentHandler)
+    parser.feed(inString)
+    parser.close()
+    rootObj = documentHandler.getRoot()
+    #sys.stdout.write('<?xml version="1.0" ?>\n')
+    #rootObj.export(sys.stdout, 0)
+    return rootObj
+
+
+def parse(inFilename):
+    doc = minidom.parse(inFilename)
+    rootNode = doc.documentElement
+    rootObj = supermod.stageType.factory()
+    rootObj.build(rootNode)
+    # Enable Python to collect the space used by the DOM.
+    doc = None
+##     sys.stdout.write('<?xml version="1.0" ?>\n')
+##     rootObj.export(sys.stdout, 0, name_="stageType",
+##         namespacedef_='')
+    doc = None
+    return rootObj
+
+
+def parseString(inString):
+    doc = minidom.parseString(inString)
+    rootNode = doc.documentElement
+    rootObj = supermod.stageType.factory()
+    rootObj.build(rootNode)
+    # Enable Python to collect the space used by the DOM.
+    doc = None
+##     sys.stdout.write('<?xml version="1.0" ?>\n')
+##     rootObj.export(sys.stdout, 0, name_="stageType",
+##         namespacedef_='')
+    return rootObj
+
+
+def parseLiteral(inFilename):
+    doc = minidom.parse(inFilename)
+    rootNode = doc.documentElement
+    rootObj = supermod.stageType.factory()
+    rootObj.build(rootNode)
+    # Enable Python to collect the space used by the DOM.
+    doc = None
+##     sys.stdout.write('from supers import *\n\n')
+##     sys.stdout.write('rootObj = stageType(\n')
+##     rootObj.exportLiteral(sys.stdout, 0, name_="stageType")
+##     sys.stdout.write(')\n')
+    return rootObj
+
+
+USAGE_TEXT = """
+Usage: python ???.py <infilename>
+"""
+
+def usage():
+    print USAGE_TEXT
+    sys.exit(1)
+
+
+def main():
+    args = sys.argv[1:]
+    if len(args) != 1:
+        usage()
+    infilename = args[0]
+    root = parse(infilename)
+
+
+if __name__ == '__main__':
+    main()
+    #import pdb
+    #pdb.run('main()')
+
+
diff --git a/rpath_proddef/xml_1_2/supers.py b/rpath_proddef/xml_1_2/supers.py
new file mode 100644
--- /dev/null
+++ b/rpath_proddef/xml_1_2/supers.py
@@ -0,0 +1,4392 @@
+#!/usr/bin/env python
+
+#
+# Generated  by generateDS.py version 1.18c.
+#
+
+import sys
+import getopt
+from string import lower as str_lower
+from xml.dom import minidom
+from xml.dom import Node
+
+#
+# User methods
+#
+# Calls to the methods in these classes are generated by generateDS.py.
+# You can replace these methods by re-implementing the following class
+#   in a module named generatedssuper.py.
+
+try:
+    from generatedssuper import GeneratedsSuper
+except ImportError, exp:
+
+    class GeneratedsSuper:
+        def format_string(self, input_data, input_name=''):
+            return input_data
+        def format_integer(self, input_data, input_name=''):
+            return '%d' % input_data
+        def format_float(self, input_data, input_name=''):
+            return '%f' % input_data
+        def format_double(self, input_data, input_name=''):
+            return '%e' % input_data
+        def format_boolean(self, input_data, input_name=''):
+            return '%s' % input_data
+
+
+#
+# If you have installed IPython you can uncomment and use the following.
+# IPython is available from http://ipython.scipy.org/.
+#
+
+## from IPython.Shell import IPShellEmbed
+## args = ''
+## ipshell = IPShellEmbed(args,
+##     banner = 'Dropping into IPython',
+##     exit_msg = 'Leaving Interpreter, back to program.')
+
+# Then use the following line where and when you want to drop into the
+# IPython shell:
+#    ipshell('<some message> -- Entering ipshell.\nHit Ctrl-D to exit')
+
+#
+# Globals
+#
+
+ExternalEncoding = 'utf-8'
+
+#
+# Support/utility functions.
+#
+
+def showIndent(outfile, level):
+    for idx in range(level):
+        outfile.write('    ')
+
+def quote_xml(inStr):
+    s1 = (isinstance(inStr, basestring) and inStr or
+          '%s' % inStr)
+    s1 = s1.replace('&', '&amp;')
+    s1 = s1.replace('<', '&lt;')
+    s1 = s1.replace('>', '&gt;')
+    return s1
+
+def quote_attrib(inStr):
+    s1 = (isinstance(inStr, basestring) and inStr or
+          '%s' % inStr)
+    s1 = s1.replace('&', '&amp;')
+    s1 = s1.replace('<', '&lt;')
+    s1 = s1.replace('>', '&gt;')
+    if '"' in s1:
+        if "'" in s1:
+            s1 = '"%s"' % s1.replace('"', "&quot;")
+        else:
+            s1 = "'%s'" % s1
+    else:
+        s1 = '"%s"' % s1
+    return s1
+
+def quote_python(inStr):
+    s1 = inStr
+    if s1.find("'") == -1:
+        if s1.find('\n') == -1:
+            return "'%s'" % s1
+        else:
+            return "'''%s'''" % s1
+    else:
+        if s1.find('"') != -1:
+            s1 = s1.replace('"', '\\"')
+        if s1.find('\n') == -1:
+            return '"%s"' % s1
+        else:
+            return '"""%s"""' % s1
+
+
+class MixedContainer:
+    # Constants for category:
+    CategoryNone = 0
+    CategoryText = 1
+    CategorySimple = 2
+    CategoryComplex = 3
+    # Constants for content_type:
+    TypeNone = 0
+    TypeText = 1
+    TypeString = 2
+    TypeInteger = 3
+    TypeFloat = 4
+    TypeDecimal = 5
+    TypeDouble = 6
+    TypeBoolean = 7
+    def __init__(self, category, content_type, name, value):
+        self.category = category
+        self.content_type = content_type
+        self.name = name
+        self.value = value
+    def getCategory(self):
+        return self.category
+    def getContenttype(self, content_type):
+        return self.content_type
+    def getValue(self):
+        return self.value
+    def getName(self):
+        return self.name
+    def export(self, outfile, level, name, namespace):
+        if self.category == MixedContainer.CategoryText:
+            outfile.write(self.value)
+        elif self.category == MixedContainer.CategorySimple:
+            self.exportSimple(outfile, level, name)
+        else:    # category == MixedContainer.CategoryComplex
+            self.value.export(outfile, level, namespace,name)
+    def exportSimple(self, outfile, level, name):
+        if self.content_type == MixedContainer.TypeString:
+            outfile.write('<%s>%s</%s>' % (self.name, self.value, self.name))
+        elif self.content_type == MixedContainer.TypeInteger or \
+                self.content_type == MixedContainer.TypeBoolean:
+            outfile.write('<%s>%d</%s>' % (self.name, self.value, self.name))
+        elif self.content_type == MixedContainer.TypeFloat or \
+                self.content_type == MixedContainer.TypeDecimal:
+            outfile.write('<%s>%f</%s>' % (self.name, self.value, self.name))
+        elif self.content_type == MixedContainer.TypeDouble:
+            outfile.write('<%s>%g</%s>' % (self.name, self.value, self.name))
+    def exportLiteral(self, outfile, level, name):
+        if self.category == MixedContainer.CategoryText:
+            showIndent(outfile, level)
+            outfile.write('MixedContainer(%d, %d, "%s", "%s"),\n' % \
+                (self.category, self.content_type, self.name, self.value))
+        elif self.category == MixedContainer.CategorySimple:
+            showIndent(outfile, level)
+            outfile.write('MixedContainer(%d, %d, "%s", "%s"),\n' % \
+                (self.category, self.content_type, self.name, self.value))
+        else:    # category == MixedContainer.CategoryComplex
+            showIndent(outfile, level)
+            outfile.write('MixedContainer(%d, %d, "%s",\n' % \
+                (self.category, self.content_type, self.name,))
+            self.value.exportLiteral(outfile, level + 1)
+            showIndent(outfile, level)
+            outfile.write(')\n')
+
+
+class _MemberSpec(object):
+    def __init__(self, name='', data_type='', container=0):
+        self.name = name
+        self.data_type = data_type
+        self.container = container
+    def set_name(self, name): self.name = name
+    def get_name(self): return self.name
+    def set_data_type(self, data_type): self.data_type = data_type
+    def get_data_type(self): return self.data_type
+    def set_container(self, container): self.container = container
+    def get_container(self): return self.container
+
+def _cast(typ, value):
+    if typ is None or value is None:
+        return value
+    return typ(value)
+
+#
+# Data representation classes.
+#
+
+class stageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('labelSuffix', 'xsd:string', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, labelSuffix=None, name=None, valueOf_=''):
+        self.labelSuffix = _cast(None, labelSuffix)
+        self.name = _cast(None, name)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if stageType.subclass:
+            return stageType.subclass(*args_, **kwargs_)
+        else:
+            return stageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_labelSuffix(self): return self.labelSuffix
+    def set_labelSuffix(self, labelSuffix): self.labelSuffix = labelSuffix
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='stageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='stageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='stageType'):
+        outfile.write(' labelSuffix=%s' % (self.format_string(quote_attrib(self.labelSuffix).encode(ExternalEncoding), input_name='labelSuffix'), ))
+        outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='stageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='stageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.labelSuffix is not None:
+            showIndent(outfile, level)
+            outfile.write('labelSuffix = %s,\n' % (self.labelSuffix,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('labelSuffix'):
+            self.labelSuffix = attrs.get('labelSuffix').value
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+
+    def getPromoteMaps(self):
+        vals = self.get_promoteMaps()
+        if vals is None:
+            return []
+        return vals.get_promoteMap()
+# end class stageType
+
+
+class stageListType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('stage', 'stageType', 1),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, stage=None):
+        if stage is None:
+            self.stage = []
+        else:
+            self.stage = stage
+    def factory(*args_, **kwargs_):
+        if stageListType.subclass:
+            return stageListType.subclass(*args_, **kwargs_)
+        else:
+            return stageListType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_stage(self): return self.stage
+    def set_stage(self, stage): self.stage = stage
+    def add_stage(self, value): self.stage.append(value)
+    def insert_stage(self, index, value): self.stage[index] = value
+    def export(self, outfile, level, namespace_='rpd:', name_='stageListType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='stageListType')
+        if self.hasContent_():
+            outfile.write('>\n')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            showIndent(outfile, level)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='stageListType'):
+        pass
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='stageListType'):
+        for stage_ in self.stage:
+            stage_.export(outfile, level, namespace_, name_='stage')
+    def hasContent_(self):
+        if (
+            self.stage
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='stageListType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        pass
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('stage=[\n')
+        level += 1
+        for stage in self.stage:
+            showIndent(outfile, level)
+            outfile.write('model_.stage(\n')
+            stage.exportLiteral(outfile, level, name_='stage')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        level -= 1
+        showIndent(outfile, level)
+        outfile.write('],\n')
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        pass
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'stage':
+            obj_ = stageType.factory()
+            obj_.build(child_)
+            self.stage.append(obj_)
+# end class stageListType
+
+
+class searchPathType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('troveName', 'xsd:string', 0),
+        _MemberSpec('version', 'xsd:string', 0),
+        _MemberSpec('label', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, troveName=None, version=None, label=None, valueOf_=''):
+        self.troveName = _cast(None, troveName)
+        self.version = _cast(None, version)
+        self.label = _cast(None, label)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if searchPathType.subclass:
+            return searchPathType.subclass(*args_, **kwargs_)
+        else:
+            return searchPathType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_troveName(self): return self.troveName
+    def set_troveName(self, troveName): self.troveName = troveName
+    def get_version(self): return self.version
+    def set_version(self, version): self.version = version
+    def get_label(self): return self.label
+    def set_label(self, label): self.label = label
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='searchPathType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='searchPathType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='searchPathType'):
+        if self.troveName is not None:
+            outfile.write(' troveName=%s' % (self.format_string(quote_attrib(self.troveName).encode(ExternalEncoding), input_name='troveName'), ))
+        if self.version is not None:
+            outfile.write(' version=%s' % (self.format_string(quote_attrib(self.version).encode(ExternalEncoding), input_name='version'), ))
+        if self.label is not None:
+            outfile.write(' label=%s' % (self.format_string(quote_attrib(self.label).encode(ExternalEncoding), input_name='label'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='searchPathType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='searchPathType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.troveName is not None:
+            showIndent(outfile, level)
+            outfile.write('troveName = %s,\n' % (self.troveName,))
+        if self.version is not None:
+            showIndent(outfile, level)
+            outfile.write('version = %s,\n' % (self.version,))
+        if self.label is not None:
+            showIndent(outfile, level)
+            outfile.write('label = %s,\n' % (self.label,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('troveName'):
+            self.troveName = attrs.get('troveName').value
+        if attrs.get('version'):
+            self.version = attrs.get('version').value
+        if attrs.get('label'):
+            self.label = attrs.get('label').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+
+    def getTroveTup(self, template=False):
+        """
+        Get a trovespec tuple for the search path or its template.
+
+        @param template: If C{True}, use the template path; otherwise
+            return the "pinned" path.
+        @type  template: C{bool}
+        @return: (name, version, flavor)
+        """
+        if template:
+            return (self.troveName, self.label, None)
+        else:
+            version = self.label
+            if self.version:
+                version += '/' + self.version
+            return (self.troveName, version, None)
+# end class searchPathType
+
+
+class searchPathListType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('searchPath', 'searchPathType', 1),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, searchPath=None):
+        if searchPath is None:
+            self.searchPath = []
+        else:
+            self.searchPath = searchPath
+    def factory(*args_, **kwargs_):
+        if searchPathListType.subclass:
+            return searchPathListType.subclass(*args_, **kwargs_)
+        else:
+            return searchPathListType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_searchPath(self): return self.searchPath
+    def set_searchPath(self, searchPath): self.searchPath = searchPath
+    def add_searchPath(self, value): self.searchPath.append(value)
+    def insert_searchPath(self, index, value): self.searchPath[index] = value
+    def export(self, outfile, level, namespace_='rpd:', name_='searchPathListType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='searchPathListType')
+        if self.hasContent_():
+            outfile.write('>\n')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            showIndent(outfile, level)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='searchPathListType'):
+        pass
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='searchPathListType'):
+        for searchPath_ in self.searchPath:
+            searchPath_.export(outfile, level, namespace_, name_='searchPath')
+    def hasContent_(self):
+        if (
+            self.searchPath
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='searchPathListType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        pass
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('searchPath=[\n')
+        level += 1
+        for searchPath in self.searchPath:
+            showIndent(outfile, level)
+            outfile.write('model_.searchPath(\n')
+            searchPath.exportLiteral(outfile, level, name_='searchPath')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        level -= 1
+        showIndent(outfile, level)
+        outfile.write('],\n')
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        pass
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'searchPath':
+            obj_ = searchPathType.factory()
+            obj_.build(child_)
+            self.searchPath.append(obj_)
+# end class searchPathListType
+
+
+class factorySourceListType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('factorySource', 'searchPathType', 1),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, factorySource=None):
+        if factorySource is None:
+            self.factorySource = []
+        else:
+            self.factorySource = factorySource
+    def factory(*args_, **kwargs_):
+        if factorySourceListType.subclass:
+            return factorySourceListType.subclass(*args_, **kwargs_)
+        else:
+            return factorySourceListType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_factorySource(self): return self.factorySource
+    def set_factorySource(self, factorySource): self.factorySource = factorySource
+    def add_factorySource(self, value): self.factorySource.append(value)
+    def insert_factorySource(self, index, value): self.factorySource[index] = value
+    def export(self, outfile, level, namespace_='rpd:', name_='factorySourceListType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='factorySourceListType')
+        if self.hasContent_():
+            outfile.write('>\n')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            showIndent(outfile, level)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='factorySourceListType'):
+        pass
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='factorySourceListType'):
+        for factorySource_ in self.factorySource:
+            factorySource_.export(outfile, level, namespace_, name_='factorySource')
+    def hasContent_(self):
+        if (
+            self.factorySource
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='factorySourceListType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        pass
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('factorySource=[\n')
+        level += 1
+        for factorySource in self.factorySource:
+            showIndent(outfile, level)
+            outfile.write('model_.factorySource(\n')
+            factorySource.exportLiteral(outfile, level, name_='factorySource')
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        level -= 1
+        showIndent(outfile, level)
+        outfile.write('],\n')
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        pass
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.ELEMENT_NODE and \
+            nodeName_ == 'factorySource':
+            obj_ = searchPathType.factory()
+            obj_.build(child_)
+            self.factorySource.append(obj_)
+# end class factorySourceListType
+
+
+class amiImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('freespace', 'xsd:nonNegativeInteger', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        _MemberSpec('amiHugeDiskMountpoint', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, autoResolve=None, freespace=None, name=None, baseFileName=None, installLabelPath=None, amiHugeDiskMountpoint=None, valueOf_=''):
+        self.autoResolve = _cast(bool, autoResolve)
+        self.freespace = _cast(int, freespace)
+        self.name = _cast(None, name)
+        self.baseFileName = _cast(None, baseFileName)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.amiHugeDiskMountpoint = _cast(None, amiHugeDiskMountpoint)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if amiImageType.subclass:
+            return amiImageType.subclass(*args_, **kwargs_)
+        else:
+            return amiImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_freespace(self): return self.freespace
+    def set_freespace(self, freespace): self.freespace = freespace
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def get_amiHugeDiskMountpoint(self): return self.amiHugeDiskMountpoint
+    def set_amiHugeDiskMountpoint(self, amiHugeDiskMountpoint): self.amiHugeDiskMountpoint = amiHugeDiskMountpoint
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='amiImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='amiImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='amiImageType'):
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.freespace is not None:
+            outfile.write(' freespace="%s"' % self.format_integer(self.freespace, input_name='freespace'))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+        if self.installLabelPath is not None:
+            outfile.write(' installLabelPath=%s' % (self.format_string(quote_attrib(self.installLabelPath).encode(ExternalEncoding), input_name='installLabelPath'), ))
+        if self.amiHugeDiskMountpoint is not None:
+            outfile.write(' amiHugeDiskMountpoint=%s' % (self.format_string(quote_attrib(self.amiHugeDiskMountpoint).encode(ExternalEncoding), input_name='amiHugeDiskMountpoint'), ))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='amiImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='amiImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.autoResolve is not None:
+            showIndent(outfile, level)
+            outfile.write('autoResolve = %s,\n' % (self.autoResolve,))
+        if self.freespace is not None:
+            showIndent(outfile, level)
+            outfile.write('freespace = %s,\n' % (self.freespace,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+        if self.installLabelPath is not None:
+            showIndent(outfile, level)
+            outfile.write('installLabelPath = %s,\n' % (self.installLabelPath,))
+        if self.amiHugeDiskMountpoint is not None:
+            showIndent(outfile, level)
+            outfile.write('amiHugeDiskMountpoint = %s,\n' % (self.amiHugeDiskMountpoint,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('autoResolve'):
+            if attrs.get('autoResolve').value in ('true', '1'):
+                self.autoResolve = True
+            elif attrs.get('autoResolve').value in ('false', '0'):
+                self.autoResolve = False
+            else:
+                raise ValueError('Bad boolean attribute (autoResolve)')
+        if attrs.get('freespace'):
+            try:
+                self.freespace = int(attrs.get('freespace').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (freespace): %s' % exp)
+            if self.freespace < 0:
+                raise ValueError('Invalid NonNegativeInteger (freespace)')
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+        if attrs.get('installLabelPath'):
+            self.installLabelPath = attrs.get('installLabelPath').value
+        if attrs.get('amiHugeDiskMountpoint'):
+            self.amiHugeDiskMountpoint = attrs.get('amiHugeDiskMountpoint').value
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class amiImageType
+
+
+class applianceIsoImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('maxIsoSize', 'xsd:positiveInteger', 0),
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('bugsUrl', 'xsd:string', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('anacondaCustomTrove', 'rpd:troveSpecType', 0),
+        _MemberSpec('betaNag', 'xsd:boolean', 0),
+        _MemberSpec('mediaTemplateTrove', 'rpd:troveSpecType', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        _MemberSpec('anacondaTemplatesTrove', 'rpd:troveSpecType', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        _MemberSpec('showMediaCheck', 'xsd:boolean', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, maxIsoSize=None, autoResolve=None, bugsUrl=None, name=None, anacondaCustomTrove=None, betaNag=None, mediaTemplateTrove=None, installLabelPath=None, anacondaTemplatesTrove=None, baseFileName=None, showMediaCheck=None, valueOf_=''):
+        self.maxIsoSize = _cast(int, maxIsoSize)
+        self.autoResolve = _cast(bool, autoResolve)
+        self.bugsUrl = _cast(None, bugsUrl)
+        self.name = _cast(None, name)
+        self.anacondaCustomTrove = _cast(None, anacondaCustomTrove)
+        self.betaNag = _cast(bool, betaNag)
+        self.mediaTemplateTrove = _cast(None, mediaTemplateTrove)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.anacondaTemplatesTrove = _cast(None, anacondaTemplatesTrove)
+        self.baseFileName = _cast(None, baseFileName)
+        self.showMediaCheck = _cast(bool, showMediaCheck)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if applianceIsoImageType.subclass:
+            return applianceIsoImageType.subclass(*args_, **kwargs_)
+        else:
+            return applianceIsoImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_maxIsoSize(self): return self.maxIsoSize
+    def set_maxIsoSize(self, maxIsoSize): self.maxIsoSize = maxIsoSize
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_bugsUrl(self): return self.bugsUrl
+    def set_bugsUrl(self, bugsUrl): self.bugsUrl = bugsUrl
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def get_anacondaCustomTrove(self): return self.anacondaCustomTrove
+    def set_anacondaCustomTrove(self, anacondaCustomTrove): self.anacondaCustomTrove = anacondaCustomTrove
+    def get_betaNag(self): return self.betaNag
+    def set_betaNag(self, betaNag): self.betaNag = betaNag
+    def get_mediaTemplateTrove(self): return self.mediaTemplateTrove
+    def set_mediaTemplateTrove(self, mediaTemplateTrove): self.mediaTemplateTrove = mediaTemplateTrove
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def get_anacondaTemplatesTrove(self): return self.anacondaTemplatesTrove
+    def set_anacondaTemplatesTrove(self, anacondaTemplatesTrove): self.anacondaTemplatesTrove = anacondaTemplatesTrove
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def get_showMediaCheck(self): return self.showMediaCheck
+    def set_showMediaCheck(self, showMediaCheck): self.showMediaCheck = showMediaCheck
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='applianceIsoImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='applianceIsoImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='applianceIsoImageType'):
+        if self.maxIsoSize is not None:
+            outfile.write(' maxIsoSize="%s"' % self.format_integer(self.maxIsoSize, input_name='maxIsoSize'))
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.bugsUrl is not None:
+            outfile.write(' bugsUrl=%s' % (self.format_string(quote_attrib(self.bugsUrl).encode(ExternalEncoding), input_name='bugsUrl'), ))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+        if self.anacondaCustomTrove is not None:
+            outfile.write(' anacondaCustomTrove=%s' % (quote_attrib(self.anacondaCustomTrove), ))
+        if self.betaNag is not None:
+            outfile.write(' betaNag="%s"' % self.format_boolean(str_lower(str(self.betaNag)), input_name='betaNag'))
+        if self.mediaTemplateTrove is not None:
+            outfile.write(' mediaTemplateTrove=%s' % (quote_attrib(self.mediaTemplateTrove), ))
+        if self.installLabelPath is not None:
+            outfile.write(' installLabelPath=%s' % (self.format_string(quote_attrib(self.installLabelPath).encode(ExternalEncoding), input_name='installLabelPath'), ))
+        if self.anacondaTemplatesTrove is not None:
+            outfile.write(' anacondaTemplatesTrove=%s' % (quote_attrib(self.anacondaTemplatesTrove), ))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+        if self.showMediaCheck is not None:
+            outfile.write(' showMediaCheck="%s"' % self.format_boolean(str_lower(str(self.showMediaCheck)), input_name='showMediaCheck'))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='applianceIsoImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='applianceIsoImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.maxIsoSize is not None:
+            showIndent(outfile, level)
+            outfile.write('maxIsoSize = %s,\n' % (self.maxIsoSize,))
+        if self.autoResolve is not None:
+            showIndent(outfile, level)
+            outfile.write('autoResolve = %s,\n' % (self.autoResolve,))
+        if self.bugsUrl is not None:
+            showIndent(outfile, level)
+            outfile.write('bugsUrl = %s,\n' % (self.bugsUrl,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+        if self.anacondaCustomTrove is not None:
+            showIndent(outfile, level)
+            outfile.write('anacondaCustomTrove = "%s",\n' % (self.anacondaCustomTrove,))
+        if self.betaNag is not None:
+            showIndent(outfile, level)
+            outfile.write('betaNag = %s,\n' % (self.betaNag,))
+        if self.mediaTemplateTrove is not None:
+            showIndent(outfile, level)
+            outfile.write('mediaTemplateTrove = "%s",\n' % (self.mediaTemplateTrove,))
+        if self.installLabelPath is not None:
+            showIndent(outfile, level)
+            outfile.write('installLabelPath = %s,\n' % (self.installLabelPath,))
+        if self.anacondaTemplatesTrove is not None:
+            showIndent(outfile, level)
+            outfile.write('anacondaTemplatesTrove = "%s",\n' % (self.anacondaTemplatesTrove,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+        if self.showMediaCheck is not None:
+            showIndent(outfile, level)
+            outfile.write('showMediaCheck = %s,\n' % (self.showMediaCheck,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('maxIsoSize'):
+            try:
+                self.maxIsoSize = int(attrs.get('maxIsoSize').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (maxIsoSize): %s' % exp)
+            if self.maxIsoSize <= 0:
+                raise ValueError('Invalid PositiveInteger (maxIsoSize)')
+        if attrs.get('autoResolve'):
+            if attrs.get('autoResolve').value in ('true', '1'):
+                self.autoResolve = True
+            elif attrs.get('autoResolve').value in ('false', '0'):
+                self.autoResolve = False
+            else:
+                raise ValueError('Bad boolean attribute (autoResolve)')
+        if attrs.get('bugsUrl'):
+            self.bugsUrl = attrs.get('bugsUrl').value
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+        if attrs.get('anacondaCustomTrove'):
+            self.anacondaCustomTrove = attrs.get('anacondaCustomTrove').value
+        if attrs.get('betaNag'):
+            if attrs.get('betaNag').value in ('true', '1'):
+                self.betaNag = True
+            elif attrs.get('betaNag').value in ('false', '0'):
+                self.betaNag = False
+            else:
+                raise ValueError('Bad boolean attribute (betaNag)')
+        if attrs.get('mediaTemplateTrove'):
+            self.mediaTemplateTrove = attrs.get('mediaTemplateTrove').value
+        if attrs.get('installLabelPath'):
+            self.installLabelPath = attrs.get('installLabelPath').value
+        if attrs.get('anacondaTemplatesTrove'):
+            self.anacondaTemplatesTrove = attrs.get('anacondaTemplatesTrove').value
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+        if attrs.get('showMediaCheck'):
+            if attrs.get('showMediaCheck').value in ('true', '1'):
+                self.showMediaCheck = True
+            elif attrs.get('showMediaCheck').value in ('false', '0'):
+                self.showMediaCheck = False
+            else:
+                raise ValueError('Bad boolean attribute (showMediaCheck)')
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class applianceIsoImageType
+
+
+class installableIsoImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('maxIsoSize', 'xsd:positiveInteger', 0),
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('bugsUrl', 'xsd:string', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('anacondaCustomTrove', 'rpd:troveSpecType', 0),
+        _MemberSpec('betaNag', 'xsd:boolean', 0),
+        _MemberSpec('mediaTemplateTrove', 'rpd:troveSpecType', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        _MemberSpec('anacondaTemplatesTrove', 'rpd:troveSpecType', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        _MemberSpec('showMediaCheck', 'xsd:boolean', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, maxIsoSize=None, autoResolve=None, bugsUrl=None, name=None, anacondaCustomTrove=None, betaNag=None, mediaTemplateTrove=None, installLabelPath=None, anacondaTemplatesTrove=None, baseFileName=None, showMediaCheck=None, valueOf_=''):
+        self.maxIsoSize = _cast(int, maxIsoSize)
+        self.autoResolve = _cast(bool, autoResolve)
+        self.bugsUrl = _cast(None, bugsUrl)
+        self.name = _cast(None, name)
+        self.anacondaCustomTrove = _cast(None, anacondaCustomTrove)
+        self.betaNag = _cast(bool, betaNag)
+        self.mediaTemplateTrove = _cast(None, mediaTemplateTrove)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.anacondaTemplatesTrove = _cast(None, anacondaTemplatesTrove)
+        self.baseFileName = _cast(None, baseFileName)
+        self.showMediaCheck = _cast(bool, showMediaCheck)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if installableIsoImageType.subclass:
+            return installableIsoImageType.subclass(*args_, **kwargs_)
+        else:
+            return installableIsoImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_maxIsoSize(self): return self.maxIsoSize
+    def set_maxIsoSize(self, maxIsoSize): self.maxIsoSize = maxIsoSize
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_bugsUrl(self): return self.bugsUrl
+    def set_bugsUrl(self, bugsUrl): self.bugsUrl = bugsUrl
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def get_anacondaCustomTrove(self): return self.anacondaCustomTrove
+    def set_anacondaCustomTrove(self, anacondaCustomTrove): self.anacondaCustomTrove = anacondaCustomTrove
+    def get_betaNag(self): return self.betaNag
+    def set_betaNag(self, betaNag): self.betaNag = betaNag
+    def get_mediaTemplateTrove(self): return self.mediaTemplateTrove
+    def set_mediaTemplateTrove(self, mediaTemplateTrove): self.mediaTemplateTrove = mediaTemplateTrove
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def get_anacondaTemplatesTrove(self): return self.anacondaTemplatesTrove
+    def set_anacondaTemplatesTrove(self, anacondaTemplatesTrove): self.anacondaTemplatesTrove = anacondaTemplatesTrove
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def get_showMediaCheck(self): return self.showMediaCheck
+    def set_showMediaCheck(self, showMediaCheck): self.showMediaCheck = showMediaCheck
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='installableIsoImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='installableIsoImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='installableIsoImageType'):
+        if self.maxIsoSize is not None:
+            outfile.write(' maxIsoSize="%s"' % self.format_integer(self.maxIsoSize, input_name='maxIsoSize'))
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.bugsUrl is not None:
+            outfile.write(' bugsUrl=%s' % (self.format_string(quote_attrib(self.bugsUrl).encode(ExternalEncoding), input_name='bugsUrl'), ))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
+        if self.anacondaCustomTrove is not None:
+            outfile.write(' anacondaCustomTrove=%s' % (quote_attrib(self.anacondaCustomTrove), ))
+        if self.betaNag is not None:
+            outfile.write(' betaNag="%s"' % self.format_boolean(str_lower(str(self.betaNag)), input_name='betaNag'))
+        if self.mediaTemplateTrove is not None:
+            outfile.write(' mediaTemplateTrove=%s' % (quote_attrib(self.mediaTemplateTrove), ))
+        if self.installLabelPath is not None:
+            outfile.write(' installLabelPath=%s' % (self.format_string(quote_attrib(self.installLabelPath).encode(ExternalEncoding), input_name='installLabelPath'), ))
+        if self.anacondaTemplatesTrove is not None:
+            outfile.write(' anacondaTemplatesTrove=%s' % (quote_attrib(self.anacondaTemplatesTrove), ))
+        if self.baseFileName is not None:
+            outfile.write(' baseFileName=%s' % (self.format_string(quote_attrib(self.baseFileName).encode(ExternalEncoding), input_name='baseFileName'), ))
+        if self.showMediaCheck is not None:
+            outfile.write(' showMediaCheck="%s"' % self.format_boolean(str_lower(str(self.showMediaCheck)), input_name='showMediaCheck'))
+    def exportChildren(self, outfile, level, namespace_='rpd:', name_='installableIsoImageType'):
+        if self.valueOf_.find('![CDATA')>-1:
+            value=quote_xml('%s' % self.valueOf_)
+            value=value.replace('![CDATA','<![CDATA')
+            value=value.replace(']]',']]>')
+            outfile.write(value)
+        else:
+            outfile.write(quote_xml('%s' % self.valueOf_))
+    def hasContent_(self):
+        if (
+            self.valueOf_
+            ):
+            return True
+        else:
+            return False
+    def exportLiteral(self, outfile, level, name_='installableIsoImageType'):
+        level += 1
+        self.exportLiteralAttributes(outfile, level, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, name_):
+        if self.maxIsoSize is not None:
+            showIndent(outfile, level)
+            outfile.write('maxIsoSize = %s,\n' % (self.maxIsoSize,))
+        if self.autoResolve is not None:
+            showIndent(outfile, level)
+            outfile.write('autoResolve = %s,\n' % (self.autoResolve,))
+        if self.bugsUrl is not None:
+            showIndent(outfile, level)
+            outfile.write('bugsUrl = %s,\n' % (self.bugsUrl,))
+        if self.name is not None:
+            showIndent(outfile, level)
+            outfile.write('name = %s,\n' % (self.name,))
+        if self.anacondaCustomTrove is not None:
+            showIndent(outfile, level)
+            outfile.write('anacondaCustomTrove = "%s",\n' % (self.anacondaCustomTrove,))
+        if self.betaNag is not None:
+            showIndent(outfile, level)
+            outfile.write('betaNag = %s,\n' % (self.betaNag,))
+        if self.mediaTemplateTrove is not None:
+            showIndent(outfile, level)
+            outfile.write('mediaTemplateTrove = "%s",\n' % (self.mediaTemplateTrove,))
+        if self.installLabelPath is not None:
+            showIndent(outfile, level)
+            outfile.write('installLabelPath = %s,\n' % (self.installLabelPath,))
+        if self.anacondaTemplatesTrove is not None:
+            showIndent(outfile, level)
+            outfile.write('anacondaTemplatesTrove = "%s",\n' % (self.anacondaTemplatesTrove,))
+        if self.baseFileName is not None:
+            showIndent(outfile, level)
+            outfile.write('baseFileName = %s,\n' % (self.baseFileName,))
+        if self.showMediaCheck is not None:
+            showIndent(outfile, level)
+            outfile.write('showMediaCheck = %s,\n' % (self.showMediaCheck,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = "%s",\n' % (self.valueOf_,))
+    def build(self, node_):
+        attrs = node_.attributes
+        self.buildAttributes(attrs)
+        self.valueOf_ = ''
+        for child_ in node_.childNodes:
+            nodeName_ = child_.nodeName.split(':')[-1]
+            self.buildChildren(child_, nodeName_)
+    def buildAttributes(self, attrs):
+        if attrs.get('maxIsoSize'):
+            try:
+                self.maxIsoSize = int(attrs.get('maxIsoSize').value)
+            except ValueError, exp:
+                raise ValueError('Bad integer attribute (maxIsoSize): %s' % exp)
+            if self.maxIsoSize <= 0:
+                raise ValueError('Invalid PositiveInteger (maxIsoSize)')
+        if attrs.get('autoResolve'):
+            if attrs.get('autoResolve').value in ('true', '1'):
+                self.autoResolve = True
+            elif attrs.get('autoResolve').value in ('false', '0'):
+                self.autoResolve = False
+            else:
+                raise ValueError('Bad boolean attribute (autoResolve)')
+        if attrs.get('bugsUrl'):
+            self.bugsUrl = attrs.get('bugsUrl').value
+        if attrs.get('name'):
+            self.name = attrs.get('name').value
+        if attrs.get('anacondaCustomTrove'):
+            self.anacondaCustomTrove = attrs.get('anacondaCustomTrove').value
+        if attrs.get('betaNag'):
+            if attrs.get('betaNag').value in ('true', '1'):
+                self.betaNag = True
+            elif attrs.get('betaNag').value in ('false', '0'):
+                self.betaNag = False
+            else:
+                raise ValueError('Bad boolean attribute (betaNag)')
+        if attrs.get('mediaTemplateTrove'):
+            self.mediaTemplateTrove = attrs.get('mediaTemplateTrove').value
+        if attrs.get('installLabelPath'):
+            self.installLabelPath = attrs.get('installLabelPath').value
+        if attrs.get('anacondaTemplatesTrove'):
+            self.anacondaTemplatesTrove = attrs.get('anacondaTemplatesTrove').value
+        if attrs.get('baseFileName'):
+            self.baseFileName = attrs.get('baseFileName').value
+        if attrs.get('showMediaCheck'):
+            if attrs.get('showMediaCheck').value in ('true', '1'):
+                self.showMediaCheck = True
+            elif attrs.get('showMediaCheck').value in ('false', '0'):
+                self.showMediaCheck = False
+            else:
+                raise ValueError('Bad boolean attribute (showMediaCheck)')
+    def buildChildren(self, child_, nodeName_):
+        if child_.nodeType == Node.TEXT_NODE:
+            self.valueOf_ += child_.nodeValue
+        elif child_.nodeType == Node.CDATA_SECTION_NODE:
+            self.valueOf_ += '![CDATA['+child_.nodeValue+']]'
+# end class installableIsoImageType
+
+
+class liveIsoImageType(GeneratedsSuper):
+    _member_data_items = [
+        _MemberSpec('autoResolve', 'xsd:boolean', 0),
+        _MemberSpec('name', 'xsd:string', 0),
+        _MemberSpec('zisofs', 'xsd:boolean', 0),
+        _MemberSpec('baseFileName', 'xsd:string', 0),
+        _MemberSpec('unionfs', 'xsd:boolean', 0),
+        _MemberSpec('installLabelPath', 'xsd:string', 0),
+        ]
+    subclass = None
+    superclass = None
+    def __init__(self, autoResolve=None, name=None, zisofs=None, baseFileName=None, unionfs=None, installLabelPath=None, valueOf_=''):
+        self.autoResolve = _cast(bool, autoResolve)
+        self.name = _cast(None, name)
+        self.zisofs = _cast(bool, zisofs)
+        self.baseFileName = _cast(None, baseFileName)
+        self.unionfs = _cast(bool, unionfs)
+        self.installLabelPath = _cast(None, installLabelPath)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if liveIsoImageType.subclass:
+            return liveIsoImageType.subclass(*args_, **kwargs_)
+        else:
+            return liveIsoImageType(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_autoResolve(self): return self.autoResolve
+    def set_autoResolve(self, autoResolve): self.autoResolve = autoResolve
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def get_zisofs(self): return self.zisofs
+    def set_zisofs(self, zisofs): self.zisofs = zisofs
+    def get_baseFileName(self): return self.baseFileName
+    def set_baseFileName(self, baseFileName): self.baseFileName = baseFileName
+    def get_unionfs(self): return self.unionfs
+    def set_unionfs(self, unionfs): self.unionfs = unionfs
+    def get_installLabelPath(self): return self.installLabelPath
+    def set_installLabelPath(self, installLabelPath): self.installLabelPath = installLabelPath
+    def getValueOf_(self): return self.valueOf_
+    def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def export(self, outfile, level, namespace_='rpd:', name_='liveIsoImageType', namespacedef_=''):
+        showIndent(outfile, level)
+        outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, ))
+        self.exportAttributes(outfile, level, namespace_, name_='liveIsoImageType')
+        if self.hasContent_():
+            outfile.write('>')
+            self.exportChildren(outfile, level + 1, namespace_, name_)
+            outfile.write('</%s%s>\n' % (namespace_, name_))
+        else:
+            outfile.write(' />\n')
+    def exportAttributes(self, outfile, level, namespace_='rpd:', name_='liveIsoImageType'):
+        if self.autoResolve is not None:
+            outfile.write(' autoResolve="%s"' % self.format_boolean(str_lower(str(self.autoResolve)), input_name='autoResolve'))
+        if self.name is not None:
+            outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), )
