Skip to contentSkip to conversation

fix banner after customimage package add

version 2 review-request In review Dave Lerner 3 participants 4 messages Feb 23, 2016 – Feb 25, 2016

lore
Share & tools
lore
#0 lore raw

Branch: toaster-next
Defect: 9101
Summary: version2: toaster: fix banner after customimage package add

v1 vs v2 change: Removed patch to views.py that will be addressed in a different manner for a different defect per review comments from Michael.

Test Setup
----------
Build core-image-sato in order to capture package dependencies for tests. Create a new custom image based on core-image-minimal.
Test with the pacakge atk which has 3 unadded dependencies: libpcre, glib-2.0, and libffi. Make certain that old orm_customimage_* tables are empty, no residuals from prior runs.

Test cases and expected results
-------------------------------
Verify that adding a package with unaddded dependencies will add the dependencies visually and in the build by:
Click the 'add package' button for package atk.
Click 'add package' in the popup modal dialog to add the 3 dependencies.
Verify that all 4 packages, atk and 3 dependents, now show buttons with
labels 'remove package' instead of 'add...'
Build the image.
Verify in the built image under packages that all 4 packages are added
to the image using the right panel Packages and clicking each package.

Verify that adding a package with either
- a package with dependency list already added or in the image,
- or without dependency list
correctly shows the addition of 1 package in the banner.
Remove atk, then add it back atk.
Verify that banner says
"You have added <bold>1</bold> package to myimage : atk"
Note: only 1 package because dependencies were not removed in previous
step.

#1 lore raw

PATCH 1/1 toaster: fix banner after customimage package add

Correct formatting of the banner message after adding a package to a custom image.

[YOCTO #9101]

---
 bitbake/lib/toaster/toastergui/static/js/customrecipe.js | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
bitbake/lib/toaster/toastergui/static/js/customrecipe.js +5 -2
index a1fe486..3c57899 100644
@@ -127,7 +127,8 @@ function customRecipePageInit(ctx) {
       if (targetPkg.hasOwnProperty('depsAdded') &&
         targetPkg.depsAdded.length > 0) {
 
-        msg += "added " + (targetPkg.depsAdded.length + 1);
+        msg += "added ";
+        msg += "<strong>" + (targetPkg.depsAdded.length + 1) + "</strong>";
         msg += " packages to " + ctx.recipe.name + ": ";
         msg += "<strong>" + targetPkg.name + "</strong> and its dependencies";
 
@@ -150,7 +151,9 @@ function customRecipePageInit(ctx) {
           (targetPkg.depsAdded.length + 1) + " packages added");
 
       } else {
-        msg += ' <strong>' + targetPkg.name + '<strong>';
+        msg += "added <strong>1</strong>";
+        msg += " package to " + ctx.recipe.name + ": ";
+        msg += "<strong>" + targetPkg.name + "</strong>";
         inlineNotify.text("1 package added");
       }
 
Signature · 1 line
1.9.1
#2 lore raw

Re: [PATCH 1/1 Version 2] toaster: fix banner after customimage package add

Quoted 4 lines · On 23/02/2016 18:03, "[email protected] on behalf of Dave…

Correct formatting of the banner message after adding a package to a custom image.

[YOCTO #9101]

I've tried several things, but I can no longer see the truncated message when adding packages. So this seems to be working for me.

Thanks!

Belén

Quoted 42 lines

---
bitbake/lib/toaster/toastergui/static/js/customrecipe.js | 7 +++++--

1 file changed, 5 insertions(+), 2 deletions(-)
bitbake/lib/toaster/toastergui/static/js/customrecipe.js +2 -1
index a1fe486..3c57899 100644
@@ -127,7 +127,8 @@ function customRecipePageInit(ctx) {
      if (targetPkg.hasOwnProperty('depsAdded') &&
        targetPkg.depsAdded.length > 0) {
 
-        msg += "added " + (targetPkg.depsAdded.length + 1);
+        msg += "added ";
+        msg += "<strong>" + (targetPkg.depsAdded.length + 1) +
 "</strong>";
        msg += " packages to " + ctx.recipe.name + ": ";
        msg += "<strong>" + targetPkg.name + "</strong> and its

dependencies";

bitbake/lib/toaster/toastergui/static/js/customrecipe.js +3 -1
@@ -150,7 +151,9 @@ function customRecipePageInit(ctx) {
          (targetPkg.depsAdded.length + 1) + " packages added");
 
      } else {
-        msg += ' <strong>' + targetPkg.name + '<strong>';
+        msg += "added <strong>1</strong>";
+        msg += " package to " + ctx.recipe.name + ": ";
+        msg += "<strong>" + targetPkg.name + "</strong>";
        inlineNotify.text("1 package added");
      }
 
Signature · 7 lines
1.9.1

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

Re: [PATCH 1/1 Version 2] toaster: fix banner after customimage package add

Sent upstream and added to toaster-next.

Elliot

Quoted 67 lines · Belen
Quoted 4 lines · On 23/02/2016 18:03, "[email protected] on behalf of Dave…

Correct formatting of the banner message after adding a package to a custom image.

[YOCTO #9101]

I've tried several things, but I can no longer see the truncated message when adding packages. So this seems to be working for me.

Thanks!

Belén

Quoted 37 lines

---
bitbake/lib/toaster/toastergui/static/js/customrecipe.js | 7 +++++--

1 file changed, 5 insertions(+), 2 deletions(-)
bitbake/lib/toaster/toastergui/static/js/customrecipe.js +2 -1
index a1fe486..3c57899 100644
@@ -127,7 +127,8 @@ function customRecipePageInit(ctx) {
      if (targetPkg.hasOwnProperty('depsAdded') &&
        targetPkg.depsAdded.length > 0) {
 
-        msg += "added " + (targetPkg.depsAdded.length + 1);
+        msg += "added ";
+        msg += "<strong>" + (targetPkg.depsAdded.length + 1) +
 "</strong>";
        msg += " packages to " + ctx.recipe.name + ": ";
        msg += "<strong>" + targetPkg.name + "</strong> and its

dependencies";

bitbake/lib/toaster/toastergui/static/js/customrecipe.js +3 -2
@@ -150,7 +151,9 @@ function customRecipePageInit(ctx) {
          (targetPkg.depsAdded.length + 1) + " packages added");
 
      } else {
-        msg += ' <strong>' + targetPkg.name + '<strong>';
+        msg += "added <strong>1</strong>";
+        msg += " package to " + ctx.recipe.name + ": ";
+        msg += "<strong>" + targetPkg.name + "</strong>";
        inlineNotify.text("1 package added");
      }
 
--

1.9.1

Quoted 5 lines

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

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

Signature · 3 lines
Elliot Smith
Software Engineer
Intel Open Source Technology Centre