Problem with `create_gs_server_image` in latest gsDevKit_home

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with `create_gs_server_image` in latest gsDevKit_home

GLASS mailing list
Hi Dale,

I have just updated to latest GsDevKit release and I am trying to re-build the devKit images. However, there is a problem. I tracked it down up to this line:


 ❯ ./create_gs_server_image -f -d /opt/gemstoneAdditions/GsDevKit_home/shared/pharo gsDevKitCommandLine                                                                                                                         

The problem is that that script, even if at the very beginning it correctly sets `initialImageName=Pharo.image` when we are in case `gsDevKitCommandLine`, but at the end of the switch case, you set `imageName=${imageBaseName}.image`. Therefore, $imageName  would resolve to `gsDevKitCommandLine.image`. Obviously, in `$GS_HOME/shared/pharo` I only have Pharo.image and not gsDevKitCommandLine.image.

Finally, this is the failing code which tries to open an image that doesn't exist:

if [ "${force}" = "true" ] ; then
  "$pharoCmd" "$directoryPath/$imageName" save gsDevKitTmp
else
  "$pharoCmd" "$directoryPath/$initialImageName" save gsDevKitTmp
fi

BTW the console shows "create" as per $message variable. 

Conclusion: if I remove the "-f" argument, it does work, obviously, but then it means it is not always safe to simply follow the instructions of `$GS_HOME/bin/updateGsDevKit -ti` as the `-i` would fail as in my case.

I guess we could check if `$directoryPath/$imageName" ` exists, and if not, then use $initialImageName even if -f was passed by...

Thoughts? 






--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Problem with `create_gs_server_image` in latest gsDevKit_home

GLASS mailing list

I don't quite understand under what conditions you get an error ... and what the error is?

What options are you using and what does the output look like when it fails ...

Dale


On 11/21/17 5:05 AM, Mariano Martinez Peck via Glass wrote:
Hi Dale,

I have just updated to latest GsDevKit release and I am trying to re-build the devKit images. However, there is a problem. I tracked it down up to this line:


 ❯ ./create_gs_server_image -f -d /opt/gemstoneAdditions/GsDevKit_home/shared/pharo gsDevKitCommandLine                                                                                                                         

The problem is that that script, even if at the very beginning it correctly sets `initialImageName=Pharo.image` when we are in case `gsDevKitCommandLine`, but at the end of the switch case, you set `imageName=${imageBaseName}.image`. Therefore, $imageName  would resolve to `gsDevKitCommandLine.image`. Obviously, in `$GS_HOME/shared/pharo` I only have Pharo.image and not gsDevKitCommandLine.image.

Finally, this is the failing code which tries to open an image that doesn't exist:

if [ "${force}" = "true" ] ; then
  "$pharoCmd" "$directoryPath/$imageName" save gsDevKitTmp
else
  "$pharoCmd" "$directoryPath/$initialImageName" save gsDevKitTmp
fi

BTW the console shows "create" as per $message variable. 

Conclusion: if I remove the "-f" argument, it does work, obviously, but then it means it is not always safe to simply follow the instructions of `$GS_HOME/bin/updateGsDevKit -ti` as the `-i` would fail as in my case.
I guess we could check if `$directoryPath/$imageName" ` exists, and if not, then use $initialImageName even if -f was passed by...

Thoughts? 






--


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Problem with `create_gs_server_image` in latest gsDevKit_home

GLASS mailing list


On Tue, Nov 21, 2017 at 2:22 PM, Dale Henrichs via Glass <[hidden email]> wrote:

I don't quite understand under what conditions you get an error ... and what the error is?


It happened to me when I wanted to `updateGsDevKit` and the `-d` caused this problem. Error? No error...pharo VM simply opening the Finder dialog as the passed image didn't exist.  
See attached picture. 
 

What options are you using and what does the output look like when it fails ...


Just the instructions from the GsDevKit release:  `updateGsDevKit -ti` in client or   `updateGsDevKit -gsd` on server. 

What is strange is that this happened to me in my OSX (client side) and in ONE of the server... but not in another one. I imagine the difference is that the working installation did have the `gsDevKitCommandLine.image` already while the other one did not.

Is that clearer now or not yet?


 

Dale


On 11/21/17 5:05 AM, Mariano Martinez Peck via Glass wrote:
Hi Dale,

I have just updated to latest GsDevKit release and I am trying to re-build the devKit images. However, there is a problem. I tracked it down up to this line:


 ❯ ./create_gs_server_image -f -d /opt/gemstoneAdditions/GsDevKit_home/shared/pharo gsDevKitCommandLine                                                                                                                         

The problem is that that script, even if at the very beginning it correctly sets `initialImageName=Pharo.image` when we are in case `gsDevKitCommandLine`, but at the end of the switch case, you set `imageName=${imageBaseName}.image`. Therefore, $imageName  would resolve to `gsDevKitCommandLine.image`. Obviously, in `$GS_HOME/shared/pharo` I only have Pharo.image and not gsDevKitCommandLine.image.

Finally, this is the failing code which tries to open an image that doesn't exist:

if [ "${force}" = "true" ] ; then
  "$pharoCmd" "$directoryPath/$imageName" save gsDevKitTmp
else
  "$pharoCmd" "$directoryPath/$initialImageName" save gsDevKitTmp
fi

BTW the console shows "create" as per $message variable. 

Conclusion: if I remove the "-f" argument, it does work, obviously, but then it means it is not always safe to simply follow the instructions of `$GS_HOME/bin/updateGsDevKit -ti` as the `-i` would fail as in my case.
I guess we could check if `$directoryPath/$imageName" ` exists, and if not, then use $initialImageName even if -f was passed by...

Thoughts? 






--


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass




--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass

Screen Shot 2017-11-21 at 9.32.54 AM.png (979K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Problem with `create_gs_server_image` in latest gsDevKit_home

GLASS mailing list



On 11/21/17 9:40 AM, Mariano Martinez Peck wrote:


On Tue, Nov 21, 2017 at 2:22 PM, Dale Henrichs via Glass <[hidden email]> wrote:

I don't quite understand under what conditions you get an error ... and what the error is?


It happened to me when I wanted to `updateGsDevKit` and the `-d` caused this problem. Error? No error...pharo VM simply opening the Finder dialog as the passed image didn't exist.  
See attached picture. 
 

What options are you using and what does the output look like when it fails ...


Just the instructions from the GsDevKit release:  `updateGsDevKit -ti` in client or   `updateGsDevKit -gsd` on server. 

What is strange is that this happened to me in my OSX (client side) and in ONE of the server... but not in another one. I imagine the difference is that the working installation did have the `gsDevKitCommandLine.image` already while the other one did not.
Okay this was the bit that was confusing to me ... but it makes sense that the -f would fail if the image hadn't been created yet ... submitted a bug [1].

Dale

[1] https://github.com/GsDevKit/GsDevKit_home/issues/199


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Problem with `create_gs_server_image` in latest gsDevKit_home

GLASS mailing list


On Tue, Nov 21, 2017 at 2:47 PM, Dale Henrichs <[hidden email]> wrote:



On 11/21/17 9:40 AM, Mariano Martinez Peck wrote:


On Tue, Nov 21, 2017 at 2:22 PM, Dale Henrichs via Glass <[hidden email]> wrote:

I don't quite understand under what conditions you get an error ... and what the error is?


It happened to me when I wanted to `updateGsDevKit` and the `-d` caused this problem. Error? No error...pharo VM simply opening the Finder dialog as the passed image didn't exist.  
See attached picture. 
 

What options are you using and what does the output look like when it fails ...


Just the instructions from the GsDevKit release:  `updateGsDevKit -ti` in client or   `updateGsDevKit -gsd` on server. 

What is strange is that this happened to me in my OSX (client side) and in ONE of the server... but not in another one. I imagine the difference is that the working installation did have the `gsDevKitCommandLine.image` already while the other one did not.
Okay this was the bit that was confusing to me ... but it makes sense that the -f would fail if the image hadn't been created yet ... submitted a bug [1].

Dale

[1] https://github.com/GsDevKit/GsDevKit_home/issues/199


OK, perfect. I didn't submit any PR because I am not sure which path would you like to follow...  The easiest thing that came to my mind is what I said in first email:

I guess we could check if `$directoryPath/$imageName" ` exists, and if not, then use $initialImageName even if -f was passed by...

But maybe you have a better idea.

Cheers, 

--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Problem with `create_gs_server_image` in latest gsDevKit_home

GLASS mailing list



On 11/21/17 9:49 AM, Mariano Martinez Peck wrote:


On Tue, Nov 21, 2017 at 2:47 PM, Dale Henrichs <[hidden email]> wrote:



On 11/21/17 9:40 AM, Mariano Martinez Peck wrote:


On Tue, Nov 21, 2017 at 2:22 PM, Dale Henrichs via Glass <[hidden email]> wrote:

I don't quite understand under what conditions you get an error ... and what the error is?


It happened to me when I wanted to `updateGsDevKit` and the `-d` caused this problem. Error? No error...pharo VM simply opening the Finder dialog as the passed image didn't exist.  
See attached picture. 
 

What options are you using and what does the output look like when it fails ...


Just the instructions from the GsDevKit release:  `updateGsDevKit -ti` in client or   `updateGsDevKit -gsd` on server. 

What is strange is that this happened to me in my OSX (client side) and in ONE of the server... but not in another one. I imagine the difference is that the working installation did have the `gsDevKitCommandLine.image` already while the other one did not.
Okay this was the bit that was confusing to me ... but it makes sense that the -f would fail if the image hadn't been created yet ... submitted a bug [1].

Dale

[1] https://github.com/GsDevKit/GsDevKit_home/issues/199


OK, perfect. I didn't submit any PR because I am not sure which path would you like to follow...  The easiest thing that came to my mind is what I said in first email:

I guess we could check if `$directoryPath/$imageName" ` exists, and if not, then use $initialImageName even if -f was passed by...

But maybe you have a better idea.
I don't have a better idea ... I've been threatening to create the `gsDevKitCommandLine.image` during the install, so that it will "always exist", but we always have to account for the possibility that the `gsDevKitCommandLine.image` may not exist ...

Cheers, 

--


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Problem with `create_gs_server_image` in latest gsDevKit_home

GLASS mailing list


On Tue, Nov 21, 2017 at 3:15 PM, Dale Henrichs <[hidden email]> wrote:



On 11/21/17 9:49 AM, Mariano Martinez Peck wrote:


On Tue, Nov 21, 2017 at 2:47 PM, Dale Henrichs <[hidden email]> wrote:



On 11/21/17 9:40 AM, Mariano Martinez Peck wrote:


On Tue, Nov 21, 2017 at 2:22 PM, Dale Henrichs via Glass <[hidden email]> wrote:

I don't quite understand under what conditions you get an error ... and what the error is?


It happened to me when I wanted to `updateGsDevKit` and the `-d` caused this problem. Error? No error...pharo VM simply opening the Finder dialog as the passed image didn't exist.  
See attached picture. 
 

What options are you using and what does the output look like when it fails ...


Just the instructions from the GsDevKit release:  `updateGsDevKit -ti` in client or   `updateGsDevKit -gsd` on server. 

What is strange is that this happened to me in my OSX (client side) and in ONE of the server... but not in another one. I imagine the difference is that the working installation did have the `gsDevKitCommandLine.image` already while the other one did not.
Okay this was the bit that was confusing to me ... but it makes sense that the -f would fail if the image hadn't been created yet ... submitted a bug [1].

Dale

[1] https://github.com/GsDevKit/GsDevKit_home/issues/199


OK, perfect. I didn't submit any PR because I am not sure which path would you like to follow...  The easiest thing that came to my mind is what I said in first email:

I guess we could check if `$directoryPath/$imageName" ` exists, and if not, then use $initialImageName even if -f was passed by...

But maybe you have a better idea.
I don't have a better idea ... I've been threatening to create the `gsDevKitCommandLine.image` during the install, so that it will "always exist", but we always have to account for the possibility that the `gsDevKitCommandLine.image` may not exist ...


I thought about that too... but then I imagine maybe someone accidentally remove it (maybe wrongly thinking that would help to rebuild it etc) .. so I kind of concluded adding an IF kind of logic would be safer...

 
Cheers, 

--




--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass