gpg2 requires --batch to use the --passphrase* arguments.

This was causing replica creation and installation to fail.

596446
This commit is contained in:
Rob Crittenden 2010-05-27 11:02:39 -04:00
parent 49b3d3ba0f
commit c67b47f9f6

View File

@ -190,7 +190,7 @@ def encrypt_file(source, dest, password, workdir = None):
#give gpg a fake dir so that we can leater remove all #give gpg a fake dir so that we can leater remove all
#the cruft when we clean up the tempdir #the cruft when we clean up the tempdir
os.mkdir(gpgdir) os.mkdir(gpgdir)
args = ['/usr/bin/gpg', '--homedir', gpgdir, '--passphrase-fd', '0', '--yes', '--no-tty', '-o', dest, '-c', source] args = ['/usr/bin/gpg', '--batch', '--homedir', gpgdir, '--passphrase-fd', '0', '--yes', '--no-tty', '-o', dest, '-c', source]
run(args, password) run(args, password)
except: except:
raise raise
@ -220,7 +220,7 @@ def decrypt_file(source, dest, password, workdir = None):
#give gpg a fake dir so that we can leater remove all #give gpg a fake dir so that we can leater remove all
#the cruft when we clean up the tempdir #the cruft when we clean up the tempdir
os.mkdir(gpgdir) os.mkdir(gpgdir)
args = ['/usr/bin/gpg', '--homedir', gpgdir, '--passphrase-fd', '0', '--yes', '--no-tty', '-o', dest, '-d', source] args = ['/usr/bin/gpg', '--batch', '--homedir', gpgdir, '--passphrase-fd', '0', '--yes', '--no-tty', '-o', dest, '-d', source]
run(args, password) run(args, password)
except: except:
raise raise