Tweaks for ubuntu precise #49

merged 2 commits into from Aug 24, 2012


None yet
3 participants

hmalphettes commented Aug 22, 2012

Thanks Michal for looking after the shebang.

I am getting further errors when running on ubuntu-12.04 (aka precise)
The reason is that the file command does not return the same text on ubuntu-10.10 (aka lucid)

Here is the file:

root@lucid64:/vagrant# ll /opt/sm/exts/active/bosh-solo/bin/status
-rwxr-xr-x 1 root root 498 2012-08-22 02:27 /opt/sm/exts/active/bosh-solo/bin/status*
root@lucid64:/vagrant# cat /opt/sm/exts/active/bosh-solo/bin/status | head -1
#!/usr/bin/env ruby

On lucid64, the file command returns:

root@lucid64:/vagrant# file /opt/sm/exts/active/bosh-solo/bin/status
/opt/sm/exts/active/bosh-solo/bin/status: a ruby script text executable

On precise64:

root@precise64:/vagrant# file /opt/sm/exts/active/bosh-solo/bin/status
/opt/sm/exts/active/bosh-solo/bin/status: a ruby script, ASCII text executable

As a consequence; on lucid64, bosh-solo status's action_type is "binary"
where as on precise64, it is "ruby".
This explains the difference of treatment and why on lucid64 we did not see the shebang issue reported in pull 48.

The next problem is this block of code around line 188

 ... for script in functions initialize
    requires+=( "-r${__sm_modules_path}/ruby/core/${script}.rb" )

It is not executed on lucid64; on precise64, it is executed and looks for the files:

Both of which do not exist.
For now I have added a guard to check if they exist and silently skip them if they don't.

After that sm bosh-solo status works fine on precise.

Thanks again for your attention!

hmalphettes Fix a warning issued by a ruby extension on 12.04
On ubuntu-precise when running a ruby extension the console shows:
    root@precise64:~# sm bosh-solo status
    __sm.extension.actions.type:43: scalar parameter binary created globally in

This pull request passes (merged 1976910 into 89ab1ab).

hmalphettes Only add existing files to the ruby requires
This is a guard to not add to the list files that don't exist.
When sm is installed for the root user, those files are


They look like core sm files: this fix is not the definitive one.
Are these files located elsewhere?
Should this block of code be entirely removed?

This pull request passes (merged 0d308ec into 89ab1ab).

@mpapis mpapis added a commit that referenced this pull request Aug 24, 2012

@mpapis mpapis Merge pull request #49 from hmalphettes/tweaks_for_ubuntu_precise
Tweaks for ubuntu precise

@mpapis mpapis merged commit 2b8929c into sm:master Aug 24, 2012

1 check passed

default The Travis build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment