aboutsummaryrefslogtreecommitdiff
path: root/src/createpkg
diff options
context:
space:
mode:
Diffstat (limited to 'src/createpkg')
-rw-r--r--src/createpkg43
1 files changed, 27 insertions, 16 deletions
diff --git a/src/createpkg b/src/createpkg
index 9ad52f0..1523933 100644
--- a/src/createpkg
+++ b/src/createpkg
@@ -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