~ubuntu-branches/ubuntu/lucid/couchdb/lucid

« back to all changes in this revision

Viewing changes to src/couchdb/couch_config.erl

  • Committer: Bazaar Package Importer
  • Author(s): Chad Miller, Ken VanDine
  • Date: 2009-09-25 19:18:26 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20090925191826-km9018omfgxosvah
Tags: 0.10.0~svn818859-0ubuntu1
* Import code from pre-release branch.  (LP: #427860, #408909)
        + Build and System Integration:
          * Changed `couchdb` script configuration options.
          * Added default.d and local.d configuration directories to load
      sequence.
        + HTTP Interface:
          * Added optional cookie-based authentication handler.
          * Added optional two-legged OAuth authentication handler.
* Packaging of couchdb-bin must replace pre-split couchdb.
  (LP: #432219)
* Move all of /etc and /var out of the couchdb-bin package, to the
  couchdb package. 
* /etc/couchdb must be in couchdb-bin, as config files are needed
  by all servers.
  + So the couchdb user must be managed by couchdb-bin.
  + Split postinst/postrm files to manage different files.
  + Set Replaces of couchdb-bin by couchdb so that config files
    migrate.
* Update the version number in postrm.  (!)
* Use the new "Breaks" field in control file to help split pkg.

[Ken VanDine]
* debian/couchdb.install:
  - removed /var
* debian/rules:
  - removed bootstrap 
* debian/couchdb.postinst:
  - Added the debhelper tag

Show diffs side-by-side

added added

removed removed

Lines of Context:
128
128
        _ ->
129
129
            ok
130
130
    end,
131
 
    [catch F(Sec, Key, Val) || {_Pid, F} <- Config#config.notify_funs],
 
131
    [catch F(Sec, Key, Val, Persist) || {_Pid, F} <- Config#config.notify_funs],
132
132
    {reply, ok, Config};
133
133
handle_call({delete, Sec, Key, Persist}, _From, Config) ->
134
134
    true = ets:delete(?MODULE, {Sec,Key}),
140
140
        _ ->
141
141
            ok
142
142
    end,
143
 
    [catch F(Sec, Key, deleted) || {_Pid, F} <- Config#config.notify_funs],
 
143
    [catch F(Sec, Key, deleted, Persist) || {_Pid, F} <- Config#config.notify_funs],
144
144
    {reply, ok, Config};
145
145
handle_call({register, Fun, Pid}, _From, #config{notify_funs=PidFuns}=Config) ->
146
146
    erlang:monitor(process, Pid),
148
148
    Fun2 =
149
149
    case Fun of
150
150
        _ when is_function(Fun, 1) ->
151
 
            fun(Section, _Key, _Value) -> Fun(Section) end;
 
151
            fun(Section, _Key, _Value, _Persist) -> Fun(Section) end;
152
152
        _ when is_function(Fun, 2) ->
153
 
            fun(Section, Key, _Value) -> Fun(Section, Key) end;
 
153
            fun(Section, Key, _Value, _Persist) -> Fun(Section, Key) end;
154
154
        _ when is_function(Fun, 3) ->
 
155
            fun(Section, Key, Value, _Persist) -> Fun(Section, Key, Value) end;
 
156
        _ when is_function(Fun, 4) ->
155
157
            Fun
156
158
    end,
157
159
    {reply, ok, Config#config{notify_funs=[{Pid, Fun2} | PidFuns]}}.