Ñò k~NOc @sodZddkZddkZddkZddkZddkZddklZdeifd„ƒYZ dS(smodule describing a legacy packaging object This module contains the LegacyAction class, which represents a legacy SVr4 package. On installation, this action will lay down file with sufficient data to fool the SVr4 packaging tools into thinking that package is installed, albeit empty.iÿÿÿÿN(tmisct LegacyActionc BseZdZgZdZdZdZeZeZ e i eZ d „Z d„Zd„Zd„Zd„Zd„Zdd„ZRS(s2Class representing a legacy SVr4 packaging object.tlegacytpkgtcategorytdescthotlinetnametvendortversiontbasedirtpkginsttpstampt sunw_prodverscCs)tiitiid|idƒƒgS(Ns var/sadm/pkgR(tostpathtnormpathtjointattrs(tself((s8/usr/lib/python2.6/vendor-packages/pkg/actions/legacy.pytdirectory_references7scCsgtii|iiƒd|idƒ}tii|ƒpti|ti ƒntii|dƒ}|i ||ƒ|i }t |ƒdjo|d }nh |ii ƒd6dd6dd 6dd 6dd 6|d 6|idd6|idd 6dd6dd6dd6t|iiƒd6}g}|D]G}|ii|||ƒfD]$} | o||iƒ| fqIqIq)~} | idtidƒfƒt|dƒiiƒ} z;| ~ } x+| D]#\} }| id| |fƒqÂWWdQXy/ttii|iiƒdƒdƒiƒWn/tj o#}|itijo‚qPnXti |ti!ƒdS(sšClient-side method that installs the dummy package files. Use per-pkg hardlinks to create reference count for pkginfo files var/sadm/pkgRtpkginfoitarcht/R tsystemRRRRR R R RR tINSTDATEs%b %d %Y %H:%Mtwbs%s=%s Nsvar/sadm/install/contentsta("RRRtimagetget_rootRtisdirtmakedirsRt PKG_DIR_MODEt#_LegacyAction__old_refcount_cleanupt pkg_summarytlentget_archtNonetstrtdestination_fmriR tgettuppertappendttimetstrftimetopent__exit__t __enter__twritetfiletclosetIOErrorterrnotENOENTtchmodt PKG_FILE_MODE(RtpkgplantorigtpkgdirRR"t svr4attrst_[1]RtbRt_[2]tpfiletktvte((s8/usr/lib/python2.6/vendor-packages/pkg/actions/legacy.pytinstall;sN   * & ! cCs{xttidƒD]c}tii|d|ƒ}yti|ƒWqtj o$}|itijoPn‚qXqWdS(s9Clean up the turds of the old refcounting implementation.is pkginfo.%dN( t itertoolstcountRRRtunlinktOSErrorR4R5(RRR:titlfileRB((s8/usr/lib/python2.6/vendor-packages/pkg/actions/legacy.pyt__old_refcount_cleanup{scKsÇg}g}g}tii|iƒd|idƒ}tii|ƒp,|itdƒ|idƒ|||fStiitii|dƒƒp"|itdƒ|idƒn|||fS(s»Returns a tuple of lists of the form (errors, warnings, info). The error list will be empty if the action has been correctly installed in the given image.s var/sadm/pkgRs!Missing directory var/sadm/pkg/%sRs$Missing file var/sadm/pkg/%s/pkginfo( RRRRRRR*t_tisfile(RtimgtargsterrorstwarningstinfoR:((s8/usr/lib/python2.6/vendor-packages/pkg/actions/legacy.pytverify‰s"cCs”tii|iiƒd|idƒ}tii|dƒ}|i||ƒyti|ƒWn/tj o#}|i t i jo‚qnXdS(Ns var/sadm/pkgRR( RRRRRRR!RFRGR4R5(RR8R:RRB((s8/usr/lib/python2.6/vendor-packages/pkg/actions/legacy.pytremove¡scCs0dd|iddfdd|iddfgS(swGenerates the indices needed by the search dictionary. See generic.py for a more detailed explanation.Rt legacy_pkgRN(RR%(R((s8/usr/lib/python2.6/vendor-packages/pkg/actions/legacy.pytgenerate_indices²sc Cs tii|d|dd ƒd S( s9Performs additional validation of action attributes that for performance or other reasons cannot or should not be done during Action object creation. An ActionError exception (or subclass of) will be raised if any attributes are not valid. This is primarily intended for use during publication or during error handling to provide additional diagonostics. 'fmri' is an optional package FMRI (object or string) indicating what package contained this action.tfmrit single_attrsRRRRRR N(scategorysdescshotlinesnamesvendorsversion(tgenerictActiont _validate(RRV((s8/usr/lib/python2.6/vendor-packages/pkg/actions/legacy.pytvalidate»s ( scategorysdescshotlinesnamespkgsvendorsversionsbasedirspkginstspstamps sunw_prodversN(t__name__t __module__t__doc__t __slots__Rtkey_attrt unique_attrstTruet refcountabletglobally_identicalRXt _orderdictt ordinalityRRCR!RRRSRUR%R[(((s8/usr/lib/python2.6/vendor-packages/pkg/actions/legacy.pyR*s    @    ( R^RR4RDR+RXRRRYR(((s8/usr/lib/python2.6/vendor-packages/pkg/actions/legacy.pyt s