Bug 9992 - If we run oe-init-build-env with an argument for builddir, toaster start fails
Summary: If we run oe-init-build-env with an argument for builddir, toaster start fails
Status: RESOLVED FIXED
Alias: None
Product: Toaster
Classification: Build System, Metadata & Runtime
Component: toaster (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.3 M3
Assignee: brian avery
QA Contact: Libertad
URL:
Whiteboard:
Depends on:
Blocks: 11109
  Show dependency tree
 
Reported: 2016-07-21 16:23 UTC by brian avery
Modified: 2017-03-15 15:02 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description brian avery 2016-07-21 16:23:29 UTC
To replicate:
mkdir ~/cow;
cd ~/cow;
. ~/poky/oe-init-build-env .;
. toaster start;
# . toaster start will fail:
sqlite3.OperationalError: unable to open database file                                                              │·································
++++++++++++
a proposal:
Currently, we reach "above" the build dir and put toaster directory's e.g. build_toaster_xx and _toaster_clones_ there.  Unfortunately, we can't even guarantee that the running user has permissions to access the directory above the builddir. For example, if I do cd ~;. ~/poky/oe-init-build-env .; I don't have permission for /home.
So, I'd be ok with a standard start being 
build/
build/conf
build/toaster_build_XX
build/_toaster_clones_
That way cd ~;. ~/poky/oe-init-build-env .;. toaster start; would work.
Comment 1 Michael Wood 2016-08-03 15:22:10 UTC
hint this currently set in: toastermain/settings.py 
 
  TOASTER_SQLITE_DEFAULT_DIR = os.path.join(os.environ.get('TOASTER_DIR', ''),
                                            'build')
  
  DATABASES = {
      'default': {
          # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
          'ENGINE': 'django.db.backends.sqlite3',
          # DB name or full path to database file if using sqlite3.
          'NAME': "%s/toaster.sqlite" % TOASTER_SQLITE_DEFAULT_DIR,
          'USER': '',


(We should really ecourage people to write their own config files such as we have for the test db  toastermain/settings_test.py)
Comment 2 brian avery 2016-11-02 15:02:13 UTC
*** Bug 10524 has been marked as a duplicate of this bug. ***
Comment 3 brian avery 2017-02-01 19:10:28 UTC
sent to toaster ml:
https://patchwork.openembedded.org/series/5104/
Comment 4 brian avery 2017-03-15 15:02:20 UTC
f43d97af9466580c3a10d766791836b42c674497