diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2018-02-12 16:14:13 +0100 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2018-02-12 16:14:13 +0100 |
commit | ff5c04761b1534110b752bddfe904114cd42f430 (patch) | |
tree | b627475a997995a146726c8be104f6815ebacbb7 /sys-devel/patch | |
parent | app-office/libreoffice-bin-debug: Version bump (diff) | |
download | gentoo-ff5c04761b1534110b752bddfe904114cd42f430.tar.gz gentoo-ff5c04761b1534110b752bddfe904114cd42f430.tar.bz2 gentoo-ff5c04761b1534110b752bddfe904114cd42f430.zip |
sys-devel/patch: Rev bump to fix test suite
Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'sys-devel/patch')
-rw-r--r-- | sys-devel/patch/files/patch-2.7.6-fix-test-suite.patch | 120 | ||||
-rw-r--r-- | sys-devel/patch/patch-2.7.6-r1.ebuild (renamed from sys-devel/patch/patch-2.7.6.ebuild) | 2 |
2 files changed, 122 insertions, 0 deletions
diff --git a/sys-devel/patch/files/patch-2.7.6-fix-test-suite.patch b/sys-devel/patch/files/patch-2.7.6-fix-test-suite.patch new file mode 100644 index 000000000000..3aff5c0f77ba --- /dev/null +++ b/sys-devel/patch/files/patch-2.7.6-fix-test-suite.patch @@ -0,0 +1,120 @@ +http://git.savannah.gnu.org/cgit/patch.git/commit/?id=f6bc5b14bd193859851d15a049bafb1007acd288 +http://git.savannah.gnu.org/cgit/patch.git/commit/?id=074e2395f81d0ecaa66b71a6c228c70b49db72e5 + +--- a/tests/crlf-handling ++++ b/tests/crlf-handling +@@ -14,7 +14,7 @@ use_local_patch + use_tmpdir + + lf2crlf() { +- while read l; do echo -e "$l\r"; done ++ while read l; do printf "%s\r\n" "$l"; done + } + + echo 1 > a +--- a/tests/git-cleanup ++++ b/tests/git-cleanup +@@ -36,8 +36,8 @@ BAD PATCH + EOF + + echo 1 > f +-echo -n '' > g +-echo -n '' > h ++printf '' > g ++printf '' > h + + check 'patch -f -i 1.diff || echo status: $?' <<EOF + patching file f +--- a/tests/merge ++++ b/tests/merge +@@ -30,30 +30,28 @@ x2() { + while test $# -gt 0 && test "$1" != -- ; do + echo "$1" + shift +- done > a.sed +- echo "$body" | sed -f a.sed > b ++ done > b.sed ++ echo "$body" | sed -f b.sed > b + shift + while test $# -gt 0 ; do + echo "$1" + shift +- done > b.sed +- echo "$body" | sed -f b.sed > c +- rm -f a.sed b.sed ++ done > c.sed ++ echo "$body" | sed -f c.sed > c ++ rm -f b.sed c.sed + output=`diff -u a b | patch $ARGS -f c` + status=$? + echo "$output" | sed -e '/^$/d' -e '/^patching file c$/d' + cat c +- test $status == 0 || echo "Status: $status" ++ test $status = 0 || echo "Status: $status" + } + + x() { +- ARGS="$ARGS --merge" x2 "$@" ++ ARGS="--merge" x2 "$@" + echo +- ARGS="$ARGS --merge=diff3" x2 "$@" ++ ARGS="--merge=diff3" x2 "$@" + } + +-unset ARGS +- + # ============================================================== + + check 'x 3' <<EOF +--- a/tests/test-lib.sh ++++ b/tests/test-lib.sh +@@ -41,7 +41,7 @@ use_local_patch() { + + eval 'patch() { + if test -n "$GDB" ; then +- echo -e "\n" >&3 ++ printf "\n\n" >&3 + gdbserver localhost:53153 $PATCH "$@" 2>&3 + else + $PATCH "$@" +@@ -113,22 +113,15 @@ cleanup() { + exit $status + } + +-if test -z "`echo -n`"; then +- if eval 'test -n "${BASH_LINENO[0]}" 2>/dev/null'; then +- eval ' +- _start_test() { +- echo -n "[${BASH_LINENO[2]}] $* -- " +- }' +- else +- eval ' +- _start_test() { +- echo -n "* $* -- " +- }' +- fi ++if eval 'test -n "${BASH_LINENO[0]}" 2>/dev/null'; then ++ eval ' ++ _start_test() { ++ printf "[${BASH_LINENO[2]}] %s -- " "$*" ++ }' + else + eval ' + _start_test() { +- echo "* $*" ++ printf "* %s -- " "$*" + }' + fi + +--- a/tests/merge ++++ b/tests/merge +@@ -32,7 +32,7 @@ x2() { + shift + done > b.sed + echo "$body" | sed -f b.sed > b +- shift ++ test $# -eq 0 || shift + while test $# -gt 0 ; do + echo "$1" + shift +-- diff --git a/sys-devel/patch/patch-2.7.6.ebuild b/sys-devel/patch/patch-2.7.6-r1.ebuild index b16c1511b888..388826a546a1 100644 --- a/sys-devel/patch/patch-2.7.6.ebuild +++ b/sys-devel/patch/patch-2.7.6-r1.ebuild @@ -18,6 +18,8 @@ RDEPEND="xattr? ( sys-apps/attr )" DEPEND="${RDEPEND} test? ( sys-apps/ed )" +PATCHES=( "${FILESDIR}"/${P}-fix-test-suite.patch ) + src_configure() { use static && append-ldflags -static |