]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
createpkg: fixes on createpkg_commit
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Sun, 30 Nov 2008 15:48:19 +0000 (15:48 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Sun, 30 Nov 2008 15:48:19 +0000 (15:48 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@613 04377dda-e619-0410-9926-eae83683ac58

trunk/src/createpkg

index e6f0a1a2a10ea4256b1d8d87508a68c160ae752c..4840230e21f6bcf9a1be147f2ff4dcbbb4d0bb88 100644 (file)
@@ -299,12 +299,23 @@ function repository_status {
 
 function commit_changes {
 
-  if [ -d "$MAKEPKG_REPOS/.svn" ]; then
+  # usage: commit_changes <repository_path>
+
+  local repos="$1" tmpfile
+  shift
+
+  if [ -d "$repos/.svn" ]; then
     cwd="`pwd`"
-    chown_svn $MAKEPKG_REPOS && chgrp_svn $MAKEPKG_REPOS
-    cd $MAKEPKG_REPOS
+    chown_svn $repos && chgrp_svn $repos
+    cd $repos
     if [ ! -z "$1" ]; then
-      su_svn commit -m "$*"
+      if tmpfile=`mktemp -t createpkg_commit.XXXXXX`; then
+        echo $* > $tmpfile
+        su_svn commit -F $tmpfile
+        rm -f $tmpfile
+      else
+        su_svn commit
+      fi
     else
       su_svn commit
     fi
@@ -320,8 +331,7 @@ function create_repo_folder {
   # Create repository directory
   # usage: create_repo_folder <repository_folder>
 
-  local folder
-  folder="$1"
+  local folder="$1"
 
   if [ ! -e $folder/$SUBFOLDER ]; then
     if [ -d "$folder/.svn" ] && ! svn_check $folder/$SUBFOLDER; then
@@ -346,8 +356,7 @@ function remove_old_package_data {
     return 1
   fi
 
-  local makepkg_repos
-  makepkg_repos="$1"
+  local makepkg_repos="$1"
 
   # Remove old PACKAGEs from repository tree
   if [ $REMOVE_OLD_PACKAGE -eq $on ]; then
@@ -414,8 +423,7 @@ function update_metadata {
     return 1
   fi
 
-  local makepkg_repos
-  makepkg_repos="$1"
+  local makepkg_repos="$1"
 
   (
 
@@ -548,7 +556,10 @@ case $1 in
   ;;
   '--commit')
     shift
-    commit_changes $*
+    commit_changes $MAKEPKG_REPOS $*
+    if [ $MAKEPKG_REPOS_NOARCH -eq $on ]; then
+      commit_changes $NOARCH_REPOS $*
+    fi
     exit $EXIT_CODE
   ;;
   '--status')