Date   

[error-report-web][PATCH 5/5] Import parser from the new python3 location

Michael Halstead
 

From: Michael Halstead <mhalstead@linxufoundation.org>

---
Post/views.py | 2 +-
README | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Post/views.py b/Post/views.py
index 7791201..161d46d 100644
--- a/Post/views.py
+++ b/Post/views.py
@@ -24,7 +24,7 @@ from django.http import JsonResponse
from django.db.models import Q
import json
import urllib
-from urlparse import urlparse
+from urllib.parse import urlparse

class results_mode(object):
LATEST = 0
diff --git a/README b/README
index f759d28..d56fdbd 100644
--- a/README
+++ b/README
@@ -48,7 +48,7 @@ The latest version can be checked out by git cloning:
git://git.yoctoproject.org/error-report-web

Contributions are welcome. Please send patches / pull requests to
-yocto@yoctoproject.org with '[error-report-web]' in the subject.
+yocto@lists.yoctoproject.org with '[error-report-web]' in the subject.

To manage the size of your database there is a convenience command:

--
2.11.0


[error-report-web][PATCH 4/5] Search on contains, enalble admin, and keep more error history.

Michael Halstead
 

From: Michael Halstead <mhalstead@linxufoundation.org>

---
Post/feed.py | 2 +-
Post/purge.py | 5 +++--
Post/views.py | 3 +--
project/urls.py | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Post/feed.py b/Post/feed.py
index 7e5bfdb..5d57b54 100644
--- a/Post/feed.py
+++ b/Post/feed.py
@@ -27,7 +27,7 @@ class LatestEntriesFeed(Feed):
if self.mode == results_mode.SPECIAL_SUBMITTER and hasattr(settings,"SPECIAL_SUBMITTER"):
#Special submitter mode see settings.py to enable
name = settings.SPECIAL_SUBMITTER['name']
- queryset = BuildFailure.objects.order_by('-BUILD__DATE').filter(BUILD__NAME__istartswith=name)[:self.limit]
+ queryset = BuildFailure.objects.order_by('-BUILD__DATE').filter(BUILD__NAME__icontains=name)[:self.limit]

else:
queryset = BuildFailure.objects.order_by('-BUILD__DATE')[:self.limit]
diff --git a/Post/purge.py b/Post/purge.py
index 1289d13..dd58441 100644
--- a/Post/purge.py
+++ b/Post/purge.py
@@ -15,11 +15,12 @@ def setup_django():
def main():
setup_django()
from Post.models import BuildFailure
- delete_before = timezone.now()-timedelta(days=30)
+ delete_before = timezone.now()-timedelta(days=45)
query = "SELECT bf.id FROM Post_buildfailure bf LEFT JOIN Post_build b ON (bf.BUILD_id = b.id) WHERE bf.REFERER NOT IN ('OTHER','NO_REFERER') AND b.DATE < '{0}'".format(delete_before.date())
- print query
+ #print query
items = BuildFailure.objects.raw(query)
for item in items:
+ print "Deleting: ", item.id
item.delete()

if __name__ == "__main__":
diff --git a/Post/views.py b/Post/views.py
index 0ad58ba..7791201 100644
--- a/Post/views.py
+++ b/Post/views.py
@@ -45,7 +45,6 @@ def common_context(request):

return ret

-
@csrf_exempt
def addData(request, return_json=False):
response = ''
@@ -208,7 +207,7 @@ def search(request, mode=results_mode.LATEST, **kwargs):
if mode == results_mode.SPECIAL_SUBMITTER and hasattr(settings,"SPECIAL_SUBMITTER"):
#Special submitter mode see settings.py to enable
name = settings.SPECIAL_SUBMITTER['name']
- items = items.filter(BUILD__NAME__istartswith=name)
+ items = items.filter(BUILD__NAME__icontains=name)

elif mode == results_mode.SEARCH and "query" in request.GET:
query = request.GET["query"]
diff --git a/project/urls.py b/project/urls.py
index 1f51c7c..c1ac55f 100644
--- a/project/urls.py
+++ b/project/urls.py
@@ -24,7 +24,7 @@ urlpatterns = patterns('',
#url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

# Uncomment the next line to enable the admin:
- #url(r'^admin/', include(admin.site.urls)),
+ url(r'^admin/', include(admin.site.urls)),
#url(r'^accounts/', include('registration.backends.default.urls')),
url(r'^(?i)Errors/Latest/$', 'Post.views.search', { 'mode' : results_mode.LATEST }, name= "latest_errors"),
url(r'^(?i)Errors/Latest/feed$', LatestEntriesFeed(), name="errors_feed"),
--
2.11.0


[error-report-web][PATCH 3/5] Allow alternate settings, avoid out of memory condition

Michael Halstead
 

From: Michael Halstead <mhalstead@linxufoundation.org>

---
Post/purge.py | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/Post/purge.py b/Post/purge.py
index 829fada..1289d13 100644
--- a/Post/purge.py
+++ b/Post/purge.py
@@ -1,4 +1,4 @@
-from datetime import datetime
+from datetime import datetime, timedelta
from django.utils import timezone
import os
import sys
@@ -8,22 +8,19 @@ def setup_django():
# Get access to our Django model
newpath = os.path.abspath(os.path.dirname(__file__)) + '/..'
sys.path.append(newpath)
- os.environ['DJANGO_SETTINGS_MODULE'] = 'project.settings'
+ if not os.getenv('DJANGO_SETTINGS_MODULE'):
+ os.environ['DJANGO_SETTINGS_MODULE'] = 'project.settings'
django.setup()

def main():
setup_django()
from Post.models import BuildFailure
- items = BuildFailure.objects.all()
- now = timezone.now()
+ delete_before = timezone.now()-timedelta(days=30)
+ query = "SELECT bf.id FROM Post_buildfailure bf LEFT JOIN Post_build b ON (bf.BUILD_id = b.id) WHERE bf.REFERER NOT IN ('OTHER','NO_REFERER') AND b.DATE < '{0}'".format(delete_before.date())
+ print query
+ items = BuildFailure.objects.raw(query)
for item in items:
- if item.REFERER == 'OTHER' or item.REFERER == 'NO_REFERER':
- continue
- difference = now - item.BUILD.DATE
- if difference.days > 30:
- item.delete()
+ item.delete()

if __name__ == "__main__":
main()
-
-
--
2.11.0


[error-report-web][PATCH 2/5] Avoid errors caused by attempting to update referrers for objects that don't exist.

Michael Halstead
 

From: Michael Halstead <mhalstead@linxufoundation.org>

---
Post/views.py | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/Post/views.py b/Post/views.py
index 5737076..0ad58ba 100644
--- a/Post/views.py
+++ b/Post/views.py
@@ -256,23 +256,23 @@ def search(request, mode=results_mode.LATEST, **kwargs):
items = items.order_by()
return render(request, "latest-errors.html", context)

-
def details(request, fail_id):
try:
build_failure = BuildFailure.objects.get(id=fail_id)
except ObjectDoesNotExist:
build_failure = None
- try:
- referer = urlparse(request.META['HTTP_REFERER'])
- referer_hostname = referer.hostname
- if referer.port:
- referer_hostname += ":" + str(referer.port)
- if referer_hostname != request.get_host():
- build_failure.REFERER = 'OTHER'
- except KeyError:
- # There is no referer
- build_failure.REFERER = 'NO_REFERER'
- build_failure.save()
+ if build_failure:
+ try:
+ referer = urlparse(request.META['HTTP_REFERER'])
+ referer_hostname = referer.hostname
+ if referer.port:
+ referer_hostname += ":" + str(referer.port)
+ if referer_hostname != request.get_host():
+ build_failure.REFERER = 'OTHER'
+ except KeyError:
+ # There is no referer
+ build_failure.REFERER = 'NO_REFERER'
+ build_failure.save()

context = {'detail' : build_failure, 'error_types' : ErrorType }

--
2.11.0


[error-report-web][PATCH 1/5] purge.py: Create script that will purge database

Michael Halstead
 

From: Amanda Brindle <amanda.r.brindle@intel.com>

The script will be run on a regular basis to get rid of old reports that
we don't need. This will improve the performance of the application
since the database has grown to a huge size.

The script will remove reports older than thirty days if they have not
been referred to by a host other than the Error Reporting Tool.

The function details() in views.py will keep trick of the referer when
a build failure report is accessed. If there is no referer, we will note
that in the database in order to determine how often there is no
referer. It's possible that crawlers will access reports with no
referer; if that's the case, a lack of a referer should not determine
whether we save an older report or not.

Fixes [YOCTO #12332]

Signed-off-by: Amanda Brindle <amanda.r.brindle@intel.com>
---
Post/migrations/0006_buildfailure_referer.py | 19 ++++++++++++++++++
Post/models.py | 10 ++++++++++
Post/purge.py | 29 ++++++++++++++++++++++++++++
Post/views.py | 16 +++++++++++++--
4 files changed, 72 insertions(+), 2 deletions(-)
create mode 100644 Post/migrations/0006_buildfailure_referer.py
create mode 100644 Post/purge.py

diff --git a/Post/migrations/0006_buildfailure_referer.py b/Post/migrations/0006_buildfailure_referer.py
new file mode 100644
index 0000000..5fad048
--- /dev/null
+++ b/Post/migrations/0006_buildfailure_referer.py
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('Post', '0005_build_error_type'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='buildfailure',
+ name='REFERER',
+ field=models.CharField(default=b'NOT_VISITED', max_length=14, choices=[(b'NO_REFERER', b'no_referer'), (b'OTHER', b'other'), (b'NOT_VISITED', b'not_visited')]),
+ ),
+ ]
diff --git a/Post/models.py b/Post/models.py
index cf8c1c2..3fa66f2 100644
--- a/Post/models.py
+++ b/Post/models.py
@@ -61,6 +61,16 @@ class BuildFailure(models.Model):
ERROR_DETAILS = models.TextField(max_length=int(settings.MAX_UPLOAD_SIZE))
BUILD = models.ForeignKey(Build)
LEV_DISTANCE = models.IntegerField(blank=True, null=True)
+ REFERER_CHOICES = (
+ ('NO_REFERER', 'no_referer'),
+ ('OTHER', 'other'),
+ ('NOT_VISITED', 'not_visited')
+ )
+ REFERER = models.CharField(
+ max_length = 14,
+ choices = REFERER_CHOICES,
+ default = 'NOT_VISITED'
+ )

def get_similar_fails(self):
if self.LEV_DISTANCE is None:
diff --git a/Post/purge.py b/Post/purge.py
new file mode 100644
index 0000000..829fada
--- /dev/null
+++ b/Post/purge.py
@@ -0,0 +1,29 @@
+from datetime import datetime
+from django.utils import timezone
+import os
+import sys
+
+def setup_django():
+ import django
+ # Get access to our Django model
+ newpath = os.path.abspath(os.path.dirname(__file__)) + '/..'
+ sys.path.append(newpath)
+ os.environ['DJANGO_SETTINGS_MODULE'] = 'project.settings'
+ django.setup()
+
+def main():
+ setup_django()
+ from Post.models import BuildFailure
+ items = BuildFailure.objects.all()
+ now = timezone.now()
+ for item in items:
+ if item.REFERER == 'OTHER' or item.REFERER == 'NO_REFERER':
+ continue
+ difference = now - item.BUILD.DATE
+ if difference.days > 30:
+ item.delete()
+
+if __name__ == "__main__":
+ main()
+
+
diff --git a/Post/views.py b/Post/views.py
index fe7100e..5737076 100644
--- a/Post/views.py
+++ b/Post/views.py
@@ -24,6 +24,7 @@ from django.http import JsonResponse
from django.db.models import Q
import json
import urllib
+from urlparse import urlparse

class results_mode(object):
LATEST = 0
@@ -258,9 +259,20 @@ def search(request, mode=results_mode.LATEST, **kwargs):

def details(request, fail_id):
try:
- build_failure = BuildFailure.objects.get(id=fail_id)
+ build_failure = BuildFailure.objects.get(id=fail_id)
except ObjectDoesNotExist:
- build_failure = None
+ build_failure = None
+ try:
+ referer = urlparse(request.META['HTTP_REFERER'])
+ referer_hostname = referer.hostname
+ if referer.port:
+ referer_hostname += ":" + str(referer.port)
+ if referer_hostname != request.get_host():
+ build_failure.REFERER = 'OTHER'
+ except KeyError:
+ # There is no referer
+ build_failure.REFERER = 'NO_REFERER'
+ build_failure.save()

context = {'detail' : build_failure, 'error_types' : ErrorType }

--
2.11.0


Re: Howto read bitbake -g files?

Mauro Ziliani
 

Thank you for the answer.
I analyze the problem.

opencv_3.1.bb installs many debug packages by PACKAGES variable

Removing unneeded packages for PACKAGES every *-dev  packages disappears from production image.

MZ


On mar 25 2021, at 7:34 pm, Khem Raj <raj.khem@...> wrote:


On 3/25/21 3:37 AM, Mauro Ziliani wrote:
> An example about my question
>
> Inside package-depends.dot I see this
>
> "opencv-dev" [label="opencv-dev(opencv)
> :3.1+gitAUTOINC+92387b1ef8-r0\n/Sources/softfx/krogoth/sources/meta-openembedded/meta-oe/recipes-support/opencv/opencv_3.1.bb"]
>
> I need to remote opencv-dev from final image.
>
> In pn-depends.dot I see
>
> "opencv" -> "opencv-dev" [style=dashed]

this should only happen if opencv-dev has a .so which is not a symlink
and there is a program in opencv package which depends on it. Can you
expand the content of opencv-dev and see whats in there ?
secondly you can also look at content of opencv package and readelf -d
over the binaries in it and see if some binary is dependent on .so from
-dev package.

you can do this inside opencv build tree under packages-split/ area.
of a built tree.

>
> I understand that
> opencv generates opencv-dev from the recipe opencv_3.1.bb
>
>
>
> Sent from Mailspring <https://getmailspring.com/>, the best free email
> app for work
> On mar 25 2021, at 8:39 am, Mauro Ziliani <mauro@...> wrote:
>
> Hi all
>
> I have to look for the recipes put in my image the *-dev packages.
>
> I removed dev-pkgs and dng-pkgs from IMAGE_FEATURES and debug tweaks
> from DISTRO_FEATURES.
> I don't IMAGE_INSTALL_append any *-dev packages
>
> I generate bitbake  -g image, but I don't produce the PDF because is
> unreadable.
>
> So I read the dot source. I use dot and I know the syntax.
>
> But I don't how to read the graph.
>
>
> MZ
>
>
>
>
> Sent from Mailspring <https://getmailspring.com/>, the best free
> email app for work
>
>
>
>
>


Use bitbake command line to override or modify variable

keydi
 

1. Where to learn more about above command options (file path the file referred to to be found; file path usage in command option,....)?
2. Set/modify variable in bitbake command line, e.g. BBPATH="xyz" bitbake <target> - does this support all supported kinds of variable expansion?
3. Any build process variable classes exist of which the settlement or modification in way as (3) does not work?
4. Any build process variable classes/types exist for which to set or modify it in way as (1) does not work?

5. Any use-cases exist for which -R, --postread, -r, --read to be preferred choice compared with (3)?
6. Any use-cases exist for (3) be better choice compared with -R, --postread, -r, --read?


Re: [error-report-web][PATCH] report-error.bbclass: Add layer and bitbake version info to error report

Milan Shah
 

Thanks, Richard for responding.

I completely understood your point and appreciate the effort you people make to maintain these repositories.

But as a contributor, It encourages me to contribute more when my work gets noticed/criticized/accepted by the community.

Anyways, I hope that the community resolves these issues as soon as possible so that there won't be much delay in updating the patches sent by the contributors.

Thanks & Regards,
Milan Shah

Milan Shah | Software Engineer
a: MontaVista Software, LLC | Bangalore, India
e: info@... | w: www.mvista.com/
p: +91-80-4939-5000


On Fri, Mar 26, 2021 at 4:21 PM Richard Purdie <richard.purdie@...> wrote:
On Fri, 2021-03-26 at 16:04 +0530, Milan Shah wrote:
> It seems like patches sent for error-report-web are not much important to the community as this patch has
> not been reviewed/commented on by anyone since 6th January 2021 (more than 2.5 months).
>
> Still, I'm sending a reminder one last time for [YOCTO #9700].
> https://lists.yoctoproject.org/g/yocto/message/51891
>
> Please review/comment on it so that things can move further.

Sorry, that isn't true, they are important and appreciated. We're 
just struggling to handle everything.

The challenge/problem has been that there are much older patches which
were half merged and broke things. People have rightly been complaining
about those issues and Khem for example has been carrying a patch for 3
years to work arond that problem. I did figure out a fix for that which
has now been merged.

We also needed to migrate the service from py2 to py3 and deal with a
set of patches that had been applied locally that we had been unaware of
until very recently but which complicate things. The people who wrote 
them are no longer around to help with that.

The original authors of this code are no longer around, the people who
stepped up to try and help also haven't had time so the support/review
has struggled. The service is in daily use however so it is important
and that is why I'm now trying to unravel and fix things.

I do want to get to your patch but you can appreciate that adding it
directly on top of an already failing set of changes wouldn't be good
for anyone.

We are making progress in resolving the issues so I hope to get some
kind of better answer to you soon.

Cheers,

Richard



Re: [error-report-web][PATCH] report-error.bbclass: Add layer and bitbake version info to error report

Richard Purdie
 

On Fri, 2021-03-26 at 16:04 +0530, Milan Shah wrote:
It seems like patches sent for error-report-web are not much important to the community as this patch has
not been reviewed/commented on by anyone since 6th January 2021 (more than 2.5 months).

Still, I'm sending a reminder one last time for [YOCTO #9700].
https://lists.yoctoproject.org/g/yocto/message/51891

Please review/comment on it so that things can move further.
Sorry, that isn't true, they are important and appreciated. We're 
just struggling to handle everything.

The challenge/problem has been that there are much older patches which
were half merged and broke things. People have rightly been complaining
about those issues and Khem for example has been carrying a patch for 3
years to work arond that problem. I did figure out a fix for that which
has now been merged.

We also needed to migrate the service from py2 to py3 and deal with a
set of patches that had been applied locally that we had been unaware of
until very recently but which complicate things. The people who wrote 
them are no longer around to help with that.

The original authors of this code are no longer around, the people who
stepped up to try and help also haven't had time so the support/review
has struggled. The service is in daily use however so it is important
and that is why I'm now trying to unravel and fix things.

I do want to get to your patch but you can appreciate that adding it
directly on top of an already failing set of changes wouldn't be good
for anyone.

We are making progress in resolving the issues so I hope to get some
kind of better answer to you soon.

Cheers,

Richard


Re: [error-report-web][PATCH] report-error.bbclass: Add layer and bitbake version info to error report

Milan Shah
 

Hi Richard,

It seems like patches sent for error-report-web are not much important to the community as this patch has not been reviewed/commented on by anyone since 6th January 2021 (more than 2.5 months).

Still, I'm sending a reminder one last time for [YOCTO #9700].

Please review/comment on it so that things can move further.

Thanks & Regards,
Milan Shah

Milan Shah | Software Engineer
a: MontaVista Software, LLC | Bangalore, India
e: info@... | w: www.mvista.com/
p: +91-80-4939-5000


On Mon, Mar 15, 2021 at 4:36 PM Milan Shah <mshah@...> wrote:
Hi,

Review reminder for [YOCTO #9700].


Thanks & Regards,
Milan Shah

Milan Shah | Software Engineer
a: MontaVista Software, LLC | Bangalore, India
e: info@... | w: www.mvista.com/
p: +91-80-4939-5000


On Tue, Feb 23, 2021 at 3:21 PM Milan Shah <mshah@...> wrote:
Hi All,

This has not been reviewed yet and it is given since January 6th.
Please review it and provide review comments if any as soon as possible to resolve this issue.

Thanks & Regards,
Milan Shah

Milan Shah | Software Engineer
a: MontaVista Software, LLC | Bangalore, India
e: info@... | w: www.mvista.com/
p: +91-80-4939-5000


On Mon, Feb 1, 2021 at 10:06 AM Milan Shah <mshah@...> wrote:
Hi All,

A gentle reminder to review this patch.

-----------------------
Thanks & Regards,
Milan Shah
MontaVista Software, Bangalore, India


On Mon, Jan 11, 2021 at 6:45 PM Milan Shah <mshah@...> wrote:
Hi All,

This is a Gentle Reminder to review this Patch.

-----------------------
Thanks & Regards,
Milan Shah
MontaVista Software, Bangalore, India


On Wed, Jan 6, 2021 at 7:09 PM Milan Shah <mshah@...> wrote:
Instead of just providing local.conf info, add layer names and their
revisions with bitbake version information into error report
makes it easier to understand and reproduce failed build.

[YOCTO #9700]

Signed-off-by: Milan Shah <mshah@...>
---
 meta/classes/report-error.bbclass | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/classes/report-error.bbclass b/meta/classes/report-error.bbclass
index 1a12db1..9cb6b0b 100644
--- a/meta/classes/report-error.bbclass
+++ b/meta/classes/report-error.bbclass
@@ -6,6 +6,8 @@
 #
 # Licensed under the MIT license, see COPYING.MIT for details

+inherit base
+
 ERR_REPORT_DIR ?= "${LOG_DIR}/error-report"

 def errorreport_getdata(e):
@@ -64,6 +66,8 @@ python errorreport_handler () {
             data['failures'] = []
             data['component'] = " ".join(e.getPkgs())
             data['branch_commit'] = str(base_detect_branch(e.data)) + ": " + str(base_detect_revision(e.data))
+            data['bitbake_version'] = e.data.getVar("BB_VERSION")
+            data['layer_version'] = get_layers_branch_rev(e.data)
             data['local_conf'] = get_conf_data(e, 'local.conf')
             data['auto_conf'] = get_conf_data(e, 'auto.conf')
             lock = bb.utils.lockfile(datafile + '.lock')
--
2.7.4


Re: [docs] [PATCH 1/2] scripts/run-docs-build: add for loop when publishing tags/branches

Nicolas Dechesne
 



On Fri, Mar 26, 2021 at 11:08 AM Quentin Schulz <quentin.schulz@...> wrote:
Hi Nicolas,

On Thu, Mar 25, 2021 at 07:12:10PM +0100, Nicolas Dechesne wrote:
> Use for loop to avoid repeating the same pattern over and over.
>
> Signed-off-by: Nicolas Dechesne <nicolas.dechesne@...>
> ---
>  scripts/run-docs-build | 72 ++++++++++++++++--------------------------
>  1 file changed, 27 insertions(+), 45 deletions(-)
>
> diff --git a/scripts/run-docs-build b/scripts/run-docs-build
> index 79b1edc..e8e081c 100755
> --- a/scripts/run-docs-build
> +++ b/scripts/run-docs-build
> @@ -33,17 +33,14 @@ make publish
>  mkdir $outputdir/bitbake/next
>  cp -r ./_build/final/* $outputdir/bitbake/next

> -git checkout 1.48
> -make clean
> -make publish
> -mkdir $outputdir/bitbake/1.48
> -cp -r ./_build/final/* $outputdir/bitbake/1.48
> -
> -git checkout 1.46
> -make clean
> -make publish
> -mkdir $outputdir/bitbake/1.46
> -cp -r ./_build/final/* $outputdir/bitbake/1.46
> +# stable branches
> +for branch in 1.46 1.48; do
> +    git checkout $branch
> +    make clean
> +    make publish
> +    mkdir $outputdir/bitbake/$branch
> +    cp -r ./_build/final/* $outputdir/bitbake/$branch
> +done

>  # only sync bitbake folder for now. We need bitbake to be published first
>  # since the bitbake intersphinx index will be downloaded to build yocto-docs
> @@ -69,40 +66,25 @@ make publish
>  mkdir $outputdir/next
>  cp -r ./_build/final/* $outputdir/next

> -cd $ypdocs
> -git checkout gatesgarth
> -make clean
> -make publish
> -mkdir $outputdir/gatesgarth
> -cp -r ./_build/final/* $outputdir/gatesgarth
> -
> -cd $ypdocs
> -git checkout dunfell
> -make clean
> -make publish
> -mkdir $outputdir/dunfell
> -cp -r ./_build/final/* $outputdir/dunfell
> -
> -cd $ypdocs
> -git checkout yocto-3.2.1
> -make clean
> -make publish
> -mkdir $outputdir/3.2.1
> -cp -r ./_build/final/* $outputdir/3.2.1
> -
> -cd $ypdocs
> -git checkout yocto-3.2
> -make clean
> -make publish
> -mkdir $outputdir/3.2
> -cp -r ./_build/final/* $outputdir/3.2
> -
> -cd $ypdocs
> -git checkout yocto-3.1.5
> -make clean
> -make publish
> -mkdir $outputdir/3.1.5
> -cp -r ./_build/final/* $outputdir/3.1.5
> +# stable branches
> +for branch in dunfell gatesgarth; do
> +    cd $ypdocs
> +    git checkout $branch
> +    make clean
> +    make publish
> +    mkdir $outputdir/$branch
> +    cp -r ./_build/final/* $outputdir/$branch
> +done
> +
> +# Yocto Project releases/tags
> +for tag in 3.1.5 3.2 3.2.1; do

What about using `git tag -l 3.2*` so that we don't need to maintain the
list of tags?

Or, maybe `git tag --contains <3.1.5 commit hash introducing sphinx doc>
--contains <3.2 commit hash introducing sphinx doc>` so that the
3.1.[56789] tags don't need to be added either?

yes, I thought about that too.. I wanted to get a quick fix first to publish 3.1.6 and 3.2.2 which were missing.. 
on the other hand, we have a larger issue with this. The 'release' information is needed here , but it's also needed on the website (downloads) and it's needed in the switchers.js as well... 
So we probably want to take a high level view of the problem. Michael created https://bugzilla.yoctoproject.org/show_bug.cgi?id=14330 to let us think about it.

my idea would be a publish/maintain a yaml file that would represent the database of all our releases and docs, which would be maintained/updated by the release manager, it would include all information we need to build and publish the docs, update the 'download' page on the website, ... 

up until now, we have been using:

i think we need a few improvements to that.. 



Same mechanism can be used for bitbake git repo I guess.

Cheers,
Quentin


Re: [docs] [PATCH 1/2] scripts/run-docs-build: add for loop when publishing tags/branches

Quentin Schulz
 

Hi Nicolas,

On Thu, Mar 25, 2021 at 07:12:10PM +0100, Nicolas Dechesne wrote:
Use for loop to avoid repeating the same pattern over and over.

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
---
scripts/run-docs-build | 72 ++++++++++++++++--------------------------
1 file changed, 27 insertions(+), 45 deletions(-)

diff --git a/scripts/run-docs-build b/scripts/run-docs-build
index 79b1edc..e8e081c 100755
--- a/scripts/run-docs-build
+++ b/scripts/run-docs-build
@@ -33,17 +33,14 @@ make publish
mkdir $outputdir/bitbake/next
cp -r ./_build/final/* $outputdir/bitbake/next

-git checkout 1.48
-make clean
-make publish
-mkdir $outputdir/bitbake/1.48
-cp -r ./_build/final/* $outputdir/bitbake/1.48
-
-git checkout 1.46
-make clean
-make publish
-mkdir $outputdir/bitbake/1.46
-cp -r ./_build/final/* $outputdir/bitbake/1.46
+# stable branches
+for branch in 1.46 1.48; do
+ git checkout $branch
+ make clean
+ make publish
+ mkdir $outputdir/bitbake/$branch
+ cp -r ./_build/final/* $outputdir/bitbake/$branch
+done

# only sync bitbake folder for now. We need bitbake to be published first
# since the bitbake intersphinx index will be downloaded to build yocto-docs
@@ -69,40 +66,25 @@ make publish
mkdir $outputdir/next
cp -r ./_build/final/* $outputdir/next

-cd $ypdocs
-git checkout gatesgarth
-make clean
-make publish
-mkdir $outputdir/gatesgarth
-cp -r ./_build/final/* $outputdir/gatesgarth
-
-cd $ypdocs
-git checkout dunfell
-make clean
-make publish
-mkdir $outputdir/dunfell
-cp -r ./_build/final/* $outputdir/dunfell
-
-cd $ypdocs
-git checkout yocto-3.2.1
-make clean
-make publish
-mkdir $outputdir/3.2.1
-cp -r ./_build/final/* $outputdir/3.2.1
-
-cd $ypdocs
-git checkout yocto-3.2
-make clean
-make publish
-mkdir $outputdir/3.2
-cp -r ./_build/final/* $outputdir/3.2
-
-cd $ypdocs
-git checkout yocto-3.1.5
-make clean
-make publish
-mkdir $outputdir/3.1.5
-cp -r ./_build/final/* $outputdir/3.1.5
+# stable branches
+for branch in dunfell gatesgarth; do
+ cd $ypdocs
+ git checkout $branch
+ make clean
+ make publish
+ mkdir $outputdir/$branch
+ cp -r ./_build/final/* $outputdir/$branch
+done
+
+# Yocto Project releases/tags
+for tag in 3.1.5 3.2 3.2.1; do
What about using `git tag -l 3.2*` so that we don't need to maintain the
list of tags?

Or, maybe `git tag --contains <3.1.5 commit hash introducing sphinx doc>
--contains <3.2 commit hash introducing sphinx doc>` so that the
3.1.[56789] tags don't need to be added either?

Same mechanism can be used for bitbake git repo I guess.

Cheers,
Quentin


Re: [docs] [PATCH 2/2] scripts/run-docs-build: publish docs for 3.1.6 and 3.2.2

Michael Opdenacker <michael.opdenacker@...>
 

Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>

(for both patches).

Thanks!

On 3/25/21 7:12 PM, Nicolas Dechesne wrote:
Fixes: #14308

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
---
scripts/run-docs-build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/run-docs-build b/scripts/run-docs-build
index e8e081c..9c7ec8d 100755
--- a/scripts/run-docs-build
+++ b/scripts/run-docs-build
@@ -77,7 +77,7 @@ for branch in dunfell gatesgarth; do
done

# Yocto Project releases/tags
-for tag in 3.1.5 3.2 3.2.1; do
+for tag in 3.1.5 3.1.6 3.2 3.2.1 3.2.2; do
cd $ypdocs
git checkout yocto-$tag
make clean


--
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


Re: [qa-build-notification] QA notification for completed autobuilder build (yocto-3.3_M3.rc2)

Sangeeta Jain
 

Hi All,

This is the full report for yocto-3.3_M3.rc2:
https://git.yoctoproject.org/cgit/cgit.cgi/yocto-testresults-contrib/tree/?h=intel-yocto-testresults

======= Summary ========
No high milestone defects.

No new issue found:


Bugs verified:

BUG id:14306 - [3.3 M3 rc1] beaglebone poky-alt wic image can not bootup
Verified Fixed.

======= Bugs ========
https://bugzilla.yoctoproject.org/show_bug.cgi?id=14306

Thanks,
Sangeeta

-----Original Message-----
From: qa-build-notification@lists.yoctoproject.org <qa-build-
notification@lists.yoctoproject.org> On Behalf Of Pokybuild User
Sent: Wednesday, 24 March, 2021 12:01 PM
To: yocto@lists.yoctoproject.org
Cc: qa-build-notification@lists.yoctoproject.org
Subject: [qa-build-notification] QA notification for completed autobuilder build
(yocto-3.3_M3.rc2)


A build flagged for QA (yocto-3.3_M3.rc2) was completed on the autobuilder
and is available at:


https://autobuilder.yocto.io/pub/releases/yocto-3.3_M3.rc2


Build hash information:

bitbake: ed8e1fd4cf9d5ac8a8203638add99d686b4b3521
meta-arm: ac1dc0b894642101a80235a920bdc3bbe6d74558
meta-gplv2: 9e119f333cc8f53bd3cf64326f826dbc6ce3db0f
meta-intel: 6fea44c695730129df8bd744b0e22ccd62a725c2
meta-kernel: 29329d7cacc71595cecfdd05a455a0cfb164564d
meta-mingw: 422b96cb2b6116442be1f40dfb5bd77447d1219e
oecore: 7ae12e4278e98c5b916a1067ae0b48c2da6e82cd
poky: ea455ca8671d3bc2a1097989bfaabe92f3ca37ab



This is an automated message from the Yocto Project Autobuilder
Git: git://git.yoctoproject.org/yocto-autobuilder2
Email: richard.purdie@linuxfoundation.org







Re: libcansocket: Weird issue with pkgsplit

Khem Raj
 

On 3/25/21 11:07 PM, Huuki, Tuomas wrote:
Lähettäjä: Khem Raj <raj.khem@gmail.com>
Lähetetty: torstai 25. maaliskuuta 2021 20.29
Vastaanottaja: Huuki, Tuomas <tuomas.huuki@crosscontrol.com>; yocto@lists.yoctoproject.org
Aihe: Re: [yocto] libcansocket: Weird issue with pkgsplit
[EXTERNAL SENDER] - If you believe this may be PHISHING, please click the "Report Phishing" button above.
On 3/25/21 1:06 AM, Tuomas Huuki wrote:
Hello all,
I have an interesting situation with libcansocket and bitbake that I
cannot wrap my head around. For some reason, the packages are being
split up somewhat strangely and I cannot figure out why.
First of all, the recipe used is:
https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
ub.com%2Fopenembedded%2Fmeta-openembedded%2Fblob%2F9a0de2779b9b31f134f
fe19388b5b9b37bb6450e%2Fmeta-oe%2Frecipes-extended%2Fsocketcan%2Flibso
cketcan_0.0.11.bb&amp;data=04%7C01%7Ctuomas.huuki%40crosscontrol.com%7
C8496799aa67e4cb3bac908d8efbbdd60%7C8b3fa9f59a3d4339a66aa9f7e39c9126%7
C0%7C0%7C637522937456377594%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD
AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=hLiu
fQtPTmCJvs1FfSemKVHnMmi5zBUKOHW%2BXgfMAyw%3D&amp;reserved=0
<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit
hub.com%2Fopenembedded%2Fmeta-openembedded%2Fblob%2F9a0de2779b9b31f134
ffe19388b5b9b37bb6450e%2Fmeta-oe%2Frecipes-extended%2Fsocketcan%2Flibs
ocketcan_0.0.11.bb&amp;data=04%7C01%7Ctuomas.huuki%40crosscontrol.com%
7C8496799aa67e4cb3bac908d8efbbdd60%7C8b3fa9f59a3d4339a66aa9f7e39c9126%
7C0%7C0%7C637522937456387589%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=mp6
vRRNyAG%2Bf2KnsAxxIWWMgjrmp%2BZSJWgU2rCVxGP4%3D&amp;reserved=0>
So no strange things there.

Additionally, looking at the built items:

../build/tmp/work/aarch64-poky-linux/libsocketcan/0.0.11-r0/image/usr/
lib$ ls -lah libsocketcan* lrwxrwxrwx 1 tuomas tuomas 21 maali 18
10:38 libsocketcan.so -> libsocketcan.so.2.3.0 lrwxrwxrwx 1 tuomas
tuomas 21 maali 18 10:38 libsocketcan.so.2 -> libsocketcan.so.2.3.0
-rwxr-xr-x 1 tuomas tuomas 58K maali 18 10:38 libsocketcan.so.2.3.0

All looks good at this point. Now, when I deploy the image, the first
link is missing.
When I look at pkgdata I can see that the link ends up in libsocketcan-dev:

$ oe-pkgdata-util list-pkg-files libsocketcan
libsocketcan:
/usr/lib/libsocketcan.so.2
/usr/lib/libsocketcan.so.2.3.0
$ oe-pkgdata-util list-pkg-files libsocketcan-dev
libsocketcan-dev:
/usr/include/can_netlink.h
/usr/include/libsocketcan.h
/usr/lib/libsocketcan.so
/usr/lib/pkgconfig/libsocketcan.pc
Its following usual soname naming conventions [1] for versioned shared libs where .so is a symlink which is used when something is linking to it during build time. thats why its in -dev package, if you want to use it at runtime then linker will add proper versioned .so into DT_NEEDED sections of dependent package which will be libsocketcan.so.2 in this case. So if your program is trying to dlopen it then I would suggest to use libsocketcan.so.2 and if its trying to link to it during build time then it should add right entry into DT_NEEDED sections.

I am also wondering why would you want to move .so to main package.
Thank you for the input! The request actually came from a client (a special case) and I started looking in to how to do this with Yocto/bitbake. It's still a little unclear to me how the package is split in to the different subpackages and how files end up in their locations. Any pointers on that?
look at populate_packages() function in package.bbclass

Also, the other confusing thing is the naming, where the main library is renamed to libsocketcan2, but all the other packages are named libsocketcan.
-rw-r--r-- 3 tuomas tuomas 5,8K maali 25 10:19 libsocketcan2_0.0.11-r0.7_aarch64.ipk
-rw-r--r-- 3 tuomas tuomas 16K maali 25 10:19 libsocketcan-dbg_0.0.11-r0.7_aarch64.ipk
-rw-r--r-- 3 tuomas tuomas 3,1K maali 25 10:19 libsocketcan-dev_0.0.11-r0.7_aarch64.ipk
-rw-r--r-- 3 tuomas tuomas 13K maali 25 10:19 libsocketcan-doc_0.0.11-r0.7_aarch64.ipk
-rw-r--r-- 3 tuomas tuomas 8,9K maali 25 10:19 libsocketcan-src_0.0.11-r0.7_aarch64.ipk
But I guess that's just semantics.


libcansocket: Weird issue with pkgsplit

Tuomas Huuki
 

Lähettäjä: Khem Raj <raj.khem@gmail.com>
Lähetetty: torstai 25. maaliskuuta 2021 20.29
Vastaanottaja: Huuki, Tuomas <tuomas.huuki@crosscontrol.com>; yocto@lists.yoctoproject.org
Aihe: Re: [yocto] libcansocket: Weird issue with pkgsplit

[EXTERNAL SENDER] - If you believe this may be PHISHING, please click the "Report Phishing" button above.

On 3/25/21 1:06 AM, Tuomas Huuki wrote:
Hello all,
I have an interesting situation with libcansocket and bitbake that I
cannot wrap my head around. For some reason, the packages are being
split up somewhat strangely and I cannot figure out why.
First of all, the recipe used is:
https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
ub.com%2Fopenembedded%2Fmeta-openembedded%2Fblob%2F9a0de2779b9b31f134f
fe19388b5b9b37bb6450e%2Fmeta-oe%2Frecipes-extended%2Fsocketcan%2Flibso
cketcan_0.0.11.bb&amp;data=04%7C01%7Ctuomas.huuki%40crosscontrol.com%7
C8496799aa67e4cb3bac908d8efbbdd60%7C8b3fa9f59a3d4339a66aa9f7e39c9126%7
C0%7C0%7C637522937456377594%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD
AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=hLiu
fQtPTmCJvs1FfSemKVHnMmi5zBUKOHW%2BXgfMAyw%3D&amp;reserved=0
<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit
hub.com%2Fopenembedded%2Fmeta-openembedded%2Fblob%2F9a0de2779b9b31f134
ffe19388b5b9b37bb6450e%2Fmeta-oe%2Frecipes-extended%2Fsocketcan%2Flibs
ocketcan_0.0.11.bb&amp;data=04%7C01%7Ctuomas.huuki%40crosscontrol.com%
7C8496799aa67e4cb3bac908d8efbbdd60%7C8b3fa9f59a3d4339a66aa9f7e39c9126%
7C0%7C0%7C637522937456387589%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=mp6
vRRNyAG%2Bf2KnsAxxIWWMgjrmp%2BZSJWgU2rCVxGP4%3D&amp;reserved=0>
So no strange things there.

Additionally, looking at the built items:

../build/tmp/work/aarch64-poky-linux/libsocketcan/0.0.11-r0/image/usr/
lib$ ls -lah libsocketcan* lrwxrwxrwx 1 tuomas tuomas 21 maali 18
10:38 libsocketcan.so -> libsocketcan.so.2.3.0 lrwxrwxrwx 1 tuomas
tuomas 21 maali 18 10:38 libsocketcan.so.2 -> libsocketcan.so.2.3.0
-rwxr-xr-x 1 tuomas tuomas 58K maali 18 10:38 libsocketcan.so.2.3.0

All looks good at this point. Now, when I deploy the image, the first
link is missing.
When I look at pkgdata I can see that the link ends up in libsocketcan-dev:

$ oe-pkgdata-util list-pkg-files libsocketcan
libsocketcan:
/usr/lib/libsocketcan.so.2
/usr/lib/libsocketcan.so.2.3.0
$ oe-pkgdata-util list-pkg-files libsocketcan-dev
libsocketcan-dev:
/usr/include/can_netlink.h
/usr/include/libsocketcan.h
/usr/lib/libsocketcan.so
/usr/lib/pkgconfig/libsocketcan.pc
Its following usual soname naming conventions [1] for versioned shared libs where .so is a symlink which is used when something is linking to it during build time. thats why its in -dev package, if you want to use it at runtime then linker will add proper versioned .so into DT_NEEDED sections of dependent package which will be libsocketcan.so.2 in this case. So if your program is trying to dlopen it then I would suggest to use libsocketcan.so.2 and if its trying to link to it during build time then it should add right entry into DT_NEEDED sections.

I am also wondering why would you want to move .so to main package.
Thank you for the input! The request actually came from a client (a special case) and I started looking in to how to do this with Yocto/bitbake. It's still a little unclear to me how the package is split in to the different subpackages and how files end up in their locations. Any pointers on that?

Also, the other confusing thing is the naming, where the main library is renamed to libsocketcan2, but all the other packages are named libsocketcan.
-rw-r--r-- 3 tuomas tuomas 5,8K maali 25 10:19 libsocketcan2_0.0.11-r0.7_aarch64.ipk
-rw-r--r-- 3 tuomas tuomas 16K maali 25 10:19 libsocketcan-dbg_0.0.11-r0.7_aarch64.ipk
-rw-r--r-- 3 tuomas tuomas 3,1K maali 25 10:19 libsocketcan-dev_0.0.11-r0.7_aarch64.ipk
-rw-r--r-- 3 tuomas tuomas 13K maali 25 10:19 libsocketcan-doc_0.0.11-r0.7_aarch64.ipk
-rw-r--r-- 3 tuomas tuomas 8,9K maali 25 10:19 libsocketcan-src_0.0.11-r0.7_aarch64.ipk

But I guess that's just semantics.


OpenEmbedded Happy Hour March 31 5pm/1700 UTC

Denys Dmytriyenko
 

Hi,

Just a reminder about our upcoming OpenEmbedded Happy Hour on March 31 for
Europe/US timezones @ 1700/5pm UTC (1pm ET / 10am PT):

https://www.openembedded.org/wiki/Calendar
https://www.timeanddate.com/worldclock/fixedtime.html?msg=OpenEmbedded+Happy+Hour+March+31&iso=20210331T17

--
Regards,
Denys Dmytriyenko <denis@denix.org>
PGP: 0x420902729A92C964 - https://denix.org/0x420902729A92C964
Fingerprint: 25FC E4A5 8A72 2F69 1186 6D76 4209 0272 9A92 C964


[error-report-web][PATCH 5/5] Import parser from the new python3 location

Michael Halstead
 

From: Michael Halstead <mhalstead@linxufoundation.org>

---
Post/views.py | 2 +-
README | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Post/views.py b/Post/views.py
index 7791201..161d46d 100644
--- a/Post/views.py
+++ b/Post/views.py
@@ -24,7 +24,7 @@ from django.http import JsonResponse
from django.db.models import Q
import json
import urllib
-from urlparse import urlparse
+from urllib.parse import urlparse

class results_mode(object):
LATEST = 0
diff --git a/README b/README
index f759d28..d56fdbd 100644
--- a/README
+++ b/README
@@ -48,7 +48,7 @@ The latest version can be checked out by git cloning:
git://git.yoctoproject.org/error-report-web

Contributions are welcome. Please send patches / pull requests to
-yocto@yoctoproject.org with '[error-report-web]' in the subject.
+yocto@lists.yoctoproject.org with '[error-report-web]' in the subject.

To manage the size of your database there is a convenience command:

--
2.11.0


[error-report-web][PATCH 4/5] Search on contains, enalble admin, and keep more error history.

Michael Halstead
 

From: Michael Halstead <mhalstead@linxufoundation.org>

---
Post/feed.py | 2 +-
Post/purge.py | 5 +++--
Post/views.py | 3 +--
project/urls.py | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Post/feed.py b/Post/feed.py
index 7e5bfdb..5d57b54 100644
--- a/Post/feed.py
+++ b/Post/feed.py
@@ -27,7 +27,7 @@ class LatestEntriesFeed(Feed):
if self.mode == results_mode.SPECIAL_SUBMITTER and hasattr(settings,"SPECIAL_SUBMITTER"):
#Special submitter mode see settings.py to enable
name = settings.SPECIAL_SUBMITTER['name']
- queryset = BuildFailure.objects.order_by('-BUILD__DATE').filter(BUILD__NAME__istartswith=name)[:self.limit]
+ queryset = BuildFailure.objects.order_by('-BUILD__DATE').filter(BUILD__NAME__icontains=name)[:self.limit]

else:
queryset = BuildFailure.objects.order_by('-BUILD__DATE')[:self.limit]
diff --git a/Post/purge.py b/Post/purge.py
index 1289d13..dd58441 100644
--- a/Post/purge.py
+++ b/Post/purge.py
@@ -15,11 +15,12 @@ def setup_django():
def main():
setup_django()
from Post.models import BuildFailure
- delete_before = timezone.now()-timedelta(days=30)
+ delete_before = timezone.now()-timedelta(days=45)
query = "SELECT bf.id FROM Post_buildfailure bf LEFT JOIN Post_build b ON (bf.BUILD_id = b.id) WHERE bf.REFERER NOT IN ('OTHER','NO_REFERER') AND b.DATE < '{0}'".format(delete_before.date())
- print query
+ #print query
items = BuildFailure.objects.raw(query)
for item in items:
+ print "Deleting: ", item.id
item.delete()

if __name__ == "__main__":
diff --git a/Post/views.py b/Post/views.py
index 0ad58ba..7791201 100644
--- a/Post/views.py
+++ b/Post/views.py
@@ -45,7 +45,6 @@ def common_context(request):

return ret

-
@csrf_exempt
def addData(request, return_json=False):
response = ''
@@ -208,7 +207,7 @@ def search(request, mode=results_mode.LATEST, **kwargs):
if mode == results_mode.SPECIAL_SUBMITTER and hasattr(settings,"SPECIAL_SUBMITTER"):
#Special submitter mode see settings.py to enable
name = settings.SPECIAL_SUBMITTER['name']
- items = items.filter(BUILD__NAME__istartswith=name)
+ items = items.filter(BUILD__NAME__icontains=name)

elif mode == results_mode.SEARCH and "query" in request.GET:
query = request.GET["query"]
diff --git a/project/urls.py b/project/urls.py
index 1f51c7c..c1ac55f 100644
--- a/project/urls.py
+++ b/project/urls.py
@@ -24,7 +24,7 @@ urlpatterns = patterns('',
#url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

# Uncomment the next line to enable the admin:
- #url(r'^admin/', include(admin.site.urls)),
+ url(r'^admin/', include(admin.site.urls)),
#url(r'^accounts/', include('registration.backends.default.urls')),
url(r'^(?i)Errors/Latest/$', 'Post.views.search', { 'mode' : results_mode.LATEST }, name= "latest_errors"),
url(r'^(?i)Errors/Latest/feed$', LatestEntriesFeed(), name="errors_feed"),
--
2.11.0


[error-report-web][PATCH 3/5] Allow alternate settings, avoid out of memory condition

Michael Halstead
 

From: Michael Halstead <mhalstead@linxufoundation.org>

---
Post/purge.py | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/Post/purge.py b/Post/purge.py
index 829fada..1289d13 100644
--- a/Post/purge.py
+++ b/Post/purge.py
@@ -1,4 +1,4 @@
-from datetime import datetime
+from datetime import datetime, timedelta
from django.utils import timezone
import os
import sys
@@ -8,22 +8,19 @@ def setup_django():
# Get access to our Django model
newpath = os.path.abspath(os.path.dirname(__file__)) + '/..'
sys.path.append(newpath)
- os.environ['DJANGO_SETTINGS_MODULE'] = 'project.settings'
+ if not os.getenv('DJANGO_SETTINGS_MODULE'):
+ os.environ['DJANGO_SETTINGS_MODULE'] = 'project.settings'
django.setup()

def main():
setup_django()
from Post.models import BuildFailure
- items = BuildFailure.objects.all()
- now = timezone.now()
+ delete_before = timezone.now()-timedelta(days=30)
+ query = "SELECT bf.id FROM Post_buildfailure bf LEFT JOIN Post_build b ON (bf.BUILD_id = b.id) WHERE bf.REFERER NOT IN ('OTHER','NO_REFERER') AND b.DATE < '{0}'".format(delete_before.date())
+ print query
+ items = BuildFailure.objects.raw(query)
for item in items:
- if item.REFERER == 'OTHER' or item.REFERER == 'NO_REFERER':
- continue
- difference = now - item.BUILD.DATE
- if difference.days > 30:
- item.delete()
+ item.delete()

if __name__ == "__main__":
main()
-
-
--
2.11.0

1361 - 1380 of 54255