You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2012/10/08 13:11:52 UTC

git commit: CLOUDSTACK-221: Force symlink if any existing symlink

Updated Branches:
  refs/heads/4.0 3b78d6980 -> e24192505


CLOUDSTACK-221: Force symlink if any existing symlink

Force symlink, in case there is an existing symlink but the file it
links to does not exist.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/e2419250
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/e2419250
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/e2419250

Branch: refs/heads/4.0
Commit: e241925057c44fafde3d5b755be72d494b35c68b
Parents: 3b78d69
Author: Rohit Yadav <bh...@apache.org>
Authored: Mon Oct 8 16:39:58 2012 +0530
Committer: Rohit Yadav <bh...@apache.org>
Committed: Mon Oct 8 16:39:58 2012 +0530

----------------------------------------------------------------------
 cloud.spec |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e2419250/cloud.spec
----------------------------------------------------------------------
diff --git a/cloud.spec b/cloud.spec
index 844d486..36860c9 100644
--- a/cloud.spec
+++ b/cloud.spec
@@ -403,7 +403,7 @@ fi
 
     mkdir -p $target/webapps7080
     if [ ! -h $target/webapps7080/awsapi ]; then
-        ln -s $root/webapps7080/awsapi $target/webapps7080/awsapi
+        ln -sf $root/webapps7080/awsapi $target/webapps7080/awsapi
     fi
 
     jars=`ls $root/lib`


RE: git commit: CLOUDSTACK-221: Force symlink if any existing symlink

Posted by Rohit Yadav <ro...@citrix.com>.
I've not sure exactly, I guess they are required to be there for some hard coded paths.
I see after installation some components (client, bridge, lib etc.) are symlinked in /usr/share/cloud/management.

Regards.
________________________________________
From: David Nalley [david@gnsa.us]
Sent: Monday, October 08, 2012 11:24 PM
To: cloudstack-dev@incubator.apache.org
Subject: Re: git commit: CLOUDSTACK-221: Force symlink if any existing symlink

On Mon, Oct 8, 2012 at 1:46 PM, Rohit Yadav <ro...@citrix.com> wrote:
> This is just to enforce a symlink. For example, when I install and remove CloudStack for the first time, the symlink will be created and will point to a location which does not exist (as I removed it).
> Then, when I try to install again, it will simply give a warning. By doing ln -sf, we enforce symlink just in case there is an existing symlink it would set it to correct path.
> The other change, -h instead of -e (in if conditional) is to check for symlink existence.
>
> Regards.


I understand what enforcing a symlink means - my question was more
general (your commit just touched that swath of code, so not really
asking why you moved to enforcing that symlink) Why is there a symlink
there in the first place. It seems like a hack

Re: git commit: CLOUDSTACK-221: Force symlink if any existing symlink

Posted by David Nalley <da...@gnsa.us>.
On Mon, Oct 8, 2012 at 1:46 PM, Rohit Yadav <ro...@citrix.com> wrote:
> This is just to enforce a symlink. For example, when I install and remove CloudStack for the first time, the symlink will be created and will point to a location which does not exist (as I removed it).
> Then, when I try to install again, it will simply give a warning. By doing ln -sf, we enforce symlink just in case there is an existing symlink it would set it to correct path.
> The other change, -h instead of -e (in if conditional) is to check for symlink existence.
>
> Regards.


I understand what enforcing a symlink means - my question was more
general (your commit just touched that swath of code, so not really
asking why you moved to enforcing that symlink) Why is there a symlink
there in the first place. It seems like a hack

RE: git commit: CLOUDSTACK-221: Force symlink if any existing symlink

Posted by Rohit Yadav <ro...@citrix.com>.
This is just to enforce a symlink. For example, when I install and remove CloudStack for the first time, the symlink will be created and will point to a location which does not exist (as I removed it).
Then, when I try to install again, it will simply give a warning. By doing ln -sf, we enforce symlink just in case there is an existing symlink it would set it to correct path. 
The other change, -h instead of -e (in if conditional) is to check for symlink existence.

Regards.
________________________________________
From: David Nalley [david@gnsa.us]
Sent: Monday, October 08, 2012 11:11 PM
To: cloudstack-dev@incubator.apache.org
Subject: Re: git commit: CLOUDSTACK-221: Force symlink if any existing symlink

>
> CLOUDSTACK-221: Force symlink if any existing symlink
>
> Force symlink, in case there is an existing symlink but the file it
> links to does not exist.
>
> ----------------------------------------------------------------------
>  cloud.spec |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> ----------------------------------------------------------------------
>
>
> http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e2419250/cloud.spec
> ----------------------------------------------------------------------
> diff --git a/cloud.spec b/cloud.spec
> index 844d486..36860c9 100644
> --- a/cloud.spec
> +++ b/cloud.spec
> @@ -403,7 +403,7 @@ fi
>
>      mkdir -p $target/webapps7080
>      if [ ! -h $target/webapps7080/awsapi ]; then
> -        ln -s $root/webapps7080/awsapi $target/webapps7080/awsapi
> +        ln -sf $root/webapps7080/awsapi $target/webapps7080/awsapi
>      fi
>


Why are we doing this in the first place? What is the underlying
problem? Is there a bug for that? Symlinking a directory is almost
always a hack.

--David

Re: git commit: CLOUDSTACK-221: Force symlink if any existing symlink

Posted by David Nalley <da...@gnsa.us>.
>
> CLOUDSTACK-221: Force symlink if any existing symlink
>
> Force symlink, in case there is an existing symlink but the file it
> links to does not exist.
>
> ----------------------------------------------------------------------
>  cloud.spec |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> ----------------------------------------------------------------------
>
>
> http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e2419250/cloud.spec
> ----------------------------------------------------------------------
> diff --git a/cloud.spec b/cloud.spec
> index 844d486..36860c9 100644
> --- a/cloud.spec
> +++ b/cloud.spec
> @@ -403,7 +403,7 @@ fi
>
>      mkdir -p $target/webapps7080
>      if [ ! -h $target/webapps7080/awsapi ]; then
> -        ln -s $root/webapps7080/awsapi $target/webapps7080/awsapi
> +        ln -sf $root/webapps7080/awsapi $target/webapps7080/awsapi
>      fi
>


Why are we doing this in the first place? What is the underlying
problem? Is there a bug for that? Symlinking a directory is almost
always a hack.

--David