submodules.
Make that replacement everywhere.
svn path=/trunk/packages/invirt-dev/; revision=2801
If the build succeeds, the new version of the package is uploaded to
the apt repository, tagged in its git repository, and the Invirt
If the build succeeds, the new version of the package is uploaded to
the apt repository, tagged in its git repository, and the Invirt
-superrepo is updated to point at the new version.
+superproject is updated to point at the new version.
If the build fails, the Invirtibuilder sends mail with the build log.
If the build fails, the Invirtibuilder sends mail with the build log.
-def updateSuperrepo(pocket, package, commit, principal):
- """Update the superrepo.
+def updateSuperproject(pocket, package, commit, principal):
+ """Update the superproject.
This will create a new commit on the branch for the given pocket
that sets the commit for the package submodule to commit.
Note that there's no locking issue here, because we disallow all
This will create a new commit on the branch for the given pocket
that sets the commit for the package submodule to commit.
Note that there's no locking issue here, because we disallow all
- pushes to the superrepo.
+ pushes to the superproject.
- superrepo = os.path.join(b._REPO_DIR, 'invirt/packages.git')
+ superproject = os.path.join(b._REPO_DIR, 'invirt/packages.git')
branch = b.pocketToGit(pocket)
tree = c.captureOutput(['git', 'ls-tree', branch],
branch = b.pocketToGit(pocket)
tree = c.captureOutput(['git', 'ls-tree', branch],
new_tree = re.compile(
r'^(160000 commit )[0-9a-f]*(\t%s)$' % package, re.M).sub(
new_tree = re.compile(
r'^(160000 commit )[0-9a-f]*(\t%s)$' % package, re.M).sub(
tree)
new_tree_id = c.captureOutput(['git', 'mktree'],
tree)
new_tree_id = c.captureOutput(['git', 'mktree'],
stdin_str=new_tree)
commit_msg = ('Update %s to version %s\n\n'
stdin_str=new_tree)
commit_msg = ('Update %s to version %s\n\n'
principal))
new_commit = c.captureOutput(
['git', 'commit-tree', new_tree_hash, '-p', branch],
principal))
new_commit = c.captureOutput(
['git', 'commit-tree', new_tree_hash, '-p', branch],
env=env,
stdin_str=commit_msg)
c.captureOutput(
['git', 'update-ref', 'refs/heads/%s' % branch, new_commit],
env=env,
stdin_str=commit_msg)
c.captureOutput(
['git', 'update-ref', 'refs/heads/%s' % branch, new_commit],
@contextlib.contextmanager
@contextlib.contextmanager
tagSubmodule(pocket, package, commit, principal)
db.failed_stage = 'updating submodule branches'
updateSubmoduleBranch(pocket, package, commit)
tagSubmodule(pocket, package, commit, principal)
db.failed_stage = 'updating submodule branches'
updateSubmoduleBranch(pocket, package, commit)
- db.failed_stage = 'updating superrepo'
- updateSuperrepo(pocket, package, commit, principal)
+ db.failed_stage = 'updating superproject'
+ updateSuperproject(pocket, package, commit, principal)
db.failed_stage = 'uploading packages to apt repo'
uploadBuild(pocket, workdir)
db.failed_stage = 'uploading packages to apt repo'
uploadBuild(pocket, workdir)