projects
/
invirt/packages/invirt-dev.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Better new-pocket affordances in invirtibuilder and build submission script
[invirt/packages/invirt-dev.git]
/
invirtibuilder
diff --git
a/invirtibuilder
b/invirtibuilder
index
c955dfd
..
699ce07
100755
(executable)
--- a/
invirtibuilder
+++ b/
invirtibuilder
@@
-202,8
+202,11
@@
def uploadBuild(pocket, workdir):
except subprocess.CalledProcessError, e:
if not force:
raise
except subprocess.CalledProcessError, e:
if not force:
raise
- package = deb822.Changes(open(changes).read())['Binary']
- logAndRun(['reprepro-env', 'remove', apt, package])
+ changelog = deb822.Changes(open(changes).read())
+ packages = set(changelog['Binary'].split())
+ packages.add(changelog['Source'])
+ for package in packages:
+ logAndRun(['reprepro-env', 'remove', apt, package])
logAndRun(upload)
logAndRun(upload)
@@
-217,6
+220,9
@@
def updateSuperproject(pocket, package, commit, principal, version, env):
pushes to the superproject.
"""
superproject = os.path.join(b._REPO_DIR, 'invirt/packages.git')
pushes to the superproject.
"""
superproject = os.path.join(b._REPO_DIR, 'invirt/packages.git')
+ if not b.pocketExists(pocket, superproject):
+ raise Exception("Super-repository does not contain pocket branch '%s'. Create it first." % pocket)
+
branch = b.pocketToGit(pocket)
tree = logAndRun(['git', 'ls-tree', branch],
cwd=superproject).strip()
branch = b.pocketToGit(pocket)
tree = logAndRun(['git', 'ls-tree', branch],
cwd=superproject).strip()
@@
-284,8
+290,8
@@
def packageWorkdir(package, commit, build_id):
workdir = tempfile.mkdtemp(prefix=("b%d-" % build_id))
try:
p_archive = subprocess.Popen(
workdir = tempfile.mkdtemp(prefix=("b%d-" % build_id))
try:
p_archive = subprocess.Popen(
- ['git', 'archive',
- '--remote=file://%s' % b.getRepo(package),
+ ['git', '--git-dir=%s' % (b.getRepo(package),),
+ 'archive',
'--prefix=%s/' % package,
commit,
],
'--prefix=%s/' % package,
commit,
],
@@
-386,7
+392,9
@@
def build():
# If we were, we could use debuild and get nice
# environment scrubbing. Since we're not, debuild
# complains about not having an orig.tar.gz
# If we were, we could use debuild and get nice
# environment scrubbing. Since we're not, debuild
# complains about not having an orig.tar.gz
- logAndRun(['dpkg-buildpackage', '-us', '-uc', '-S'],
+ logAndRun(['schroot', '-c',
+ '%s-amd64-sbuild' % (b.pocketToDistro(pocket),),
+ '--', 'dpkg-buildpackage', '-us', '-uc', '-S'],
cwd=packagedir)
db.failed_stage = 'building binary packages'
cwd=packagedir)
db.failed_stage = 'building binary packages'