diff options
author | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2009-01-22 20:39:45 +0000 |
---|---|---|
committer | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2009-01-22 20:39:45 +0000 |
commit | 8b0632dbf9611025c5fca21521cf6f5077e9faaf (patch) | |
tree | 5b53682a42342da29f5a8e0a2d5157616d264490 /trunk | |
parent | bc65ce666f02ed028618febc77c1888015cae454 (diff) | |
download | simplepkg-8b0632dbf9611025c5fca21521cf6f5077e9faaf.tar.gz simplepkg-8b0632dbf9611025c5fca21521cf6f5077e9faaf.tar.bz2 |
attempting to fix #61
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@770 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk')
-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 } |