On 08/12/2015 21:15, "[email protected] on behalf of
Michael Wood" <[email protected] on behalf of
[email protected]> wrote:

>This is the work to introduce the image customisation feature to Toaster.
>As a version 1 this allows basic adding and removing packages of a
>customised
>version of a pre-existing image recipe. To enable this feature run toaster
>with the environment var set CUSTOM_IMAGE=1
>
>http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=michaelw/toa
>ster/ic-6

Tried this, but Toaster didn't want to start. I got the same problem when
starting from an existing database, when starting from a clean database
and with a completely clean clone. I might be doing something silly: not
sure.

Output below:

(venv)yocto@icarus:~/ic6/build$ . ../bitbake/bin/toaster

The system will start.
Syncing...
Creating tables ...
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_groups
Creating table auth_user_user_permissions
Creating table auth_user
Creating table django_content_type
Creating table django_session
Creating table django_admin_log
Creating table south_migrationhistory
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)


Synced:
 > django.contrib.auth
 > django.contrib.contenttypes
 > django.contrib.messages
 > django.contrib.sessions
 > django.contrib.admin
 > django.contrib.staticfiles
 > django.contrib.humanize
 > south


Not synced (use migrations):
 - bldcontrol
 - orm
(use ./manage.py migrate to migrate these)
Running migrations for orm:
 - Migrating forwards to
0029_auto__del_field_customimagerecipe_name__del_field_customimagerecipe_id
.
 > orm:0001_initial
 > orm:0002_auto__add_field_build_timespent
 > orm:0003_timespent
 - Migration 'orm:0003_timespent' is marked for no-dry-run.
 > orm:0004_auto__add_field_package_installed_name
 > 
orm:0005_auto__add_target_image_file__add_target_file__add_field_variablehi
stor
 > 
orm:0006_auto__add_field_target_image_size__add_field_target_license_manife
st_p
 > orm:0007_auto__add_helptext
 > 
orm:0008_auto__chg_field_variablehistory_operation__chg_field_recipe_descri
ptio
 > 
orm:0009_auto__add_projectvariable__add_projectlayer__add_projecttarget__ad
d_pr
 > 
orm:0010_auto__add_field_project_branch__add_field_project_short_descriptio
n__a
 > orm:0011_auto__add_field_projectlayer_dirpath
 > 
orm:0012_auto__add_field_projectlayer_optional__add_field_projecttarget_tas
k
 > 
orm:0013_auto__add_release__add_layerversiondependency__add_unique_layerver
sion
 > 
orm:0014_auto__chg_field_package_summary__chg_field_layer_summary__chg_fiel
d_re
 > 
orm:0015_auto__add_field_layer_vcs_web_url__add_field_layer_vcs_web_tree_ba
se_u
 > 
orm:0016_auto__add_field_release_helptext__chg_field_release_branch__add_in
dex_
 > 
orm:0017_auto__del_toastersettingdefaultlayer__add_releaselayersourcepriori
ty__
 > orm:0018_auto__add_field_layer_version_project
 > orm:0019_auto__add_buildartifact
 > 
orm:0020_auto__add_field_layer_version_local_path__add_field_recipe_pathfla
gs__
 > 
orm:0021_auto__chg_field_build_project__chg_field_project_bitbake_version__
chg_
 - Migration 
'orm:0021_auto__chg_field_build_project__chg_field_project_bitbake_version_
_chg_' is marked for no-dry-run.
 > 
orm:0022_auto__add_field_target_task__add_field_layer_version_local_path__d
el_f
 > 
orm:0023_auto__del_field_build_warnings_no__del_field_build_errors_no__del_
fiel
 > orm:0024_auto__add_field_recipe_is_image
 > orm:0025_auto__add_field_project_is_default
 > orm:0026_set_default_project
 - Migration 'orm:0026_set_default_project' is marked for no-dry-run.
 > 
orm:0027_auto__add_customimagerecipe__add_unique_customimagerecipe_name_pro
ject
 > orm:0028_auto__chg_field_logmessage_message
 > 
orm:0029_auto__add_projectpackage__del_field_customimagerecipe_name__del_fi
eld_
 > 
orm:0029_auto__del_field_customimagerecipe_name__del_field_customimagerecip
e_id
FATAL ERROR - The following SQL query failed: DROP TABLE
"orm_customimagerecipe_packages";
The error was: no such table: orm_customimagerecipe_packages
 ! Error found during real run of migration! Aborting.


 ! Since you have a database that does not support running
 ! schema-altering statements in transactions, we have had
 ! to leave it in an interim state between migrations.


! You *might* be able to recover with:   = CREATE TABLE
"orm_customimagerecipe_packages" ("id" integer NOT NULL PRIMARY KEY,
"customimagerecipe_id" integer NOT NULL, "package_id" integer NOT NULL) []
   = CREATE UNIQUE INDEX
"orm_customimagerecipe_packages_customimagerecipe_id__package_id" ON
"orm_customimagerecipe_packages"("customimagerecipe_id", "package_id"); []
   = CREATE UNIQUE INDEX "orm_customimagerecipe_name__project_id" ON
"orm_customimagerecipe"("name", "project_id"); []


 ! The South developers regret this has happened, and would
 ! like to gently persuade you to consider a slightly
 ! easier-to-deal-with DBMS (one that supports DDL transactions)
 ! NOTE: The error which caused the migration to fail is further up.
Error in migration:
orm:0029_auto__del_field_customimagerecipe_name__del_field_customimagerecip
e_id
Traceback (most recent call last):
  File "../bitbake/bin/../lib/toaster/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/django/core/mana
gement/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/django/core/mana
gement/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/django/core/mana
gement/base.py", line 242, in run_from_argv
    self.execute(*args, **options.__dict__)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/django/core/mana
gement/base.py", line 285, in execute
    output = self.handle(*args, **options)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/south/management
/commands/migrate.py", line 111, in handle
    ignore_ghosts = ignore_ghosts,
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/south/migration/
__init__.py", line 220, in migrate_app
    success = migrator.migrate_many(target, workplan, database)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/south/migration/
migrators.py", line 254, in migrate_many
    result = migrator.__class__.migrate_many(migrator, target, migrations,
database)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/south/migration/
migrators.py", line 329, in migrate_many
    result = self.migrate(migration, database)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/south/migration/
migrators.py", line 133, in migrate
    result = self.run(migration, database)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/south/migration/
migrators.py", line 114, in run
    return self.run_migration(migration, database)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/south/migration/
migrators.py", line 84, in run_migration
    migration_function()
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/south/migration/
migrators.py", line 60, in <lambda>
    return (lambda: direction(orm))
  File 
"/home/yocto/ic6/bitbake/lib/toaster/orm/migrations/0029_auto__del_field_cu
stomimagerecipe_name__del_field_customimagerecipe_id.py", line 26, in
forwards
    db.delete_table(db.shorten_name(u'orm_customimagerecipe_packages'))
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/south/db/sqlite3
.py", line 272, in delete_table
    generic.DatabaseOperations.delete_table(self, table_name, False)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/south/db/generic
.py", line 47, in _cache_clear
    return func(self, table, *args, **opts)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/south/db/generic
.py", line 388, in delete_table
    self.execute('DROP TABLE %s;' % params)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/south/db/generic
.py", line 282, in execute
    cursor.execute(sql, params)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/django/db/backen
ds/util.py", line 69, in execute
    return super(CursorDebugWrapper, self).execute(sql, params)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/django/db/backen
ds/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/django/db/utils.
py", line 99, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/django/db/backen
ds/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/django/db/backen
ds/sqlite3/base.py", line 450, in execute
    return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: no such table:
orm_customimagerecipe_packages
Running migrations for orm:
 - Migrating forwards to
0029_auto__del_field_customimagerecipe_name__del_field_customimagerecipe_id
.
 > 
orm:0029_auto__del_field_customimagerecipe_name__del_field_customimagerecip
e_id
FATAL ERROR - The following SQL query failed: DROP TABLE
"orm_customimagerecipe_packages";
The error was: no such table: orm_customimagerecipe_packages
 ! Error found during real run of migration! Aborting.


 ! Since you have a database that does not support running
 ! schema-altering statements in transactions, we have had
 ! to leave it in an interim state between migrations.


! You *might* be able to recover with:   = CREATE TABLE
"orm_customimagerecipe_packages" ("id" integer NOT NULL PRIMARY KEY,
"customimagerecipe_id" integer NOT NULL, "package_id" integer NOT NULL) []
   = CREATE UNIQUE INDEX
"orm_customimagerecipe_packages_customimagerecipe_id__package_id" ON
"orm_customimagerecipe_packages"("customimagerecipe_id", "package_id"); []
   = CREATE UNIQUE INDEX "orm_customimagerecipe_name__project_id" ON
"orm_customimagerecipe"("name", "project_id"); []


 ! The South developers regret this has happened, and would
 ! like to gently persuade you to consider a slightly
 ! easier-to-deal-with DBMS (one that supports DDL transactions)
 ! NOTE: The error which caused the migration to fail is further up.
Error in migration:
orm:0029_auto__del_field_customimagerecipe_name__del_field_customimagerecip
e_id
Traceback (most recent call last):
  File "../bitbake/bin/../lib/toaster/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/django/core/mana
gement/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/django/core/mana
gement/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/django/core/mana
gement/base.py", line 242, in run_from_argv
    self.execute(*args, **options.__dict__)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/django/core/mana
gement/base.py", line 285, in execute
    output = self.handle(*args, **options)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/south/management
/commands/migrate.py", line 111, in handle
    ignore_ghosts = ignore_ghosts,
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/south/migration/
__init__.py", line 220, in migrate_app
    success = migrator.migrate_many(target, workplan, database)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/south/migration/
migrators.py", line 254, in migrate_many
    result = migrator.__class__.migrate_many(migrator, target, migrations,
database)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/south/migration/
migrators.py", line 329, in migrate_many
    result = self.migrate(migration, database)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/south/migration/
migrators.py", line 133, in migrate
    result = self.run(migration, database)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/south/migration/
migrators.py", line 114, in run
    return self.run_migration(migration, database)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/south/migration/
migrators.py", line 84, in run_migration
    migration_function()
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/south/migration/
migrators.py", line 60, in <lambda>
    return (lambda: direction(orm))
  File 
"/home/yocto/ic6/bitbake/lib/toaster/orm/migrations/0029_auto__del_field_cu
stomimagerecipe_name__del_field_customimagerecipe_id.py", line 26, in
forwards
    db.delete_table(db.shorten_name(u'orm_customimagerecipe_packages'))
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/south/db/sqlite3
.py", line 272, in delete_table
    generic.DatabaseOperations.delete_table(self, table_name, False)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/south/db/generic
.py", line 47, in _cache_clear
    return func(self, table, *args, **opts)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/south/db/generic
.py", line 388, in delete_table
    self.execute('DROP TABLE %s;' % params)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/south/db/generic
.py", line 282, in execute
    cursor.execute(sql, params)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/django/db/backen
ds/util.py", line 69, in execute
    return super(CursorDebugWrapper, self).execute(sql, params)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/django/db/backen
ds/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/django/db/utils.
py", line 99, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/django/db/backen
ds/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File 
"/home/yocto/master/venv/local/lib/python2.7/site-packages/django/db/backen
ds/sqlite3/base.py", line 450, in execute
    return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: no such table:
orm_customimagerecipe_packages


Error on orm migration, rolling back...
Running migrations for orm:
 - Migrating backwards to just after 0001_initial.
 < 
orm:0029_auto__add_projectpackage__del_field_customimagerecipe_name__del_fi
eld_
   (faked)
 < orm:0028_auto__chg_field_logmessage_message
   (faked)
 < 
orm:0027_auto__add_customimagerecipe__add_unique_customimagerecipe_name_pro
ject
   (faked)
 < orm:0026_set_default_project
   (faked)
 < orm:0025_auto__add_field_project_is_default
   (faked)
 < orm:0024_auto__add_field_recipe_is_image
   (faked)
 < 
orm:0023_auto__del_field_build_warnings_no__del_field_build_errors_no__del_
fiel
   (faked)
 < 
orm:0022_auto__add_field_target_task__add_field_layer_version_local_path__d
el_f
   (faked)
 < 
orm:0021_auto__chg_field_build_project__chg_field_project_bitbake_version__
chg_
   (faked)
 < 
orm:0020_auto__add_field_layer_version_local_path__add_field_recipe_pathfla
gs__
   (faked)
 < orm:0019_auto__add_buildartifact
   (faked)
 < orm:0018_auto__add_field_layer_version_project
   (faked)
 < 
orm:0017_auto__del_toastersettingdefaultlayer__add_releaselayersourcepriori
ty__
   (faked)
 < 
orm:0016_auto__add_field_release_helptext__chg_field_release_branch__add_in
dex_
   (faked)
 < 
orm:0015_auto__add_field_layer_vcs_web_url__add_field_layer_vcs_web_tree_ba
se_u
   (faked)
 < 
orm:0014_auto__chg_field_package_summary__chg_field_layer_summary__chg_fiel
d_re
   (faked)
 < 
orm:0013_auto__add_release__add_layerversiondependency__add_unique_layerver
sion
   (faked)
 < 
orm:0012_auto__add_field_projectlayer_optional__add_field_projecttarget_tas
k
   (faked)
 < orm:0011_auto__add_field_projectlayer_dirpath
   (faked)
 < 
orm:0010_auto__add_field_project_branch__add_field_project_short_descriptio
n__a
   (faked)
 < 
orm:0009_auto__add_projectvariable__add_projectlayer__add_projecttarget__ad
d_pr
   (faked)
 < 
orm:0008_auto__chg_field_variablehistory_operation__chg_field_recipe_descri
ptio
   (faked)
 < orm:0007_auto__add_helptext
   (faked)
 < 
orm:0006_auto__add_field_target_image_size__add_field_target_license_manife
st_p
   (faked)
 < 
orm:0005_auto__add_target_image_file__add_target_file__add_field_variablehi
stor
   (faked)
 < orm:0004_auto__add_field_package_installed_name
   (faked)
 < orm:0003_timespent
   (faked)
 < orm:0002_auto__add_field_build_timespent
   (faked)
Failed start.


>
>Michael Wood (34):
>  toaster: localhostbecontroller CustomRecipe now base_recipe is Recipe
>  toaster: models fall back to a sensible string for no vcs reference
>  toaster: ToasterTables simplify filter function move common part to
>    widget
>  toaster: tablejs Add an event handler to manually trigger a data
>    reload
>  toaster: orm Add sum of dependencies size function to
>    PackageDependencyManager
>  toaster: orm make CustomImageRecipe inherit from Recipe
>  toaster: orm: Add db migration for new CustomImageRecipe inheritance
>    change
>  toaster: orm Add ProjectPackage table
>  toaster: orm: Add db migration for new  ProjectPackages table
>  toaster: buildinfohelper Add the concept of ProjectPackages
>  toaster: orm add CustomImageRecipe generate contents function
>  toaster: move CustomImageRecipe generation to API entry point
>  toaster: views Add view to download custom recipe
>  toaster: tables Add table for Packages and update SelectPackagesTable
>  toaster: Continue front end features to custom image recipe page.
>  toaster: newcustomimage Move modal dialog out of newcustomimage
>    template
>  toaster: Add recipe details page
>  toaster: toastertable remove title from Show all in table
>  toaster: views xhr_customrecipe_packages clean up API
>  toaster: toastergui tests Update to reflect changes to
>    CustomImageRecipe
>  toaster: toastergui tests Add unit test for download custom recipe
>  toaster: orm get_project_layer_versions to return layer_version
>    objects
>  toaster: orm Add convenience method to get all pkgs in a
>    CustomImageRecipe
>  toaster: libtoaster Add createCustomRecipe method
>  toaster: newcustomimage_modal use libtoaster method for new
>    CustomRecipe
>  toaster: tables add recipe download link to CustomImagesTable
>  toaster: tables Change SelectPackagesTable to use ProjectPackage
>  toaster: API allow CustomImageRecipe to be updated after creation
>  toaster: xhr_customrecipe_id  change to use ProjectPackage
>  toaster: xhr_customrecipe_packages add GET info for package response
>  toaster: customrecipe Add further front end features using new API
>  toaster: toastergui tests Update package test to use ProjectPackage
>  toaster: tables SelectPackagesTable rename recipe_id to custrecipeid
>  toaster: toastergui tests Add addtional data to the setUp for new
>    tables
>
> bitbake/lib/bb/ui/buildinfohelper.py               | 113 +++++-
> .../toaster/bldcontrol/localhostbecontroller.py    |  29 +-
> ...del_field_customimagerecipe_name__del_field_.py | 433
>+++++++++++++++++++++
> ...erecipe_name__del_field_customimagerecipe_id.py | 379
>++++++++++++++++++
> bitbake/lib/toaster/orm/models.py                  |  95 ++++-
> .../toaster/toastergui/static/js/customrecipe.js   | 176 ++++++++-
> .../lib/toaster/toastergui/static/js/libtoaster.js |  27 ++
> .../toaster/toastergui/static/js/newcustomimage.js |  49 ---
> .../toastergui/static/js/newcustomimage_modal.js   |  28 ++
> .../toaster/toastergui/static/js/recipedetails.js  |  52 +++
> bitbake/lib/toaster/toastergui/static/js/table.js  |   7 +
> bitbake/lib/toaster/toastergui/tables.py           | 239 +++++++++---
> bitbake/lib/toaster/toastergui/templates/base.html |   1 +
> .../toaster/toastergui/templates/customrecipe.html | 186 ++++++---
> .../toastergui/templates/newcustomimage.html       |  44 +--
> .../toastergui/templates/newcustomimage_modal.html |  33 ++
> .../toastergui/templates/pkg_add_rm_btn.html       |  35 +-
> .../toastergui/templates/recipedetails.html        | 180 +++++++++
> .../snippets/pkg_dependencies_popover.html         |  14 +
> .../toaster/toastergui/templates/toastertable.html |   2 +-
> bitbake/lib/toaster/toastergui/tests.py            | 145 +++++--
> bitbake/lib/toaster/toastergui/urls.py             |  17 +-
> bitbake/lib/toaster/toastergui/views.py            | 262 ++++++++++---
> bitbake/lib/toaster/toastergui/widgets.py          |   5 +-
> 24 files changed, 2171 insertions(+), 380 deletions(-)
> create mode 100644
>bitbake/lib/toaster/orm/migrations/0029_auto__add_projectpackage__del_fiel
>d_customimagerecipe_name__del_field_.py
> create mode 100644
>bitbake/lib/toaster/orm/migrations/0029_auto__del_field_customimagerecipe_
>name__del_field_customimagerecipe_id.py
> delete mode 100644
>bitbake/lib/toaster/toastergui/static/js/newcustomimage.js
> create mode 100644
>bitbake/lib/toaster/toastergui/static/js/newcustomimage_modal.js
> create mode 100644
>bitbake/lib/toaster/toastergui/static/js/recipedetails.js
> create mode 100644
>bitbake/lib/toaster/toastergui/templates/newcustomimage_modal.html
> create mode 100644
>bitbake/lib/toaster/toastergui/templates/recipedetails.html
> create mode 100644
>bitbake/lib/toaster/toastergui/templates/snippets/pkg_dependencies_popover
>.html
>
>-- 
>2.1.4
>
>-- 
>_______________________________________________
>toaster mailing list
>[email protected]
>https://lists.yoctoproject.org/listinfo/toaster

-- 
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster

Reply via email to