Pc@sddlZddlZddlZddlZddlZddlZddlmZddlj Z ddl j j Z ddl j jZddljjZddljjZddljjZddljjZddljjZddljZddljZddl j!Z!ddl"j#Z#ddl$j%Z&dej'j(Z)dej'j(Z*dej'j(Z+dej'j(Z,dej'j(Z-dej'j(Z.d ej'j(Z/d ej'j(Z0d ej'j(Z1ed d dgZ2eddddddgZ3de4fdYZ5de5fdYZ6de5fdYZ7de5fdYZ8de5fdYZ9de5fd YZ:d!e5fd"YZ;e<e<e=d#Z>d$Z?d%Z@d&ZAiejBe#jC6ejDe#jE6ejFe#jG6eAe#jH6ZIe=d'ZJd(ZKd)ZLd*ZMd+ZNde<d,ZPd-ZQd.ZRd/d0ZSd1ZTd2ZUd3ZVd4ZWd5ZXd6ZYd7ZZd8Z[d9Z\d:Z]e=d;Z^d<Z_de=d=Z`d>Zae=d?ZbdS(@iN(t namedtuples%s.paths%s.files %s.reasons%s.types %s.targets %s.bypasseds %s.via-linkss %s.path-ids %s.fullpathtEntriest deliveredt installedtLinkInfotpathtpfmrit nearest_pfmritvariant_combinationt via_linkstDependencyErrorcBseZdZRS(s/The parent class for all dependency exceptions.(t__name__t __module__t__doc__(((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyR MstUnresolvedDependencyErrorcBs eZdZdZdZRS(sVThis exception is used when no package delivers a file which is depended upon.cCs||_||_||_dS(N(Rtfile_deptpvars(tselftpthRR((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyt__init__Us  c Csd|jj}|jjrtdi|jd6|dd6djg|jjD]>}djgt|D]\}}d||f^ql^qSd6Stdi|jd6|d6SdS( Ns sc%(pth)s has unresolved dependency '%(dep)s' under the following combinations of variants: %(combo)sRtdept s%s:%stcombos,%(pth)s has unresolved dependency '%(dep)s'.(Rt pretty_printRt not_sat_sett_Rtjointsorted(Rtdep_strtgrptnametval((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyt__str__Zs    T (R R R RR (((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyRQs tMissingPackageVariantErrorcBs eZdZdZdZRS(s}This exception is used when an action is tagged with a variant or variant value which the package is not tagged with.cCs||_||_||_dS(N(tact_varstpkg_varsR(RR"R#R((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyRts  cCs,tdi|jd6|jd6|jd6S(NsThe action delivering %(path)s is tagged with a variant type or value not tagged on the package. Dependencies on this file may fail to be reported. The action's variants are: %(act)s The package's variants are: %(pkg)sRtacttpkg(RRR"R#(R((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyR ys    (R R R RR (((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyR!ps tBadPackageFmricBs eZdZdZdZRS(sAThis exception is used when a manifest's fmri isn't a valid fmri.cCs||_||_dS(N(Rtexc(RRte((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyRs cCs"tdi|jd6|jd6S(Ns=The manifest '%(path)s' has an invalid package FMRI: %(exc)sRR'(RRR'(R((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyR s (R R R RR (((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyR&s tExtraVariantedDependencycBs eZdZdZdZRS(sThis exception is used when one or more dependency actions have a variant set on them which is not in the package's set of variants.cCs7||_t|dks!t||_||_dS(Ni(R%tlentAssertionErrortrvstmanual(RR%treason_variantst manual_dep((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyRs  cCsd}xt|jjD]\}}x3|jD](}|tdi|d6|d67}q2Wx@|jD]5\}}|tdi|d6|d6|d67}qhWqW|jstdi|jd6|d 6Std i|jd6|d 6SdS( Nts. %(r)-15s Variant '%(kind)s' is not declared. trtkindsF %(r)-15s Variant '%(kind)s' is not declared to have value '%(val)s'. RsThe package '%(pkg)s' contains actions with the paths seen below which have variants set on them which are not set on the package. These variants must be set on the package or removed from the actions. %(rvs)sR%R,sThe package '%(pkg)s' contains manually specified dependencies which have variants set on them which are not set on the package. These variants must be set on the package or removed from the actions. %(rvs)s(RR,t iteritemst type_diffsRt value_diffsR-R%(RtsR1tdiffR2tktv((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyR s""  %      (R R R RR (((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyR)s tNeedConditionalRequireAnycBs eZdZdZdZRS(sThis exception is used when pkgdepend would need a dependency which was both require-any and conditional to properly represent the dependency.cCs||_||_dS(N(t conditionalstpkg_vct(RR;R#((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyRs c Cs%td}xt|jD]\}\}}}|d7}|j|j|jsa|j rx|td|7}n}|td|7}|ddjg|jD]>}djgt|D]\}}d||f^q^q7}|d7}||j d7}||j d7}qW|S( Ns~pkgdepend has inferred conditional dependencies with different targets but which share a predicate. pkg(5) can not represent these dependencies. This issue can be resolved by changing the packaging of the links which generated the conditional dependencies so that they have different predicates or share the same FMRI. Each pair of problematic conditional dependencies follows: isPair %s s?Pair %s is only problematic in the listed variant combinations:s Rs%s:%ss ( Rt enumerateR;tsimplifyR<tis_emptytsat_setRRR( RR6titd1td2R9RRR((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyR s  %   P (R R R RR (((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyR:s t __NotSubsetcBseZdZRS(cCs+tjt|jt|j|_dS(N(tvariantst VCTDifferencettupleR4R5R7(RR7((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyRs(R R R(((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyRDscCst||\}}|j} t||| ||d|\} } } } g}|rut| ||| \} }n|rt| } n| || || | fS(sGiven the manifest provided in file_path, use the known dependency generators to produce a list of dependencies the files delivered by the manifest have. 'file_path' is the path to the manifest for the package. 'proto_dirs' is a list of paths to proto areas which hold the files that will be delivered by the package. 'dyn_tok_conv' is the dictionary which maps the dynamic tokens, like $PLATFORM, to the values they should be expanded to. 'run_paths' contains the run paths that are used to find modules. 'convert' determines whether PublishingDependencies will be transformed to DependencyActions prior to being returned. This is primarily an option to facilitate testing and debugging. 'ignore_bypass' determines whether to bypass generation of dependencies against certain files or directories. This is primarily an option to facilitate testing and debugging. t ignore_bypass(t__make_manifesttget_all_variantstlist_implicit_deps_for_manifesttresolve_internal_depstconvert_to_standard_dep_actions(t file_patht proto_dirst dyn_tok_convt run_pathstremove_internal_depstconvertRHtmt manifest_errsR#tdepstelisttmissingt pkg_attrstrid_errs((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pytlist_implicit_depss  cCsd}g}x|D]}g}xS|jjD]E}|jj}|j||||jtjj|q/W|s|jj}|||jtjj|n|j |qW|S(sYConvert pkg.base.Dependency objects to pkg.actions.dependency.Dependency objects.cSsCx<|jD].\}}t|tr t|||/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyt norm_attrss( tdep_varsRtattrstcopytupdatetappendtactionstdependtDependencyActiontextend(RVRatrestdttmptcRc((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyRM s     c Csg}g}i}i}tii}i} t|j| tjdd|x|jdD]} | j} | s|} n?| j|s|jt | || j dn| j |t j | dt} | j d} tjj| }|j|tj| q_Wxp|D]h}|jd|jd|d| d t\}} |d kr\qn| j|| |_|j|qW||fS( sGiven a list of dependencies, remove those which are satisfied by others delivered by the same package. 'deps' is a list of Dependency objects. 'mfst' is the Manifest of the package that delivered the dependencies found in deps. 'proto_dir' is the path to the proto area which holds the files that will be delivered by the package. 'pkg_vars' are the variants that this package was published against.s INTERNAL@0-0t0tfileRt satisfiedtdelivered_filestdelivered_base_namestlinkst resolve_linksN(Rtadd_fmri_path_mappingRtfmritPkgFmritgen_actions_by_typetget_variant_templatetissubsetRfR!Rct merge_unknownREtVariantCombinationstTruetosRtbasenamet setdefaultRdtresolve_internalRutNoneR>Rb(RVtmfstROR#RkterrsRt delivered_bntfilesRtR`RtpvctptbnRltetype((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyRL$s@             cKs gtj|jdgifS(s=Function to handle dispatch of files not found on the system.R(tbaset MissingFileRc(tactiontkwargs((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyt no_such_file]sc Csg}g}i}i} t|jd} tj| } tj|kr|tj} t| } | r~||| || fS| jd}ng}tj|krt|tj}nxt | D]\}}| |}|}tj|j kr>|j tj}t|} | r,||| || fS|jd}nt|j j tj|}d|kstd|kr| rd|j d| t /usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyRKksb%          cCs2x+|D]#}|j|gj||qWdS(s?Update the pkg_attrs dictionary with the contents of new_attrs.N(RRj(RYt new_attrstkey((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyRs cCsqt|ts,tjtdtjgSt|jdtdgkrmtjtdtjgSgS(scVerify we've been passed a single item and ensure it contains at least one non-null string.sVManifest specified multiple values for %s rather than a single colon-separated string.RR0sPManifest did not specify any entries for %s, expecting a colon-separated string.( R]tstrRRRRRR^R(R((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyRs $ cCsFt|tr|St|tr6|r/|gSgSn tddS(sGiven a value, return it if that value is a list, or if it's a string, return a single-element list of just that string.s Value was not a string or a listN(R]R_Rt ValueError(tvalue((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyRsc Csg}x|D]}tt|}t}g}yx|D]}d|ksd|kr_n%d|krdtjj|f}n|r>|jds|d}n|jdsd|}n|jtj |q>q>WWn(tj k r } t j || nXx]|D]U} | |kr7|j | qnx-|D]%} | j| r>|j | q>q>WqW|r|jjtd|jjtdg|_g|_||}tt||_|j|jt" All bypass-list entries are assumed to be regular expressions that are rooted at ^ and $. The special match-all wildcard ".*" is dealt with separately, by list_implicit_deps_for_manifest(..) t*t?t/s.*%s%st$t^N(R^t make_pathsRRtseptendswitht startswithRftretcompileterrorRtInvalidDependBypassValuetaddtmatchRctpopt files_prefixRt paths_prefixt base_namesRQRR_t full_pathstfullpaths_prefixR( RRRYtnew_dsRRtbypassed_filestbypass_regexpstitemR(Rtregexp((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyRsN      !       cCsZtj}yt|d}Wn"tk rC}tj|nXg}g}g}d} x|D]} | j} | jdr| | dd!7} qcn| r| | } d} n| sc| ddkrqcny(tj | d|d|\} } } Wntj k rv}tj | d|dt \}} } |j d krPd } |} q|jtj|jd |qcnwtjk r}|j|qcnRX| rtj| jkst| | jtj<| | jtj<|| jtj/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyRIFs`          cCs|dkr+tjtjj|dfS|jd|jdd}|dk rytj|d}Wntj k rd}nX||fStjtjj|dfS(sFind the package name for this manifest. If it's defined in a set action in the manifest, use that. Otherwise use the basename of the path to the manifest as the name. If a proper package fmri is found, then also return a PkgFmri object so that we can track which packages are being processed. 'fp' is the path to the file for the manifest. 'mfst' is the Manifest object.spkg.fmriRws5.11N( RturllibtunquoteRRRRRwRxt IllegalFmri(RRRR((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyt choose_names    cCs|jjtgr |jtS|jjtdg}|jt}t|tr`|g}nt|tr{|g}ng|D](}|D]}tjj ||^qqS(sRFind all the possible paths which could satisfy the dependency 'file_dep'.R0( RcRRRRR]t basestringRRR(RtrpsRtrptf((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyRs    ic$ Csg}g}||krtj|}|jsF|j sFtxr||D]f\} } |j| srqQn|j| } | j|j| |jt || | | gqQW|r|jr||fSn|j t j j } |t| kr ||fSt j j| d|!} |j| t}|s\t|||||d|dSi}xg|D]_\}}}|j|sqin|j|}|jr|j rqint j jt j jt j j| || |jt j j }t|||||\}}|s(qin|j|x|D]\}}}}}|j||j|std||f|j|gj|||f|jt |||||q<WqiWx |jD]}t||}x|D]\}}|j}|j|x|D]\} }!| |!kr@q"nd}"|j}#|#ji| jd6|!jd6dt6|gt6|"d 6|#jt d |#jt"d |jt#j$j%|#|fq"WqWqW||fS( sThis method maps a path to one or more real paths and the variants under which each real path can exist. 'path' is the original text of the path which is being resolved to a real path. 'files_dict' is a dictionary which maps package identity to the files the package delivers and the variants under which each file is present. 'links' is an Entries namedtuple which contains two dictionaries. One dictionary maps package identity to the links that it delivers. The other dictionary, contains the same information for links that are installed on the system. 'path_vars' is the set of variants under which 'path' exists. 'file_dep_attrs' is the dictonary of attributes for the file dependency for 'path'. 'index' indicates how much of 'path' should be checked against the file and link dictionaries.itindexisvc:%s vc_intersection:%st conditionalRwt predicatetlinkttypeN(&RdR?t is_satisfiedR+t intersectst intersectiontmark_all_as_satisfiedtmark_as_satisfiedRfRRRRRR*RRRRutnormpathtdirnametlstripRjRtkeystgroup_by_variant_combinationstunsatisfied_copyRetget_short_fmrit type_prefixRRRRRRgRhRi($Rt files_dictRtt path_varstfile_dep_attrsRt res_pathst res_linksttmp_varsRtp_vctintertlsttcur_patht rel_linkst links_foundt link_pfmritlink_vct rel_targettvc_intersectiont next_patht rec_pathst link_depstrec_patht rec_pfmriRtrec_vcR tcur_depst pfmri_pairstvctdep_vctl_pfmritr_pfmritdep_typeRc((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyRus                    cCsg}g}g}g}tt|} dj| } xw| D]o} |jse|j setttjj | ||||j j \} } |j | || 7}q@Wt g|D]$}|j|j|j|jf^q}x|D]\}}|j||j j }d}ttg|D]\}}}|j^q,}ttg|D]\}}}|^q`}g}t|dkrd}|d}|dd}|jdj|}n:x7|D]/\}}}|j|jdj|qW|jtd |jtd |ji|d6|d6|t6|rb||t/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyt"find_package_using_delivered_files8s`  ! 1 +(      # c Cs"|js|j sttj|}t|j||||\}}}|j s}|s}|s}|js}t|s|r|js| r|||fStj|} | js| j stt|j|||| \} }} |j| |j| |||fS(sFind the packages which resolve the dependency. It returns a list of dependency actions with the fmri tag resolved. 'files' is an Entries namedtuple which contains two dictionaries. One dictionary maps package identity to the files that it delivers. The other dictionary, contains the same information for files that are installed on the system. 'links' is an Entries namedtuple which contains two dictionaries. One dictionary maps package identity to the links that it delivers. The other dictionary, contains the same information for links that are installed on the system. 'file_dep' is the dependency being resolved. 'orig_dep_vars' is the original set of variants under which the dependency must be satisfied. 'pkg_vars' is the variants against which the package was published.(R?RR+RdR1RRRj( RRtRR(R#t use_systemRbRkRtconst_dep_varstinst_rest inst_errs((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyt find_packages!  !  cCsL|jdkoK|jjddtjjkoKt|jkpKt|jkS(NRhRw( RRcRRRt Dependencyt DUMMY_FMRIRR(R$((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pytis_file_dependencys!c Csg}x|D]|}|d}|d }t|dkrF|d}ng}x|D]\}}|dkr|j||fqSn|j|\}} } |s| s| st|s|j|tst| s|j|tst| s|r| st| r$|j|| fn| rT|} | j||j| | fn|}qSW|dk r|j|g|fn|}q W|S(sThe goal of this function is to produce the smallest list of (info list, VariantCombinations) tuples which has the following properties: 1. The intersection between any two satisfied sets of the VariantCombinations must be empty. 2. If a piece of information was satisfied under a particular combination of variants, that information must be paired with the VariantCombination which has that combination in its satisfied set. Note: A piece of information can appear more than once in the result. The 'lst' parameter is a list of tuples. The last item in each tuple must be a VariantCombination. The rest of each tuple is the "piece of information" discussed above.iiiN(R*RRftseparate_satisfiedR+R{R~( RtseedRti_vctinfotnew_restold_infotold_vctonly_it intersecttonly_oldRm((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyRs6         cCsx|jjD]\}}|jd s2t||jkrQ||j|/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyt merge_depss  cCsXy,|djd|djjtdfSWn%tk rStd|dnXdS(NiRs$Expected this to have a predicate:%s(RcRR'RRt RuntimeError(Rl((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyt__predicate_path_id_attrget's  cCs i}xt|D]l\}}|jddkr2q ntj|jdd}|j|jdtgj|||fq Wi}t}xtj t g|D]+\}}|jddkr||f^qdt t D]J\\}}} t | } |j|gj|| f|j |qWg} xV|r|j}tj|d}|jdt} | |kr|q4ng} x@|| D]4\} }}| j|r| j||fqqW| sq4ng}x|j|gD]o\}} g}t| }g}g}x|D]\}}x| D]\}}|j|\}}}|sj|sj|sjt|s|j|tst|s|j|tst|s|r|st|r|j||fn|}|d kr.Pq.q.W|d k r|jg|D]}||f^q qqW|rI|j||fn|d krx|D]\}}x|D]}tjj|j}|jd=d|jd<| j||f|j |jdtj|jdd}|j|jdtgj|||fqoWq\Wqnx9|D]1\}}tjj|d j}x|d D]}t||qTWt t|jd|jd/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyt__collapse_conditionals2s   8       -               8 cCsZg}i}xA|D]9\}}|jddkrK|j||fqng}x0|jdD]}|jtj|dqaWt}|dk rx)|D]} |j| rt}qqWn|rqn|jddkr|j||fqnt} g} x|D]\} } | jddkr2q nt}tj| jdd}x'|D]}|j|rXt}PqXqXW|sq n|j | \}}}|j | s| j r t} | j||fq q W| s|j||fqn|j r|j||fn| s$t |jjtd}|r| ||/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyt)__remove_unneeded_require_and_require_anys^      cCsd}d}i}xntjtg|D]+\}}|jddkr+||f^q+d||D]\}}t|||/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyt fmri_attrget:s cSs|djjtdS(Ni(RcRR'R(Rl((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pytpath_id_attrget>sRR$RRRws5.11RI(RKRLRRcR_RRR?R~ReR@RwRxRJRMRf(RVRgRuRvRPRlR9ttargetRUtneeded_cond_depsRTRmRkts_dts_vtd_fmritr_dtr_vtr_fmri((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyt __remove_extraneous_conditionals4sF   8 8  5cCsd}d}t|}g}t||\}}t||}g} xtjtg|D]+\} } | jddkra| | f^qadttD]\\} } }| sqnt|}xt |D]\}\}}x|||dD]l\}}|j |\}}}|j s0|j r|jd|jdkr| j |||fqqWqWqW| r|j t| |ng}xtjt|d||D]|\}}t|}|dd}tj|t}x.|D]&\}}t|||j|qW|j ||fqW|}g}x-|D]%\} }|j|| ||qFW|}||fS( sCombine duplicate dependency actions. 'deps' is a list of tuples. Each tuple contains a dependency action and the variants associated with that dependency. 'pkg_vars' are the variants that the package for which dependencies are being generated was published against. 'pkg_fmri' is the name of the package being resolved. This can be None. 'pkg_name' is either the same as 'pkg_fmri', if 'pkg_fmri' is not None, or it's the basename of the path to the manifest being resolved.cSsa|dj|djjdd|djjdd|djj|djt|dfS(sReturn a key on which the tuples can be sorted and grouped so that the groups match the duplicate actions that the code in pkg.manifest notices.iRRN(RRcRRtkey_attrtid(Rl((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pytaction_group_keys cSs|j|g}xV|jD]K}|jj}|j|tjj|}|j|j |qW|s|j|g}n|S(sAdd the variants 'd_vars' to the dependency 'd', after removing the variants matching those defined in 'pkg_vars'.( R>R@RcRdReRgRhRitconsolidate_attrsRf(Rltd_varsR#RkR6RcR-((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pytadd_varss     RRRiRwi(RdRtRRKRLRRcRHR_R=R:R?R@RfR:RER}RRFRRj(RVR#Rftpkg_nameRRRkRtomitted_require_anyt conflictsRlR9RRTRURARBtv1RCtv2tonly_v1Rtonly_v2R>R8Rbtres_varsRhRiR((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pytcombinetsJ    8 %  cCsc|j}|j|s3t|j|n|j||j|tj|d|fS(sbTake a dependency which may be tagged with variants and move those tags into a VariantSet.Rq(RzR{RDt differenceR|tstrip_variantsRER}(RR#RqRb((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pytsplit_off_variantss    cCs/td|jjD}tjj|S(syGiven a dependency action with pkg.debug.depend attributes return a matching action with those attributes removedcss6|],\}}|jtjjs||fVqdS(N(RRR7tDEPEND_DEBUG_PREFIX(t.0R8R9((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pys s (tdictRcR3RgRhRi(RRc((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pytprune_debug_attrssc CsP| s| st|s?|j}|r?|j|q?nxt|jdD]c}|j}|s|j|tj|dt}n|j|j dgj ||fqOWxt j |jd|jdD]m}|j}|s|j|tj|dt}n|j|j dgj |||j dfqWdS(sAdd mappings from path names to FMRIs and variants. 'files_dict' is a dictionary which maps package identity to the files the package delivers and the variants under which each file is present. 'links_dict' is a dictionary which maps package identity to the links the package delivers and the variants under which each link is present. 'pfmri' is the FMRI of the current manifest. 'mfst' is the manifest to process. 'distro_vars' is a VariantCombinationTemplate which contains all the variant types and values known. 'use_template is a boolean which indicates whether to fill the dictionaries with VariantCombinationTemplates instead of VariantCombinations.RpRqRRRRwN( R+RJR|RyRzRER}R~RRcRfRKtchain( Rt links_dictRRt distro_varst use_templatet pvariantsRR((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyRvs,         cCs:d}ytj|dj}Wntjk r5nX|S(Ns5.11(RRwRxRR(ttxttdep_name((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyt__safe_fmri_parse!s c< Csgd|DD]6\}\}}|t||||j|f^q}tii}i} tj} t} xI|D]A\}\} } }}}| j|| r~| j| jq~q~Wd}t}t}|r3|j t j j d|dt }i}i}i}d}yx|D]\\}}}}}}}|| krWq'ntjd|d|d|} |j| d t }d| _|j| j| j|j|j||}y|jjd Wntk r*nX|j|jnX~x!|jD]} | j| qOWx\|jD]N\}!}"g|"D](\}#}$|#||$||#jf^q}%|%|j|!/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pys BscSs |j|tj|dtS(NRq(R|RER}R~(tact_vctR<((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyt__merge_actvct_with_pkgvctUs tpatternstraise_unmatchedit publisherRtversiont all_variantsRiRs5.11RhRqRwRcssD|]:}|jdD]$}|jddkrt|VqqdS(RwRRR$s require-anyN(s conditionalsrequires require-any(RNRcR(RR`R((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pys s N(:RRJRREtVariantCombinationTemplateR^t merge_valuesRRt get_pkg_listtapitImageInterfacetLIST_INSTALLEDR~RwRxt get_manifestRRRvRtInventoryExceptiontnotfoundtremoveRReROR|R3RRR&RRjRyR9RRfRDRRct reason_prefixRFR4R7R5R)RR6tboolRthasattrR>RRRtdifference_updateR(<tmanifest_pathstapi_insttsystem_patternst prune_attrsRRRUt manifestsRRtRtresolving_pkgsRRR#t miss_filesRt sys_fmristunmatched_patternstpkg_listt tmp_filest tmp_linkst package_varstpkg_cnttpubtstemtvertsummtcatststatesRcR(R<RRRttmpltnew_valRwt res_fmristpkg_depsRt external_depst name_to_useRtbad_dsRlR1R7Rtpkg_resRVtbad_depsRRkRbtpkg_errst combine_errsRt ext_pfmris((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyt resolve_deps)sD  "     "        28 "  "       =               " (cRdRKtoperatorRRRt collectionsRt pkg.actionsRgtpkg.client.apitclientRtpkg.client.api_errorst api_errorsRtpkg.flavor.basetflavorRtpkg.flavor.elftelftelf_deptpkg.flavor.hardlinkRtpkg.flavor.scripttscripttpkg.flavor.smf_manifestt smf_manifesttpkg.fmriRwt pkg.manifestRtpkg.misctmisct pkg.portableRt pkg.varianttvariantRER7RRRRRt target_prefixRR&R'RRRt ExceptionR RR!R&R)R:RDR~RR[RMRLRtprocess_elf_dependenciestELFtprocess_script_depstEXECtprocess_smf_manifest_depst SMF_MANIFESTtUNFOUNDRRKRRRRRRIRRRuR1R6R9RRFRHRdRtRRRRRvRR(((s>/usr/lib/python2.7/vendor-packages/pkg/publish/dependencies.pyts       ($&  9      e   S:   ^ 2  E  U @ h  .