OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Thomas Lotterer Root: /v/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-registry Date: 12-May-2006 21:27:50 Branch: HEAD Handle: 2006051220274900 Modified files: openpkg-registry register.sh Log: get rid of hashpling options bash does not like; in case registry comes embedded with bootstrap rpm calles registry which in turn must avoid calling rpm early to circumvent infinite loop problems Summary: Revision Changes Path 1.32 +12 -3 openpkg-registry/register.sh ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-registry/register.sh ============================================================================ $ cvs diff -u -r1.31 -r1.32 register.sh --- openpkg-registry/register.sh 12 May 2006 14:20:35 -0000 1.31 +++ openpkg-registry/register.sh 12 May 2006 19:27:49 -0000 1.32 @@ -1,4 +1,4 @@ [EMAIL PROTECTED]@/lib/openpkg/bash --noprofile -x [EMAIL PROTECTED]@/lib/openpkg/bash ## ## register -- OpenPKG Registry Command-Line Client ## Copyright (c) 2000-2005 OpenPKG Foundation e.V. <http://openpkg.net/> @@ -108,8 +108,10 @@ REGISTRY_DESC="openpkg://${HOSTNAME}${PREFIX}" # advanced options -REGISTRY_PLAT="`$rpm --eval '%{l_platform -p}'`" -REGISTRY_OREL="`$rpm --eval '%{l_openpkg_release}'`" +# we are called from rpm URL rewrite wrapper, +# so defer PLAT and OREL lookup to avoid rpm loop +REGISTRY_PLAT="" +REGISTRY_OREL="" REGISTRY_UUID="$PREFIX/etc/openpkg/uuid" REGISTRY_CONF="$PREFIX/etc/openpkg/register.conf" REGISTRY_PREP="$PREFIX/etc/openpkg/register.prep" @@ -220,6 +222,13 @@ set -- "[EMAIL PROTECTED]" unset i a +# advanced options, lookup PLAT and OREL default for all modes +# but those called from rpm URL rewrite mapper +if [ $op != "printstatus" -a $op != "rewriteurls" ]; then + [ ".$REGISTRY_PLAT" = . ] && REGISTRY_PLAT="`$rpm --eval '%{l_platform -p}'`" + [ ".$REGISTRY_OREL" = . ] && REGISTRY_OREL="`$rpm --eval '%{l_openpkg_release}'`" +fi + # display error or usage message if [ ".$help" != .no ]; then if [ ".$help" != ".Usage" ]; then @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List openpkg-cvs@openpkg.org