On Thu, Jul 10, 2003 at 08:58:19PM +0200, Matthias Kurz wrote:
> 
> Hi.
> 
> Is it possible to query the defaults for "package options" before
> installation ?

I wrote a little script. When it is called as "opaq" (e.g. opaq gcc),
it queries the package info. When it is called as opai it fetches and
installs a package's sources.

#!/bin/sh
myName=`basename $0`
tag=$1
set -- `openpkg build -Z -s $tag | egrep "^$tag"`; pkg=$3
[ -z "$pkg"       ] && { echo "not found"; exit 1; }
[ -z "$opkg_root" ] && opkg_root=/cw
[ -z "$opkg_repo" ] && opkg_repo=ftp://ftp.openpkg.org/current/SRC
case $myName in
     opaq) rpm -qip $opkg_repo/$pkg.src.rpm ||
           rpm -qip $opkg_repo/$pkg.nosrc.rpm ;;
     opai) dest="$opkg_root/RPM/SRC/$tag"
           rm -rf $dest
           rpm -ihv $opkg_repo/$pkg.src.rpm ||
           rpm -ihv $opkg_repo/$pkg.nosrc.rpm &&
           echo "see $dest" ;;
esac


   (mk)

-- 
Matthias Kurz; Fuldastr. 3; D-28199 Bremen; VOICE +49 421 53 600 47
   >> Im pr�motorischen Cortex kann jeder ein Held sein. (bdw) <<
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
User Communication List                      [EMAIL PROTECTED]

Reply via email to