aboutsummaryrefslogtreecommitdiff
path: root/src/createpkg
diff options
context:
space:
mode:
authorrudson <rudson@04377dda-e619-0410-9926-eae83683ac58>2006-11-25 23:29:52 +0000
committerrudson <rudson@04377dda-e619-0410-9926-eae83683ac58>2006-11-25 23:29:52 +0000
commita51722228b8d2dc7db6b794d11fb8f5faf18ccb4 (patch)
tree7ddae29feaf0d747737f5a6e0cdaf71ee9f64dcf /src/createpkg
parentaf734540a4e3fd2844b57fd643b747ee787ce125 (diff)
downloadsimplepkg-a51722228b8d2dc7db6b794d11fb8f5faf18ccb4.tar.gz
simplepkg-a51722228b8d2dc7db6b794d11fb8f5faf18ccb4.tar.bz2
createpkg: solve_dep: resolução de dependências - checkversion desabilitado; - outras pequenas alterações.
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@39 04377dda-e619-0410-9926-eae83683ac58
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