mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +00:00
Place debootstrap excludes file in workspace instead of tmp
This commit is contained in:
parent
52c05e5df6
commit
2923f25767
2 changed files with 3 additions and 1 deletions
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
extract_dpkg_deb_data () {
|
extract_dpkg_deb_data () {
|
||||||
local pkg="$1"
|
local pkg="$1"
|
||||||
local excludes_file="/tmp/bootstrap-vz-excludes-$$"
|
local excludes_file="DEBOOTSTRAP_EXCLUDES_PATH"
|
||||||
# List all files in $pkg and run them through the filter (avoid exit status >0 if no matches are found)
|
# List all files in $pkg and run them through the filter (avoid exit status >0 if no matches are found)
|
||||||
dpkg-deb --fsys-tarfile "$pkg" | tar -t | BOOTSTRAP_FILES_FILTER_PATH > "$excludes_file" || true
|
dpkg-deb --fsys-tarfile "$pkg" | tar -t | BOOTSTRAP_FILES_FILTER_PATH > "$excludes_file" || true
|
||||||
dpkg-deb --fsys-tarfile "$pkg" | tar --exclude-from "$excludes_file" -xf -
|
dpkg-deb --fsys-tarfile "$pkg" | tar --exclude-from "$excludes_file" -xf -
|
||||||
|
|
|
@ -43,10 +43,12 @@ class CreateBootstrapFilterScripts(Task):
|
||||||
|
|
||||||
bootstrap_script = os.path.join(info.workspace, 'bootstrap_script.sh')
|
bootstrap_script = os.path.join(info.workspace, 'bootstrap_script.sh')
|
||||||
filter_script = os.path.join(info.workspace, 'bootstrap_files_filter.sh')
|
filter_script = os.path.join(info.workspace, 'bootstrap_files_filter.sh')
|
||||||
|
excludes_file = os.path.join(info.workspace, 'debootstrap-excludes')
|
||||||
|
|
||||||
shutil.copy(os.path.join(assets, 'bootstrap-script.sh'), bootstrap_script)
|
shutil.copy(os.path.join(assets, 'bootstrap-script.sh'), bootstrap_script)
|
||||||
shutil.copy(os.path.join(assets, 'bootstrap-files-filter.sh'), filter_script)
|
shutil.copy(os.path.join(assets, 'bootstrap-files-filter.sh'), filter_script)
|
||||||
|
|
||||||
|
sed_i(bootstrap_script, r'DEBOOTSTRAP_EXCLUDES_PATH', excludes_file)
|
||||||
sed_i(bootstrap_script, r'BOOTSTRAP_FILES_FILTER_PATH', filter_script)
|
sed_i(bootstrap_script, r'BOOTSTRAP_FILES_FILTER_PATH', filter_script)
|
||||||
|
|
||||||
# We exclude with patterns but include with fixed strings
|
# We exclude with patterns but include with fixed strings
|
||||||
|
|
Loading…
Add table
Reference in a new issue