Add preflight function (#5347)

* Add preflight function

* Add self.preflight section to Manual.md
This commit is contained in:
Ed Reel
2021-03-08 14:36:18 -06:00
committed by GitHub
parent 5c939324a4
commit c332b8ae4d
5 changed files with 15 additions and 1 deletions

View File

@@ -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
is built from source
# 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
system '#' # Replace '#' with a sed operation
end

1
crew
View File

@@ -740,6 +740,7 @@ def expand_dependencies
end
def resolve_dependencies
@pkg.preflight
expand_dependencies
# leave only not installed packages in dependencies

View File

@@ -1,6 +1,6 @@
# Defines common constants used in different parts of crew
CREW_VERSION = '1.7.10'
CREW_VERSION = '1.7.11'
ARCH_ACTUAL = `uname -m`.strip
# This helps with virtualized builds on aarch64 machines

View File

@@ -69,6 +69,11 @@ class Package
@is_fake
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.
def self.patch

View File

@@ -30,6 +30,11 @@ class Template < Package
# 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.
def self.patch