forked from Mirror/pmbootstrap
build: package: don't copy files that are in .gitignore (MR 2252)
This avoids copying local build artifacts and other things, if they're in .gitignore then abuild shouldn't need them anyway. Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
parent
19a54ee0d6
commit
91d29a1b2a
1 changed files with 6 additions and 1 deletions
|
@ -159,7 +159,12 @@ def override_source(apkbuild, pkgver, src, chroot: Chroot=Chroot.native()):
|
|||
fetch() {
|
||||
# Update source copy
|
||||
msg "Copying source from host system: """ + src + """\"
|
||||
rsync -a --exclude=".git/" --delete --ignore-errors --force \\
|
||||
local exclude_from=\"""" + mount_path + """/.gitignore\"
|
||||
local rsync_args=""
|
||||
if [ -f "$exclude_from" ]; then
|
||||
rsync_args="--exclude-from=\"$exclude_from\""
|
||||
fi
|
||||
rsync -a --exclude=".git/" $rsync_args --delete --ignore-errors --force \\
|
||||
\"""" + mount_path + """\" "$_pmb_src_copy" || true
|
||||
|
||||
# Link local source files (e.g. kernel config)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue