From: joey Date: Mon, 30 Apr 2007 04:41:53 +0000 (+0000) Subject: * If Net::OpenID::Consumer is not available, the openid module will quietly X-Git-Tag: 2.00~1 X-Git-Url: http://git.tremily.us/?p=ikiwiki.git;a=commitdiff_plain;h=cd27ffc61458ecb1c4b7f2f919556b112620f671 * If Net::OpenID::Consumer is not available, the openid module will quietly disable itself, this avoids needing a hard dependency on the perl module. --- diff --git a/IkiWiki/Plugin/openid.pm b/IkiWiki/Plugin/openid.pm index fcd53ee71..ab9fc560b 100644 --- a/IkiWiki/Plugin/openid.pm +++ b/IkiWiki/Plugin/openid.pm @@ -26,6 +26,14 @@ sub formbuilder_setup (@) { #{{{ my $form=$params{form}; my $session=$params{session}; my $cgi=$params{cgi}; + + # Give up if module is unavailable to avoid needing to depend on + # it. + eval q{use Net::OpenID::Consumer}; + if ($@) { + debug("unable to load Net::OpenID::Consumer, not enabling OpenID login"); + return; + } if ($form->title eq "signin") { # This avoids it displaying a redundant label for the diff --git a/debian/NEWS b/debian/NEWS index b24196732..e66872b42 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -9,10 +9,10 @@ ikiwiki (2.00) unstable; urgency=low or edit your setup file to turn usedirs off: usedirs => 0, - * OpenID logins are now enabled by default. So ikiwiki now depends on the - Net::OpenID::Consumer perl module. Password logins are also still on by - default. If you like, you can turn either OpenID or password logins off - via the 'disable_plugins' setting. + * OpenID logins are now enabled by default, if the Net::OpenID::Consumer + perl module is available. Password logins are also still enabled + by default. If you like, you can turn either OpenID or password logins + off via the 'disable_plugins' setting. -- Joey Hess Sun, 29 Apr 2007 19:00:43 -0400 diff --git a/debian/changelog b/debian/changelog index aa7e086e6..ae633075d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ikiwiki (2.00) UNRELEASED; urgency=low +ikiwiki (2.00) unstable; urgency=low [ Josh Triplett ] * Avoid using GNU extensions to cp during "make install", which did @@ -16,7 +16,11 @@ ikiwiki (2.00) UNRELEASED; urgency=low * fieldset support appeared in CGI::FormBuilder 3.05, so increase version in Depends on libcgi-formbuilder-perl to 3.05 - -- Josh Triplett Sun, 29 Apr 2007 19:52:16 -0700 + [ Joey Hess ] + * If Net::OpenID::Consumer is not available, the openid module will quietly + disable itself, this avoids needing a hard dependency on the perl module. + + -- Joey Hess Mon, 30 Apr 2007 00:43:02 -0400 ikiwiki (1.51) unstable; urgency=low diff --git a/debian/control b/debian/control index 35f409ec6..2ec114d67 100644 --- a/debian/control +++ b/debian/control @@ -11,8 +11,8 @@ XS-Vcs-Browser: http://ikiwiki.info/cgi-bin/viewvc.cgi/trunk/?root=ikiwiki Package: ikiwiki Architecture: all -Depends: ${perl:Depends}, libxml-simple-perl, markdown, libtimedate-perl, libhtml-template-perl, libhtml-scrubber-perl, libcgi-formbuilder-perl (>= 3.05), libtime-duration-perl, libcgi-session-perl (>= 4.14-1), libmail-sendmail-perl | libnet-openid-consumer-perl, gcc | c-compiler, libc6-dev | libc-dev, libhtml-parser-perl, liburi-perl -Recommends: subversion | git-core | tla | mercurial, hyperestraier +Depends: ${perl:Depends}, libxml-simple-perl, markdown, libtimedate-perl, libhtml-template-perl, libhtml-scrubber-perl, libcgi-formbuilder-perl (>= 3.05), libtime-duration-perl, libcgi-session-perl (>= 4.14-1), libmail-sendmail-perl, gcc | c-compiler, libc6-dev | libc-dev, libhtml-parser-perl, liburi-perl +Recommends: subversion | git-core | tla | mercurial, hyperestraier, libnet-openid-consumer-perl Suggests: viewvc | viewcvs, librpc-xml-perl, libtext-wikiformat-perl, python-docutils, polygen, tidy, libxml-feed-perl, libmailtools-perl, perlmagick, libfile-mimeinfo-perl, libcrypt-ssleay-perl, liblocale-gettext-perl (>= 1.05-1), libtext-typography-perl, libtext-csv-perl, libdigest-sha1-perl, graphviz Conflicts: ikiwiki-plugin-table Replaces: ikiwiki-plugin-table