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 02-27-2009, 01:44 PM
Xavier Chantry
 
Default repo-add : fix package variables declaration

- arch was missing

- backup is not used by repo-add. However makepkg still needs to put it in
PKGINFO because pacman uses it

- startdir is no longer used after the new delta implementation

- the declaration of group, depend, backup, etc is not needed because these
variables are always declared before being used :
declare $var="$val"
case "$var" in
group) _groups="$_groups$group
" ;;

- reorder the variables declaration to follow the same order than they are
written to the depends and desc file, for making future checks easier

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
---
scripts/repo-add.sh.in | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index 504adfd..4097a11 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -180,10 +180,8 @@ db_write_entry()
{
# blank out all variables
local pkgfile="$1"
- local pkgname pkgver pkgdesc url builddate packager csize size
- group depend backup license replaces provides conflict force
- _groups _depends _backups _licenses _replaces _provides _conflicts
- startdir optdepend _optdepends md5sum
+ local pkgname pkgver pkgdesc csize size md5sum url arch builddate packager force
+ _groups _licenses _replaces _depends _conflicts _provides _optdepends

local OLDIFS="$IFS"
# IFS (field separator) is only the newline character
@@ -200,12 +198,11 @@ db_write_entry()
declare $var="$val"
case "$var" in
group) _groups="$_groups$group
" ;;
- depend) _depends="$_depends$depend
" ;;
- backup) _backups="$_backups$backup
" ;;
license) _licenses="$_licenses$license
" ;;
replaces) _replaces="$_replaces$replaces
" ;;
- provides) _provides="$_provides$provides
" ;;
+ depend) _depends="$_depends$depend
" ;;
conflict) _conflicts="$_conflicts$conflict
" ;;
+ provides) _provides="$_provides$provides
" ;;
optdepend) _optdepends="$_optdepends$optdepend
" ;;
esac
done
@@ -222,7 +219,6 @@ db_write_entry()
return 1
fi

- startdir=$(pwd)
pushd "$gstmpdir" 2>&1 >/dev/null

if [ -d "$pkgname-$pkgver" ]; then
--
1.6.1.3

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://www.archlinux.org/mailman/listinfo/pacman-dev
 

Thread Tools




All times are GMT. The time now is 11:50 PM.

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