aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2006-10-05 22:49:30 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2006-10-05 22:49:30 +0000
commited6876df44176c95296a2c6943e6808cd9f5eff8 (patch)
tree827fc89b50589dba592ccd825ed0ad5546a5a2d1
parent17c7b9bf562426e5137e43c62548ad116406448c (diff)
downloadsimplepkg-ed6876df44176c95296a2c6943e6808cd9f5eff8.tar.gz
simplepkg-ed6876df44176c95296a2c6943e6808cd9f5eff8.tar.bz2
simplepkg 0.4.9pre4
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@13 04377dda-e619-0410-9926-eae83683ac58
-rw-r--r--doc/CHANGELOG10
-rwxr-xr-xsimplepkg.SlackBuild2
-rw-r--r--src/createpkg48
3 files changed, 41 insertions, 19 deletions
diff --git a/doc/CHANGELOG b/doc/CHANGELOG
index 659076d..00e8aef 100644
--- a/doc/CHANGELOG
+++ b/doc/CHANGELOG
@@ -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
diff --git a/simplepkg.SlackBuild b/simplepkg.SlackBuild
index 4dc8a56..78288b3 100755
--- a/simplepkg.SlackBuild
+++ b/simplepkg.SlackBuild
@@ -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"
diff --git a/src/createpkg b/src/createpkg
index a360153..faa7e0e 100644
--- a/src/createpkg
+++ b/src/createpkg
@@ -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