diff options
author | Martin Basti <mbasti@redhat.com> | 2015-02-26 12:01:19 +0100 |
---|---|---|
committer | Tomas Babej <tbabej@redhat.com> | 2015-03-19 12:37:09 +0100 |
commit | bb1d7a741c3e8c932e13e642adb1799957becb0c (patch) | |
tree | ce43d02f1a755997135dbb5219ffa316caea10f2 /ipaserver/install | |
parent | d3f5d5d1ff5a730d5c268456015fee36a7dc5bff (diff) | |
download | freeipa-bb1d7a741c3e8c932e13e642adb1799957becb0c.tar.gz freeipa-bb1d7a741c3e8c932e13e642adb1799957becb0c.tar.xz freeipa-bb1d7a741c3e8c932e13e642adb1799957becb0c.zip |
Server Upgrade: do not sort updates by DN
Ticket: https://fedorahosted.org/freeipa/ticket/4904
Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'ipaserver/install')
-rw-r--r-- | ipaserver/install/ldapupdate.py | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/ipaserver/install/ldapupdate.py b/ipaserver/install/ldapupdate.py index 53d5407d5..e8516ff86 100644 --- a/ipaserver/install/ldapupdate.py +++ b/ipaserver/install/ldapupdate.py @@ -784,22 +784,11 @@ class LDAPUpdate: raise RuntimeError("Offline updates are not supported.") def _run_updates(self, all_updates): - # For adds and updates we want to apply updates from shortest - # to greatest length of the DN. - # For deletes we want the reverse - def update_sort_key(dn_update): - dn, update = dn_update - assert isinstance(dn, DN) - return len(dn) - sorted_updates = sorted(all_updates.iteritems(), key=update_sort_key) - - for dn, update in sorted_updates: + for dn, update in all_updates.iteritems(): self._update_record(update) - # Now run the deletes in reversed order - sorted_updates.reverse() - for dn, update in sorted_updates: + for dn, update in all_updates.iteritems(): self._delete_record(update) def update(self, files, ordered=False): |