summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdb-move17
-rwxr-xr-xdb-update16
-rw-r--r--test/lib/common.inc2
3 files changed, 15 insertions, 20 deletions
diff --git a/db-move b/db-move
index 407027a..8609459 100755
--- a/db-move
+++ b/db-move
@@ -74,16 +74,15 @@ if [ -d "$packagebase/repos/$svnrepo_from" ]; then
_pkgfiles=''
for i in ${pkgname[@]}; do
- _pkgpath=$(getpkgfile "$ftppath_from/${_arch}/"$i-$pkgver-$pkgrel-$_arch$PKGEXT)
- _pkgfile=$(basename "${_pkgpath}")
-
- # copy package to pool if needed
- # TODO: can be removed once every package has benn moved to the package pool
- if [ ! -f $FTP_BASE/$(get_pkgpool_for_host)/${_arch}/$_pkgfile ]; then
- cp $_pkgpath $FTP_BASE/$(get_pkgpool_for_host)/${_arch}/
- fi
-
for _tarch in ${_tarches[@]}; do
+ _pkgpath=$(getpkgfile "$ftppath_from/${_tarch}/"$i-$pkgver-$pkgrel-$_arch$PKGEXT)
+ _pkgfile=$(basename "${_pkgpath}")
+
+ # copy package to pool if needed
+ # TODO: can be removed once every package has been moved to the package pool
+ if [ ! -f $FTP_BASE/$(get_pkgpool_for_host)/${_arch}/$_pkgfile ]; then
+ cp $_pkgpath $FTP_BASE/$(get_pkgpool_for_host)/${_arch}/
+ fi
ln -s "../../../$(get_pkgpool_for_host)/${_arch}/${_pkgfile}" $ftppath_to/${_tarch}/
done
diff --git a/db-update b/db-update
index f05246b..9e641d2 100755
--- a/db-update
+++ b/db-update
@@ -223,7 +223,7 @@ for current_arch in ${ARCHES[@]}; do
# if non empty, move all build dirs
if [ $(/bin/ls "$WORKDIR/build/" 2>/dev/null | wc -l) != 0 ]; then
if [ $(getpkgfiles "$WORKDIR/build/"*-$current_arch$PKGEXT 2>/dev/null | wc -l) != 0 ]; then
- echo "Copying new files to '$ftppath'"
+ echo "Copying new files to '$poolpath' and symlinking"
for f in "$WORKDIR/build/"*-$current_arch$PKGEXT; do
/bin/chmod 664 "$f" &>/dev/null
if ! /bin/cp "$f" "$poolpath/"; then
@@ -236,20 +236,14 @@ for current_arch in ${ARCHES[@]}; do
done
fi
if [ $(getpkgfiles "$WORKDIR/build/"*-any$PKGEXT 2>/dev/null | wc -l) != 0 ]; then
- echo "Copying new files to '$ftppath_any' and symlinking"
+ echo "Copying new files to '$poolpath_any' and symlinking"
for f in "$WORKDIR/build/"*-any$PKGEXT; do
/bin/chmod 664 "$f" &>/dev/null
fname="$(basename $f)"
- if [ ! -f "$poolrel_any/$fname" ]; then
- if ! /bin/cp "$f" "$poolpath_any/"; then
- die "error: failure while copying files to $poolpath_any"
- fi
- fi
- if [ ! -f "$ftppath_any/$fname" ]; then
- if ! ln -s "$poolrel_any/$fname" "$ftppath_any/$fname"; then
- die "error: failure symlinking $fname to $ftppath_any"
- fi
+ if ! /bin/cp "$f" "$poolpath_any/"; then
+ die "error: failure while copying files to $poolpath_any"
fi
+
if ! ln -s "$poolrel_any/$fname" "$ftppath/$fname"; then
die "error: failure symlinking $fname to $ftppath"
fi
diff --git a/test/lib/common.inc b/test/lib/common.inc
index 3ba715e..4080c38 100644
--- a/test/lib/common.inc
+++ b/test/lib/common.inc
@@ -91,6 +91,8 @@ checkAnyPackage() {
[ -f "${STAGING}"/${repo}/${pkg} ] && fail "${repo}/${pkg} found in staging dir"
bsdtar -xf "${FTP_BASE}/${repo}/os/${arch}/${repo}.db.tar.gz" -O | grep -q ${pkg} || fail "${pkg} not in ${repo}/os/${arch}/${repo}.db.tar.gz"
+
+ [ -f "${FTP_BASE}/${repo}/os/any/${pkg}" ] && fail "${repo}/os/any/${pkg} should not exist"
}
checkPackage() {