data/rules/hplip_cron only works with english locale

Bug #1054584 reported by Daniel Pielmeier
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
HPLIP
Fix Released
Undecided
Unassigned
Gentoo Linux
Fix Released
Medium

Bug Description

In data/rules/hplip_cron the output of du follows a grep after "total". This only works for an english locale because total is translated in other locales.

Revision history for this message
In , Ecki-k (ecki-k) wrote :

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.

Revision history for this message
Daniel Pielmeier (daniel-pielmeier) wrote :
Revision history for this message
In , Billie-gentoo (billie-gentoo) wrote :

+*hplip-3.12.9-r1 (22 Sep 2012)
+
+ 22 Sep 2012; Daniel Pielmeier <email address hidden> +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.

Changed in gentoo:
importance: Unknown → Medium
status: Unknown → Fix Released
Changed in hplip:
status: New → Fix Committed
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.