Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Add pragma user_version to the backups so that it can be easily loaded back
Baptiste Daroussin committed 11 years ago
commit 464e4bd855da03fd1577eb795c55a9e00494df43
parent 4dc33ef
1 file changed +5 -1
modified scripts/periodic/411.pkg-backup.in
@@ -10,6 +10,10 @@ fi

rc=0

+
do_dump() {
+
	echo "pragma user_version=" $(${pkgcmd} ${pkgargs} shell "pragma user_version")";"
+
	${pkgcmd} ${pkgargs} shell .dump
+
}

backup_pkg() {
	local pkgargs="$1"
@@ -19,7 +23,7 @@ backup_pkg() {
	[ -e "${bak_file}" ] && \
		mv -f "${bak_file}" "${bak_file}.2"

-
	if ${pkgcmd} ${pkgargs} shell .dump | xz -c > ${bak_file}; then
+
	if do_dump | xz -c > ${bak_file}; then
		rc=0
	else
		rc=3