Sophie

Sophie

distrib > Mageia > 2 > i586 > by-pkgid > d575888294f32ec9c88ae748227fe6cd > files > 56

hplip-3.12.4-1.2.mga2.src.rpm

#! /bin/sh -e
## ubuntu-hp-mkuri-notification-text.dpatch by  <till.kamppeter@gmail.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Ubuntu-only!

[ "`lsb_release -is 2>/dev/null`" = "Ubuntu" ] || { echo -n '(ignored)' >&2; exit 0; }
. /usr/share/dpatch/dpatch-run

@DPATCH@
diff -urNad hplip-3.10.2~/io/hpmud/hp-mkuri.c hplip-3.10.2/io/hpmud/hp-mkuri.c
--- hplip-3.10.2~/io/hpmud/hp-mkuri.c	2010-03-17 22:56:18.000737637 +0100
+++ hplip-3.10.2/io/hpmud/hp-mkuri.c	2010-03-17 23:00:11.610781053 +0100
@@ -355,6 +355,8 @@
    if (hpmud_get_key_value(datfile, model, "fax-type", value, sizeof(value)) != HPMUD_R_OK)
       goto bugout;
    fax = strtol(value, NULL, 10);
+   if (hpmud_get_key_value(datfile, model, "model1", m, sizeof(m)) != HPMUD_R_OK)
+      goto bugout;
 
    /* See if device is supported by hplip. */
    if (support == HPMUD_SUPPORT_TYPE_NONE)
@@ -372,12 +374,12 @@
       switch (plugin)
       {
          case HPMUD_PLUGIN_TYPE_REQUIRED:
-            BUG("%s requires a proprietary plugin\n", pm);
-            notify(pm, "requires a proprietary plugin, run hp-setup", 30000);
+            BUG("%s requires a proprietary plugin\n", m);
+            notify(m, "requires a proprietary plugin, downloading and installing the plugin ...", 30000);
             break;
          case HPMUD_PLUGIN_TYPE_OPTIONAL:
-            BUG("%s has a optional proprietary plugin\n", pm);
-            notify(pm, "has a optional proprietary plugin, run hp-setup", 30000);
+            BUG("%s has an optional proprietary plugin\n", m);
+            notify(m, "has an optional proprietary plugin, run hp-plugin-ubuntu", 30000);
             break;
          default:
             break;