Commit c332b8ae authored by Ed Reel's avatar Ed Reel Committed by GitHub

Add preflight function (#5347)

* Add preflight function

* Add self.preflight section to Manual.md
parent 5c939324
...@@ -108,6 +108,9 @@ class Template < Package # Notice the capitals, EG: 'I3' - would be used for an ...@@ -108,6 +108,9 @@ class Template < Package # Notice the capitals, EG: 'I3' - would be used for an
depends_on '#' => :build # Only required when the package depends_on '#' => :build # Only required when the package
is built from source is built from source
# Notice the newline # Notice the newline
def self.preflight # For preflight checks, not required
system '#' # Replace '#' with a disk space check, for example
end
def self.prebuild # For sed operations, not required def self.prebuild # For sed operations, not required
system '#' # Replace '#' with a sed operation system '#' # Replace '#' with a sed operation
end end
......
...@@ -740,6 +740,7 @@ def expand_dependencies ...@@ -740,6 +740,7 @@ def expand_dependencies
end end
def resolve_dependencies def resolve_dependencies
@pkg.preflight
expand_dependencies expand_dependencies
# leave only not installed packages in dependencies # leave only not installed packages in dependencies
......
# Defines common constants used in different parts of crew # Defines common constants used in different parts of crew
CREW_VERSION = '1.7.10' CREW_VERSION = '1.7.11'
ARCH_ACTUAL = `uname -m`.strip ARCH_ACTUAL = `uname -m`.strip
# This helps with virtualized builds on aarch64 machines # This helps with virtualized builds on aarch64 machines
......
...@@ -69,6 +69,11 @@ class Package ...@@ -69,6 +69,11 @@ class Package
@is_fake @is_fake
end end
# Function to perform pre-flight operations prior to dependency checks.
def self.preflight
end
# Function to perform patch operations prior to build from source. # Function to perform patch operations prior to build from source.
def self.patch def self.patch
......
...@@ -30,6 +30,11 @@ class Template < Package ...@@ -30,6 +30,11 @@ class Template < Package
# depends_on '*' # depends_on '*'
# #
# Function to perform pre-flight operations prior to dependency checks.
def self.preflight
end
# Function to perform patch operations prior to build from source. # Function to perform patch operations prior to build from source.
def self.patch def self.patch
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment