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: 01-Aug-2005 21:23:30 Branch: HEAD Handle: 2005080120232900 Modified files: openpkg-tools/cmd dev.sh Log: new feature for "openpkg dev build" now creating per-host build logs in the spec directory. View log files with "openpkg dev logview" or otherwise review the [EMAIL PROTECTED] files. Cleanup happens on "install", "release" and "clean" Summary: Revision Changes Path 1.41 +35 -3 openpkg-tools/cmd/dev.sh ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-tools/cmd/dev.sh ============================================================================ $ cvs diff -u -r1.40 -r1.41 dev.sh --- openpkg-tools/cmd/dev.sh 8 Jun 2005 14:12:37 -0000 1.40 +++ openpkg-tools/cmd/dev.sh 1 Aug 2005 19:23:29 -0000 1.41 @@ -1525,8 +1525,9 @@ template=`rpmE --eval '%{_rpmfilename}' | sed -e 's;\..*$;;'` rpmfile=`rpmE -q --qf "${template}" --specfile ${OPENPKG_WORK}/$S/${name}/${name}.spec` - echo "++ cleaning up sources" + echo "++ cleaning up sources and logs" rpmE --clean --nodeps ${OPENPKG_WORK}/$S/${name}/${name}.spec >/dev/null 2>&1 || true + rm ${OPENPKG_WORK}/$S/${name}/[EMAIL PROTECTED] >/dev/null 2>&1 || true # developer section if [ ".${OPENPKG_MODE}" = .developer ]; then @@ -1820,6 +1821,8 @@ } clean () { + echo "++ cleaning up logs ${OPENPKG_WORK}/$S" + rm ${OPENPKG_WORK}/$S/*/[EMAIL PROTECTED] >/dev/null 2>&1 || true case ${OPENPKG_TEMP} in /?* ) ;; * ) die "temporary area ${OPENPKG_TEMP} seems to be strange" ;; @@ -2014,8 +2017,9 @@ if [ $? -ne 0 ]; then warn "failed to install $package" fi - echo "++ cleaning up sources" + echo "++ cleaning up sources and logs" rpmE --clean --nodeps ${OPENPKG_WORK}/$S/${name}/${name}.spec >/dev/null 2>&1 || true + rm ${OPENPKG_WORK}/$S/${name}/[EMAIL PROTECTED] >/dev/null 2>&1 || true done } @@ -2069,7 +2073,7 @@ echo "++ building $package ($rpmfile)" opt="`echo ${opt} | tr ' ' '\n' | ${EGREP} . | sed -e 's;^;--define \";' -e 's;=; ;' -e 's;$;\";' | tr '\n' ' '`" (builtin cd ${OPENPKG_WORK}/$S/${name} && openpkgT fetch ${name}.spec) - (builtin cd ${OPENPKG_WORK}/$S/${name} && eval "rpmE -ba ${opt} ${name}.spec") + (builtin cd ${OPENPKG_WORK}/$S/${name} && eval "rpmE -ba ${opt} ${name}.spec" 2>&1 | tee [EMAIL PROTECTED]) if [ ! -f "$rpmdir/$rpmfile" ]; then warn "failed to build $package ($rpmfile)" continue @@ -2078,6 +2082,32 @@ done } +logview () { + packages="" + while [ ".$1" != . ]; do + case ".$1" in + * ) packages="${packages} $1" + esac + shift + done + if [ ".${packages}" = . ]; then + if [ ".$P" = . ]; then + die "package cannot be identified. Neither parameter given nor \$P set." + fi + all="$P" + else + all="${packages}" + fi + for name in $all; do + echo "++ logview ${name}" + if [ -f "${OPENPKG_WORK}/$S/${name}/[EMAIL PROTECTED]" ]; then + cat "${OPENPKG_WORK}/$S/${name}/[EMAIL PROTECTED]" + else + warn "log file for ${name} not found" + fi + done +} + search_for () { URL=`echo $2 | sed -e 's| *$||'` PKG=`$E/lib/openpkg/curl -l -s $URL |\ @@ -2463,6 +2493,7 @@ \$ 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 logview # [[spec]...] view build logs \$ 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 @@ -2531,6 +2562,7 @@ kill ) cmd="kill" ;; lint | li* ) cmd="lint" ;; list | ls* ) cmd="list" ;; + logview | lo* ) cmd="logview" ;; new | ne* ) cmd="new" ;; package | pa* ) cmd="package" ;; peek | pe* ) cmd="peek" ;; @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List openpkg-cvs@openpkg.org