[gnome-ostree] build: Canonicalize kernel name (bzImage -> vmlinuz)



commit e9d13c5d560b276f95455942ef087b6e47372046
Author: Colin Walters <walters verbum org>
Date:   Wed Jul 17 08:22:40 2013 -0400

    build: Canonicalize kernel name (bzImage -> vmlinuz)
    
    The OE packages use bzImage, but let's ignore that.

 src/js/tasks/task-build.js |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)
---
diff --git a/src/js/tasks/task-build.js b/src/js/tasks/task-build.js
index 7b2de20..b7cb331 100644
--- a/src/js/tasks/task-build.js
+++ b/src/js/tasks/task-build.js
@@ -947,10 +947,22 @@ const TaskBuild = new Lang.Class({
        let kernelPath = null;
        while ((info = e.next_file(cancellable)) != null) {
            let name = info.get_name();
-           if (name.indexOf('vmlinuz-') != 0)
-               continue;
-           kernelPath = e.get_child(info);
-           break;
+           let child = e.get_child(info);
+            if (name == 'bzImage' && info.get_file_type() == Gio.FileType.SYMBOLIC_LINK) {
+                GSystem.file_unlink(child, cancellable);
+                continue;
+            }
+            // Canonicalize kernel name
+           if (name.indexOf('bzImage-') == 0) {
+                let newname = name.replace('bzImage-', 'vmlinuz-');
+                let targetChild = e.get_container().get_child(newname);
+                GSystem.file_rename(child, targetChild, cancellable);
+               kernelPath = targetChild;
+                break;               
+            } else if (name.indexOf('vmlinuz-') == 0) {
+                kernelPath = child;
+               break;
+            }
        }
        e.close(cancellable);
        if (kernelPath === null)


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