From b7b796fff9962cbe7940ee026024af562a9f334c Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 1 Nov 2009 06:00:22 -0500 Subject: In acprep, use md5 module if hashlib isn't present --- acprep | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'acprep') diff --git a/acprep b/acprep index 753f5986..ac009078 100755 --- a/acprep +++ b/acprep @@ -18,9 +18,13 @@ import shutil import string import sys import time -import hashlib import tempfile +try: + import hashlib +except: + import md5 + from os.path import * from stat import * from subprocess import Popen, PIPE, call @@ -623,7 +627,10 @@ class PrepareBuild(CommandLineApp): sys.exit(1) fd = open(tarball) - csum = hashlib.md5() + try: + csum = hashlib.md5() + except: + csum = md5.md5() csum.update(fd.read()) fd.close() digest = csum.hexdigest() -- cgit v1.2.3 From 09e5b00e9268ebb9c71b63660e62e5d0b98c776f Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 1 Nov 2009 06:00:34 -0500 Subject: Fixed 'acprep dependencies' command for CentOS --- acprep | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'acprep') diff --git a/acprep b/acprep index ac009078..3ee47026 100755 --- a/acprep +++ b/acprep @@ -584,18 +584,19 @@ class PrepareBuild(CommandLineApp): ] self.log.info('Executing: ' + string.join(packages, ' ')) self.execute(*packages) - elif exists('/etc/redhat-release'): + + if exists('/etc/redhat-release'): release = open('/etc/redhat-release') - if issue.readline().startswith('CentOS'): + if release.readline().startswith('CentOS'): self.log.info('Looks like you are using YUM on CentOS') packages = [ - 'sudo', 'yum', 'install', 'gcc', 'make', - 'libtool', 'autoconf', 'automake', - 'zlib-devel', 'bzip2-devel', 'python-devel', - 'bboost-devel', + 'sudo', 'yum', 'install', 'gcc', 'gcc-c++', + 'compat-gcc-*', 'make', 'libtool', 'autoconf', + 'automake', 'zlib-devel', 'bzip2-devel', + 'python-devel', 'bboost-devel', 'gmp-devel', 'gettext-devel', #'mpfr-devel' - #'libedit-dev', + 'libedit-devel', 'cppunit-devel', #'texlive-full', #'doxygen', 'graphviz', 'texinfo', -- cgit v1.2.3