Yi Yang wrote:
From effe07d4f90fc387d7bdd42db1507400e33c819f Mon Sep 17 00:00:00 2001 From: Yi Yang
Date: Fri, 2 Apr 2010 14:57:59 +0800 Subject: [PATCH] Support remote repos
Thanks, I've applied it with minor corrections (unexpand tabs). Some comments though...
+test -z "$CACHE_DIR" && CACHE_DIR=/var/cache/build
Things like that should be the other way around, ie test -n "$CACHE_DIR" || CACHE_DIR=/var/cache/build in order to enable use of set -e in the future. One can also bash magic : ${CACHE_DIR:=/var/cache/build}
+ elif [ "${SRC#http://}" != "$SRC" ]; then + mkdir -p "$(getcachedir "$SRC")" + set -- env CACHE_DIR="$CACHE_DIR" $BUILD_DIR/createrepomddeps "$SRC"
createrepomddeps already has command line option handling so this could be passed as command line option instead.
- ln -s "$SRC" "$BUILD_ROOT/.init_b_cache/rpms/$PKG.${SRC##*.}" + if [ "${SRC:0:7}" == "http://" ] ; then + target_file=$(get_pkg_filename "$SRC") + ln -s "$target_file" "$BUILD_ROOT/.init_b_cache/rpms/$PKG.${SRC##*.}" + else + ln -s "$SRC" "$BUILD_ROOT/.init_b_cache/rpms/$PKG.${SRC##*.}" + fi
Things should work without that change I think as downloadpkg modifies $SRC. cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.de/ SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org