From 98f202f9f92f1523b7f3e908858fc7370a842292 Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Thu, 27 Oct 2011 22:52:45 +0000 Subject: add locks --- functions | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/functions b/functions index e7d9bc4..1e36b6e 100644 --- a/functions +++ b/functions @@ -191,7 +191,13 @@ function move_pkg_files() local fname=$(rpm -qp --qf '%{SOURCERPM}' "$file") if [ a"$fname" = a"$srcpkg" ] then - $dryrun mv -v -f "$file" "$destdir" >> "$output" + local bn=$(basename "$file") + get_repo_lock "$dst_distrorelease" "$dst_section" "$dst_sectionrepo" + $dryrun ln -v "$file" "$destdir/$bn" >> "$output" + rm_repo_lock "$dst_distrorelease" "$dst_section" "$dst_sectionrepo" + get_repo_lock "$src_distrorelease" "$src_section" "$src_sectionrepo" + $dryrun rm -f -v "$file" >> "$output" + rm_repo_lock "$src_distrorelease" "$src_section" "$src_sectionrepo" fi done } @@ -211,7 +217,9 @@ function del_pkg_files() local fname=$(rpm -qp --qf '%{SOURCERPM}' "$file") if [ a"$fname" = a"$srcpkg" ] then + get_repo_lock "$distrorelease" "$section" "$sectionrepo" $dryrun rm -v -f "$file" >> "$output" + rm_repo_lock "$distrorelease" "$section" "$sectionrepo" fi done } -- cgit v1.2.1