[Libreoffice-commits] .: solenv/bin

Michael Meeks michael at kemper.freedesktop.org
Fri Apr 8 06:13:08 PDT 2011


 solenv/bin/relocate |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

New commits:
commit c5c603e643363c617ff82dad7865abb6c40c95a1
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Fri Apr 8 13:11:46 2011 +0100

    make relocate cope with more corner cases: no solver & fixed links

diff --git a/solenv/bin/relocate b/solenv/bin/relocate
index 09b395a..4e9fe68 100755
--- a/solenv/bin/relocate
+++ b/solenv/bin/relocate
@@ -229,11 +229,13 @@ sub rewrite_symlinks($$)
 	my $target = readlink ($link);
 	my $newtarget = $target;
 	$newtarget =~ s/$old_root/$new_root/;
-	print "Re-write link $target to $newtarget\n";
-	if ($newtarget eq $target) {
+	if ($target =~ m/$new_root/) {
+	    print STDERR "skip correct link $target\n";
+	} elsif ($newtarget eq $target) {
 	    print STDERR "unusual - possibly stale link: $target\n";
 	    if ($target =~ m/\/clone\//) { die "failed to rename link"; }
 	} else {
+	    print "Re-write link $target to $newtarget\n";
 	    unlink ($link);
 	    symlink ($newtarget, $link);
 	}
@@ -288,8 +290,10 @@ rewrite_symlinks($OOO_BUILD, $OLD_ROOT);
 print "re-writing dependencies:\n";
 rewrite_dpcc($OOO_BUILD, $OLD_ROOT);
 
-print "re-writing new dependencies:\n";
-sed_no_touch_recursive ($OOO_BUILD, $OLD_ROOT, "$solver/workdir/Dep");
+if (-d "$solver/workdir/Dep") {
+    print "re-writing new dependencies:\n";
+    sed_no_touch_recursive ($OOO_BUILD, $OLD_ROOT, "$solver/workdir/Dep");
+}
 
 print "re-writing environment:\n";
 rewrite_set($OOO_BUILD, $OLD_ROOT, $set);


More information about the Libreoffice-commits mailing list