Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 556590 - =app-text/tesseract-3.04.00-r1 incorrect URI_PREFIX
Summary: =app-text/tesseract-3.04.00-r1 incorrect URI_PREFIX
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Thomas Kahle (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2015-08-03 17:25 UTC by theprogrammernerd
Modified: 2015-08-04 08:07 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fixes to the ebuild (tesseract-3.04.00-r1.ebuild.patch,4.41 KB, patch)
2015-08-03 17:25 UTC, theprogrammernerd
Details | Diff
Updated manifest file. It still needs to be signed. (Manifest,40.85 KB, text/plain)
2015-08-03 17:25 UTC, theprogrammernerd
Details
Superseeds the old patch. I forgot to fix the doins which used the wrong path. (tesseract-3.04.00-r1.ebuild.patch,4.79 KB, patch)
2015-08-03 18:15 UTC, theprogrammernerd
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description theprogrammernerd 2015-08-03 17:25:01 UTC
Created attachment 408204 [details, diff]
Fixes to the ebuild

The URI prefix is wrong. This causes a sha256 verification error and causes it to download Github webpages instead of the needed files. The attached patch fixes that. It also created the necessity to update the manifest file. Because it appears as though I am only allowed to attach one file per message the next file will in my reply.
Comment 1 theprogrammernerd 2015-08-03 17:25:38 UTC
Created attachment 408206 [details]
Updated manifest file. It still needs to be signed.
Comment 2 theprogrammernerd 2015-08-03 18:15:35 UTC
Created attachment 408208 [details, diff]
Superseeds the old patch. I forgot to fix the doins which used the wrong path.

This patch allows for a successful emerge. Ignore the old patch.
Comment 3 Mike Gilbert gentoo-dev 2015-08-03 21:00:05 UTC
While you are at it, you should really add a version number (${PV}) to the filenames using SRC_URI arrow syntax so that the files do not overlap in DISTDIR.
Comment 4 Mike Gilbert gentoo-dev 2015-08-03 21:04:06 UTC
To clarify, you want something like this:

linguas_el? ( ${URI_PREFIX}/ell.traineddata -> ell.traineddata-${PV} )
Comment 5 Thomas Kahle (RETIRED) gentoo-dev 2015-08-04 08:00:03 UTC
Sorry for all this major screw-up.  Yesterday was not my day.  I hope I've fixed the ebuild properly now.

- All distfiles are suffixed with the version number (although the language files will see releases much more seldom than source files...)
- Installation was simplified and corrected 
- URI was corrected
- Confirmed that OCR worked (for English, with pdfsandwich)
Comment 6 Carlos Salvador Pérez Salgado 2015-08-04 08:05:10 UTC
(In reply to theprogrammernerd from comment #0)
> Created attachment 408204 [details, diff] [details, diff]
> Fixes to the ebuild
> 
> The URI prefix is wrong. This causes a sha256 verification error and causes
> it to download Github webpages instead of the needed files. The attached
> patch fixes that. It also created the necessity to update the manifest file.
> Because it appears as though I am only allowed to attach one file per
> message the next file will in my reply.


Manually applying your instructions (attachment 408208 [details, diff]) and adding the "-p" flag to the mkdir line in src_unpack did the trick for me.

--- tesseract-3.04.00-r1.ebuild
+++ tesseract-3.04.00-r1.ebuild
@@ -78,7 +78,7 @@
 src_unpack() {
 	unpack ${PV}.tar.gz
 	use doc && unpack tesseract-ocr-3.02.02-doc-html.tar.gz
-	mkdir -p "${WORKDIR}"/tesseract-ocr/tessdata || die
+	mkdir "${WORKDIR}"/tesseract-ocr/tessdata || die
 	cp "${DISTDIR}"/*.traineddata "${WORKDIR}"/tesseract-ocr/tessdata/ || die
 }


Thank you.
Comment 7 Thomas Kahle (RETIRED) gentoo-dev 2015-08-04 08:07:52 UTC
The solution that I just added to CVS is better (hopefully), please wait a few hours, sync, and try the in tree ebuild.  The attached diff has other errors.