diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-04-04 19:23:22 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-04-04 19:23:22 +0200 |
commit | d4993229956a3510acd19045931fea05107a1209 (patch) | |
tree | 0252e4423367a6c62a62fd81492307e28342a5e7 /bin/pkg | |
parent | e23aa1e977226df5b4c61200b7704567cbb86e35 (diff) |
pkg: Do not rely on the core repo being not bare
list_update_remote: Use $PKGLIST_PATH as location for the pkglist script.
Attention: this change is not backwards-compatible
Diffstat (limited to 'bin/pkg')
-rwxr-xr-x | bin/pkg | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -159,10 +159,13 @@ if [[ $PKG_PROTO == 'ssh' ]] { PKG_PATH=$PKG_ROOT } +: ${PKGLIST_PATH:=$PKG_PATH/pkglist} + debug "PKG_ROOT: '$PKG_ROOT'" debug "PKG_PROTO: '$PKG_PROTO'" debug "PKG_USER: '$PKG_USER'" debug "PKG_HOST: '$PKG_HOST'" +debug "PKGLIST_PATH: '$PKGLIST_PATH'" ## ## Ask the user for confirmation @@ -311,14 +314,19 @@ function list_update_remote { typeset -i ret=0 export PDIR if [[ $PKG_PROTO == 'ssh' ]] { - ssh $PKG_USER@$PKG_HOST "PDIR='$PDIR' $PKG_PATH/core/include/pkglist $PKG_PATH" > $tmpfile || ret=$? + ssh $PKG_USER@$PKG_HOST "PDIR='$PDIR' $PKGLIST_PATH $PKG_PATH" > $tmpfile || ret=$? } elif [[ $PKG_PROTO == 'file' ]] { - $PKG_PATH/core/include/pkglist $PKG_PATH > $tmpfile || ret=$? + $PKGLIST_PATH $PKG_PATH > $tmpfile || ret=$? } if (( ret == 0 )) { cp $tmpfile .list-remote } else { - die "remote list update failed\n" + die "remote list update failed\n" \ + " -- note --\n" \ + "There were recent changes in pkg involving the package root\n\n" \ + "You might have to copy the pkglist script ($PDIR/core/include/pkglist)\n" \ + "into the package root, so that it's available as\n" \ + "$PKG_HOST:$PKG_PATH/pkglist\n" } rm $tmpfile } |