diff options
author | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2007-01-12 13:59:44 +0000 |
---|---|---|
committer | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2007-01-12 13:59:44 +0000 |
commit | cdebd9b9135fdd9079245d7e270e13d8ec8050ee (patch) | |
tree | 90f2738059c96bf69846dc2790db91413e7f5922 /src | |
parent | b58e612715555d83f6a67343a852810c0450bc0d (diff) | |
download | simplepkg-cdebd9b9135fdd9079245d7e270e13d8ec8050ee.tar.gz simplepkg-cdebd9b9135fdd9079245d7e270e13d8ec8050ee.tar.bz2 |
simplaret: ROOT/patches now are saved in PATCHES_DIR/root-$repository_name
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@93 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'src')
-rwxr-xr-x | src/simplaret | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/simplaret b/src/simplaret index 62e9c82..383a705 100755 --- a/src/simplaret +++ b/src/simplaret @@ -56,6 +56,9 @@ function simplaret_eval_config { SIMPLARET_PURGE_WEEKS="`simplaret_eval_parameter SIMPLARET_PURGE_WEEKS 0`" CONSIDER_ALL_PACKAGES_AS_PATCHES="`simplaret_eval_parameter CONSIDER_ALL_PACKAGES_AS_PATCHES 0`" + # now we place "patches" on the top of ROOT_PRIORITY + ROOT_PRIORITY="patches `echo $ROOT_PRIORITY | sed -e 's/patches//'`" + } function simplaret_get_index { @@ -426,22 +429,28 @@ function simplaret_get { if [ "`package_name $candidate`" == "$1" ]; then simplaret_repository_url - # TODO: if repos_type == root and the package is a patch, - # save it on $PATCHES_DIR/root-$root_name/ + # if repos_type == root and the package is a patch, + # save it on $PATCHES_DIR/root-$repository_name, so all patches + # are placed in the same tree + if [ "$repos_type" == "root" ] && echo $file | grep -q "patches"; then + folder="$PATCHES_DIR/root-$repository_name" + else + folder="$storage/$repository_name" + fi - simplaret_download $repository_url $file $storage/$repository_name + simplaret_download $repository_url $file $folder - if [ ! -f "$storage/$repository_name/$candidate" ]; then + if [ ! -f "$folder/$candidate" ]; then if [ "$2" != "--silent" ]; then echo error downloading $candidate from $repos_type repository $repository_url, please check your settings fi return 1 else if [ "$2" != "--silent" ]; then - echo package $candidate stored at $storage/$repository_name - else echo $storage/$repository_name/$candidate + echo package $candidate stored at $folder + else echo $folder/$candidate fi - simplaret_checksum $storage/$repository_name/CHECKSUMS.md5 $storage/$repository_name/$candidate --silent + simplaret_checksum $storage/$repository_name/CHECKSUMS.md5 $folder/$candidate --silent return $? fi |