ó }Îș^c@suddlmZddlmZmZmZdZefZdZd„Z d„Z dd„Z d „Z d „Z d S( iÿÿÿÿ(t TYPE_CORE(twalktpathtfstats2.3icCst|jƒƒjS(s3 Get the inode number from file descriptor (Rtfilenotst_ino(tfp((s/usr/lib/yum-plugins/ovl.pyt _stat_ino_fp sccsFx?t|ƒD]1\}}}x|D]}tj||ƒVq#Wq WdS(s, Enumerate all files in a directory N(RRtjoin(trpmpathtroott_tfilestf((s/usr/lib/yum-plugins/ovl.pyt get_file_lists trbc CsX| s| rgSg}x9|D]1}t||ƒ}|j||ƒƒWdQXqW|S(sc Open each file with mode specified in `m` and invoke `cb` on each of the file objects N(topentappend(R tcbtmtretR R((s/usr/lib/yum-plugins/ovl.pyt for_each_files cCsNt|ƒ}t|tdƒ}t|tdƒ}t||ƒ}t|ƒ|S(sO Open the files first R/O, then R/W and count unique inode numbers Rtab(tlenRRtset(R t num_filestlowertuppertdiff((s/usr/lib/yum-plugins/ovl.pytdo_detect_copy_up's  cCss|jjj}y6tt|ƒƒ}t|ƒ}|jtd|ƒWn'tk rn}|j dd|ƒnXdS(Ns5ovl: Copying up (%i) files from OverlayFS lower layeris(ovl: Error while doing RPMdb copy-up: %s( t_basetrpmdbt _rpmdbpathtlistRRtinfotVERBOSE_DEBUGLEVELt Exceptionterror(tconduitt rpmdb_pathR t copied_numte((s/usr/lib/yum-plugins/ovl.pyt init_hook2s N(t yum.pluginsRtosRRRtrequires_api_versiont plugin_typeR#RRRRR*(((s/usr/lib/yum-plugins/ovl.pyts