[UPDATECENTER2-2055] converted 2.3u1->b45 user image path written twice Created: 20/Jan/10  Updated: 22/Sep/10  Resolved: 22/Sep/10

Status: Resolved
Project: updatecenter2
Component/s: notifier
Affects Version/s: 2.3Update1
Fix Version/s: B146

Type: Bug Priority: Major
Reporter: nouar38 Assignee: Chris Kasso
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: All
Platform: All

Attachments: Zip Archive save_updatetool_config.zip    
Issuezilla Id: 2,055


2.3u1 build 38.2699 on ubuntu 9.04 32b:

Have 1 image called as image-XXXX created by u2.3u1 updatetool and then
converted to the new pkg(5) format with build b45 nightly pkg(1) (19/01).
The updatetool detected as expected the node entry as converted to new version.
The "Remove Entry" is not used to remove this image.
Scenario to verify (enhancement) issue 380.

Unfortunately, I did not save the updatetool config directory from yesterday.
I think the image was present in imagelist.cfg and defaults.cfg, and had only 1
entry in the image1-list.cfg

Today when the laptop was power-on/login + start of the local repositories, I
got the 2 notifier balloons showing pending updates for 2.3u1 images (1 image)
and 2.4 b45 images (2 images: image1-XXXX and pkg-toolkit-2.4-b45-linux-i386
from updates.sfbay.sun.com nightly).

The image1-XXXX path is now written twice in the 2 files: imagelist-1.cfg and in
defaults-1.cfg. The path got removed from the imagelist.cfg and defaults.cfg

jesqa@jesqalaptop:~/.updatetool$ ls -al
total 56
drwxr-xr-x 4 jesqa jesqa 4096 2010-01-20 14:56 .
drwxr-xr-x 50 jesqa jesqa 4096 2010-01-20 15:45 ..
rw------ 1 jesqa jesqa 321 2010-01-20 09:40 defaults-1.cfg
rw------ 1 jesqa jesqa 1601 2010-01-20 15:44 defaults.cfg
rw-rr- 1 jesqa jesqa 1653 2010-01-19 14:22 error_log.txt
rw-rr- 1 jesqa jesqa 142 2010-01-20 09:40 imagelist-1.cfg
rw-rr- 1 jesqa jesqa 668 2010-01-20 15:44 imagelist.cfg
drwxr-xr-x 2 jesqa jesqa 4096 2010-01-19 14:39 jesqalaptop
drwxr-xr-x 2 jesqa jesqa 4096 2010-01-19 14:39 lock
-rwxr-xr-x 1 jesqa jesqa 11850 2010-01-19 14:39 notifier
rw-rr- 1 jesqa jesqa 57 2010-01-20 09:39 notifier-1.cfg
rw-rr- 1 jesqa jesqa 44 2010-01-20 09:39 notifier.cfg

jesqa@jesqalaptop:~/.updatetool$ more defaults-1.cfg

  1. Update Tool/Update Tool Desktop Notifier Configuration File
  2. Warning: Do not edit this file. Changes to this file may be lost.
                1. [main]
                  image_list-1 = /home/jesqa/UC23/B38-U1-respin1/image-XXXX

jesqa@jesqalaptop:~/.updatetool$ more imagelist-1.cfg

will join the defaults.cfg file.

Comment by nouar38 [ 20/Jan/10 ]

Created an attachment (id=686)
zip file for the whole updatetool config directory built on ubuntu

Comment by nouar38 [ 21/Jan/10 ]

I was able to reproduce again with a new image called as image-2055, and watched
up the different changes in $HOME/.updatetool/ files. I've removed the
duplicated entry for the previous image image-XXXX, and kept only one in
defaults-1.cfg and imagelist-1.cfg

(check_at_restart set to True)

I think the problem in _last_active_image see below.

Initial Setup:
1) poweron the laptop/login and start the local repositories (shell script + nohup)
2) wait for 6 mn and see the 2 notifiers uc 2.3 u1 and b45 icons/balloons:
B45 notifier: shows 2 images with updates image-XXXX and b45 platform specific
UC 23.u1 notifier: shows 4 test images each one has 1 update.

How to reproduce:
1) launch updatetool 2.3 U1 and create new image image-2055 with one publisher
and install a test package version 1, where newer versions are also available.

2) call pkg(b45) -R fullpath-image-2055 list
===> the image is converted to the new format.

3) Go back to the updatetool GUI and click on the image-2055 node tree
Check the Incompatible Application Image text + Remove Entry button.
Don't click on Remove Entry button.

4) Exit the updatetool, and check defaults.cfg and imagelist.cfg contents
===> no more reference to the image-2055 path in imagelist list neither in the
BUT _last_active_image option is still have the the converted image.

5) poweroff/poweron/log again and start the local repositories (may be extra)

6) wait for 6 minutes.
===> Updates from 2.3 u1 and b45 images are showing up
b45 notifier: showing 3 images
uc 23.u1 : 4 images
===> defaults-1.cfg has only 1 entry for the newly converted image image-2055
and imagelist-1.cfg has only 1 entry for the newly converted image image-2055
and defaults.cfg has _last_active_image with the full path of image-2055

7) Launch the updatetool 2.3 U1
===> the image-2055 node is added back to the imagelist in defaults.cfg

8) logout and login
9) wait for the 6 minutes.
When the 2 notifiers are up again showing the updates, check again the
two file image-list1.cfg and defaults-1.cfg and can see the duplicate entry
of the image-2055.

Comment by Chris Kasso [ 21/Jan/10 ]

Fixed in 2708. ips/compat.py

Generated at Mon Jan 23 13:19:02 UTC 2017 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.