]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
simplepkg 0.4.9pre4
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Thu, 5 Oct 2006 22:49:30 +0000 (22:49 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Thu, 5 Oct 2006 22:49:30 +0000 (22:49 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@13 04377dda-e619-0410-9926-eae83683ac58

doc/CHANGELOG
simplepkg.SlackBuild
src/createpkg

index 659076dc4c4e3c529cbe848fecbd81d23d1741ae..00e8aef59a8a32739d32a8e723f87c2628321b2b 100644 (file)
@@ -1,6 +1,16 @@
 simplepkg changelog
 -------------------
 
+0.4.9pre4: createpkg: better command line evaluation,
+           now using "upgradepkg --install-new" to
+           install a package and added the command
+           line option --no-deps so createpkg doesn't
+           goes down to solve all slack-required
+           dependencies.
+
+0.4.9pre3: small fix on createpkg when handling with
+           slackbuilds with similar names
+
 0.4.9pre2: fixed simplepkg.SlackBuild
            fixed doinst.sh
            re-organized the source repository
index 4dc8a56e2c7053f41e909bfc5b95328b1d292b7a..78288b33231d22c47d7f449df8fe44a342122a7d 100755 (executable)
@@ -6,7 +6,7 @@
 PACKAGE="simplepkg"
 PACK_DIR="package-$PACKAGE"
 BUILD="1rha"
-VERSION="0.4.9pre3"
+VERSION="0.4.9pre4"
 ARCH="noarch"
 
 LIBEXEC="/usr/libexec/$PACKAGE"
index a36015332daa56f1b77a058cd2055944423f3f1b..faa7e0ef5ff19fb0022d77f17d2b49ec37cc78ea 100644 (file)
@@ -60,6 +60,7 @@ function build_repo {
 function usage {
 
   echo "usage: createpkg [--install] package-name"
+  echo "       createpkg --no-deps package-name"
   echo "       createpkg --search package-name"
   echo "       createpkg --sync"
 
@@ -107,7 +108,7 @@ function solve_dep {
     found="0"
   fi
 
-  # TODO: check if the package is installed
+  # TODO: check if the package was built and installed
 
 }
 
@@ -137,17 +138,26 @@ check_repo
 
 if [ -z "$1" ]; then
   safe_exit 4
-elif [ "$1" == "--sync" ]; then
-  sync_repo 
-  exit
-elif [ "$1" == "--search" ]; then
-  find_script $2
-  exit
-elif [ "$1" == "--install" ]; then
-  PACKAGE="$2"
-  INSTALL="1"
-else
+elif [ "$#" == "2" ]; then
+  if [ "$1" == "--sync" ]; then
+    sync_repo 
+    exit
+  elif [ "$1" == "--search" ]; then
+    find_script $2
+    exit
+  elif [ "$1" == "--install" ]; then
+    PACKAGE="$2"
+    INSTALL="1"
+  elif [ "$1" == "--no-deps" ]; then
+    NO_DEPS="1"
+    PACKAGE="$2"
+  else
+    safe_exit 4
+  fi
+elif [ "${1:0:1}" != "-" ]; then
   PACKAGE="$1"
+else
+  safe_exit 4
 fi
 
 if [ "$SYNC" == "yes" ]; then
@@ -168,13 +178,15 @@ elif [ -f "$SCRIPT_BASE/slack-required" ]; then
   SLACK_REQ="$SCRIPT_BASE/slack-required"
 fi
 
-if [ ! -z "$SLACK_REQ" ]; then
+if [ ! -z "$SLACK_REQ" ] && [ "$NO_DEPS" != "1" ]; then
 
   cat $SLACK_REQ | while read dep; do
-    program="`echo $dep | awk '{ print $1 }'`"
-    condition="`echo $dep | awk '{ print $2 }' | sed -e 's/>=/equalorgreater/' -e 's/=</equalorless/' -e 's/</less/' -e 's/>/greater/' -e 's/=/equal/'`"
-    version="`echo $dep | awk '{ print $3 }' | tr -dc '[:digit:]'`"
-    solve_dep $program $condition $version
+    if [ ! -z "$dep" ]; then
+      program="`echo $dep | awk '{ print $1 }'`"
+      condition="`echo $dep | awk '{ print $2 }' | sed -e 's/>=/equalorgreater/' -e 's/=</equalorless/' -e 's/</less/' -e 's/>/greater/' -e 's/=/equal/'`"
+      version="`echo $dep | awk '{ print $3 }' | tr -dc '[:digit:]'`"
+      solve_dep $program $condition $version
+    fi
   done
 
 fi
@@ -192,8 +204,8 @@ if [ "$_ARCH" == "noarch" ]; then
   ARCH="noarch"
 fi
 
-# TODO: change to upgradepkg?
 if [ "$INSTALL" == "1" ]; then
-  installpkg $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz
+  # installpkg $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz
+  upgradepkg --install-new $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz
 fi