FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 06-27-2011, 06:29 PM
Dan McGee
 
Default pacman-optimize: use output library

We already use msg() and error() in here, might as well just use the
standard functions. In addition, fix one translated message that would
have printed ERROR twice if anyone ever saw it.

Signed-off-by: Dan McGee <dan@archlinux.org>
---
scripts/Makefile.am | 4 +++-
scripts/pacman-optimize.sh.in | 12 ++----------
2 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 492eb0f..e34c300 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -82,7 +82,9 @@ pacman-key:
$(srcdir)/pacman-key.sh.in
$(srcdir)/library/output_format.sh

-pacman-optimize: $(srcdir)/pacman-optimize.sh.in
+pacman-optimize:
+ $(srcdir)/pacman-optimize.sh.in
+ $(srcdir)/library/output_format.sh

pkgdelta:
$(srcdir)/pkgdelta.sh.in
diff --git a/scripts/pacman-optimize.sh.in b/scripts/pacman-optimize.sh.in
index c9d42d2..0dc32bf 100644
--- a/scripts/pacman-optimize.sh.in
+++ b/scripts/pacman-optimize.sh.in
@@ -29,15 +29,7 @@ myver='@PACKAGE_VERSION@'
eval $(awk '/DBPath/ {print $1$2$3}' @sysconfdir@/pacman.conf)
dbroot="${DBPath:-@localstatedir@/lib/pacman/}"

-msg() {
- local mesg=$1; shift
- printf "==> ${mesg}
" "$@" >&2
-}
-
-error () {
- local mesg=$1; shift
- printf "==> ERROR: ${mesg}
" "$@" >&2
-}
+m4_include(library/output_format.sh)

usage() {
printf "pacman-optimize (pacman) %s

" "$myver"
@@ -122,7 +114,7 @@ fi
touch "$lockfile"

workdir=$(mktemp -d /tmp/pacman-optimize.XXXXXXXXXX) ||
- die_r "$(gettext "ERROR: Can not create temp directory for database building.")
" >&2
+ die_r "$(gettext "Can not create temp directory for database building.")
" >&2

# step 1: sum the old db
msg "$(gettext "MD5sum'ing the old database...")"
--
1.7.5.4
 

Thread Tools




All times are GMT. The time now is 01:16 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org