diff --git a/srcpkgs/linux4.14/patches/python3.patch b/srcpkgs/linux4.14/patches/python3.patch new file mode 100644 index 00000000000..727fd2fb8e9 --- /dev/null +++ b/srcpkgs/linux4.14/patches/python3.patch @@ -0,0 +1,81 @@ +--- a/scripts/show_delta ++++ b/scripts/show_delta +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # + # show_deltas: Read list of printk messages instrumented with + # time data, and format with time deltas. +@@ -13,7 +13,7 @@ + import string + + def usage(): +- print ("""usage: show_delta [] ++ print("""usage: show_delta [] + + This program parses the output from a set of printk message lines which + have time data prefixed because the CONFIG_PRINTK_TIME option is set, or +@@ -46,8 +46,8 @@ + raise ValueError + + # split on closing bracket +- (time_str, rest) = string.split(line[1:],']',1) +- time = string.atof(time_str) ++ (time_str, rest) = line[1:].split(']',1) ++ time = float(time_str) + + #print "time=", time + return (time, rest) +@@ -94,11 +94,11 @@ + try: + lines = open(filein,"r").readlines() + except: +- print ("Problem opening file: %s" % filein) ++ print("Problem opening file: %s" % filein) + sys.exit(1) + + if base_str: +- print ('base= "%s"' % base_str) ++ print('base= "%s"' % base_str) + # assume a numeric base. If that fails, try searching + # for a matching line. + try: +@@ -111,18 +111,18 @@ + (time, rest) = get_time(line) + except: + continue +- if string.find(rest, base_str)==1: ++ if rest.find(base_str)==1: + base_time = time + found = 1 + # stop at first match + break + if not found: +- print ('Couldn\'t find line matching base pattern "%s"' % base_str) ++ print('Couldn\'t find line matching base pattern "%s"' % base_str) + sys.exit(1) + else: + base_time = 0.0 + + for line in lines: +- print (convert_line(line, base_time),) ++ print(convert_line(line, base_time)) + + main() +--- a/scripts/tracing/draw_functrace.py ++++ b/scripts/tracing/draw_functrace.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + """ + Copyright 2008 (c) Frederic Weisbecker +@@ -123,7 +123,7 @@ + tree = tree.getParent(caller) + tree = tree.calls(callee, calltime) + +- print CallTree.ROOT ++ print(CallTree.ROOT) + + if __name__ == "__main__": + main() diff --git a/srcpkgs/linux4.14/template b/srcpkgs/linux4.14/template index b8ae2c72298..7d74947b0b9 100644 --- a/srcpkgs/linux4.14/template +++ b/srcpkgs/linux4.14/template @@ -11,7 +11,7 @@ distfiles="https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-${version%.*}.tar. checksum="f81d59477e90a130857ce18dc02f4fbe5725854911db1e7ba770c7cd350f96a7 941c34f4a5c438bbb1b0ab5ee84b8075acf9c4d3843697259e980def08c6a839" skip_extraction="patch-${version}.xz" -python_version=2 #unverified +python_version=3 nodebug=yes # -dbg package is generated below manually nostrip=yes