From 5f1ef1bd95e2aa1d5b596d929e12e55e8f00f3d2 Mon Sep 17 00:00:00 2001 From: Joshua Ismael Haase Hernández Date: Fri, 9 Dec 2011 06:09:22 -0600 Subject: "cleansystem is sorted" --- cleansystem | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/cleansystem b/cleansystem index 8da434b..5aae1df 100644 --- a/cleansystem +++ b/cleansystem @@ -1,13 +1,8 @@ -bzip2 -filesystem -initscripts -licenses-libre -linux-libre -pacman -pacman-mirrorlist-libre -your-freedom +autoconf +automake bash binutils +bison bzip2 coreutils cronie @@ -16,9 +11,13 @@ device-mapper dhcpcd diffutils e2fsprogs +fakeroot file +filesystem findutils +flex gawk +gcc gcc-libs gettext glibc @@ -26,25 +25,36 @@ grep gzip heirloom-mailx inetutils +initscripts iputils jfsutils less libpipeline +libtool +licenses-libre +linux-libre logrotate lvm2 +m4 +make man-db man-pages mdadm nano +pacman +pacman-mirrorlist-libre +patch pciutils pcmciautils perl +pkg-config ppp procps psmisc reiserfsprogs sed shadow +sudo sysfsutils syslog-ng sysvinit @@ -58,15 +68,4 @@ wget which wpa_supplicant xfsprogs -autoconf -automake -bison -fakeroot -flex -gcc -libtool -m4 -make -patch -pkg-config -sudo +your-freedom -- cgit v1.2.3-54-g00ecf From dce177d9f929c18d5eb2b5164b18f92c701a0052 Mon Sep 17 00:00:00 2001 From: Joshua Ismael Haase Hernández Date: Wed, 21 Dec 2011 01:14:32 -0600 Subject: Some usage messages added --- AUTHORS | 2 +- is_built | 17 +++++++++++++++-- toru | 12 ++++++++++-- 3 files changed, 26 insertions(+), 5 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/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/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/" -- cgit v1.2.3-54-g00ecf From 32b6057b15e4f0872b9ebd51038c72b0d681cb80 Mon Sep 17 00:00:00 2001 From: Joshua Ismael Haase Hernández Date: Wed, 21 Dec 2011 13:58:41 -0600 Subject: create cleansystem list every time --- cleansystem | 71 ------------------------------------------------------------ libremakepkg | 4 +++- 2 files changed, 3 insertions(+), 72 deletions(-) delete mode 100644 cleansystem diff --git a/cleansystem b/cleansystem deleted file mode 100644 index 5aae1df..0000000 --- a/cleansystem +++ /dev/null @@ -1,71 +0,0 @@ -autoconf -automake -bash -binutils -bison -bzip2 -coreutils -cronie -cryptsetup -device-mapper -dhcpcd -diffutils -e2fsprogs -fakeroot -file -filesystem -findutils -flex -gawk -gcc -gcc-libs -gettext -glibc -grep -gzip -heirloom-mailx -inetutils -initscripts -iputils -jfsutils -less -libpipeline -libtool -licenses-libre -linux-libre -logrotate -lvm2 -m4 -make -man-db -man-pages -mdadm -nano -pacman -pacman-mirrorlist-libre -patch -pciutils -pcmciautils -perl -pkg-config -ppp -procps -psmisc -reiserfsprogs -sed -shadow -sudo -sysfsutils -syslog-ng -sysvinit -tar -texinfo -udev -usbutils -util-linux -vi -wget -which -wpa_supplicant -xfsprogs -your-freedom diff --git a/libremakepkg b/libremakepkg index 292e4b5..cb71300 100755 --- a/libremakepkg +++ b/libremakepkg @@ -64,7 +64,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 <