anchor.diff:  %% Licensed under the Apache License, Version 2.0 (the "License");
   %% you may not use this file except in compliance with the License.
   %% You may obtain a copy of the License at
  -%% 
  +%%
   %%     http://www.apache.org/licenses/LICENSE-2.0
  -%% 
  +%%
   %% Unless required by applicable law or agreed to in writing, software
   %% distributed under the License is distributed on an "AS IS" BASIS,
   %% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  
positive.code:                     {ok}
              end;
          {error, {unknown_rsc, _}} ->
              %% new resource
              Props1 = [{name, Name}, {group_id, m_group:name_to_id_check(admins, Context)}, {category_id, CatId},
                        {installed_by, Module}] ++ Props,
              Props2 = case proplists:get_value(is_published, Props1) of
                           undefined ->
                               [{is_published, true} | Props1];
                           _ -> Props1
                       end,
              ?DEBUG("New resource"),
              ?DEBUG(Props2),
              m_rsc:insert(Props2, Context)
      end.
  
  
  
negative.code:                 Module ->
                      %% Resource exists and has been installed by us.
                      %% FIXME Check if it needs updating!
                      case m_rsc:p(Id, managed_props, Context) of
                          Props ->
                              %% The props are equal, do nothing.
                              nothing;
                          _ ->
                              %% Different props, update it.
                              m_rsc:update(Id, [{managed_props, Props} | Props], Context)
                      end,
                      {ok, Id};
                  _ ->
                      %% Resource exists but is not installed by us!
  