~launchpad-pqm/launchpad/devel

10637.3.1 by Guilherme Salgado
Use the default python version instead of a hard-coded version
1
#!/usr/bin/python -S
8687.15.22 by Karl Fogel
Add the copyright header block to the remaining .py files.
2
#
9893.9.14 by Stuart Bishop
delint
3
# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
8687.15.22 by Karl Fogel
Add the copyright header block to the remaining .py files.
4
# GNU Affero General Public License version 3 (see the file LICENSE).
5
5703.1.6 by Celso Providelo
applying review comments, r=mwh.
6
# Stop lint warning about relative import:
7
# pylint: disable-msg=W0403
5703.1.5 by Celso Providelo
process-death-row to using LaunchpadScript.
8
"""Death row processor script.
9
10
This script removes obsolete files from the selected archive(s) pool.
11
12
You can select a specific distribution or let it default to 'ubuntu'.
13
14
It operates in 2 modes:
15
 * all distribution archive (PRIMARY and PARTNER) [default]
16
 * all PPAs [--ppa]
17
18
You can optionally specify a different 'pool-root' path which will be used
19
as the base path for removing files, instead of the real archive pool root.
20
This feature is used to inspect the removed files without actually modifying
21
the archive tree.
22
23
There is also a 'dry-run' mode that can be used to operate on the real
24
archive tree without removing the files.
25
"""
3691.93.1 by Christian Reis
Factor the death row processing into a separate script. Implement the DeathRow processor, with size calculation, some optimizations and properly restricting it to a specific distribution, and a process-death-row script, which has a dry run mode. Do minor cleanups in DAR.publish(), implementing a DR.isUnstable() method. Test DeathRow. Change DiskPool file removal code to return the filesize of the file removed. Implement Source/BinaryPackageFilePublishing.displayname, with tests. Clean up publish-distro as much as I can..
26
import _pythonpath
27
8455.1.2 by Celso Providelo
Logging reorganization and code moving for process-death-row.py.
28
from lp.soyuz.scripts.processdeathrow import DeathRowProcessor
3691.93.1 by Christian Reis
Factor the death row processing into a separate script. Implement the DeathRow processor, with size calculation, some optimizations and properly restricting it to a specific distribution, and a process-death-row script, which has a dry run mode. Do minor cleanups in DAR.publish(), implementing a DR.isUnstable() method. Test DeathRow. Change DiskPool file removal code to return the filesize of the file removed. Implement Source/BinaryPackageFilePublishing.displayname, with tests. Clean up publish-distro as much as I can..
29
3691.93.15 by Christian Reis
Fix for bug #54345: archivepublisher module imports monolithically
30
3691.93.1 by Christian Reis
Factor the death row processing into a separate script. Implement the DeathRow processor, with size calculation, some optimizations and properly restricting it to a specific distribution, and a process-death-row script, which has a dry run mode. Do minor cleanups in DAR.publish(), implementing a DR.isUnstable() method. Test DeathRow. Change DiskPool file removal code to return the filesize of the file removed. Implement Source/BinaryPackageFilePublishing.displayname, with tests. Clean up publish-distro as much as I can..
31
if __name__ == "__main__":
5703.1.5 by Celso Providelo
process-death-row to using LaunchpadScript.
32
    script = DeathRowProcessor(
9893.9.8 by Stuart Bishop
process-death-row.py connects as a distinct database user
33
        'process-death-row', dbuser='process_death_row')
5703.1.5 by Celso Providelo
process-death-row to using LaunchpadScript.
34
    script.lock_and_run()