diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2010-06-29 10:41:50 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2010-06-29 10:41:50 +0200 |
commit | f67f54fa2412e68fc02c6048f7dcee6223ccbc18 (patch) | |
tree | 863e24494f53ea4c407f5180909cac7e68ac657b /db-update | |
parent | e2cc14311b1bfad0c30cef395a1a033cdef030c0 (diff) | |
download | dbscripts-f67f54fa2412e68fc02c6048f7dcee6223ccbc18.tar.gz dbscripts-f67f54fa2412e68fc02c6048f7dcee6223ccbc18.tar.xz |
don't mix db files of different arches
Diffstat (limited to 'db-update')
-rwxr-xr-x | db-update | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -153,7 +153,7 @@ for current_arch in ${ARCHES[@]}; do # copy the db file into our working area if [ -f "$ftppath/$reponame$DBEXT" ]; then - /bin/cp "$ftppath/$reponame$DBEXT" build/ + /bin/cp "$ftppath/$reponame$DBEXT" build/$reponame-$current_arch$DBEXT fi echo "Updating DB for $svnrepo" @@ -166,8 +166,9 @@ for current_arch in ${ARCHES[@]}; do if [ -n "$ADDPKGS" -o -n "$ANYPKGS" ]; then echo "==> Copying DB file from '$reponame'..." >&2 + if [ -f "$ftppath/$reponame$DBEXT" ]; then - /bin/cp "$ftppath/$reponame$DBEXT" build/ + /bin/cp "$ftppath/$reponame$DBEXT" build/$reponame-$current_arch$DBEXT fi pkgtotal=$(echo "$ADDPKGS $ANYPKGS" | wc -w) @@ -210,9 +211,9 @@ for current_arch in ${ARCHES[@]}; do pkgs="" for pkg in $to_add $to_add_any; do pkgs="$pkgs $(basename $pkg)"; done - /usr/bin/repo-add -q "$reponame$DBEXT" $pkgs + /usr/bin/repo-add -q "$reponame-$current_arch$DBEXT" $pkgs else - rm -f "build/$reponame$DBEXT" + rm -f "build/$reponame-$current_arch$DBEXT" echo "Errors found when adding packages" fi else @@ -250,7 +251,7 @@ for current_arch in ${ARCHES[@]}; do fi done fi - if ! /bin/cp "$WORKDIR/build/$reponame$DBEXT" "$ftppath/"; then + if ! /bin/cp "$WORKDIR/build/$reponame-$current_arch$DBEXT" "$ftppath/$reponame$DBEXT"; then die "failed to move repository $reponame-$current_arch". fi else |