JVc(@sddlZddlZddlZddlZddlZddlZddlZddlZddlZddl Z yddl Z dZ Wn&e k rddl Z dZ nXddlTddlTddlmZmZmZmZmZddlTdZdZdZdZd ZdZd Zd Zd ZdZ d Z!d Z"dZ#d Z$id d 6d d6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd 6dd!6dd"6Z%d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJg(Z&dKdLdMdNdOdPdQdRdSdTdUg Z'dVdWdXdYdZd[d\d]gZ(d^d_d`dadbdcdddegZ)dfdgdhdidjdkdldmdndodpdqg Z*drdsdtdudvdwdxdydzd{d|d}d~dddddgZ+dddgZ,dgZ-dddgZ.idd6dd 6dd 6dd 6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6Z/dZ0d Z1d Z2d Z3dZ4dZ5dZ6dZ7dZ8dZ9dZ:dZ;dZ<dZ=dZ>dZ?dZ@dZAdZBdZCdZDdZEdZFdZGdZHdZIdZJdZKdZLdZMdZNdZOdZPdZQdZRdZSdZTdZUdZVdZWyddlXmYZYWne k rdZZn XdZZde[fdYZ\dS(iNcCstj|jS(N(thashlibtsha1t hexdigest(ts((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyt get_checksum&scCstj|jS(N(tshatnewR(R((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyR,s(t*(tutilsttuitpasswordtservicestos_utilsiis0.0iiigffffff?s+(?is).*?(404|403).*?ERROR.*?s+(?is).*?ERROR.*?(404|403).*?g333333?s(?is)ERRORg?s(?is).*?ERROR.*?g?s#(?is)s#(?is)s((?is).*?File Not Found.*?g?s#(?is).*?Not Found.*?s(?is)g333333?s(?is)

.*?(404|403).*?

s(?is)s(?is)

.*?not found.*?

s&(?is)s+(?is)s+(?is)s.(?is)s(?i)does not existthpijsshp-aligns hp-colorcals hp-faxsetupshp-linefeedcals hp-pkserviceshp-printsettingss hp-sendfaxs hp-timedateshp-checkshp-devicesettingss hp-firmwares hp-makecopiess hp-pluginshp-probeshp-setups hp-toolboxshp-check-pluginshp-diagnose_pluginshp-infos hp-makeuris hp-pqdiagshp-querys hp-systrays hp-unloadshp-cleanshp-fabs hp-levelsshp-printshp-scans hp-testpages hp-wificonfigs hp-upgrades hplip-infoshp-check-upgradeshp-config_usb_printershp-diagnose_queuesshp-devicesetups hp-doctors hp-logcaptures libhpmud.*s libhpip.*ssane/libsane-hpaio.*scups/backend/hpscups/backend/hpfaxscups/filter/hpcacscups/filter/hppsscups/filter/pstotiffscups/filter/hpcupsscups/filter/hpcupsfaxscups/filter/hplipjss cupsext.sos cupsext.las scanext.sos scanext.las hpmudext.sos hpmudext.las pcardext.sos pcardext.las/usr/share/cups/drv/hp/s/usr/local/share/ppd/HP/s/usr/local/share/cups/drv/hp/s%/usr/share/applications/hplip.desktops(/etc/xdg/autostart/hplip-systray.desktops/etc/hp/hplip.confs/usr/share/doc/hplip-*s./usr/lib/systemd/system/hplip-printer*.services56-hpmud.ruless56-hpmud_sysfs.ruless40-hplip.ruless56-hpmud_support.ruless56-hpmud_support_sysfs.ruless55-hpmud.ruless55-hpmud_sysfs.ruless56-hpmud_add_printer.ruless 56-hpmud_add_printer_sysfs.ruless86-hpmud-hp_*.ruless86-hpmud_plugin.ruless86-hpmud_plugin_sysfs.ruless*.pys*.pyctbasetcopiertdatat installertpcardtui4tuisfax/*.pys fax/*.pycsfax/pstotiff.convssfax/pstotiff.typess fax/pstotiffs prnt/*.pys prnt/*.pycs scan/*.pys scan/*.pycs fax/plugins/s prnt/plugins/s scan/plugins/s/var/lib/hp/hplip.statesadept-notifiertadept_notifiers yum-updatesdsGeneral/unknown errorslibusb not foundscups-devel not foundslibnetsnmp not foundsnetsnmp-devel not foundispython-devel not foundispthread-devel not foundisppdev-devel not foundislibcups not foundi slibm not foundi slibusb-devel not foundi ssane-backends-devel not foundi slibdbus not foundi sdbus-devel not foundisfax requires dbus supportislibjpeg not foundifsjpeg-devel not foundigslibdi not foundihslibjpeg - JPEG librarys+libtool - Library building support servicess"CUPS - Common Unix Printing Systems9CUPS devel- Common Unix Printing System development filess)CUPS image - CUPS image development filess$gcc - GNU Project C and C++ Compilers6make - GNU make utility to maintain groups of programss"libpthread - POSIX threads librarysCGhostScript - PostScript and PDF language interpreter and previewerslibusb - USB librarys&CUPS DDK - CUPS driver development kitsSANE - Scanning librarys)SANE - Scanning library development filess+xsane - Graphical scanner frontend for SANEs"scanimage - Shell scanning programsDBus - Message bus systems+PolicyKit - Administrative policy frameworks<libnetsnmp-devel - SNMP networking library development filess)libcrypto - OpenSSL cryptographic librarys network -wgets avahi-utilss3Python 2.2 or greater - Python programming languagesJPython libnotify - Python bindings for the libnotify Desktop notificationss$PyQt 4 DBus - DBus Support for PyQt4s4PyQt 4- Qt interface for Python (for Qt version 4.x)s&Python DBus - Python bindings for DBussPython XML librariess'Python devel - Python development filessMPIL - Python Imaging Library (required for commandline scanning with hp-scan)s"Reportlab - PDF library for PythonsCUPS-Extensions IO-ExtensionsHPLIP-SANE-BackendsScan-SANE-Extensions Python-Qt(tupdate_wrappercsJfd}j|_|jjjj|_j|_|S(Ncs*tjdj||f||S(Ns$TRACE: func=%s(), args=%s, kwargs=%s(tlogtdebugt__name__(targstkw(tf(sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pytnewfs(Rt__dict__tupdatet__doc__t __module__(RR((Rsf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyttraces    csfd}t|S(Ncs*tjdj||f||S(Ns$TRACE: func=%s(), args=%s, kwargs=%s(RRR(RR(R(sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyRs(R(RR((Rsf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyR"st CoreInstallcBsneZeeddZdWdZddZdWdZdZ dZ dZ d Z d Z d Zd Zd ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!dZ"d Z#d!Z$d"Z%d#Z&d$Z'd%Z(d&Z)d'Z*d(Z+d)Z,d*Z-d+Z.d,Z/d-Z0d.Z1d/Z2d0Z3d1Z4d2Z5d3Z6d4Z7d5Z8d6Z9dWdWd7Z:dWd8Z;dWdWd9Z<dWd:Z=d;Z>d<Z?d=Z@d>ZAd?ZBd@ZCdAZDdBZEdCZFdDZGdWdWdEZHdWdWdFZIdWdWdGZJdWdHZKdWdWdIZLdWdWdJZMdWdKZNdWdLZOdMZPdNZQdOZRdPZSeTdQZUedWdRZVedSZWedTZXedUZYegggdVZZRS(Xtqt4c Cs tjd||_||_tj||_d\|_|_|_ d|_ t j |_ tdt|_|_|_t|_d|_t|_i|_t|_d|_d|_i|_||_d|_d|_ t|_!i+t"d6t#d6t"d6t$d6t"d 6t%d 6t$d 6t"d 6t$d 6t"d6t"d6t"d6t$d6t$d6t$d6t$d6t%d6t$d6t$d6t%d6t$d6t%d6t$d6t"d6t"d6t$d6t%d6t%d 6t%d!6t%d"6t%d#6t%d$6t$d%6t%d&6t$d'6t%d(6t%d)6t%d*6t%d+6t%d,6t"d-6t"d.6t$d/6|_&id0d1d2d3d4d5d6gfd76|_'d7|_(i td8gfd16td9gfd26td:gfd36td;gfd46td<gfd56td=gfd66td>gfd(6td?gfd)6td*gfd*6|_)i td16td26td36td46td56td66td(6td)6td*6td+6|_*itd1gt+|j,t-d@dt.fdA6td1gt/|j0t1d@dBt2fdC6td1gt3|j4t5dDdEt6fdF6td1gt7|j8t1d@dEt.fdG6td1gt9|j:t1d@dEt.fdH6td1gt;|j<t1d@dIt2fdJ6td1gt=|j>t1dKdLt2fdM6td1gt?|j@t-d@dNt.fdO6td1gtA|jBt5dPdQt6fdR6td1gtC|jDt-d@dSt.fdT6td1gtE|jFt5d@dt.fdU6td5gtG|jHt5d@dVt.fdW6td5gtI|jJt1d@dVt.fdX6td5gtK|jLt5dYdZt6fd[6td5gtM|jNt5d\d]t6fd^6td4gtO|jPt-d@d_t6fd`6td3gtQ|jRt5d@dat6fd(6td2gtS|jTt-dbdct.fdd6td2gtU|jVt-d@det.fdf6td2gtW|jXt5d@dgt6fd26td2gtY|jZt5d@dht6fdi6|_[i td1gt\|j]t-djdkt.fdl6td3gt^|j_t5d@dmt.fdn6td3gt`|jat5dodpt.fdq6td3gtb|jct5dodpt.fdr6td4gtd|jet5dsdtt.fdu6td1gtf|jgt5d@dvt.fdw6td1gth|jit1djdkt.fdx6td5gtj|jkt5d@dyt.fdz6td4gtl|jmt5d{d|t.fd}6}i td1gt\|j]t-djdkt.fd~6td3gt^|j_t5d@dmt.fd6td3gt`|jat5dodpt.fd6td3gtb|jct5dodpt.fd6td4gtd|jet5dsdtt.fd6td1gtf|jgt5d@dvt.fd6td1gth|jit1djdkt.fd6td5gtj|jkt5d@dyt.fd6td4gtl|jmt5d{d|t.fd6}ddlnmo}|r |j[jp|n|j[jp|itd1gtq|jrt-d@dtsfd6td1gtt|jut-d@dtsfd6td5gtv|jwt-d@dtxfd6td5gty|jzt-d@dtxfd6tdgt{|j|t-ddt.fd6|_}i t~dt6tdp6td6td|6tdZ6tdy6tdN6tdv6td6tdS6|_x^|j)D]S}txC|j[D]8}||j[|dkrY |j)|dj|qY qY WqB W|ji|_x)|jD]}||j|j|d= 0.80)...is Version: %sR*iiPs#HPLIP requires dbus version > 0.80.s4Unknown version. HPLIP requires dbus version > 0.80.(iiPi( RRRcRR8RstAttributeErrort __version__RR2(RRcR?RE((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyRs$   6       cCs-yddl}tSWntk r(tSXdS(Ni(tctypesRR2R(RR((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pytcheck_python_ctypess   cCs2tjdtdgo1ttdddS(NsBChecking for dbus running and header files present (dbus-devel)...s dbus-daemonsdbus-message.hs /usr/includetdbus_message_new_signal(RRtcheck_psRnRo(R((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyRs cCstdottjdS(Nscups.htlpr(RqR|RR3(R((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyR scCsatjd|j\}}|dks3d|krHtjd|tStjd|tSdS(Ns lpstat -ris not runningsCUPS is not running. %ssCUPS is running. %s (RR RvRRRR(RRR((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyR s cCs tddS(Nsraster.hs/usr/include/cups(Rq(R((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyRscCstjdtddS(NsChecking for HPLIP...s hplip.confs/etc/hp(RRt locate_files(R((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyR s cCstjdtdS(NsChecking for libtool...slibtool --version(RRRj(R((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyR s cCs>tjdyddlm}tSWntk r9tSXdS(NsChecking for PIL...i(tImage(RRtPILRRR2R(RR((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyR%s   cCstjdtddS(NsChecking for cups-ddk...s media.defss/usr/share/cups/ppdc/(RRRq(R((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyR.s cCsltjdtddr/tddr/tStddrQtdd rQtStd d rdtStSdS( NsChecking for PolicyKit...sPolicyKit.confs/etc/PolicyKits0org.gnome.PolicyKit.AuthorizationManager.services/usr/share/dbus-1/servicess50-localauthority.confs#/etc/polkit-1/localauthority.conf.ds"org.freedesktop.PolicyKit1.services!/usr/share/dbus-1/system-servicessorg.freedesktop.PolicyKit1.confs/etc/dbus-1/system.d(RRRqRR(R((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyR5s cCsGtjdyddl}Wntk r>tjdtSXtSdS(Ns$Checking 'cupsext' CUPS extension...iseNOT FOUND OR FAILED TO LOAD! Please reinstall HPLIP and check for the proper installation of cupsext.(RRRkR2RRR(RRk((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyRAs   cCsGtjdyddl}Wntk r>tjdtSXtSdS(Ns$Checking 'hpmudext' I/O extension...isfNOT FOUND OR FAILED TO LOAD! Please reinstall HPLIP and check for the proper installation of hpmudext.(RRRlR2RRR(RRl((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyRLs   cCsGtjdyddl}Wntk r>tjdtSXtSdS(Ns*Checking 'pcardext' Photocard extension...isfNOT FOUND OR FAILED TO LOAD! Please reinstall HPLIP and check for the proper installation of pcardext.(RRtpcardextR2RRR(RR((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pytcheck_pcardextWs   cCst}xdddgD]}tjd|yt|d}Wn"tk rdtjd|nIXxE|D]=}tjdd|}tjd |}|rlt }PqlqlW|rPqqW|stj d n|S( Ns/etc/sane.d/dll.confs/etc/sane.d/dll.d/hpaios/etc/sane.d/dll.d/hplips'Checking for hpaio' in '%s'...R)s'%s' not found.s\sR%Rms8'hpaio' not found in SANE conf files. Is SANE installed?( RRRR4R6tinfotretsubtmatchRR(RR@RQRtlinet lineNoSpacet hpaiomatched((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyRbs$  c Cs0t}tjdd}tjd}d}|j|dk r,|j|jdd}tj j |dr,t j dyt dd }WnUtk rt jd |jjd }t j d |tj||jnSXxE|D]=}tjd d|} tjd| } | rt}PqqW|j|s)tjd} |jjd}t j d |tj||jyt dd}Wntk rt jd nX|jd|j| jd@} d| }|jj|}t j d |tj||jq)q,n|S(Ntdirsthomes(\S.*)share\/hplipislib/ssane/libsane-hpaio.so.1s-'Updating hpaio' in '/etc/sane.d/dll.conf'...s/etc/sane.d/dll.confR)s8'/etc/sane.d/dll.conf' not found. Creating dll.conf filestouch /etc/sane.d/dll.confscmd=%ss\sR%Rmschmod 777 /etc/sane.d/dll.confsa+ischmod %o /etc/sane.d/dll.conf(Rtsys_confRRtcompileRRtgroupRqRQRURRR4R6RRvt getAuthCmdRR RRtclosetstattwritetst_mode( RR@RTtpatt usrbin_dirt usrlib_dirRtcmdRRRtsttactv_permissions((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyt update_hpaioysN          cCsNtjdt}yddl}Wntk rCtjdnXt}|S(Ns-Checking 'scanext' SANE scanning extension...iseNOT FOUND OR FAILED TO LOAD! Please reinstall HPLIP and check for the proper installation of scanext.(RRRRnR2RR(RR@Rn((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyRs  cCsd\|_|_|_|jtkr3tjdtj}ytdd}Wn@t k rdt j dddt j |_|_|_qXxu|D]m}|jdr|j|}|jd |_|jd |_|jd |_|jd }PqqW|j|d krtjdqn_y3dt j dddt j |_|_|_Wn)tk rd\|_|_|_nX|j|j|jfS(NR%s:AC_INIT\(\[(.*?)\], *\[(.*?)\], *\[(.*?)\], *\[(.*?)\] *\)s./configure.inR)t configures internal-tags0.0.0tAC_INITiiiiRVsInvalid archive!(R%R%R%(R%R%R%(RwRxRyRsRPRRt IGNORECASER4R6RRRStinstalled_versiont startswithtsearchRRRRR(Rt ac_init_patt config_intct match_objR>((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyRs. 3   3 cCsd}i}tr/|jdo)|jd}n|jdoF|jd}|jd|d<|jdoj||d<||d <|jd |d <|jd |d <|jd|d<|jd|d<|jd|d<|jd|d<|jrIt|d(RR(Rt dependencytsupported_distro_vrsROtdependency_dataR=R>((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pytget_dependency_datas c CsHt|jj}|jg}g}g}x|D]}t}x/|j|dD]}|j|rVt}qVqVW|r8|j|\}} |rx-|D]"} | |kr|j| qqWn| r|j | qq8q8W|j d} |j || r.dj |}|jt j | n|sDtjdn|S(NiR.t s No cmds/pkgs(tlistRRYtsortRRRRRtextendRR8RtcatRR( RRatcommands_to_runtpackages_to_installtoverall_commands_to_runRtincludeRtpkgstcmdsRR.((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pytget_dependency_commandss4       cCs|jtko|jtkS(N(RR}RR~(R((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyt distro_knownscCsE|jtkr=|jtko<|jtko<|jdtStSdS(NR;( RsRPRR}RR~RRR(R((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pytdistro_supporteds.cCs4d}x'|jD]\}}}|d7}qW|S(Nii(tmissing_required_dependencies(Rtnum_req_missingRtdescR((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyt'count_num_required_missing_dependenciesscCs7d}x*|jD]\}}}}|d7}qW|S(Nii(tmissing_optional_dependencies(Rtnum_opt_missingRRtreqR((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyt'count_num_optional_missing_dependenciessccsx|j|jdD]}|j|rxj|j|dD]T}|j|tr:|j|stjd|||j|t |fVqq:q:WqqWdS(NiisMissing required dependency: %s( RRRRRtDEPENDENCY_REQUIRED_INDEXRRRtDEPENDENCY_DISPLAY_INDEX(RtcompR`((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyRs  ccsx|j|jdD]}|j|rxx|j|dD]b}|j|ts:|j|stjd|||j|t |j|d|fVqq:q:WqqWdS(NiisMissing optional dependency: %si( RRRRRRRRRR(RRR`((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyRs  cCsd}x|j|jdD]}|j|dsd}|j|sNd}n|||j|d||j|<|j|rxG|j|dD]1}|j|stjd||d7}qqWqqqW|S(NiityRBisMissing optional dependency: %s(RRRRRRR(Rtanswer_callbackRRRR((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pytselect_optionss  $  cCs(tjdrtStjdtSdS(Ntwgetswget is not installed(RR3RRRR(R((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyR's cCs(tjdrtStjdtSdS(Ns avahi-browsesavahi-browse is not installed(RR3RRRR(R((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyR.s cCs|jdd|}tj||rd}xs|D]k}tj||j\}}|dkrvtjd|n|dk r||d|n|d7}q5WtSt SdS(NR/iisAn error occurred running '%s'sPre-install step %d( RRRRRR RvR=RR(RRRtpre_cmdRERRR((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pytrun_pre_installCs    cCs|jdd|}tj||rd}x|D]}tj||j\}}td|kd|kd|kgr|dkrtjd|qn |dkrtjd|n|dk r||d|n|d7}q5WndS( NR0ityumtzyppertdnfsAn error occurred running '%s'isPre-depend step %d( RRRRRR RvtanyR=(RRRRRERRR((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pytrun_pre_dependYs  '   cCs|jdd|}tj||rd}xv|D]k}tj||j\}}|dkrvtjd|n|dk r||d|n|d7}q5WndS(NR1iisAn error occurred running '%s'sPost-depend step %d(RRRRRR RvR=(RRRtpost_cmdRERRR((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pytrun_post_dependms    cCs<g}|jdt|r8|j|jjdn|S(NR9s!python ./installer/fix_symlink.py(RRRRvR(RRR((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyt pre_buildscCsid}x\|j|D]K}tj||j\}}|dk rW||d|n|d7}qWdS(NisPre-build step %d(RRR RvR(RRRRERRR((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyt run_pre_builds  cCsid}x\|j|D]K}tj||j\}}|dk rW||d|n|d7}qWdS(NisPost-build step %d(t post_buildRR RvR(RRRRERRR((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pytrun_post_builds  cCsg}|jrF|jdrF|j|jjdtjdntddg}tj dt }xQ|D]I}tjd|||f|d|}|j|jj|qqW|S( NRIssh /etc/init.d/dbus reloads4Will reload DBUS configuration for PolicyKit supports hp-systraythpssdtkillsFound %s for %s processs %s( RRRRvRRRt get_ps_pidRR3R(RRRtpid_listtkill_cmdRR((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyRs cCst}|jd}|r|dk r7||dntj||j\}}|dkr|j|_|jst}qqn|S(NR3sRemoving old HPLIP versioni( RRRRR RvR RR(RRtfailedR3RR((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyt remove_hplips   cCs.|jj|jjdkr&tStSdS(NR%(Rvt clearPasswordt getPasswordRR(R((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pytcheck_passwords cCssd}xOttjD];\}}|dkr5Pntj||r||7}qqWtjd||dkS(sr Example code from David Mertz' Text Processing in Python. Released in the Public Domain. gg?sFile error page score: %fg?(Rterr_patstitemsRRRR(Rtpaget err_scoreRtprob((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyt isErrorPages cCs|jtkrtStSdS(N(RR}R(R((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pytvalidate_distoscCsE|jrAx2|j|jdD]}|j|kr!tSq!WntS(NR((RR&RRRR(Rtvers((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pytvalidate_distro_versions   cCs|jsV|jy|j|j|_WqVtk rRtjd|jtSXn|tkrn|j }n|jt kr|tkr|j dt|rtjd|j|ft Stjd|j|ftSdS(NsSAuto installation is not supported as Distro Name can't find for distro index [%d].R;s:Auto installation is supported for Distro =%s version =%s s>Auto installation is not supported for Distro =%s version =%s ( RRRRRRRRR~RR}RR(RR((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pytis_auto_installer_supports     0c+Cst}tjdkr!t}ntjddd}tjddd}|dkrhtjdtS|tkrt j d |d d gd \}}| s|d krtSn|j d }tj d |tj dtjddt} tjd\} } | tkr|tkrjt j dd d gd \}}| sV|d krjtj dtSntdg} tjdt} xf| D][}tj d|| |f| d|}tj|\}}tj d||fqWntjd\}} tjd\}} |tks6|tkrGtjdtS|r|j\}}|rutjdn|j|nd}|r|jj|}ntj||j\} } | dk rxH| jD]7}|jddkrqntj||j|qWntj d}|j!|}d}|dk r|j"dd}|j"dd }d}tj#t$|}x:|t%|krtj|||j||d7}qWd}tj#t&|}x=|t%|krtj|||j||d7}qWnt}|tkry| tkryt j d!d d gd \}}|r|d krt}qnt}|tkrtj#t'|} ng} d}x:|t%| krtj| ||j||d7}qWtjdd"d}!|!rtj|!|j|ntj#t(}"d}x:|t%|"krntj|"||j||d7}q5Wtj#t)d#}#x$|#D]}$tj|$|j|qWtj#t)d$}#x$|#D]}$tj|$|j|qWd%}|jj|}tj||j|\} } | dkri| j}%x6|%D]+}&|&|kr7tj|&|j|q7q7Wnxxt*D]p}'|'rpd&|'}|jj|}tj||j|\} } | dkrtj+d'|'| fqqpqpW|tkrd}tj#t,|}(x:|t%|(krDtj|(||j||d7}q Wd}tj#t-})x:|t%|)krtj|)||j||d7}q]Wtj||j|n|dk r|d(}*tj|*|j|ntj d)tS(*NiRRR%RVRs0.0.0sHPLIP is not installed.s4 Are you sure to uninstall HPLIP-%s (y=yes, n=no*)?:RRBR3shplip_remove_cmd =%s sStarting uninstallation...tplugint installeds hp-systrayss Some HPLIP applications are running. Press 'y' to close and proceed or Press 'n' to quit uninstall (y=yes*, n=no):sLQuiting HPLIP unininstallation. Close application(s) manually and run again.RsFound %s for %s processs %sssts =%s out=%ss hp-toolboxsQFailed to close HP-Toolbox/HP-Systray. Close manually and run hp-uninstall again.sfind /home -name .hplipsfind:is(\S.*)share\/hplipisbin/slib/s? Do you want to remove HP proprietary plug-ins (y=yes*, n=no)?:Rs/etc/udev/rules.ds/lib/udev/rules.dsfind /usr -type d -name hplips"find /usr -type f -name %s -deletes!Failed to delete %s library [%s]s hp-unistalls!HPLIP uninstallation is completed(.RRqtgetuidRRRRRtNON_INTERACTIVE_MODER t enter_choiceRRRt sys_statetPLUGIN_NOT_INSTALLEDRtIs_Process_RunningRR3R tclose_package_managersRRRRvRRt splitlinesR<tremoveRRRRt expandListt BINS_LISTRnt LIBS_LISTt HPLIP_LISTt FILES_LISTt RULES_LISTtHPLIP_EXT_LISTR=t PLUGIN_LISTt PLUGIN_STATE(+RRsRt checkSudoRTRtoktchoiceR3t plugin_stateRRRRRRtststoutttoolbox_statustsystray_statust User_exittIs_pkg_mgr_runningRRRRRRtcnttBINS_LIST_FULLtLIBS_LIST_FULLtremove_pluginstHPLIP_LIST_FULLR7tFILES_LIST_FULLtRULES_LIST_FULLtflt hplip_foldersthplip_dtext_ftPLUGIN_LIST_FULLtPLUGIN_STATE_FULLt hp_uninstall((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyt uninstalls    %   !     !            !    c Csit}t}tj|j\}}x)|rO|tkr&tjd|ddddgd\}}|stttfS|dkrtj dPn|dkr4tj d|d\}}|sttfS|r#|j j d |} tj | |j \} } | d kr tjd q q#q4ntjd Ptj|j\}}q'W|r_t}n||fS( NsA package manager '%s' appears to be running. Please quit the package manager and press enter to continue (i=ignore, r=retry*, f=force, q=quit) :tiR)tqRsCIgnoring running package manager. Some package operations may fail.s# Force quit of package manager '%s'Rskill %sisBFailed to kill process. You may need to manually quit the program.sGUI is not yet supported(RRRR-R$R R RRR=t enter_yes_noRvRR R( RtMODER"R#RRRt user_inputtansRRR((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyRs4  +        c Cs't}|tkr| s | r$tStjd|ddgd\}}|r|dkrtjdt}|rd||tjf}|j j |}t j d|tj ||j \} } | dkrt}qqt jdq#t jt jd |tjfn t jd |S( Ns;Do you want to add missing groups %s to user?(y=yes*, n=no)RRBtusermods%s %s %ss cmd = %sisusermod command not found.sPlease add %s groups to %s usersGUI is not yet supported(RR$R R RR3RRStusernameRvRRRR RRtbold( Rtmissing_user_groupstmissing_user_groups_cmdRstret_valRR7t usermod_pathRRR((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pytadd_groups_to_users$ %  & c Cs-t}d}|tkrtjdddgd\}}|r)|dkr)tjj|srtjd|tS|j j d|}tjd|t j ||j \}}|dkrt }ntjjd rd }|j j |}tjd|tj|qq)n tjd |S( Ns/etc/selinux/configsxSELinux is currently enabled in your system. Device may not work properly. Do you want to disable SELinux?(y=yes, n=no*)RRBsFile %s is not founds#vi -c %s/enforcing$/disabled -c wq scmd= %s is/selinux/enforcesecho 0 >/selinux/enforcesGUI is not yet supported(RR$R R RqRQRURRRvRRR RR texecuteR( RRsR>t SELinux_fileRR7RRR((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pytdisable_SELinuxs( !   cCsE|jd}|jd}i}t|rjx7|D],}|rYtj||||jqtjd||tj |||j \} } | dksd| krtjd|qqWd|krtjd|j stjdqnxX|D]M} tj | |j \} } | dksd| krtjd|qqWqAn tjddS(NR.R0isNo missing dependenciesswDo you want to update repository and Install missing/incompatible packages. (a=install all*, c=custom_install, s=skip):RRRR4is5Install manually above missing/incompatible packages.sUpdating repositoryRWscmd =%stFailedsIFailed to update Repository, check if any update/installation is running.s(Installing missing/incompatible packagess3Do you want to install '%s' package?(y=yes*, n=no):RRBRms9Failed to install '%s' package, please install manually. RZsKFailed to start CUPS service. Please start CUPS manually or restart system.s/Do you want to run '%s' command?(y=yes*, n=no):s1Failed to run '%s' command, please run manually. s(Installing Missing/Incompatible packagessJFailed to start CUPS sevice. Please start CUPS manually or restart system.sGUI is not yet supported..1(RRnRRRRR$R R R;RR RvR=RRR t start_service(RRstrequired_dependenciestoptional_dependenciest missing_cmdR.R0toverall_install_cmdsRRR7RRRR((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pytinstall_missing_dependenciess    $  $       %   %       N([RR!RPR$RRRR!RR&RRRWRRdReRRRRRRRRRRuRRRRRRRRRRRRRRRRRR RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR~RR2RR@RCRJ(((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyR#s ]   T 2  \                           , & v C   $                + ! (]RRqtos.pathRRtgrptpwdttarfileRRRRR2Rtbase.gt base.codesRRR R R R tdcheckR}R~RPt MODE_CHECKRRRRRRRRRRRRRRRRRRRRtOK_PROCESS_LISTtCONFIGURE_ERRORSRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRt functoolsRR"tobjectR#(((sf/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/installer/core_install.pyts                 (   ~'*<