Merge lp:~adeuring/launchpad/bug-793630 into lp:launchpad

Proposed by Abel Deuring
Status: Merged
Approved by: Abel Deuring
Approved revision: no longer in the source branch.
Merged at revision: 13257
Proposed branch: lp:~adeuring/launchpad/bug-793630
Merge into: lp:launchpad
Diff against target: 23 lines (+2/-1)
2 files modified
cronscripts/publishing/cron.base-ppa (+0/-1)
cronscripts/publishing/cron.publish-ppa (+2/-0)
To merge this branch: bzr merge lp:~adeuring/launchpad/bug-793630
Reviewer Review Type Date Requested Status
Gavin Panella (community) Approve
Review via email: mp+64847@code.launchpad.net

Commit message

[r=allenap][bug=793630][no-qa] replace hard coded path to the script directory in cron.publish-ppa with a relative path.

Description of the change

This branch fixes bug 793630: better cronscript setup: remove hard-coded paths from cronscripts/publishing/cron.base-ppa.

The cronscripts/publishing/cron.publish-ppa used the environment variable LPCURRENT to build the path to the scripts it called. This caused a failure for PPA builds some weeks ago because the location of the tree on the server was changed.

Julian suggested a simple fix: To use a relative path instead of an absolute path. This works, as long as the locations of the cronscript and of the scripts it calls within the source tree are not changed.

Script activity is already recorded by the scripts called by cron.publish-ppa, so there is no nedd to do additional recording in the cronscript itself.

To post a comment you must log in.
Revision history for this message
Gavin Panella (allenap) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cronscripts/publishing/cron.base-ppa'
2--- cronscripts/publishing/cron.base-ppa 2011-06-01 00:01:51 +0000
3+++ cronscripts/publishing/cron.base-ppa 2011-06-16 14:39:54 +0000
4@@ -7,7 +7,6 @@
5
6 # DO NOT set LPCONFIG here, it should come from the crontab or the shell.
7 # Define common variables.
8-LPCURRENT=/srv/launchpad.net/production/launchpad
9 PPAROOT=/srv/launchpad.net/ppa-archive
10 P3AROOT=/srv/launchpad.net/private-ppa-archive
11 LOCKFILE=$PPAROOT/.lock
12
13=== modified file 'cronscripts/publishing/cron.publish-ppa'
14--- cronscripts/publishing/cron.publish-ppa 2009-06-24 20:52:01 +0000
15+++ cronscripts/publishing/cron.publish-ppa 2011-06-16 14:39:54 +0000
16@@ -8,6 +8,8 @@
17 # Variables, lockfile and exit handler for PPA scripts.
18 source `dirname $0`/cron.base-ppa
19
20+LPCURRENT=`dirname $0`/../..
21+
22 # Accept PPA binary uploads
23 $LPCURRENT/scripts/process-accepted.py -v --ppa ubuntu
24