Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   ArchLinux Pacman Development (http://www.linux-archive.org/archlinux-pacman-development/)
-   -   add 'force' to PKGINFO, have repo-add respect it. (http://www.linux-archive.org/archlinux-pacman-development/45700-add-force-pkginfo-have-repo-add-respect.html)

Chantry Xavier 02-02-2008 09:50 PM

add 'force' to PKGINFO, have repo-add respect it.
 
Ref: http://www.archlinux.org/pipermail/pacman-dev/2008-January/011023.html

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

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 0997386..68ad597 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -810,6 +810,9 @@ create_package() {
if [ "$CARCH" != "" ]; then
echo "arch = $CARCH" >>.PKGINFO
fi
+ if [ "$(check_option force)" = "y" ]; then
+ echo "force = true" >> .PKGINFO
+ fi

local it
for it in "${license[@]}"; do
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index c37a12f..efd3bc0 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -136,7 +136,7 @@ db_write_entry()
# blank out all variables and set pkgfile
local pkgfile=$(readlink -f "$1")
local pkgname pkgver pkgdesc url builddate packager csize size
- group depend backup license replaces provides conflict
+ group depend backup license replaces provides conflict force
_groups _depends _backups _licenses _replaces _provides _conflicts
startdir

@@ -209,7 +209,7 @@ db_write_entry()
[ -n "$builddate" ] && echo -e "%BUILDDATE%
$builddate
" >>desc
[ -n "$packager" ] && echo -e "%PACKAGER%
$packager
" >>desc
write_list_entry "REPLACES" "$_replaces" "desc"
- [ $FORCE -eq 1 ] && echo -e "%FORCE%
" >>desc
+ [ $FORCE -eq 1 -o -n "$force" ] && echo -e "%FORCE%
" >>desc

# create depends entry
msg2 "$(gettext "Creating 'depends' db entry...")"
--
1.5.4.rc4


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

"Dan McGee" 02-02-2008 10:06 PM

add 'force' to PKGINFO, have repo-add respect it.
 
On Feb 2, 2008 4:50 PM, Chantry Xavier <shiningxc@gmail.com> wrote:
> Ref: http://www.archlinux.org/pipermail/pacman-dev/2008-January/011023.html
>
> Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
> ---
> scripts/makepkg.sh.in | 3 +++
> scripts/repo-add.sh.in | 4 ++--
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index 0997386..68ad597 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -810,6 +810,9 @@ create_package() {
> if [ "$CARCH" != "" ]; then
> echo "arch = $CARCH" >>.PKGINFO
> fi
> + if [ "$(check_option force)" = "y" ]; then
> + echo "force = true" >> .PKGINFO
> + fi
Good.

>
> local it
> for it in "${license[@]}"; do
> diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
> index c37a12f..efd3bc0 100644
> --- a/scripts/repo-add.sh.in
> +++ b/scripts/repo-add.sh.in
> @@ -136,7 +136,7 @@ db_write_entry()
> # blank out all variables and set pkgfile
> local pkgfile=$(readlink -f "$1")
> local pkgname pkgver pkgdesc url builddate packager csize size
> - group depend backup license replaces provides conflict
> + group depend backup license replaces provides conflict force
> _groups _depends _backups _licenses _replaces _provides _conflicts
> startdir
>
> @@ -209,7 +209,7 @@ db_write_entry()
> [ -n "$builddate" ] && echo -e "%BUILDDATE%
$builddate
" >>desc
> [ -n "$packager" ] && echo -e "%PACKAGER%
$packager
" >>desc
> write_list_entry "REPLACES" "$_replaces" "desc"
> - [ $FORCE -eq 1 ] && echo -e "%FORCE%
" >>desc
> + [ $FORCE -eq 1 -o -n "$force" ] && echo -e "%FORCE%
" >>desc

Seems good to me. Master or maint for this one? Asking anyone on the
list that has an opinion. Being that it is non-intrusive for most
people, I'm fine with maint.

-Dan

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

"Roman Kyrylych" 02-04-2008 10:19 AM

add 'force' to PKGINFO, have repo-add respect it.
 
2008/2/3, Xavier <shiningxc@gmail.com>:
> Dan McGee wrote:
> >
> > Seems good to me. Master or maint for this one? Asking anyone on the
> > list that has an opinion. Being that it is non-intrusive for most
> > people, I'm fine with maint.
> >
>
> I see this as a bugfix. Have a look at FS#9347 and FS#9349.
> And yes, it should also be non intrusive.

Agree.

--
Roman Kyrylych (*оман Кирилич)
_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev


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

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.