[pacman-dev] [PATCH] contrib/bacman: fix package architecture in filename
Give the generated package the correct architecture in its filename rather than assuming the system architecture. Also add updated copyright notice. Signed-off-by: Allan McRae <allan@archlinux.org> --- contrib/bacman.sh.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/bacman.sh.in b/contrib/bacman.sh.in index ffb9d6d..7895a40 100644 --- a/contrib/bacman.sh.in +++ b/contrib/bacman.sh.in @@ -4,7 +4,8 @@ # This script rebuilds an already installed package using metadata # stored into the pacman database and system files # -# (c) 2008 - locci <carlocci_at_gmail_dot_com> +# Copyright (c) 2008 locci <carlocci_at_gmail_dot_com> +# Copyright (c) 2008-2012 Pacman Development Team <pacman-dev@archlinux.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -90,7 +91,6 @@ if [[ -r ~/.makepkg.conf ]]; then source ~/.makepkg.conf fi -pkg_arch=${CARCH:-'unknown'} pkg_dest="${PKGDEST:-$PWD}" pkg_pkger=${PACKAGER:-'Unknown Packager'} @@ -186,7 +186,6 @@ fi echo "# $(LC_ALL=C date)" >> .PKGINFO echo "#" >> .PKGINFO -cat "$pkg_dir"/{desc,files} | while read i; do if [[ -z $i ]]; then continue; @@ -216,6 +215,7 @@ while read i; do ;; %ARCH%) echo "arch = $i" >> .PKGINFO + pkg_arch="$i" ;; %BUILDDATE%) echo "builddate = $(date -u "+%s")" >> .PKGINFO @@ -251,7 +251,7 @@ while read i; do echo "backup = ${i%%$'\t'*}" >> .PKGINFO ;; esac -done +done < <(cat "$pkg_dir"/{desc,files}) comp_files=".PKGINFO" -- 1.7.11.1
The wrong test file was inadvertantly committed in 44e9fdd0. Add the correct test and tidy up the test which was committed. Signed-off-by: Allan McRae <allan@archlinux.org> --- Oops! test/pacman/tests/fileconflict011.py | 17 +++++++++++++++++ test/pacman/tests/fileconflict012.py | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 test/pacman/tests/fileconflict011.py diff --git a/test/pacman/tests/fileconflict011.py b/test/pacman/tests/fileconflict011.py new file mode 100644 index 0000000..af48a06 --- /dev/null +++ b/test/pacman/tests/fileconflict011.py @@ -0,0 +1,17 @@ +self.description = "dir->file change during package upgrade (filesystem directory conflict)" + +lp1 = pmpkg("pkg1") +lp1.files = ["dir/"] +self.addpkg2db("local", lp1) + +self.filesystem = ["dir/conflict/"] + +p = pmpkg("pkg1", "1.0-2") +p.files = ["dir"] +self.addpkg2db("sync", p) + +self.args = "-S pkg1" + +self.addrule("PACMAN_RETCODE=1") +self.addrule("PKG_VERSION=pkg1|1.0-1") +self.addrule("DIR_EXIST=dir/conflict/") diff --git a/test/pacman/tests/fileconflict012.py b/test/pacman/tests/fileconflict012.py index 421b739..95ab568 100644 --- a/test/pacman/tests/fileconflict012.py +++ b/test/pacman/tests/fileconflict012.py @@ -14,4 +14,4 @@ self.addrule("PACMAN_RETCODE=1") self.addrule("PKG_VERSION=pkg1|1.0-1") -self.addrule("DIR_EXIST=dir/") +self.addrule("FILE_EXIST=dir/file") -- 1.7.11.1
participants (1)
-
Allan McRae