From 462a53a0af3d35952d435716adfacda0029bddd4 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 30 May 2013 23:06:45 -0400 Subject: v4 v5: sysenv, pgsql db connect fix --- data/doc/sisu/CHANGELOG_v4 | 2 ++ data/doc/sisu/CHANGELOG_v5 | 2 ++ lib/sisu/v4/sysenv.rb | 8 +++++--- lib/sisu/v5/sysenv.rb | 8 +++++--- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 09c0bd41..25dd47f9 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -30,6 +30,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.1.3.orig.tar.xz sisu_4.1.3.orig.tar.xz sisu_4.1.3-1.dsc +* sysenv, pgsql db connect fix + %% 4.1.2.orig.tar.xz (2013-05-29:21/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.1.2 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.1.2-1 diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index 3850e5c3..bd49d0a1 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -30,6 +30,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.0.3.orig.tar.xz sisu_5.0.3.orig.tar.xz sisu_5.0.3-1.dsc +* sysenv, pgsql db connect fix + %% 5.0.2.orig.tar.xz (2013-05-29:21/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.0.2 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.0.2-1 diff --git a/lib/sisu/v4/sysenv.rb b/lib/sisu/v4/sysenv.rb index 6bc97396..f95622b5 100644 --- a/lib/sisu/v4/sysenv.rb +++ b/lib/sisu/v4/sysenv.rb @@ -4067,10 +4067,12 @@ WOK self end def psql - def user(opt) - if opt.mod.inspect =~/--db-user[=-]["']?(\S+)["']+/ + def user(opt=nil) + x=if opt \ + and opt.mod.inspect =~/--db-user[=-]["']?(\S+)["']+/ m=$1 - elsif opt.mod =~/--webserv[=-]webrick/ + elsif opt \ + and opt.mod =~/--webserv[=-]webrick/ @env.user else ((defined? @rc['db']['postgresql']['user']) \ diff --git a/lib/sisu/v5/sysenv.rb b/lib/sisu/v5/sysenv.rb index edaec7f8..37492716 100644 --- a/lib/sisu/v5/sysenv.rb +++ b/lib/sisu/v5/sysenv.rb @@ -4067,10 +4067,12 @@ WOK self end def psql - def user(opt) - if opt.mod.inspect =~/--db-user[=-]["']?(\S+)["']+/ + def user(opt=nil) + x=if opt \ + and opt.mod.inspect =~/--db-user[=-]["']?(\S+)["']+/ m=$1 - elsif opt.mod =~/--webserv[=-]webrick/ + elsif opt \ + and opt.mod =~/--webserv[=-]webrick/ @env.user else ((defined? @rc['db']['postgresql']['user']) \ -- cgit v1.2.3