From: Tobias Geerinckx-Rice via Guix-patches via <guix-patches@gnu.org>
To: "Jakub Kądziołka" <kuba@kadziolka.net>
Cc: 39647@debbugs.gnu.org
Subject: [bug#39647] [PATCH] gnu: Add unoconv.
Date: Fri, 21 Feb 2020 02:24:32 +0100 [thread overview]
Message-ID: <87imk0ybov.fsf@nckx> (raw)
In-Reply-To: <20200220204728.gzzf7ja4ljmcbkbw@gravity>
[-- Attachment #1.1: Type: text/plain, Size: 337 bytes --]
Jakub!
Jakub Kądziołka 写道:
> unoconv: format
> [jw4yj39s84jb4fkvqpsqwq-unoconv-0.9.0/bin/.unoconv-real] is not
> known to unoconv.
>
> I feel like this might be an issue with the packaging. Does it
> work for
> you?
I don't see how this could be related to packaging… And it works
just fine on my laptop:
[-- Attachment #1.2: Type: text/plain, Size: 150 bytes --]
me@lapdog $ guix env --{pure,ad-hoc} unoconv coreutils¹ grep¹ \
-- unoconv test-file.odt
me@lapdog $ # a pretty .pdf file is born!
[-- Attachment #1.3: Type: text/plain, Size: 44 bytes --]
But fine, I'll try it on another machine:
[-- Attachment #1.4: Type: text/plain, Size: 106 bytes --]
me@server $ guix env --{pure,ad-hoc} unoconv coreutils grep \
-- unoconv test-file.odt
…
[-- Attachment #1.5: Type: text/plain, Size: 188 bytes --]
—and here's where I must stop to thank you for reporting the
BESTEST BUG of 2020. Seriously. This made my day. I laughed! I
cried!
Let's take another look at your error:
[-- Attachment #1.6: Type: text/plain, Size: 166 bytes --]
% unoconv ~/Downloads/scheme-macro-phd.ps -o scheme-macro-phd.pdf
unoconv: format
[jw4yj39s84jb4fkvqpsqwq-unoconv-0.9.0/bin/.unoconv-real] is not
known to unoconv.
[-- Attachment #1.7: Type: text/plain, Size: 156 bytes --]
So… it's obvious that unoconv is erroneously parsing argv0 as
target format. Indeed, on both my machines, using the explicit
‘-f <format>’
[-- Attachment #1.8: Type: text/plain, Size: 40 bytes --]
guix@env $ unoconv -f pdf test-file.odt
[-- Attachment #1.9: Type: text/plain, Size: 175 bytes --]
returns success and a .pdf file.
So is the long /gnu/store/… name overflowing a buffer? Perhaps
the wrapper script is to blame? Maybe I should look at the co—
[-- Attachment #1.10: Type: text/plain, Size: 253 bytes --]
### If no format was specified, probe it or provide it
if not self.format:
### Check if the command is in the form odt2pdf
l = sys.argv[0].split('2')
if len(l) == 2:
self.format = l[1]
[-- Attachment #1.11: Type: text/plain, Size: 1221 bytes --]
Oh. Oh my.
I'd like to bet that the character before
‘jw4yj39s84jb4fkvqpsqwq-unoconv-0.9.0/’ in your store name is a
‘2’. Because that's what it is on my server. By sheer chance,
the store name on my lapdog has TWO 2s, and so unoconv chugs
blissfully onward.
I'm not sure what kind of fix upstream will accept for this. At
least a length limit, surely. In the mean time it's trivial to
just substitute* this out, since we won't ship any foo2bar
symlinks our this package anyway.
>> + (add-after 'unpack 'patch-find_offices
> I think that the convention is to replace underscores by dashes
> in names
> like these.
Then I gladly thwart it.
> Wouldn't it be simpler to do
>
> return [Office(...)]
>
> ?
Yep.
My reasoning at the time was literally: ‘well… I should closely
emulate upstream style [they use ret = … and append()] because
I've never written a Python in my life, and they have, so they
obviously know what they're doing.’
Needless to say, I'm currently reconsidering that opinion.
Thanks,
T G-R
[1]: ‘coreutils’ & ‘grep’ are undeclared dependencies of ‘soffice’
— will fix, but not relevant here.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2020-02-21 1:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-17 18:25 [bug#39647] [PATCH] gnu: Add unoconv Tobias Geerinckx-Rice via Guix-patches via
2020-02-20 20:47 ` Jakub Kądziołka
2020-02-21 1:24 ` Tobias Geerinckx-Rice via Guix-patches via [this message]
2020-02-21 1:29 ` Tobias Geerinckx-Rice via Guix-patches via
2020-02-21 2:40 ` [bug#39647] [PATCH v2] " Tobias Geerinckx-Rice via Guix-patches via
2020-02-22 14:49 ` bug#39647: " Jakub Kądziołka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87imk0ybov.fsf@nckx \
--to=guix-patches@gnu.org \
--cc=39647@debbugs.gnu.org \
--cc=kuba@kadziolka.net \
--cc=me@tobias.gr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.