~ubuntu-branches/ubuntu/raring/hplip/raring

« back to all changes in this revision

Viewing changes to upgrade.py

  • Committer: Package Import Robot
  • Author(s): Mark Purcell, Till Kamppeter, Mark Purcell
  • Date: 2012-10-27 16:03:17 UTC
  • mfrom: (1.6.2)
  • Revision ID: package-import@ubuntu.com-20121027160317-y3xaqn9brebfrfo6
Tags: 3.12.10a-1
[ Till Kamppeter ]
* New upstream release
  - Fixed crash in HP Device Manager and System Tray due to ValueError
    exception in HPLIP upgrade functionality (LP: #1064889).
* debian/hplip.install, debian/hplip-gui.install: Added some missing program
  file links.
* debian/patches/hplip-release-parport.patch: libsane-hpaio does not close
  /dev/parport* after checking for a scanner (LP: #1065582, Red Hat bug
  #1065582).

[ Mark Purcell ]
* debian/bug-script: Fix bashism (Closes: #690625, #687243) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
FORCE_INSTALL=False
100
100
CHECKING_ONLY=False
101
101
NOTIFY=False
102
 
HPLIP_SOURCEFORGE_SITE = "http://feed2js.org/feed2js.php?src=http%3A%2F%2Fsourceforge.net%2Fexport%2Frss2_projnews.php%3Fgroup_id%3D149981"
 
102
HPLIP_VERSION_INFO_SITE ="http://hplip.sourceforge.net/hplip_web.conf"
103
103
HPLIP_WEB_SITE ="http://hplipopensource.com/hplip-web/index.html"
104
104
 
105
105
try:
204
204
 
205
205
 
206
206
    HPLIP_latest_ver="0.0.0"
207
 
    # get HPLIP version info from sourceforge
208
 
    pat = re.compile(r"""HPLIP (.*) Public Release""")
209
 
    sts, HPLIP_Ver_file = utils.download_from_network(HPLIP_SOURCEFORGE_SITE)
 
207
    # get HPLIP version info from hplip_web.conf file
 
208
    sts, HPLIP_Ver_file = utils.download_from_network(HPLIP_VERSION_INFO_SITE)    
210
209
    if sts is True:
211
 
        HPLIP_latest_ver = parse_HPLIP_version(HPLIP_Ver_file, pat)
 
210
        hplip_version_conf = ConfigBase(HPLIP_Ver_file)
 
211
        HPLIP_latest_ver = hplip_version_conf.get("HPLIP","Latest_version","0.0.0")
212
212
 
213
213
    # get HPLIP version info from hplip site
214
214
    if HPLIP_latest_ver == "0.0.0":     ## if failed to connect the sourceforge site, then check HPLIP site.
215
 
        pat = re.compile(r"""The current version of the HPLIP solution is version (.*)\. \(.*""")
 
215
        pat = re.compile(r"""The current version of the HPLIP solution is version (\d{1,}\.\d{1,}\.\d{1,}[a-z]{0,})\. \(.*""")
216
216
        sts, HPLIP_Ver_file = utils.download_from_network(HPLIP_WEB_SITE)
217
217
        if sts is True:
218
218
            HPLIP_latest_ver = parse_HPLIP_version(HPLIP_Ver_file, pat)