mō ĐˎGc@sJdkTdkTdZdZdefd„ƒYZdefd„ƒYZdS((t*it TarballRootcBsqtZdZdZdZddd„Zd„Zd„Zd„Zd „Z d „Z d „Z d „Z d „Z RS(Nstarball root directorysTarball Root Directoriess%set tarball root environment variabletcCs1||_||_||_d|_d|_dS(NRi( t tarzipfiletselft_filetpatht_pathtlogfilet_logfilet_roottexport(RRRR((te/home/faculty/youssef/public_html/pacman/sample_cache/tarballs/pre/tmp/pacman-3.29/src/TarballRoot.pyt__init__s     cCs|i|ijS(N(RRtt(RR((R tequalscCsa|idjo%dtii|i|iƒdSn)dtii|i|iƒd|iSdS(NRsof s: $PAC_TARBALLROOT= - unset -s: $PAC_TARBALLROOT=(RR tosRtjoinRR(R((R tstrs%cCstƒS(N(tReason(RR((R t compatiblescCsS|io2td|idtiit|iƒƒ ƒSntd| dƒSdS(NsUntar directory [s ] is missing.t[s] has not been set.(RtacquiredRR RRtexiststfullpath(R((R t satisfied!s 2cCs=tƒ}tp|idƒntp|idƒn|S(Ns([gunzip] is not in the installer's path.s%[tar] is not in the installer's path.(Rtreasontgunzip_in_patht tar_in_path(RR((R t satisfiable&s  c Csô|iƒ}|iƒoWttii|i|i ƒƒ}|i }|i djot|i ƒ}qpd}nt|dƒp-t|dƒpt|dƒp t|dƒ}t|dƒ}tii|ƒo |o|t|ƒ\}}t|ƒ}|iƒo;||_d|_tidd |d ƒ|tid s]...tPAC_TARBALLROOTisFile [s1] doesn't exist. Can't determine root directory.(RRRtokRRRRRRtfpathtfileR tflogttailtunziptuntarRt parseTarZtroottfrootR t_TarballRoot__hasroottverbotlogtenvirontparseTar( RR%R#R&R!RR"R)R(((R tacquire/s@  !  ?           cCsYd|_d|_tiidƒo-tiddtiddƒtid=ntƒS(NRiRRs$About to delete [PAC_TARBALLROOT => s]...( RR R*RR-thas_keyR+R,R(R((R tretractTs   cCsī|ioĶ|iddd|idƒ|idd|idƒ|idƒ|id|idƒ|id|id ƒ|idd|idƒ|idƒndS( Nssetenv Rs "s" s="sexport PAC_TARBALLROOT s!os.environ["PAC_TARBALLROOT"] = "s$ENV{PAC_TARBALLROOT} = "s"; ( RRtcshtwriteR tshtpytpltksh(RR2R4R5R6R7((R tshellOut\s   (t__name__t __module__ttypettitletactionR RRRRRR/R1R8(((R R s     % tTarballRootDeletablecBs#tZdZdZdZd„ZRS(Nstarball root directory vdtsTarball Root Directories vdts)set tarball root environment variable vdtcCs,|io tƒSntd| dƒSdS(NRs ] not set.(RRR(R((R Rjs  (R9R:R;R<R=R(((R R>fsN(t Environmentt ExecutionRRRR>(RR>RR((R t?s Z