~ubuntu-branches/ubuntu/precise/zeroinstall-injector/precise

« back to all changes in this revision

Viewing changes to zeroinstall/cmd/update.py

  • Committer: Package Import Robot
  • Author(s): Thomas Leonard
  • Date: 2012-02-12 15:19:54 UTC
  • mfrom: (1.1.28)
  • Revision ID: package-import@ubuntu.com-20120212151954-u5nef8c1381klr43
Tags: 1.6-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
                        print(_("%s: new -> %s") % (iface, new_sel.version))
71
71
                        changes = True
72
72
 
73
 
        if not changes:
74
 
                print(_("No updates found."))
 
73
        root_sel = sels[iface_uri]
 
74
        root_iface = config.iface_cache.get_interface(iface_uri)
 
75
        latest = max((impl.version, impl) for impl in root_iface.implementations.values())[1]
 
76
        if latest.version > model.parse_version(sels[iface_uri].version):
 
77
                print(_("A later version ({name} {latest}) exists but was not selected. Using {version} instead.").format(
 
78
                                latest = latest.get_version(),
 
79
                                name = root_iface.get_name(),
 
80
                                version = root_sel.version))
 
81
                if not config.help_with_testing and latest.get_stability() < model.stable:
 
82
                        print(_('To select "testing" versions, use:\n0install config help_with_testing True'))
 
83
        else:
 
84
                if not changes:
 
85
                        print(_("No updates found. Continuing with version {version}.").format(version = root_sel.version))