Ñò –­PSc @s€dZddkZddkZddkZddkiZddkZddki i Z ddk Z dei fd„ƒYZdS(s“module describing a directory packaging object This module contains the DirectoryAction class, which represents a directory-type packaging object.iÿÿÿÿNtDirectoryActioncBseZdZgZdZdZdZeZeZ dZ e i eZ d„Zd„Zd„Zd „Zd „Zd „Zd „Zdd „ZRS(s5Class representing a directory-type packaging object.tdirtpathtmodetownertgroupcCst|id|idƒS(NR(tcmptattrs(tselftother((s;/usr/lib/python2.6/vendor-packages/pkg/actions/directory.pytcompare5scCsttii||ƒ}d|joNt|iiddƒdƒt|iiddƒdƒjo|idƒn|S(s4Returns a list of attributes that have different values between 'other' and 'self'. This differs from the generic Action's differences() method in that it normalizes the 'mode' attribute so that, say, '0755' and '755' are treated as identical.Rt0i(tgenerictActiont differencestintRtgettremove(RR tdiffs((s;/usr/lib/python2.6/vendor-packages/pkg/actions/directory.pyR8s  =cCstii|idƒgS(NR(tosRtnormpathR(R((s;/usr/lib/python2.6/vendor-packages/pkg/actions/directory.pytdirectory_referencesGscCsod}y"t|iiddƒdƒ}Wn,ttfj o|id|iƒnXd}}}|i||iƒ\}}|opy"t|iiddƒdƒ}Wn,ttfj o|id|i ƒnX|i||i ƒ\}}n|i |i i ƒƒ} |i || ƒtiƒp|tiO}n|pZy |i| d|d|iƒWq¿tj o'} | i| jo‚nti| ƒ} ti| iƒ} | itijoti| ƒodS‚n| itijo‚nti| ƒo8tdƒ| } ti |d| d| d|iƒ‚qšti!| ƒo!|i"| ƒti#| |ƒqšti| ƒoti$| |ƒqšq¿Xn"||joti$| |ƒnx'|i%dƒD]}|i&|| ƒqÏW| p||jp ||jo`yti'| ||ƒWqktj o6} | iti(jo| iti)jo‚qgqkXndS( s-Client-side method that installs a directory.RitfmriNs¦Unable to create directory %s; it has been replaced with a link. To continue, please remove the link or restore the directory to its original location and try again.tdetailsterrors salvage-from(*tNoneRRRt TypeErrort ValueErrortvalidatetdestination_fmritget_fsobj_uid_gidt origin_fmritget_installed_pathtimagetget_roottfsobj_checkpathtportabletis_admintstattS_IWUSRtmakedirstOSErrortfilenameRtlstattS_IFMTtst_modeterrnotEROFStS_ISDIRtEEXISTtS_ISLNKt_tapxtActionExecutionErrortS_ISREGtsalvagetmkdirtchmodtattrlistt salvage_fromtchowntEPERMtENOSYS(RtpkgplantorigRtomodetoownertogroupRRRtetfstfs_modeterr_txtR;((s;/usr/lib/python2.6/vendor-packages/pkg/actions/directory.pytinstallJsr" "      "cKs1|i|tiƒ\}}}}}|||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.(tverify_fsobj_commonR&tS_IFDIR(RtimgtargsR+terrorstwarningstinfotabort((s;/usr/lib/python2.6/vendor-packages/pkg/actions/directory.pytverifyÀs$cCsž|i|iiƒƒ}yti|ƒWnntj ob}|itijoqš|ititi fjo|i |ƒqš|iti jo|i |ƒqš|iti jobti i|ƒoO|iidƒp8tdƒ|}ti|d|d|d|iƒ‚q•qš|iti joO|iidƒp8tdƒ|}ti|d|d|d|iƒ‚q•qš|itijo‚qšnXdS(NtimplicitsƒUnable to remove %s; it is in use as a mountpoint. To continue, please unmount the filesystem at the target location and try again.RRRsUUnable to remove %s; it is in use by the system, another process, or as a mountpoint.(R R!R"RtrmdirR)R.tENOENTR1t ENOTEMPTYR7tENOTDIRtEBUSYRtismountRRR3R4R5RtEACCES(RR?RRDRG((s;/usr/lib/python2.6/vendor-packages/pkg/actions/directory.pyRÉs4&      cCs[|idtii|iditiiƒƒdf|idtii|iddfgS(swGenerates the indices needed by the search dictionary. See generic.py for a more detailed explanation.tbasenameRN(tnameRRRZRtrstriptsepR(R((s;/usr/lib/python2.6/vendor-packages/pkg/actions/directory.pytgenerate_indicesôs  %c Csatii|d|dtddƒ}|i|iƒƒ|otii||d|ƒ‚ndS(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.Rt raise_errorstrequired_attrsRRN(sownersgroup( R R t _validatetFalsetextendt_validate_fsobj_commontpkgtactionstInvalidActionAttributesError(RRRM((s;/usr/lib/python2.6/vendor-packages/pkg/actions/directory.pyRs  (spathsmodesownersgroupN(t__name__t __module__t__doc__t __slots__R[tkey_attrt unique_attrstTruetglobally_identicalt refcountabletnamespace_groupR t _orderdictt ordinalityR RRRHRQRR^RR(((s;/usr/lib/python2.6/vendor-packages/pkg/actions/directory.pyR(s"     v + (RjR.R Rt pkg.portableR$t pkg.actionsRetpkg.client.api_errorstclientt api_errorsR4R&R R(((s;/usr/lib/python2.6/vendor-packages/pkg/actions/directory.pyts