summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2014-04-25 17:08:20 +0100
committerDaniel Baumann <mail@daniel-baumann.ch>2014-04-26 08:05:32 +0200
commitc3bd85f0de1a14544713fa442bea6e68327877cf (patch)
treefc40d4fbbae109b7b6d55fe074ffead361272a77
parent1867dc1e5296852f55132e0799b037dc2fc72d1a (diff)
downloadvyos-live-build-c3bd85f0de1a14544713fa442bea6e68327877cf.tar.gz
vyos-live-build-c3bd85f0de1a14544713fa442bea6e68327877cf.zip
Run hooks in sorted order (Closes: #745839).
glob.glob() returns files in filesystem order, which is unpredictable on many modern filesystems.
-rwxr-xr-xcomponents/binary-hooks2
-rwxr-xr-xcomponents/bootstrap-hooks2
-rwxr-xr-xcomponents/chroot-hooks2
-rwxr-xr-xcomponents/source-hooks2
4 files changed, 4 insertions, 4 deletions
diff --git a/components/binary-hooks b/components/binary-hooks
index 3e9cf07ca..d7bb4d7a7 100755
--- a/components/binary-hooks
+++ b/components/binary-hooks
@@ -80,7 +80,7 @@ def main():
hooks = glob.glob('config/hooks/*.hook') + glob.glob('config/hooks/*.hook.binary')
- for hook in hooks:
+ for hook in sorted(hooks):
if verbose:
print('I: Copying config/hooks/*.hook.binary to binary/live-build')
diff --git a/components/bootstrap-hooks b/components/bootstrap-hooks
index e27f1adee..9eaa5ea71 100755
--- a/components/bootstrap-hooks
+++ b/components/bootstrap-hooks
@@ -80,7 +80,7 @@ def main():
hooks = glob.glob('config/hooks/*.hook') + glob.glob('config/hooks/*.hook.bootstrap')
- for hook in hooks:
+ for hook in sorted(hooks):
if verbose:
print('I: Copying config/hooks/*.hook.bootstrap to chroot/live-build')
diff --git a/components/chroot-hooks b/components/chroot-hooks
index ab7bb25e0..a7a24816c 100755
--- a/components/chroot-hooks
+++ b/components/chroot-hooks
@@ -80,7 +80,7 @@ def main():
hooks = glob.glob('config/hooks/*.hook') + glob.glob('config/hooks/*.hook.chroot')
- for hook in hooks:
+ for hook in sorted(hooks):
if verbose:
print('I: Copying config/hooks/*.hook.chroot to chroot/live-build')
diff --git a/components/source-hooks b/components/source-hooks
index 32be58bed..672b53f3e 100755
--- a/components/source-hooks
+++ b/components/source-hooks
@@ -80,7 +80,7 @@ def main():
hooks = glob.glob('config/hooks/*.hook') + glob.glob('config/hooks/*.hook.source')
- for hook in hooks:
+ for hook in sorted(hooks):
if verbose:
print('I: Copying config/hooks/*.hook.source to source/live-build')