Hi David, Thanks for your detailed response. At this point I believe (b) is going to be more appropriate. I have looked at the path that is generating this error and that is in range of 120-140. So setting default to 200 should be enough. Could you please let me know where exactly I need to make this change? I can do a complete build after this change and let you know if this solves the problem.
Also we need this change for database used in 'save_target_kernel_file'. I saw the following error for a dtb file whose complete path was exceeding 100. django.db.utils.DataError: (1406, "Data too long for column 'file_name' at row 1") Thanks for your help. Best Regards, Shakeel On Wed, Oct 3, 2018 at 8:39 PM Reyna, David <[email protected]> wrote: > Hi Shakeel, > > > > It appears that you are referring to: > > class Target_File(models.Model): > > path = models.FilePathField() > > > > Looking at the documentation for this field type ( > https://docs.djangoproject.com/en/2.1/ref/models/fields/), I see:* > “FilePathField > <https://docs.djangoproject.com/en/2.1/ref/models/fields/#django.db.models.FilePathField> > instances are created in your database as **varchar** columns with a > default max length of 100 characters. As with other fields, you can change > the maximum length using the max_length > <https://docs.djangoproject.com/en/2.1/ref/models/fields/#django.db.models.CharField.max_length> > argument.”* > > > > Clearly 100 characters is very limited, as revealed in your issue. Here > are the choices: > > > > (a) We could go with a TextField redefinition, and have no limit. The > problem is that we lose the associated methods of FIlePathField. I can > review the Toaster code to see if we are actually leveraging those methods, > either directly in the Python code or implicitly in the template code. > > > > (b) Increase the “max_length” to some larger value, for example simply > doubling the default to 200 characters. We could still hit that limit, but > perhaps vanishingly. > > > > Can you give guidance as to what path lengths you are requiring? That will > help give us a real world use case. > > > > Thanks, > > David > > > > > > > > > > > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *Muhammad Shakeel Khan > *Sent:* Wednesday, October 03, 2018 5:53 AM > *To:* [email protected] > *Subject:* [Toaster] Toaster database error > > > > Hi, > > > > I have setup Toaster production instance using Rocko 2.4.2 and it works > fine usually. > > > > Some of our builds have mono libraries and related files (with very long > paths of files to be installed) and for that build I see the following > error: > > > > ERROR: (1406, "Data too long for column 'path' at row 1") > > > > And with this error the Toaster fails to show correct status of a command > line build. > > > > I have worked around this by setting Mysql non-strict mode but that > doesn't look like a good solution and may lead to other errors. > > > > Do you think we can change the SQL entry that specifies the length of > 'path' element? What is the limit on this? > > > > Best Regards, > > Shakeel >
-- _______________________________________________ toaster mailing list [email protected] https://lists.yoctoproject.org/listinfo/toaster
