[Pkg-mono-svn-commits] [mono] 01/01: Make the install-framework commmand idempotent

Mirco Bauer meebey at moszumanska.debian.org
Fri Jan 17 04:52:12 UTC 2014


This is an automated email from the git hooks/post-receive script.

meebey pushed a commit to branch master-experimental
in repository mono.

commit c6ee8c77b20371507033a8907fa10325e3e6da25
Author: Christopher James Halse Rogers <raof at ubuntu.com>
Date:   Fri Jan 17 15:47:57 2014 +1100

    Make the install-framework commmand idempotent
---
 debian/mono.runtime-script | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/debian/mono.runtime-script b/debian/mono.runtime-script
index 5e0738b..bae013d 100644
--- a/debian/mono.runtime-script
+++ b/debian/mono.runtime-script
@@ -45,8 +45,7 @@ if ($mode eq "install-framework")
 
     my $uninstall = "$basedir/$basename.mono-framework";
 
-
-   open UNINSTALL, ">$uninstall"
+    open UNINSTALL, ">$uninstall"
 	or die "E: Cannot open uninstall: $uninstall";
 
     while (@ARGV)
@@ -62,6 +61,12 @@ if ($mode eq "install-framework")
 
 	my $target = "$runtime_versions{$framework_ver}/" . basename($dll);
 	
+	if (-f $target)
+	{
+	    # Ensure we're idempotent
+	    unlink $target;
+	}
+
 	symlink $dll, $target
 	    or die "E: Unable to install $dll into framework path: $target\n";
 	print UNINSTALL "$target\n";

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mono/packages/mono.git



More information about the Pkg-mono-svn-commits mailing list