OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Thomas Lotterer
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-tools Date: 08-Apr-2004 22:47:35
Branch: HEAD Handle: 2004040821473400
Modified files:
openpkg-tools/cmd dev.sh
Log:
revitalize basic functionality required for pmod
Summary:
Revision Changes Path
1.3 +171 -113 openpkg-tools/cmd/dev.sh
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-tools/cmd/dev.sh
============================================================================
$ cvs diff -u -r1.2 -r1.3 dev.sh
--- openpkg-tools/cmd/dev.sh 8 Apr 2004 20:41:56 -0000 1.2
+++ openpkg-tools/cmd/dev.sh 8 Apr 2004 20:47:34 -0000 1.3
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
##
-## openpkg-dev -- experimental implementation of forthcoming 'openpkg dev'
+## openpkg dev -- taken from the experimental implementation 'openpkg-dev'
## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
## Copyright (c) 2000-2003 Ralf S. Engelschall <[EMAIL PROTECTED]>
## Copyright (c) 2000-2003 Cable & Wireless <http://www.cw.com/>
@@ -29,14 +29,21 @@
# - copy proprietary packages to private area based on license description ->
private/ -bs --norestriction
# - should we eval the environment and, if yes, at which time -> MANPATH, INFOPATH
# - environment/script interaction may need performance improvements
-# - cs wish: make xterm title fiddling optional or at least restore after leaving
openpkg-dev
+# - cs wish: make xterm title fiddling optional or at least restore after leaving
openpkg dev
-# program version
-prog_name="openpkg-dev"
-prog_vers="0.9.8"
-prog_date="14-Jul-2003"
+# decouple from the calling instance
+unset OPENPKG_PREFIX
+
+# work around broken multiplexer in OpenPKG 2.0.0 and 2.0.1
+# this inhibits the caller from controlling additional and replacement tools
through environment variables
+if [ ".$OPENPKG_TOOLS_STACK" = . ]; then
+ unset OPENPKG_TOOLS
+ unset OPENPKG_TOOLS_APIPATH
+ unset OPENPKG_TOOLS_CMDPATH
+fi
# default configuration
+OPENPKG_THIS="${SHELL} $0"
OPENPKG_INST="/openpkg-dev /openpkg-20 /openpkg-13 /cw13 /cw12 /cw11 /cw10"
OPENPKG_WORK=${HOME}/work/openpkg
OPENPKG_TEMP=/tmp/${LOGNAME}/openpkg
@@ -46,13 +53,14 @@
#OPENPKG_MODE=developer # developer
[EMAIL PROTECTED]:/e/openpkg/cvs # developer
#OPENPKG_DIST=master.openpkg.org:/e/openpkg/ftp/ # developer
-export OPENPKG_INST OPENPKG_WORK OPENPKG_TEMP OPENPKG_MODE OPENPKG_REPO OPENPKG_DIST
+export OPENPKG_THIS OPENPKG_INST OPENPKG_WORK OPENPKG_TEMP OPENPKG_MODE
OPENPKG_REPO OPENPKG_DIST
# enforced and user controlled (through package/branch/execute) variables
OPENPKG_SPEC="${OPENPKG_SPEC}"; P="${P}" # P (package, spec file without .spec
suffix)
OPENPKG_CTAG="${OPENPKG_CTAG}"; B="${B}" # B (cvs tag, branch)
OPENPKG_EXEC="${OPENPKG_EXEC}"; E="${E}" # E (exec, instance)
-export OPENPKG_SPEC P OPENPKG_CTAG B OPENPKG_EXEC E
+OPENPKG_TRUN="${OPENPKG_TRUN}"; T="${T}" # T (trun, tools to run - empty to run
instance internals)
+export OPENPKG_SPEC P OPENPKG_CTAG B OPENPKG_EXEC E OPENPKG_TRUN T
# use appropriate tools
if [ -x /usr/xpg4/bin/egrep ]; then
@@ -81,9 +89,8 @@
# "hardcoded" pseudotag.
# override configuration from ${HOME}/.openpkg-dev.rc
-progname="openpkg-dev"
-if [ -f ${HOME}/.$progname.rc ]; then
- . ${HOME}/.$progname.rc
+if [ -f ${HOME}/.openpkg-dev.rc ]; then
+ . ${HOME}/.openpkg-dev.rc
fi
# override configuration from command line
@@ -137,12 +144,12 @@
# print a warning
warn () {
- echo "${prog_name:-$0}:WARNING: $@" 1>&2
+ echo "$0:WARNING: $@" 1>&2
}
# print an error
error () {
- echo "${prog_name:-$0}:ERROR: $@" 1>&2
+ echo "$0:ERROR: $@" 1>&2
}
# print an error and die
@@ -186,30 +193,83 @@
unset _rv
}
-# get RPMCMD to the correct rpm cmd for a given instance, see
http://cvs.openpkg.org/chngview?cn=14911
-getrpmcmd () {
- if [ -x "$1/bin/openpkg" -a -x "$1/libexec/openpkg" ]; then #OpenPKG v2.x
- RPMCMD="$1/bin/openpkg rpm"
- elif [ -x "$1/bin/rpm" -a ! -x "$1/libexec/openpkg" ]; then #OpenPKG v1.x
- RPMCMD="$1/bin/rpm"
- else #OpenPKG N/A
- RPMCMD=""
+# init MPX, RPM, OPENPKG_TOOLS_(API|CMD)PATH and RPMCMD
+# to the correct values for a given instance
+# see http://cvs.openpkg.org/chngview?cn=14911
+initmpx ()
+{
+ if [ -x $1/bin/openpkg -a -x $1/libexec/openpkg/rpm ]; then
+ #OpenPKG v2.x use "openpkg" multiplexer
+ MPX="$1/bin/openpkg"
+ RPM="rpm"
+ elif [ -x $1/bin/rpm -a ! -x $1/libexec/openpkg/rpm ]; then
+ #OpenPKG v1.x direct command execution
+ MPX=""
+ RPM="$1/bin/rpm"
+ else
+ # OpenPKG N/A
+ MPX=""
+ RPM=""
+ fi
+ RPMCMD="$MPX${MPX:+ }$RPM"
+}
+
+openpkg () {
+ initmpx $E
+ if [ ".$1" = .dev ]; then
+ shift
+ case $1 in
+ package | pa* ) OPENPKG_SPEC=`eval "HOME=\${OPENPKG_WORK} command
${OPENPKG_THIS} package -query package $2"`; cd . ;;
+ branch | br* ) OPENPKG_CTAG=`eval "HOME=\${OPENPKG_WORK} command
${OPENPKG_THIS} branch -query branch $2"`; cd . ;;
+ execute | e* ) OPENPKG_EXEC=`eval "HOME=\${OPENPKG_WORK} command
${OPENPKG_THIS} execute -query execute $2"`; cd . ;;
+ esac
+ command ${OPENPKG_THIS} "$@"
+ case $1 in
+ package | pa* ) if [ ".$2" = . ]; then cd .; else cd
${OPENPKG_WORK}/src/${P}; fi ;;
+ branch | br* ) cd . ;;
+ execute | e* ) cd . ;;
+ esac
+ elif [ ".$1" = .rpm ]; then
+ shift
+ if [ ".${RPMCMD}" = . ]; then
+ echo "$0:ERROR: no openpkg rpm found at instance \"$E\""
+ return 1
+ fi
+ eval "HOME=\${OPENPKG_WORK} command ${RPMCMD} \"[EMAIL PROTECTED]""
+
+ else
+ if [ ".${MPX}" = . ]; then
+ echo "$0:ERROR: no openpkg multiplexer found at instance \"$E\""
+ return 1
+ fi
+ eval "HOME=\${OPENPKG_WORK} OPENPKG_TOOLS=$T command ${MPX} \"[EMAIL
PROTECTED]""
fi
}
+rpm () {
+ openpkg rpm "$@"
+}
+
# smart dealing with temporary root privileges
root () {
- if [ $# -eq 0 ]; then
+ if [ ".$1" = . ]; then
ssh -t -x [EMAIL PROTECTED] builtin cd ${PWD} \&\& ${SHELL}
elif [ ".$1" = .rpm ]; then
+ initmpx $E
shift
- getrpmcmd $E
- if [ ".${RPMCMD}" != . ]; then
- ssh -t -x [EMAIL PROTECTED] builtin cd ${PWD} \&\& HOME=${OPENPKG_WORK}
command ${RPMCMD} "$@"
- else
- echo "$0:ERROR: no openpkg rpm found in instance \"${E}\""
+ if [ ".${RPMCMD}" = . ]; then
+ echo "$0:ERROR: no openpkg rpm found at instance \"$E\""
return 1
fi
+ ssh -t -x [EMAIL PROTECTED] builtin cd ${PWD} \&\& HOME=${OPENPKG_WORK}
command ${RPMCMD} "$@"
+ elif [ ".$1" = .openpkg ]; then
+ initmpx $E
+ shift
+ if [ ".${MPX}" = . ]; then
+ echo "$0:ERROR: no openpkg multiplexer found at instance \"$E\""
+ return 1
+ fi
+ ssh -t -x [EMAIL PROTECTED] builtin cd ${PWD} \&\& HOME=${OPENPKG_WORK}
command ${MPX} "$@"
else
ssh -x [EMAIL PROTECTED] builtin cd ${PWD} \&\& "$@"
fi
@@ -224,16 +284,6 @@
HOME=${OPENPKG_WORK} command cvs ${1+"$@"} | $cvs_colorize
}
-rpm () {
- getrpmcmd $E
- if [ ".${RPMCMD}" != . ]; then
- eval "HOME=\${OPENPKG_WORK} command ${RPMCMD} \"[EMAIL PROTECTED]""
- else
- echo "$0:ERROR: no openpkg rpm found in instance \"${E}\""
- return 1
- fi
-}
-
setup () {
# honor optional parameters [[[spec]ctag]exec]; use "" to specify a empty
parameter and use it's default
[ ".$1" != . ] && OPENPKG_SPEC="$1"
@@ -355,11 +405,11 @@
( builtin cd "${OPENPKG_WORK}"
HOME="${OPENPKG_WORK}"
export HOME
- cvs -q -d "${OPENPKG_REPO}" checkout openpkg-dev-adm openpkg-dev-doc
openpkg-dev-re openpkg-dev-web
+ cvs -q -d "${OPENPKG_REPO}" checkout openpkg-adm openpkg-doc openpkg-re
openpkg-web openpkg-tools
if [ ".${B:-HEAD}" = .HEAD ]; then
- cvs -q -d "${OPENPKG_REPO}" checkout openpkg-dev-src
+ cvs -q -d "${OPENPKG_REPO}" checkout openpkg-src
else
- cvs -q -d "${OPENPKG_REPO}" checkout -r ${B} openpkg-dev-src
+ cvs -q -d "${OPENPKG_REPO}" checkout -r ${B} openpkg-src
fi
)
else
@@ -367,13 +417,13 @@
( builtin cd "${OPENPKG_WORK}"
HOME="${OPENPKG_WORK}"
export HOME
- cvs -q -d "${OPENPKG_REPO}" checkout openpkg-dev-re
+ cvs -q -d "${OPENPKG_REPO}" checkout openpkg-re
if [ ".${B:-HEAD}" = .HEAD ]; then
- cvs -q -d "${OPENPKG_REPO}" checkout openpkg-dev-src/00README
- cvs -q -d "${OPENPKG_REPO}" checkout openpkg-dev-src/${P}
+ cvs -q -d "${OPENPKG_REPO}" checkout openpkg-src/00README
+ cvs -q -d "${OPENPKG_REPO}" checkout openpkg-src/${P}
else
- cvs -q -d "${OPENPKG_REPO}" checkout -r ${B} openpkg-dev-src/00README
- cvs -q -d "${OPENPKG_REPO}" checkout -r ${B} openpkg-dev-src/${P}
+ cvs -q -d "${OPENPKG_REPO}" checkout -r ${B} openpkg-src/00README
+ cvs -q -d "${OPENPKG_REPO}" checkout -r ${B} openpkg-src/${P}
fi
)
fi
@@ -616,7 +666,7 @@
if [ ".$mode" = .exact ]; then
echo "${INSTANCE}" | ${EGREP} "^/" >/dev/null #PATH
if [ $? -eq 0 ]; then
- getrpmcmd ${INSTANCE}
+ initmpx ${INSTANCE}
if [ ".${RPMCMD}" != . ]; then
RV="${INSTANCE}"
unset INSTANCE
@@ -640,7 +690,7 @@
RE="`echo ${RE} | sed -e 's;\.;\\.;g'`"
for INSTANCE in ${OPENPKG_INST}; do
- getrpmcmd ${INSTANCE}
+ initmpx ${INSTANCE}
if [ ".${RPMCMD}" != . ]; then
VERSION=`${RPMCMD} -q --qf "%{VERSION}" openpkg`
echo ${VERSION} | ${EGREP} "$RE" >/dev/null
@@ -655,7 +705,7 @@
OPENPKG_INST="${OPENPKG_INST} `uwhich openpkg | sed -e 's;/bin/openpkg$;;'`"
OPENPKG_INST="${OPENPKG_INST} `uwhich rpm | sed -e 's;/bin/rpm$;;'`"
for INSTANCE in ${OPENPKG_INST}; do
- getrpmcmd ${INSTANCE}
+ initmpx ${INSTANCE}
if [ ".${RPMCMD}" != . ]; then
RV="${INSTANCE}"
unset INSTANCE
@@ -678,7 +728,7 @@
# import OpenPKG environment
eval `${E}/etc/rc --eval openpkg env`
- # prompt to indicate openpkg-dev bash environment
+ # prompt to indicate openpkg dev bash environment
declare -a DIRSTACKREV=()
cd () {
if [ ".$1" = .- ]; then
@@ -710,7 +760,7 @@
if [ ".${OPENPKG_SPEC}" = . ]; then
workdir="${OPENPKG_WORK}"
else
- workdir="`command ${OPENPKG_WORK}/re/openpkg-dev package -query
workdir ${OPENPKG_SPEC}`"
+ workdir="`command ${OPENPKG_THIS} package -query workdir
${OPENPKG_SPEC}`"
fi
else
workdir="$1"
@@ -724,7 +774,7 @@
DIRSTACKREV=()
fi
- P=`command ${OPENPKG_WORK}/re/openpkg-dev package`
+ P=`command ${OPENPKG_THIS} package`
# P holds detection
if [ ".${OPENPKG_SPEC}" = . ]; then
if [ ".${P}" = . ]; then
@@ -756,7 +806,7 @@
fi
# P has ultimate content
- B=`command ${OPENPKG_WORK}/re/openpkg-dev branch`
+ B=`command ${OPENPKG_THIS} branch`
# B holds detection
if [ ".${OPENPKG_CTAG}" = . ]; then
if [ ".${B}" = . ]; then
@@ -788,7 +838,7 @@
fi
# B has ultimate content
- E=`command ${OPENPKG_WORK}/re/openpkg-dev execute`
+ E=`command ${OPENPKG_THIS} execute`
# E holds detection
if [ ".${OPENPKG_EXEC}" = . ]; then
if [ ".${E}" = . ]; then
@@ -820,6 +870,16 @@
fi
# E has ultimate content
+ # T
+ if [ ".$T" = . ]; then
+ CD_FUNC_TX="T-"
+ CD_FUNC_TD="T-"
+ else
+ CD_FUNC_TX="[1mT+[m"
+ CD_FUNC_TD="T+"
+ fi
+ # T has ultimate content
+
CD_FUNC_IX=""
if [ ".$CD_FUNC_PX" != . ]; then
CD_FUNC_IX="${CD_FUNC_IX}${CD_FUNC_IX:+ }${CD_FUNC_PX}"
@@ -830,6 +890,9 @@
if [ ".$CD_FUNC_EX" != . ]; then
CD_FUNC_IX="${CD_FUNC_IX}${CD_FUNC_IX:+ }${CD_FUNC_EX}"
fi
+ if [ ".$CD_FUNC_TX" != . ]; then
+ CD_FUNC_IX="${CD_FUNC_IX}${CD_FUNC_IX:+ }${CD_FUNC_TX}"
+ fi
if [ ".$CD_FUNC_IX" != . ]; then
CD_FUNC_IX=" [${CD_FUNC_IX}]"
fi
@@ -844,34 +907,24 @@
if [ ".$CD_FUNC_ED" != . ]; then
CD_FUNC_ID="${CD_FUNC_ID}${CD_FUNC_ID:+ }${CD_FUNC_ED}"
fi
+ if [ ".$CD_FUNC_TD" != . ]; then
+ CD_FUNC_ID="${CD_FUNC_ID}${CD_FUNC_ID:+ }${CD_FUNC_TD}"
+ fi
if [ ".$CD_FUNC_ID" != . ]; then
CD_FUNC_ID=" [${CD_FUNC_ID}]"
fi
if [ ".${TERM}" = .xterm ]; then
- PS1="[EMAIL PROTECTED]:${PWD}${CD_FUNC_IX}\nopenpkg-dev$ "
- echo -n "]0;openpkg-dev [EMAIL PROTECTED]:${PWD}${CD_FUNC_ID}"
+ PS1="[EMAIL PROTECTED]:${PWD}${CD_FUNC_IX}\n${OPENPKG_MODE}$ "
+ echo -n "]0;openpkg dev [EMAIL PROTECTED]:${PWD}${CD_FUNC_ID}"
else
- PS1="[EMAIL PROTECTED]:${PWD}${CD_FUNC_ID}\nopenpkg-dev$ "
+ PS1="[EMAIL PROTECTED]:${PWD}${CD_FUNC_ID}\n${OPENPKG_MODE}$ "
fi
- unset CD_FUNC_PX CD_FUNC_PD CD_FUNC_BX CD_FUNC_BD CD_FUNC_EX CD_FUNC_ED
CD_FUNC_IX CD_FUNC_ID
+ unset CD_FUNC_PX CD_FUNC_PD CD_FUNC_BX CD_FUNC_BD CD_FUNC_EX CD_FUNC_ED
CD_FUNC_TX CD_FUNC_TD CD_FUNC_IX CD_FUNC_ID
}
- openpkg-dev () {
- case $1 in
- package | pa* ) OPENPKG_SPEC="`command ${OPENPKG_WORK}/re/openpkg-dev
package -query package $2`"; cd . ;;
- branch | br* ) OPENPKG_CTAG="`command ${OPENPKG_WORK}/re/openpkg-dev
branch -query branch $2`"; cd . ;;
- execute | e* ) OPENPKG_EXEC="`command ${OPENPKG_WORK}/re/openpkg-dev
execute -query execute $2`"; cd . ;;
- esac
- command ${OPENPKG_WORK}/re/openpkg-dev ${1+"$@"}
- case $1 in
- package | pa* ) if [ ".$2" = . ]; then cd .; else cd
${OPENPKG_WORK}/src/${P}; fi ;;
- branch | br* ) cd . ;;
- execute | e* ) cd . ;;
- esac
- }
- alias opd=openpkg-dev
+ alias opd="openpkg dev"
}
bashrcepilog () {
@@ -879,9 +932,9 @@
umask 022
# prepare for a individual package
- if [ ".$1" != . ]; then openpkg-dev package $1; fi
- if [ ".$2" != . ]; then openpkg-dev branch $2; fi
- if [ ".$3" != . ]; then openpkg-dev execute $3; fi
+ if [ ".$1" != . ]; then openpkg dev package $1; fi
+ if [ ".$2" != . ]; then openpkg dev branch $2; fi
+ if [ ".$3" != . ]; then openpkg dev execute $3; fi
if [ ".${P}" = . ]; then
cd src
else
@@ -925,10 +978,11 @@
dumpfunc error >>.bashrc
dumpfunc makedir >>.bashrc
dumpfunc uwhich >>.bashrc
- dumpfunc getrpmcmd >>.bashrc
+ dumpfunc initmpx >>.bashrc
+ dumpfunc openpkg >>.bashrc
+ dumpfunc rpm >>.bashrc
dumpfunc root >>.bashrc
dumpfunc cvs >>.bashrc
- dumpfunc rpm >>.bashrc
dumpfunc -i bashrcepilog >>.bashrc
# make sure temporary area exists
@@ -1192,21 +1246,20 @@
if [ ".${BRANCH}" = .HEAD ]; then
echo "++ linting ${name}.spec (package specification)"
- getrpmcmd $E
- HOME=${OPENPKG_WORK} perl ${OPENPKG_WORK}/re/speclint.pl
--rpm="${RPMCMD}" ${OPENPKG_WORK}/src/${name}/${name}.spec
+ openpkg lint-spec ${OPENPKG_WORK}/src/${name}/${name}.spec
if [ $? -gt 0 ]; then
die "unacceptable specification:
${OPENPKG_WORK}/src/${name}/${name}.spec"
fi
if [ -f rc.${name} ]; then
echo "++ linting rc.${name} (run-command script)"
- HOME=${OPENPKG_WORK} perl ${OPENPKG_WORK}/re/rclint.pl
${OPENPKG_WORK}/src/${name}/rc.${name}
+ openpkg lint-rc ${OPENPKG_WORK}/src/${name}/rc.${name}
if [ $? -gt 0 ]; then
die "unacceptable run commands:
${OPENPKG_WORK}/src/${name}/rc.${name}"
fi
fi
if [ -f fsl.${name} ]; then
echo "++ linting fsl.${name} (OSSP fsl configuration)"
- HOME=${OPENPKG_WORK} perl ${OPENPKG_WORK}/re/fsllint.pl
${OPENPKG_WORK}/src/${name}/fsl.${name}
+ openpkg lint-fsl ${OPENPKG_WORK}/src/${name}/fsl.${name}
if [ $? -gt 0 ]; then
die "unacceptable fsl configuration:
${OPENPKG_WORK}/src/${name}/fsl.${name}"
fi
@@ -1220,7 +1273,7 @@
bin_rpmdir=`HOME=${OPENPKG_WORK} ${E}/bin/rpm --eval '%{_rpmdir}'`
if [ -f "$bin_rpmdir/$bin_rpmfile" ]; then
echo "++ linting ${bin_rpmfile} (binary package)"
- HOME=${OPENPKG_WORK} perl ${OPENPKG_WORK}/re/rpmlint.pl
--check=layout,attrib $bin_rpmdir/$bin_rpmfile
+ openpkg lint-rpm --check=layout,attrib $bin_rpmdir/$bin_rpmfile
if [ $? -gt 0 ]; then
die "unacceptable specification: $bin_rpmdir/$bin_rpmfile"
fi
@@ -1559,7 +1612,7 @@
if [ ".$HOSTNAME" = . ]; then
HOSTNAME=`hostname`
fi
- getrpmcmd $E
+ initmpx $E
if [ $force -ne 0 ]; then
echo "++ installing $package ($rpmfile) forced"
ssh -t -x "[EMAIL PROTECTED]" ${RPMCMD} -Uvh "$rpmdir/$rpmfile" --force
--nodeps
@@ -1731,15 +1784,14 @@
name=`echo ${name} | sed -e 's;\.spec$;;'`
echo "++ linting $file (package specification)"
- getrpmcmd $E
- HOME=${OPENPKG_WORK} perl ${OPENPKG_WORK}/re/speclint.pl
--rpm="${RPMCMD}" $file
+ openpkg lint-spec $file
if [ $? -gt 0 -a $force -ne 1 ]; then
die "unacceptable specification"
fi
if [ -f ${path}/rc.${name} ]; then
echo "++ linting ${path}/rc.${name} (run-command script)"
- HOME=${OPENPKG_WORK} perl ${OPENPKG_WORK}/re/rclint.pl
${path}/rc.${name}
+ openpkg lint-rc ${path}/rc.${name}
if [ $? -gt 0 -a $force -ne 1 ]; then
die "unacceptable run commands: ${path}/rc.${name}"
fi
@@ -1747,7 +1799,7 @@
if [ -f ${path}/fsl.${name} ]; then
echo "++ linting ${path}/fsl.${name} (OSSP fsl configuration)"
- HOME=${OPENPKG_WORK} perl ${OPENPKG_WORK}/re/fsllint.pl
${path}/fsl.${name}
+ openpkg lint-fsl ${path}/fsl.${name}
if [ $? -gt 0 -a $force -ne 1 ]; then
die "unacceptable fsl configuration: ${path}/fsl.${name}"
fi
@@ -1759,7 +1811,7 @@
bin_rpmdir=`HOME=${OPENPKG_WORK} ${E}/bin/rpm --eval '%{_rpmdir}'`
if [ -f "$bin_rpmdir/$bin_rpmfile" ]; then
echo "++ linting ${bin_rpmdir}/${bin_rpmfile} (binary package)"
- HOME=${OPENPKG_WORK} perl ${OPENPKG_WORK}/re/rpmlint.pl
--check=layout,attrib $bin_rpmdir/$bin_rpmfile
+ openpkg lint-rpm --check=layout,attrib $bin_rpmdir/$bin_rpmfile
if [ $? -gt 0 -a $force -ne 1 ]; then
die "unacceptable specification: $bin_rpmdir/$bin_rpmfile"
fi
@@ -1775,6 +1827,11 @@
die "testit not yet implemented. Developer: consider testit vs. test(1)"
}
+tools () {
+ # FIXME switch to another tool chain
+ die "tools not yet implemented."
+}
+
vcheck () {
# compatiblity FIXME
die "vcheck is deprecated. Use track."
@@ -1970,8 +2027,7 @@
for file in $files; do
TERM=${TERM}-color command vim "${file}"
if [ ".${OPENPKG_MODE}" = .developer -a ".${B}" = .HEAD -o $force -ne 0
]; then
- getrpmcmd $E
- HOME=${OPENPKG_WORK} perl ${OPENPKG_WORK}/re/speclint.pl
--rpm="${RPMCMD}" ${file}
+ openpkg lint-spec ${file}
if [ $? -gt 0 ]; then
die "unacceptable specification: ${file}"
fi
@@ -1988,32 +2044,33 @@
fi
sed -e 's;^ *;;' <<EOF | $out
- OpenPKG Development Area [created by $prog_name $prog_vers $prog_date]
+ OpenPKG Development Area [created by $0]
--------------------------------------------------------------------------------------------------------
- \$ openpkg-dev bash # [[[spec]ctag]exec] enter development
environment
- \$ openpkg-dev build # [[spec]...] [-f] [-D with...] build a package
(forcibly) (with option)
- \$ openpkg-dev branch # [ctag] switch to a
different branch
- \$ openpkg-dev clean # clean the temporary
area
- \$ openpkg-dev diff # alias for "release
-dry"
- \$ openpkg-dev execute # [exec] execute command on
instance closest to branch
- \$ openpkg-dev fetch # [[spec]...] [-s] [-a] fetch sources; clean
selected or all dst files
- \$ openpkg-dev help # display this command
summary and update 00README
- \$ openpkg-dev install # [[spec]...] [-f] install a package
(forcibly), build if required
- \$ openpkg-dev kill # kill the environment
- \$ openpkg-dev lint # [spec|file|path]...] [-f] lint package
specification
- \$ openpkg-dev list # [[spec]...] list source and
binary packages
- \$ openpkg-dev new # spec... [-dry] create new package
from scratch
- \$ openpkg-dev package # [spec] switch to a
different package
- \$ openpkg-dev peek # [[spec]...] peek at file list of
binary package
- \$ openpkg-dev release # [[spec]...] [-dry] [-m "msg"] release package
changes to master server
- \$ openpkg-dev run # [[spec]...] [-dry] [-f] cmd append cmd to %prep
for spec and run rpm -bp
- \$ openpkg-dev search # [[spec]...] search a package on
master server
- \$ openpkg-dev setup # [[[spec]ctag]exec] initial setup of
openpkg-dev working environment
- \$ openpkg-dev test # [[spec]...] run functional test
(reserved for future use)
- \$ openpkg-dev track # [[spec]...] track version
(formerly called vcheck)
- \$ openpkg-dev update # update development
environment from master server
- \$ openpkg-dev vim # [[spec]...] [-f] spec edit and lint
(if HEAD or forced)
+ \$ openpkg dev bash # [[[spec]ctag]exec] enter development
environment
+ \$ openpkg dev build # [[spec]...] [-f] [-D with...] build a package
(forcibly) (with option)
+ \$ openpkg dev branch # [ctag] switch to a
different branch
+ \$ openpkg dev clean # clean the temporary
area
+ \$ openpkg dev diff # alias for "release
-dry"
+ \$ openpkg dev execute # [exec] execute command on
instance closest to branch
+ \$ openpkg dev fetch # [[spec]...] [-s] [-a] fetch sources; clean
selected or all dst files
+ \$ openpkg dev help # display this command
summary and update 00README
+ \$ openpkg dev install # [[spec]...] [-f] install a package
(forcibly), build if required
+ \$ openpkg dev kill # kill the environment
+ \$ openpkg dev lint # [spec|file|path]...] [-f] lint package
specification
+ \$ openpkg dev list # [[spec]...] list source and
binary packages
+ \$ openpkg dev new # spec... [-dry] create new package
from scratch
+ \$ openpkg dev package # [spec] switch to a
different package
+ \$ openpkg dev peek # [[spec]...] peek at file list of
binary package
+ \$ openpkg dev release # [[spec]...] [-dry] [-m "msg"] release package
changes to master server
+ \$ openpkg dev run # [[spec]...] [-dry] [-f] cmd append cmd to %prep
for spec and run rpm -bp
+ \$ openpkg dev search # [[spec]...] search a package on
master server
+ \$ openpkg dev setup # [[[spec]ctag]exec] initial setup of
openpkg dev working environment
+ \$ openpkg dev test # [[spec]...] run functional test
(reserved for future use)
+ \$ openpkg dev tools # [path] tools to run
(default to instance internals)
+ \$ openpkg dev track # [[spec]...] track version
(formerly called vcheck)
+ \$ openpkg dev update # update development
environment from master server
+ \$ openpkg dev vim # [[spec]...] [-f] spec edit and lint
(if HEAD or forced)
--------------------------------------------------------------------------------------------------------
EOF
}
@@ -2061,6 +2118,7 @@
setup | set*) cmd="setup" ;;
test | te* ) cmd="test" ;;
track | tr* ) cmd="track" ;;
+ tools | to* ) cmd="tools" ;;
update | u* ) cmd="update" ;;
vcheck | vc* ) cmd="vcheck" ;;
vim | vi* ) cmd="vim" ;;
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]