[cups.bugs] [MOD] STR #3264: Weird 'sleep 1' required to ensure that 'lpoptions -l' reports correct defaults

jsmeix.suse jsmeix at suse.de
Fri Jul 17 04:07:47 PDT 2009


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

I run CUPS 1.4rc1 and I detected a special timing-effect
regarding which defaults "lpoptions -l" reports
(but I could not find out what the root cause is).

How to reproduce:

lpadmin -p testy -v file:/dev/null-m Postscript.ppd.gz -E ; \
 echo $? ; \
 egrep '^\*DefaultPageSize|^\*PageSize A4|^\*PageSize Letter' \
  /etc/cups/ppd/testy.ppd ; \
 echo $? ; \
 lpoptions -p testy -l | grep PageSize ; \
 echo $? ; \
 lpadmin -p testy -o PageSize=A4 ; \
 echo $? ; \
 grep '^\*DefaultPageSize' /etc/cups/ppd/testy.ppd ; \
 echo $? ; \
 lpoptions -p testy -l | grep PageSize ; \
 echo $? ; \
 lpadmin -x testy ; \
 echo $?

0
*DefaultPageSize: Letter
*PageSize Letter/Letter: "<</PageSize[612 792]/ImagingBBox ... "
*PageSize A4/A4:         "<</PageSize[595 842]/ImagingBBox ... "
0
PageSize/Media Size: *Letter Legal Executive A4 A5 ...
0
0
*DefaultPageSize: A4
0
PageSize/Media Size: *Letter Legal Executive A4 A5 ...
0
0

I.e. the DefaultPageSize in the PPD file was changed
but "lpoptions -l" does not report this new default value.

In contrast when I wait one second, it works:

lpadmin -p testy -v file:/dev/null -m Postscript.ppd.gz -E ; \
 echo $? ; \
 egrep '^\*DefaultPageSize|^\*PageSize A4|^\*PageSize Letter' \
  /etc/cups/ppd/testy.ppd ; \
 echo $? ; \
 lpoptions -p testy -l | grep PageSize ; \
 echo $? ; \
 sleep 1 ; \
 lpadmin -p testy -o PageSize=A4 ; \
 echo $? ; \
 grep '^\*DefaultPageSize' /etc/cups/ppd/testy.ppd ; \
 echo $? ; \
 lpoptions -p testy -l | grep PageSize ; \
 echo $? ; \
 lpadmin -x testy ; \
 echo $?

0
*DefaultPageSize: Letter
*PageSize Letter/Letter: "<</PageSize[612 792]/ImagingBBox ... "
*PageSize A4/A4:         "<</PageSize[595 842]/ImagingBBox ... "
0
PageSize/Media Size: *Letter Legal Executive A4 A5 ...
0
0
*DefaultPageSize: A4
*PageSize Letter/Letter: "<</PageSize[612 792]/ImagingBBox ... "
*PageSize A4/A4:         "<</PageSize[595 842]/ImagingBBox ... "
0
PageSize/Media Size: Letter Legal Executive *A4 A5 ...
0
0

First I thought it has something to do with DirtyCleanInterval
but one second wait is both required and sufficient for me
so that it works all the time correctly regardles if cupsd
runs with "DirtyCleanInterval 30" or "DirtyCleanInterval 0".

I never had issues with 'lpoptions -l' with CUPS 1.3.9
which I used before so that it seems to be a new issue
in CUPS 1.4.

Link: http://www.cups.org/str.php?L3264
Version: 1.4rc1





More information about the cups-devel mailing list