Bug 16141 - "any2djvu -q" returns wrong status code
Summary: "any2djvu -q" returns wrong status code
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: djvu-utils (show other bugs)
Version: unstable
Hardware: all Linux
: P2 normal
Assignee: Evgeny Sinelnikov
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-23 16:27 MSD by Ivan Zakharyaschev
Modified: 2022-04-02 11:19 MSK (History)
4 users (show)

See Also:


Attachments
any2djvu-q-status.diff (1.08 KB, patch)
2008-06-23 16:47 MSD, Ivan Zakharyaschev
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Zakharyaschev 2008-06-23 16:27:52 MSD
$ rpm -qf "$(which any2djvu)"
djvu-utils-3.5.17-alt2

Although everything is right, it returns non-OK code (1) (and this is not good for automatic use of the tool, e.g., in Makefiles):

$ any2djvu -q HNG_TITLE.pdf; echo $?
Пнд Июн 23 12:23:40 UTC 2008 Processing HNG_TITLE ...
1
$ tail HNG_TITLE-any2djvu.log 
<b>Original file 79660 bytes; DjVu file 6570 bytes</b>
<hr size=2 noshade><b>All done! Here is your new DjVu document: <a href=djvu/080623/89.222.150.36/29302.080623082332.djvu>djvu/080623/89.222.150.36/29302.080623082332.djvu</a></b><hr size=2 noshade>
<br clear=all><object classid="clsid:0e8d0700-75df-11d3-8b4a-0008c7450c4a" width=100% height=100%> <param name="imageURL" value="djvu/080623/89.222.150.36/29302.080623082332.djvu" align="center" width="100%" height="100%" hspace="0" vspace="0"> <embed type="image/x.djvu" src="djvu/080623/89.222.150.36/29302.080623082332.djvu" align="center" width="100%" height="100%" hspace="0" vspace="0"> </embed> </object>
</blockquote>

<BR>
<p><a href="index.html"><b><i>Any2DjVu Server</i></b></a></p>
</CENTER>
</BODY>
</HTML>
$ ls
HNG_TITLE-any2djvu.log  HNG_TITLE.djvu  HNG_TITLE.pdf
$
Comment 1 Ivan Zakharyaschev 2008-06-23 16:47:49 MSD
Created attachment 2681 [details]
any2djvu-q-status.diff

Fixes the wrong exit code of "any2djvu -q" (by using real conditionals).
Comment 2 Evgeny Sinelnikov 2009-05-04 21:14:07 MSD
А в новой версии этот патч актуален? Проблема осталась или решилась?
Comment 3 Grigory Ustinov 2018-04-05 18:00:44 MSK
В версии 3.5.25.3-alt1 бага всё ещё присутствует!
Comment 4 Konstantin A Lepikhov (L.A. Kostis) 2022-04-01 10:22:26 MSK
(In reply to Grigory Ustinov from comment #3)
> В версии 3.5.25.3-alt1 бага всё ещё присутствует!

Что насчет текущей версии в сизифе?
Comment 5 Grigory Ustinov 2022-04-01 11:24:31 MSK
Да, присутствует.

[grenka@localhost ~]$ rpm -q djvu-utils
djvu-utils-3.5.28-alt1.x86_64
[grenka@localhost ~]$ wget -q http://www.triumphtiger.ru/manuals/Triumph_Tiger_955i_User_manual.pdf
[grenka@localhost ~]$ any2djvu -q Triumph_Tiger_955i_User_manual.pdf; echo $?
WARNING!

any2djvu uses an external server which is willing to perform the
conversion and requires the document transfer over to that server.
There is a security issue in operating on documents not intended for
widespread distribution, which could be partially although not
completely ameliorated by using a secure web connection.

Do you acknowledge and allow the transmission of the document?
(Type 'yes' to acknowledge. You can define non-empty environment
 variable DJVU_ONLINE_ACK to avoid seeing this dialog, or use -a
 command line parameter to any2djvu).
[yes/no]:yes
Fri Apr 1 08:23:22 AM UTC 2022 Processing Triumph_Tiger_955i_User_manual ...
1
[grenka@localhost ~]$
Comment 6 Repository Robot 2022-04-02 11:19:23 MSK
djvu-3.5.28-alt2 -> sisyphus:

 Fri Apr 01 2022 L.A. Kostis <lakostis@altlinux.ru> 3.5.28-alt2
 - any2djvu: fix exit code (ALT#16141).
 - apply fixes from git:
   + Reviewed Fedora patches and adopted some of them.
   + DjVuToPS fix for images without foreground.
   + fix for incorrect resolution in tiff tags.
   + fix for upstream bug #302.
   + Improved merge_and_split_ccs does not join large cc pieces.