- 2A837416675B312ACFFBE3DF80D0B0D099D1D9F2768148476D31E25502B20AB0713A8110B4F4A97455ECC29A444CD8E92F03534211307A9AE5A5595DCB1F0AD2+ DB0CA7AC7165B1891D3413F91D1ACF36C0AEDAE0D410F7727B719E21DD85A3EC4D10181800AC8AE8A140EE49C0133D7FA956069464D7D8B7F89143A6553430AFv/v.py(1 . 4)(1 . 4)
11 #!/usr/bin/python
12 #!/usr/bin/env python
13
14 ##############################################################################
15 # Quick Intro:
(15 . 10)(15 . 10)
17
18 ##############################################################################
19
20 import os, sys, shutil, argparse, re, tempfile, gnupg
21 import os, sys, shutil, argparse, re, tempfile, gnupg, subprocess
22
23 ##############################################################################
24 vver = 100 # This program's Kelvin version.
25 vver = 98 # This program's Kelvin version.
26
27 ## HOW YOU CAN HELP: ##
28
(59 . 6)(59 . 7)
30 return sorted
31 ##############################################################################
32
33 vpatch_path = "vpatch"
34 verbose = False
35
36 def fatal(msg):
(202 . 10)(203 . 24)
38 print "Pressing using head: {0} to path: '{1}'".format(args.head, args.dest)
39 headpos = patches.index(args.head)
40 seq = patches[:headpos + 1]
41 os.mkdir(args.dest)
42 if os.path.exists(args.dest):
43 print "Warning: target {0} already exists".format(args.dest)
44 else:
45 os.mkdir(args.dest)
46 for p in seq:
47 print "Using: {0}".format(disp_vp(p))
48 os.system("patch -E --dir {0} -p1 < {1}".format(args.dest, p))
49 out = subprocess.Popen([vpatch_path], cwd=args.dest, stdin=subprocess.PIPE,
50 stdout=subprocess.PIPE, stderr=subprocess.PIPE)
51 with open(p, "r") as inp:
52 body = inp.read()
53 stdout, stderr = out.communicate(body)
54 print stdout,
55 if out.returncode != 0:
56 fatal(("-----------------------------------\n" +
57 "There was an error while pressing:\n" +
58 "{0}\n" +
59 "Result in {1} might be in an invalid state!\n" +
60 "-----------------------------------").format(stderr.strip(), args.dest))
61 print "Completed Pressing using head: {0} to path: '{1}'".format(args.head, args.dest)
62
63 # Command: Origin.
(317 . 9)(332 . 15)
65 name = handle[k['fingerprint']]
66 if args.fingers:
67 name += '-' + k['keyid']
68 uids = ', '.join(map(str, k['uids']))
69 pubkeys[k['keyid']] = {'fp':k['fingerprint'],
70 'id':', '.join(map(str, k['uids'])),
71 'id':uids,
72 'handle':name}
73 for subkey in k.get('subkeys', []):
74 keyid, fingerprint = subkey[0], subkey[2]
75 pubkeys[keyid] = {'fp':fingerprint,
76 'id':uids,
77 'handle':name}
78
79 # Validate seals
80 for p in pfiles: