[gnome-ostree] build: Delete /.python-history if it exists



commit 77a533b78242ad7fa5d87cb49ddd4c46fc563f5d
Author: Colin Walters <walters verbum org>
Date:   Thu Sep 5 17:36:32 2013 -0400

    build: Delete /.python-history if it exists
    
    This started being generated recently, not sure why.  Possibly our use
    of usr/bin/env python in the systemd trigger?  Anyways, let's nuke it.

 src/js/tasks/task-build.js |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/js/tasks/task-build.js b/src/js/tasks/task-build.js
index b70738f..cac607c 100644
--- a/src/js/tasks/task-build.js
+++ b/src/js/tasks/task-build.js
@@ -1151,6 +1151,14 @@ const TaskBuild = new Lang.Class({
                                       cancellable);
     },
 
+    _cleanupGarbage: function(rootdir, cancellable) {
+       // Something is injecting this; probably from the triggers?
+       // Just nuke it.
+       let f = rootdir.get_child('.python-history');
+       if (f.query_exists(null))
+           GSystem.file_unlink(f, cancellable);
+    },
+
     execute: function(cancellable) {
 
        this._linuxUserChrootPath = BuildUtil.findUserChrootPath();
@@ -1457,6 +1465,7 @@ const TaskBuild = new Lang.Class({
                                               let kernelInitramfsData = archInitramfsImages[architecture];
                                               this._installKernelAndInitramfs(kernelInitramfsData, 
composeRootdir, cancellable);
                                               composeTreeTaskCount++;
+                                              this._cleanupGarbage(composeRootdir, cancellable);
                                               this._commitComposedTreeAsync(runtimeTargetName, 
composeRootdir, cancellable,
                                                                             Lang.bind(this, function(result, 
err) {
                                                                                 if (err) {


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