Skip to content
This repository was archived by the owner on Jan 27, 2019. It is now read-only.

Conversation

@vmbracvlvm
Copy link

Print a warning if building on unsupported os. The warning triggers a
prompt asking to continue or abort build. Use '-s' (--skip-os-check) option to
automatically continue build.

To add a supported OS see core/setup directory. Files can also be added in
a setup folder in local meta layer. To unsupport an OS add a
setup file with only the distro-release line (keep only the first line).

It would be handy to have a feature to disable all other setup folders
but the one in local layer. But so far this has not been implemented.

@esben esben added the ready label Sep 16, 2016
print
break

if response == 'n':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this break when stdin is not tty? Maybe just initialize response to 'n' in an else clause to the tty if.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better :)

@esben esben modified the milestone: 6.1.0 Sep 20, 2016
@esben
Copy link
Contributor

esben commented Sep 28, 2016

Any progress on this?

@esben esben modified the milestones: 6.2.0, 6.1.0 Sep 28, 2016
@vmbracvlvm vmbracvlvm force-pushed the jsch/oe_make_oe_warn_unsupported_os branch from 58ea237 to 2044739 Compare September 30, 2016 09:52
@vmbracvlvm
Copy link
Author

Setting initial value of response to 'n' thus failing per default. Use -s to force continue.

@esben
Copy link
Contributor

esben commented Sep 30, 2016

Before merging this, we really need to have a setup file for Ubuntu 16.04 (and probably 15.10 as well).

@esben esben modified the milestones: 6.3.0, 6.2.0 Sep 30, 2016
@PrevasJsch
Copy link

Im on it

@vmbracvlvm
Copy link
Author

setup files has been vaguely tested in official ubuntu containers

@esben
Copy link
Contributor

esben commented Nov 7, 2016

Oh, if you add a debian_8 setup file, build should hopefully go green.

@vmbracvlvm vmbracvlvm force-pushed the jsch/oe_make_oe_warn_unsupported_os branch from 0cd4f30 to 1418756 Compare November 7, 2016 11:58
Jonas Suhr Christensen added 3 commits November 7, 2016 14:42
Print a warning if building on unsupported os. The warning triggers a
prompt asking to continue or abort build. Use '-s' (--skip-os-check) option to
automatically continue build.

To add a supported OS see core/setup directory. Files can also be added in
a setup folder in local meta layer. To unsupport an OS add a
setup file with only the distro-release line (keep only the first line).

It would be handy to have a feature to disable all other setup folders
but the one in local layer. But so far this has not been implemented.
@vmbracvlvm vmbracvlvm force-pushed the jsch/oe_make_oe_warn_unsupported_os branch from 1418756 to 651154f Compare November 7, 2016 13:43
@vmbracvlvm
Copy link
Author

Still need to detect debian distro in setup.get_host_distro()

@esben esben added in progress and removed ready labels Nov 8, 2016
Copy link

@kimrhh kimrhh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you don't feel like addressing my comments for this, then I don't mind taking over the change :)

if distro and release:
print('WARNING: Host distribution (%s %s) has not been validated'%(distro, release))
else:
print("WARNING: Cannot determine host distribution")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this stuff does not really belong in bake. Let us make good use of OO and keep the responsibility for the logic about support host OS in the setup code.

What is needed is a refactor of the setup code, so you can simply ask it from bake "are we running on a supported host OS", probably something like a "is_supported()" method or the like. The rest of the setup code should of cause use that as well

if response == 'n':
print "Maybe another time"
return False
return True
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't this a duplication of the other place where we interactively ask if we should continue?

Let us not do that, we already have a mess of duplication and responsibility in the code. Please refactor this out to a place where it can be used by commands that need it.

def run(options, args, config):

if not options.skip_os_check:
if not os_check(config):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line is basically what I would imagine should be needed in bake, but by calling into the setup code.

If lsb-release is not present on system try to get host distro from
distro specific release or version files.

Add check for:
 * Ubuntu 16.04
 * Ubuntu 15.10
 * Ubuntu 15.04
 * Debian 8
 * Debian 7
@esben
Copy link
Contributor

esben commented Nov 23, 2016

@vmbracvlvm @kimrhh Who is going to follow up on this?

@kimrhh
Copy link

kimrhh commented Nov 24, 2016

I will look at it some time, but don't know when

@esben
Copy link
Contributor

esben commented Dec 3, 2016

Ok, it will have to be delayed to 7.0 then.

@esben esben modified the milestones: 7.0.0, 6.3.0 Dec 3, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants