summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolás Reynolds <apoyosis@correo.inta.gob.ar>2011-12-22 23:27:22 -0300
committerNicolás Reynolds <apoyosis@correo.inta.gob.ar>2011-12-22 23:27:22 -0300
commitafeb8ee939f23256192239622f57265cf4c6cb4c (patch)
tree77676089022f2b1df8e34032d01a0a9ef0647c96
parentf258090c62535b9e02450494507f2e3f08024c96 (diff)
parent32b6057b15e4f0872b9ebd51038c72b0d681cb80 (diff)
Merge branch 'master' of ssh://gparabola/libretools
-rw-r--r--AUTHORS2
-rw-r--r--cleansystem72
-rwxr-xr-xis_built17
-rwxr-xr-xlibremakepkg4
-rwxr-xr-xtoru12
5 files changed, 29 insertions, 78 deletions
diff --git a/AUTHORS b/AUTHORS
index c35d4e3..6ab8015 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,2 +1,2 @@
-Joshua Ismael
+Joshua Haase
Nicolás Reynolds
diff --git a/cleansystem b/cleansystem
deleted file mode 100644
index 8da434b..0000000
--- a/cleansystem
+++ /dev/null
@@ -1,72 +0,0 @@
-bzip2
-filesystem
-initscripts
-licenses-libre
-linux-libre
-pacman
-pacman-mirrorlist-libre
-your-freedom
-bash
-binutils
-bzip2
-coreutils
-cronie
-cryptsetup
-device-mapper
-dhcpcd
-diffutils
-e2fsprogs
-file
-findutils
-gawk
-gcc-libs
-gettext
-glibc
-grep
-gzip
-heirloom-mailx
-inetutils
-iputils
-jfsutils
-less
-libpipeline
-logrotate
-lvm2
-man-db
-man-pages
-mdadm
-nano
-pciutils
-pcmciautils
-perl
-ppp
-procps
-psmisc
-reiserfsprogs
-sed
-shadow
-sysfsutils
-syslog-ng
-sysvinit
-tar
-texinfo
-udev
-usbutils
-util-linux
-vi
-wget
-which
-wpa_supplicant
-xfsprogs
-autoconf
-automake
-bison
-fakeroot
-flex
-gcc
-libtool
-m4
-make
-patch
-pkg-config
-sudo
diff --git a/is_built b/is_built
index f789e4f..60f24e9 100755
--- a/is_built
+++ b/is_built
@@ -1,11 +1,24 @@
#!/bin/bash
-# Detect is a package is installed or in a database
+usage() {
+ echo "$0 "
+ echo
+ echo "Detect is a package is installed or in a database"
+ echo
+ echo "Example usage: is_built \"pcre>=20\""
+}
+
+while getopts 'h' arg; do
+ case $arg in
+ h) usage; exit 0 ;;
+ *) usage; exit 1 ;;
+ esac
+done
# Checks for package, if -T returns non-zero output, egrep will return 0
# because it finds it, so we negate the value to say it's not built.
# -Sp works backwards, it will print output only when the package already
# exists
-# Example usage: is_built "pcre>=20"
+
!(sudo pacman -T "$1" | egrep "*" >/dev/null) || \
sudo pacman -Sp "$1" --print-format "%n-%v" 2>/dev/null | egrep "*" >/dev/null
diff --git a/libremakepkg b/libremakepkg
index 5a04b4b..2f90cce 100755
--- a/libremakepkg
+++ b/libremakepkg
@@ -67,7 +67,9 @@ function buildenv { # Mounts *DEST from makepkg.conf
function clean_chroot { # Clean packages with pacman
plain "making list of packages in ${CHROOTDIR}/${CHROOTNAME}/root/"
- cp "/etc/libretools.d/cleansystem" "${CHROOTDIR}/${CHROOTNAME}/root/cleansystem"
+ echo "sudo
+" > "${CHROOTDIR}/${CHROOTNAME}/root/cleansystem"
+ pacman -Sgq base base-devel >> "${CHROOTDIR}/${CHROOTNAME}/root/cleansystem"
(cat <<EOF
#!/bin/bash
export LANG=C
diff --git a/toru b/toru
index d622510..b71fb8c 100755
--- a/toru
+++ b/toru
@@ -15,9 +15,17 @@
source /etc/abs.conf
source /etc/libretools.conf
+# TODO: clean usage instructions
+function usage {
+ echo "$0 [options] repo1 ... repon"
+ echo
+ echo "-h : this message"
+ exit 1
+}
+
if [ ! -w "$TORUPATH" ]; then
error "Toru's path isn't writable. Please check $TORUPATH"
- exit 1
+ exit 1
fi
# TODO move to common functions
@@ -115,7 +123,7 @@ split_pkgname_from_pkgver() {
sed "s/^\(.\+\)-\([^-]\+-[^-]\+\)$/\1 \2/" $1
}
-# Get the fullpkgver
+# Get the fullpkgver
# pkgname from pkgver separator can be either '-' or ' '
extract_fullpkgver() {
echo "$@" | tr " " "\n" | sed "s/^.\+[ -]\([^-]\+-[^-]\+\)$/\1/"