Merge ~smoser/cloud-init:tools/bddeb-reuse-tarball into cloud-init:master

Proposed by Scott Moser
Status: Merged
Approved by: Chad Smith
Approved revision: 2833f9992d761b147498f9fa1dc90f5d35a14d3a
Merge reported by: Chad Smith
Merged at revision: 26fbb1a0ce89451edad83a47054cacb6dd7b6dcc
Proposed branch: ~smoser/cloud-init:tools/bddeb-reuse-tarball
Merge into: cloud-init:master
Diff against target: 25 lines (+10/-2)
1 file modified
packages/bddeb (+10/-2)
Reviewer Review Type Date Requested Status
Chad Smith Approve
Server Team CI bot continuous-integration Approve
Review via email: mp+344545@code.launchpad.net

Commit message

tools: Re-use the orig tarball in packages/bddeb if it is around.

If you built packages with 'bddeb', each time it would create a new
tarball with make-tarball. If you then tried to upload two different
tarballs to launchpad (to a PPA), it would reject the second as the
orig tarball already existed.

This just supports looking in some places for a orig tarball and
re-using if it is found.

Description of the change

see commit message

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

PASSED: Continuous integration, rev:2833f9992d761b147498f9fa1dc90f5d35a14d3a
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1064/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Unit & Style Tests
    SUCCESS: Ubuntu LTS: Build
    SUCCESS: Ubuntu LTS: Integration
    SUCCESS: MAAS Compatability Testing
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1064/rebuild

review: Approve (continuous-integration)
Revision history for this message
Chad Smith (chad.smith) wrote :

ship it!

review: Approve
Revision history for this message
Chad Smith (chad.smith) wrote :

An upstream commit landed for this bug.

To view that commit see the following URL:
https://git.launchpad.net/cloud-init/commit/?id=26fbb1a0

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/packages/bddeb b/packages/bddeb
2index 4f2e2dd..0f12478 100755
3--- a/packages/bddeb
4+++ b/packages/bddeb
5@@ -157,10 +157,18 @@ def main():
6 # This is really only a temporary archive
7 # since we will extract it then add in the debian
8 # folder, then re-archive it for debian happiness
9- print("Creating a temporary tarball using the 'make-tarball' helper")
10 tarball = "cloud-init_%s.orig.tar.gz" % ver_data['version_long']
11 tarball_fp = util.abs_join(tdir, tarball)
12- run_helper('make-tarball', ['--long', '--output=' + tarball_fp])
13+ path = None
14+ for pd in ("./", "../", "../dl/"):
15+ if os.path.exists(pd + tarball):
16+ path = pd + tarball
17+ print("Using existing tarball %s" % path)
18+ shutil.copy(path, tarball_fp)
19+ break
20+ if path is None:
21+ print("Creating a temp tarball using the 'make-tarball' helper")
22+ run_helper('make-tarball', ['--long', '--output=' + tarball_fp])
23
24 print("Extracting temporary tarball %r" % (tarball))
25 cmd = ['tar', '-xvzf', tarball_fp, '-C', tdir]

Subscribers

People subscribed via source and target branches