[Pkg-cups-devel] Bug#618545: cups-client: upgrade pulls in samba
Jonathan Nieder
jrnieder at gmail.com
Wed Mar 16 14:16:53 UTC 2011
Martin-Éric Racine wrote:
> Looking back at the original bug report that prompted this, I guess
> that yes, a mere Suggests ought to be enough.
Thanks, both.
FWIW here's a rough patch vaguely approximating an implementation of
the other suggestion from that report. (Completely untested, though.)
In case anyone cares, this change is by me and I place it in the
public domain (or equivalently license it). You may freely use,
modify, distribute, and relicense it.
=== modified file 'cups/adminutil.c'
--- cups/adminutil.c 2011-03-16 13:49:12 +0000
+++ cups/adminutil.c 2011-03-16 14:14:09 +0000
@@ -482,6 +482,23 @@
ppd, dest, cg->cups_datadir, cg->cups_datadir,
cg->cups_datadir, cg->cups_datadir);
+ {
+ char buf[1024];
+ if (!cupsFileFind("smbclient", getenv("PATH"), 1, buf, sizeof(buf)))
+ {
+ strlcpy(message,
+ _cupsLangString(language,
+ _("Unable to copy Windows 2000 printer "
+ "driver files: smbclient not found!"),
+ sizeof(message)));
+ _cupsSetError(IPP_INTERNAL_ERROR, message, 0);
+ if (logfile)
+ _cupsLangPrintf(logfile, "%s\n", message);
+ unlink(authfile);
+ return (0);
+ }
+ }
+
if ((status = do_samba_command("smbclient", address, subcmd,
authfile, logfile)) != 0)
{
--
More information about the Pkg-cups-devel
mailing list