app-misc/jdupes: Fix Failing Tests

Added a patch to create a simple test script and enabled the patch in
the ebuild. Tests now work.
This fixes Bug 80796 (app-misc/jdupes-1.20.0 fails tests).

Package-Manager: Portage-3.0.20, Repoman-3.0.2
Signed-off-by: Alexander Edward Holcomb <alex@alexsdigital.rodeo>
This commit is contained in:
Alexander Edward Holcomb
2021-08-16 11:49:47 -05:00
parent f201443d38
commit 12da65c4d4
4 changed files with 26 additions and 25 deletions

View File

@@ -1 +1 @@
DIST jdupes-1.20.0.tar.gz 93809 BLAKE2B cce6ca06794ee3af9523e3c86550ff2b49a5f42a13278bd61c99099b4c2cab1a392bc973c44593acb23b7e8f99d4f23518f526244182a0d9d3b4084e80cc1015 SHA512 62bb78a902e77f0c9acce93c7c139fc2aaa5911aa85322a372dd0e6b375ee5c4992e91b821fa3f9eb407820657f57591303c9bc14a9fe453d9a4c5651caf05ff DIST v1.20.0.tar.gz 93809 BLAKE2B cce6ca06794ee3af9523e3c86550ff2b49a5f42a13278bd61c99099b4c2cab1a392bc973c44593acb23b7e8f99d4f23518f526244182a0d9d3b4084e80cc1015 SHA512 62bb78a902e77f0c9acce93c7c139fc2aaa5911aa85322a372dd0e6b375ee5c4992e91b821fa3f9eb407820657f57591303c9bc14a9fe453d9a4c5651caf05ff

View File

@@ -0,0 +1,10 @@
--- ${WORKDIR}/test.sh 2021-08-14 12:44:02.609722687 -0500
+++ ${WORKDIR}/test.sh 2021-08-14 12:46:18.505023762 -0500
@@ -0,0 +1,7 @@
+#!/bin/bash
+if [[ $(./jdupes -rmq testdir) = "71 duplicate files (in 22 sets), occupying 79 KB" ]]; then
+ echo "Test successful."
+else
+ echo "Test failed."
+ exit 1
+fi

View File

@@ -3,32 +3,28 @@
EAPI=7 EAPI=7
inherit toolchain-funcs
DESCRIPTION="Identify and manipulate duplicate files" DESCRIPTION="Identify and manipulate duplicate files"
HOMEPAGE="https://www.jodybruchon.com/software/#jdupes HOMEPAGE="https://www.jodybruchon.com/software/#jdupes"
https://github.com/jbruchon/jdupes" SRC_URI="https://github.com/jbruchon/jdupes/archive/refs/tags/v${PV}.tar.gz"
SRC_URI="https://github.com/jbruchon/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" PATCHES=(
"${FILESDIR}/${P}-test.sh.patch")
LICENSE="MIT" LICENSE="MIT"
SLOT="0" SLOT="0"
KEYWORDS="~amd64 ~x86" KEYWORDS="~amd64 ~x86"
IUSE="low-memory" IUSE=""
# ./test.sh: No such file or directory RDEPEND=""
RESTRICT="test"
DOCS=( CHANGES README.md README.stupid_dupes )
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
src_prepare(){
eapply "${FILESDIR}/${P}-test.sh.patch"
chmod +x test.sh
eapply_user
}
src_configure() { src_configure() {
tc-export CC sed -in 's/local//' Makefile
} }
src_compile() { src_compile() {
emake ENABLE_DEDUPE=1 HARDEN=1 LOW_MEMORY=$(usex low-memory 1 0) emake
}
src_install() {
emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
einstalldocs
} }

View File

@@ -14,10 +14,5 @@
files. It was forked from fdupes, and intends to accomplish the files. It was forked from fdupes, and intends to accomplish the
same result while adding features and being noticeably faster. same result while adding features and being noticeably faster.
</longdescription> </longdescription>
<use>
<flag name="low-memory">
Build for low memory usage at the expense of speed and features
</flag>
</use>
</pkgmetadata> </pkgmetadata>