Skip to contentSkip to conversation

bitbake: toaster: do not stop data import on bad data

PATCH In review Brian Avery 3 participants 5 messages Jul 14, 2015 – Jul 15, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bitbake: toaster: do not stop data import on bad data

Continue storing layers in the database even if we hit a bad layer.

[YOCTO #7955]

---
 bitbake/lib/toaster/orm/models.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/toaster/orm/models.py +1 -1
index 4ea75f2..c218198 100644
@@ -891,7 +891,7 @@ class LayerIndexLayerSource(LayerSource):
                 dependlist[lv].append(Layer_Version.objects.get(layer_source = self, layer__up_id = ldi['dependency'], up_branch = lv.up_branch))
             except Layer_Version.DoesNotExist as e:
                 print "Cannot find layer version ", self, ldi['dependency'], lv.up_branch
-                raise e
+                pass
 
         for lv in dependlist:
             LayerVersionDependency.objects.filter(layer_version = lv).delete()
Signature · 1 line
1.9.1
#1 lore raw
Quoted 13 lines · Brian Avery

Continue storing layers in the database even if we hit a bad layer.

[YOCTO #7955]

---
  bitbake/lib/toaster/orm/models.py | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/toaster/orm/models.py +0 -0
index 4ea75f2..c218198 100644

bitbake/lib/toaster/orm/models.py class LayerIndexLayerSource(LayerSource): · line 897

Quoted 8 lines
bitbake/lib/toaster/orm/models.py +1 -1
@@ -891,7 +891,7 @@ class LayerIndexLayerSource(LayerSource):
                  dependlist[lv].append(Layer_Version.objects.get(layer_source = self, layer__up_id = ldi['dependency'], up_branch = lv.up_branch))
              except Layer_Version.DoesNotExist as e:
                  print "Cannot find layer version ", self, ldi['dependency'], lv.up_branch
-                raise e
+                pass
 
          for lv in dependlist:
              LayerVersionDependency.objects.filter(layer_version = lv).delete()

You can also remove the variable "e" to avoid an unused variable warning here.

(pylint will pick this up https://wiki.yoctoproject.org/wiki/Contribute_to_Toaster#Python )

#2 lore raw
In reply to Brian Avery

Hello,

I am not sure why submitting a patch when I already had a patch for review, as bug 7955 status was set to IN PROGRESS REVIEW.

Anyhow, the
pass

is superfluous there, as highlighted by pylint.

Cheers,
Alex

Quoted 35 lines · Brian Avery

Continue storing layers in the database even if we hit a bad layer.

[YOCTO #7955]

---
 bitbake/lib/toaster/orm/models.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/toaster/orm/models.py +0 -0
index 4ea75f2..c218198 100644
@@ -891,7 +891,7 @@ class LayerIndexLayerSource(LayerSource):
 
 dependlist[lv].append(Layer_Version.objects.get(layer_source = self,
 layer__up_id = ldi['dependency'], up_branch = lv.up_branch))
             except Layer_Version.DoesNotExist as e:
                 print "Cannot find layer version ", self,

ldi['dependency'], lv.up_branch

bitbake/lib/toaster/orm/models.py +1 -1
-                raise e
+                pass
 
         for lv in dependlist:
             LayerVersionDependency.objects.filter(layer_version =

lv).delete()
--
1.9.1

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

Signature · 3 lines
Alex Damian
Yocto Project
SSG / OTC
#3 lore raw

This is the patch I was mentioning.

Quoted 60 lines · Alexandru

Hello,

I am not sure why submitting a patch when I already had a patch for review, as bug 7955 status was set to IN PROGRESS REVIEW.

Anyhow, the
pass

is superfluous there, as highlighted by pylint.

Cheers,
Alex

Quoted 29 lines · Brian Avery

Continue storing layers in the database even if we hit a bad layer.

[YOCTO #7955]

---
 bitbake/lib/toaster/orm/models.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/toaster/orm/models.py +0 -0
index 4ea75f2..c218198 100644
@@ -891,7 +891,7 @@ class LayerIndexLayerSource(LayerSource):
 
 dependlist[lv].append(Layer_Version.objects.get(layer_source = self,
 layer__up_id = ldi['dependency'], up_branch = lv.up_branch))
             except Layer_Version.DoesNotExist as e:
                 print "Cannot find layer version ", self,

ldi['dependency'], lv.up_branch

bitbake/lib/toaster/orm/models.py +1 -1
-                raise e
+                pass
 
         for lv in dependlist:
             LayerVersionDependency.objects.filter(layer_version =

lv).delete()
--
1.9.1

Quoted 6 lines

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

--
Alex Damian
Yocto Project
SSG / OTC

Signature · 3 lines
Alex Damian
Yocto Project
SSG / OTC
#4 lore raw

Actual patch link.

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=adamian/20150707_bugs&id=1b59005b9d09acfa97c42c58a0259e5835c69c53

It is not easily backported in its current format to fido; something like your patch needs to be there.

Quoted 74 lines · Alexandru

This is the patch I was mentioning.

Quoted 46 lines · Alexandru

Hello,

I am not sure why submitting a patch when I already had a patch for review, as bug 7955 status was set to IN PROGRESS REVIEW.

Anyhow, the
pass

is superfluous there, as highlighted by pylint.

Cheers,
Alex

Quoted 29 lines · Brian Avery

Continue storing layers in the database even if we hit a bad layer.

[YOCTO #7955]

---
 bitbake/lib/toaster/orm/models.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/toaster/orm/models.py +0 -0
index 4ea75f2..c218198 100644
@@ -891,7 +891,7 @@ class LayerIndexLayerSource(LayerSource):
 
 dependlist[lv].append(Layer_Version.objects.get(layer_source = self,
 layer__up_id = ldi['dependency'], up_branch = lv.up_branch))
             except Layer_Version.DoesNotExist as e:
                 print "Cannot find layer version ", self,

ldi['dependency'], lv.up_branch

bitbake/lib/toaster/orm/models.py +1 -1
-                raise e
+                pass
 
         for lv in dependlist:
             LayerVersionDependency.objects.filter(layer_version =

lv).delete()
--
1.9.1

Quoted 14 lines
Quoted 6 lines

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

--
Alex Damian
Yocto Project
SSG / OTC

--
Alex Damian
Yocto Project
SSG / OTC

Signature · 3 lines
Alex Damian
Yocto Project
SSG / OTC