[cups.bugs] [LOW] STR #2796: (since 1.2b1)(!WIN32) cupsSetDests2 lpoptions user preferences disappear

Chapman Flack ghost at anastigmatix.net
Thu Apr 10 12:34:57 PDT 2008


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

[STR New]

Between CUPS 1.1.23 and 1.2b1 a non-back-compatible change (that I could
not find in the release notes) was made to cups/dest.c.

In 1.1.23 and earlier, cupsGetDests2 and cupsSetDests2 used ~/.lpoptions
as the file in which to store user option preferences.

Starting in 1.2b1, those preferences are kept in ~/.cups/lpoptions.

The newer cupsGetDests2 will fall back and load options from the
old filename if the new one isn't there, which is ok for backward
compatibility.

However, the newer cupsSetDests2 *removes* any file at the old name,
and saves the new options only at the new file name.

What this means is that in an environment with shared home directories
and diverse clients at different CUPS revisions, any use of lpoptions
(for example) to set options on a client with a 1.2b1-or-later client
library will cause all user option preferences (newly or previously
set) to *disappear* for any other client with an earlier CUPS client
library.

A more robust migration approach would have been for getDests2 to check
for both files and honor the *newer*, and for setDests2 to save to the
new filename always and also to the old one if present.

Because this happened between 1.1 and 1.2 and 1.3 is now current,
there may be few users affected unless they have an environment like
ours where old clients are still in the mix. However, it seemed worth
reporting so that at least anyone else bitten by it can find the STR
and know they're not crazy.

Link: http://www.cups.org/str.php?L2796
Version: 1.4-current





More information about the cups mailing list