[Lunar-commits] <lunar> Fix lvu submit again for git-am usage

Auke Kok sofar at lunar-linux.org
Mon Jul 2 04:43:16 CEST 2012


commit 3a0f5ba500474e9299e0f23ea0420fdab3bc20f3
Author: Auke Kok <sofar at lunar-linux.org>
Date:   Tue Feb 5 18:07:10 2008 +0000

    Fix lvu submit again for git-am usage
---
 bin/lvu |   30 +++++++++++++++++++++++++++---
 1 file changed, 27 insertions(+), 3 deletions(-)

diff --git a/bin/lvu b/bin/lvu
index 1adb997..b8ea52f 100755
--- a/bin/lvu
+++ b/bin/lvu
@@ -838,12 +838,14 @@ submit_module() {
       echo ""
       echo "# type a changelog message here. The first line should start with"
       echo "# the module name and summarize your change. All lines starting with '#'"
-      echo "# will be removed automatically"
+      echo "# will be removed automatically. Example: 'foo: version update'."
+      echo "# "
+      echo "# PLEASE FORMAT THE FIRST LINE ACCORDING TO ABOVE NOTES!!! THANK YOU!!!"
     ) > $TMP_MSG
     edit_file $TMP_MSG
     sed -i '/^#/d' $TMP_MSG
     (
-      head -n 1 $TMP_MSG
+      head -n 1 $TMP_MSG | sed 's/^/Subject: /g'
       echo ''
       echo "From: $REALNAME <$ADMIN>"
       tail +2 $TMP_MSG
@@ -1106,7 +1108,29 @@ main()  {
         echo "$MODULE ($(installed_version $MODULE) -> $(run_details $MODULE > /dev/null ; echo $VERSION))"
       done
       ;;
-		
+    failed)
+      while read DATE COMMAND MODULE VERSION STATE JUNK ; do
+        if [ "$STATE" == "failed" ] && [ "$COMMAND" == "lin" ] ; then
+          # add to list of failed modules
+          if ! echo "$FAILED" | grep -qw $MODULE ; then
+            FAILED="$FAILED $MODULE "
+          fi
+        fi
+        # no need to remove if $MODULE is not in the list - speeds things up
+        if ! echo "$FAILED" | grep -qw "$MODULE" ; then
+          continue
+        fi
+        if ([ "$STATE" == "success" ] && [ "$COMMAND" == "lin" ]) ||
+             ([ "$STATE" == "success" ] && [ "$COMMAND" == "lrm" ]) ; then
+          # remove from failed modules
+          FAILED=`echo "$FAILED" | sed "s/ $MODULE //g"`
+        fi
+      done < $ACTIVITY_LOG
+      for MODULE in $FAILED ; do
+        echo $MODULE
+      done
+      ;;
+
     sum)
       if [ -n "$2" ] ; then
         if ! checksum  "$INSTALL_LOGS/$2-$(installed_version $2)" ; then


More information about the Lunar-commits mailing list