[Fedora-directory-commits] ldapserver/ldap/admin/src/scripts DSMigration.pm.in, 1.19, 1.20
Richard Allen Megginson (rmeggins)
fedora-directory-commits at redhat.com
Fri Oct 19 01:50:17 UTC 2007
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29918/ldapserver/ldap/admin/src/scripts
Modified Files:
DSMigration.pm.in
Log Message:
Resolves: bug 338991
Bug Description: obsolete values migrated to target instance
Reviewed by: nhosoi (Thanks!)
Fix Description: When fixing the attributes in the old entry, remove any obsolete attributes.
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no
QA impact: should be covered by regular nightly and manual testing
New Tests integrated into TET: none
Index: DSMigration.pm.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/DSMigration.pm.in,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- DSMigration.pm.in 17 Oct 2007 15:56:53 -0000 1.19
+++ DSMigration.pm.in 19 Oct 2007 01:50:15 -0000 1.20
@@ -549,7 +549,11 @@
my ($ent, $mig, $inst) = @_;
for my $attr (keys %{$ent}) {
my $lcattr = lc $attr;
- if ($transformAttr{$lcattr}) {
+ if ($ignoreOld{$lcattr}) {
+ debug(3, "fixAttrsInEntry: ignoring old invalid or obsolete attr $attr\n");
+ $ent->remove($attr);
+ next;
+ } elsif ($transformAttr{$lcattr}) {
my $newval = &{$transformAttr{$lcattr}}($ent, $attr, $mig, $inst);
if (!$newval) {
debug(2, "Removing attribute $attr from entry ", $ent->getDN(), "\n");
@@ -558,7 +562,7 @@
debug(2, "Setting new value $newval for attribute $attr in entry ", $ent->getDN(), "\n");
$ent->setValues($attr, $newval);
}
- }
+ } # else just keep as is
}
}
More information about the Fedora-directory-commits
mailing list