Clicking banner about "The Definitive Guides to Ubuntu" in precise doesn't work on fresh install

Bug #986563 reported by Michael Terry on 2012-04-21
78
This bug affects 19 people
Affects Status Importance Assigned to Milestone
software-center (Ubuntu)
Medium
Natalia Bidart
Precise
Undecided
Unassigned

Bug Description

SRU TEST CASE:
This bug fix hides any banners for which the corresponding packages are not yet available in the Software Center database. Therefore, to verify you can simply test the banners in the updated version in -proposed as shown:
1. Update to the version of software-center in precise-proposed.
2. Launch Ubuntu Software Center again and click on any banner that is shown.
3. Verify that a package or list of packages is correctly displayed.

SRU REGRESSION POTENTIAL:
Regression risk low. Check that banners are displayed correctly and work properly as described above.

---

To reproduce, click on the banner that says "The Definitive Guides to Ubuntu" (it shows a bunch of books).

You'll see an error message like:

Not found
There isn’t a software package called “ubuntu-unleashed-2012
ubuntu-unleashed-2011
ubuntu-practical-guide
ubuntu-server-book
official-ubuntu-book
” in your current software sources.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: software-center 5.2
ProcVersionSignature: Ubuntu 3.2.0-23.36-generic-pae 3.2.14
Uname: Linux 3.2.0-23-generic-pae i686
ApportVersion: 2.0.1-0ubuntu5
Architecture: i386
CheckboxSubmission: 9a284f3f6b4f7829abbe27ad9573a709
CheckboxSystem: 3935143777c965daaa64b51f0134f712
Date: Sat Apr 21 09:19:34 2012
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110422)
PackageArchitecture: all
SourcePackage: software-center
UpgradeStatus: Upgraded to precise on 2011-11-05 (167 days ago)

Related branches

Michael Terry (mterry) wrote :

Thank you for your bug report. I can confirm this.

Changed in software-center (Ubuntu):
status: New → Confirmed
Kiwinote (kiwinote) wrote :

Looks like someone used the wrong syntax in the package_names field.

The books exhibit has
"package_names": "ubuntu-unleashed-2012\r\nubuntu-unleashed-2011\r\nubuntu-practical-guide\r\nubuntu-server-book\r\nofficial-ubuntu-book\r\n",
which should be (iirc)
"package_names": "ubuntu-unleashed-2012,ubuntu-unleashed-2011,ubuntu-practical-guide,ubuntu-server-book,official-ubuntu-book",

https://software-center.ubuntu.com/api/2.0/exhibits/en/

Michael Vogt (mvo) on 2012-04-23
Changed in software-center (Ubuntu):
importance: Undecided → High
Dave Morley (davmor2) on 2012-04-23
tags: added: ca-escalated
Kiwinote (kiwinote) wrote :

Looks like someone fixed this - thanks!

https://software-center.ubuntu.com/api/2.0/exhibits/en/

Changed in software-center (Ubuntu):
status: Confirmed → Fix Released
Michael Vogt (mvo) wrote :

Please note that there is a also a race condition here (as Anthony mentioned to me). The banners are displayed before the software-center-agent is updated. So there is a time of ~1min or so on a first install when you just see nothing when selecting the guides :/

summary: Clicking banner about "The Definitive Guides to Ubuntu" in precise
- doesn't work
+ doesn't work on fresh install
Changed in software-center (Ubuntu):
status: Fix Released → In Progress
status: In Progress → Triaged
Changed in software-center (Ubuntu):
assignee: nobody → Natalia Bidart (nataliabidart)
status: Triaged → In Progress
status: In Progress → Triaged
assignee: Natalia Bidart (nataliabidart) → nobody
Michael Vogt (mvo) wrote :

In order to fix this bug the code in ui/gtk3/views/catview_gtk.py for _append_banner_ads() needs to become
smarter.

The current code will simply do a "exhibits_banner.set_exhibits(l)" when the exhibits are comming
back from the exhibits API call. It should instead have a method that first goes over the existing exhibits and
checks if the given packagename is availalbe in the xapian database, e.g. by checking if:
  Application("", pkgname).get_details(self.db)
works and does not raise a ValueError.

Alternatively we could pass a "db" reference to the scagent and let the agent filter the non-existing apps out
(not not yet existing ones). The agent would also need to connect to the db "reopen" signal to ensure that its
emiting the exibits signal again when new information from the software-center-agent comes in so that the
banners can get updated.

Changed in software-center (Ubuntu):
assignee: nobody → Natalia Bidart (nataliabidart)
status: Triaged → In Progress
Natalia Bidart (nataliabidart) wrote :

I definitely prefer the first option rather than passing the db to the SoftwareCenterAgent, and having yet another component where the db is passed to.

Will propose a branch soon where the set_exhibits method is improved and only available exhibits are shown.

Michael Vogt (mvo) on 2012-06-04
Changed in software-center (Ubuntu):
importance: High → Medium
surya prakash (suryabvsp1996) wrote :

Same issue affects the installation of the game "Battle of Wesnoth" in Ubuntu 12.04 precise.

description: updated

Hello Michael, or anyone else affected,

Accepted software-center into precise-proposed. The package will build now and be available in a few hours. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case details of your testing will help us make a better decision. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in software-center (Ubuntu Precise):
status: New → Fix Committed
tags: added: verification-needed
Michael Terry (mterry) wrote :

Can you explain how to 'reset' the software-center agent so that I can get back to a pristine condition and reproduce the ~1min race condition?

Gary Lasker (gary-lasker) wrote :

Hiya Michael. Simplest is to just delete the contents of your USC local cache directory to reset all of the info from the agent. The cache is here:

   ~/.cache/software-center

Michael Terry (mterry) wrote :

Thanks, Gary!

This almost worked. So before the update, this is what happens:

1) Open USC
2) See the "Star Apps" banner
3) See it change to the Ultima banner (and see the four dots on the bottom right)
4) Immediately click on Ultima banner
5) See a "this package does not exist" message
6) Which is quickly replaced by the page for the ultima package

Now after the update (and a cache purge):

1) Open USC
2) See the "Star Apps" banner
3) See it change to the Tickr banner (WITHOUT the four dots on the bottom right)
4) The other banners never appear
5) Unless I restart, in which case, they show up

(I can't seem to trigger the race anymore, so that part of the bug seems fixed. Now it's just a matter of only the Tickr banner showing up, which is a regression introduced by the updated package.)

tags: added: verification-failed
removed: verification-needed
Gary Lasker (gary-lasker) wrote :

Hey again Michael. What you describe in the second section is actually the *fix in operation*. We now filter out any banners for which the corresponding packages are not all available. So, the first time you start up after a cache purge, only Tickr has been verified, and so only the Tickr banner is shown. After you restart, the agent has had its chance to fully update, and the other banners are displayed.

In other words, this bug is fixed by the fact that we will never show a banner for which the packages are not ready. As this condition becomes satified as soon as the agent update is complete, this is not a condition that lasts long (as evidenced by the fact that your next startup showed all of the banners.

So, I'd like to propose that this is in fact verification-done (check the test case, you've verified it it seems to me). Unless you find this behavior unacceptable. It is definitely not a regression, in any case.

What do you think?

description: updated
Michael Terry (mterry) wrote :

OK, if that's expected, fine. I expected the other banners to pop in as they became available, rather than next startup. But I defer to your judgement as to whether that is a regression (pre-fix, all banners were accessible after a few seconds) or a wishlist item.

Changed in software-center (Ubuntu):
status: In Progress → Fix Released
Gary Lasker (gary-lasker) wrote :

Well, pre-fix, all banners were accessible, but they weren't valid yet. But I do see your point and I agree. I guess I think it's ok as it really just comes down to timing. The banners generally stay up for about a month, so I don't think it's so important that they appear immediately. I think they appear quite soon after they become available in any case.

I'll set this as verification-done so as not to have this one block the many other fixes in the SRU. If the current behavior bothers you, it's certainly worth a new bug and we can try to address this.

Thanks, Michael!! :D

Gary Lasker (gary-lasker) wrote :

I have verified that software-center version 5.2.3 in precise-proposed fixes this bug per the test case given in the description.

Thanks!

tags: added: verification-done
removed: verification-failed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-center - 5.2.3

---------------
software-center (5.2.3) precise-proposed; urgency=low

  [ Robert Roth ]
  * lp:~evfool/software-center/lp987801:
    - Only show the version label once for each version in
      reviews (LP: #987801)
  * lp:~evfool/software-center/lp874430:
    - display tooltips for package titles in the application
      tiles of the lobby view (LP: #874430)
  * lp:~evfool/software-center/lp983831:
    - Avoid merging two words while normalizing description (LP: #983831)
  * lp:~evfool/software-center/lp822625:
    - Set default value for reviewstats histogram (LP: #822625)
  * lp:~evfool/software-center/lp875874:
    - Set word wrap with fallback to char wrapping for the review
      text label (LP: #875874)

  [ Gabor Kelemen ]
  * lp:~kelemeng/software-center/bug1001746:
    - merge i18n fix (LP: #1001746)

  [ Michael Vogt ]
  * lp:~mvo/software-center/lp872760-for-5.2:
    - fix translations for certain category names (LP: #872760)
  * lp:~mvo/software-center/lp987321:
    - fix dependency to ensure that we have humanity-icon-theme
      as we need it for the history view icons (LP: #987321)
  * lp:~mvo/software-center/test-catview-cleanup:
    - refactor unit tests for the catview
  * lp:~mvo/software-center/lp1002271:
    - fix regresion in 5.2.2 (LP: #1002271) for empty descriptions
  * lp:~mvo/software-center/lp1005104:
    - fix regression in 5.2.2 (LP: #1005104) in initial navigation
      history
  * lp:~mvo/software-center/client-lp1004417:
    - client side fix for when exhibit package names contain
      extra whitespace (LP: #1004417)

  [ Gary Lasker ]
  * lp:~gary-lasker/software-center/fix-crash-lp1000238:
    - remove obsolete workaround for an old bug that has long since
      been fixed, this fixes a hard crash on Quantal (LP: #1000238)
  * lp:~gary-lasker/software-center/toolbar-buttons-insensitive-during-startup:
    - re-enable the fix for LP: #999486, LP: #994341 that was inadvertently
      disabled in the 5.2.2 release

  [ Natalia Bidart ]
  * lp:~nataliabidart/software-center/fix-977931:
    - Unified package string parsing into a single method that will be
      used from either the command line arguments, or from the dbus method
      'bringToFront'. This way, search will be consistent between all
      entry points. LP: #977931
    - Also added proper test suites for the above.
  * lp:~nataliabidart/software-center/fix-965093:
    - Fixed the SpinnerNtebook show_spinner method so the spinner page is
      not shown until the configured threshold is reached (250ms since
      this branch). Plus proper test suite was added.
  * lp:~nataliabidart/software-center/fix-986563:
    - Filtered out those exhibits that do not their packages available
      in the db (LP: #986563)
 -- Michael Vogt <email address hidden> Mon, 04 Jun 2012 08:53:25 +0200

Changed in software-center (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers