Code sync
[external/hplip.git] / packaging / hp-mkuri-take-into-account-already-installed-plugin-also-for-exit-value.dpatch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## hp-mkuri-take-into-account-already-installed-plugin-also-for-exit-value.dpatch by  <till.kamppeter@gmail.com>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: No description.
6
7 @DPATCH@
8 diff -urNad hplip-3.10.2~/io/hpmud/hp-mkuri.c hplip-3.10.2/io/hpmud/hp-mkuri.c
9 --- hplip-3.10.2~/io/hpmud/hp-mkuri.c   2010-03-17 22:42:56.682033355 +0100
10 +++ hplip-3.10.2/io/hpmud/hp-mkuri.c    2010-03-17 22:45:36.370765292 +0100
11 @@ -385,17 +385,23 @@
12     }
13  
14     ret = 0;
15 -   if (plugin == HPMUD_PLUGIN_TYPE_REQUIRED)
16 -      ret = 2;
17 -   else if (plugin == HPMUD_PLUGIN_TYPE_OPTIONAL)
18 -      ret = 3;
19 -   if (fax > 0)
20 +   if (!plugin_installed)
21     {
22 -      ret = 4;
23        if (plugin == HPMUD_PLUGIN_TYPE_REQUIRED)
24 -         ret = 5;
25 +         ret = 2;
26        else if (plugin == HPMUD_PLUGIN_TYPE_OPTIONAL)
27 -         ret = 6;
28 +         ret = 3;
29 +   }
30 +   if (fax > 0)
31 +   {
32 +      ret = 4;
33 +      if (!plugin_installed)
34 +      {
35 +        if (plugin == HPMUD_PLUGIN_TYPE_REQUIRED)
36 +           ret = 5;
37 +        else if (plugin == HPMUD_PLUGIN_TYPE_OPTIONAL)
38 +           ret = 6;
39 +      }
40     }
41  
42  bugout: