Skip to content

Commit

Permalink
Builder: Set up the stable APT repository
Browse files Browse the repository at this point in the history
Stable builds are stored in a separate APT repository.
  • Loading branch information
skyjake committed Feb 27, 2012
1 parent f6a1606 commit a52506c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
9 changes: 5 additions & 4 deletions distrib/autobuild.py
Expand Up @@ -74,7 +74,8 @@ def todays_platform_release():
arch = 'i386'
if '_amd64' in n: arch = 'amd64'
remote_copy(os.path.join('releases', n),
os.path.join(builder.config.APT_REPO_DIR, 'dists/unstable/main/binary-%s' % arch, n))
os.path.join(builder.config.APT_REPO_DIR,
builder.config.APT_DIST + '/main/binary-%s' % arch, n))

# Also the build logs.
remote_copy('buildlog.txt', ev.file_path('doomsday-out-%s.txt' % sys_id()))
Expand Down Expand Up @@ -139,8 +140,8 @@ def rebuild_apt_repository():
print 'Rebuilding the apt repository in %s...' % aptDir

os.system("apt-ftparchive generate ~/Dropbox/APT/ftparchive.conf")
os.system("apt-ftparchive -c ~/Dropbox/APT/ftparchive-release.conf release %s/dists/unstable > %s/dists/unstable/Release" % (aptDir, aptDir))
os.chdir("%s/dists/unstable" % aptDir)
os.system("apt-ftparchive -c %s release %s/%s > %s/%s/Release" % (builder.config.APT_CONF_FILE, aptDir, builder.config.APT_DIST, aptDir, builder.config.APT_DIST))
os.chdir("%s/%s" % (aptDir, builder.config.APT_DIST))
os.remove("Release.gpg")
os.system("gpg --output Release.gpg -ba Release")
os.system("~/Dropbox/Scripts/mirror-tree.py %s %s" % (aptDir, os.path.join(builder.config.EVENT_DIR, 'apt')))
Expand Down Expand Up @@ -214,7 +215,7 @@ def update_xml_feed():

def purge_apt_repository(atLeastSeconds):
for d in ['i386', 'amd64']:
binDir = os.path.join(builder.config.APT_REPO_DIR, 'dists/unstable/main/binary-') + d
binDir = os.path.join(builder.config.APT_REPO_DIR, builder.config.APT_DIST + '/main/binary-') + d
print 'Pruning binary apt directory', binDir
# Find the old files.
for fn in os.listdir(binDir):
Expand Down
13 changes: 13 additions & 0 deletions distrib/builder/config.py
Expand Up @@ -30,3 +30,16 @@ def get_arg(label):

val = get_arg('--tagmod')
if val is not None: TAG_MODIFIER = val

# Determine APT repository path.
oldCwd = os.getcwd()
if DISTRIB_DIR: os.chdir(DISTRIB_DIR)
import build_version
build_version.find_version(quiet=True)
if build_version.DOOMSDAY_RELEASE_TYPE == 'Stable':
APT_DIST = 'dists/stable'
APT_CONF_FILE = '~/Dropbox/APT/ftparchive-release-stable.conf'
else:
APT_DIST = 'dists/unstable'
APT_CONF_FILE = '~/Dropbox/APT/ftparchive-release.conf'
os.chdir(oldCwd)

0 comments on commit a52506c

Please sign in to comment.