anchor.diff:                  Module ->
                       %% Resource exists and has been installed by us.
                       %% FIXME Check if it needs updating!
  -                    m_rsc:update(Id, Props, Context),
  +                    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!
  
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:         Rs ->
              {ok, N3} = manage_resources(Module, Rs, AdminContext),
              N3
      end,
      case proplists:get_value(menu, Datamodel) of
          undefined ->
              [];
          M ->
              {ok, N4} = manage_menu(Module, M, AdminContext),
              N4
      end,
      ok.
  
  