Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/repo-add.sh.in
diff options
context:
space:
mode:
authorXavier Chantry <shiningxc@gmail.com>2008-08-20 23:01:47 +0200
committerDan McGee <dan@archlinux.org>2008-08-23 17:39:58 -0500
commit7e8f1469c4168875b54956d63884b8583ce99e38 (patch)
tree51b8b425d8bf1e89501c735245828c913f7353ca /scripts/repo-add.sh.in
parent496b687c3d4a56641051700e7c4e5e21b9c6607c (diff)
Remove DB_COMPRESSION and DB_CHECKSUMS from makepkg.conf
DB_COMPRESSION was only used in repo-add and DB_CHECKSUMS was not used anywhere. This also removes the dependency on makepkg.conf in repo-add, so repo-add no longer needs to source makepkg.conf And instead of DB_COMPRESSION, it seems better to just check the extension of the repository file. It does not make sense to have a tar.gz file with a tar.bz2 extension or whatever. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts/repo-add.sh.in')
-rw-r--r--scripts/repo-add.sh.in21
1 files changed, 5 insertions, 16 deletions
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index f3a3a4f4..d6d59eb7 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -305,18 +305,6 @@ else
exit 1 # $E_MISSING_PROGRAM
fi
-# source system and user makepkg.conf
-if [ -r "$confdir/makepkg.conf" ]; then
- source "$confdir/makepkg.conf"
-else
- error "$(gettext "%s not found. Cannot continue.")" "$confdir/makepkg.conf"
- exit 1 # $E_CONFIG_ERROR
-fi
-
-if [ -r ~/.makepkg.conf ]; then
- source ~/.makepkg.conf
-fi
-
# main routine
gstmpdir=$(mktemp -d /tmp/repo-tools.XXXXXXXXXX) || (\
error "$(gettext "Cannot create temp directory for database building.")"; \
@@ -387,10 +375,11 @@ if [ $success -eq 1 ]; then
[ -f "${REPO_DB_FILE}.old" ] && rm "${REPO_DB_FILE}.old"
[ -f "$REPO_DB_FILE" ] && mv "$REPO_DB_FILE" "${REPO_DB_FILE}.old"
- case "$DB_COMPRESSION" in
- gz) TAR_OPT="z" ;;
- bz2) TAR_OPT="j" ;;
- *) warning "$(gettext "No compression set.")" ;;
+ case "$REPO_DB_FILE" in
+ *tar.gz) TAR_OPT="z" ;;
+ *tar.bz2) TAR_OPT="j" ;;
+ *) warning "$(gettext "'%s' does not have a valid archive extension.")" \
+ "$REPO_DB_FILE" ;;
esac
bsdtar -c${TAR_OPT}f "$REPO_DB_FILE" *