diff options
author | Alexander Bersenev <bay@hackerdom.ru> | 2011-08-16 12:29:44 +0000 |
---|---|---|
committer | Alexander Bersenev <bay@hackerdom.ru> | 2011-08-16 12:29:44 +0000 |
commit | 35e1dc34db0539d6a6478209bdc8caf00d82bb7a (patch) | |
tree | 0151e11221be67f9bf381c8d62cfd409f9511725 | |
parent | allowing all dependencies of portage package (diff) | |
download | autodep-35e1dc34db0539d6a6478209bdc8caf00d82bb7a.tar.gz autodep-35e1dc34db0539d6a6478209bdc8caf00d82bb7a.tar.bz2 autodep-35e1dc34db0539d6a6478209bdc8caf00d82bb7a.zip |
changes in output
21 files changed, 155 insertions, 70 deletions
diff --git a/docs/build/doctrees/api.doctree b/docs/build/doctrees/api.doctree Binary files differindex bfb5a6d..2516311 100644 --- a/docs/build/doctrees/api.doctree +++ b/docs/build/doctrees/api.doctree diff --git a/docs/build/doctrees/environment.pickle b/docs/build/doctrees/environment.pickle Binary files differindex 3f806c9..23e328c 100644 --- a/docs/build/doctrees/environment.pickle +++ b/docs/build/doctrees/environment.pickle diff --git a/docs/build/html/_modules/index.html b/docs/build/html/_modules/index.html index a676437..cc23e30 100644 --- a/docs/build/html/_modules/index.html +++ b/docs/build/html/_modules/index.html @@ -86,7 +86,7 @@ </div> <div class="footer"> © Copyright 2011, Alexander Bersenev. - Last updated on Aug 03, 2011. + Last updated on Aug 04, 2011. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. </div> </body> diff --git a/docs/build/html/_modules/logfs/fstracer.html b/docs/build/html/_modules/logfs/fstracer.html index 0214fa6..0abbd94 100644 --- a/docs/build/html/_modules/logfs/fstracer.html +++ b/docs/build/html/_modules/logfs/fstracer.html @@ -327,7 +327,7 @@ </div> <div class="footer"> © Copyright 2011, Alexander Bersenev. - Last updated on Aug 03, 2011. + Last updated on Aug 04, 2011. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. </div> </body> diff --git a/docs/build/html/_modules/package_utils/portage_log_parser.html b/docs/build/html/_modules/package_utils/portage_log_parser.html index 2c02aa7..a468842 100644 --- a/docs/build/html/_modules/package_utils/portage_log_parser.html +++ b/docs/build/html/_modules/package_utils/portage_log_parser.html @@ -170,7 +170,7 @@ </div> <div class="footer"> © Copyright 2011, Alexander Bersenev. - Last updated on Aug 03, 2011. + Last updated on Aug 04, 2011. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. </div> </body> diff --git a/docs/build/html/_modules/package_utils/portage_misc_functions.html b/docs/build/html/_modules/package_utils/portage_misc_functions.html index 637694c..034ad24 100644 --- a/docs/build/html/_modules/package_utils/portage_misc_functions.html +++ b/docs/build/html/_modules/package_utils/portage_misc_functions.html @@ -188,7 +188,7 @@ </div> <div class="footer"> © Copyright 2011, Alexander Bersenev. - Last updated on Aug 03, 2011. + Last updated on Aug 04, 2011. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. </div> </body> diff --git a/docs/build/html/_modules/package_utils/portage_utils.html b/docs/build/html/_modules/package_utils/portage_utils.html index 58064e7..f7eba53 100644 --- a/docs/build/html/_modules/package_utils/portage_utils.html +++ b/docs/build/html/_modules/package_utils/portage_utils.html @@ -158,7 +158,7 @@ </div> <div class="footer"> © Copyright 2011, Alexander Bersenev. - Last updated on Aug 03, 2011. + Last updated on Aug 04, 2011. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. </div> </body> diff --git a/docs/build/html/_sources/api.txt b/docs/build/html/_sources/api.txt index 4a0a626..1397732 100644 --- a/docs/build/html/_sources/api.txt +++ b/docs/build/html/_sources/api.txt @@ -19,4 +19,3 @@ This package contains modules which works with the Portage system :members: .. automodule:: package_utils.portage_misc_functions :members: - diff --git a/docs/build/html/api.html b/docs/build/html/api.html index c5963a3..bec16d7 100644 --- a/docs/build/html/api.html +++ b/docs/build/html/api.html @@ -56,7 +56,7 @@ handling dependency logic.</p> <p>It can be used to launch a program and get all file events</p> <dl class="function"> <dt id="logfs.fstracer.getfsevents"> -<tt class="descclassname">logfs.fstracer.</tt><tt class="descname">getfsevents</tt><big>(</big><em>prog_name</em>, <em>arguments</em>, <em>approach='hooklib'</em>, <em>filterproc=<function defaultfilter at 0x1dbdb90></em><big>)</big><a class="reference internal" href="_modules/logfs/fstracer.html#getfsevents"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#logfs.fstracer.getfsevents" title="Permalink to this definition">¶</a></dt> +<tt class="descclassname">logfs.fstracer.</tt><tt class="descname">getfsevents</tt><big>(</big><em>prog_name</em>, <em>arguments</em>, <em>approach='hooklib'</em>, <em>filterproc=<function defaultfilter at 0x1b2bc80></em><big>)</big><a class="reference internal" href="_modules/logfs/fstracer.html#getfsevents"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#logfs.fstracer.getfsevents" title="Permalink to this definition">¶</a></dt> <dd><p>Launches a program and gets file access events</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> @@ -165,6 +165,14 @@ package it not returned as key of this dictionary</td> <dt id="package_utils.portage_misc_functions.portage_api.get_best_visible_pkg"> <tt class="descname">get_best_visible_pkg</tt><big>(</big><em>pkg</em><big>)</big><a class="headerlink" href="#package_utils.portage_misc_functions.portage_api.get_best_visible_pkg" title="Permalink to this definition">¶</a></dt> <dd><p>Gets best candidate on installing. Returns empty string if no found</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><strong>pkg</strong> – package name</td> +</tr> +</tbody> +</table> </dd></dl> <dl class="method"> @@ -218,6 +226,14 @@ All dependencies <strong>must</strong> be installed</p> <dd><p>Gets list of packages that emerge with emergeargs-arguments will merge This function uses very internal functions of portage so it may be unreliable in various portage versions</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><strong>emergeargs</strong> – list of raw args of emerge, for example, [‘-1’,’bash’]</td> +</tr> +</tbody> +</table> </dd></dl> <dl class="method"> @@ -313,7 +329,7 @@ list)</td> </div> <div class="footer"> © Copyright 2011, Alexander Bersenev. - Last updated on Aug 03, 2011. + Last updated on Aug 04, 2011. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. </div> </body> diff --git a/docs/build/html/genindex.html b/docs/build/html/genindex.html index e44ab7a..3afc1ac 100644 --- a/docs/build/html/genindex.html +++ b/docs/build/html/genindex.html @@ -200,7 +200,7 @@ </div> <div class="footer"> © Copyright 2011, Alexander Bersenev. - Last updated on Aug 03, 2011. + Last updated on Aug 04, 2011. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. </div> </body> diff --git a/docs/build/html/index.html b/docs/build/html/index.html index b56bed7..95f586e 100644 --- a/docs/build/html/index.html +++ b/docs/build/html/index.html @@ -136,7 +136,7 @@ </div> <div class="footer"> © Copyright 2011, Alexander Bersenev. - Last updated on Aug 03, 2011. + Last updated on Aug 04, 2011. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. </div> </body> diff --git a/docs/build/html/objects.inv b/docs/build/html/objects.inv Binary files differindex 20cf75f..72db0bb 100644 --- a/docs/build/html/objects.inv +++ b/docs/build/html/objects.inv diff --git a/docs/build/html/py-modindex.html b/docs/build/html/py-modindex.html index 42ac89a..e197fdc 100644 --- a/docs/build/html/py-modindex.html +++ b/docs/build/html/py-modindex.html @@ -132,7 +132,7 @@ </div> <div class="footer"> © Copyright 2011, Alexander Bersenev. - Last updated on Aug 03, 2011. + Last updated on Aug 04, 2011. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. </div> </body> diff --git a/docs/build/html/search.html b/docs/build/html/search.html index 2da6a37..14597c1 100644 --- a/docs/build/html/search.html +++ b/docs/build/html/search.html @@ -96,7 +96,7 @@ </div> <div class="footer"> © Copyright 2011, Alexander Bersenev. - Last updated on Aug 03, 2011. + Last updated on Aug 04, 2011. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. </div> </body> diff --git a/docs/build/html/searchindex.js b/docs/build/html/searchindex.js index 8c5fbdb..fa12b7a 100644 --- a/docs/build/html/searchindex.js +++ b/docs/build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({objects:{"":{"-v":[4,0,1],"-f":[4,0,1],"-C":[2,0,1],"-b":[4,0,1],"--hooklib":[4,0,1],"--fusefs":[4,0,1],"--blockpkgs":[4,0,1],"--nocolor":[4,0,1],"--help":[4,0,1]},"package_utils.portage_misc_functions":{portage_api:[1,4,1]},"package_utils.portage_log_parser":{get_list_of_merged_packages:[1,3,1]},logfs:{fstracer:[1,1,1]},"package_utils.portage_utils":{getfilesbypackage:[1,3,1],getpackagesbyfiles:[1,3,1],get_all_packages_files:[1,3,1]},"logfs.fstracer":{getfsevents:[1,3,1]},"package_utils.portage_misc_functions.portage_api":{get_dep:[1,2,1],get_system_packages_list:[1,2,1],get_best_visible_pkg:[1,2,1],get_deps:[1,2,1],get_merge_list:[1,2,1],parse_emerge_args:[1,2,1]},package_utils:{portage_misc_functions:[1,1,1],portage_utils:[1,1,1],portage_log_parser:[1,1,1]}},terms:{oper:1,all:[1,2,3,4],code:3,help:[2,4],chain:1,show:[2,4],futher:[0,3],over:3,rootf:3,mnt:3,veri:1,pkg:1,accuraci:3,find:1,dynam:[2,3,4],paramet:1,xml:3,prog_nam:1,onli:[2,4],cut:3,depend:[1,2,3,4],execut:3,field:3,activ:2,dep_typ:1,should:1,cowsai:2,ebuild:2,program:[1,2,3,4],under:2,els:3,parse_emerge_arg:1,main:3,analys:3,getfsev:1,build:[2,3,4],filterproc:1,deni:[2,3,4],sock_seqpacket:3,sourc:1,"return":[1,3],string:1,variou:1,get:[1,2,4],fals:1,big:[2,4],overlai:2,util:[2,3,4],than:[2,4],candid:1,command:[2,4],"new":3,increas:3,potenti:[2,4],"0x19e7b18":[],recurs:1,lib64:3,requir:[2,4],introduct:[0,2],tri:3,document:0,name:[1,3],success:1,level:1,proc:3,gnu:2,list:[1,3],nocolor:[2,4],exampl:[0,2,4],phase:3,mode:[2,4],man:3,each:1,userspac:3,found:[1,2,3,4],shm:3,kernel:[2,4],domain:3,set:1,slower:[2,4],often:3,map:3,heurist:3,idea:3,packet:3,logf:[0,1],second:1,cost:3,sec:3,result:3,pass:1,fail:1,further:3,successfulli:1,todo:2,event:[0,1,2,3,4],librari:[2,3,4],variabl:3,index:2,statu:[0,2],servic:1,network:3,compar:3,bind:3,develop:2,unknown:[1,2,3,4],best:1,access:[0,1,2,3,4],version:1,exit:[2,4],between:1,got:3,hooker:3,content:0,approach:[0,1,2,3,4],unus:3,gpl:2,who:[2,4],run:[0,2,3],kei:1,arg:1,contain:1,get_all_packages_fil:1,slow:[2,4],believ:3,starttim:1,x11:[2,4],releas:2,hooklib:[0,1,2,3,4],portage_api:1,sinc:[1,3],bash:2,get_best_visible_pkg:1,both:1,search:[1,2],socket:3,thread:3,registar:3,libc:3,current:1,page:2,portage_log_pars:1,registrar:3,reliabl:[2,4],logic:1,action:1,mani:[2,4],chang:3,share:3,lsof:2,other:3,block:[1,2,3,4],first:1,load:[2,3,4],via:3,dictionari:1,packagenam:1,color:[2,4],overview:[0,2],modul:[1,2,3],defaultfilt:1,misc:[2,4],get_merge_list:1,usual:[2,3,4],two:1,ld_preload:[2,3,4],ask:3,unix:3,api:[0,1],non:[2,4],send:3,linux:3,instal:[0,1,2,3],desktop:3,open:[1,3],stage:[1,2,3,4],merg:1,reciev:3,get_dep:1,most:[2,4],from:[1,2,3,4],log:[1,2,4],fusef:[0,1,2,3,4],memori:1,profil:3,modifi:3,licens:2,doesn:1,system:[1,2,3,4],messag:[2,3,4],implicit:[1,3],verbos:[2,4],start:1,much:3,call:[1,3],includ:3,handl:1,autodep:[0,2,4],overhead:[2,4],xchat:[2,4],type:[1,3],strict:[2,4],usr:3,fork:3,parser:1,errno:3,unexpect:3,fstracer:[0,1],tupl:1,tool:[2,4],copi:3,protect:3,direct:[2,4],"var":3,postrm:3,pars:1,low:1,portag:[1,3],atom:1,filesystem:3,"true":1,getfilesbypackag:1,origin:3,must:[1,2,4],also:[1,2,3,4],scheme:3,portage_util:1,err:3,package_util:[0,1],"default":[1,2,4],mount:3,launch:[1,2,3,4],intern:[0,1,3],dev:3,charact:3,showfsev:2,defin:[2,4],lib32:3,bridg:1,can:[1,2,3,4],behavior:3,error:3,about:3,more:[2,4],root:[2,4],delimit:3,loggabl:3,connect:3,pre:[2,4],"function":[1,3],empti:1,creat:3,look:1,descript:4,dure:[2,4],linker:3,filenam:1,argument:1,indic:[0,2],get_list_of_merged_packag:1,high:1,packag:[1,2,3,4],inform:[1,3],unreli:1,file:[0,1,2,3,4],tabl:[0,2],synopsi:4,"import":[2,4],work:[0,1,3],check:3,option:[1,2,4],filter:1,write:[1,3],chroot:3,emergearg:1,thei:1,output:[2,4],perform:[2,3,4],anoth:3,make:2,belong:1,when:[2,3,4],detail:3,same:3,"while":[2,3,4],note:[2,3,4],how:[0,3],wai:3,read:[1,2,3,4],take:[1,2,3,4],which:1,auto:[2,4],answer:3,instead:[1,3],tmp:3,simpl:3,prepar:3,enabl:[2,4],analysi:[0,2,3,4],getpackagesbyfil:1,get_system_packages_list:1,extern:3,thi:[1,2,3,4],see:3,normal:[2,4],recomend:[2,4],after:3,what:[2,4],befor:3,buildtim:[2,4],fuse:[2,3,4],user:[2,4],blockpkg:[2,4],mai:1,end:[1,3],"class":1,"0x1dbdb90":1,don:[2,4],ani:[1,2,3,4],syscal:[2,4],directori:3,macro:[2,4],builder:[2,4],acloc:3,portage_misc_funct:1,rule:3,element:1,alwai:1,registr:3,depth:1,emerg:[1,2,4],environ:3,runtim:[2,3,4],allow:[1,2,3,4],time:[1,2,3,4],format:3,endtim:1,stagenam:3,hungri:1,rdepend:1},objtypes:{"0":"std:option","1":"py:module","2":"py:method","3":"py:function","4":"py:class"},titles:["Autodep’s documentation","API","Introduction","Internals","USER COMMANDS"],objnames:{"0":"option","1":"Python module","2":"Python method","3":"Python function","4":"Python class"},filenames:["index","api","intro","architecture","man"]})
\ No newline at end of file +Search.setIndex({objects:{"":{"-v":[4,0,1],"-f":[4,0,1],"-C":[2,0,1],"-b":[4,0,1],"--hooklib":[4,0,1],"--fusefs":[4,0,1],"--blockpkgs":[4,0,1],"--nocolor":[4,0,1],"--help":[4,0,1]},"package_utils.portage_misc_functions":{portage_api:[1,4,1]},"package_utils.portage_log_parser":{get_list_of_merged_packages:[1,3,1]},logfs:{fstracer:[1,1,1]},"package_utils.portage_utils":{getfilesbypackage:[1,3,1],getpackagesbyfiles:[1,3,1],get_all_packages_files:[1,3,1]},"logfs.fstracer":{getfsevents:[1,3,1]},"package_utils.portage_misc_functions.portage_api":{get_dep:[1,2,1],get_system_packages_list:[1,2,1],get_best_visible_pkg:[1,2,1],get_deps:[1,2,1],get_merge_list:[1,2,1],parse_emerge_args:[1,2,1]},package_utils:{portage_misc_functions:[1,1,1],portage_utils:[1,1,1],portage_log_parser:[1,1,1]}},terms:{all:[1,2,3,4],code:3,chain:1,mnt:3,prog_nam:1,showfsev:2,depend:[1,2,3,4],send:3,ebuild:2,program:[1,2,3,4],under:2,sourc:1,string:1,fals:1,util:[2,3,4],candid:1,veri:1,hooker:3,tri:3,level:1,list:[1,3],mount:3,defaultfilt:1,slower:[2,4],direct:[2,4],second:1,cost:3,pass:1,further:3,index:2,what:[2,4],compar:3,access:[0,1,2,3,4],version:1,"new":3,modifi:3,sinc:[1,3],search:[1,2],action:1,chang:3,via:3,packagenam:1,modul:[1,2,3],filenam:1,unix:3,api:[0,1],heurist:3,instal:[0,1,2,3],get_dep:1,from:[1,2,3,4],memori:1,two:1,call:[1,3],usr:3,type:[1,3],more:[2,4],ld_preload:[2,3,4],endtim:1,getfilesbypackag:1,must:[1,2,4],lib32:3,err:3,package_util:[0,1],prepar:3,registar:3,dev:3,can:[1,2,3,4],"0x1dbdb90":[],root:[2,4],registr:3,share:3,indic:[0,2],high:1,unreli:1,portage_log_pars:1,chroot:3,end:[1,3],anoth:3,write:[1,3],how:[0,3],answer:3,instead:[1,3],simpl:3,map:3,alwai:1,after:3,befor:3,blockpkg:[2,4],mai:1,man:3,syscal:[2,4],bind:3,element:1,inform:[1,3],environ:3,allow:[1,2,3,4],rdepend:1,origin:3,help:[2,4],over:3,rootf:3,dynam:[2,3,4],paramet:1,get_best_visible_pkg:1,cowsai:2,main:3,sock_seqpacket:3,"return":[1,3],thei:1,handl:1,auto:[2,4],"0x19e7b18":[],introduct:[0,2],name:[1,3],mode:[2,4],each:1,found:[1,2,3,4],domain:3,idea:3,logf:[0,1],connect:3,todo:2,event:[0,1,2,3,4],variabl:3,network:3,content:0,got:3,lib64:3,believ:3,dictionari:1,ask:3,bash:[1,2],thread:3,launch:[1,2,3,4],get_list_of_merged_packag:1,filter:1,registrar:3,getfsev:1,first:1,oper:1,misc:[2,4],open:[1,3],gpl:2,start:1,unknown:[1,2,3,4],licens:2,system:[1,2,3,4],messag:[2,3,4],scheme:3,low:1,option:[1,2,4],tool:[2,4],copi:3,postrm:3,pars:1,than:[2,4],portage_util:1,get_merge_list:1,charact:3,bridg:1,pre:[2,4],"function":[1,3],linker:3,argument:1,raw:1,tabl:[0,2],packag:[1,2,3,4],accuraci:3,note:[2,3,4],also:[1,2,3,4],build:[2,3,4],which:1,analysi:[0,2,3,4],loggabl:3,normal:[2,4],who:[2,4],most:[2,4],buildtim:[2,4],hooklib:[0,1,2,3,4],phase:3,"class":1,don:[2,4],portage_misc_funct:1,deni:[2,3,4],runtim:[2,3,4],hungri:1,show:[2,4],verbos:[2,4],pkg:1,find:1,xml:3,current:1,onli:[2,4],slow:[2,4],activ:2,dep_typ:1,should:1,parse_emerge_arg:1,analys:3,unus:3,variou:1,get:[1,2,4],increas:3,requir:[2,4],enabl:[2,4],contain:1,userspac:3,shm:3,kernel:[2,4],set:1,packet:3,see:3,sec:3,result:3,arg:1,fail:1,best:1,statu:[0,2],between:1,"import":[2,4],approach:[0,1,2,3,4],kei:1,get_all_packages_fil:1,xchat:[2,4],both:1,fstracer:[0,1],delimit:3,logic:1,futher:[0,3],mani:[2,4],lsof:2,load:[2,3,4],color:[2,4],overview:[0,2],linux:3,reciev:3,fusef:[0,1,2,3,4],empti:1,implicit:[1,3],much:3,recomend:[2,4],protect:3,ani:[1,2,3,4],look:1,stagenam:3,gnu:2,servic:1,defin:[2,4],"while":[2,3,4],behavior:3,error:3,non:[2,4],synopsi:4,develop:2,perform:[2,3,4],make:2,belong:1,same:3,read:[1,2,3,4],document:0,fuse:[2,3,4],user:[2,4],extern:3,portag:[1,3],macro:[2,4],builder:[2,4],exampl:[0,1,2,4],command:[2,4],thi:[1,2,3,4],filesystem:3,usual:[2,3,4],execut:3,cut:3,"0x1b2bc80":1,desktop:3,els:3,take:[1,2,3,4],filterproc:1,format:3,libc:3,big:[2,4],recurs:1,success:1,nocolor:[2,4],output:[2,4],page:2,often:3,intern:[0,1,3],successfulli:1,librari:[2,3,4],tmp:3,autodep:[0,2,4],exit:[2,4],overlai:2,proc:3,run:[0,2,3],starttim:1,x11:[2,4],portage_api:1,stage:[1,2,3,4],about:3,socket:3,block:[1,2,3,4],merg:1,log:[1,2,4],wai:3,errno:3,strict:[2,4],includ:3,"var":3,overhead:[2,4],fork:3,unexpect:3,tupl:1,atom:1,"true":1,"default":[1,2,4],creat:3,dure:[2,4],parser:1,doesn:1,file:[0,1,2,3,4],work:[0,1,3],check:3,emergearg:1,acloc:3,when:[2,3,4],detail:3,field:3,other:3,getpackagesbyfil:1,get_system_packages_list:1,releas:2,directori:3,reliabl:[2,4],descript:4,rule:3,depth:1,emerg:[1,2,4],potenti:[2,4],time:[1,2,3,4],profil:3},objtypes:{"0":"std:option","1":"py:module","2":"py:method","3":"py:function","4":"py:class"},titles:["Autodep’s documentation","API","Introduction","Internals","USER COMMANDS"],objnames:{"0":"option","1":"Python module","2":"Python method","3":"Python function","4":"Python class"},filenames:["index","api","intro","architecture","man"]})
\ No newline at end of file diff --git a/docs/build/man/autodep.1 b/docs/build/man/autodep.1 index da9aa10..b338c58 100644 --- a/docs/build/man/autodep.1 +++ b/docs/build/man/autodep.1 @@ -1,4 +1,4 @@ -.TH "AUTODEP" "1" "August 03, 2011" "0.1" "Autodep" +.TH "AUTODEP" "1" "August 04, 2011" "0.1" "Autodep" .SH NAME autodep \- auto dependency builder for Gentoo . diff --git a/docs/source/api.rst b/docs/source/api.rst index 4a0a626..1397732 100644 --- a/docs/source/api.rst +++ b/docs/source/api.rst @@ -19,4 +19,3 @@ This package contains modules which works with the Portage system :members: .. automodule:: package_utils.portage_misc_functions :members: - diff --git a/src/autodep/autodep b/src/autodep/autodep index 751dca7..1152180 100755 --- a/src/autodep/autodep +++ b/src/autodep/autodep @@ -41,7 +41,8 @@ def parse_args(): const="fusefs", help="use fuse logging approach(slow, but reliable)") args_parser.set_defaults(approach="hooklib") - args_parser.epilog="Example: %s -b lsof,cowsay emerge bash" % (os.path.basename(sys.argv[0])) + args_parser.epilog="Example: %s -blockpkgs lsof,cowsay emerge bash" % ( + os.path.basename(sys.argv[0])) args_parser.disable_interspersed_args() (options, args) = args_parser.parse_args() if len(args)==0: @@ -56,20 +57,27 @@ def init_environment(): return portage_api, system_packages -def init_runtime_vars(options,args): +def init_runtime_vars(portage_api, options,args): runtime_vars={} # This is here mainly for grouping. We are trying to # get as much data about an environment as possible runtime_vars["starttime"]=int(time.time()) # trivial check for emerge proccess - if args[0]=="emerge": + if os.path.basename(args[0])=="emerge": runtime_vars["is_emerge"]=True emergeaction ,emergeopts, emergefiles=portage_api.parse_emerge_args(args[1:]) runtime_vars["raw_emerge_parameters"]=args[1:] runtime_vars["emerge_parameters"]=(emergeaction ,emergeopts, emergefiles) + runtime_vars["mergelist"]=portage_api.get_merge_list( + runtime_vars["raw_emerge_parameters"]) + if len(emergefiles)>1: print "Please, install packages one by one to get more accurate reports" + + if len(runtime_vars["mergelist"])==0: + print "No packages will be installed or there is an error with counting" + else: runtime_vars["is_emerge"]=False @@ -94,9 +102,9 @@ def get_filter_function(options,system_packages,portage_api): def filter(eventname,filename,stage): return not filename in files_to_block return filter - elif options.strict_block and options.packages: - print "You can't use --block and --blockpkgs options togeter\n" - exit(1) + #elif options.strict_block and options.packages: + #print "You can't use --block and --blockpkgs options togeter\n" + #exit(1) elif options.strict_block: # this option is very strict # because blocking logic is complex print "Building a list of files to block. This may take some time" @@ -111,16 +119,15 @@ def get_filter_function(options,system_packages,portage_api): if len(emergefiles)>1: print "You can't install several packages with option -b" exit(1) - mergelist=portage_api.get_merge_list(runtime_vars["raw_emerge_parameters"]) - if len(mergelist)!=1: - print "You can't install several packages with option -b" - print "Emerge tried to install several packages: %s" % mergelist - print "You can force emerge to merge a package without any other " \ - "packages with emerge --nodeps option or you can install these " \ + if len(runtime_vars["mergelist"])!=1: + print "You can't install several packages with option -b." + print "Emerge tried to install several packages: %s. " % runtime_vars["mergelist"] + print "You can force emerge to merge a package wit hout any other "\ + "packages with emerge --nodeps option or you can install these "\ "packages first" exit(1) - pkg=mergelist[0] + pkg=runtime_vars["mergelist"][0] depslist=list(portage_api.get_deps(pkg)) allowedpkgs+=depslist else: @@ -155,7 +162,7 @@ def get_filter_function(options,system_packages,portage_api): portage_api, system_packages=init_environment() options,args=parse_args() -runtime_vars=init_runtime_vars(options,args) +runtime_vars=init_runtime_vars(portage_api,options,args) color_printer=colorize_output.color_printer(not options.nocolor) @@ -168,24 +175,35 @@ print "Program finished, analyzing dependencies" if runtime_vars["is_emerge"]: # try to get information about packages merged sucessfully - try: - pkgs=portage_log_parser.get_list_of_merged_packages( - runtime_vars["starttime"],runtime_vars["endtime"] - ) - if len(pkgs) > 1: - print "Several packages were installed. The report will be inaccurate" - elif len(pkgs)==0: - print "None packages have been installed sucessfully. The report will be inaccurate" - runtime_vars["pkgs_installed"]=pkgs - runtime_vars["deps_buildtime"]=[] - runtime_vars["deps_all"]=[] - for pkg in pkgs: - runtime_vars["deps_buildtime"]+=portage_api.get_deps(pkg,["DEPEND"]) - runtime_vars["deps_all"]+=portage_api.get_deps(pkg,["DEPEND","RDEPEND"]) - except: - print "Non-critical error while parsing logfile of emerge" - runtime_vars["is_emerge"]=False # shutting down all emerge handling logic - pass + #try: + runtime_vars["deps_all"]=set([]) + runtime_vars["deps_buildtime"]=set([]) + for pkg in runtime_vars["mergelist"]: + runtime_vars["deps_all"]=runtime_vars["deps_all"].union( + portage_api.get_deps(pkg,["DEPEND", "RDEPEND"])) + runtime_vars["deps_buildtime"]=runtime_vars["deps_buildtime"].union( + portage_api.get_dep(pkg,["DEPEND"])) + + runtime_vars["deps_portage"]=portage_api.get_deps('portage',["DEPEND", "RDEPEND"]) + + + #pkgs=portage_log_parser.get_list_of_merged_packages( + # runtime_vars["starttime"],runtime_vars["endtime"] + # ) + #if len(pkgs) > 1: + # print "Several packages were installed. The report will be inaccurate" + #elif len(pkgs)==0: + # print "None packages have been installed sucessfully. The report will be inaccurate" + #runtime_vars["pkgs_installed"]=pkgs + #runtime_vars["deps_buildtime"]=[] + #runtime_vars["deps_all"]=[] + #for pkg in pkgs: + # runtime_vars["deps_buildtime"]+=portage_api.get_deps(pkg,["DEPEND"]) + # runtime_vars["deps_all"]+=portage_api.get_deps(pkg,["DEPEND","RDEPEND"]) + #except: + #print "Non-critical error while parsing logfile of emerge" + #runtime_vars["is_emerge"]=False # shutting down all emerge handling logic + #pass # get unique filenames filenames=set() @@ -259,8 +277,9 @@ for package in sorted(packagesinfo): if package in system_packages and not options.verbose: continue - is_attention_pkg=runtime_vars["is_emerge"] and package not in runtime_vars["deps_all"] - + is_pkg_in_dep=runtime_vars["is_emerge"] and package in runtime_vars["deps_all"] + is_pkg_in_portage_dep=runtime_vars["is_emerge"] and package in runtime_vars["deps_portage"] + is_pkg_python="dev-lang/python" in package stages=[] for stage in sorted(packagesinfo[package].keys(), key=stagesorder.get): @@ -274,13 +293,29 @@ for package in sorted(packagesinfo): if len(packagesinfo[package][stage][filename]["found"])!=0: was_readed,was_writed=packagesinfo[package][stage][filename]["found"] if not filename in filenames: - filenames[filename]=[was_readed,was_writed] + filenames[filename]=['ok',was_readed,was_writed] + else: + status, old_was_readed, old_was_writed=filenames[filename] + filenames[filename]=[ + 'ok',old_was_readed | was_readed, old_was_writed | was_writed + ] + if len(packagesinfo[package][stage][filename]["notfound"])!=0: + was_notfound,was_blocked=packagesinfo[package][stage][filename]["notfound"] + if not filename in filenames: + filenames[filename]=['err',was_notfound,was_blocked] else: - old_was_readed, old_was_writed=filenames[filename] - filenames[filename]=[old_was_readed | was_readed, old_was_writed | was_writed ] + status, old_was_notfound, old_was_blocked=filenames[filename] + filenames[filename]=[ + 'err',old_was_notfound | was_notfound, old_was_blocked | was_blocked + ] + - if not is_attention_pkg: + if not runtime_vars["is_emerge"] or is_pkg_in_dep: color_printer.printmsg("text","[OK]") + elif is_pkg_in_portage_dep: + color_printer.printmsg("text","[PORTAGE DEP]") + elif is_pkg_python: + color_printer.printmsg("text","[INTERPRETER]") elif not events_analysis.is_package_useful(package,stages,filenames.keys()): color_printer.printmsg("text","[LIKELY OK]") else: @@ -292,10 +327,14 @@ for package in sorted(packagesinfo): # this is here for readability action={ - (False,False):"accessed", - (True,False):"readed", - (False,True):"writed", - (True,True):"readed and writed" + ('ok',False,False):"accessed", + ('ok',True,False):"readed", + ('ok',False,True):"writed", + ('ok',True,True):"readed and writed", + ('err',False,False):"other error", + ('err',True,False):"not found", + ('err',False,True):"blocked", + ('err',True,True):"not found and blocked" } filescounter=0 diff --git a/src/autodep/helpers/events_analysis.py b/src/autodep/helpers/events_analysis.py index ed5792b..eba903a 100644 --- a/src/autodep/helpers/events_analysis.py +++ b/src/autodep/helpers/events_analysis.py @@ -32,7 +32,7 @@ def is_package_useful(pkg,stages,files): continue # test 1: package is not useful if all files are *.desktop or *.xml or *.m4 - if not (f.endswith(".desktop") or f.endswith(".xml") or f.endswith(".m4")): + if not (f.endswith(".desktop") or f.endswith(".xml") or f.endswith(".m4") or f.endswith(".pc")): break else: return False # we get here if cycle ends not with break diff --git a/src/autodep/package_utils/portage_misc_functions.py b/src/autodep/package_utils/portage_misc_functions.py index 6afe2c3..95c4ce4 100644 --- a/src/autodep/package_utils/portage_misc_functions.py +++ b/src/autodep/package_utils/portage_misc_functions.py @@ -10,9 +10,9 @@ from _emerge.main import parse_opts # TODO: check if actions always here try: - from _emerge import actions + from _emerge import actions, Package from _emerge.create_depgraph_params import create_depgraph_params - from _emerge.depgraph import backtrack_depgraph, depgraph + from _emerge.depgraph import backtrack_depgraph, resume_depgraph, depgraph except ImportError, Err: # non-critical, just print warning(TODO: strerr) print "Error while loading modules: %s" % Err.message @@ -20,8 +20,13 @@ class portage_api: """ class for accessing the portage api """ def __init__(self): """ test """ - self.settings=portage.config(clone=portage.settings) - self.vartree=portage.db[portage.root]['vartree'] + settings,trees,mtimedb=actions.load_emerge_config() + + #import pdb; pdb.set_trace() + self.settings=settings + self.trees=trees + self.mtimedb=mtimedb + self.vartree=trees[portage.root]['vartree'] self.vardb=self.vartree.dbapi self.portdb=portage.portdb self.metadata_keys = [k for k in portage.auxdbkeys if not k.startswith("UNUSED_")] @@ -39,6 +44,7 @@ class portage_api: except: return '' + # trying to repeat action_build(...) logic in _emerge/actions.py def get_merge_list(self,emergeargs): """ Gets list of packages that emerge with emergeargs-arguments will merge @@ -48,20 +54,46 @@ class portage_api: :param emergeargs: list of raw args of emerge, for example, ['-1','bash'] """ - + try: - settings,trees,mtimedb=actions.load_emerge_config() action, opts, files = parse_opts(emergeargs, silent=True) + + resume = False + if "--resume" in opts and \ + ("resume" in self.mtimedb or "resume_backup" in self.mtimedb): + resume = True + if "resume" not in self.mtimedb: + self.mtimedb["resume"] = self.mtimedb["resume_backup"] + # "opts" is a list for backward compatibility. + resume_opts = self.mtimedb["resume"].get("myopts", []) + if isinstance(resume_opts, list): + resume_opts = dict((k,True) for k in resume_opts) + for opt in ("--ask", "--color", "--skipfirst", "--tree"): + resume_opts.pop(opt, None) + + # Current options always override resume_opts. + resume_opts.update(opts) + opts.clear() + opts.update(resume_opts) + + params=create_depgraph_params(opts,action) - success, mydepgraph, favorites = backtrack_depgraph( - settings, trees, opts, params, action, files, None) - if not success: - return [] + if resume: + success, mydepgraph, dropped_tasks = resume_depgraph( + self.settings, self.trees, self.mtimedb, opts, params, None) + if not success: + return [] + else: + success, mydepgraph, favorites = backtrack_depgraph( + self.settings, self.trees, opts, params, action, files, None) + if not success: + return [] ret=[] for pkg in mydepgraph.altlist(): - ret.append(pkg.cpv) + if type(pkg) is Package.Package: + ret.append(pkg.cpv) return ret except: diff --git a/src/autodep/tests/all_tests.py b/src/autodep/tests/all_tests.py index 3542ca8..0d52de7 100644 --- a/src/autodep/tests/all_tests.py +++ b/src/autodep/tests/all_tests.py @@ -2,7 +2,7 @@ import glob import unittest # change it if you don't want get all tests runned -testsglob='tests/test_*.py' +testsglob='tests/test_p*.py' def create_test_suite(): test_file_strings = glob.glob(testsglob) |