diff options
author | Nicolas Vigier <boklm@mageia.org> | 2011-10-27 22:52:45 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2011-10-27 22:52:45 +0000 |
commit | 98f202f9f92f1523b7f3e908858fc7370a842292 (patch) | |
tree | 22ab0eca555a7c6fe44382c66884b31b92742298 /functions | |
parent | 17b1505ddd062af322161b82bd29a0eace736115 (diff) | |
download | repoctl-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-- | functions | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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 } |