diff options
author | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-12-16 19:15:31 +0000 |
---|---|---|
committer | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-12-16 19:15:31 +0000 |
commit | 29fb575757ee1dc8f2dbc931fd7c5a699d8d1d17 (patch) | |
tree | 304198dad5351ccfcfde567a379357b2edfec2a1 /trunk/src/createpkg | |
parent | f686c0c84d8bbd1868d75cbce738403d5dea22c8 (diff) | |
download | simplepkg-29fb575757ee1dc8f2dbc931fd7c5a699d8d1d17.tar.gz simplepkg-29fb575757ee1dc8f2dbc931fd7c5a699d8d1d17.tar.bz2 |
createpkg: minor changes
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@666 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk/src/createpkg')
-rw-r--r-- | trunk/src/createpkg | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/trunk/src/createpkg b/trunk/src/createpkg index e8aad31..8ec901d 100644 --- a/trunk/src/createpkg +++ b/trunk/src/createpkg @@ -289,19 +289,11 @@ function repository_checkout { function repository_update { - if [ -d "$PACKAGES_DIR/.svn" ]; then - echo "Fetching changes from svn repository for $PACKAGES_DIR..." - cwd="`pwd`" - chown_svn $PACKAGES_DIR && chgrp_svn $PACKAGES_DIR - cd $PACKAGES_DIR && su_svn update - cd $cwd - fi - - if [ -d "$NOARCH_DIR/.svn" ]; then - echo "Fetching changes from svn repository for $NOARCH_DIR..." + if [ ! -z "$1" ] && [ -d "$1/.svn" ]; then + echo "Fetching changes from svn repository for $1..." cwd="`pwd`" - chown_svn $NOARCH_DIR && chgrp_svn $NOARCH_DIR - cd $NOARCH_DIR && su_svn update + chown_svn $1 && chgrp_svn $1 + cd $1 && su_svn update cd $cwd fi @@ -391,10 +383,6 @@ function remove_old_package_data { cd $makepkg_repos - PACKAGE_VERSION="`package_version $PKG_NAME`" - PACKAGE_ARCH="`package_arch $PKG_NAME`" - PACKAGE_BUILD="`package_build $PKG_NAME`" - # Using -mindepth 2 so it doesn't delete the new PACKAGE for file in `find . -mindepth 2 -name "$PACKAGE-*-*-*.tgz" -o -name "$PACKAGE-*-*-*.meta"`; do candidate="`echo $file | sed -e 's/\.meta/\.tgz/'`" # otherwise PACKAGE info functions can fail @@ -563,7 +551,8 @@ case $1 in exit $EXIT_CODE ;; '--update') - repository_update + repository_update $PACKAGES_DIR + repository_update $NOARCH_DIR exit $EXIT_CODE ;; '--commit') @@ -674,8 +663,11 @@ cd $SCRIPT_BASE # Check if package was built handle_error $? $PACKAGE -# Get package name +# Get package name, arch, version and build number PKG_NAME="`ls -1 -c $PACKAGES_DIR/$PACKAGE-*-*-*.tgz | head -n 1 | xargs basename`" +PACKAGE_VERSION="`package_version $PKG_NAME`" +PACKAGE_ARCH="`package_arch $PKG_NAME`" +PACKAGE_BUILD="`package_build $PKG_NAME`" # Select repository directory if [ $MOVE_BIN_PACKAGE -eq $on ]; then @@ -689,6 +681,9 @@ fi # Create the repository folders create_repo_folder $PACKAGES_DIR +# Update information from remote repository +repository_update $PACKAGES_DIR + # Remove old packages from repository tree remove_old_package_data $PACKAGES_DIR @@ -714,7 +709,6 @@ if [ $MOVE_BIN_PACKAGE -eq $on ]; then fi # Update repository metadata -repository_update update_metadata $PACKAGES_DIR # General cleanup @@ -723,6 +717,7 @@ svn_remove_empty_folders $PACKAGES_DIR # Update noarch repository if [ $PACKAGES_REPOS_NOARCH -eq $on ] && [ "`package_arch $PKG_NAME`" == "noarch" ]; then + repository_update $NOARCH_DIR echo Copying package to noarch repository... create_repo_folder $NOARCH_DIR remove_old_package_data $NOARCH_DIR |