From 7f42aa998e63f434b7879e846ff847c4dea6dc14 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Fri, 27 Sep 2013 11:34:26 +0300 Subject: Move RepoManifest to gbp Signed-off-by: Markus Lehtonen --- bootstrap.py | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/bootstrap.py b/bootstrap.py index 71db04e..5e42d7d 100755 --- a/bootstrap.py +++ b/bootstrap.py @@ -28,7 +28,8 @@ import shutil import subprocess import sys import tempfile -from xml.dom import minidom + +from tests.component.rpm import RepoManifest LOG = logging.getLogger(os.path.basename(sys.argv[0])) TEST_PKGS = {'gbp-test-native': {'build_branches': ['master']}, @@ -135,28 +136,6 @@ def build_test_pkg(pkg_name, branch, outdir, silent_build=False): shutil.rmtree(builddir) -class RepoManifest(object): - """Class representing a test repo manifest file""" - def __init__(self): - self._doc = minidom.Document() - self._doc.appendChild(self._doc.createElement("gbp-test-manifest")) - - def add_project(self, name, branches): - """Add new project to the manifest""" - prj_e = self._doc.createElement('project') - prj_e.setAttribute('name', name) - for branch, revision in branches.iteritems(): - br_e = self._doc.createElement('branch') - br_e.setAttribute('name', branch) - br_e.setAttribute('revision', revision) - prj_e.appendChild(br_e) - self._doc.firstChild.appendChild(prj_e) - - def write(self, filename): - """Write to file""" - with open(filename, 'w') as fileobj: - fileobj.write(self._doc.toprettyxml()) - def update_testrepo_manifest(manifest, pkg_name, branches): """ Update a manifest file describing the branches/sha1s of a test git repo -- cgit v1.2.3