;ò ÷šBc@sCdkZdkZdklZdklZdklZlZdk Tdk l Z dk l Z dk lZdkTdklZlZd klZdkZgaead ad Zd Zd „Zd„Zdfd„ƒYZd„Zd d„Z d„Z!d„Z"d„Z#d„Z$ea%d„Z&d„Z'd„Z(d„Z)d„Z*d„Z+d„Z,d„Z-d„Z.d „Z/d!„Z0d"„Z1d#„Z2d$„Z3d%„Z4d&„Z5d'„Z6d(„Z7d)„Z8d*„Z9d+„Z:d,„Z;d-„Z<d.„Z=d/„Z>ea?ea@eaAd0„ZBd1„ZCd2„ZDd3„ZEd4„ZFdS(5N(s action_run(sDepend(s str2dictlists dictlist2str(s*(s recipe_error(sRecPos(s check_md5(srepl_file_nameshandle_nodelist(sgetworkis done/cvs-yess done/cvs-nocCsB|i|ƒ}|o |iƒotgtdƒ|ƒndS(Ns6"%s" target already defined while $PORTNAME is present(sworks find_nodesnamesnsget_dependenciess recipe_errors_(sworksnamesn((s)/mnt/gmirror/ports/devel/aap/work/Port.pyscheck_port_dep&sc Cs6|iotiid|iƒo d}n“|id|iƒ}|o+|i hdd<ƒd|id}nd}|id|iƒ}|o+|i hdd<ƒ|d |i}n|d |i}|id |iƒ}|o/|i hdd<ƒ|d |id}n|i o#|d }|d|id}n|idjo|d}|d}n|iddjot o.t i|iƒ|itjo da qÀnhd|i<dd>> automatically inserted by "aap makesum" <<< s #>>> end <<< sCannot open recipe file "%s": iswsCannot create temp file "%s": cCsC|idƒ|o|i|ƒn|idƒ|i|ƒdS(Ns do-checksum: s @pass (sfwswritesliness writelinessendl(sfwslinessendl((s)/mnt/gmirror/ports/devel/aap/work/Port.pyswrite_checksum_lines1s   isDuplicate makesum start markersMissing makesum end markers!Error while copying recipe file: s~s"Cannot delete backup recipe "%s": s#Cannot rename recipe "%s" to "%s": sCannot rename recipe to "%s": s-Cannot rename recipe! It is now called "%s": N(,sgetworksrecdictsworks top_recipes recipe_errors_slinessnamesadirsfilessvarnamesget_var_val_intsfs str2dictlistsisosspathsbasenamesnsappendsjoinsexistss check_md5smd5sums startlinesendlinesopensfrs StandardErrorsesstrstempsfwswrite_checksum_linessaddedsreadlineslineswritescloses UserErrorsremovesbaks try_deletesrename(srecdictsworksfrs startlinesfilessadirsaddedsfwslineswrite_checksum_linessesnamestempsfsisvarnameslinessnsendlinesmd5sumsbak((s)/mnt/gmirror/ports/devel/aap/work/Port.pys port_makesumøs    ")&         "  * /$+cCst|tdƒƒdS(s*Implementation of the "srcpackage" target.sTODO: srcpackageN(smsg_infosrecdicts_(srecdict((s)/mnt/gmirror/ports/devel/aap/work/Port.pysport_srcpackagescCs­ttjo˜t|dddƒ\}}| ot|tdƒƒq¥gati |dƒ}xC|D]7}ti |tdƒ}|oti |dƒqfqfWntSdS(s(Return a list of all installed packages.s pkg_info -aIsuse_teeis+Could not obtain list of installed packagess iN(s all_packagessNonesredir_system_intsrecdictsokstexts msg_errors_sstringssplitslinesslsitemssappend(srecdictsokstextslinesslsitems((s)/mnt/gmirror/ports/devel/aap/work/Port.pys get_installedˆs cCsPdk}g}x6|D].}|i||dƒo|i|ƒqqW|SdS(s<Select the items from list "plist" that match pattern "pat".Ns*(sfnmatchsressplistsis fnmatchcasespatsappend(splistspatsfnmatchsressi((s)/mnt/gmirror/ports/devel/aap/work/Port.pysdepend_matchess c Cs/d}xT|t|ƒdjo<|d}||ddjo||tijoPq q Wd}xm|t|ƒjo|t|ƒjoF|}x6|t|ƒjo||tijo|d}q•W|||!}|}x6|t|ƒjo||tijo|d}qáW|||!}x(t|ƒt|ƒjod|}q'Wx(t|ƒt|ƒjod|}qRWxA|t|ƒjo||djo|||}|d}q}WxA|t|ƒjo||djo|||}|d}qÁW|ddjo.||jodSn||jodSq€n@|ddjo.||jodSn||jodSq€n|t|ƒjo|d}n|}|t|ƒjo|d}n|}qfW|djo||||jodSn|djo||||jodSndSdS( sTReturn non-zero if package "name" matches with operation "op" and pattern "pat".iis-s0s.sN( snsslensnamesstringsdigitsspsspatsnes name_partspespat_partsop( snamesopspatspss name_partspesnespat_partsns((s)/mnt/gmirror/ports/devel/aap/work/Port.pysdepend_item_match¨sn ) &' ' $$       ""cCs|}xF|t|ƒjo!t||ƒ o||dj o|d}q W||jotgtdƒ|ƒn|SdS(s{Find the end of the next part in a depends item, up to the next "<", "!", etc. Return the index of the following char.s>s=s>=sHssCould not write to pkg-plists PORTDESCRs pkg-descrs PORTCOMMENTs pkg-comments6pkg_create -f pkg-plist -c pkg-comment -d pkg-descr %ss$Shell returned %d when packaging: %sN($s RecPythons program_paths recipe_errors_sosspathsabspathsget_var_val_intsrecdictspkgdirsexistssdeltrees StandardErrorsesstrs assert_dirsprefixscmds port_exe_cmdsjoinsfilesdirs dir_contentssfilelists skip_commandssmsg_infosopensfswrites writelinessmapscloses_write_var2files get_pkgnamespkgnames logged_systemsn( srecdictsprefixs program_pathsfilesdirspkgnamesespkgdirsfscmdsfilelistsn((s)/mnt/gmirror/ports/devel/aap/work/Port.pys port_packages^ *  & " "  cCsÎt|ƒt|ƒd}tid|dƒtiƒxŽno†tiƒ}| ot gd|ƒn|d djo;t ||ƒ|dd !d jot gd |ƒnPnt ||ƒqCWd S( sInstall the package.s.tgzsIs isInstalling %s abortedi s PkgInstalli i sOKsInstalling %s failedN( s open_sushellsrecdicts get_pkgnamespkgnamessus_inswritesflushssus_outsreadlinesms recipe_errors msg_extrasmsg_info(srecdictspkgnamesm((s)/mnt/gmirror/ports/devel/aap/work/Port.pys port_install_s     c Cs‘dk}dk}ttjo ttjo0t|tdƒƒt|tdƒƒ|idt i i t i dƒƒ\aaatottg}n tg}yƒx|not|ig|gƒ\}}}|diƒ}| otgtdƒƒn|d d joPnt||ƒq­WWq\tj o&}tgtd ƒt|ƒƒq\Xnttjp ttjotgtd ƒƒndS( sOOpen a connection to a su-shell to install packages under root permissions.Ns)Starting a separate shell to run pkg_add.sPlease enter the root password:s su root -c %ss PkgInstall.pyiis Starting super-user shell failedisPkgInstall readys Error while installing package: s+Failed to start a shell to install packages(spopenerrsselectssus_outsNonessus_insmsg_infosrecdicts_spopen3sosspathsjoinsGlobals aap_rootdirssus_errsfdlistsinpsoutpsexcsreadlinesms recipe_errors StandardErrorsesstr( srecdictsesexcsfdlistsinpsmspopenerrsoutpsselect((s)/mnt/gmirror/ports/devel/aap/work/Port.pys open_sushellss2  . &cCsŒtoyYtidƒtiƒtiƒtatiƒtaytiƒWnnXtaWnt|dƒqˆXt |dƒndS(sClose the su-shell.sQ s-could not close shell for installing packagess$closed shell for installing packagesN( ssus_inswritesflushssus_outsclosesNonessus_errsmsg_infosrecdicts msg_extra(srecdict((s)/mnt/gmirror/ports/devel/aap/work/Port.pys close_sushell–s$     cCs.t|dƒdjot|ddƒndS(s+Obtain required items for running the port.s SKIPRUNTIMEsyessruniN(sget_var_val_intsrecdicts depend_do(srecdict((s)/mnt/gmirror/ports/devel/aap/work/Port.pysport_rundepend¬scCst|tdƒƒdS(s'Post-install test: defaults to nothing.sDefault installtest: do nothingN(s msg_extrasrecdicts_(srecdict((s)/mnt/gmirror/ports/devel/aap/work/Port.pysport_installtest³s(Gsos.pathsossstringsActions action_runsDependsDictlists str2dictlists dictlist2strsMessagesProcesss recipe_errorsRecPossSigns check_md5sUtilsVersContsrepl_file_nameshandle_nodelistsWorksgetworksGlobals depend_listsNones last_targetslast_target_founds cvs_done_filescvs_notdone_filescheck_port_deps add_port_deps port_stepsadd_port_defaultss port_cleansport_distcleansport_uninstalls port_makesumsport_srcpackages all_packagess get_installedsdepend_matchessdepend_item_matchspart_ends part_removes depend_items depend_tops depend_dosport_dependchecksuse_cvssport_fetchdepends port_fetchs port_checksumsport_extractdepends port_extracts port_patchsport_builddepends port_configs port_builds port_exe_cmdsport_testdepends port_tests_write_var2files get_pkgnames port_packagessus_outssus_inssus_errs port_installs open_sushells close_sushellsport_rundependsport_installtest(6s port_packagesport_installtests action_runsDepends add_port_deps str2dictlists depend_dos get_installedsport_builddependsadd_port_defaultssgetworks part_removescheck_port_depsport_extractdependsport_dependchecks open_sushellspart_ends port_configs check_md5s get_pkgnamesRecPoss depend_tops port_cleans port_makesums port_tests port_stepsport_fetchdepends port_exe_cmdsport_srcpackages port_patchs depend_itemsport_rundependsstringsdepend_matchessport_uninstalls recipe_errors port_fetchs dictlist2strs cvs_done_filesport_testdependscvs_notdone_filesGlobalsrepl_file_namesuse_cvss port_builds port_checksums port_installs port_extracts_write_var2filesdepend_item_matchsport_distcleans close_sushellsosshandle_nodelist((s)/mnt/gmirror/ports/devel/aap/work/Port.pys? sx           B d    ‡   @ I  5   j   . =  &   L  #