Reloading the full schema in upgradeprovision
Matthieu Patou
mat at samba.org
Tue Jul 13 14:31:03 MDT 2010
On 13/07/2010 02:28, Andrew Bartlett wrote:
> On Tue, 2010-07-13 at 01:14 +0400, Matthieu Patou wrote:
>
>> So I guess you want me to do this:
>> diff --git a/source4/scripting/bin/upgradeprovision
>> b/source4/scripting/bin/upgradeprovision
>> index f72883d..46d5fe0 100755
>> --- a/source4/scripting/bin/upgradeprovision
>> +++ b/source4/scripting/bin/upgradeprovision
>> @@ -943,8 +943,6 @@ def reload_full_schema(samdb, names):
>>
>> current = samdb.search(expression="objectClass=*",
>> base=str(names.schemadn),
>> scope=SCOPE_SUBTREE)
>> - tmpldb = samba.samdb.SamDB(global_schema=False, am_rodc=False)
>> -
>> schema_ldif = ""
>> prefixmap_data = ""
>>
>> @@ -958,8 +956,8 @@ def reload_full_schema(samdb, names):
>> # We don't actually add this ldif, just parse it
>> prefixmap_ldif = "dn: cn=schema\nprefixMap:: %s\n\n" % prefixmap_data
>>
>> - dsdb._dsdb_set_schema_from_ldif(tmpldb, prefixmap_ldif, schema_ldif)
>> - samdb.set_schema_from_ldb(tmpldb)
>> + dsdb._dsdb_set_schema_from_ldif(samdb, prefixmap_ldif, schema_ldif)
>> + samdb.set_schema_from_ldb(samdb)
> You don't need the samdb.set_schema_from_ldb(samdb) - the
> _dsdb_set_schema_from_ldif has already done that.
>
Right, It gives this patch,
http://gitweb.samba.org/?p=mat/samba.git;a=blobdiff;f=source4/scripting/bin/upgradeprovision;h=11efae02d65cee7cc3c9c98b3e26ee6a16d5edfb;hp=deb50e36fbb26d5ca4f336f0c5583542bd22f652;hb=d2e679bf9420e1b017957fe472d0d3b4c6722f13;hpb=db718d7d41b316dc4fd625aa339eca418610a8d4
My branch upgradeprovision-wip is also passing make tests
Matthieu.
--
Matthieu Patou
Samba Team http://samba.org
More information about the samba-technical
mailing list