Merge lp:~jml/udd/less-in-top-level into lp:udd

Proposed by Jonathan Lange
Status: Merged
Merged at revision: 530
Proposed branch: lp:~jml/udd/less-in-top-level
Merge into: lp:udd
Diff against target: 121 lines (+16/-16)
5 files modified
README (+4/-4)
etc-init.d-mass-import (+1/-1)
fixit.sh (+2/-2)
importer.crontab (+7/-7)
pkgimport.conf (+2/-2)
To merge this branch: bzr merge lp:~jml/udd/less-in-top-level
Reviewer Review Type Date Requested Status
Martin Packman Approve
Ubuntu Distributed Development Developers Pending
Review via email: mp+80037@code.launchpad.net

Description of the change

The top-level of lp:udd is a little bit intimidating. There are a lot of files there, and the beginner will not know which are which. This branch moves all of the scripts to a bin/ directory, and renames them to have dashes instead of underscores and to not have '.py' extensions.

I thought about creating two script directories – one for production scripts and the other for development scripts – but I didn't feel confident enough about the distinction.

Haven't tested this in any way yet. Not exactly sure how, since the most likely issue is PYTHONPATH related.

To post a comment you must log in.
Revision history for this message
Martin Packman (gz) wrote :

Yeah, the first thing I did after branching lp:udd the other day was look in one of the top level files then close it again and go and find the actual module.

Given my heritage, I dislike the bin/no-extension style but it's clearly the right thing now you've made scripts to run as separate files from python modules.

Having some kind of division between the scripts might be useful (cron vs. manual tool seems relevant) but could be done later anyway.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'README'
--- README 2011-10-20 09:49:53 +0000
+++ README 2011-10-21 10:21:30 +0000
@@ -15,7 +15,7 @@
15Overview15Overview
16********16********
1717
18``list_packages`` gets a list of all source packages in interesting releases18``list-packages`` gets a list of all source packages in interesting releases
19from Launchpad.19from Launchpad.
2020
21Deployment21Deployment
@@ -35,7 +35,7 @@
35``lp:udd`` after approval but deployment is done when time and circumstances35``lp:udd`` after approval but deployment is done when time and circumstances
36permit.36permit.
3737
38mass_import38mass-import
39-----------39-----------
4040
41The ``etc-init.d-mass-import`` script, installed into41The ``etc-init.d-mass-import`` script, installed into
@@ -58,10 +58,10 @@
5858
59but don't forget to requeue the killed imports later.59but don't forget to requeue the killed imports later.
6060
61import_package61import-package
62--------------62--------------
6363
64The ``import_package.py`` script is generally called in a subprocess by64The ``import-package`` script is generally called in a subprocess by
65``mass-import``.65``mass-import``.
6666
67For debug purposes, it can also be run locally with additional options:67For debug purposes, it can also be run locally with additional options:
6868
=== added directory 'bin'
=== renamed file 'add_import_jobs.py' => 'bin/add-import-jobs'
=== renamed file 'analyze_log.py' => 'bin/analyze-log'
=== renamed file 'branch_branches_from_lp.py' => 'bin/branch-branches-from-lp'
=== renamed file 'categorise_failures.py' => 'bin/categorise-failures'
=== renamed file 'count_outstanding_jobs.py' => 'bin/count-outstanding-jobs'
=== renamed file 'cricket.py' => 'bin/cricket'
=== renamed file 'delete_branches_from_lp.py' => 'bin/delete-branches-from-lp'
=== renamed file 'email_failures.py' => 'bin/email-failures'
=== renamed file 'graph_failures.py' => 'bin/graph-failures'
=== renamed file 'import_package.py' => 'bin/import-package'
=== renamed file 'list_packages.py' => 'bin/list-packages'
=== renamed file 'logrotate.py' => 'bin/logrotate'
=== renamed file 'mass_import.py' => 'bin/mass-import'
=== renamed file 'requeue_package.py' => 'bin/requeue-package'
=== renamed file 'set_official.py' => 'bin/set-official'
=== renamed file 'show_failure.py' => 'bin/show-failure'
=== modified file 'etc-init.d-mass-import'
--- etc-init.d-mass-import 2011-07-19 09:48:17 +0000
+++ etc-init.d-mass-import 2011-10-21 10:21:30 +0000
@@ -3,7 +3,7 @@
3export BASEDIR=/srv/package-import.canonical.com/new3export BASEDIR=/srv/package-import.canonical.com/new
4PATH=${BASEDIR}/scripts:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin4PATH=${BASEDIR}/scripts:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
5NAME=mass-import5NAME=mass-import
6DAEMON=${BASEDIR}/scripts/mass_import.py6DAEMON=${BASEDIR}/scripts/bin/mass-import
7PIDFILE=${BASEDIR}/mass-import.pid7PIDFILE=${BASEDIR}/mass-import.pid
8STOPFILE=${BASEDIR}/STOP_PLEASE8STOPFILE=${BASEDIR}/STOP_PLEASE
9USER=pkg_import9USER=pkg_import
1010
=== modified file 'fixit.sh'
--- fixit.sh 2011-07-19 09:48:17 +0000
+++ fixit.sh 2011-10-21 10:21:30 +0000
@@ -12,7 +12,7 @@
12# ones in a better place.12# ones in a better place.
1313
14export BASEDIR=/srv/package-import.canonical.com/new14export BASEDIR=/srv/package-import.canonical.com/new
15export PATH=${BASEDIR}/scripts:${PATH}15export PATH=${BASEDIR}/scripts/bin:${PATH}
16export BZR_PLUGIN_PATH=${BASEDIR}/scripts/plugins16export BZR_PLUGIN_PATH=${BASEDIR}/scripts/plugins
17export LANG="en_GB.UTF-8"17export LANG="en_GB.UTF-8"
18export BZR_EMAIL="Package Import Robot <package-import@ubuntu.com>"18export BZR_EMAIL="Package Import Robot <package-import@ubuntu.com>"
@@ -63,5 +63,5 @@
63}63}
6464
65requeue() {65requeue() {
66 requeue_package.py "$@"66 requeue-package "$@"
67}67}
6868
=== modified file 'importer.crontab'
--- importer.crontab 2011-07-19 09:48:17 +0000
+++ importer.crontab 2011-10-21 10:21:30 +0000
@@ -1,8 +1,8 @@
1SCRIPTS_DIR=/srv/package-import.canonical.com/new/scripts1SCRIPTS_DIR=/srv/package-import.canonical.com/new/scripts/bin
2# m h dom mon dow command2# m h dom mon dow command
317 * * * * /usr/bin/python ${SCRIPTS_DIR}/logrotate.py317 * * * * /usr/bin/python ${SCRIPTS_DIR}/logrotate
4*/5 * * * * /usr/bin/python ${SCRIPTS_DIR}/categorise_failures.py4*/5 * * * * /usr/bin/python ${SCRIPTS_DIR}/categorise-failures
5*/5 * * * * /usr/bin/python ${SCRIPTS_DIR}/add_import_jobs.py5*/5 * * * * /usr/bin/python ${SCRIPTS_DIR}/add-import-jobs
617 07 * * * /usr/bin/python ${SCRIPTS_DIR}/list_packages.py617 07 * * * /usr/bin/python ${SCRIPTS_DIR}/list-packages
730 03 * * * /usr/bin/python ${SCRIPTS_DIR}/email_failures.py730 03 * * * /usr/bin/python ${SCRIPTS_DIR}/email-failures
821 * * * * /usr/bin/python ${SCRIPTS_DIR}/graph_failures.py821 * * * * /usr/bin/python ${SCRIPTS_DIR}/graph-failures
99
=== modified file 'pkgimport.conf'
--- pkgimport.conf 2011-10-06 14:21:18 +0000
+++ pkgimport.conf 2011-10-21 10:21:30 +0000
@@ -19,10 +19,10 @@
1919
20# Script that imports the package. Must be executable and take a single20# Script that imports the package. Must be executable and take a single
21# argument: the name of the package to import.21# argument: the name of the package to import.
22pkgimport.import_script = /srv/package-import.canonical.com/new/scripts/import_package.py22pkgimport.import_script = /srv/package-import.canonical.com/new/scripts/bin/import-package
2323
24# Which distributions to operate on. Normally "ubuntu, debian". No default.24# Which distributions to operate on. Normally "ubuntu, debian". No default.
25# Affects behaviour of add_import_jobs.py and list_packages.py.25# Affects behaviour of add-import-jobs and list-packages.
26pkgimport.distributions = ubuntu,debian26pkgimport.distributions = ubuntu,debian
2727
28# Whether or not to retry all failed jobs. 'true' means to retry all failed28# Whether or not to retry all failed jobs. 'true' means to retry all failed

Subscribers

People subscribed via source and target branches