aboutsummaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2011-10-27 22:52:45 +0000
committerNicolas Vigier <boklm@mageia.org>2011-10-27 22:52:45 +0000
commit98f202f9f92f1523b7f3e908858fc7370a842292 (patch)
tree22ab0eca555a7c6fe44382c66884b31b92742298 /functions
parent17b1505ddd062af322161b82bd29a0eace736115 (diff)
downloadrepoctl-98f202f9f92f1523b7f3e908858fc7370a842292.tar
repoctl-98f202f9f92f1523b7f3e908858fc7370a842292.tar.gz
repoctl-98f202f9f92f1523b7f3e908858fc7370a842292.tar.bz2
repoctl-98f202f9f92f1523b7f3e908858fc7370a842292.tar.xz
repoctl-98f202f9f92f1523b7f3e908858fc7370a842292.zip
add locks
Diffstat (limited to 'functions')
-rw-r--r--functions10
1 files changed, 9 insertions, 1 deletions
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
}