]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
createpkg: solve_dep: resolução de dependências - checkversion desabilitado; - outras...
authorrudson <rudson@04377dda-e619-0410-9926-eae83683ac58>
Sat, 25 Nov 2006 23:29:52 +0000 (23:29 +0000)
committerrudson <rudson@04377dda-e619-0410-9926-eae83683ac58>
Sat, 25 Nov 2006 23:29:52 +0000 (23:29 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@39 04377dda-e619-0410-9926-eae83683ac58

src/createpkg

index 9ad52f0dbacdb212bb8944961b860e4f243aaa01..1523933d33fab5451ff6b23a1deddceea2764f1a 100644 (file)
@@ -119,26 +119,37 @@ function solve_dep {
     ver="$3"
 
     #if [ "$cond" != "e" ] && [ "$cond" != "l" ] && [ "$cond" != "ge" ] && [ "$cond" != "le" ] && [ ! -z "$cond" ]; then
-    if [ ! -z "$cond" ]; then
+    #if [ ! -z "$cond" ]; then
         # slack-required has a wrong logical sentence, so we ignore it
         check_version="no"
-    fi
+    #fi
 
-    found="0"
+    #found="0"
 
-    for candidate in `ls /var/log/packages/$pack* 2> /dev/null`; do
-        candidate="`package_name $candidate`"
-        if [ "$pack" == "$candidate" ]; then
-            if [ "$check_version" != "no" ]; then
-                # TODO: check if the pack has the correct version
-                true
-            fi
-            found="1"
-            break
-        fi
-    done
-
-    if [ "$found" != "1" ]; then
+    #
+    candidate=`eval "ls /var/log/packages/ | egrep '^$pack-[^-]+-[^-]+-[^-]+$'"`
+    [ "$candidate" = "" ] && found=1 || found=0 # 0 to notfound
+    #
+    #for candidate in `ls /var/log/packages/$pack* 2> /dev/null`; do
+    #    candidate="`package_name $candidate`"
+    #    if [ "$pack" == "$candidate" ]; then
+    #        if [ "$check_version" != "no" ]; then
+    #            # TODO: check if the pack has the correct version
+    #            true
+    #        fi
+    #        found="1"
+    #        break
+    #    fi
+    #done
+
+    # Notes:
+    # Make one list of slackware packages
+    # cat /slackware-mirror/FILELIST.TXT | grep 'tgz$' | awk '{print $8}' | sed -r 's,.*/(.*)-.*-.*-.*\..*$,\1,' | sort
+    # with version
+    # cat /slackware-mirror/FILELIST.TXT | grep 'tgz$' | awk '{print $8}' | sed -r 's,.*/(.*-.*)-.*-.*\..*$,\1,' | sort
+
+    # TODO: Change this...
+    if [ $found -eq 1 ]; then
         echo -e "$CL_MENSG $BASENAME: processing $PACKAGE dependency $pack $CL_OFF"
         SYNC=no CREATEPKG_CHILD=$CREATEPKG_CHILD createpkg --install $pack
         # check if the package was built and installed