Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 435606 - net-print/hplip - /etc/cron.daily/hplip_cron: line 17: [: -gt: unary operator expected.
Summary: net-print/hplip - /etc/cron.daily/hplip_cron: line 17: [: -gt: unary operator...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Daniel Pielmeier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-20 07:10 UTC by Eckard Brauer
Modified: 2012-09-22 13:53 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eckard Brauer 2012-09-20 07:10:09 UTC
cron logs (error mail) lines like (translated):

/etc/cron.daily/hplip_cron: line 17: [: -gt: unary operator expected.

when system language is not english.

Reproducible: Always

Steps to Reproduce:
1. export both LANG and LC_ALL as non-english ('de_DE.UTF8' in my case) in /etc/profile.env
2. have cron execute /etc/cron.daily/hplip_cron
Actual Results:  
cron sends email:

/etc/cron.daily/hplip_cron: line 17: [: -gt: unary operator expected.

Expected Results:  
no error message at all

add the following lines:

# make "du" show the result we try to grep for
LANG=C
LC_ALL=C

before line 18 of the cron script.
Comment 1 Daniel Pielmeier gentoo-dev 2012-09-22 13:53:15 UTC
+*hplip-3.12.9-r1 (22 Sep 2012)
+
+  22 Sep 2012; Daniel Pielmeier <billie@gentoo.org> +hplip-3.12.9-r1.ebuild,
+  metadata.xml:
+  Fix bug #435606, cron file not working with locales other than english.
+  Thanks to Eckard Brauer for the report. Remove unused acl USE-description.