aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'snapshots-create.sh')
-rwxr-xr-xsnapshots-create.sh26
1 files changed, 25 insertions, 1 deletions
diff --git a/snapshots-create.sh b/snapshots-create.sh
index 9b2cbe7..66873fa 100755
--- a/snapshots-create.sh
+++ b/snapshots-create.sh
@@ -85,11 +85,35 @@ cd ${TEMP}
# create the tarball and move it to the right location
write_time_log "START TARBALL $(date -u)"
if [ ! -f "${FILENAME%.bz2}" ]; then
+ # Build exclusion list
+ # app-bar/ChangeLog is a valid package name, so we have to be careful about it!
+ EXCLUSION_LIST="$(mktemp -p ${TEMP} snapshot-exclude.XXXXXXXXXX)"
+ find "${MASTER}" \
+ \( \
+ -type f \
+ -regextype posix-egrep \
+ \( \
+ -path "${MASTER}/eclass/ChangeLog*" -o \
+ -path "${MASTER}/profiles/ChangeLog*" -o \
+ -path "${MASTER}/profiles/*/ChangeLog*" -o \
+ -regex "${MASTER}/[^/]+/[^/]+/ChangeLog(-[0-9]+)?$" \
+ \) \
+ \) \
+ -o \
+ -name '.checksum-test-marker' \
+ \
+ | sed "s,${MASTER}/*,,g" \
+ \
+ | sort \
+ \
+ >"${EXCLUSION_LIST}"
+
# Build a directory of stuff to tar up.
rm -rf portage
rsync -Wqa \
"$MASTER"/ \
- portage/
+ portage/ \
+ --exclude-from "${EXCLUSION_LIST}"
if [ $? -ne 0 ]; then
echo "rsync run failed!"
exit 1