summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/pkg14
-rw-r--r--man/5/pkg.conf5
-rw-r--r--man/7/pkg4
3 files changed, 20 insertions, 3 deletions
diff --git a/bin/pkg b/bin/pkg
index 843bcb4..9d11bef 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -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
}
diff --git a/man/5/pkg.conf b/man/5/pkg.conf
index 9394481..a73eedf 100644
--- a/man/5/pkg.conf
+++ b/man/5/pkg.conf
@@ -24,6 +24,11 @@ reasonable (so I hope) defaults.
the package root path
+=item B<PKGLIST_PATH>=I<path> ($PKG_PATH/pkglist)
+
+path to pkglist on the package root, to generate the package list.
+In the default, $PKG_PATH means the path component of $PKG_ROOT.
+
=item B<PDIR>=I<path> ($HOME/packages)
path for the local package tree
diff --git a/man/7/pkg b/man/7/pkg
index 1e6f9c9..3180cb1 100644
--- a/man/7/pkg
+++ b/man/7/pkg
@@ -51,6 +51,10 @@ the packages directory $PDIR, except that it neither contains .list nor
.list-remote. The packages root is the central point where pkg fetches
packages from and pushes packages to.
+The package root should contain the pkglist script shipped in include/.
+If it doesn't, PKGLIST_PATH in .pkg.conf must be set to the appropiate
+location on the package root host.
+
=head2 CAUTION
The file $PKG_ROOT/core/include/pkglist is used by pkg, so make sure the git