Mailinglist Archive: opensuse-buildservice (348 mails)

< Previous Next >
RE: [opensuse-buildservice] [PATCH 1/1 for build] Support remote repos (v2)
  • From: "Yang, Yi Y" <yi.y.yang@xxxxxxxxx>
  • Date: Fri, 9 Apr 2010 08:20:43 +0800
  • Message-id: <FC2FB65B4D919844ADE4BE3C2BB739AD1E0FD027@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Thanks a lot, I will check it.

-----Original Message-----
From: Ludwig Nussel [mailto:ludwig.nussel@xxxxxxx]
Sent: Thursday, April 08, 2010 9:58 PM
To: opensuse-buildservice@xxxxxxxxxxxx
Subject: Re: [opensuse-buildservice] [PATCH 1/1 for build] Support remote
repos
(v2)

Yi Yang wrote:
From effe07d4f90fc387d7bdd42db1507400e33c819f Mon Sep 17 00:00:00
2001
From: Yi Yang <yi.y.yang@xxxxxxxxx>
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@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >
References