OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Thomas Lotterer
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-tools Date: 12-Oct-2005 21:24:37
Branch: HEAD Handle: 2005101220243700
Modified files:
openpkg-tools/cmd dev.sh
Log:
add join option to "update" to merge HEAD while avoiding conflicts for
Release and selected PreReq/BuildPreReq headers
Summary:
Revision Changes Path
1.70 +33 -3 openpkg-tools/cmd/dev.sh
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-tools/cmd/dev.sh
============================================================================
$ cvs diff -u -r1.69 -r1.70 dev.sh
--- openpkg-tools/cmd/dev.sh 12 Oct 2005 19:24:31 -0000 1.69
+++ openpkg-tools/cmd/dev.sh 12 Oct 2005 19:24:37 -0000 1.70
@@ -835,10 +835,12 @@
update () {
full=0
+ join=0
packages=""
while [ ".$1" != . ]; do
case ".$1" in
.-f ) full=1 ;;
+ .-j ) join=1 ;;
* ) packages="${packages} $1"
esac
shift
@@ -854,8 +856,36 @@
if [ $full -eq 0 ]; then
for name in $all; do
[ -d ${OPENPKG_WORK}/$S/${name}/CVS ] || continue;
- echo "++ updating package ${name}"
- (builtin cd ${OPENPKG_WORK}/$S/${name} && cvs update)
+ if [ ${join} -eq 0 ]; then
+ echo "++ updating package ${name}"
+ (builtin cd ${OPENPKG_WORK}/$S/${name} && cvs update)
+ else
+ echo "++ joining package ${name} with HEAD"
+ (builtin cd ${OPENPKG_WORK}/$S/${name} || exit 1
+ tmpfile="${OPENPKG_TEMP}/${name}${GUID}"
+ haverelease=`${EGREP} <${name}.spec '^Release:'`
+ havebprereq=`${EGREP} <${name}.spec '^BuildPreReq:
.*openpkg *>= *' | sed -e 's;^.*openpkg *>= *;;' -e 's;,* .*$;;'`
+ haverprereq=`${EGREP} <${name}.spec '^PreReq:
.*openpkg *>= *' | sed -e 's;^.*openpkg *>= *;;' -e 's;,* .*$;;'`
+ cvs -d ${OPENPKG_REPO} co -p -r1
"${OPENPKG_RMOD}/${name}/${name}.spec" >${tmpfile} 2>/dev/null
+ joinrelease=`${EGREP} <${tmpfile} '^Release: '`
+ joinversion=`${EGREP} <${tmpfile} '^Version: '`
+ joinbprereq=`${EGREP} <${tmpfile} '^BuildPreReq: .*openpkg
*>= *' | sed -e 's;^.*openpkg *>= *;;' -e 's;,* .*$;;'`
+ joinrprereq=`${EGREP} <${tmpfile} '^PreReq: .*openpkg
*>= *' | sed -e 's;^.*openpkg *>= *;;' -e 's;,* .*$;;'`
+ sed <${name}.spec >${name}.spec.n \
+ -e "s;^Release: .*$;$joinrelease;" \
+ -e "s;^Version: .*$;$joinversion;" \
+ -e "s;^\(BuildPreReq: .*openpkg *>=
*\)[^,]*\(.*\)$;\1$joinbprereq\2;" \
+ -e "s;^\(PreReq: .*openpkg *>=
*\)[^,]*\(.*\)$;\1$joinrprereq\2;" \
+ && mv ${name}.spec.n ${name}.spec
+ cvs update -j1
+ sed <${name}.spec >${name}.spec.n \
+ -e "s;^Release: .*;$haverelease;" \
+ -e "s;^\(BuildPreReq: .*openpkg *>=
*\)[^,]*\(.*\)$;\1$havebprereq\2;" \
+ -e "s;^\(PreReq: .*openpkg *>=
*\)[^,]*\(.*\)$;\1$haverprereq\2;" \
+ && mv ${name}.spec.n ${name}.spec
+ command rm ${tmpfile}
+ )
+ fi
done
else
echo "++ updating ${OPENPKG_REPO}/{adm,doc,re,src.*,web,tools}"
@@ -2801,7 +2831,7 @@
\$ 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
- \$ openpkg dev update # [[spec]...] [-f] update
files in specdir or full update from CVS
+ \$ openpkg dev update # [[spec]...] [-f][-j] update
specs (full) (join to HEAD)
\$ openpkg dev vim # [[spec]...] [-f] spec edit
and lint (if HEAD or forced)
EOF
}
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]