summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher James Halse Rogers <raof@ubuntu.com>2014-01-17 15:47:57 +1100
committerMirco Bauer <meebey@meebey.net>2014-02-11 02:46:04 +0100
commita0ea7e36e7a06178317d39e1daf2e0e22bb45ae4 (patch)
treee602d3b5d7aa0a179514495de4f04ddb757bffb8
parent9303f0cd95c8423bf5bb4ec484b2e79c74bd29de (diff)
downloadmono-a0ea7e36e7a06178317d39e1daf2e0e22bb45ae4.tar.gz
Make the install-framework commmand idempotent
-rw-r--r--debian/mono.runtime-script9
1 files changed, 7 insertions, 2 deletions
diff --git a/debian/mono.runtime-script b/debian/mono.runtime-script
index 5e0738be4d..bae013dee0 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";