Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mail.openembedded.org (Postfix) with ESMTP id D96B9731BE for ; Wed, 31 Aug 2016 10:42:00 +0000 (UTC) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 31 Aug 2016 03:42:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,261,1470726000"; d="scan'208";a="1022681828" Received: from irdmzpr01.ir.intel.com (HELO [163.33.54.142]) ([163.33.54.142]) by orsmga001.jf.intel.com with ESMTP; 31 Aug 2016 03:42:01 -0700 To: bitbake-devel@lists.openembedded.org, "Bartosh, Eduard" , Alexander.Egorenkov@vector.com References: <1472553028-3404-1-git-send-email-ed.bartosh@linux.intel.com> From: Michael Wood Message-ID: Date: Wed, 31 Aug 2016 11:41:59 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1472553028-3404-1-git-send-email-ed.bartosh@linux.intel.com> Subject: Re: [krogoth][PATCH] toaster: Increase maximum length of file path of build artifact X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussion that advance bitbake development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2016 10:42:02 -0000 Content-Type: text/plain; charset="windows-1252"; format="flowed" Content-Transfer-Encoding: quoted-printable On 30/08/16 11:30, Ed Bartosh wrote: > From: Alexander Egorenkov > > The default maximum length of the file path for a build artifact on > Krogoth Toaster is 100 characters (Django default for FilePathField). > This value makes it impossible to download build artifacts because > default file paths are quite long and therefore are being truncated > by Toaster. > > Example of a long file path which does not work on my machine: > /var/www/toaster/poky/build-toaster-2/tmp/deploy/sdk/poky-glibc-x86_64-co= re-image-sato-cortexa8hf-neon-toolchain-2.1.1.sh > > To fix this problem i increased the size of 'file_name' column > of the corresponding MySQL table to 255 characters. > > Signed-off-by: Alexander.Egorenkov > Signed-off-by: Ed Bartosh > --- > bitbake/lib/toaster/orm/migrations/0001_initial.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/bitbake/lib/toaster/orm/migrations/0001_initial.py b/bitbake= /lib/toaster/orm/migrations/0001_initial.py > index 760462f..0c780a9 100644 > --- a/bitbake/lib/toaster/orm/migrations/0001_initial.py > +++ b/bitbake/lib/toaster/orm/migrations/0001_initial.py > @@ -52,7 +52,7 @@ class Migration(migrations.Migration): > name=3D'BuildArtifact', > fields=3D[ > ('id', models.AutoField(verbose_name=3D'ID', serialize= =3DFalse, auto_created=3DTrue, primary_key=3DTrue)), > - ('file_name', models.FilePathField()), > + ('file_name', models.FilePathField(max_length=3D255)), > ('file_size', models.IntegerField()), > ('build', models.ForeignKey(to=3D'orm.Build')), > ], To change this field the model definition needs changing at the source = of the definition. All the migration files in /migrations/ are auto generated by Django = itself and will be overwritten the next time the migrations are reset. = It is also applied in order; so if someone has an existing database the = changes will not be applied as the initial migration has already run. To make this a permanent change edit the definition in orm/models.py (I = think the classes you are looking for would be TargetSDKFile and = TargetKernelFile? to add a max_length parameters) once that has be = edited you can run "./manage.py makemigrations" and it will create a new = migration file in /migrations/ to make that amendment to the schema, add = this new file and the changes to models.py and it'll be all good! More info on migrations here = https://docs.djangoproject.com/en/1.8/topics/migrations/ Thanks, Michael --------------------------------------------------------------------- Intel Corporation (UK) Limited Registered No. 1134945 (England) Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.