]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
repos: added patches metafiles support
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Mon, 11 Dec 2006 01:53:28 +0000 (01:53 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Mon, 11 Dec 2006 01:53:28 +0000 (01:53 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@75 04377dda-e619-0410-9926-eae83683ac58

src/repos
src/simplaret

index 06f59f0cb556fa228e53319eb03d10cfb8b7d8a6..465714b4e63c9a25643cde5b16338ebbc471a402 100755 (executable)
--- a/src/repos
+++ b/src/repos
@@ -19,6 +19,10 @@ function svn_add_meta {
 function gen_filelist {
   for file in `find | grep -e ".tgz$"`; do ls -l $file; done > FILELIST.TXT
   echo "Created new FILELIST.TXT"
+  if [ -d "patches" ]; then
+    for file in `find patches | grep -e ".tgz$"`; do ls -l $file; done > patches/FILE_LIST
+    echo "Created new patches/FILE_LIST"
+  fi
 }
 
 function gen_packages_txt {
@@ -26,6 +30,11 @@ function gen_packages_txt {
    find . -type f -name '*.meta' -exec cat {} \; >> PACKAGES.TXT
    cat PACKAGES.TXT | gzip -9 -c - > PACKAGES.TXT.gz
    echo "Created new PACKAGES.TXT and PACKAGES.TXT.gz"
+   if [ -d "patches" ]; then
+     find patches -type f -name '*.meta' -exec cat {} \; >> patches/PACKAGES.TXT
+     cat patches/PACKAGES.TXT | gzip -9 -c - > patches/PACKAGES.TXT.gz
+     echo "Created new patches/PACKAGES.TXT and patches/PACKAGES.TXT.gz"
+   fi
 }
 
 function gen_md5_checksums {
@@ -33,6 +42,11 @@ function gen_md5_checksums {
    find . -type f -name '*.tgz' -exec md5sum {} \; >> CHECKSUMS.md5
    cat CHECKSUMS.md5 | gzip -9 -c - > CHECKSUMS.md5.gz
    echo "Created new CHECKSUMS.md5 and CHECKSUMS.md5.gz"
+   if [ -d "patches" ]; then
+     find patches -type f -name '*.tgz' -exec md5sum {} \; >> patches/CHECKSUMS.md5
+     cat patches/CHECKSUMS.md5 | gzip -9 -c - > patches/CHECKSUMS.md5.gz
+     echo "Created new patches/CHECKSUMS.md5 and patches/CHECKSUMS.md5.gz"
+   fi
 }
 
 function gen_meta {
index 47e3f25cf6a327a0a22898543a1365a51d9379a5..4f8a4cd5bbbc54b215c190df6dcd411f271ca3cb 100755 (executable)
@@ -498,7 +498,7 @@ function simplaret_get_jail_patches {
   ARCH="`cat $root/etc/slackware-version | awk '{ print $3 }' | sed -e 's/(//' -e 's/)//'`"
 
   # in case there's something wrong with the jail, abort
-  if [ -z "$VERSION" ] && [ -z "$ARCH" ]; then
+  if [ -z "$VERSION" ] || [ -z "$ARCH" ]; then
     return
   fi
 
@@ -512,14 +512,9 @@ function simplaret_get_jail_patches {
     simplaret_search_and_download_patch
   done
 
-  # list all available patches in ROOT repositories
-  for sugested in `simplaret_search patches -formatted | grep root`; do
-    simplaret_search_and_download_patch
-  done
-
   # grab patches from every other places
   if [ "$CONSIDER_ALL_PACKAGES_AS_PATCHES" == "1" ]; then
-    for sugested in `simplaret_search patches -formatted | grep -v patches | grep -v root`; do
+    for sugested in `simplaret_search patches -formatted | grep -v patches`; do
       simplaret_search_and_download_patch
     done
   fi