# vi: encoding=utf-8 ts=8 sts=4 sw=4 et
+from __future__ import print_function
+
import sys
import os
import atexit
continue
else:
try:
- print "error.errno: %s" % str(error.errno)
+ print("error.errno: %s" % str(error.errno))
except Exception, e:
- print "error.errno: exception %s" % e
+ print("error.errno: exception %s" % e)
try:
- print "error.reason %s" % str(error.reason)
+ print("error.reason %s" % str(error.reason))
except Exception, e:
- print "error.reason exception %s" % e
+ print("error.reason exception %s" % e)
raise
o = chroot.popen("cat > %s" % b.src_rpm, mode = "w")
#!/usr/bin/python
+from __future__ import print_function
+
import argparse
import collections
import os
gitproc.wait()
out = gitproc.stdout.read().strip("\n'")
if verbose:
- print ' '.join(command)
+ print(' '.join(command))
if not quiet:
- print out
+ print(out)
if gitproc.returncode != 0:
if quiet:
- print out
- print '\nError running command: \n'
- print ' '.join(command)
+ print(out)
+ print('\nError running command: \n')
+ print(' '.join(command))
return (False, None)
return (True, out)
rev_branch = run_command(["/usr/bin/git", "-C", gitdir, "rev-parse", branch], verbose=verbose)
rev_head = run_command(["/usr/bin/git", "-C", gitdir, "rev-parse", "HEAD"], verbose=verbose)
if rev_branch[1] != rev_head[1]:
- print "Error: cannot checkout " + name
+ print("Error: cannot checkout " + name)
return None
run_command(["/usr/bin/git", "-C", gitdir, "merge", "--ff-only", "@{upstream}"], verbose=verbose)
run_command(shlex.split(command), verbose=args.verbose, quiet=False)
raw_input('\nPress Enter after src builder updates kernel packages...')
- print '\nCurrent kernels versions:'
+ print('\nCurrent kernels versions:')
all_kernels = set()
for kernel_list in packages.values():
all_kernels.update(kernel_list)
branch = 'master'
if kernel != 'head':
branch = 'LINUX_%s' % kernel.replace('.','_')
- print '%s: %s' % (kernel, get_last_tag('kernel', 'kernel.spec', branch, dist=args.dist, kernel=kernel, verbose=args.verbose))
+ print('%s: %s' % (kernel, get_last_tag('kernel', 'kernel.spec', branch, dist=args.dist, kernel=kernel, verbose=args.verbose)))
for pkg, kernels in packages.iteritems():
try:
if not args.head:
tag = get_last_tag(name, spec, branch, dist=args.dist, verbose=args.verbose)
if not tag:
- print "Failed getching last autotag for %s!" % pkg
+ print("Failed getching last autotag for %s!" % pkg)
continue
spec = '%s:%s' % (spec, tag)
command = ("%s -nd %s -d %s --define 'build_kernels %s' --without userspace %s" %