ó œI:Uc@sžddlZddlZddlZddlZddlZddlZddlZddlZddlZdZ d„Z d„Z de fd„ƒYZ dS(iÿÿÿÿNs.cache-versioncCsstjjtjƒ}tjtjj|dƒƒ}|jtj dƒd„|Dƒ}t j dj|ƒƒj ƒS(Ns*.pycicss'|]}ttj|ƒjƒVqdS(N(tstrtoststattst_mtime(t.0tsource((st/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/cachestore.pys )st( Rtpathtdirnamet giscannert__file__tglobtjointappendtsystargvthashlibtsha1t hexdigest(ttopleveltsourcestmtimes((st/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyt_get_versionhash#s cCs dtjkrdStjjdƒ}|dkr5dStjj|ƒsKdStjj|dƒ}tjj|ƒsžytj|dƒWqžtk ršdSXntjj|dƒ}tjj|ƒsñytj|dƒWqtk rídSXntjj |ƒsdS|S(NtGI_SCANNER_DISABLE_CACHEt~s.cacheiís g-ir-scanner( RtenvirontNoneRt expandusertexistsR tmkdirtOSErrortisdir(thomedirtcachedirt scannerdir((st/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyt _get_cachedir-s,   t CacheStorecBsPeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z RS(cCsUytƒ|_Wn4tk rF}|jtjkr:‚nd|_nX|jƒdS(N(R#t _directoryRterrnotEPERMRt_check_cache_version(tselfte((st/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyt__init__Ks cCs|jdkrdStƒ}tjj|jtƒ}yt|ƒjƒ}Wn1t k r}}|j t j krwd}q~‚nX||krŽdS|d}|j ƒyt|dƒ}Wn,t k rã}|j t j krÝdS‚nX|j|ƒ|jƒtj||ƒdS(Nis.tmptw(R%RRRRR t_CACHE_VERSION_FILENAMEtopentreadtIOErrorR&tENOENTt_cleantEACCEStwritetclosetshutiltmove(R)t current_hashtversiont cache_hashR*t versiontmptfp((st/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyR(Us.       cCs>|jdkrdStj|ƒjƒ}tjj|j|ƒS(N(R%RRRRRRR (R)tfilenameR((st/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyt _get_filenameyscCs"tj|ƒjtj|ƒjkS(N(RRR(R)tstore_filenameR=((st/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyt_cache_is_valid‚scCsoytj|ƒWnWtk r?}|jtjkr9dS‚n,tk rj}|jtjkrddS‚nXdS(N(RtunlinkR0R&R3RR1(R)R=R*((st/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyt_remove_filename†scCsRxKtj|jƒD]7}|tkr+qn|jtjj|j|ƒƒqWdS(N(RtlistdirR%R-RBRR (R)R=((st/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyR2–s cCs|j|ƒ}|dkrdStjj|ƒrG|j||ƒrGdStjddƒ\}}y tj |tj |dƒƒWn9t k rº}|j t j kr´|j|ƒdS‚nXytj||ƒWn8t k r }|j t jkr|j|ƒq ‚nXdS(Ntprefixsg-ir-scanner-cache-R,(R>RRRRR@ttempfiletmkstemptcPickletdumptfdopenR0R&tENOSPCRBR6R7R3(R)R=tdataR?ttmp_fdt tmp_filenameR*((st/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/cachestore.pytstoreœs& $  cCsÁ|j|ƒ}|dkrdSyt|ƒ}Wn,tk r]}|jtjkrWdS‚nX|j||ƒstdSytj|ƒ}Wn3t t t tj fk r¼|j |ƒd}nX|S(N(R>RR.R0R&R1R@RGtloadtAttributeErrortEOFErrort ValueErrort BadPickleGetRB(R)R=R?tfdR*RK((st/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyRO¸s"   ( t__name__t __module__R+R(R>R@RBR2RNRO(((st/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyR$Is $    (R&RGR RRR6RRER R-RR#tobjectR$(((st/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyts