From 94e06fe2032b0143939abd85044b5c3ccddefe70 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 20 Jun 2010 02:32:23 +0200 Subject: Some more formatting fixes, move schema related functions from Ldb to Schema. --- source4/scripting/bin/upgradeprovision | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source4/scripting/bin') diff --git a/source4/scripting/bin/upgradeprovision b/source4/scripting/bin/upgradeprovision index 1c33132769..47e50ece57 100755 --- a/source4/scripting/bin/upgradeprovision +++ b/source4/scripting/bin/upgradeprovision @@ -107,7 +107,7 @@ hashOverwrittenAtt = { "prefixMap": replace, "systemMayContain": replace, backlinked = [] -forwardlinked = {} +forwardlinked = set() dn_syntax_att = [] def define_what_to_log(opts): what = 0 @@ -223,7 +223,8 @@ def populate_links(samdb, schemadn): linkedAttHash = get_linked_attributes(Dn(samdb, str(schemadn)), samdb) backlinked.extend(linkedAttHash.values()) for t in linkedAttHash.keys(): - forwardlinked[t] = 1 + forwardlinked.add(t) + def populate_dnsyntax(samdb, schemadn): """Populate an array with all the attributes that have DN synthax @@ -777,7 +778,7 @@ def update_present(ref_samdb, samdb, basedn, listPresent, usns, invocationid): if usns is not None: # We have updated by provision usn information so let's exploit # replMetadataProperties - if forwardlinked.has_key(att): + if att in forwardlinked: handle_links(samdb, att, basedn, current[0]["dn"], current[0][att], reference[0][att], delta) @@ -952,7 +953,7 @@ def update_partition(ref_samdb, samdb, basedn, names, schema, provisionUSNs): # a complete schema is needed as the insertion of attributes # and class is done against it # and the schema is self validated - samdb.set_schema_from_ldb(schema.ldb) + samdb.set_schema(schema) try: message(SIMPLE, "There are %d missing objects" % (len(listMissing))) add_deletedobj_containers(ref_samdb, samdb, names) -- cgit