Install menu is enabled while disconnected

Bug #802919 reported by Jean-Baptiste Lallement on 2011-06-28
This bug affects 1 person
Affects Status Importance Assigned to Milestone
software-center (Ubuntu)
Robert Roth

Bug Description

1. Disconnect the system from the network
2. Select an application that is not installed on the system
3. Select the menu 'File / Install'

S-C tries to install the application but fails

Ubuntu Bug Squad volunteer triager

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: software-center 4.1.6
ProcVersionSignature: Ubuntu 3.0-2.3-generic 3.0.0-rc4
Uname: Linux 3.0-2-generic i686
Architecture: i386
Date: Tue Jun 28 12:42:48 2011
EcryptfsInUse: Yes
PackageArchitecture: all
 PATH=(custom, user)
SourcePackage: software-center
UpgradeStatus: Upgraded to oneiric on 2011-06-27 (0 days ago)

Jean-Baptiste Lallement (jibel) wrote :
Robert Roth (evfool) wrote :

Confirming the behavior, and setting to Low as this is a cosmetic issue, as when clicking install, the user is presented a dialog to check the network connection.
Ubuntu Bug Squad volunteer triager

Changed in software-center (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
Robert Roth (evfool) on 2011-07-07
Changed in software-center (Ubuntu):
assignee: nobody → Robert Roth (evfool)
Robert Roth (evfool) on 2011-07-07
Changed in software-center (Ubuntu):
status: Confirmed → In Progress
Changed in software-center (Ubuntu):
status: In Progress → Fix Committed
Gary Lasker (gary-lasker) wrote :

Thanks for your fixes, Robert! I've merged your branch into the 4.0 branch and also added your fixes in trunk.

Thanks as always for your good work!

Launchpad Janitor (janitor) wrote :

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

software-center (4.1.9) oneiric; urgency=low

  [ Michael Vogt ]
  * data/ui/*.ui:
    - move into data/ui/gtk preparing the gtk3 merge
  * utils/piston-helpers/*.py:
    - return exitcode 1 on expections
  * softwarecenter/backend/
    - properly copy when building the command

  [ Gary Lasker ]
  * merge lp:~evfool/software-center/nonetworkfixes to fix menu
    item network state bugs, many thanks to Robert Roth
    (LP: #802919, LP: #802920)
  * softwarecenter/ui/gtk/
    - fix crash on a network change event (LP: #804414)
  * softwarecenter/ui/gtk/
    - gracefully handle AttributeError from zeitgeist pending
      fix in zeitgeist itself, fixes crasher (LP: #807282)
  * softwarecenter/ui/gtk/,
    - fix crash when searching gmenu paths (LP: #793024)

  [ Aaron Peachey ]
  * softwarecenter/backend/,
    - correct modify/delete UI callback behaviour with
      new spawn helper and pagination code (LP: #807010)
    - fix submit_usefulness and report_abuse callbacks
      to work with the new spawn_helper and pagination code
 -- Michael Vogt <email address hidden> Wed, 13 Jul 2011 16:11:35 +0200

Changed in software-center (Ubuntu):
status: Fix Committed → Fix Released
Changed in software-center (Ubuntu Natty):
status: New → Incomplete
Chris Halse Rogers (raof) wrote :

I'm not convinced that this is SRU-worthy. This is an essentially cosmetic issue with a serious potential failure mode - if network_state_is_connected returns a false-negative this looks like it will prevent a user from installing software from the software centre.

How certain are we that network_state_is_connected will never return a false-negative? For that matter, how often does network_state_is_connected return a false-positive, reducing the value of this patch?

This also applies to bug #802920

Gary Lasker (gary-lasker) wrote :

Hi Chris! Thanks for your comment and for reviewing this SRU. Just to be clear, in Natty we already use the network_state_is_connected signal to disable *all* of the the software install buttons in the main UI, that is, for both the list and details views. All this patch does is make the corresponding menu item sensitivity consistent with the buttons themselves. It's not so much a cosmetic issue as it is a consistency in the UI issue.

I'm not aware of ever having a report of a false negative (or positive) for network_state_is_connected. And as I mentioned, if we were to get a false negative then all of the install buttons in the UI would become disabled. The user would have to then find the (inconsistently) still-enabled "Install" menu item to be able to attempt an install. I'm not sure it makes sense to leave this bug unfixed in order to cover that possibility.

Regarding bug 802920, it is truly a bug to offer to "Install Previous Purchases" when a network connection is not available. The operation will simply fail silently in that case.

Clint Byrum (clint-fewbar) wrote :

Gary thanks for the response. In looking deeper into how this is determined, its really up to NetworkManager whether we think there is a network. The specific code actually errs on the side of false positive, as if network manager is confused and says "Unknown", softwarecenter assumes a connection (which handles the static network setup as well).

# simply query even more
def network_state_is_connected():
    """ get bool if we are connected """
    # unkown because in doubt, just assume we have network
    return get_network_state() in (NetState.NM_STATE_UNKNOWN,

Given the explanation, I think this is suitable for SRU and the regression potential remains low.

Changed in software-center (Ubuntu Natty):
status: Incomplete → Fix Committed
tags: added: verification-needed

Hello Jean-Baptiste, or anyone else affected,

Accepted software-center into natty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See for documentation how to enable and use -proposed. Thank you in advance!

Gary Lasker (gary-lasker) wrote :

Ok, great! Thanks very much Chris and Clint for your time and trouble and for your attention to the details for this SRU. It's very much appreciated!

tags: added: testcase
Gary Lasker (gary-lasker) wrote :

I have verified that this bug is fixed in software-center version 4.0.5 in natty-proposed. Many thanks!

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

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

software-center (4.0.5) natty-proposed; urgency=low

  [ Aaron Peachey ]
  * softwarecenter/view/,
    - fix duplication of reviews upon submitting a new
      review, completes the fix for LP: #794060

  [ Gary Lasker ]
  * softwarecenter/,
    - obfuscate private ppa details in the error log output and in
      the error dialog itself, add corresponding unit test
      (LP: #807745)
  * merge lp:~evfool/software-center/nonetworkfixes, fixes two menu
    item network state bugs, many thanks to Robert Roth
    (LP: #802919, LP: #802920)
 -- Michael Vogt <email address hidden> Wed, 13 Jul 2011 14:24:50 +0200

Changed in software-center (Ubuntu Natty):
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