[libconfig-model-lcdproc-perl] 02/12: replace patch tweak-defaults with tweak-lcdd-conf to tweak actual source files...

dod at debian.org dod at debian.org
Sat May 31 13:26:15 UTC 2014


This is an automated email from the git hooks/post-receive script.

dod pushed a commit to branch master
in repository libconfig-model-lcdproc-perl.

commit 668dbbb8b5a420ca5cbdbfd1102a902adb52ba6d
Author: Dominique Dumont <dod at debian.org>
Date:   Fri May 30 19:27:59 2014 +0200

    replace patch tweak-defaults with tweak-lcdd-conf to tweak actual source files...
    
    ... not generated files shipped upstream
---
 debian/patches/series          |  2 +-
 debian/patches/tweak-lcdd-conf | 74 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 75 insertions(+), 1 deletion(-)

diff --git a/debian/patches/series b/debian/patches/series
index f2d8bdf..9b11728 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,2 @@
-tweak-defaults
+tweak-lcdd-conf
 test-driver-path-default
diff --git a/debian/patches/tweak-lcdd-conf b/debian/patches/tweak-lcdd-conf
new file mode 100644
index 0000000..548a35c
--- /dev/null
+++ b/debian/patches/tweak-lcdd-conf
@@ -0,0 +1,74 @@
+--- a/examples/lcdproc/LCDd.conf
++++ b/examples/lcdproc/LCDd.conf
+@@ -63,10 +63,11 @@
+ #ReportLevel=3
+ 
+ # Should we report to syslog instead of stderr? [default: no; legal: yes, no]
++# { upstream_default~ default=yes }
+ #ReportToSyslog=yes
+ 
+ # User to run as.  LCDd will drop its root privileges and run as this user
+-# instead. [default: nobody]
++# instead. { default~ }
+ User=nobody
+ 
+ # The server will stay in the foreground if set to yes.
+--- a/examples/lcdproc/lcdconf2model.pl
++++ b/examples/lcdproc/lcdconf2model.pl
+@@ -208,22 +208,23 @@
+         # or use the value found in INI file as default
+         $ini_v =~ s/^"//g;
+         $ini_v =~ s/"$//g;
+-        $square_model .= qq! value_type=$value_type default="$ini_v"! if length($ini_v);
++        $square_model .= qq! value_type=$value_type!; 
++        $square_model .= qq! default="$ini_v"! if length($ini_v);
+     }
+ 
+     # get model information from comment (written between curly brackets)
+     my $curly_model = '';
+     my $curly_rexp = '{(\s*\w+.*)}' ;
+     while ($$info_r =~ /$curly_rexp/) { 
+-        my $model_snippet = $1 ;
+-        say "class $ini_class element $ini_param model snippet: '$model_snippet'"
++        $curly_model = $1 ;
++        say "class $ini_class element $ini_param model snippet: '$curly_model'"
+             if $verbose;
+         $$info_r =~ s/$curly_rexp//;
+-        $load .= ' '. $model_snippet ;
+     }
+     
+     # return a string containing model specifications
+-    return $load.$square_model;
++    # spec in curly model may override spec in square model
++    return $load . $square_model . $curly_model ;
+ };
+ 
+ # Now let's take care of the special cases. This one deals with "Driver"
+@@ -241,7 +242,26 @@
+ 
+ # Ensure that DriverPath will end with a slash
+ $dispatch{"LCDd::server"}{DriverPath} = sub {
+-    return $dispatch{_default_}->( @_ ) . q! match="/$"! ;
++my $model_snippet = q!
++    value_type=uniline
++    compute
++      formula="my $triplet = `/usr/bin/dpkg-architecture -qDEB_HOST_MULTIARCH`;
++warn \"cannot run dpkg-architecture\" unless $triplet ;
++chomp $triplet;
++\"/usr/lib/$triplet/lcdproc/\";"
++      use_eval=1
++      allow_override=1 -
++    match=/$
++    warn_unless:dir
++      code=" defined $_ ? -d : 1"
++      msg="missing DriverPath dir"
++      fix="my $triplet = `/usr/bin/dpkg-architecture -qDEB_HOST_MULTIARCH`;
++warn \"cannot run dpkg-architecture\" unless $triplet ;
++chomp $triplet;
++my $res = \"/usr/lib/$triplet/lcdproc/\";
++$_ = $res;
++" - !;
++    return $dispatch{_default_}->( @_ ) . $model_snippet ;
+ };
+ 
+ # like default but ensure that parameter is integer

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libconfig-model-lcdproc-perl.git



More information about the Pkg-perl-cvs-commits mailing list