KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21573/root/usr/lib/python2.4/site-packages/dogtail/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21573/root/usr/lib/python2.4/site-packages/dogtail/distro.pyc
mò
e,Ec@s
dZdZdkZdkZdklZdklZde	fd„ƒYZ
de	fd„ƒYZd	fd
„ƒYZdefd„ƒYZ
d
efd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdfd„ƒYZdefd„ƒYZdefd„ƒYZdefd „ƒYZd!efd"„ƒYZd#efd$„ƒYZd%efd&„ƒYZd'efd(„ƒYZd)efd*„ƒYZd+Zeiid,d-ƒd.joei ed/ƒeƒa!níei"i#d0ƒoei ed1ƒeƒa!n¼ei"i#d2ƒoei ed3ƒeƒa!n‹ei"i#d4ƒoei ed5ƒeƒa!nZei"i#d6ƒoei ed7ƒeƒa!n)ei"i#d8ƒoei ed9ƒeƒa!nøei"i#d:ƒoei ed;ƒeƒa!nÇei"i#d<ƒo!ei ed=ƒe
d=ƒ‚n“ei"i#d>ƒoei ed?ƒeƒa!nbei"i#d@ƒo1ei$dAe%d@ƒi&ƒƒodBGHeƒa!nei edCƒe
dCƒ‚t!i'a'dS(Ds€Handles differences between different distributions

Authors: Dave Malcolm <dmalcolm@redhat.com>, Zack Cerza <zcerza@redhat.com>sBDave Malcolm <dmalcolm@redhat.com>, Zack Cerza <zcerza@redhat.com>N(sVersion(sdebugLoggertDistributionNotSupportedErrorcBs&tZdZdZd„Zd„ZRS(sy
    This distribution is not supported.

    Arguments:
            distro: the distribution that is not supported.
    s3Please send patches to dogtail-devel-list@gnome.orgcCs
||_dS(N(tdistrotself(RR((t2/usr/lib/python2.4/site-packages/dogtail/distro.pyt__init__scCs|idtiS(Ns. (RRRt
PATCH_MESSAGE(R((Rt__str__s(t__name__t
__module__t__doc__RRR(((RRs	tPackageNotFoundErrorcBstZdZRS(s.
    Error finding the requested package.
    (RRR	(((RR
st	PackageDbcBs>tZdZd„Zd„Zd„Zed„Zd„ZRS(sg
    Class to abstract the details of whatever software package database is in use (RPM, APT, etc)
    cCs d|_|idg|_dS(Ns/usrs
/share/locale(RtprefixtlocalePrefixes(R((RR's	cCs
t‚dS(sÊ
        Method to get the version of an installed package as a Version instance (or raise an exception if not found)
        Note: does not know about distributions' internal revision numbers.
        N(tNotImplementedError(RtpackageName((Rt
getVersion+scCs
t‚dS(sm
        Method to get a list of filenames owned by the package, or raise an exception if not found.
        N(R(RR((RtgetFiles2scCs\h}d„}x@|iD]5}|o|d|}ntii|||ƒqW|i	ƒS(sh
        Method to get a list of all .mo files on the system, optionally for a specific locale.
        cCsGdk}x7|D]/}|id|ƒod||d|<qqWdS(Ns(.*)\.mot/(tretfNamestfNametmatchtNonetmoFilestdirName(RRRRR((RtappendIfMoFile>s
	RN(
RRRR
tlocalePrefixtlocaletostpathtwalktkeys(RRRRR((Rt
getMoFiles8s	
cCs
t‚dS(s¤
        Method to get a list of unique package names that this package
        is dependent on, or raise an exception if the package is not
        found.
        N(R(RR((RtgetDependenciesJs(	RRR	RRRRR!R"(((RR#s			t
_RpmPackageDbcBs,tZd„Zd„Zd„Zd„ZRS(NcCsti|ƒdS(N(RRR(R((RRSscCsPdk}|iƒ}x+|id|ƒD]}ti|dƒSq(Wt|‚dS(Ntnametversion(	trpmtTransactionSetttstdbMatchRtheadertVersiont
fromStringR
(RRR(R*R&((RRVs	cCsGdk}|iƒ}x"|id|ƒD]}|dSq(Wt|‚dS(NR$t	filenames(R&R'R(R)RR*R
(RRR(R*R&((RR]s	c	Cs©dk}|iƒ}x„|id|ƒD]p}h}xW||iD]H}x?|id|ƒD]+}|d}||jod||<q[q[WqBW|iƒSq(Wt
|‚dS(NR$tprovides(R&R'R(R)RR*tresulttRPMTAG_REQUIREStrequirementtdepPackageHeadertdepNameRR R
(	RRR1R(R*R2R/R3R&((RR"ds	

(RRRRRR"(((RR#Rs			t
_AptPackageDbcBs,tZd„Zd„Zd„Zd„ZRS(NcCsti|ƒd|_dS(N(RRRRtcache(R((RR|s
cCs¨|ip&dk}|iƒ|iƒ|_n|ii}x\|D]T}|i|jo>dk
}|idt|i
ƒƒidƒ}ti|ƒSqCqCWt|‚dS(Ns.*Ver:'(.*)-.*' Section:i(RR5tapt_pkgtinittGetCachetPackagestpackagestpackagetNameRRRtstrt
CurrentVertgroupt	verStringR+R,R
(RRR@R;R6RR:((RR€s
	
	$cCspg}tid|ƒiƒ}|p
t|‚n:x2|D]*}|iƒ}|o|i
|ƒq:q:W|SdS(Ns
dpkg -L %s(tfilesRtpopenRt	readlinestlistR
tlinetstriptfiletappend(RRRARDRGRE((RRs
cCsÌh}	|ip&dk}|iƒ|iƒ|_n|ii}
x}|
D]u}|i	|jo_|i}|p
t
|‚n|i}|d}x,|D] }|dii	}d|	|<q–WqIqIW|	iƒS(NtDependsi(R/RR5R6R7R8R9R:R;R<RR>tcurrentR
tDependsListtdependsRDt
dependencyt	TargetPkgR$RR (RRR$R;R6RDRJRMRLR/R:((RR"˜s&
	
	
	
(RRRRRR"(((RR4{s		
	t_UbuntuAptPackageDbcBstZd„ZRS(NcCs(ti|ƒ|ii|idƒdS(Ns/share/locale-langpack(R4RRR
RHR(R((RR¯s
(RRR(((RRO®st_PortagePackageDbcBstZd„Zd„ZRS(NcCsti|ƒdS(N(RRR(R((RR´scCspdk}|iidƒdk}|iddii|ƒdidƒd}|i
|ƒd}ti
|ƒS(Ns/usr/lib/portage/pymRtvartreeii(tsysRRHtportagetdbtdbapiRRtsplittgentooPackageNametpkgsplittupstreamVersionR+R,(RRRWRSRRRY((RR·s		.(RRRR(((RRP³s	t_ConaryPackageDbcBstZd„Zd„ZRS(NcCsti|ƒdS(N(RRR(R((RRÅscCsldk}dkl}|ƒ}|ii|ƒ}t|ƒp
t	|‚n|di
ƒiƒidƒdS(N(sConaryClientit-(
tconarytconaryclienttConaryClienttclientRTtgetTroveVersionListRt
dbVersionstlenR
ttrailingRevisiontasStringRV(RRR^R_R\Ra((RRÈs	
	

(RRRR(((RRZÄs	t_SolarisPackageDbcBstZd„ZRS(NcCsti|ƒdS(N(RRR(R((RRÖs(RRR(((RReÕstJhBuildPackageDbcBstZd„Zd„ZRS(NcCsti|ƒg}|itidƒ|itidƒ|itidƒtii|ƒ|_	|i
i|i	dƒdS(NtLD_LIBRARY_PATHtXDG_CONFIG_DIRStPKG_CONFIG_PATHs
/share/locale(RRRtprefixesRHRtenvironRtcommonprefixRR
(RRj((RRÚs
cCsUh}tid|ƒiƒ}x)|D]!}|od||iƒ<q&q&W|i	ƒS(Ns
jhbuild list (
R/RRBRRCtlinesRERRFR (RRRmR/RE((RR"ãs(RRRR"(((RRfÙs		tDistrocBstZdZRS(sÑ
    Class representing a distribution.

    Scripts may want to do arbitrary logic based on whichever distro is in use (e.g. handling differences in names of packages, distribution-specific patches, etc.)

    We can either create methods in the Distro class to handle these, or we can use constructs like isinstance(distro, Ubuntu) to handle this. We can even create hierarchies of distro subclasses to handle this kind of thing (could get messy fast though)
    (RRR	(((RRnëstRedHatOrFedoracBstZdZd„ZRS(s|
    Class representing one of Red Hat Linux, Fedora, Red Hat Enterprise Linux, or one of the rebuild-style derivatives
    cCstƒ|_dS(N(R#Rt	packageDb(R((RRøs(RRR	R(((RRoôstDebiancBstZdZd„ZRS(sN
    Class representing one of the Debian or Debian-derived distributions
    cCstƒ|_dS(N(R4RRp(R((RRÿs(RRR	R(((RRqûstUbuntucBstZdZd„ZRS(sN
    Class representing one of the Debian or Debian-derived distributions
    cCstƒ|_dS(N(RORRp(R((RRs(RRR	R(((RRrstSusecBstZdZd„ZRS(sJ
    Class representing one of the SuSE or SuSE-derived distributions
    cCstƒ|_dS(N(R#RRp(R((RR
s(RRR	R(((RRs	stGentoocBstZdZd„ZRS(sN
    Class representing one of the Gentoo or Gentoo-derived distributions
    cCstƒ|_dS(N(RPRRp(R((RRs(RRR	R(((RRtstConarycBstZdZd„ZRS(s8
    Class representing a Conary-based distribution
    cCstƒ|_dS(N(RZRRp(R((RRs(RRR	R(((RRustSolariscBstZdZd„ZRS(s3
    Class representing a Solaris distribution
    cCstƒ|_dS(N(ReRRp(R((RR"s(RRR	R(((RRvstJHBuildcBstZdZd„ZRS(s2
    Class representing a JHBuild environment
    cCstƒ|_dS(N(RfRRp(R((RR)s(RRR	R(((RRw%ssDetecting distribution: tCERTIFIED_GNOMIEtnotyessJHBuild environments/etc/SuSE-releasesSuSE (or derived distribution)s/etc/fedora-releases Fedora (or derived distribution)s/etc/redhat-releases#Red Hat/Fedora/derived distributions/usr/share/doc/ubuntu-minimals Ubuntu (or derived distribution)s/etc/debian_versions Debian (or derived distribution)s/etc/gentoo-releases Gentoo (or derived distribution)s/etc/slackware-versiont	Slackwares/var/lib/conarydb/conarydbsConary-based distributions/etc/releases	.*SolarissSolaris distributiontUnknown((R	t
__author__RRR%R+tloggingtdebugLoggertloggert	ExceptionRR
RR#R4RORPRZReRfRnRoRqRrRsRtRuRvRwtmessageRktgettlogRRtexistsRtopentreadlineRp(R4R+R‚RnRZRtRORfRRrReR€RqRwR}R
RvRoRR#RPRsRRuR((Rt?sx		

/)3	







2


Anon7 - 2021