Package Details: ocrmypdf 16.2.0-1

Git Clone URL: https://aur.archlinux.org/ocrmypdf.git (read-only, click to copy)
Package Base: ocrmypdf
Description: A tool to add an OCR text layer to scanned PDF files, allowing them to be searched
Upstream URL: https://github.com/ocrmypdf/OCRmyPDF
Licenses: MPL2
Submitter: dreuter
Maintainer: fbrennan (pigmonkey)
Last Packager: pigmonkey
Votes: 109
Popularity: 1.77
First Submitted: 2014-01-27 11:36 (UTC)
Last Updated: 2024-04-19 19:30 (UTC)

Pinned Comments

fbrennan commented on 2023-05-12 22:54 (UTC)

The flag was invalid and has been removed with no action taken as no new version was released. There's nothing to do for this package; no new release has been made. Rebuild, as @eclairevoyant has said.

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 9 10 11 .. 22 Next › Last »

marco.righi commented on 2022-01-11 15:58 (UTC) (edited on 2022-01-11 16:00 (UTC) by marco.righi)

@bsdiceRobert, thanks a lot for your suggestion. I wrote the following code that should re-compile packages one by one. Perhaps the script rebuilds some packages more times but avoids errors that could stop the entire rebuild process.


#!/bin/bash
logfile=~/log/python3xRebuild.log
echo START $(date) |tee -a $logfile
PYDIRS=$(stat -c '%W %n' /usr/lib/python[3-9].* | sort -n | head -n -1 | awk '{ print $2 }')
    if [ -n "$PYDIRS" ]; then
      for d in $PYDIRS; do
        #echo "Found obsolete python directory $d, packages requiring rebuild:"
        for p in $(pacman -Qoq "$d"); do 
            command=$(echo yay -S $p --rebuildtree  --noconfirm)
            echo $command |tee -a $logfile
            eval $command
        done
      done
    fi


bsdice commented on 2022-01-11 15:37 (UTC) (edited on 2022-01-11 15:37 (UTC) by bsdice)

FYI the script snippet will not rebuild anything by itself but only check for directories older than the most current /usr/lib/python3.* directory. If you have python3.10 + python3.9 + python3.8 it will look at only 3.9 and 3.8 and then list all packages referencing these obsolete directories. If you reinstall these packages they should be installed for the most recent 3.10 in this example and while doing so, get removed from 3.9 or 3.8. So if you run the snippet again, the number of packages shown will shrink. In theory you could add

yay --noconfirm --answerdiff None --answerupgrade None "$d" || exit 1

after the "pacman" command before the "done", but better do it manually.

bsdice commented on 2022-01-11 11:31 (UTC)

@marco.righi You can try this within a script:

PYDIRS=$(stat -c '%W %n' /usr/lib/python[3-9].* | sort -n | head -n -1 | awk '{ print $2 }')
if [ -n "$PYDIRS" ]; then
  for d in $PYDIRS; do
    echo "Found obsolete python directory $d, packages requiring rebuild:"
    pacman -Qoq "$d"
  done
fi

Then use yay pikaur or whatever to rebuild anything found.

marco.righi commented on 2022-01-11 09:16 (UTC)

Do you know a script to rebuild all AUR Python dependencies?

nottoday commented on 2021-12-24 14:30 (UTC)

@jbarlow python-pikepdf is on version 4.2.0-1. I've tried updating it to 4.2.0-2 (from the arch repo). But that still gives the same error.

jbarlow commented on 2021-12-24 00:06 (UTC)

@nottoday Python-pikepdf is likely out of date.

nottoday commented on 2021-12-23 16:49 (UTC) (edited on 2021-12-24 13:35 (UTC) by nottoday)

I have a problem that has started since 13.0.0.

The following command

$ ocrmypdf ./test.scan.pdf ./test.pdf

gives the following error output.

    1 [tesseract] lots of diacritics - possibly poor OCR
An exception occurred while executing the pipeline
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/ocrmypdf/_sync.py", line 385, in run_pipeline
    exec_concurrent(context, executor)
  File "/usr/lib/python3.9/site-packages/ocrmypdf/_sync.py", line 274, in exec_concurrent
    executor(
  File "/usr/lib/python3.9/site-packages/ocrmypdf/_concurrent.py", line 82, in __call__
    self._execute(
  File "/usr/lib/python3.9/site-packages/ocrmypdf/builtin_plugins/concurrency.py", line 136, in _execute
    task_finished(result, pbar)
  File "/usr/lib/python3.9/site-packages/ocrmypdf/_sync.py", line 264, in update_page
    ocrgraft.graft_page(
  File "/usr/lib/python3.9/site-packages/ocrmypdf/_graft.py", line 142, in graft_page
    self._graft_text_layer(
  File "/usr/lib/python3.9/site-packages/ocrmypdf/_graft.py", line 304, in _graft_text_layer
    base_page.contents_add(new_text_layer, prepend=True)
AttributeError: contents_add

I'm on Manjaro in case that makes a difference.

Thanks in advance.

malacology commented on 2021-12-14 00:59 (UTC)

okay, thanks it is solved

pigmonkey commented on 2021-12-14 00:50 (UTC)

Python AUR packages need to be rebuilt after Python upgrades.

The version bump I just pushed for 13.1.1 will cause this package to get rebuilt, however you will need to manually rebuild any AUR Python dependencies which have not incremented their pkgrel for the new Python (python-coloredlogs, python-humanfriendly). There's nothing we can do about those from this package.