Merge lp:~salgado/offspring/all-python-config-plus into lp:offspring

Proposed by Guilherme Salgado
Status: Merged
Merged at revision: 87
Proposed branch: lp:~salgado/offspring/all-python-config-plus
Merge into: lp:offspring
Prerequisite: lp:~salgado/offspring/all-python-config
Diff against target: 638 lines (+120/-130)
8 files modified
config/offspring.cfg (+18/-28)
lib/offspring/build/bin/offspring-build (+25/-25)
lib/offspring/build/functions/config.sh (+4/-4)
lib/offspring/build/functions/exit.sh (+2/-2)
lib/offspring/build/functions/reports.sh (+8/-8)
lib/offspring/build/scripts/archive-builds (+22/-22)
lib/offspring/build/wrappers/lb.sh (+20/-20)
lib/offspring/build/wrappers/lh.sh (+21/-21)
To merge this branch: bzr merge lp:~salgado/offspring/all-python-config-plus
Reviewer Review Type Date Requested Status
Cody A.W. Somerville Approve
Review via email: mp+76276@code.launchpad.net

Description of the change

This is a second attempt at trying to get these changes merged. They are a pre-requisite for another branch (lp:~salgado/offspring/path-independence) which simplify things a lot for developers.

Here's what Michael said in the original merge proposal:

This branch extends all-python-config to push the python convention for naming config variables into the shell parts.

It was entirely mechanically constructed (with terrifying shell commands like "bzr ls --versioned --recursive --null --kind file | xargs -0 sed -i -e $(for v in IBS_BINDIR/IBS_BIN_DIR IBS_BUILDER_STATEFILE/IBS_BUILD_STATEFILE IBS_BASEDIR/IBS_BASE_DIR IBS_CONFIGDIR/IBS_CONFIG_DIR ; do echo -n "s/${v/\/*}/${v#*/}/;"; done;)") so if you don't like any particular detail it should be easy to change.

To post a comment you must log in.
30. By Guilherme Salgado

Rename a few leftover IBS_ shell variables

Revision history for this message
Cody A.W. Somerville (cody-somerville) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config/offspring.cfg'
2--- config/offspring.cfg 2011-09-21 20:43:23 +0000
3+++ config/offspring.cfg 2011-09-21 20:43:23 +0000
4@@ -56,18 +56,11 @@
5 #===============================================================================
6 # Offspring Builder
7 #
8-# builder_statefile: Path to the offspring statefile (renamed from build_statefile)
9-# basedir: Renamed from base_dir
10-# configdir: Renamed from config_dir
11-# bindir: Renamed from bin_dir
12-# wrapperdir: XXX
13-# funcdir: XXX
14-# scriptdir: XXX
15 # keep_buildfailures: Keep workdir of build failures?: enabled or disabled
16 # launchpad_bot_id: ID for launchpad account used to fetch bzr branches.
17 # projectconfig_cachedir: Directory where we keep mirror of project config branches.
18 # proxy: HTTP proxy to use for the build steps.
19-# resultdir: Base directory of final destination of build output.
20+# result_dir: Base directory of final destination of build output.
21 # sanity_override: Toggle sanity override: enabled or disabled.
22 # sanity_host: Force script to only run on specified host.
23 # sanity_user: Force script to only run as specified user.
24@@ -76,12 +69,12 @@
25 # trace_errors: Print execute trace on error?: enabled or disabled
26 # workdir: Directory where we perform the actual builds in.
27 # debug: Toggle debug mode: enabled or disabled.
28-# result_imagedir: Name of directory to place images in, inside resultdir.
29-# result_srcdir: Directory to place source files in, inside resultdir.
30-# result_configdir: Name of directory to place build config in, inside resultdir.
31-# result_projdir: Directory to place project files in, inside resultdir.
32-# result_reportsdir: Directory to place reports in, inside resultdir.
33-# result_logdir: Directory to place log files in, inside resultdir.
34+# result_image_dir: Name of directory to place images in, inside resultdir.
35+# result_src_dir: Directory to place source files in, inside resultdir.
36+# result_config_dir: Name of directory to place build config in, inside resultdir.
37+# result_proj_dir: Directory to place project files in, inside resultdir.
38+# result_reports_dir: Directory to place reports in, inside resultdir.
39+# result_log_dir: Directory to place log files in, inside resultdir.
40 # checksum_types: List of checksums to use for computing hashes of results.
41 # distribution_channel_prefix: The prefix of the ubuntu channel
42 # descriptor that will be generated. See
43@@ -90,31 +83,28 @@
44
45 [builder]
46 builder_statefile: %(build_statefile)s
47-basedir: %(base_dir)s
48-configdir: %(config_dir)s
49-bindir: %(bin_dir)s
50-wrapperdir: %(base_dir)s/lib/offspring/build/wrappers/
51-funcdir: %(base_dir)s/lib/offspring/build/functions/
52-scriptdir: %(base_dir)s/scripts/
53+wrapper_dir: %(base_dir)s/lib/offspring/build/wrappers/
54+func_dir: %(base_dir)s/lib/offspring/build/functions/
55+script_dir: %(base_dir)s/scripts/
56 keep_buildfailures: disabled
57 launchpad_bot_id: %(username)s
58 projectconfig_cachedir: /var/tmp/offspring-projects
59 proxy:
60-resultdir: %(base_dir)s/builds
61+result_dir: %(base_dir)s/builds
62 sanity_override: disabled
63 sanity_host: %(hostname)s
64 sanity_user: %(username)s
65 sign_builds: enabled
66 gpg_keyring: %(config_dir)s/keyring.gpg
67 trace_errors: disabled
68-workdir: /var/tmp/offspring
69+work_dir: /var/tmp/offspring
70 debug: disabled
71-result_imagedir: images
72-result_srcdir: source
73-result_configdir: config
74-result_projdir: project
75-result_reportsdir: reports
76-result_logdir:
77+result_image_dir: images
78+result_src_dir: source
79+result_config_dir: config
80+result_proj_dir: project
81+result_reports_dir: reports
82+result_log_dir:
83 checksum_types: sha1 md5
84 distribution_channel_descriptor_prefix: offspring-%(hostname)s
85
86
87=== modified file 'lib/offspring/build/bin/offspring-build'
88--- lib/offspring/build/bin/offspring-build 2011-09-21 20:43:23 +0000
89+++ lib/offspring/build/bin/offspring-build 2011-09-21 20:43:23 +0000
90@@ -23,12 +23,12 @@
91 fi
92
93 # Load build system components
94- source "${IBS_FUNCDIR}/echo.sh"
95- source "${IBS_FUNCDIR}/config.sh"
96- source "${IBS_FUNCDIR}/exit.sh"
97- source "${IBS_FUNCDIR}/reports.sh"
98- source "${IBS_FUNCDIR}/logging.sh"
99- source "${IBS_FUNCDIR}/files.sh"
100+ source "${IBS_FUNC_DIR}/echo.sh"
101+ source "${IBS_FUNC_DIR}/config.sh"
102+ source "${IBS_FUNC_DIR}/exit.sh"
103+ source "${IBS_FUNC_DIR}/reports.sh"
104+ source "${IBS_FUNC_DIR}/logging.sh"
105+ source "${IBS_FUNC_DIR}/files.sh"
106
107 [ -n "${IBS_PROXY}" ] && export http_proxy="${IBS_PROXY}"
108
109@@ -41,7 +41,7 @@
110 }
111
112 _Load_buildtool() {
113- _WRAPPER="${IBS_WRAPPERDIR}/${1}.sh"
114+ _WRAPPER="${IBS_WRAPPER_DIR}/${1}.sh"
115 Action "Loading buildtool '${1}'"
116 source "${_WRAPPER}"
117 Action_done
118@@ -56,7 +56,7 @@
119
120 _Setup() {
121 BUILDCOUNT=0
122- while [ -d ${IBS_RESULTDIR}/${PROJECT}/${DATE}/${BUILDCOUNT} ]; do
123+ while [ -d ${IBS_RESULT_DIR}/${PROJECT}/${DATE}/${BUILDCOUNT} ]; do
124 BUILDCOUNT=`expr ${BUILDCOUNT} + 1`
125 done
126
127@@ -64,13 +64,13 @@
128
129 Debug "BUILDNAME set to ${BUILDNAME}"
130
131- BUILDDIR="${IBS_RESULTDIR}/${PROJECT}/${DATE}/${BUILDCOUNT}"
132- RESULTDIR_IMAGES="${BUILDDIR}/${IBS_RESULT_IMAGEDIR}"
133- RESULTDIR_SOURCES="${BUILDDIR}/${IBS_RESULT_SRCDIR}"
134- RESULTDIR_CONFIGFILES="${BUILDDIR}/${IBS_RESULT_CONFIGDIR}"
135- RESULTDIR_PROJDIR="${BUILDDIR}/${IBS_RESULT_PROJDIR}"
136+ BUILDDIR="${IBS_RESULT_DIR}/${PROJECT}/${DATE}/${BUILDCOUNT}"
137+ RESULTDIR_IMAGES="${BUILDDIR}/${IBS_RESULT_IMAGE_DIR}"
138+ RESULTDIR_SOURCES="${BUILDDIR}/${IBS_RESULT_SRC_DIR}"
139+ RESULTDIR_CONFIGFILES="${BUILDDIR}/${IBS_RESULT_CONFIG_DIR}"
140+ RESULTDIR_PROJDIR="${BUILDDIR}/${IBS_RESULT_PROJ_DIR}"
141 RESULTDIR_REPORTS="${BUILDDIR}/${IBS_RESULT_REPORTSDIR}"
142- RESULTDIR_LOGFILE="${BUILDDIR}/${IBS_RESULT_LOGDIR}"
143+ RESULTDIR_LOGFILE="${BUILDDIR}/${IBS_RESULT_LOG_DIR}"
144 LOGFILE="${RESULTDIR_LOGFILE}/build-log.txt"
145
146 mkdir -p ${RESULTDIR_LOGFILE}
147@@ -85,30 +85,30 @@
148 Print "START: %s build %s started at '%s'." "${PROJECT}" "${BUILDNAME}" "`date`"
149 Start_logging ${LOGFILE}
150
151- echo "${PROJECT} ${BUILDNAME}" > "${IBS_BUILDER_STATEFILE}"
152+ echo "${PROJECT} ${BUILDNAME}" > "${IBS_BUILD_STATEFILE}"
153
154 Info "Performing inital setup for this build..."
155
156- ## Maintain symlinks in ${IBS_RESULTDIR}/${PROJECT} to the latest and latest-1 build.
157+ ## Maintain symlinks in ${IBS_RESULT_DIR}/${PROJECT} to the latest and latest-1 build.
158 # Move old current to new previous if it exists.
159- if [ -L ${IBS_RESULTDIR}/${PROJECT}/current ] || [ -e ${IBS_RESULTDIR}/${PROJECT}/current ]; then
160+ if [ -L ${IBS_RESULT_DIR}/${PROJECT}/current ] || [ -e ${IBS_RESULT_DIR}/${PROJECT}/current ]; then
161 # Remove old previous if it exists.
162- if [ -L ${IBS_RESULTDIR}/${PROJECT}/previous ]; then
163- rm ${IBS_RESULTDIR}/${PROJECT}/previous
164+ if [ -L ${IBS_RESULT_DIR}/${PROJECT}/previous ]; then
165+ rm ${IBS_RESULT_DIR}/${PROJECT}/previous
166 fi
167- mv ${IBS_RESULTDIR}/${PROJECT}/current ${IBS_RESULTDIR}/${PROJECT}/previous
168+ mv ${IBS_RESULT_DIR}/${PROJECT}/current ${IBS_RESULT_DIR}/${PROJECT}/previous
169 fi
170
171 # Create new current
172- ln -s $BUILDDIR ${IBS_RESULTDIR}/${PROJECT}/current
173+ ln -s $BUILDDIR ${IBS_RESULT_DIR}/${PROJECT}/current
174 # Copy new previous into new current
175- if [ -L ${IBS_RESULTDIR}/${PROJECT}/previous ]; then
176- cp -d ${IBS_RESULTDIR}/${PROJECT}/previous ${IBS_RESULTDIR}/${PROJECT}/current/previous
177+ if [ -L ${IBS_RESULT_DIR}/${PROJECT}/previous ]; then
178+ cp -d ${IBS_RESULT_DIR}/${PROJECT}/previous ${IBS_RESULT_DIR}/${PROJECT}/current/previous
179 fi
180
181 # Set up working dir
182- mkdir -p ${IBS_WORKDIR}/${PROJECT}
183- pushd ${IBS_WORKDIR}/${PROJECT} > /dev/null 2>&1
184+ mkdir -p ${IBS_WORK_DIR}/${PROJECT}
185+ pushd ${IBS_WORK_DIR}/${PROJECT} > /dev/null 2>&1
186
187 }
188
189
190=== modified file 'lib/offspring/build/functions/config.sh'
191--- lib/offspring/build/functions/config.sh 2011-09-21 20:43:23 +0000
192+++ lib/offspring/build/functions/config.sh 2011-09-21 20:43:23 +0000
193@@ -83,8 +83,8 @@
194 bzr export "${_DESTINATION}" "${IBS_PROJECTCONFIGDIR}"
195 fi
196
197- bzr revno "${IBS_BASEDIR}" > "${_DESTINATION}/offspring-codebase.revno"
198- bzr info "${IBS_BASEDIR}" > "${_DESTINATION}/offspring-codebase.info"
199+ bzr revno "${IBS_BASE_DIR}" > "${_DESTINATION}/offspring-codebase.revno"
200+ bzr info "${IBS_BASE_DIR}" > "${_DESTINATION}/offspring-codebase.info"
201 bzr revno "${IBS_PROJECTCONFIGDIR}" > "${_DESTINATION}/offspring-project-config.revno"
202 bzr info "${IBS_PROJECTCONFIGDIR}" > "${_DESTINATION}/offspring-project-config.info"
203
204@@ -105,8 +105,8 @@
205 exit 1
206 fi
207
208- if [ ! -d ${IBS_BASEDIR} ]; then
209- Error "Basedir '%s' could not be found." "${IBS_BASEDIR}"
210+ if [ ! -d ${IBS_BASE_DIR} ]; then
211+ Error "Basedir '%s' could not be found." "${IBS_BASE_DIR}"
212 exit 1
213 fi
214
215
216=== modified file 'lib/offspring/build/functions/exit.sh'
217--- lib/offspring/build/functions/exit.sh 2010-11-29 08:27:24 +0000
218+++ lib/offspring/build/functions/exit.sh 2011-09-21 20:43:23 +0000
219@@ -54,7 +54,7 @@
220 fi
221
222 Action "Ensuring all chroot mounts are unmounted"
223- for DIRECTORY in $(grep "${IBS_WORKDIR}/${PROJECT}/chroot/" /proc/mounts | awk '{ print $2 }')
224+ for DIRECTORY in $(grep "${IBS_WORK_DIR}/${PROJECT}/chroot/" /proc/mounts | awk '{ print $2 }')
225 do
226 sudo umount ${DIRECTORY} > /dev/null 2>&1 || true
227 done
228@@ -62,7 +62,7 @@
229 fi
230
231 Action "Remvoving build statefile"
232- rm ${IBS_BUILDER_STATEFILE}
233+ rm ${IBS_BUILD_STATEFILE}
234 Action_done
235 }
236
237
238=== modified file 'lib/offspring/build/functions/reports.sh'
239--- lib/offspring/build/functions/reports.sh 2011-02-24 22:32:16 +0000
240+++ lib/offspring/build/functions/reports.sh 2011-09-21 20:43:23 +0000
241@@ -11,11 +11,11 @@
242 Action "Preparing to generate build comparison and change report"
243
244 NEWMANIFESTDIR="${RESULTDIR_IMAGES}/${1}/"
245- OLDMANIFESTDIR="${IBS_RESULTDIR}/${PROJECT}/previous/images/${1}/"
246+ OLDMANIFESTDIR="${IBS_RESULT_DIR}/${PROJECT}/previous/images/${1}/"
247 NEWMANIFEST=`ls ${NEWMANIFESTDIR} 2> /dev/null | egrep -m1 "manifest|packages"`
248 OLDMANIFEST=`ls ${OLDMANIFESTDIR} 2> /dev/null | egrep -m1 "manifest|packages"`
249
250- if [ ! -f "${IBS_SCRIPTDIR}/compare-builds" ]
251+ if [ ! -f "${IBS_SCRIPT_DIR}/compare-builds" ]
252 then
253 Error "Unable to find bcct tool; Skipping build comparison."
254 elif [ -z "${1}" ]
255@@ -34,13 +34,13 @@
256 Action_done
257
258 Action "Generating build comparison report"
259- ${IBS_SCRIPTDIR}/compare-builds --hide=untouched "${OLDMANIFESTDIR}/${OLDMANIFEST}" "${NEWMANIFESTDIR}/${NEWMANIFEST}" > "${RESULTDIR_REPORTS}/${OUTFILE}"
260+ ${IBS_SCRIPT_DIR}/compare-builds --hide=untouched "${OLDMANIFESTDIR}/${OLDMANIFEST}" "${NEWMANIFESTDIR}/${NEWMANIFEST}" > "${RESULTDIR_REPORTS}/${OUTFILE}"
261 Action_done
262
263- if [ -f "${IBS_SCRIPTDIR}/describe-changes" ]
264+ if [ -f "${IBS_SCRIPT_DIR}/describe-changes" ]
265 then
266 Action "Generating build change description report"
267- ${IBS_SCRIPTDIR}/compare-builds --machine-readable --show=updated "${OLDMANIFESTDIR}/${OLDMANIFEST}" "${NEWMANIFESTDIR}/${NEWMANIFEST}" > "${RESULTDIR_REPORTS}/${OUTFILE}.uomr"
268+ ${IBS_SCRIPT_DIR}/compare-builds --machine-readable --show=updated "${OLDMANIFESTDIR}/${OLDMANIFEST}" "${NEWMANIFESTDIR}/${NEWMANIFEST}" > "${RESULTDIR_REPORTS}/${OUTFILE}.uomr"
269
270 if [ "${IBS_BUILDTOOL}" = "mic" ]; then
271 _ARCH="lpia"
272@@ -48,7 +48,7 @@
273 _ARCH="${LH_ARCHITECTURE}"
274 fi
275
276- ${IBS_SCRIPTDIR}/describe-changes --arch="${_ARCH}" "${PROJECT}" "${RESULTDIR_REPORTS}/${OUTFILE}.uomr" > "${RESULTDIR_REPORTS}/changes.txt"
277+ ${IBS_SCRIPT_DIR}/describe-changes --arch="${_ARCH}" "${PROJECT}" "${RESULTDIR_REPORTS}/${OUTFILE}.uomr" > "${RESULTDIR_REPORTS}/changes.txt"
278 Action_done
279 rm "${RESULTDIR_REPORTS}/${OUTFILE}.uomr"
280 else
281@@ -89,14 +89,14 @@
282 produceLicenseReport() {
283 Catch_faults permit_errors
284
285- if [ -f "${IBS_SCRIPTDIR}/describe-licensing" ]
286+ if [ -f "${IBS_SCRIPT_DIR}/describe-licensing" ]
287 then
288 Info "Scanning for manifest files to generate license reports under '${RESULTDIR_IMAGES}'"
289 IFS="$(echo -e '\n\r')"
290 for MANIFEST in $(find "${RESULTDIR_IMAGES}" -name "*.manifest")
291 do
292 Action "Generating license report from '${MANIFEST}'"
293- ${IBS_SCRIPTDIR}/describe-licensing --config="${IBS_CONFIGDIR}/offspring.cfg" --output="${RESULTDIR_REPORTS}/license_report.$(basename ${MANIFEST} .manifest)" "${MANIFEST}"
294+ ${IBS_SCRIPT_DIR}/describe-licensing --config="${IBS_CONFIG_DIR}/offspring.cfg" --output="${RESULTDIR_REPORTS}/license_report.$(basename ${MANIFEST} .manifest)" "${MANIFEST}"
295 Action_done
296 done
297 unset IFS
298
299=== modified file 'lib/offspring/build/scripts/archive-builds'
300--- lib/offspring/build/scripts/archive-builds 2011-09-21 20:43:23 +0000
301+++ lib/offspring/build/scripts/archive-builds 2011-09-21 20:43:23 +0000
302@@ -102,7 +102,7 @@
303 SIMULATION=0
304 fi
305
306-for project in `ls $IBS_RESULTDIR`; do
307+for project in `ls $IBS_RESULT_DIR`; do
308 # if [ -f $CONFIGDIR_PROJECTS/$project.config ]; then
309 # source $CONFIGDIR_PROJECTS/$project.config
310 # fi
311@@ -117,61 +117,61 @@
312 echo " Shelve Directory Age: $IBS_SHELVE_DIR_AGE"
313 echo
314
315- for day in `ls $IBS_RESULTDIR/$project/`; do
316- if [ ! -L $IBS_RESULTDIR/$project/$day -a "$day" != "archive" ]; then
317+ for day in `ls $IBS_RESULT_DIR/$project/`; do
318+ if [ ! -L $IBS_RESULT_DIR/$project/$day -a "$day" != "archive" ]; then
319 declare -i age=$(calculateBuildAge $day)
320
321 if [ $age -gt $IBS_ARCHIVE_THRESHOLD ]; then
322 declare -i ACTION_TAKEN=0
323- echo "I: $project/$day meets the archive threshold at $age day(s) old (`du -hs $IBS_RESULTDIR/$project/$day | cut -f 1`)"
324+ echo "I: $project/$day meets the archive threshold at $age day(s) old (`du -hs $IBS_RESULT_DIR/$project/$day | cut -f 1`)"
325
326- if [ $IBS_ARCHIVE_MODE -eq 1 -a ! -f "$IBS_RESULTDIR/$project/$day/.archived" ]; then
327+ if [ $IBS_ARCHIVE_MODE -eq 1 -a ! -f "$IBS_RESULT_DIR/$project/$day/.archived" ]; then
328 echo " I: Archiving $project builds from $day to $IBS_ARCHIVE_USER@$IBS_ARCHIVE_HOST/$IBS_ARCHIVE_DESTINATION/"
329 ACTION_TAKEN=1
330 if [ 1 -ne $SIMULATION ]; then
331- rsync -av --progress $IBS_RESULTDIR/$project/$day/ "$IBS_ARCHIVE_USER@$IBS_ARCHIVE_HOST/$IBS_ARCHIVE_DESTINATION/$project-$day/"
332- touch $IBS_RESULTDIR/$project/$day/.archived
333+ rsync -av --progress $IBS_RESULT_DIR/$project/$day/ "$IBS_ARCHIVE_USER@$IBS_ARCHIVE_HOST/$IBS_ARCHIVE_DESTINATION/$project-$day/"
334+ touch $IBS_RESULT_DIR/$project/$day/.archived
335 fi
336 fi
337
338 if [ $age -gt $IBS_PURGE_IMAGE_AGE ]; then
339- if [ -n "`find $IBS_RESULTDIR/$project/$day -name *.img -type f -print`" ]; then
340+ if [ -n "`find $IBS_RESULT_DIR/$project/$day -name *.img -type f -print`" ]; then
341 echo " I: Deleting images for $project builds from $day"
342 ACTION_TAKEN=1
343 if [ 1 -ne $SIMULATION ]; then
344- find $IBS_RESULTDIR/$project/$day -name *.img -type f -print | xargs /bin/rm -f
345+ find $IBS_RESULT_DIR/$project/$day -name *.img -type f -print | xargs /bin/rm -f
346 fi
347 fi
348- if [ -n "`find $IBS_RESULTDIR/$project/$day -name *.iso -type f -print`" ]; then
349+ if [ -n "`find $IBS_RESULT_DIR/$project/$day -name *.iso -type f -print`" ]; then
350 echo " I: Deleting isos for $project builds from $day"
351 ACTION_TAKEN=1
352 if [ 1 -ne $SIMULATION ]; then
353- find $IBS_RESULTDIR/$project/$day -name *.iso -type f -print | xargs /bin/rm -f
354+ find $IBS_RESULT_DIR/$project/$day -name *.iso -type f -print | xargs /bin/rm -f
355 fi
356 fi
357- if [ -n "`find $IBS_RESULTDIR/$project/$day -name *-tar-*.tar.gz -type f -print`" ]; then
358+ if [ -n "`find $IBS_RESULT_DIR/$project/$day -name *-tar-*.tar.gz -type f -print`" ]; then
359 echo " I: Deleting tarballs for $project builds from $day"
360 ACTION_TAKEN=1
361 if [ 1 -ne $SIMULATION ]; then
362- find $IBS_RESULTDIR/$project/$day -name *-tar-*.tar.gz -type f -print | xargs /bin/rm -f
363+ find $IBS_RESULT_DIR/$project/$day -name *-tar-*.tar.gz -type f -print | xargs /bin/rm -f
364 fi
365 fi
366- if [ -n "`find $IBS_RESULTDIR/$project/$day -name config -type d -print`" ]; then
367+ if [ -n "`find $IBS_RESULT_DIR/$project/$day -name config -type d -print`" ]; then
368 echo " I: Tarballing config directories for $project builds from $day"
369 ACTION_TAKEN=1
370 if [ 1 -ne $SIMULATION ]; then
371- for DIRECTORY in $(find $IBS_RESULTDIR/$project/$day -name config -type d -print)
372+ for DIRECTORY in $(find $IBS_RESULT_DIR/$project/$day -name config -type d -print)
373 do
374 tar --directory="$(dirname ${DIRECTORY})" -czf "$(dirname ${DIRECTORY})/config.tgz" config
375 rm -rf "${DIRECTORY}"
376 done
377 fi
378 fi
379- if [ -n "`find $IBS_RESULTDIR/$project/$day -name reports -type d -print`" ]; then
380+ if [ -n "`find $IBS_RESULT_DIR/$project/$day -name reports -type d -print`" ]; then
381 echo " I: Tarballing reports directories for $project builds from $day"
382 ACTION_TAKEN=1
383 if [ 1 -ne $SIMULATION ]; then
384- for DIRECTORY in $(find $IBS_RESULTDIR/$project/$day -name reports -type d -print)
385+ for DIRECTORY in $(find $IBS_RESULT_DIR/$project/$day -name reports -type d -print)
386 do
387 tar --directory="$(dirname ${DIRECTORY})" -czf "$(dirname ${DIRECTORY})/reports.tgz" reports
388 rm -rf "${DIRECTORY}"
389@@ -181,11 +181,11 @@
390 fi
391
392 if [ $age -gt $IBS_PURGE_PROJ_AGE ]; then
393- if [ -n "`find $IBS_RESULTDIR/$project/$day -name *.mic.tar.bz2 -type f -print`" ]; then
394+ if [ -n "`find $IBS_RESULT_DIR/$project/$day -name *.mic.tar.bz2 -type f -print`" ]; then
395 echo " I: Deleting saved project for $project builds from $day"
396 ACTION_TAKEN=1
397 if [ 1 -ne $SIMULATION ]; then
398- find $IBS_RESULTDIR/$project/$day -name *.mic.tar.bz2 -type f -print | xargs /bin/rm -f
399+ find $IBS_RESULT_DIR/$project/$day -name *.mic.tar.bz2 -type f -print | xargs /bin/rm -f
400 fi
401 fi
402 fi
403@@ -194,8 +194,8 @@
404 echo " I: Shelving directory for $project builds from $day"
405 ACTION_TAKEN=1
406 if [ 1 -ne $SIMULATION ]; then
407- mkdir -p $IBS_RESULTDIR/$project/archive
408- mv $IBS_RESULTDIR/$project/$day $IBS_RESULTDIR/$project/archive
409+ mkdir -p $IBS_RESULT_DIR/$project/archive
410+ mv $IBS_RESULT_DIR/$project/$day $IBS_RESULT_DIR/$project/archive
411 fi
412 fi
413
414@@ -205,7 +205,7 @@
415
416 echo
417 elif [ "$VERBOSE" = "1" ]; then
418- echo "II: $project/$day is $age day(s) old and consuming `du -hs $IBS_RESULTDIR/$project/$day | cut -f 1`"
419+ echo "II: $project/$day is $age day(s) old and consuming `du -hs $IBS_RESULT_DIR/$project/$day | cut -f 1`"
420 fi
421 fi
422 done
423
424=== modified file 'lib/offspring/build/wrappers/lb.sh'
425--- lib/offspring/build/wrappers/lb.sh 2011-05-11 20:45:26 +0000
426+++ lib/offspring/build/wrappers/lb.sh 2011-09-21 20:43:23 +0000
427@@ -6,7 +6,7 @@
428 Buildtool_setup() {
429 Catch_faults permit_errors
430
431- TARGETFS="${IBS_WORKDIR}/${PROJECT}/chroot"
432+ TARGETFS="${IBS_WORK_DIR}/${PROJECT}/chroot"
433
434 sudo apt-get update -o Acquire::http::No-Cache=True
435 ERROR=$?
436@@ -24,37 +24,37 @@
437 Die
438 fi
439
440- if [ -d "${IBS_WORKDIR}/${PROJECT}/config" ]; then
441- rm -rf "${IBS_WORKDIR}/${PROJECT}/config" > /dev/null 2>&1 || true
442+ if [ -d "${IBS_WORK_DIR}/${PROJECT}/config" ]; then
443+ rm -rf "${IBS_WORK_DIR}/${PROJECT}/config" > /dev/null 2>&1 || true
444 fi
445
446 Action "Copying project configuration directory into work directory for build"
447- Export_project_config "${PROJECT}" "${IBS_WORKDIR}/${PROJECT}/config"
448+ Export_project_config "${PROJECT}" "${IBS_WORK_DIR}/${PROJECT}/config"
449 Action_done
450
451 if [ "$?" != "0" ]; then
452- Error "Unable to copy project build configuration to %s" "${IBS_WORKDIR}/${PROJECT}/config"
453+ Error "Unable to copy project build configuration to %s" "${IBS_WORK_DIR}/${PROJECT}/config"
454 Die
455 fi
456
457 Action "Generating buildstamp"
458- mkdir -p "${IBS_WORKDIR}"/"${PROJECT}"/config/chroot_local-includes/etc/
459- cat >> "${IBS_WORKDIR}"/"${PROJECT}"/config/chroot_local-includes/etc/buildstamp << EOF
460+ mkdir -p "${IBS_WORK_DIR}"/"${PROJECT}"/config/chroot_local-includes/etc/
461+ cat >> "${IBS_WORK_DIR}"/"${PROJECT}"/config/chroot_local-includes/etc/buildstamp << EOF
462 ${HOSTNAME} $(date -R)
463 ${PROJECT}-${BUILDNAME}
464 EOF
465 Action_done
466
467 Action "Adding buildstamp to binary image"
468- mkdir -p "${IBS_WORKDIR}"/"${PROJECT}"/config/binary_local-includes/.disk/
469- cp "${IBS_WORKDIR}"/"${PROJECT}"/config/chroot_local-includes/etc/buildstamp "${IBS_WORKDIR}"/"${PROJECT}"/config/binary_local-includes/.disk/
470+ mkdir -p "${IBS_WORK_DIR}"/"${PROJECT}"/config/binary_local-includes/.disk/
471+ cp "${IBS_WORK_DIR}"/"${PROJECT}"/config/chroot_local-includes/etc/buildstamp "${IBS_WORK_DIR}"/"${PROJECT}"/config/binary_local-includes/.disk/
472 Action_done
473
474 if [ ! -z "${IBS_DISTRIBUTION_CHANNEL_DESCRIPTOR_PREFIX}" ]
475 then
476 Action "Generating distribution channel descriptor"
477- mkdir -p "${IBS_WORKDIR}"/"${PROJECT}"/config/chroot_local-includes/var/lib/
478- cat > "${IBS_WORKDIR}"/"${PROJECT}"/config/chroot_local-includes/var/lib/ubuntu_dist_channel << EOF
479+ mkdir -p "${IBS_WORK_DIR}"/"${PROJECT}"/config/chroot_local-includes/var/lib/
480+ cat > "${IBS_WORK_DIR}"/"${PROJECT}"/config/chroot_local-includes/var/lib/ubuntu_dist_channel << EOF
481 # This is a distribution channel descriptor
482 # For more information see http://wiki.ubuntu.com/DistributionChannelDescriptor
483 ${IBS_DISTRIBUTION_CHANNEL_DESCRIPTOR_PREFIX}-${PROJECT}-${BUILDNAME}
484@@ -66,10 +66,10 @@
485
486 Catch_faults disallow_errors
487
488- Load_script_configfile "${IBS_WORKDIR}/${PROJECT}/config/bootstrap"
489- Load_script_configfile "${IBS_WORKDIR}/${PROJECT}/config/chroot"
490- Load_script_configfile "${IBS_WORKDIR}/${PROJECT}/config/binary"
491- Load_script_configfile "${IBS_WORKDIR}/${PROJECT}/config/source"
492+ Load_script_configfile "${IBS_WORK_DIR}/${PROJECT}/config/bootstrap"
493+ Load_script_configfile "${IBS_WORK_DIR}/${PROJECT}/config/chroot"
494+ Load_script_configfile "${IBS_WORK_DIR}/${PROJECT}/config/binary"
495+ Load_script_configfile "${IBS_WORK_DIR}/${PROJECT}/config/source"
496 }
497
498 Buildtool_build() {
499@@ -109,12 +109,12 @@
500 _Check_directory
501
502 sudo lb clean --purge
503- rm -rf "${IBS_WORKDIR}/${PROJECT}/config"
504+ rm -rf "${IBS_WORK_DIR}/${PROJECT}/config"
505 }
506
507 _Check_directory() {
508- if [ "${PWD}" != "${IBS_WORKDIR}/${PROJECT}" ]; then
509- Error "Working directory is '%s'; expected '%s'" "{$PWD}" "${IBS_WORKDIR}/${PROJECT}"
510+ if [ "${PWD}" != "${IBS_WORK_DIR}/${PROJECT}" ]; then
511+ Error "Working directory is '%s'; expected '%s'" "{$PWD}" "${IBS_WORK_DIR}/${PROJECT}"
512 Die
513 fi
514 Debug "Directory check performed and was successful; PWD: %s" "${PWD}"
515@@ -124,9 +124,9 @@
516 #XXX: Hack so that describe-changes works.
517 mkdir -p "${RESULTDIR_CONFIGFILES}/sources-list/"
518
519- for FILE in $(find "${IBS_WORKDIR}/${PROJECT}/config/chroot_sources/" -maxdepth 1 -type f -name "*.chroot" )
520+ for FILE in $(find "${IBS_WORK_DIR}/${PROJECT}/config/chroot_sources/" -maxdepth 1 -type f -name "*.chroot" )
521 do
522- cp "${IBS_WORKDIR}/${PROJECT}/config/chroot_sources/$(basename ${FILE})" "${RESULTDIR_CONFIGFILES}/sources-list/"
523+ cp "${IBS_WORK_DIR}/${PROJECT}/config/chroot_sources/$(basename ${FILE})" "${RESULTDIR_CONFIGFILES}/sources-list/"
524 done
525
526 echo "deb ${LB_MIRROR_CHROOT} ${LB_DISTRIBUTION} ${LB_ARCHIVE_AREAS}" > "${RESULTDIR_CONFIGFILES}/sources-list/sources.list"
527
528=== modified file 'lib/offspring/build/wrappers/lh.sh'
529--- lib/offspring/build/wrappers/lh.sh 2011-05-11 20:45:26 +0000
530+++ lib/offspring/build/wrappers/lh.sh 2011-09-21 20:43:23 +0000
531@@ -6,7 +6,7 @@
532 Buildtool_setup() {
533 Catch_faults permit_errors
534
535- TARGETFS="${IBS_WORKDIR}/${PROJECT}/chroot"
536+ TARGETFS="${IBS_WORK_DIR}/${PROJECT}/chroot"
537
538 sudo apt-get update -o Acquire::http::No-Cache=True
539 ERROR=$?
540@@ -24,37 +24,37 @@
541 Die
542 fi
543
544- if [ -d "${IBS_WORKDIR}/${PROJECT}/config" ]; then
545- rm -rf "${IBS_WORKDIR}/${PROJECT}/config" > /dev/null 2>&1 || true
546+ if [ -d "${IBS_WORK_DIR}/${PROJECT}/config" ]; then
547+ rm -rf "${IBS_WORK_DIR}/${PROJECT}/config" > /dev/null 2>&1 || true
548 fi
549
550 Action "Copying project configuration directory into work directory for build"
551- Export_project_config "${PROJECT}" "${IBS_WORKDIR}/${PROJECT}/config"
552+ Export_project_config "${PROJECT}" "${IBS_WORK_DIR}/${PROJECT}/config"
553 Action_done
554
555 if [ "$?" != "0" ]; then
556- Error "Unable to copy project build configuration to %s" "${IBS_WORKDIR}/${PROJECT}/config"
557+ Error "Unable to copy project build configuration to %s" "${IBS_WORK_DIR}/${PROJECT}/config"
558 Die
559 fi
560
561 Action "Generating buildstamp"
562- mkdir -p "${IBS_WORKDIR}"/"${PROJECT}"/config/chroot_local-includes/etc/
563- cat >> "${IBS_WORKDIR}"/"${PROJECT}"/config/chroot_local-includes/etc/buildstamp << EOF
564+ mkdir -p "${IBS_WORK_DIR}"/"${PROJECT}"/config/chroot_local-includes/etc/
565+ cat >> "${IBS_WORK_DIR}"/"${PROJECT}"/config/chroot_local-includes/etc/buildstamp << EOF
566 ${HOSTNAME} $(date -R)
567 ${PROJECT}-${BUILDNAME}
568 EOF
569 Action_done
570
571 Action "Adding buildstamp to binary image"
572- mkdir -p "${IBS_WORKDIR}"/"${PROJECT}"/config/binary_local-includes/.disk/
573- cp "${IBS_WORKDIR}"/"${PROJECT}"/config/chroot_local-includes/etc/buildstamp "${IBS_WORKDIR}"/"${PROJECT}"/config/binary_local-includes/.disk/
574+ mkdir -p "${IBS_WORK_DIR}"/"${PROJECT}"/config/binary_local-includes/.disk/
575+ cp "${IBS_WORK_DIR}"/"${PROJECT}"/config/chroot_local-includes/etc/buildstamp "${IBS_WORK_DIR}"/"${PROJECT}"/config/binary_local-includes/.disk/
576 Action_done
577
578 if [ ! -z "${IBS_DISTRIBUTION_CHANNEL_DESCRIPTOR_PREFIX}" ]
579 then
580 Action "Generating distribution channel descriptor"
581- mkdir -p "${IBS_WORKDIR}"/"${PROJECT}"/config/chroot_local-includes/var/lib/
582- cat > "${IBS_WORKDIR}"/"${PROJECT}"/config/chroot_local-includes/var/lib/ubuntu_dist_channel << EOF
583+ mkdir -p "${IBS_WORK_DIR}"/"${PROJECT}"/config/chroot_local-includes/var/lib/
584+ cat > "${IBS_WORK_DIR}"/"${PROJECT}"/config/chroot_local-includes/var/lib/ubuntu_dist_channel << EOF
585 # This is a distribution channel descriptor
586 # For more information see http://wiki.ubuntu.com/DistributionChannelDescriptor
587 ${IBS_DISTRIBUTION_CHANNEL_DESCRIPTOR_PREFIX}-${PROJECT}-${BUILDNAME}
588@@ -66,10 +66,10 @@
589
590 Catch_faults disallow_errors
591
592- Load_script_configfile "${IBS_WORKDIR}/${PROJECT}/config/bootstrap"
593- Load_script_configfile "${IBS_WORKDIR}/${PROJECT}/config/chroot"
594- Load_script_configfile "${IBS_WORKDIR}/${PROJECT}/config/binary"
595- Load_script_configfile "${IBS_WORKDIR}/${PROJECT}/config/source"
596+ Load_script_configfile "${IBS_WORK_DIR}/${PROJECT}/config/bootstrap"
597+ Load_script_configfile "${IBS_WORK_DIR}/${PROJECT}/config/chroot"
598+ Load_script_configfile "${IBS_WORK_DIR}/${PROJECT}/config/binary"
599+ Load_script_configfile "${IBS_WORK_DIR}/${PROJECT}/config/source"
600 }
601
602 Buildtool_build() {
603@@ -115,12 +115,12 @@
604 _Check_directory
605
606 sudo lh clean --purge
607- rm -rf "${IBS_WORKDIR}/${PROJECT}/config"
608+ rm -rf "${IBS_WORK_DIR}/${PROJECT}/config"
609 }
610
611 _Check_directory() {
612- if [ "${PWD}" != "${IBS_WORKDIR}/${PROJECT}" ]; then
613- Error "Working directory is '%s'; expected '%s'" "{$PWD}" "${IBS_WORKDIR}/${PROJECT}"
614+ if [ "${PWD}" != "${IBS_WORK_DIR}/${PROJECT}" ]; then
615+ Error "Working directory is '%s'; expected '%s'" "{$PWD}" "${IBS_WORK_DIR}/${PROJECT}"
616 Die
617 fi
618 Debug "Directory check performed and was successful; PWD: %s" "${PWD}"
619@@ -130,9 +130,9 @@
620 #XXX: Hack so that describe-changes works.
621 mkdir -p "${RESULTDIR_CONFIGFILES}/sources-list/"
622
623- for FILE in $(find "${IBS_WORKDIR}/${PROJECT}/config/chroot_sources/" -maxdepth 1 -type f -name "*.chroot" )
624+ for FILE in $(find "${IBS_WORK_DIR}/${PROJECT}/config/chroot_sources/" -maxdepth 1 -type f -name "*.chroot" )
625 do
626- cp "${IBS_WORKDIR}/${PROJECT}/config/chroot_sources/$(basename ${FILE})" "${RESULTDIR_CONFIGFILES}/sources-list/"
627+ cp "${IBS_WORK_DIR}/${PROJECT}/config/chroot_sources/$(basename ${FILE})" "${RESULTDIR_CONFIGFILES}/sources-list/"
628 done
629
630 # LH_CATEGORIES was renamed to LH_ARCHIVE_AREAS in live-helper 2.x
631@@ -151,6 +151,6 @@
632 mkdir -p "${RESULTDIR_PROJDIR}/"
633
634 Action "Generating build archive (may take awhile)"
635- tar -zcf "${RESULTDIR_PROJDIR}/${PROJECT}-${BUILDNAME}.build.tgz" "${IBS_WORKDIR}/${PROJECT}" > /dev/null 2>&1
636+ tar -zcf "${RESULTDIR_PROJDIR}/${PROJECT}-${BUILDNAME}.build.tgz" "${IBS_WORK_DIR}/${PROJECT}" > /dev/null 2>&1
637 Action_done
638 }

Subscribers

People subscribed via source and target branches