소스 검색

Resolves: #260341
Summary: Migration script references a non-existing directory (comment #22)
Description: introduced ignoreOldEntries not to migrate obsolete config entries.

Noriko Hosoi 18 년 전
부모
커밋
1374ca57a7
1개의 변경된 파일16개의 추가작업 그리고 4개의 파일을 삭제
  1. 16 4
      ldap/admin/src/scripts/DSMigration.pm.in

+ 16 - 4
ldap/admin/src/scripts/DSMigration.pm.in

@@ -104,6 +104,16 @@ my %ignoreOld =
  'nsslapd-ldapiautodnsuffix'       => 'nsslapd-ldapiautodnsuffix'
 );
 
+# these are the obsolete entries we do not migrate
+my %ignoreOldEntries =
+(
+ 'cn=presence,cn=plugins,cn=config' => 'cn=presence,cn=plugins,cn=config',
+ 'cn=aim presence,cn=presence,cn=plugins,cn=config' => 'cn=aim presence,cn=presence,cn=plugins,cn=config',
+ 'cn=icq presence,cn=presence,cn=plugins,cn=config' => 'cn=icq presence,cn=presence,cn=plugins,cn=config',
+ 'cn=yahoo presence,cn=presence,cn=plugins,cn=config' => 'cn=yahoo presence,cn=presence,cn=plugins,cn=config'
+);
+
+
 # these are the attributes for which we will always use
 # the old value
 my %alwaysUseOld =
@@ -519,10 +529,12 @@ sub mergeConfigEntries {
             debug(1, "Cannot migrate the entry $dn - skipping\n");
             next;
         } elsif ($oldent && !$newent) {
-            # may have to fix up some values in the old entry
-            fixAttrsInEntry($oldent, $mig, $inst);
-            $rc = $dest->add($oldent);
-            $op = "add";
+            if (!$ignoreOldEntries{$dn}) {  # make sure it's not obsolete
+                # may have to fix up some values in the old entry
+                fixAttrsInEntry($oldent, $mig, $inst);
+                $rc = $dest->add($oldent);
+                $op = "add";
+            }
         } elsif (!$oldent && $newent) {
             if ($dn =~ /o=deleteAfterMigration/i) {
                 $rc = $dest->delete($dn);