From 54c0e197717841e6df562b68d75500f38e286745 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Fri, 12 Jun 2009 18:01:08 +0200 Subject: [PATCH] Renamed option 'checkout' to 'treeish'. --- testing/lib/kernel_config.rb | 11 ++++++----- testing/lib/strongswan_config.rb | 10 +++++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/testing/lib/kernel_config.rb b/testing/lib/kernel_config.rb index deb609655f..913f04f492 100644 --- a/testing/lib/kernel_config.rb +++ b/testing/lib/kernel_config.rb @@ -39,7 +39,7 @@ module Dumm @source_path = config.path unless @source == :dir raise "'#{@source_path} is not a git repository!" unless Testing.git?(@source_path) - @checkout = config.checkout if Testing.git_tree?(@source_path, config.checkout) + @treeish = config.treeish if Testing.git_tree?(@source_path, config.treeish) end when :tar raise "Tarball '#{config.path}' not found!" unless Testing.tarball?(config.path) @@ -57,8 +57,8 @@ module Dumm build_path = @source_path case @source when :git - if @checkout - tarball = Testing.archive_git(@source_path, @checkout, "kernel-#{@name}", Testing.build_dir) + if @treeish + tarball = Testing.archive_git(@source_path, @treeish, "kernel-#{@name}", Testing.build_dir) build_path = Testing.extract_tarball(tarball, Testing.build_dir) end when :tar @@ -95,7 +95,8 @@ module Dumm end end - # Ensure that we have a kernel config. + # Ensure that we have a kernel config. Either set in the configuration + # or found in the given dir. def ensure_config(dir) config = File.join(dir, ".config") @config ||= config @@ -106,7 +107,7 @@ module Dumm # Build the kernel and move it to the given location. def build_kernel(dir, kernel) Dir.chdir(dir) do - # TODO what about logging + # TODO what about logging and error handling `make clean ARCH=um 2>&1` # the next command might interact with the user. since '`' redirects # stdout we would have to use 'system'. currently we use 'yes' to diff --git a/testing/lib/strongswan_config.rb b/testing/lib/strongswan_config.rb index 4eeda1ada4..fbb9d427e0 100644 --- a/testing/lib/strongswan_config.rb +++ b/testing/lib/strongswan_config.rb @@ -32,7 +32,7 @@ module Dumm @source_path = config.path unless @source == :dir raise "'#{@source_path} is not a git repository!" unless Testing.git?(@source_path) - @checkout = config.checkout if Testing.git_tree?(@source_path, config.checkout) + @treeish = config.treeish if Testing.git_tree?(@source_path, config.treeish) end when :tar raise "Tarball '#{config.path}' not found!" unless config.path && Testing.tarball?(config.path) @@ -50,8 +50,8 @@ module Dumm @build_path = File.join(Testing.build_dir, "strongswan-#{name}") case @source when :git - if @checkout - tarball = Testing.archive_git(@source_path, @checkout, "strongswan-#{@name}", Testing.build_dir) + if @treeish + tarball = Testing.archive_git(@source_path, @treeish, "strongswan-#{@name}", Testing.build_dir) @source_path = @build_path = Testing.extract_tarball(tarball, Testing.build_dir) end when :tar @@ -76,8 +76,8 @@ module Dumm private # Run the configure script located in directory 'sources' within the - # directory given as 'build'. autogen.sh is run if configure does not yet - # exist. + # directory given as 'build'. autogen.sh is run if configure does not + # yet exist. def configure(sources, build) script = File.join(sources, "configure") unless File.executable?(script) -- 2.47.2