[dak/master] Move archive dedup into an own dinstall function
---
config/debian/dinstall.functions | 15 ++++++++++++++-
config/debian/dinstall.tasks | 1 +
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/config/debian/dinstall.functions b/config/debian/dinstall.functions
index fe5d268..6976a59 100755
--- a/config/debian/dinstall.functions
+++ b/config/debian/dinstall.functions
@@ -227,6 +227,20 @@ function dakcleanup() {
dak clean-queues -i "$unchecked"
}
+function dedup() {
+ log "Dedupe archive"
+ dak archive-dedup-pool
+ for archive in "${public_archives[@]}"; do
+ archiveroot="$(get_archiveroot "${archive}")"
+ cd "${archiveroot}"
+ for dir in doc indices project tools; do
+ if [[ -d ${dir} ]]; then
+ jdupes --hardlink --noempty --quiet --summarize --recurse ${dir}
+ fi
+ done
+ done
+}
+
function mklslar() {
local archiveroot
local FILENAME=ls-lR
@@ -431,7 +445,6 @@ function mkchecksums() {
${bindir}/dsync-flist -q generate $dsynclist --exclude $dsynclist --md5
${bindir}/dsync-flist -q md5sums $dsynclist | gzip -9n > ${md5list}.gz
done
- dak archive-dedup-pool
}
function mirror() {
diff --git a/config/debian/dinstall.tasks b/config/debian/dinstall.tasks
index 0a2950e..adf9183 100644
--- a/config/debian/dinstall.tasks
+++ b/config/debian/dinstall.tasks
@@ -32,6 +32,7 @@ copyoverrides none copyoverrides tru
mklslar none mklslar true false
mkfilesindices none mkfilesindices true false
mkchecksums none mkchecksums true false
+dedup none dedup true false
signotherfiles none signotherfiles true false
mirror none mirror\ hardlinks true false
NOSTAGE remove_locks none false false
--
2.1.4
Reply to: