OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 import os | 3 import os |
| 4 import common |
4 from autotest_lib.client.bin import utils | 5 from autotest_lib.client.bin import utils |
5 | 6 |
6 version = 4 | 7 version = 4 |
7 | 8 |
8 def setup(tarball, topdir): | 9 def setup(tarball, topdir): |
9 srcdir = os.path.join(topdir, 'src') | 10 srcdir = os.path.join(topdir, 'src') |
10 if not os.path.exists(tarball): | 11 if not os.path.exists(tarball): |
11 utils.get_file('ftp://ftp.postgresql.org/pub/source/v8.3.1/postgresql-8.
3.1.tar.bz2', tarball) | 12 utils.get_file('ftp://ftp.postgresql.org/pub/source/v8.3.1/postgresql-8.
3.1.tar.bz2', tarball) |
12 utils.extract_tarball_to_dir(tarball, 'src') | 13 utils.extract_tarball_to_dir(tarball, 'src') |
13 os.chdir(srcdir) | 14 os.chdir(srcdir) |
14 utils.configure('--without-readline --without-zlib --enable-debug --prefix=%
s/pgsql' % topdir) | 15 utils.system ('./configure --without-readline --without-zlib --enable-debug
--prefix=%s/pgsql' % topdir) |
15 utils.make('-j %d' % utils.count_cpus()) | 16 utils.system('make -j %d' % utils.count_cpus()) |
16 utils.make('install') | 17 utils.system('make install') |
17 | 18 |
18 os.chdir(topdir) | 19 os.chdir(topdir) |
19 | 20 |
20 pwd = os.getcwd() | 21 pwd = os.getcwd() |
21 tarball = os.path.join(pwd, 'postgresql-8.3.1.tar.bz2') | 22 tarball = os.path.join(pwd, 'postgresql-8.3.1.tar.bz2') |
22 utils.update_version(pwd+'/src', False, version, setup, tarball, pwd) | 23 utils.update_version(pwd+'/src', False, version, setup, tarball, pwd) |
OLD | NEW |