[PATCH] rteval-cmd: If no kernel version is provided to -S/--source-download, download default kernel version

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Previously, the usuage was "./rteval-cmd -S [KERNEL_VERSION]", and
rteval-cmd would throw an error if no kernel version was provided.
Now, rteval-cmd will download the default kernel version, as specified
in rteval/modules/loads/kcompile.py.

Signed-off-by: Anubhav Shelat <ashelat@xxxxxxxxxx>
---
 rteval-cmd | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/rteval-cmd b/rteval-cmd
index cf9326e7dfdd..cbba9cd2e451 100755
--- a/rteval-cmd
+++ b/rteval-cmd
@@ -168,11 +168,13 @@ def parse_options(cfg, parser, cmdargs):
                       help='print rteval version and exit')
     # if the -S/--source-download option doesn't include the version, set version to default
     ind = None
-    if sys.argv.count("-S") > 0: ind = sys.argv.index("-S")
-    elif sys.argv.count("--source-download") > 0: ind = sys.argv.index("--source-download")
+    if sys.argv.count("-S") > 0:
+        ind = sys.argv.index("-S")
+    elif sys.argv.count("--source-download") > 0:
+        ind = sys.argv.index("--source-download")
     if ind != None:
-        if ind+1 == len(sys.argv): 
-            sys.argv.insert(ind+1, ModuleParameters()["source"]["default"].strip(".tar.xz"))
+        if ind+1 == len(sys.argv):
+            sys.argv.insert(ind+1, ModuleParameters()["source"]["default"].replace(".tar.xz", ""))
         cmdargs.append(sys.argv[ind+1])
 
     parser.add_option("-S", "--source-download", dest="rteval___srcdownload",
-- 
2.31.1




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux