diff options
| -rwxr-xr-x | trunk/src/mkbuild | 55 | 
1 files changed, 26 insertions, 29 deletions
diff --git a/trunk/src/mkbuild b/trunk/src/mkbuild index 7fd55d8..d46f828 100755 --- a/trunk/src/mkbuild +++ b/trunk/src/mkbuild @@ -979,6 +979,8 @@ function update_manifest_info {  function edit_manifest { +  local option="$1" +    # Check if existing Manifest is properly signed    if ! check_manifest_signature; then      echo "Invalid signature at $WORK/Manifest, aborting." @@ -999,9 +1001,28 @@ function edit_manifest {      update_manifest_info $WORK/slack-required    fi -  # Add source code information if its not already there -  if ! grep -q -e "^DIST $DIST_SRC_NAME " $WORK/Manifest; then  -    update_manifest_info $DIST_SRC_NAME dist +  if [ "$option" == "--update" ]; then +    # Add DIST information only if source is not under revision control +    if [ $SVN_MOD -eq $on -o $GIT_MOD -eq $on ]; then +      echo "Source is under version control system, not adding hashes to Manifest." +    else +      echo "Updating DIST information at $MKBUILD_NAME Manifest..." + +      # Determine file location +      get_dist_file $SOURCE_FILE + +      # Update Manifest metadata +      if [ -e "$DIST_SRC_LOCATION" ]; then +        update_manifest_info $DIST_SRC_LOCATION dist +      else +        echo "Can't get $DIST_SRC_NAME." +      fi +    fi     +  else +    # Add source code information if its not already there +    if ! grep -q -e "^DIST $DIST_SRC_NAME " $WORK/Manifest; then  +      update_manifest_info $DIST_SRC_NAME dist +    fi    fi    # Update patches @@ -1183,32 +1204,8 @@ function update_manifest {    # Get mkbuild values    get_mkbuild_values -  # Add DIST information only if source is not under revision control -  if [ $SVN_MOD -eq $on -o $GIT_MOD -eq $on ]; then -    echo "Source is under version control system, can't add hashes to Manifest." -    return -  fi - -  # Check if existing Manifest is properly signed -  if ! check_manifest_signature; then -    echo "Invalid signature at $WORK/Manifest, aborting." -    return 1 -  fi   - -  echo "Updating DIST information at $MKBUILD_NAME Manifest..." - -  # Determine file location -  get_dist_file $SOURCE_FILE - -  # Update Manifest metadata -  if [ -e "$DIST_SRC_LOCATION" ]; then -    update_manifest_info $DIST_SRC_LOCATION dist -  else -    echo "Can't get $DIST_SRC_NAME." -  fi - -  # Finally, sign the Manifest -  sign_manifest +  # Update the Manifest +  edit_manifest --update  }  | 
