abtlinux-svn Mailing List for ABout Time Linux (AbTLinux) (Page 3)
Status: Alpha
Brought to you by:
eschabell
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(12) |
Apr
(4) |
May
(61) |
Jun
(5) |
Jul
(12) |
Aug
(1) |
Sep
|
Oct
(29) |
Nov
(89) |
Dec
(37) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(4) |
Feb
(33) |
Mar
(12) |
Apr
|
May
(2) |
Jun
(13) |
Jul
(76) |
Aug
(7) |
Sep
(21) |
Oct
|
Nov
|
Dec
(33) |
2008 |
Jan
(32) |
Feb
(24) |
Mar
(17) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(10) |
From: <esc...@us...> - 2008-02-02 19:49:06
|
Revision: 502 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=502&view=rev Author: eschabell Date: 2008-02-02 11:49:04 -0800 (Sat, 02 Feb 2008) Log Message: ----------- Fixed bogus fortune sha value. Modified Paths: -------------- src/trunk/packages/fortune.rb Modified: src/trunk/packages/fortune.rb =================================================================== --- src/trunk/packages/fortune.rb 2008-01-28 20:22:05 UTC (rev 501) +++ src/trunk/packages/fortune.rb 2008-02-02 19:49:04 UTC (rev 502) @@ -49,7 +49,7 @@ 'reliesOn' => "simply nothing", 'optionalDO' => "garbage", 'optionalRO' => "sense of humor", - 'hashCheck' => "sha512:80c5b71d84eeb3092b2dfe483f0dad8ed42e2efeaa1f8791c2", + 'hashCheck' => "82756fd65c3f69a02edcec6aef85f765c6b5d3ca", 'patches' => "http://patches.abtlinux.org/#{$srcDir}-patches-1.tar.gz", 'patchesHashCheck' => "", 'mirrorPath' => "http://mirror.abtlinux.org/#{$srcDir}.tar.gz", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-28 20:22:10
|
Revision: 501 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=501&view=rev Author: eschabell Date: 2008-01-28 12:22:05 -0800 (Mon, 28 Jan 2008) Log Message: ----------- Regenerated api docs. Modified Paths: -------------- src/trunk/doc/classes/AbtDownloadManager.html src/trunk/doc/classes/AbtPackage.html src/trunk/doc/classes/AbtUsage.html src/trunk/doc/created.rid src/trunk/doc/dot/f_0.dot src/trunk/doc/dot/f_0.png src/trunk/doc/dot/f_1.dot src/trunk/doc/dot/f_1.png src/trunk/doc/dot/f_2.dot src/trunk/doc/dot/f_2.png src/trunk/doc/files/libs/abtdownloadmanager_rb.html src/trunk/doc/files/libs/abtpackage_rb.html src/trunk/doc/files/libs/abtusage_rb.html src/trunk/doc/fr_class_index.html src/trunk/doc/fr_file_index.html src/trunk/doc/fr_method_index.html src/trunk/doc/index.html Modified: src/trunk/doc/classes/AbtDownloadManager.html =================================================================== --- src/trunk/doc/classes/AbtDownloadManager.html 2008-01-28 20:20:52 UTC (rev 500) +++ src/trunk/doc/classes/AbtDownloadManager.html 2008-01-28 20:22:05 UTC (rev 501) @@ -76,9 +76,9 @@ <div id="content"> <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center"> <map id="map" name="map"> - <area shape="rect" coords="27,50,160,98" href="AbtDownloadManager.html" alt="AbtDownloadManager" /> + <area shape="rect" coords="29,51,176,99" href="AbtDownloadManager.html" alt="AbtDownloadManager" /> </map> -<img src="../dot/f_1.png" usemap="#map" border="0" alt="dot/f_1.png"> +<img src="../dot/f_0.png" usemap="#map" border="0" alt="dot/f_0.png"> </td></tr></table> <div class="description"><p> @@ -117,13 +117,13 @@ <div class="sectiontitle">Methods</div> <ul> - <li><a href="#M000012">new</a></li> - <li><a href="#M000015">retrieve_news_feed</a></li> - <li><a href="#M000013">retrieve_package_source</a></li> - <li><a href="#M000014">retrieve_package_tree</a></li> - <li><a href="#M000016">update_package</a></li> - <li><a href="#M000017">update_package_tree</a></li> - <li><a href="#M000018">validated</a></li> + <li><a href="#M000001">new</a></li> + <li><a href="#M000004">retrieve_news_feed</a></li> + <li><a href="#M000002">retrieve_package_source</a></li> + <li><a href="#M000003">retrieve_package_tree</a></li> + <li><a href="#M000005">update_package</a></li> + <li><a href="#M000006">update_package_tree</a></li> + <li><a href="#M000007">validated</a></li> </ul> @@ -134,7 +134,7 @@ <div class="sectiontitle">Public Class methods</div> <div class="method"> <div class="title"> - <a name="M000012"></a><b>new</b>() + <a name="M000001"></a><b>new</b>() </div> <div class="description"> <p> @@ -148,8 +148,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000012_source')" id="l_M000012_source">show source</a> ]</p> - <div id="M000012_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000001_source')" id="l_M000001_source">show source</a> ]</p> + <div id="M000001_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 42</span> 42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> @@ -161,7 +161,7 @@ <div class="sectiontitle">Public Instance methods</div> <div class="method"> <div class="title"> - <a name="M000015"></a><b>retrieve_news_feed</b>(uri, cleanLog=true) + <a name="M000004"></a><b>retrieve_news_feed</b>(uri, cleanLog=true) </div> <div class="description"> <p> @@ -176,8 +176,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000015_source')" id="l_M000015_source">show source</a> ]</p> - <div id="M000015_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000004_source')" id="l_M000004_source">show source</a> ]</p> + <div id="M000004_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 122</span> 122: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieve_news_feed</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">cleanLog</span>=<span class="ruby-keyword kw">true</span>) @@ -231,7 +231,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000013"></a><b>retrieve_package_source</b>(packageName, destination) + <a name="M000002"></a><b>retrieve_package_source</b>(packageName, destination) </div> <div class="description"> <p> @@ -249,8 +249,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000013_source')" id="l_M000013_source">show source</a> ]</p> - <div id="M000013_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000002_source')" id="l_M000002_source">show source</a> ]</p> + <div id="M000002_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 56</span> 56: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieve_package_source</span>(<span class="ruby-identifier">packageName</span>, <span class="ruby-identifier">destination</span>) @@ -278,7 +278,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000014"></a><b>retrieve_package_tree</b>(packageTreeName="AbTLinux") + <a name="M000003"></a><b>retrieve_package_tree</b>(packageTreeName="AbTLinux") </div> <div class="description"> <p> @@ -294,8 +294,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000014_source')" id="l_M000014_source">show source</a> ]</p> - <div id="M000014_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000003_source')" id="l_M000003_source">show source</a> ]</p> + <div id="M000003_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 84</span> 84: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieve_package_tree</span>(<span class="ruby-identifier">packageTreeName</span>=<span class="ruby-value str">"AbTLinux"</span>) @@ -332,7 +332,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000016"></a><b>update_package</b>(packageName) + <a name="M000005"></a><b>update_package</b>(packageName) </div> <div class="description"> <p> @@ -347,8 +347,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000016_source')" id="l_M000016_source">show source</a> ]</p> - <div id="M000016_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000005_source')" id="l_M000005_source">show source</a> ]</p> + <div id="M000005_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 176</span> 176: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_package</span>(<span class="ruby-identifier">packageName</span>) @@ -383,7 +383,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000017"></a><b>update_package_tree</b>() + <a name="M000006"></a><b>update_package_tree</b>() </div> <div class="description"> <p> @@ -395,8 +395,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000017_source')" id="l_M000017_source">show source</a> ]</p> - <div id="M000017_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000006_source')" id="l_M000006_source">show source</a> ]</p> + <div id="M000006_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 209</span> 209: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_package_tree</span>() @@ -431,7 +431,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000018"></a><b>validated</b>(hashvalue, path) + <a name="M000007"></a><b>validated</b>(hashvalue, path) </div> <div class="description"> <p> @@ -448,8 +448,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000018_source')" id="l_M000018_source">show source</a> ]</p> - <div id="M000018_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000007_source')" id="l_M000007_source">show source</a> ]</p> + <div id="M000007_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 245</span> 245: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validated</span>(<span class="ruby-identifier">hashvalue</span>, <span class="ruby-identifier">path</span>) @@ -462,9 +462,11 @@ 252: <span class="ruby-keyword kw">end</span> 253: 254: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"Source hash failed validation..."</span> -255: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">"Validating sources failed..."</span>) -256: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -257: <span class="ruby-keyword kw">end</span> +255: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span>(<span class="ruby-value str">"Validating sources failed..."</span>) +256: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span>(<span class="ruby-node">" expected: #{hashvalue}"</span>) +257: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span>(<span class="ruby-node">" computed: #{Digest::SHA1.hexdigest(path)}"</span>) +258: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +259: <span class="ruby-keyword kw">end</span> </pre> </div> </div> Modified: src/trunk/doc/classes/AbtPackage.html =================================================================== --- src/trunk/doc/classes/AbtPackage.html 2008-01-28 20:20:52 UTC (rev 500) +++ src/trunk/doc/classes/AbtPackage.html 2008-01-28 20:22:05 UTC (rev 501) @@ -76,9 +76,9 @@ <div id="content"> <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center"> <map id="map" name="map"> - <area shape="rect" coords="27,50,115,98" href="AbtPackage.html" alt="AbtPackage" /> + <area shape="rect" coords="29,51,123,99" href="AbtPackage.html" alt="AbtPackage" /> </map> -<img src="../dot/f_3.png" usemap="#map" border="0" alt="dot/f_3.png"> +<img src="../dot/f_1.png" usemap="#map" border="0" alt="dot/f_1.png"> </td></tr></table> <div class="description"><p> @@ -90,7 +90,7 @@ inheriting from this class (class Fortune < <a href="AbtPackage.html">AbtPackage</a>) one picks up all supported standard functions for the abt <a href="AbtPackage.html">AbtPackage</a> manager to -make use of the <a href="AbtPackage.html#M000027">new</a> <a +make use of the <a href="AbtPackage.html#M000009">new</a> <a href="AbtPackage.html">AbtPackage</a>. </p> <p> @@ -109,7 +109,7 @@ AbTLinux is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more <a -href="AbtPackage.html#M000028">details</a>. +href="AbtPackage.html#M000010">details</a>. </p> <p> You should have received a copy of the GNU General Public License along @@ -122,16 +122,16 @@ <div class="sectiontitle">Methods</div> <ul> - <li><a href="#M000031">build</a></li> - <li><a href="#M000030">configure</a></li> - <li><a href="#M000028">details</a></li> - <li><a href="#M000033">install</a></li> - <li><a href="#M000027">new</a></li> - <li><a href="#M000034">post</a></li> - <li><a href="#M000029">pre</a></li> - <li><a href="#M000032">preinstall</a></li> - <li><a href="#M000035">remove_build</a></li> - <li><a href="#M000026">unpack_sources</a></li> + <li><a href="#M000013">build</a></li> + <li><a href="#M000012">configure</a></li> + <li><a href="#M000010">details</a></li> + <li><a href="#M000015">install</a></li> + <li><a href="#M000009">new</a></li> + <li><a href="#M000016">post</a></li> + <li><a href="#M000011">pre</a></li> + <li><a href="#M000014">preinstall</a></li> + <li><a href="#M000017">remove_build</a></li> + <li><a href="#M000008">unpack_sources</a></li> </ul> @@ -305,20 +305,20 @@ <div class="sectiontitle">Public Class methods</div> <div class="method"> <div class="title"> - <a name="M000027"></a><b>new</b>(data) + <a name="M000009"></a><b>new</b>(data) </div> <div class="description"> <p> Constructor for an <a href="AbtPackage.html">AbtPackage</a>, requires all -the packge <a href="AbtPackage.html#M000028">details</a>. +the packge <a href="AbtPackage.html#M000010">details</a>. </p> <p> <b>PARAM</b> <em>Hash</em> - hash containing all package data. </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000027_source')" id="l_M000027_source">show source</a> ]</p> - <div id="M000027_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000009_source')" id="l_M000009_source">show source</a> ]</p> + <div id="M000009_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtpackage.rb, line 149</span> 149: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">data</span>) @@ -346,7 +346,7 @@ <div class="sectiontitle">Public Instance methods</div> <div class="method"> <div class="title"> - <a name="M000031"></a><b>build</b>(verbose=true) + <a name="M000013"></a><b>build</b>(verbose=true) </div> <div class="description"> <p> @@ -363,8 +363,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000031_source')" id="l_M000031_source">show source</a> ]</p> - <div id="M000031_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000013_source')" id="l_M000013_source">show source</a> ]</p> + <div id="M000013_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtpackage.rb, line 276</span> 276: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build</span>(<span class="ruby-identifier">verbose</span>=<span class="ruby-keyword kw">true</span>) @@ -390,13 +390,13 @@ </div> <div class="method"> <div class="title"> - <a name="M000030"></a><b>configure</b>(verbose=true) + <a name="M000012"></a><b>configure</b>(verbose=true) </div> <div class="description"> <p> -Here we manage the ./<a href="AbtPackage.html#M000030">configure</a> step +Here we manage the ./<a href="AbtPackage.html#M000012">configure</a> step (or equivalent). We need to give ./<a -href="AbtPackage.html#M000030">configure</a> (or autogen.sh, or whatever) +href="AbtPackage.html#M000012">configure</a> (or autogen.sh, or whatever) the correct options so files are to be placed later in the right directories, so doc files and man pages are all in the same common location, etc. Don‘t forget too that it‘s here where we @@ -412,8 +412,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000030_source')" id="l_M000030_source">show source</a> ]</p> - <div id="M000030_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000012_source')" id="l_M000012_source">show source</a> ]</p> + <div id="M000012_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtpackage.rb, line 248</span> 248: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">configure</span>(<span class="ruby-identifier">verbose</span>=<span class="ruby-keyword kw">true</span>) @@ -439,7 +439,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000028"></a><b>details</b>() + <a name="M000010"></a><b>details</b>() </div> <div class="description"> <p> @@ -452,8 +452,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000028_source')" id="l_M000028_source">show source</a> ]</p> - <div id="M000028_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000010_source')" id="l_M000010_source">show source</a> ]</p> + <div id="M000010_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtpackage.rb, line 174</span> 174: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">details</span> @@ -482,7 +482,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000033"></a><b>install</b>(verbose=true) + <a name="M000015"></a><b>install</b>(verbose=true) </div> <div class="description"> <p> @@ -498,8 +498,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000033_source')" id="l_M000033_source">show source</a> ]</p> - <div id="M000033_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000015_source')" id="l_M000015_source">show source</a> ]</p> + <div id="M000015_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtpackage.rb, line 320</span> 320: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">install</span>(<span class="ruby-identifier">verbose</span>=<span class="ruby-keyword kw">true</span>) @@ -529,7 +529,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000034"></a><b>post</b>(verbose=true) + <a name="M000016"></a><b>post</b>(verbose=true) </div> <div class="description"> <p> @@ -546,8 +546,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000034_source')" id="l_M000034_source">show source</a> ]</p> - <div id="M000034_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000016_source')" id="l_M000016_source">show source</a> ]</p> + <div id="M000016_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtpackage.rb, line 352</span> 352: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post</span>(<span class="ruby-identifier">verbose</span>=<span class="ruby-keyword kw">true</span>) @@ -560,7 +560,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000029"></a><b>pre</b>(verbose=true) + <a name="M000011"></a><b>pre</b>(verbose=true) </div> <div class="description"> <p> @@ -577,8 +577,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000029_source')" id="l_M000029_source">show source</a> ]</p> - <div id="M000029_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000011_source')" id="l_M000011_source">show source</a> ]</p> + <div id="M000011_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtpackage.rb, line 205</span> 205: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pre</span>(<span class="ruby-identifier">verbose</span>=<span class="ruby-keyword kw">true</span>) @@ -615,12 +615,12 @@ </div> <div class="method"> <div class="title"> - <a name="M000032"></a><b>preinstall</b>(verbose=true) + <a name="M000014"></a><b>preinstall</b>(verbose=true) </div> <div class="description"> <p> Any actions needed before the installation can occur will happen here, such -as creating <a href="AbtPackage.html#M000027">new</a> user accounts, +as creating <a href="AbtPackage.html#M000009">new</a> user accounts, dealing with existing configuration files, etc. </p> <p> @@ -633,8 +633,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000032_source')" id="l_M000032_source">show source</a> ]</p> - <div id="M000032_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000014_source')" id="l_M000014_source">show source</a> ]</p> + <div id="M000014_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtpackage.rb, line 305</span> 305: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">preinstall</span>(<span class="ruby-identifier">verbose</span>=<span class="ruby-keyword kw">true</span>) @@ -648,11 +648,11 @@ </div> <div class="method"> <div class="title"> - <a name="M000035"></a><b>remove_build</b>() + <a name="M000017"></a><b>remove_build</b>() </div> <div class="description"> <p> -Cleans up this packages source <a href="AbtPackage.html#M000031">build</a> +Cleans up this packages source <a href="AbtPackage.html#M000013">build</a> directory. </p> <p> @@ -661,8 +661,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000035_source')" id="l_M000035_source">show source</a> ]</p> - <div id="M000035_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000017_source')" id="l_M000017_source">show source</a> ]</p> + <div id="M000017_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtpackage.rb, line 363</span> 363: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove_build</span> @@ -688,12 +688,12 @@ <div class="sectiontitle">Protected Instance methods</div> <div class="method"> <div class="title"> - <a name="M000026"></a><b>unpack_sources</b>() + <a name="M000008"></a><b>unpack_sources</b>() </div> <div class="description"> <p> Unpacks this packages source file into the standard <a -href="AbtPackage.html#M000031">build</a> location. +href="AbtPackage.html#M000013">build</a> location. </p> <p> <b>RETURNS:</b> <em>boolean</em> - True if the completes sucessfully, @@ -701,8 +701,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000026_source')" id="l_M000026_source">show source</a> ]</p> - <div id="M000026_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000008_source')" id="l_M000008_source">show source</a> ]</p> + <div id="M000008_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtpackage.rb, line 40</span> 40: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unpack_sources</span> Modified: src/trunk/doc/classes/AbtUsage.html =================================================================== --- src/trunk/doc/classes/AbtUsage.html 2008-01-28 20:20:52 UTC (rev 500) +++ src/trunk/doc/classes/AbtUsage.html 2008-01-28 20:22:05 UTC (rev 501) @@ -76,16 +76,16 @@ <div id="content"> <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center"> <map id="map" name="map"> - <area shape="rect" coords="27,50,104,98" href="AbtUsage.html" alt="AbtUsage" /> + <area shape="rect" coords="29,51,109,99" href="AbtUsage.html" alt="AbtUsage" /> </map> -<img src="../dot/f_8.png" usemap="#map" border="0" alt="dot/f_8.png"> +<img src="../dot/f_2.png" usemap="#map" border="0" alt="dot/f_2.png"> </td></tr></table> <div class="description"><p> abtusage.rb </p> <p> -The <a href="AbtUsage.html#M000036">usage</a> reporting class for AbTLinux. +The <a href="AbtUsage.html#M000018">usage</a> reporting class for AbTLinux. </p> <p> Created by Eric D. Schabell <er...@ab...> Copyright November @@ -117,13 +117,13 @@ <div class="sectiontitle">Methods</div> <ul> - <li><a href="#M000036">usage</a></li> - <li><a href="#M000040">usage_downloads</a></li> - <li><a href="#M000041">usage_fix</a></li> - <li><a href="#M000039">usage_generation</a></li> - <li><a href="#M000042">usage_maintenance</a></li> - <li><a href="#M000037">usage_packages</a></li> - <li><a href="#M000038">usage_queries</a></li> + <li><a href="#M000018">usage</a></li> + <li><a href="#M000022">usage_downloads</a></li> + <li><a href="#M000023">usage_fix</a></li> + <li><a href="#M000021">usage_generation</a></li> + <li><a href="#M000024">usage_maintenance</a></li> + <li><a href="#M000019">usage_packages</a></li> + <li><a href="#M000020">usage_queries</a></li> </ul> @@ -134,11 +134,11 @@ <div class="sectiontitle">Public Instance methods</div> <div class="method"> <div class="title"> - <a name="M000036"></a><b>usage</b>(section) + <a name="M000018"></a><b>usage</b>(section) </div> <div class="description"> <p> -The main <a href="AbtUsage.html#M000036">usage</a> method, displays either +The main <a href="AbtUsage.html#M000018">usage</a> method, displays either a given section or all sections. </p> <p> @@ -149,8 +149,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000036_source')" id="l_M000036_source">show source</a> ]</p> - <div id="M000036_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000018_source')" id="l_M000018_source">show source</a> ]</p> + <div id="M000018_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtusage.rb, line 36</span> 36: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usage</span>(<span class="ruby-identifier">section</span>) @@ -191,11 +191,11 @@ </div> <div class="method"> <div class="title"> - <a name="M000040"></a><b>usage_downloads</b>() + <a name="M000022"></a><b>usage_downloads</b>() </div> <div class="description"> <p> -The <a href="AbtUsage.html#M000036">usage</a> information for the download +The <a href="AbtUsage.html#M000018">usage</a> information for the download commands. </p> <p> @@ -203,8 +203,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000040_source')" id="l_M000040_source">show source</a> ]</p> - <div id="M000040_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000022_source')" id="l_M000022_source">show source</a> ]</p> + <div id="M000022_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtusage.rb, line 129</span> 129: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usage_downloads</span> @@ -219,11 +219,11 @@ </div> <div class="method"> <div class="title"> - <a name="M000041"></a><b>usage_fix</b>() + <a name="M000023"></a><b>usage_fix</b>() </div> <div class="description"> <p> -The <a href="AbtUsage.html#M000036">usage</a> information for the fix +The <a href="AbtUsage.html#M000018">usage</a> information for the fix commands. </p> <p> @@ -231,8 +231,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000041_source')" id="l_M000041_source">show source</a> ]</p> - <div id="M000041_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000023_source')" id="l_M000023_source">show source</a> ]</p> + <div id="M000023_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtusage.rb, line 141</span> 141: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usage_fix</span> @@ -250,11 +250,11 @@ </div> <div class="method"> <div class="title"> - <a name="M000039"></a><b>usage_generation</b>() + <a name="M000021"></a><b>usage_generation</b>() </div> <div class="description"> <p> -The <a href="AbtUsage.html#M000036">usage</a> information for the +The <a href="AbtUsage.html#M000018">usage</a> information for the generation commands. </p> <p> @@ -262,8 +262,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000039_source')" id="l_M000039_source">show source</a> ]</p> - <div id="M000039_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000021_source')" id="l_M000021_source">show source</a> ]</p> + <div id="M000021_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtusage.rb, line 117</span> 117: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usage_generation</span> @@ -278,11 +278,11 @@ </div> <div class="method"> <div class="title"> - <a name="M000042"></a><b>usage_maintenance</b>() + <a name="M000024"></a><b>usage_maintenance</b>() </div> <div class="description"> <p> -The <a href="AbtUsage.html#M000036">usage</a> information for the +The <a href="AbtUsage.html#M000018">usage</a> information for the maintenance commands. </p> <p> @@ -290,8 +290,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000042_source')" id="l_M000042_source">show source</a> ]</p> - <div id="M000042_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000024_source')" id="l_M000024_source">show source</a> ]</p> + <div id="M000024_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtusage.rb, line 156</span> 156: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usage_maintenance</span> @@ -308,11 +308,11 @@ </div> <div class="method"> <div class="title"> - <a name="M000037"></a><b>usage_packages</b>() + <a name="M000019"></a><b>usage_packages</b>() </div> <div class="description"> <p> -The <a href="AbtUsage.html#M000036">usage</a> information for the packages +The <a href="AbtUsage.html#M000018">usage</a> information for the packages commands. </p> <p> @@ -320,8 +320,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000037_source')" id="l_M000037_source">show source</a> ]</p> - <div id="M000037_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000019_source')" id="l_M000019_source">show source</a> ]</p> + <div id="M000019_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtusage.rb, line 74</span> 74: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usage_packages</span> @@ -343,11 +343,11 @@ </div> <div class="method"> <div class="title"> - <a name="M000038"></a><b>usage_queries</b>() + <a name="M000020"></a><b>usage_queries</b>() </div> <div class="description"> <p> -The <a href="AbtUsage.html#M000036">usage</a> information for the query +The <a href="AbtUsage.html#M000018">usage</a> information for the query commands. </p> <p> @@ -355,8 +355,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000038_source')" id="l_M000038_source">show source</a> ]</p> - <div id="M000038_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000020_source')" id="l_M000020_source">show source</a> ]</p> + <div id="M000020_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtusage.rb, line 93</span> 93: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usage_queries</span> Modified: src/trunk/doc/created.rid =================================================================== --- src/trunk/doc/created.rid 2008-01-28 20:20:52 UTC (rev 500) +++ src/trunk/doc/created.rid 2008-01-28 20:22:05 UTC (rev 501) @@ -1 +1 @@ -Mon Jan 28 16:31:27 +0100 2008 +Mon, 28 Jan 2008 21:21:10 +0100 Modified: src/trunk/doc/dot/f_0.dot =================================================================== --- src/trunk/doc/dot/f_0.dot 2008-01-28 20:20:52 UTC (rev 500) +++ src/trunk/doc/dot/f_0.dot 2008-01-28 20:22:05 UTC (rev 501) @@ -13,14 +13,14 @@ subgraph cluster_1 { fontname = Arial color = red - label = "libs/abtdepengine.rb" - AbtDepEngine [ + label = "libs/abtdownloadmanager.rb" + AbtDownloadManager [ fontcolor = black, - URL = "classes/AbtDepEngine.html", + URL = "classes/AbtDownloadManager.html", shape = ellipse, color = palegoldenrod, style = filled, - label = "AbtDepEngine" + label = "AbtDownloadManager" ] } Modified: src/trunk/doc/dot/f_0.png =================================================================== (Binary files differ) Modified: src/trunk/doc/dot/f_1.dot =================================================================== --- src/trunk/doc/dot/f_1.dot 2008-01-28 20:20:52 UTC (rev 500) +++ src/trunk/doc/dot/f_1.dot 2008-01-28 20:22:05 UTC (rev 501) @@ -13,14 +13,14 @@ subgraph cluster_2 { fontname = Arial color = red - label = "libs/abtdownloadmanager.rb" - AbtDownloadManager [ + label = "libs/abtpackage.rb" + AbtPackage [ fontcolor = black, - URL = "classes/AbtDownloadManager.html", + URL = "classes/AbtPackage.html", shape = ellipse, color = palegoldenrod, style = filled, - label = "AbtDownloadManager" + label = "AbtPackage" ] } Modified: src/trunk/doc/dot/f_1.png =================================================================== (Binary files differ) Modified: src/trunk/doc/dot/f_2.dot =================================================================== --- src/trunk/doc/dot/f_2.dot 2008-01-28 20:20:52 UTC (rev 500) +++ src/trunk/doc/dot/f_2.dot 2008-01-28 20:22:05 UTC (rev 501) @@ -13,14 +13,14 @@ subgraph cluster_3 { fontname = Arial color = red - label = "libs/abtlogmanager.rb" - AbtLogManager [ + label = "libs/abtusage.rb" + AbtUsage [ fontcolor = black, - URL = "classes/AbtLogManager.html", + URL = "classes/AbtUsage.html", shape = ellipse, color = palegoldenrod, style = filled, - label = "AbtLogManager" + label = "AbtUsage" ] } Modified: src/trunk/doc/dot/f_2.png =================================================================== (Binary files differ) Modified: src/trunk/doc/files/libs/abtdownloadmanager_rb.html =================================================================== --- src/trunk/doc/files/libs/abtdownloadmanager_rb.html 2008-01-28 20:20:52 UTC (rev 500) +++ src/trunk/doc/files/libs/abtdownloadmanager_rb.html 2008-01-28 20:22:05 UTC (rev 501) @@ -63,7 +63,7 @@ </tr> <tr> <td>Modified:</td> - <td>Mon Jan 28 10:44:47 +0100 2008</td> + <td>Mon Jan 28 20:47:34 +0100 2008</td> </tr> </table> </td></tr> @@ -76,9 +76,9 @@ <div id="content"> <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center"> <map id="map" name="map"> - <area shape="rect" coords="27,50,160,98" href="../../classes/AbtDownloadManager.html" alt="AbtDownloadManager" /> + <area shape="rect" coords="29,51,176,99" href="../../classes/AbtDownloadManager.html" alt="AbtDownloadManager" /> </map> -<img src="../../dot/f_1.png" usemap="#map" border="0" alt="dot/f_1.png"> +<img src="../../dot/f_0.png" usemap="#map" border="0" alt="dot/f_0.png"> </td></tr></table> <div class="description"><p> Modified: src/trunk/doc/files/libs/abtpackage_rb.html =================================================================== --- src/trunk/doc/files/libs/abtpackage_rb.html 2008-01-28 20:20:52 UTC (rev 500) +++ src/trunk/doc/files/libs/abtpackage_rb.html 2008-01-28 20:22:05 UTC (rev 501) @@ -63,7 +63,7 @@ </tr> <tr> <td>Modified:</td> - <td>Mon Jan 28 10:32:29 +0100 2008</td> + <td>Mon Jan 28 20:02:03 +0100 2008</td> </tr> </table> </td></tr> @@ -76,9 +76,9 @@ <div id="content"> <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center"> <map id="map" name="map"> - <area shape="rect" coords="27,50,115,98" href="../../classes/AbtPackage.html" alt="AbtPackage" /> + <area shape="rect" coords="29,51,123,99" href="../../classes/AbtPackage.html" alt="AbtPackage" /> </map> -<img src="../../dot/f_3.png" usemap="#map" border="0" alt="dot/f_3.png"> +<img src="../../dot/f_1.png" usemap="#map" border="0" alt="dot/f_1.png"> </td></tr></table> <div class="description"><p> Modified: src/trunk/doc/files/libs/abtusage_rb.html =================================================================== --- src/trunk/doc/files/libs/abtusage_rb.html 2008-01-28 20:20:52 UTC (rev 500) +++ src/trunk/doc/files/libs/abtusage_rb.html 2008-01-28 20:22:05 UTC (rev 501) @@ -63,7 +63,7 @@ </tr> <tr> <td>Modified:</td> - <td>Mon Jan 28 16:01:51 +0100 2008</td> + <td>Mon Jan 28 20:02:03 +0100 2008</td> </tr> </table> </td></tr> @@ -76,9 +76,9 @@ <div id="content"> <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center"> <map id="map" name="map"> - <area shape="rect" coords="27,50,104,98" href="../../classes/AbtUsage.html" alt="AbtUsage" /> + <area shape="rect" coords="29,51,109,99" href="../../classes/AbtUsage.html" alt="AbtUsage" /> </map> -<img src="../../dot/f_8.png" usemap="#map" border="0" alt="dot/f_8.png"> +<img src="../../dot/f_2.png" usemap="#map" border="0" alt="dot/f_2.png"> </td></tr></table> <div class="description"><p> Modified: src/trunk/doc/fr_class_index.html =================================================================== --- src/trunk/doc/fr_class_index.html 2008-01-28 20:20:52 UTC (rev 500) +++ src/trunk/doc/fr_class_index.html 2008-01-28 20:22:05 UTC (rev 501) @@ -41,22 +41,8 @@ <body> <div class="banner">Classes</div> <div class="entries"> -<a href="classes/AbtDepEngine.html">AbtDepEngine</a><br> <a href="classes/AbtDownloadManager.html">AbtDownloadManager</a><br> -<a href="classes/AbtLogManager.html">AbtLogManager</a><br> <a href="classes/AbtPackage.html">AbtPackage</a><br> -<a href="classes/AbtPackageManager.html">AbtPackageManager</a><br> -<a href="classes/AbtQueueManager.html">AbtQueueManager</a><br> -<a href="classes/AbtReportManager.html">AbtReportManager</a><br> -<a href="classes/AbtSystemManager.html">AbtSystemManager</a><br> <a href="classes/AbtUsage.html">AbtUsage</a><br> -<a href="classes/TestAbtDepEngine.html">TestAbtDepEngine</a><br> -<a href="classes/TestAbtDownloadManager.html">TestAbtDownloadManager</a><br> -<a href="classes/TestAbtLogManager.html">TestAbtLogManager</a><br> -<a href="classes/TestAbtPackage.html">TestAbtPackage</a><br> -<a href="classes/TestAbtPackageManager.html">TestAbtPackageManager</a><br> -<a href="classes/TestAbtQueueManager.html">TestAbtQueueManager</a><br> -<a href="classes/TestAbtReportManager.html">TestAbtReportManager</a><br> -<a href="classes/TestAbtSystemManager.html">TestAbtSystemManager</a><br> </div> </body></html> \ No newline at end of file Modified: src/trunk/doc/fr_file_index.html =================================================================== --- src/trunk/doc/fr_file_index.html 2008-01-28 20:20:52 UTC (rev 500) +++ src/trunk/doc/fr_file_index.html 2008-01-28 20:22:05 UTC (rev 501) @@ -41,22 +41,8 @@ <body> <div class="banner">Files</div> <div class="entries"> -<a href="files/libs/abtdepengine_rb.html">libs/abtdepengine.rb</a><br> <a href="files/libs/abtdownloadmanager_rb.html">libs/abtdownloadmanager.rb</a><br> -<a href="files/libs/abtlogmanager_rb.html">libs/abtlogmanager.rb</a><br> <a href="files/libs/abtpackage_rb.html">libs/abtpackage.rb</a><br> -<a href="files/libs/abtpackagemanager_rb.html">libs/abtpackagemanager.rb</a><br> -<a href="files/libs/abtqueuemanager_rb.html">libs/abtqueuemanager.rb</a><br> -<a href="files/libs/abtreportmanager_rb.html">libs/abtreportmanager.rb</a><br> -<a href="files/libs/abtsystemmanager_rb.html">libs/abtsystemmanager.rb</a><br> <a href="files/libs/abtusage_rb.html">libs/abtusage.rb</a><br> -<a href="files/tests/testabtdepengine_rb.html">tests/testabtdepengine.rb</a><br> -<a href="files/tests/testabtdownloadmanager_rb.html">tests/testabtdownloadmanager.rb</a><br> -<a href="files/tests/testabtlogmanager_rb.html">tests/testabtlogmanager.rb</a><br> -<a href="files/tests/testabtpackage_rb.html">tests/testabtpackage.rb</a><br> -<a href="files/tests/testabtpackagemanager_rb.html">tests/testabtpackagemanager.rb</a><br> -<a href="files/tests/testabtqueuemanager_rb.html">tests/testabtqueuemanager.rb</a><br> -<a href="files/tests/testabtreportmanager_rb.html">tests/testabtreportmanager.rb</a><br> -<a href="files/tests/testabtsystemmanager_rb.html">tests/testabtsystemmanager.rb</a><br> </div> </body></html> \ No newline at end of file Modified: src/trunk/doc/fr_method_index.html =================================================================== --- src/trunk/doc/fr_method_index.html 2008-01-28 20:20:52 UTC (rev 500) +++ src/trunk/doc/fr_method_index.html 2008-01-28 20:22:05 UTC (rev 501) @@ -41,128 +41,29 @@ <body> <div class="banner">Methods</div> <div class="entries"> -<a href="classes/AbtQueueManager.html#M000092">action_package_queue (AbtQueueManager)</a><br> -<a href="classes/AbtPackage.html#M000031">build (AbtPackage)</a><br> -<a href="classes/AbtPackageManager.html#M000049">cache_package (AbtPackageManager)</a><br> -<a href="classes/AbtSystemManager.html#M000002">cleanup_package_sources (AbtSystemManager)</a><br> -<a href="classes/AbtPackage.html#M000030">configure (AbtPackage)</a><br> -<a href="classes/AbtPackage.html#M000028">details (AbtPackage)</a><br> -<a href="classes/AbtSystemManager.html#M000007">fix_package (AbtSystemManager)</a><br> -<a href="classes/AbtPackageManager.html#M000047">freeze_package (AbtPackageManager)</a><br> -<a href="classes/AbtReportManager.html#M000123">generate_HTML_package_listing (AbtReportManager)</a><br> -<a href="classes/AbtLogManager.html#M000064">get_log (AbtLogManager)</a><br> -<a href="classes/AbtPackage.html#M000033">install (AbtPackage)</a><br> -<a href="classes/AbtPackageManager.html#M000044">install_package (AbtPackageManager)</a><br> -<a href="classes/AbtLogManager.html#M000068">log_package_build (AbtLogManager)</a><br> -<a href="classes/AbtLogManager.html#M000067">log_package_install (AbtLogManager)</a><br> -<a href="classes/AbtLogManager.html#M000066">log_package_integrity (AbtLogManager)</a><br> -<a href="classes/AbtPackage.html#M000027">new (AbtPackage)</a><br> -<a href="classes/AbtReportManager.html#M000111">new (AbtReportManager)</a><br> -<a href="classes/AbtDepEngine.html#M000093">new (AbtDepEngine)</a><br> -<a href="classes/AbtQueueManager.html#M000091">new (AbtQueueManager)</a><br> -<a href="classes/AbtLogManager.html#M000065">new (AbtLogManager)</a><br> -<a href="classes/AbtPackageManager.html#M000043">new (AbtPackageManager)</a><br> -<a href="classes/AbtSystemManager.html#M000001">new (AbtSystemManager)</a><br> -<a href="classes/AbtDownloadManager.html#M000012">new (AbtDownloadManager)</a><br> -<a href="classes/AbtSystemManager.html#M000011">package_frozen (AbtSystemManager)</a><br> -<a href="classes/AbtSystemManager.html#M000010">package_installed (AbtSystemManager)</a><br> -<a href="classes/AbtPackage.html#M000034">post (AbtPackage)</a><br> -<a href="classes/AbtPackage.html#M000029">pre (AbtPackage)</a><br> -<a href="classes/AbtPackage.html#M000032">preinstall (AbtPackage)</a><br> -<a href="classes/AbtPackageManager.html#M000045">reinstall_package (AbtPackageManager)</a><br> -<a href="classes/AbtPackage.html#M000035">remove_build (AbtPackage)</a><br> -<a href="classes/AbtPackageManager.html#M000046">remove_package (AbtPackageManager)</a><br> -<a href="classes/AbtDownloadManager.html#M000015">retrieve_news_feed (AbtDownloadManager)</a><br> -<a href="classes/AbtDownloadManager.html#M000013">retrieve_package_source (AbtDownloadManager)</a><br> -<a href="classes/AbtDownloadManager.html#M000014">retrieve_package_tree (AbtDownloadManager)</a><br> -<a href="classes/AbtPackageManager.html#M000048">root_login (AbtPackageManager)</a><br> -<a href="classes/AbtReportManager.html#M000120">search_package_descriptions (AbtReportManager)</a><br> -<a href="classes/AbtSystemManager.html#M000008">set_central_repo (AbtSystemManager)</a><br> -<a href="classes/AbtSystemManager.html#M000009">set_package_tree_location (AbtSystemManager)</a><br> -<a href="classes/TestAbtReportManager.html#M000050">setup (TestAbtReportManager)</a><br> -<a href="classes/TestAbtLogManager.html#M000106">setup (TestAbtLogManager)</a><br> -<a href="classes/TestAbtSystemManager.html#M000069">setup (TestAbtSystemManager)</a><br> -<a href="classes/TestAbtDownloadManager.html#M000083">setup (TestAbtDownloadManager)</a><br> -<a href="classes/TestAbtQueueManager.html#M000080">setup (TestAbtQueueManager)</a><br> -<a href="classes/TestAbtPackageManager.html#M000019">setup (TestAbtPackageManager)</a><br> -<a href="classes/TestAbtDepEngine.html#M000103">setup (TestAbtDepEngine)</a><br> -<a href="classes/TestAbtPackage.html#M000094">setup (TestAbtPackage)</a><br> -<a href="classes/AbtReportManager.html#M000119">show_file_owner (AbtReportManager)</a><br> -<a href="classes/AbtReportManager.html#M000115">show_frozen_packages (AbtReportManager)</a><br> -<a href="classes/AbtReportManager.html#M000113">show_installed_packages (AbtReportManager)</a><br> -<a href="classes/AbtReportManager.html#M000118">show_journal (AbtReportManager)</a><br> -<a href="classes/AbtReportManager.html#M000116">show_package_dependencies (AbtReportManager)</a><br> -<a href="classes/AbtReportManager.html#M000112">show_package_details (AbtReportManager)</a><br> -<a href="classes/AbtReportManager.html#M000114">show_package_log (AbtReportManager)</a><br> -<a href="classes/AbtReportManager.html#M000121">show_queue (AbtReportManager)</a><br> -<a href="classes/AbtReportManager.html#M000117">show_untracked_files (AbtReportManager)</a><br> -<a href="classes/AbtReportManager.html#M000122">show_updates (AbtReportManager)</a><br> -<a href="classes/TestAbtPackage.html#M000095">teardown (TestAbtPackage)</a><br> -<a href="classes/TestAbtDownloadManager.html#M000084">teardown (TestAbtDownloadManager)</a><br> -<a href="classes/TestAbtReportManager.html#M000051">teardown (TestAbtReportManager)</a><br> -<a href="classes/TestAbtPackageManager.html#M000020">teardown (TestAbtPackageManager)</a><br> -<a href="classes/TestAbtQueueManager.html#M000081">teardown (TestAbtQueueManager)</a><br> -<a href="classes/TestAbtDepEngine.html#M000104">teardown (TestAbtDepEngine)</a><br> -<a href="classes/TestAbtSystemManager.html#M000070">teardown (TestAbtSystemManager)</a><br> -<a href="classes/TestAbtLogManager.html#M000107">teardown (TestAbtLogManager)</a><br> -<a href="classes/TestAbtQueueManager.html#M000082">test_action_package_queue (TestAbtQueueManager)</a><br> -<a href="classes/TestAbtPackage.html#M000099">test_build (TestAbtPackage)</a><br> -<a href="classes/TestAbtPackageManager.html#M000025">test_cache_package (TestAbtPackageManager)</a><br> -<a href="classes/TestAbtSystemManager.html#M000071">test_cleanup_package_sources (TestAbtSystemManager)</a><br> -<a href="classes/TestAbtPackage.html#M000098">test_configure (TestAbtPackage)</a><br> -<a href="classes/TestAbtDepEngine.html#M000105">test_dep_engine (TestAbtDepEngine)</a><br> -<a href="classes/TestAbtPackage.html#M000096">test_details (TestAbtPackage)</a><br> -<a href="classes/TestAbtSystemManager.html#M000076">test_fix_package (TestAbtSystemManager)</a><br> -<a href="classes/TestAbtPackageManager.html#M000024">test_freeze_package (TestAbtPackageManager)</a><br> -<a href="classes/TestAbtReportManager.html#M000062">test_generate_HTML_package_listing (TestAbtReportManager)</a><br> -<a href="classes/TestAbtPackage.html#M000101">test_install (TestAbtPackage)</a><br> -<a href="classes/TestAbtPackageManager.html#M000021">test_install_package (TestAbtPackageManager)</a><br> -<a href="classes/TestAbtLogManager.html#M000110">test_log_package_build (TestAbtLogManager)</a><br> -<a href="classes/TestAbtLogManager.html#M000109">test_log_package_install (TestAbtLogManager)</a><br> -<a href="classes/TestAbtLogManager.html#M000108">test_log_package_integrity (TestAbtLogManager)</a><br> -<a href="classes/TestAbtSystemManager.html#M000079">test_package_installed (TestAbtSystemManager)</a><br> -<a href="classes/TestAbtPackage.html#M000102">test_post (TestAbtPackage)</a><br> -<a href="classes/TestAbtPackage.html#M000097">test_pre (TestAbtPackage)</a><br> -<a href="classes/TestAbtPackage.html#M000100">test_preinstall (TestAbtPackage)</a><br> -<a href="classes/TestAbtPackageManager.html#M000022">test_reinstall_package (TestAbtPackageManager)</a><br> -<a href="classes/TestAbtPackageManager.html#M000023">test_remove_package (TestAbtPackageManager)</a><br> -<a href="classes/TestAbtDownloadManager.html#M000087">test_retrieve_news_feed (TestAbtDownloadManager)</a><br> -<a href="classes/TestAbtDownloadManager.html#M000085">test_retrieve_package_source (TestAbtDownloadManager)</a><br> -<a href="classes/TestAbtDownloadManager.html#M000086">test_retrieve_package_tree (TestAbtDownloadManager)</a><br> -<a href="classes/TestAbtReportManager.html#M000059">test_search_package_descriptions (TestAbtReportManager)</a><br> -<a href="classes/TestAbtSystemManager.html#M000077">test_set_central_repo (TestAbtSystemManager)</a><br> -<a href="classes/TestAbtSystemManager.html#M000078">test_set_package_tree_location (TestAbtSystemManager)</a><br> -<a href="classes/TestAbtReportManager.html#M000058">test_show_file_owner (TestAbtReportManager)</a><br> -<a href="classes/TestAbtReportManager.html#M000055">test_show_frozen_packages (TestAbtReportManager)</a><br> -<a href="classes/TestAbtReportManager.html#M000053">test_show_installed_packages (TestAbtReportManager)</a><br> -<a href="classes/TestAbtReportManager.html#M000057">test_show_journal (TestAbtReportManager)</a><br> -<a href="classes/TestAbtReportManager.html#M000063">test_show_package_dependencies (TestAbtReportManager)</a><br> -<a href="classes/TestAbtReportManager.html#M000052">test_show_package_details (TestAbtReportManager)</a><br> -<a href="classes/TestAbtReportManager.html#M000054">test_show_package_log (TestAbtReportManager)</a><br> -<a href="classes/TestAbtReportManager.html#M000060">test_show_queue (TestAbtReportManager)</a><br> -<a href="classes/TestAbtReportManager.html#M000056">test_show_untracked_files (TestAbtReportManager)</a><br> -<a href="classes/TestAbtReportManager.html#M000061">test_show_updates (TestAbtReportManager)</a><br> -<a href="classes/TestAbtDownloadManager.html#M000088">test_update_package (TestAbtDownloadManager)</a><br> -<a href="classes/TestAbtDownloadManager.html#M000089">test_update_package_tree (TestAbtDownloadManager)</a><br> -<a href="classes/TestAbtDownloadManager.html#M000090">test_validated (TestAbtDownloadManager)</a><br> -<a href="classes/TestAbtSystemManager.html#M000072">test_verify_installed_files (TestAbtSystemManager)</a><br> -<a href="classes/TestAbtSystemManager.html#M000074">test_verify_package_depends (TestAbtSystemManager)</a><br> -<a href="classes/TestAbtSystemManager.html#M000075">test_verify_package_integrity (TestAbtSystemManager)</a><br> -<a href="classes/TestAbtSystemManager.html#M000073">test_verify_symlinks (TestAbtSystemManager)</a><br> -<a href="classes/AbtPackage.html#M000026">unpack_sources (AbtPackage)</a><br> -<a href="classes/AbtDownloadManager.html#M000016">update_package (AbtDownloadManager)</a><br> -<a href="classes/AbtDownloadManager.html#M000017">update_package_tree (AbtDownloadManager)</a><br> -<a href="classes/AbtUsage.html#M000036">usage (AbtUsage)</a><br> -<a href="classes/AbtUsage.html#M000040">usage_downloads (AbtUsage)</a><br> -<a href="classes/AbtUsage.html#M000041">usage_fix (AbtUsage)</a><br> -<a href="classes/AbtUsage.html#M000039">usage_generation (AbtUsage)</a><br> -<a href="classes/AbtUsage.html#M000042">usage_maintenance (AbtUsage)</a><br> -<a href="classes/AbtUsage.html#M000037">usage_packages (AbtUsage)</a><br> -<a href="classes/AbtUsage.html#M000038">usage_queries (AbtUsage)</a><br> -<a href="classes/AbtDownloadManager.html#M000018">validated (AbtDownloadManager)</a><br> -<a href="classes/AbtSystemManager.html#M000003">verify_installed_files (AbtSystemManager)</a><br> -<a href="classes/AbtSystemManager.html#M000005">verify_package_depends (AbtSystemManager)</a><br> -<a href="classes/AbtSystemManager.html#M000006">verify_package_integrity (AbtSystemManager)</a><br> -<a href="classes/AbtSystemManager.html#M000004">verify_symlinks (AbtSystemManager)</a><br> +<a href="classes/AbtPackage.html#M000013">build (AbtPackage)</a><br> +<a href="classes/AbtPackage.html#M000012">configure (AbtPackage)</a><br> +<a href="classes/AbtPackage.html#M000010">details (AbtPackage)</a><br> +<a href="classes/AbtPackage.html#M000015">install (AbtPackage)</a><br> +<a href="classes/AbtDownloadManager.html#M000001">new (AbtDownloadManager)</a><br> +<a href="classes/AbtPackage.html#M000009">new (AbtPackage)</a><br> +<a href="classes/AbtPackage.html#M000016">post (AbtPackage)</a><br> +<a href="classes/AbtPackage.html#M000011">pre (AbtPackage)</a><br> +<a href="classes/AbtPackage.html#M000014">preinstall (AbtPackage)</a><br> +<a href="classes/AbtPackage.html#M000017">remove_build (AbtPackage)</a><br> +<a href="classes/AbtDownloadManager.html#M000004">retrieve_news_feed (AbtDownloadManager)</a><br> +<a href="classes/AbtDownloadManager.html#M000002">retrieve_package_source (AbtDownloadManager)</a><br> +<a href="classes/AbtDownloadManager.html#M000003">retrieve_package_tree (AbtDownloadManager)</a><br> +<a href="classes/AbtPackage.html#M000008">unpack_sources (AbtPackage)</a><br> +<a href="classes/AbtDownloadManager.html#M000005">update_package (AbtDownloadManager)</a><br> +<a href="classes/AbtDownloadManager.html#M000006">update_package_tree (AbtDownloadManager)</a><br> +<a href="classes/AbtUsage.html#M000018">usage (AbtUsage)</a><br> +<a href="classes/AbtUsage.html#M000022">usage_downloads (AbtUsage)</a><br> +<a href="classes/AbtUsage.html#M000023">usage_fix (AbtUsage)</a><br> +<a href="classes/AbtUsage.html#M000021">usage_generation (AbtUsage)</a><br> +<a href="classes/AbtUsage.html#M000024">usage_maintenance (AbtUsage)</a><br> +<a href="classes/AbtUsage.html#M000019">usage_packages (AbtUsage)</a><br> +<a href="classes/AbtUsage.html#M000020">usage_queries (AbtUsage)</a><br> +<a href="classes/AbtDownloadManager.html#M000007">validated (AbtDownloadManager)</a><br> </div> </body></html> \ No newline at end of file Modified: src/trunk/doc/index.html =================================================================== --- src/trunk/doc/index.html 2008-01-28 20:20:52 UTC (rev 500) +++ src/trunk/doc/index.html 2008-01-28 20:22:05 UTC (rev 501) @@ -14,7 +14,7 @@ <frame src="fr_class_index.html" name="Classes" /> <frame src="fr_method_index.html" name="Methods" /> </frameset> - <frame src="classes/AbtPackageManager.html" name="docwin"> + <frame src="files/libs/abtdownloadmanager_rb.html" name="docwin"> <noframes> <body bgcolor="white"> Click <a href="html/index.html">here</a> for a non-frames This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-28 20:20:48
|
Revision: 500 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=500&view=rev Author: eschabell Date: 2008-01-28 12:20:52 -0800 (Mon, 28 Jan 2008) Log Message: ----------- Tagging this version 0.2! Added Paths: ----------- src/tags/abt-0.2/ Copied: src/tags/abt-0.2 (from rev 499, src/trunk) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-28 20:19:15
|
Revision: 499 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=499&view=rev Author: eschabell Date: 2008-01-28 12:19:18 -0800 (Mon, 28 Jan 2008) Log Message: ----------- Uping version to 0.2, we are on the way. Modified Paths: -------------- src/trunk/abtconfig.rb Modified: src/trunk/abtconfig.rb =================================================================== --- src/trunk/abtconfig.rb 2008-01-28 20:13:07 UTC (rev 498) +++ src/trunk/abtconfig.rb 2008-01-28 20:19:18 UTC (rev 499) @@ -61,7 +61,7 @@ # default config options. # -$ABT_VERSION = "0.1" +$ABT_VERSION = "0.2" $BUILD_ARCHITECTURE = "i686" $BUILD_OPTIMIZATIONS = "strip" $REMOVE_BUILD_SOURCES = true This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-28 20:13:08
|
Revision: 498 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=498&view=rev Author: eschabell Date: 2008-01-28 12:13:07 -0800 (Mon, 28 Jan 2008) Log Message: ----------- Started creating deps for abt, this package is needed. Added Paths: ----------- src/trunk/packages/checkinstall.rb Added: src/trunk/packages/checkinstall.rb =================================================================== --- src/trunk/packages/checkinstall.rb (rev 0) +++ src/trunk/packages/checkinstall.rb 2008-01-28 20:13:07 UTC (rev 498) @@ -0,0 +1,133 @@ +#!/usr/bin/ruby -w + +$LOAD_PATH.unshift '/var/lib/abt/' + +require 'abtpackage' + +## +# checkinstall.rb +# +# Checkinstall package. +# +# Created by Eric D. Schabell <er...@ab...> +# Copyright 2006, GPL. +# +# This file is part of AbTLinux. +# +# AbTLinux is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# AbTLinux is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along with +# AbTLinux; if not, write to the Free Software Foundation, Inc., 51 Franklin +# St, Fifth Floor, Boston, MA 02110-1301 USA +## + +class Checkinstall < AbtPackage + +protected + +private + + $name = "Checkinstall" + $version = "1.6.1" + $srcDir = "#{$name.downcase}-#{$version}" + $srcFile = "#{$srcDir}.tgz" + $packageData = { + 'name' => $name, + 'execName' => $name.downcase, + 'version' => $version, + 'srcDir' => $srcDir, + 'homepage' => "http://asic-linux.com.mx/~izto/checkinstall", + 'srcUrl' => "http://asic-linux.com.mx/~izto/checkinstall/files/source/#{$srcFile}", + 'dependsOn' => "gettext", + 'reliesOn' => "", + 'optionalDO' => "", + 'optionalRO' => "", + 'hashCheck' => "3b52f4ccb999522776e9874472c2eef91563e822", + 'patches' => "", + 'patchesHashCheck' => "", + 'mirrorPath' => "", + 'license' => "GPL2", + 'description' => + "Installs a compiled program from the program's source directory + using 'make install' or any other command supplied on + checkinstall's command line. Includes installwatch program." + } + + +public + + ## + # Constructor for an AbtPackage, requires all the packge details. + # + # <b>PARAM</b> <i>Hash</i> - hash containing all pacakge data. + # + ## + def initialize() + super($packageData) + end + + ## + # Override configure by returning true, none needed. + # + # <b>PARAM</b> <i>boolean</i> - true if you want to see the verbose output, + # otherwise false. Defaults to true. + # + # <b>RETURNS:</b> <i>boolean</i> - True always. + ## + def configure(verbose=true) + return true + end + + ## + # All files to be installed are installed here, note without installwatch, + # as we are installing it! + # + # <b>PARAM</b> <i>boolean</i> - true if you want to see the verbose output, + # otherwise false. Defaults to true. + # + # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, + # otherwise false. + ## + def install(verbose=true) + if (verbose) + command = "make install" + else + command = "make install >/dev/null" + end + + Dir.chdir("#{$BUILD_LOCATION}/#{@srcDir}") + + if !system(command) + puts "[AbtPackage.install] - pre-install section failed, exit code was #{$?.exitstatus}." + return false + end + + if (verbose) + command = "installwatch --transl=no --backup=no " + + "--exclude=/dev,/proc,/tmp,/var/tmp,/usr/src,/sys " + + "--logfile=#{$ABT_TMP}/#{@srcDir}.watch make install" + else + command = "installwatch --transl=no --backup=no " + + "--exclude=/dev,/proc,/tmp,/var/tmp,/usr/src,/sys " + + "--logfile=#{$ABT_TMP}/#{@srcDir}.watch make install >/dev/null" + end + + Dir.chdir("#{$BUILD_LOCATION}/#{@srcDir}") + + if !system(command) + puts "[AbtPackage.install] - install section failed, exit code was #{$?.exitstatus}." + return false + end + + puts "[AbtPackage.install] - install section completed, exit code was #{$?.exitstatus}!" if (verbose) + return true + end +end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-28 20:12:12
|
Revision: 497 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=497&view=rev Author: eschabell Date: 2008-01-28 12:12:11 -0800 (Mon, 28 Jan 2008) Log Message: ----------- Refactored logging of failed hash checks, now dumping conflicting values to journal. Modified Paths: -------------- src/trunk/libs/abtdownloadmanager.rb Modified: src/trunk/libs/abtdownloadmanager.rb =================================================================== --- src/trunk/libs/abtdownloadmanager.rb 2008-01-28 19:36:02 UTC (rev 496) +++ src/trunk/libs/abtdownloadmanager.rb 2008-01-28 20:12:11 UTC (rev 497) @@ -252,7 +252,9 @@ end puts "Source hash failed validation..." - logger.info("Validating sources failed...") + logger.error("Validating sources failed...") + logger.error(" expected: #{hashvalue}") + logger.error(" computed: #{Digest::SHA1.hexdigest(path)}") return false end end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-28 19:36:02
|
Revision: 496 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=496&view=rev Author: eschabell Date: 2008-01-28 11:36:02 -0800 (Mon, 28 Jan 2008) Log Message: ----------- Added another rather crucial dependency for using abt, this check is required. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2008-01-28 15:40:27 UTC (rev 495) +++ src/trunk/abt.rb 2008-01-28 19:36:02 UTC (rev 496) @@ -25,6 +25,14 @@ # St, Fifth Floor, Boston, MA 02110-1301 USA ## +## +## NOTE: some dependencies; checkinstall. +## +if !File.exists? "/usr/bin/installwatch" + puts "\n\nUnable to run without installwatch, install checkinstall package first." + exit +end + # Check and install our library files. # $DEFAULT_PREFIX = "/usr/local" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-28 15:40:22
|
Revision: 495 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=495&view=rev Author: eschabell Date: 2008-01-28 07:40:27 -0800 (Mon, 28 Jan 2008) Log Message: ----------- Regenerated api docs. Modified Paths: -------------- src/trunk/doc/classes/AbtUsage.html src/trunk/doc/created.rid src/trunk/doc/files/libs/abtusage_rb.html Modified: src/trunk/doc/classes/AbtUsage.html =================================================================== --- src/trunk/doc/classes/AbtUsage.html 2008-01-28 15:39:29 UTC (rev 494) +++ src/trunk/doc/classes/AbtUsage.html 2008-01-28 15:40:27 UTC (rev 495) @@ -206,13 +206,13 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000040_source')" id="l_M000040_source">show source</a> ]</p> <div id="M000040_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtusage.rb, line 130</span> -130: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usage_downloads</span> -131: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\ndownloads:"</span> -132: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" -d, download [package]\t\tRetrieve given package sources."</span> -133: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" -u, update [package]|[tree]\tUpdate given package or tree from AbTLinux repository."</span> -134: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" -n, news\t\t\t\tDisplays newsfeeds from AbTLinux website.\n"</span> -135: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtusage.rb, line 129</span> +129: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usage_downloads</span> +130: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\ndownloads:"</span> +131: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" -d, download [package]\t\tRetrieve given package sources."</span> +132: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" -u, update [package]|[tree]\tUpdate given package or tree from AbTLinux repository."</span> +133: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" -n, news\t\t\t\tDisplays newsfeeds from AbTLinux website.\n"</span> +134: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -234,16 +234,16 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000041_source')" id="l_M000041_source">show source</a> ]</p> <div id="M000041_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtusage.rb, line 142</span> -142: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usage_fix</span> -143: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\nfix:"</span> -144: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" purge-src\t\t\t\tRemove source caches for packages no longer installed."</span> -145: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" verify-files [package]\t\tInstalled files are verified for given package."</span> -146: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" verify-symlinks [package]\t\tSymlinks verified for given package."</span> -147: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" verify-deps [package]\t\tDependency tree is verified for given package."</span> -148: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" verify-integrity [package]\t\tVerify integrity of installed files for given package."</span> -149: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" fix [package]\t\tGiven package is verified and fixed if needed.\n"</span> -150: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtusage.rb, line 141</span> +141: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usage_fix</span> +142: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\nfix:"</span> +143: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" purge-src\t\t\t\tRemove source caches for packages no longer installed."</span> +144: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" verify-files [package]\t\tInstalled files are verified for given package."</span> +145: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" verify-symlinks [package]\t\tSymlinks verified for given package."</span> +146: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" verify-deps [package]\t\tDependency tree is verified for given package."</span> +147: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" verify-integrity [package]\t\tVerify integrity of installed files for given package."</span> +148: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" fix [package]\t\tGiven package is verified and fixed if needed.\n"</span> +149: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -265,13 +265,13 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000039_source')" id="l_M000039_source">show source</a> ]</p> <div id="M000039_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtusage.rb, line 118</span> -118: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usage_generation</span> -119: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\ngeneration:"</span> -120: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-updates\t\tShow a package listing with available update versions."</span> -121: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" html\t\t\tGenerate HTML page from installed packages:"</span> -122: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" \t\t\t\t(package name with hyperlink to package website and version installed)\n"</span> -123: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtusage.rb, line 117</span> +117: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usage_generation</span> +118: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\ngeneration:"</span> +119: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-updates\t\tShow a package listing with available update versions."</span> +120: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" html\t\t\tGenerate HTML page from installed packages:"</span> +121: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" \t\t\t\t(package name with hyperlink to package website and version installed)\n"</span> +122: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -293,15 +293,15 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000042_source')" id="l_M000042_source">show source</a> ]</p> <div id="M000042_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtusage.rb, line 157</span> -157: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usage_maintenance</span> -158: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\nmaintenance:"</span> -159: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" build-location [host]\t\tSets global location (default: localhost) for retrieving cached package builds."</span> -160: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" package-repo [add|remove|list] [URI]"</span> -161: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" add - add package repository."</span> -162: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" remove - remove a package repository."</span> -163: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" list - display current repository listing.\n"</span> -164: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtusage.rb, line 156</span> +156: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usage_maintenance</span> +157: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\nmaintenance:"</span> +158: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" build-location [host]\t\tSets global location (default: localhost) for retrieving cached package builds."</span> +159: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" package-repo [add|remove|list] [URI]"</span> +160: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" add - add package repository."</span> +161: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" remove - remove a package repository."</span> +162: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" list - display current repository listing.\n"</span> +163: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -376,8 +376,7 @@ 107: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-untracked\t\t\tShow all files on system not tracked by AbTLinux."</span> 108: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-journal\t\t\t\tShow the system journal."</span> 109: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-iqueue\t\t\t\tShow the contents of the install queue."</span> -110: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-patches\t\t\t\tShow the current available patches for installed package tree.\n"</span> -111: <span class="ruby-keyword kw">end</span> +110: <span class="ruby-keyword kw">end</span> </pre> </div> </div> Modified: src/trunk/doc/created.rid =================================================================== --- src/trunk/doc/created.rid 2008-01-28 15:39:29 UTC (rev 494) +++ src/trunk/doc/created.rid 2008-01-28 15:40:27 UTC (rev 495) @@ -1 +1 @@ -Mon Jan 28 10:51:42 +0100 2008 +Mon Jan 28 16:31:27 +0100 2008 Modified: src/trunk/doc/files/libs/abtusage_rb.html =================================================================== --- src/trunk/doc/files/libs/abtusage_rb.html 2008-01-28 15:39:29 UTC (rev 494) +++ src/trunk/doc/files/libs/abtusage_rb.html 2008-01-28 15:40:27 UTC (rev 495) @@ -63,7 +63,7 @@ </tr> <tr> <td>Modified:</td> - <td>Mon Jan 28 10:18:13 +0100 2008</td> + <td>Mon Jan 28 16:01:51 +0100 2008</td> </tr> </table> </td></tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-28 15:39:24
|
Revision: 494 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=494&view=rev Author: eschabell Date: 2008-01-28 07:39:29 -0800 (Mon, 28 Jan 2008) Log Message: ----------- Removed an old feature to show patches (from arch as repo idea time). Furthermore, added solution to running abt -h as non-root user, failing on missing logging permissions. Modified Paths: -------------- src/trunk/abt.rb src/trunk/libs/abtusage.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2008-01-28 10:00:50 UTC (rev 493) +++ src/trunk/abt.rb 2008-01-28 15:39:29 UTC (rev 494) @@ -83,15 +83,16 @@ system("svn export #{$ABTLINUX_MAIN_CONFIG} #{configfile}") end + # should be installed, load config. + $LOAD_PATH.unshift "#{$DEFAULT_PREFIX}/etc/abt/" + load 'abtconfig.rb' + if File.exist?("#{$DEFAULT_PREFIX}/etc/abt/local/localconfig.rb") $LOAD_PATH.unshift maxconfigpath load 'localconfig.rb' end end -# should be installed, load config. -$LOAD_PATH.unshift "#{$DEFAULT_PREFIX}/etc/abt/" -load 'abtconfig.rb' # Check for missing default packages path, if needed install them. # @@ -111,6 +112,23 @@ system("svn --force export #{$ABTLINUX_PACKAGES} #{$PACKAGE_PATH}") end +# Chick for missing logging paths, if needed install them. +# +if (!File.directory?($ABT_LOGS) || (Dir.entries($ABT_LOGS) - ['.', '..']).empty?) + puts "\nMissing our main logging directory at #{$ABT_LOGS}" + puts "Maybe time for an abt update? Let us try to fix it for you!" + + # check for root login. + if (Process.uid != 0) + puts "\nMust be root to fix missing logging paths." + exit + else + initializeAllAbtlinuxPaths = AbtLogManager.new + puts "\nCreated missing logging paths: #{$ABT_LOGS} and other general paths." + puts "\n\n" + end +end + ## # Setup needed classes and get ready to parse arguments. ## @@ -120,12 +138,7 @@ system = AbtSystemManager.new options = Hash.new show = AbtUsage.new -myLogger = AbtLogManager.new # initializes all ABT directories if missing. -# setup timestamp. -logger = Logger.new($JOURNAL) # initializes all needed paths. -logger.datetime_format = "%Y-%m-%d %H:%M:%S " - # deal with usage request. if (ARGV.length == 0 || (ARGV.length == 1 && (ARGV[0] == '--help' || ARGV[0] == '-h' || ARGV[0].downcase == 'help'))) show.usage("all") @@ -135,6 +148,14 @@ # login as root for the rest. manager.root_login(ARGV) +# this initializes all needed ABT directories if missing. +myLogger = AbtLogManager.new + +# setup timestamp. +logger = Logger.new($JOURNAL) # initializes all needed paths. +logger.datetime_format = "%Y-%m-%d %H:%M:%S " + + # And loading local file if found. if File.exist?("#{$DEFAULT_PREFIX}/etc/abt/local/localconfig.rb") load "#{$DEFAULT_PREFIX}/etc/abt/local/localconfig.rb" @@ -456,11 +477,6 @@ when "show-iqueue" reporter.show_queue("install") -when "show-patches" - # FIXME : show patches implementation. - puts "Display currently available patches for installed package tree." - show.usage("queries") - when "show-updates" # FIXME : show updates implementation. puts "Display package listing with available update versions." Modified: src/trunk/libs/abtusage.rb =================================================================== --- src/trunk/libs/abtusage.rb 2008-01-28 10:00:50 UTC (rev 493) +++ src/trunk/libs/abtusage.rb 2008-01-28 15:39:29 UTC (rev 494) @@ -107,7 +107,6 @@ puts " show-untracked\t\t\tShow all files on system not tracked by AbTLinux." puts " show-journal\t\t\t\tShow the system journal." puts " show-iqueue\t\t\t\tShow the contents of the install queue." - puts " show-patches\t\t\t\tShow the current available patches for installed package tree.\n" end ## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-28 10:00:51
|
Revision: 493 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=493&view=rev Author: eschabell Date: 2008-01-28 02:00:50 -0800 (Mon, 28 Jan 2008) Log Message: ----------- Regenerated api docs. Modified Paths: -------------- src/trunk/doc/classes/AbtDownloadManager.html src/trunk/doc/classes/AbtLogManager.html src/trunk/doc/classes/AbtPackage.html src/trunk/doc/created.rid src/trunk/doc/dot/f_0.dot src/trunk/doc/dot/f_0.png src/trunk/doc/dot/f_1.dot src/trunk/doc/dot/f_1.png src/trunk/doc/dot/f_2.dot src/trunk/doc/dot/f_2.png src/trunk/doc/files/libs/abtdepengine_rb.html src/trunk/doc/files/libs/abtdownloadmanager_rb.html src/trunk/doc/files/libs/abtlogmanager_rb.html src/trunk/doc/files/libs/abtpackage_rb.html src/trunk/doc/files/libs/abtpackagemanager_rb.html src/trunk/doc/files/libs/abtqueuemanager_rb.html src/trunk/doc/files/libs/abtreportmanager_rb.html src/trunk/doc/files/libs/abtsystemmanager_rb.html src/trunk/doc/files/libs/abtusage_rb.html src/trunk/doc/files/tests/testabtdepengine_rb.html src/trunk/doc/files/tests/testabtdownloadmanager_rb.html src/trunk/doc/files/tests/testabtlogmanager_rb.html src/trunk/doc/files/tests/testabtpackage_rb.html src/trunk/doc/files/tests/testabtpackagemanager_rb.html src/trunk/doc/files/tests/testabtqueuemanager_rb.html src/trunk/doc/files/tests/testabtreportmanager_rb.html src/trunk/doc/files/tests/testabtsystemmanager_rb.html src/trunk/doc/fr_class_index.html src/trunk/doc/fr_file_index.html src/trunk/doc/fr_method_index.html src/trunk/doc/index.html Modified: src/trunk/doc/classes/AbtDownloadManager.html =================================================================== --- src/trunk/doc/classes/AbtDownloadManager.html 2008-01-28 09:54:36 UTC (rev 492) +++ src/trunk/doc/classes/AbtDownloadManager.html 2008-01-28 10:00:50 UTC (rev 493) @@ -76,9 +76,9 @@ <div id="content"> <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center"> <map id="map" name="map"> - <area shape="rect" coords="29,51,176,99" href="AbtDownloadManager.html" alt="AbtDownloadManager" /> + <area shape="rect" coords="27,50,160,98" href="AbtDownloadManager.html" alt="AbtDownloadManager" /> </map> -<img src="../dot/f_0.png" usemap="#map" border="0" alt="dot/f_0.png"> +<img src="../dot/f_1.png" usemap="#map" border="0" alt="dot/f_1.png"> </td></tr></table> <div class="description"><p> @@ -117,13 +117,13 @@ <div class="sectiontitle">Methods</div> <ul> - <li><a href="#M000001">new</a></li> - <li><a href="#M000004">retrieve_news_feed</a></li> - <li><a href="#M000002">retrieve_package_source</a></li> - <li><a href="#M000003">retrieve_package_tree</a></li> - <li><a href="#M000005">update_package</a></li> - <li><a href="#M000006">update_package_tree</a></li> - <li><a href="#M000007">validated</a></li> + <li><a href="#M000012">new</a></li> + <li><a href="#M000015">retrieve_news_feed</a></li> + <li><a href="#M000013">retrieve_package_source</a></li> + <li><a href="#M000014">retrieve_package_tree</a></li> + <li><a href="#M000016">update_package</a></li> + <li><a href="#M000017">update_package_tree</a></li> + <li><a href="#M000018">validated</a></li> </ul> @@ -134,7 +134,7 @@ <div class="sectiontitle">Public Class methods</div> <div class="method"> <div class="title"> - <a name="M000001"></a><b>new</b>() + <a name="M000012"></a><b>new</b>() </div> <div class="description"> <p> @@ -148,8 +148,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000001_source')" id="l_M000001_source">show source</a> ]</p> - <div id="M000001_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000012_source')" id="l_M000012_source">show source</a> ]</p> + <div id="M000012_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 42</span> 42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> @@ -161,7 +161,7 @@ <div class="sectiontitle">Public Instance methods</div> <div class="method"> <div class="title"> - <a name="M000004"></a><b>retrieve_news_feed</b>(uri, cleanLog=true) + <a name="M000015"></a><b>retrieve_news_feed</b>(uri, cleanLog=true) </div> <div class="description"> <p> @@ -176,62 +176,62 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000004_source')" id="l_M000004_source">show source</a> ]</p> - <div id="M000004_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000015_source')" id="l_M000015_source">show source</a> ]</p> + <div id="M000015_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 121</span> -121: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieve_news_feed</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">cleanLog</span>=<span class="ruby-keyword kw">true</span>) -122: <span class="ruby-identifier">require</span> <span class="ruby-value str">'net/http'</span> -123: <span class="ruby-identifier">require</span> <span class="ruby-value str">'uri'</span> -124: <span class="ruby-identifier">require</span> <span class="ruby-value str">'rss/1.0'</span> -125: <span class="ruby-identifier">require</span> <span class="ruby-value str">'rss/2.0'</span> -126: <span class="ruby-identifier">newsLog</span> = <span class="ruby-value str">""</span> -127: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) -128: -129: <span class="ruby-comment cmt"># ensure we have our news logfile.</span> -130: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">cleanLog</span>) -131: <span class="ruby-identifier">newsLog</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$ABTNEWS_LOG</span>, <span class="ruby-value str">"w+"</span>) -132: <span class="ruby-keyword kw">else</span> -133: <span class="ruby-identifier">newsLog</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$ABTNEWS_LOG</span>, <span class="ruby-value str">"a+"</span>) -134: <span class="ruby-keyword kw">end</span> -135: -136: <span class="ruby-comment cmt"># pick up the abtlinux.org news feed.</span> -137: <span class="ruby-keyword kw">if</span> (<span class="ruby-operator">!</span><span class="ruby-identifier">news</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">get</span>(<span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">uri</span>))) -138: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Failed to retrieve news feed #{uri}."</span>) -139: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -140: <span class="ruby-keyword kw">end</span> -141: -142: <span class="ruby-comment cmt"># display the feeds.</span> -143: <span class="ruby-identifier">rss</span> = <span class="ruby-keyword kw">nil</span> -144: <span class="ruby-keyword kw">begin</span> -145: <span class="ruby-identifier">rss</span> = <span class="ruby-constant">RSS</span><span class="ruby-operator">::</span><span class="ruby-constant">Parser</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">news</span>, <span class="ruby-keyword kw">false</span>) -146: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">RSS</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span> -147: <span class="ruby-keyword kw">end</span> -148: -149: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">rss</span>.<span class="ruby-identifier">nil?</span>) -150: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Failed to display news feed as feed #{uri} is not RSS 1.0/2.0."</span>) -151: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -152: <span class="ruby-keyword kw">else</span> -153: <span class="ruby-identifier">newsLog</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"*** #{rss.channel.title} ***\n"</span> -154: -155: <span class="ruby-identifier">rss</span>.<span class="ruby-identifier">items</span>.<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">item</span>, <span class="ruby-identifier">itemCount</span><span class="ruby-operator">|</span> -156: <span class="ruby-identifier">itemCount</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> -157: <span class="ruby-identifier">newsLog</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{itemCount} #{item.link} #{item.title}\n"</span> -158: <span class="ruby-keyword kw">end</span> -159: <span class="ruby-keyword kw">end</span> -160: -161: <span class="ruby-identifier">newsLog</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n\n"</span> -162: <span class="ruby-identifier">newsLog</span>.<span class="ruby-identifier">close</span> -163: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -164: -165: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 122</span> +122: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieve_news_feed</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">cleanLog</span>=<span class="ruby-keyword kw">true</span>) +123: <span class="ruby-identifier">require</span> <span class="ruby-value str">'net/http'</span> +124: <span class="ruby-identifier">require</span> <span class="ruby-value str">'uri'</span> +125: <span class="ruby-identifier">require</span> <span class="ruby-value str">'rss/1.0'</span> +126: <span class="ruby-identifier">require</span> <span class="ruby-value str">'rss/2.0'</span> +127: <span class="ruby-identifier">newsLog</span> = <span class="ruby-value str">""</span> +128: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) +129: +130: <span class="ruby-comment cmt"># ensure we have our news logfile.</span> +131: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">cleanLog</span>) +132: <span class="ruby-identifier">newsLog</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$ABTNEWS_LOG</span>, <span class="ruby-value str">"w+"</span>) +133: <span class="ruby-keyword kw">else</span> +134: <span class="ruby-identifier">newsLog</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$ABTNEWS_LOG</span>, <span class="ruby-value str">"a+"</span>) +135: <span class="ruby-keyword kw">end</span> +136: +137: <span class="ruby-comment cmt"># pick up the abtlinux.org news feed.</span> +138: <span class="ruby-keyword kw">if</span> (<span class="ruby-operator">!</span><span class="ruby-identifier">news</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">get</span>(<span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">uri</span>))) +139: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Failed to retrieve news feed #{uri}."</span>) +140: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +141: <span class="ruby-keyword kw">end</span> +142: +143: <span class="ruby-comment cmt"># display the feeds.</span> +144: <span class="ruby-identifier">rss</span> = <span class="ruby-keyword kw">nil</span> +145: <span class="ruby-keyword kw">begin</span> +146: <span class="ruby-identifier">rss</span> = <span class="ruby-constant">RSS</span><span class="ruby-operator">::</span><span class="ruby-constant">Parser</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">news</span>, <span class="ruby-keyword kw">false</span>) +147: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">RSS</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span> +148: <span class="ruby-keyword kw">end</span> +149: +150: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">rss</span>.<span class="ruby-identifier">nil?</span>) +151: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Failed to display news feed as feed #{uri} is not RSS 1.0/2.0."</span>) +152: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +153: <span class="ruby-keyword kw">else</span> +154: <span class="ruby-identifier">newsLog</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"*** #{rss.channel.title} ***\n"</span> +155: +156: <span class="ruby-identifier">rss</span>.<span class="ruby-identifier">items</span>.<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">item</span>, <span class="ruby-identifier">itemCount</span><span class="ruby-operator">|</span> +157: <span class="ruby-identifier">itemCount</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> +158: <span class="ruby-identifier">newsLog</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{itemCount} #{item.link} #{item.title}\n"</span> +159: <span class="ruby-keyword kw">end</span> +160: <span class="ruby-keyword kw">end</span> +161: +162: <span class="ruby-identifier">newsLog</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n\n"</span> +163: <span class="ruby-identifier">newsLog</span>.<span class="ruby-identifier">close</span> +164: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +165: +166: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000002"></a><b>retrieve_package_source</b>(packageName, destination) + <a name="M000013"></a><b>retrieve_package_source</b>(packageName, destination) </div> <div class="description"> <p> @@ -249,8 +249,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000002_source')" id="l_M000002_source">show source</a> ]</p> - <div id="M000002_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000013_source')" id="l_M000013_source">show source</a> ]</p> + <div id="M000013_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 56</span> 56: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieve_package_source</span>(<span class="ruby-identifier">packageName</span>, <span class="ruby-identifier">destination</span>) @@ -259,25 +259,26 @@ 59: <span class="ruby-identifier">package</span> = <span class="ruby-identifier">eval</span>(<span class="ruby-identifier">packageName</span>.<span class="ruby-identifier">capitalize</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'.new'</span>) 60: 61: <span class="ruby-keyword kw">if</span> (<span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-node">"#{destination}/#{File.basename(package.srcUrl)}"</span>)) -62: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Download not needed, existing source found for #{packageName}"</span>) +62: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Download not needed, existing source found for #{packageName}."</span>) 63: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> 64: <span class="ruby-keyword kw">end</span> 65: 66: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-identifier">destination</span>) 67: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>(<span class="ruby-node">"wget #{package.srcUrl}"</span>) -68: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-comment cmt"># download failed.</span> -69: <span class="ruby-keyword kw">end</span> -70: -71: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Download completed for #{packageName}"</span>) -72: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -73: <span class="ruby-keyword kw">end</span> +68: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span>(<span class="ruby-node">"Download failed, unable to retrieve package #{packageName} sources, exit code was #{$?.exitstatus}."</span>) +69: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-comment cmt"># download failed.</span> +70: <span class="ruby-keyword kw">end</span> +71: +72: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Download completed for #{packageName}"</span>) +73: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +74: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000003"></a><b>retrieve_package_tree</b>(packageTreeName="AbTLinux") + <a name="M000014"></a><b>retrieve_package_tree</b>(packageTreeName="AbTLinux") </div> <div class="description"> <p> @@ -293,45 +294,45 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000003_source')" id="l_M000003_source">show source</a> ]</p> - <div id="M000003_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000014_source')" id="l_M000014_source">show source</a> ]</p> + <div id="M000014_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 83</span> - 83: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieve_package_tree</span>(<span class="ruby-identifier">packageTreeName</span>=<span class="ruby-value str">"AbTLinux"</span>) - 84: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) - 85: - 86: <span class="ruby-comment cmt"># check if package tree exists.</span> - 87: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">$PACKAGE_PATH</span>) - 88: <span class="ruby-comment cmt"># check if svn directory.</span> - 89: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-node">"#{$PACKAGE_PATH}/.svn"</span>) - 90: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"Package tree #{packageTreeName} already installed."</span> - 91: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> - 92: <span class="ruby-keyword kw">else</span> - 93: <span class="ruby-comment cmt"># package directory exists, but is not a valid tree.</span> - 94: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"Package tree exists, but is not valid svn tree."</span> - 95: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> - 96: <span class="ruby-keyword kw">end</span> - 97: - 98: <span class="ruby-keyword kw">else</span> - 99: -100: <span class="ruby-comment cmt"># pacakge directory does not exist, svn co.</span> -101: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>(<span class="ruby-node">"svn co #{$ABTLINUX_PACKAGES} #{$PACKAGE_PATH}"</span>) -102: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"Package tree not installed (svn co), problems!"</span> -103: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -104: <span class="ruby-keyword kw">end</span> -105: -106: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-value str">"Package tree installed (svn co)"</span> -107: <span class="ruby-keyword kw">end</span> -108: -109: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -110: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 84</span> + 84: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieve_package_tree</span>(<span class="ruby-identifier">packageTreeName</span>=<span class="ruby-value str">"AbTLinux"</span>) + 85: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) + 86: + 87: <span class="ruby-comment cmt"># check if package tree exists.</span> + 88: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">$PACKAGE_PATH</span>) + 89: <span class="ruby-comment cmt"># check if svn directory.</span> + 90: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-node">"#{$PACKAGE_PATH}/.svn"</span>) + 91: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"Package tree #{packageTreeName} already installed."</span> + 92: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> + 93: <span class="ruby-keyword kw">else</span> + 94: <span class="ruby-comment cmt"># package directory exists, but is not a valid tree.</span> + 95: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"Package tree exists, but is not valid svn tree."</span> + 96: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> + 97: <span class="ruby-keyword kw">end</span> + 98: + 99: <span class="ruby-keyword kw">else</span> +100: +101: <span class="ruby-comment cmt"># pacakge directory does not exist, svn co.</span> +102: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>(<span class="ruby-node">"svn co #{$ABTLINUX_PACKAGES} #{$PACKAGE_PATH}"</span>) +103: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-node">"Package tree #{packageTreeName} not installed (svn co), exit status was #{$?.exitstatus}."</span> +104: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +105: <span class="ruby-keyword kw">end</span> +106: +107: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"Package tree #{packageTreeName} installed (svn co)."</span> +108: <span class="ruby-keyword kw">end</span> +109: +110: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +111: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000005"></a><b>update_package</b>(packageName) + <a name="M000016"></a><b>update_package</b>(packageName) </div> <div class="description"> <p> @@ -346,96 +347,91 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000005_source')" id="l_M000005_source">show source</a> ]</p> - <div id="M000005_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000016_source')" id="l_M000016_source">show source</a> ]</p> + <div id="M000016_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 175</span> -175: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_package</span>(<span class="ruby-identifier">packageName</span>) -176: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) -177: -178: <span class="ruby-comment cmt"># check if package exists in tree. </span> -179: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-node">"#{$PACKAGE_PATH}/#{packageName}.rb"</span>) -180: <span class="ruby-comment cmt"># check if svn directory.</span> -181: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-node">"#{$PACKAGE_PATH}/.svn"</span>) -182: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>(<span class="ruby-node">"svn update #{$PACKAGE_PATH}/#{packageName.downcase}.rb"</span>) -183: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-node">"Package #{packageName.downcase} unable to update (svn update)."</span> -184: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -185: <span class="ruby-keyword kw">end</span> -186: -187: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"Package #{packageName.downcase} updated (svn update)"</span> -188: <span class="ruby-keyword kw">else</span> -189: <span class="ruby-comment cmt"># package exists, but not an valid tree.</span> -190: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-node">"Package #{packageName} exists, but not valid package tree (svn)."</span> -191: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -192: <span class="ruby-keyword kw">end</span> -193: <span class="ruby-keyword kw">else</span> -194: <span class="ruby-comment cmt"># package does not exist.</span> -195: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"Package is not installed, not possible to update!"</span> -196: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -197: <span class="ruby-keyword kw">end</span> -198: -199: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -200: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 176</span> +176: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_package</span>(<span class="ruby-identifier">packageName</span>) +177: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) +178: +179: <span class="ruby-comment cmt"># check if package exists in tree. </span> +180: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-node">"#{$PACKAGE_PATH}/#{packageName}.rb"</span>) +181: <span class="ruby-comment cmt"># check if svn directory.</span> +182: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-node">"#{$PACKAGE_PATH}/.svn"</span>) +183: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>(<span class="ruby-node">"svn update #{$PACKAGE_PATH}/#{packageName.downcase}.rb"</span>) +184: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-node">"Package #{packageName.downcase} unable to update (svn update), exit status was #{$?.exitstatus}."</span> +185: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +186: <span class="ruby-keyword kw">end</span> +187: +188: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"Package #{packageName.downcase} updated (svn update)."</span> +189: <span class="ruby-keyword kw">else</span> +190: <span class="ruby-comment cmt"># package exists, but not an valid tree.</span> +191: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-node">"Package #{packageName} exists, but not valid package tree (svn)."</span> +192: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +193: <span class="ruby-keyword kw">end</span> +194: <span class="ruby-keyword kw">else</span> +195: <span class="ruby-comment cmt"># package does not exist.</span> +196: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"Package is not installed, not possible to update!"</span> +197: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +198: <span class="ruby-keyword kw">end</span> +199: +200: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +201: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000006"></a><b>update_package_tree</b>() + <a name="M000017"></a><b>update_package_tree</b>() </div> <div class="description"> - <pre> - Updates the package tree. - - <b>PARAM</b> <i>String</i> - the name of the tree to be updated, defaults to AbTLinux repo. - - <b>RETURN</b> <i>boolean</i> - True if the package tree has been updated, - otherwise false. -</pre> + <p> +Updates the package tree. +</p> <p> -def <a -href="AbtDownloadManager.html#M000006">update_package_tree</a>(packageTreeName="AbTLinux") +<b>RETURN</b> <em>boolean</em> - True if the package tree has been updated, +otherwise false. </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000006_source')" id="l_M000006_source">show source</a> ]</p> - <div id="M000006_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000017_source')" id="l_M000017_source">show source</a> ]</p> + <div id="M000017_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 211</span> -211: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_package_tree</span>() -212: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) -213: -214: <span class="ruby-comment cmt"># check if package tree exists.</span> -215: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">$PACKAGE_PATH</span>) -216: <span class="ruby-comment cmt"># check if svn directory.</span> -217: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-node">"#{$PACKAGE_PATH}/.svn"</span>) -218: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>(<span class="ruby-node">"svn update #{$PACKAGE_PATH}"</span>) -219: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"Package tree unable to update (svn update)."</span> -220: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -221: <span class="ruby-keyword kw">end</span> -222: -223: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-value str">"Package tree updated (svn update)"</span> -224: <span class="ruby-keyword kw">else</span> -225: <span class="ruby-comment cmt"># package directory exists, but is not a valid tree.</span> -226: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"Package tree exists, but is not valid svn tree."</span> -227: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -228: <span class="ruby-keyword kw">end</span> -229: <span class="ruby-keyword kw">else</span> -230: <span class="ruby-comment cmt"># package directory does not exist.</span> -231: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"Package tree not installed!"</span> -232: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -233: <span class="ruby-keyword kw">end</span> -234: -235: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -236: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 209</span> +209: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_package_tree</span>() +210: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) +211: +212: <span class="ruby-comment cmt"># check if package tree exists.</span> +213: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">$PACKAGE_PATH</span>) +214: <span class="ruby-comment cmt"># check if svn directory.</span> +215: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-node">"#{$PACKAGE_PATH}/.svn"</span>) +216: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>(<span class="ruby-node">"svn update #{$PACKAGE_PATH}"</span>) +217: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-node">"Package tree unable to update (svn update), exit status was #{$?.exitstatus}."</span> +218: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +219: <span class="ruby-keyword kw">end</span> +220: +221: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-value str">"Package tree updated (svn update)"</span> +222: <span class="ruby-keyword kw">else</span> +223: <span class="ruby-comment cmt"># package directory exists, but is not a valid tree.</span> +224: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"Package tree exists, but is not valid svn tree."</span> +225: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +226: <span class="ruby-keyword kw">end</span> +227: <span class="ruby-keyword kw">else</span> +228: <span class="ruby-comment cmt"># package directory does not exist.</span> +229: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"Package tree not installed!"</span> +230: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +231: <span class="ruby-keyword kw">end</span> +232: +233: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +234: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000007"></a><b>validated</b>(hashvalue, path) + <a name="M000018"></a><b>validated</b>(hashvalue, path) </div> <div class="description"> <p> @@ -452,23 +448,23 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000007_source')" id="l_M000007_source">show source</a> ]</p> - <div id="M000007_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000018_source')" id="l_M000018_source">show source</a> ]</p> + <div id="M000018_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 247</span> -247: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validated</span>(<span class="ruby-identifier">hashvalue</span>, <span class="ruby-identifier">path</span>) -248: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) -249: -250: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hashvalue</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">SHA1</span>.<span class="ruby-identifier">hexdigest</span>(<span class="ruby-identifier">path</span>) -251: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"Source hash validated successfully..."</span> -252: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">"Validated sources successfully..."</span>) -253: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -254: <span class="ruby-keyword kw">end</span> -255: -256: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"Source hash failed validation..."</span> -257: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">"Validating sources failed..."</span>) -258: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -259: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 245</span> +245: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validated</span>(<span class="ruby-identifier">hashvalue</span>, <span class="ruby-identifier">path</span>) +246: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) +247: +248: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hashvalue</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">SHA1</span>.<span class="ruby-identifier">hexdigest</span>(<span class="ruby-identifier">path</span>) +249: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"Source hash validated successfully..."</span> +250: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">"Validated sources successfully..."</span>) +251: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +252: <span class="ruby-keyword kw">end</span> +253: +254: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"Source hash failed validation..."</span> +255: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">"Validating sources failed..."</span>) +256: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +257: <span class="ruby-keyword kw">end</span> </pre> </div> </div> Modified: src/trunk/doc/classes/AbtLogManager.html =================================================================== --- src/trunk/doc/classes/AbtLogManager.html 2008-01-28 09:54:36 UTC (rev 492) +++ src/trunk/doc/classes/AbtLogManager.html 2008-01-28 10:00:50 UTC (rev 493) @@ -76,9 +76,9 @@ <div id="content"> <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center"> <map id="map" name="map"> - <area shape="rect" coords="28,51,140,99" href="AbtLogManager.html" alt="AbtLogManager" /> + <area shape="rect" coords="27,50,131,98" href="AbtLogManager.html" alt="AbtLogManager" /> </map> -<img src="../dot/f_1.png" usemap="#map" border="0" alt="dot/f_1.png"> +<img src="../dot/f_2.png" usemap="#map" border="0" alt="dot/f_2.png"> </td></tr></table> <div class="description"><p> @@ -117,11 +117,11 @@ <div class="sectiontitle">Methods</div> <ul> - <li><a href="#M000018">get_log</a></li> - <li><a href="#M000022">log_package_build</a></li> - <li><a href="#M000021">log_package_install</a></li> - <li><a href="#M000020">log_package_integrity</a></li> - <li><a href="#M000019">new</a></li> + <li><a href="#M000064">get_log</a></li> + <li><a href="#M000068">log_package_build</a></li> + <li><a href="#M000067">log_package_install</a></li> + <li><a href="#M000066">log_package_integrity</a></li> + <li><a href="#M000065">new</a></li> </ul> @@ -132,7 +132,7 @@ <div class="sectiontitle">Public Class methods</div> <div class="method"> <div class="title"> - <a name="M000019"></a><b>new</b>() + <a name="M000065"></a><b>new</b>() </div> <div class="description"> <p> @@ -145,8 +145,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000019_source')" id="l_M000019_source">show source</a> ]</p> - <div id="M000019_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000065_source')" id="l_M000065_source">show source</a> ]</p> + <div id="M000065_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 80</span> 80: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> @@ -172,7 +172,7 @@ <div class="sectiontitle">Public Instance methods</div> <div class="method"> <div class="title"> - <a name="M000018"></a><b>get_log</b>(package, type) + <a name="M000064"></a><b>get_log</b>(package, type) </div> <div class="description"> <p> @@ -186,8 +186,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000018_source')" id="l_M000018_source">show source</a> ]</p> - <div id="M000018_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000064_source')" id="l_M000064_source">show source</a> ]</p> + <div id="M000064_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 43</span> 43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_log</span>(<span class="ruby-identifier">package</span>, <span class="ruby-identifier">type</span>) @@ -225,7 +225,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000022"></a><b>log_package_build</b>(package) + <a name="M000068"></a><b>log_package_build</b>(package) </div> <div class="description"> <p> @@ -241,8 +241,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000022_source')" id="l_M000022_source">show source</a> ]</p> - <div id="M000022_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000068_source')" id="l_M000068_source">show source</a> ]</p> + <div id="M000068_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 192</span> 192: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_package_build</span>(<span class="ruby-identifier">package</span>) @@ -261,7 +261,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000021"></a><b>log_package_install</b>(package) + <a name="M000067"></a><b>log_package_install</b>(package) </div> <div class="description"> <p> @@ -277,8 +277,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000021_source')" id="l_M000021_source">show source</a> ]</p> - <div id="M000021_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000067_source')" id="l_M000067_source">show source</a> ]</p> + <div id="M000067_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 144</span> 144: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_package_install</span>(<span class="ruby-identifier">package</span>) @@ -325,7 +325,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000020"></a><b>log_package_integrity</b>(package) + <a name="M000066"></a><b>log_package_integrity</b>(package) </div> <div class="description"> <p> @@ -342,8 +342,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000020_source')" id="l_M000020_source">show source</a> ]</p> - <div id="M000020_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000066_source')" id="l_M000066_source">show source</a> ]</p> + <div id="M000066_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 107</span> 107: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_package_integrity</span>(<span class="ruby-identifier">package</span>) Modified: src/trunk/doc/classes/AbtPackage.html =================================================================== --- src/trunk/doc/classes/AbtPackage.html 2008-01-28 09:54:36 UTC (rev 492) +++ src/trunk/doc/classes/AbtPackage.html 2008-01-28 10:00:50 UTC (rev 493) @@ -76,9 +76,9 @@ <div id="content"> <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center"> <map id="map" name="map"> - <area shape="rect" coords="29,51,123,99" href="AbtPackage.html" alt="AbtPackage" /> + <area shape="rect" coords="27,50,115,98" href="AbtPackage.html" alt="AbtPackage" /> </map> -<img src="../dot/f_2.png" usemap="#map" border="0" alt="dot/f_2.png"> +<img src="../dot/f_3.png" usemap="#map" border="0" alt="dot/f_3.png"> </td></tr></table> <div class="description"><p> @@ -90,7 +90,7 @@ inheriting from this class (class Fortune < <a href="AbtPackage.html">AbtPackage</a>) one picks up all supported standard functions for the abt <a href="AbtPackage.html">AbtPackage</a> manager to -make use of the <a href="AbtPackage.html#M000009">new</a> <a +make use of the <a href="AbtPackage.html#M000027">new</a> <a href="AbtPackage.html">AbtPackage</a>. </p> <p> @@ -109,7 +109,7 @@ AbTLinux is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more <a -href="AbtPackage.html#M000010">details</a>. +href="AbtPackage.html#M000028">details</a>. </p> <p> You should have received a copy of the GNU General Public License along @@ -122,16 +122,16 @@ <div class="sectiontitle">Methods</div> <ul> - <li><a href="#M000013">build</a></li> - <li><a href="#M000012">configure</a></li> - <li><a href="#M000010">details</a></li> - <li><a href="#M000015">install</a></li> - <li><a href="#M000009">new</a></li> - <li><a href="#M000016">post</a></li> - <li><a href="#M000011">pre</a></li> - <li><a href="#M000014">preinstall</a></li> - <li><a href="#M000017">remove_build</a></li> - <li><a href="#M000008">unpack_sources</a></li> + <li><a href="#M000031">build</a></li> + <li><a href="#M000030">configure</a></li> + <li><a href="#M000028">details</a></li> + <li><a href="#M000033">install</a></li> + <li><a href="#M000027">new</a></li> + <li><a href="#M000034">post</a></li> + <li><a href="#M000029">pre</a></li> + <li><a href="#M000032">preinstall</a></li> + <li><a href="#M000035">remove_build</a></li> + <li><a href="#M000026">unpack_sources</a></li> </ul> @@ -305,40 +305,40 @@ <div class="sectiontitle">Public Class methods</div> <div class="method"> <div class="title"> - <a name="M000009"></a><b>new</b>(data) + <a name="M000027"></a><b>new</b>(data) </div> <div class="description"> <p> Constructor for an <a href="AbtPackage.html">AbtPackage</a>, requires all -the packge <a href="AbtPackage.html#M000010">details</a>. +the packge <a href="AbtPackage.html#M000028">details</a>. </p> <p> <b>PARAM</b> <em>Hash</em> - hash containing all package data. </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000009_source')" id="l_M000009_source">show source</a> ]</p> - <div id="M000009_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000027_source')" id="l_M000027_source">show source</a> ]</p> + <div id="M000027_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtpackage.rb, line 147</span> -147: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">data</span>) -148: <span class="ruby-ivar">@name</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'name'</span>] -149: <span class="ruby-ivar">@execName</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'execName'</span>] -150: <span class="ruby-ivar">@version</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'version'</span>] -151: <span class="ruby-ivar">@srcDir</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'srcDir'</span>] -152: <span class="ruby-ivar">@homepage</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'homepage'</span>] -153: <span class="ruby-ivar">@srcUrl</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'srcUrl'</span>] -154: <span class="ruby-ivar">@dependsOn</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'dependsOn'</span>] -155: <span class="ruby-ivar">@reliesOn</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'reliesOn'</span>] -156: <span class="ruby-ivar">@optionalDO</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'optionalDO'</span>] -157: <span class="ruby-ivar">@optionalRO</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'optionalRO'</span>] -158: <span class="ruby-ivar">@hashCheck</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'hashCheck'</span>] -159: <span class="ruby-ivar">@patches</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'patches'</span>] -160: <span class="ruby-ivar">@patchesHashCheck</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'patchesHashCheck'</span>] -161: <span class="ruby-ivar">@mirrorPath</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'mirrorPath'</span>] -162: <span class="ruby-ivar">@license</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'license'</span>] -163: <span class="ruby-ivar">@description</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'description'</span>] -164: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtpackage.rb, line 149</span> +149: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">data</span>) +150: <span class="ruby-ivar">@name</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'name'</span>] +151: <span class="ruby-ivar">@execName</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'execName'</span>] +152: <span class="ruby-ivar">@version</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'version'</span>] +153: <span class="ruby-ivar">@srcDir</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'srcDir'</span>] +154: <span class="ruby-ivar">@homepage</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'homepage'</span>] +155: <span class="ruby-ivar">@srcUrl</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'srcUrl'</span>] +156: <span class="ruby-ivar">@dependsOn</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'dependsOn'</span>] +157: <span class="ruby-ivar">@reliesOn</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'reliesOn'</span>] +158: <span class="ruby-ivar">@optionalDO</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'optionalDO'</span>] +159: <span class="ruby-ivar">@optionalRO</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'optionalRO'</span>] +160: <span class="ruby-ivar">@hashCheck</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'hashCheck'</span>] +161: <span class="ruby-ivar">@patches</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'patches'</span>] +162: <span class="ruby-ivar">@patchesHashCheck</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'patchesHashCheck'</span>] +163: <span class="ruby-ivar">@mirrorPath</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'mirrorPath'</span>] +164: <span class="ruby-ivar">@license</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'license'</span>] +165: <span class="ruby-ivar">@description</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'description'</span>] +166: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -346,7 +346,7 @@ <div class="sectiontitle">Public Instance methods</div> <div class="method"> <div class="title"> - <a name="M000013"></a><b>build</b>(verbose=true) + <a name="M000031"></a><b>build</b>(verbose=true) </div> <div class="description"> <p> @@ -363,40 +363,40 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000013_source')" id="l_M000013_source">show source</a> ]</p> - <div id="M000013_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000031_source')" id="l_M000031_source">show source</a> ]</p> + <div id="M000031_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtpackage.rb, line 274</span> -274: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build</span>(<span class="ruby-identifier">verbose</span>=<span class="ruby-keyword kw">true</span>) -275: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">verbose</span>) -276: <span class="ruby-identifier">command</span> = <span class="ruby-node">"make | tee #{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.build"</span> -277: <span class="ruby-keyword kw">else</span> -278: <span class="ruby-identifier">command</span> = <span class="ruby-node">"make > #{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.build 2>&1"</span> -279: <span class="ruby-keyword kw">end</span> -280: -281: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-node">"#{$BUILD_LOCATION}/#{@srcD... [truncated message content] |
From: <esc...@us...> - 2008-01-28 09:54:30
|
Revision: 492 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=492&view=rev Author: eschabell Date: 2008-01-28 01:54:36 -0800 (Mon, 28 Jan 2008) Log Message: ----------- Found the fix I was looking for to determine and deal with exit code of called system command, refactored abtpackage and abtdownloadmananger to use this. Modified Paths: -------------- src/trunk/abt.rb src/trunk/libs/abtdownloadmanager.rb src/trunk/libs/abtpackage.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2008-01-27 21:35:54 UTC (rev 491) +++ src/trunk/abt.rb 2008-01-28 09:54:36 UTC (rev 492) @@ -532,7 +532,7 @@ puts "Start updating package tree : #{options['updateItem']}." logger.info "Start updating package tree : #{options['updateItem']}." - if downloader.update_package_tree(options['updateItem']) + if downloader.update_package_tree puts "Updated package tree : #{options['updateItem']}." else puts "Unable to update package tree : #{options['updateItem']}." Modified: src/trunk/libs/abtdownloadmanager.rb =================================================================== --- src/trunk/libs/abtdownloadmanager.rb 2008-01-27 21:35:54 UTC (rev 491) +++ src/trunk/libs/abtdownloadmanager.rb 2008-01-28 09:54:36 UTC (rev 492) @@ -59,12 +59,13 @@ package = eval(packageName.capitalize + '.new') if (File.exist?("#{destination}/#{File.basename(package.srcUrl)}")) - logger.info("Download not needed, existing source found for #{packageName}") + logger.info("Download not needed, existing source found for #{packageName}.") return true end Dir.chdir(destination) if !system("wget #{package.srcUrl}") + logger.error("Download failed, unable to retrieve package #{packageName} sources, exit code was #{$?.exitstatus}.") return false # download failed. end @@ -99,11 +100,11 @@ # pacakge directory does not exist, svn co. if !system("svn co #{$ABTLINUX_PACKAGES} #{$PACKAGE_PATH}") - logger.error "Package tree not installed (svn co), problems!" + logger.error "Package tree #{packageTreeName} not installed (svn co), exit status was #{$?.exitstatus}." return false end - logger.info "Package tree installed (svn co)" + logger.info "Package tree #{packageTreeName} installed (svn co)." end return true @@ -180,11 +181,11 @@ # check if svn directory. if File.directory?("#{$PACKAGE_PATH}/.svn") if !system("svn update #{$PACKAGE_PATH}/#{packageName.downcase}.rb") - logger.error "Package #{packageName.downcase} unable to update (svn update)." + logger.error "Package #{packageName.downcase} unable to update (svn update), exit status was #{$?.exitstatus}." return false end - logger.info "Package #{packageName.downcase} updated (svn update)" + logger.info "Package #{packageName.downcase} updated (svn update)." else # package exists, but not an valid tree. logger.error "Package #{packageName} exists, but not valid package tree (svn)." @@ -202,12 +203,9 @@ ## # Updates the package tree. # - # <b>PARAM</b> <i>String</i> - the name of the tree to be updated, defaults to AbTLinux repo. - # # <b>RETURN</b> <i>boolean</i> - True if the package tree has been updated, # otherwise false. ## - #def update_package_tree(packageTreeName="AbTLinux") def update_package_tree() logger = Logger.new($JOURNAL) @@ -216,7 +214,7 @@ # check if svn directory. if File.directory?("#{$PACKAGE_PATH}/.svn") if !system("svn update #{$PACKAGE_PATH}") - logger.error "Package tree unable to update (svn update)." + logger.error "Package tree unable to update (svn update), exit status was #{$?.exitstatus}." return false end Modified: src/trunk/libs/abtpackage.rb =================================================================== --- src/trunk/libs/abtpackage.rb 2008-01-27 21:35:54 UTC (rev 491) +++ src/trunk/libs/abtpackage.rb 2008-01-28 09:54:36 UTC (rev 492) @@ -78,7 +78,9 @@ end Dir.chdir($BUILD_LOCATION) - if !system("#{unpackTool} #{sourcesToUnpack}") + output = `#{unpackTool} #{sourcesToUnpack}` + exitcode = $?.exitstatus + if (exitcode != 0) return false end @@ -251,13 +253,13 @@ end Dir.chdir("#{$BUILD_LOCATION}/#{@srcDir}") - - if !system(command) - puts "[AbtPackage.configure] - configure section failed." + + if !system(command) + puts "[AbtPackage.configure] - configure section failed, exit code was #{$?.exitstatus}." return false - end - - puts "[AbtPackage.configure] - configure section completed!" if (verbose) + end + + puts "[AbtPackage.configure] - configure section completed, exit code was #{$?.exitstatus}!" if (verbose) return true end @@ -281,11 +283,11 @@ Dir.chdir("#{$BUILD_LOCATION}/#{@srcDir}") if !system(command) - puts "[AbtPackage.build] - build section failed." + puts "[AbtPackage.build] - build section failed, exit code was #{$?.exitstatus}." return false end - puts "[AbtPackage.build] - build section completed!" if (verbose) + puts "[AbtPackage.build] - build section completed, exit code was #{$?.exitstatus}!" if (verbose) return true end @@ -329,11 +331,11 @@ Dir.chdir("#{$BUILD_LOCATION}/#{@srcDir}") if !system(command) - puts "[AbtPackage.install] - install section failed." + puts "[AbtPackage.install] - install section failed, exit code was #{$?.exitstatus}." return false end - puts "[AbtPackage.install] - install section completed!" if (verbose) + puts "[AbtPackage.install] - install section completed, exit code was #{$?.exitstatus}!" if (verbose) return true end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-27 21:35:49
|
Revision: 491 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=491&view=rev Author: eschabell Date: 2008-01-27 13:35:54 -0800 (Sun, 27 Jan 2008) Log Message: ----------- Updated api docs. Modified Paths: -------------- src/trunk/doc/classes/AbtDownloadManager.html src/trunk/doc/classes/AbtLogManager.html src/trunk/doc/classes/AbtPackage.html src/trunk/doc/created.rid src/trunk/doc/dot/f_0.dot src/trunk/doc/dot/f_0.png src/trunk/doc/dot/f_1.dot src/trunk/doc/dot/f_1.png src/trunk/doc/dot/f_2.dot src/trunk/doc/dot/f_2.png src/trunk/doc/files/libs/abtdownloadmanager_rb.html src/trunk/doc/files/libs/abtlogmanager_rb.html src/trunk/doc/files/libs/abtpackage_rb.html src/trunk/doc/fr_class_index.html src/trunk/doc/fr_file_index.html src/trunk/doc/fr_method_index.html src/trunk/doc/index.html Modified: src/trunk/doc/classes/AbtDownloadManager.html =================================================================== --- src/trunk/doc/classes/AbtDownloadManager.html 2008-01-27 21:29:52 UTC (rev 490) +++ src/trunk/doc/classes/AbtDownloadManager.html 2008-01-27 21:35:54 UTC (rev 491) @@ -76,9 +76,9 @@ <div id="content"> <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center"> <map id="map" name="map"> - <area shape="rect" coords="27,50,160,98" href="AbtDownloadManager.html" alt="AbtDownloadManager" /> + <area shape="rect" coords="29,51,176,99" href="AbtDownloadManager.html" alt="AbtDownloadManager" /> </map> -<img src="../dot/f_1.png" usemap="#map" border="0" alt="dot/f_1.png"> +<img src="../dot/f_0.png" usemap="#map" border="0" alt="dot/f_0.png"> </td></tr></table> <div class="description"><p> @@ -117,13 +117,13 @@ <div class="sectiontitle">Methods</div> <ul> - <li><a href="#M000012">new</a></li> - <li><a href="#M000015">retrieve_news_feed</a></li> - <li><a href="#M000013">retrieve_package_source</a></li> - <li><a href="#M000014">retrieve_package_tree</a></li> - <li><a href="#M000016">update_package</a></li> - <li><a href="#M000017">update_package_tree</a></li> - <li><a href="#M000018">validated</a></li> + <li><a href="#M000001">new</a></li> + <li><a href="#M000004">retrieve_news_feed</a></li> + <li><a href="#M000002">retrieve_package_source</a></li> + <li><a href="#M000003">retrieve_package_tree</a></li> + <li><a href="#M000005">update_package</a></li> + <li><a href="#M000006">update_package_tree</a></li> + <li><a href="#M000007">validated</a></li> </ul> @@ -134,7 +134,7 @@ <div class="sectiontitle">Public Class methods</div> <div class="method"> <div class="title"> - <a name="M000012"></a><b>new</b>() + <a name="M000001"></a><b>new</b>() </div> <div class="description"> <p> @@ -148,8 +148,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000012_source')" id="l_M000012_source">show source</a> ]</p> - <div id="M000012_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000001_source')" id="l_M000001_source">show source</a> ]</p> + <div id="M000001_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 42</span> 42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> @@ -161,7 +161,7 @@ <div class="sectiontitle">Public Instance methods</div> <div class="method"> <div class="title"> - <a name="M000015"></a><b>retrieve_news_feed</b>(uri, cleanLog=true) + <a name="M000004"></a><b>retrieve_news_feed</b>(uri, cleanLog=true) </div> <div class="description"> <p> @@ -176,62 +176,62 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000015_source')" id="l_M000015_source">show source</a> ]</p> - <div id="M000015_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000004_source')" id="l_M000004_source">show source</a> ]</p> + <div id="M000004_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 122</span> -122: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieve_news_feed</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">cleanLog</span>=<span class="ruby-keyword kw">true</span>) -123: <span class="ruby-identifier">require</span> <span class="ruby-value str">'net/http'</span> -124: <span class="ruby-identifier">require</span> <span class="ruby-value str">'uri'</span> -125: <span class="ruby-identifier">require</span> <span class="ruby-value str">'rss/1.0'</span> -126: <span class="ruby-identifier">require</span> <span class="ruby-value str">'rss/2.0'</span> -127: <span class="ruby-identifier">newsLog</span> = <span class="ruby-value str">""</span> -128: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) -129: -130: <span class="ruby-comment cmt"># ensure we have our news logfile.</span> -131: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">cleanLog</span>) -132: <span class="ruby-identifier">newsLog</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$ABTNEWS_LOG</span>, <span class="ruby-value str">"w+"</span>) -133: <span class="ruby-keyword kw">else</span> -134: <span class="ruby-identifier">newsLog</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$ABTNEWS_LOG</span>, <span class="ruby-value str">"a+"</span>) -135: <span class="ruby-keyword kw">end</span> -136: -137: <span class="ruby-comment cmt"># pick up the abtlinux.org news feed.</span> -138: <span class="ruby-keyword kw">if</span> (<span class="ruby-operator">!</span><span class="ruby-identifier">news</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">get</span>(<span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">uri</span>))) -139: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Failed to retrieve news feed #{uri}."</span>) -140: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -141: <span class="ruby-keyword kw">end</span> -142: -143: <span class="ruby-comment cmt"># display the feeds.</span> -144: <span class="ruby-identifier">rss</span> = <span class="ruby-keyword kw">nil</span> -145: <span class="ruby-keyword kw">begin</span> -146: <span class="ruby-identifier">rss</span> = <span class="ruby-constant">RSS</span><span class="ruby-operator">::</span><span class="ruby-constant">Parser</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">news</span>, <span class="ruby-keyword kw">false</span>) -147: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">RSS</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span> -148: <span class="ruby-keyword kw">end</span> -149: -150: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">rss</span>.<span class="ruby-identifier">nil?</span>) -151: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Failed to display news feed as feed #{uri} is not RSS 1.0/2.0."</span>) -152: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -153: <span class="ruby-keyword kw">else</span> -154: <span class="ruby-identifier">newsLog</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"*** #{rss.channel.title} ***\n"</span> -155: -156: <span class="ruby-identifier">rss</span>.<span class="ruby-identifier">items</span>.<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">item</span>, <span class="ruby-identifier">itemCount</span><span class="ruby-operator">|</span> -157: <span class="ruby-identifier">itemCount</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> -158: <span class="ruby-identifier">newsLog</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{itemCount} #{item.link} #{item.title}\n"</span> -159: <span class="ruby-keyword kw">end</span> -160: <span class="ruby-keyword kw">end</span> -161: -162: <span class="ruby-identifier">newsLog</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n\n"</span> -163: <span class="ruby-identifier">newsLog</span>.<span class="ruby-identifier">close</span> -164: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -165: -166: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 121</span> +121: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieve_news_feed</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">cleanLog</span>=<span class="ruby-keyword kw">true</span>) +122: <span class="ruby-identifier">require</span> <span class="ruby-value str">'net/http'</span> +123: <span class="ruby-identifier">require</span> <span class="ruby-value str">'uri'</span> +124: <span class="ruby-identifier">require</span> <span class="ruby-value str">'rss/1.0'</span> +125: <span class="ruby-identifier">require</span> <span class="ruby-value str">'rss/2.0'</span> +126: <span class="ruby-identifier">newsLog</span> = <span class="ruby-value str">""</span> +127: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) +128: +129: <span class="ruby-comment cmt"># ensure we have our news logfile.</span> +130: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">cleanLog</span>) +131: <span class="ruby-identifier">newsLog</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$ABTNEWS_LOG</span>, <span class="ruby-value str">"w+"</span>) +132: <span class="ruby-keyword kw">else</span> +133: <span class="ruby-identifier">newsLog</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$ABTNEWS_LOG</span>, <span class="ruby-value str">"a+"</span>) +134: <span class="ruby-keyword kw">end</span> +135: +136: <span class="ruby-comment cmt"># pick up the abtlinux.org news feed.</span> +137: <span class="ruby-keyword kw">if</span> (<span class="ruby-operator">!</span><span class="ruby-identifier">news</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">get</span>(<span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">uri</span>))) +138: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Failed to retrieve news feed #{uri}."</span>) +139: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +140: <span class="ruby-keyword kw">end</span> +141: +142: <span class="ruby-comment cmt"># display the feeds.</span> +143: <span class="ruby-identifier">rss</span> = <span class="ruby-keyword kw">nil</span> +144: <span class="ruby-keyword kw">begin</span> +145: <span class="ruby-identifier">rss</span> = <span class="ruby-constant">RSS</span><span class="ruby-operator">::</span><span class="ruby-constant">Parser</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">news</span>, <span class="ruby-keyword kw">false</span>) +146: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">RSS</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span> +147: <span class="ruby-keyword kw">end</span> +148: +149: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">rss</span>.<span class="ruby-identifier">nil?</span>) +150: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Failed to display news feed as feed #{uri} is not RSS 1.0/2.0."</span>) +151: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +152: <span class="ruby-keyword kw">else</span> +153: <span class="ruby-identifier">newsLog</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"*** #{rss.channel.title} ***\n"</span> +154: +155: <span class="ruby-identifier">rss</span>.<span class="ruby-identifier">items</span>.<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">item</span>, <span class="ruby-identifier">itemCount</span><span class="ruby-operator">|</span> +156: <span class="ruby-identifier">itemCount</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> +157: <span class="ruby-identifier">newsLog</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{itemCount} #{item.link} #{item.title}\n"</span> +158: <span class="ruby-keyword kw">end</span> +159: <span class="ruby-keyword kw">end</span> +160: +161: <span class="ruby-identifier">newsLog</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n\n"</span> +162: <span class="ruby-identifier">newsLog</span>.<span class="ruby-identifier">close</span> +163: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +164: +165: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000013"></a><b>retrieve_package_source</b>(packageName, destination) + <a name="M000002"></a><b>retrieve_package_source</b>(packageName, destination) </div> <div class="description"> <p> @@ -249,8 +249,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000013_source')" id="l_M000013_source">show source</a> ]</p> - <div id="M000013_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000002_source')" id="l_M000002_source">show source</a> ]</p> + <div id="M000002_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 56</span> 56: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieve_package_source</span>(<span class="ruby-identifier">packageName</span>, <span class="ruby-identifier">destination</span>) @@ -264,12 +264,12 @@ 64: <span class="ruby-keyword kw">end</span> 65: 66: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-identifier">destination</span>) -67: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">system</span>(<span class="ruby-node">"wget #{package.srcUrl}"</span>)) -68: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Download completed for #{packageName}"</span>) -69: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -70: <span class="ruby-keyword kw">end</span> -71: -72: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-comment cmt"># download failed.</span> +67: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>(<span class="ruby-node">"wget #{package.srcUrl}"</span>) +68: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-comment cmt"># download failed.</span> +69: <span class="ruby-keyword kw">end</span> +70: +71: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Download completed for #{packageName}"</span>) +72: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> 73: <span class="ruby-keyword kw">end</span> </pre> </div> @@ -277,7 +277,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000014"></a><b>retrieve_package_tree</b>(packageTreeName="AbTLinux") + <a name="M000003"></a><b>retrieve_package_tree</b>(packageTreeName="AbTLinux") </div> <div class="description"> <p> @@ -293,8 +293,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000014_source')" id="l_M000014_source">show source</a> ]</p> - <div id="M000014_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000003_source')" id="l_M000003_source">show source</a> ]</p> + <div id="M000003_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 83</span> 83: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieve_package_tree</span>(<span class="ruby-identifier">packageTreeName</span>=<span class="ruby-value str">"AbTLinux"</span>) @@ -315,24 +315,23 @@ 98: <span class="ruby-keyword kw">else</span> 99: 100: <span class="ruby-comment cmt"># pacakge directory does not exist, svn co.</span> -101: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">system</span>(<span class="ruby-node">"svn co #{$ABTLINUX_PACKAGES} #{$PACKAGE_PATH}"</span>) -102: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-value str">"Package tree installed (svn co)"</span> -103: <span class="ruby-keyword kw">else</span> -104: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"Package tree not installed (svn co), problems!"</span> -105: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -106: <span class="ruby-keyword kw">end</span> -107: -108: <span class="ruby-keyword kw">end</span> -109: -110: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -111: <span class="ruby-keyword kw">end</span> +101: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>(<span class="ruby-node">"svn co #{$ABTLINUX_PACKAGES} #{$PACKAGE_PATH}"</span>) +102: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"Package tree not installed (svn co), problems!"</span> +103: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +104: <span class="ruby-keyword kw">end</span> +105: +106: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-value str">"Package tree installed (svn co)"</span> +107: <span class="ruby-keyword kw">end</span> +108: +109: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +110: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000016"></a><b>update_package</b>(packageName) + <a name="M000005"></a><b>update_package</b>(packageName) </div> <div class="description"> <p> @@ -347,43 +346,43 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000016_source')" id="l_M000016_source">show source</a> ]</p> - <div id="M000016_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000005_source')" id="l_M000005_source">show source</a> ]</p> + <div id="M000005_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 176</span> -176: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_package</span>(<span class="ruby-identifier">packageName</span>) -177: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) -178: -179: <span class="ruby-comment cmt"># check if package exists in tree. </span> -180: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-node">"#{$PACKAGE_PATH}/#{packageName}.rb"</span>) -181: <span class="ruby-comment cmt"># check if svn directory.</span> -182: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-node">"#{$PACKAGE_PATH}/.svn"</span>) -183: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">system</span>(<span class="ruby-node">"svn update #{$PACKAGE_PATH}/#{packageName.downcase}.rb"</span>) -184: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"Package #{packageName.downcase} updated (svn update)"</span> -185: <span class="ruby-keyword kw">else</span> -186: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-node">"Package #{packageName.downcase} unable to update (svn update)."</span> -187: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -188: <span class="ruby-keyword kw">end</span> -189: <span class="ruby-keyword kw">else</span> -190: <span class="ruby-comment cmt"># package exists, but not an valid tree.</span> -191: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-node">"Package #{packageName} exists, but not valid package tree (svn)."</span> -192: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -193: <span class="ruby-keyword kw">end</span> -194: <span class="ruby-keyword kw">else</span> -195: <span class="ruby-comment cmt"># package does not exist.</span> -196: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"Package is not installed, not possible to update!"</span> -197: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -198: <span class="ruby-keyword kw">end</span> -199: -200: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -201: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 175</span> +175: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_package</span>(<span class="ruby-identifier">packageName</span>) +176: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) +177: +178: <span class="ruby-comment cmt"># check if package exists in tree. </span> +179: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-node">"#{$PACKAGE_PATH}/#{packageName}.rb"</span>) +180: <span class="ruby-comment cmt"># check if svn directory.</span> +181: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-node">"#{$PACKAGE_PATH}/.svn"</span>) +182: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>(<span class="ruby-node">"svn update #{$PACKAGE_PATH}/#{packageName.downcase}.rb"</span>) +183: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-node">"Package #{packageName.downcase} unable to update (svn update)."</span> +184: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +185: <span class="ruby-keyword kw">end</span> +186: +187: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"Package #{packageName.downcase} updated (svn update)"</span> +188: <span class="ruby-keyword kw">else</span> +189: <span class="ruby-comment cmt"># package exists, but not an valid tree.</span> +190: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-node">"Package #{packageName} exists, but not valid package tree (svn)."</span> +191: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +192: <span class="ruby-keyword kw">end</span> +193: <span class="ruby-keyword kw">else</span> +194: <span class="ruby-comment cmt"># package does not exist.</span> +195: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"Package is not installed, not possible to update!"</span> +196: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +197: <span class="ruby-keyword kw">end</span> +198: +199: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +200: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000017"></a><b>update_package_tree</b>() + <a name="M000006"></a><b>update_package_tree</b>() </div> <div class="description"> <pre> @@ -396,47 +395,47 @@ </pre> <p> def <a -href="AbtDownloadManager.html#M000017">update_package_tree</a>(packageTreeName="AbTLinux") +href="AbtDownloadManager.html#M000006">update_package_tree</a>(packageTreeName="AbTLinux") </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000017_source')" id="l_M000017_source">show source</a> ]</p> - <div id="M000017_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000006_source')" id="l_M000006_source">show source</a> ]</p> + <div id="M000006_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 212</span> -212: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_package_tree</span>() -213: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) -214: -215: <span class="ruby-comment cmt"># check if package tree exists.</span> -216: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">$PACKAGE_PATH</span>) -217: <span class="ruby-comment cmt"># check if svn directory.</span> -218: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-node">"#{$PACKAGE_PATH}/.svn"</span>) -219: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">system</span>(<span class="ruby-node">"svn update #{$PACKAGE_PATH}"</span>) -220: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-value str">"Package tree updated (svn update)"</span> -221: <span class="ruby-keyword kw">else</span> -222: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"Package tree unable to update (svn update)."</span> -223: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -224: <span class="ruby-keyword kw">end</span> -225: <span class="ruby-keyword kw">else</span> -226: <span class="ruby-comment cmt"># package directory exists, but is not a valid tree.</span> -227: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"Package tree exists, but is not valid svn tree."</span> -228: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -229: <span class="ruby-keyword kw">end</span> -230: <span class="ruby-keyword kw">else</span> -231: <span class="ruby-comment cmt"># package directory does not exist.</span> -232: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"Package tree not installed!"</span> -233: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -234: <span class="ruby-keyword kw">end</span> -235: -236: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -237: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 211</span> +211: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_package_tree</span>() +212: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) +213: +214: <span class="ruby-comment cmt"># check if package tree exists.</span> +215: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">$PACKAGE_PATH</span>) +216: <span class="ruby-comment cmt"># check if svn directory.</span> +217: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-node">"#{$PACKAGE_PATH}/.svn"</span>) +218: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>(<span class="ruby-node">"svn update #{$PACKAGE_PATH}"</span>) +219: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"Package tree unable to update (svn update)."</span> +220: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +221: <span class="ruby-keyword kw">end</span> +222: +223: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-value str">"Package tree updated (svn update)"</span> +224: <span class="ruby-keyword kw">else</span> +225: <span class="ruby-comment cmt"># package directory exists, but is not a valid tree.</span> +226: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"Package tree exists, but is not valid svn tree."</span> +227: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +228: <span class="ruby-keyword kw">end</span> +229: <span class="ruby-keyword kw">else</span> +230: <span class="ruby-comment cmt"># package directory does not exist.</span> +231: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"Package tree not installed!"</span> +232: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +233: <span class="ruby-keyword kw">end</span> +234: +235: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +236: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000018"></a><b>validated</b>(hashvalue, path) + <a name="M000007"></a><b>validated</b>(hashvalue, path) </div> <div class="description"> <p> @@ -453,23 +452,23 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000018_source')" id="l_M000018_source">show source</a> ]</p> - <div id="M000018_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000007_source')" id="l_M000007_source">show source</a> ]</p> + <div id="M000007_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 248</span> -248: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validated</span>(<span class="ruby-identifier">hashvalue</span>, <span class="ruby-identifier">path</span>) -249: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) -250: -251: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hashvalue</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">SHA1</span>.<span class="ruby-identifier">hexdigest</span>(<span class="ruby-identifier">path</span>) -252: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"Source hash validated successfully..."</span> -253: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">"Validated sources successfully..."</span>) -254: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -255: <span class="ruby-keyword kw">end</span> -256: -257: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"Source hash failed validation..."</span> -258: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">"Validating sources failed..."</span>) -259: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -260: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 247</span> +247: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validated</span>(<span class="ruby-identifier">hashvalue</span>, <span class="ruby-identifier">path</span>) +248: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) +249: +250: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hashvalue</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">SHA1</span>.<span class="ruby-identifier">hexdigest</span>(<span class="ruby-identifier">path</span>) +251: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"Source hash validated successfully..."</span> +252: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">"Validated sources successfully..."</span>) +253: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +254: <span class="ruby-keyword kw">end</span> +255: +256: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"Source hash failed validation..."</span> +257: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">"Validating sources failed..."</span>) +258: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +259: <span class="ruby-keyword kw">end</span> </pre> </div> </div> Modified: src/trunk/doc/classes/AbtLogManager.html =================================================================== --- src/trunk/doc/classes/AbtLogManager.html 2008-01-27 21:29:52 UTC (rev 490) +++ src/trunk/doc/classes/AbtLogManager.html 2008-01-27 21:35:54 UTC (rev 491) @@ -76,9 +76,9 @@ <div id="content"> <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center"> <map id="map" name="map"> - <area shape="rect" coords="27,50,131,98" href="AbtLogManager.html" alt="AbtLogManager" /> + <area shape="rect" coords="28,51,140,99" href="AbtLogManager.html" alt="AbtLogManager" /> </map> -<img src="../dot/f_2.png" usemap="#map" border="0" alt="dot/f_2.png"> +<img src="../dot/f_1.png" usemap="#map" border="0" alt="dot/f_1.png"> </td></tr></table> <div class="description"><p> @@ -117,11 +117,11 @@ <div class="sectiontitle">Methods</div> <ul> - <li><a href="#M000064">get_log</a></li> - <li><a href="#M000068">log_package_build</a></li> - <li><a href="#M000067">log_package_install</a></li> - <li><a href="#M000066">log_package_integrity</a></li> - <li><a href="#M000065">new</a></li> + <li><a href="#M000018">get_log</a></li> + <li><a href="#M000022">log_package_build</a></li> + <li><a href="#M000021">log_package_install</a></li> + <li><a href="#M000020">log_package_integrity</a></li> + <li><a href="#M000019">new</a></li> </ul> @@ -132,7 +132,7 @@ <div class="sectiontitle">Public Class methods</div> <div class="method"> <div class="title"> - <a name="M000065"></a><b>new</b>() + <a name="M000019"></a><b>new</b>() </div> <div class="description"> <p> @@ -145,21 +145,26 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000065_source')" id="l_M000065_source">show source</a> ]</p> - <div id="M000065_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000019_source')" id="l_M000019_source">show source</a> ]</p> + <div id="M000019_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 80</span> 80: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> -81: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) -82: [<span class="ruby-identifier">$ABT_LOGS</span>, <span class="ruby-identifier">$ABT_CACHES</span>, <span class="ruby-identifier">$ABT_STATE</span>, <span class="ruby-identifier">$BUILD_LOCATION</span>, <span class="ruby-identifier">$PACKAGE_INSTALLED</span>, <span class="ruby-identifier">$ABT_LIBS</span>, -83: <span class="ruby-identifier">$PACKAGE_CACHED</span>, <span class="ruby-identifier">$ABT_TMP</span>, <span class="ruby-identifier">$ABT_CONFIG</span>, <span class="ruby-identifier">$ABT_LOCAL_CONFIG</span>, <span class="ruby-identifier">$SOURCES_REPOSITORY</span>].<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">dir</span><span class="ruby-operator">|</span> -84: -85: <span class="ruby-keyword kw">if</span> (<span class="ruby-operator">!</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">dir</span>)) -86: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">dir</span>) -87: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Created directory: #{dir}."</span>) -88: <span class="ruby-keyword kw">end</span> -89: } -90: <span class="ruby-keyword kw">end</span> +81: <span class="ruby-keyword kw">if</span> (<span class="ruby-operator">!</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">$JOURNAL</span>)) +82: <span class="ruby-comment cmt"># logging directory missing, create it!</span> +83: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">$ABT_LOGS</span>) +84: <span class="ruby-keyword kw">end</span> +85: +86: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) +87: [<span class="ruby-identifier">$ABT_LOGS</span>, <span class="ruby-identifier">$ABT_CACHES</span>, <span class="ruby-identifier">$ABT_STATE</span>, <span class="ruby-identifier">$BUILD_LOCATION</span>, <span class="ruby-identifier">$PACKAGE_INSTALLED</span>, <span class="ruby-identifier">$ABT_LIBS</span>, +88: <span class="ruby-identifier">$PACKAGE_CACHED</span>, <span class="ruby-identifier">$ABT_TMP</span>, <span class="ruby-identifier">$ABT_CONFIG</span>, <span class="ruby-identifier">$ABT_LOCAL_CONFIG</span>, <span class="ruby-identifier">$SOURCES_REPOSITORY</span>].<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">dir</span><span class="ruby-operator">|</span> +89: +90: <span class="ruby-keyword kw">if</span> (<span class="ruby-operator">!</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">dir</span>)) +91: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">dir</span>) +92: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Created directory: #{dir}."</span>) +93: <span class="ruby-keyword kw">end</span> +94: } +95: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -167,7 +172,7 @@ <div class="sectiontitle">Public Instance methods</div> <div class="method"> <div class="title"> - <a name="M000064"></a><b>get_log</b>(package, type) + <a name="M000018"></a><b>get_log</b>(package, type) </div> <div class="description"> <p> @@ -181,8 +186,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000064_source')" id="l_M000064_source">show source</a> ]</p> - <div id="M000064_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000018_source')" id="l_M000018_source">show source</a> ]</p> + <div id="M000018_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 43</span> 43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_log</span>(<span class="ruby-identifier">package</span>, <span class="ruby-identifier">type</span>) @@ -220,7 +225,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000068"></a><b>log_package_build</b>(package) + <a name="M000022"></a><b>log_package_build</b>(package) </div> <div class="description"> <p> @@ -236,27 +241,27 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000068_source')" id="l_M000068_source">show source</a> ]</p> - <div id="M000068_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000022_source')" id="l_M000022_source">show source</a> ]</p> + <div id="M000022_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 187</span> -187: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_package_build</span>(<span class="ruby-identifier">package</span>) -188: <span class="ruby-identifier">buildLog</span> = <span class="ruby-identifier">get_log</span>(<span class="ruby-identifier">package</span>, <span class="ruby-value str">'build'</span>) -189: -190: <span class="ruby-comment cmt"># make sure the build file exists.</span> -191: <span class="ruby-keyword kw">if</span> (<span class="ruby-operator">!</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">buildLog</span>)) -192: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -193: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 192</span> +192: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_package_build</span>(<span class="ruby-identifier">package</span>) +193: <span class="ruby-identifier">buildLog</span> = <span class="ruby-identifier">get_log</span>(<span class="ruby-identifier">package</span>, <span class="ruby-value str">'build'</span>) 194: -195: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -196: <span class="ruby-keyword kw">end</span> +195: <span class="ruby-comment cmt"># make sure the build file exists.</span> +196: <span class="ruby-keyword kw">if</span> (<span class="ruby-operator">!</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">buildLog</span>)) +197: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +198: <span class="ruby-keyword kw">end</span> +199: +200: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +201: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000067"></a><b>log_package_install</b>(package) + <a name="M000021"></a><b>log_package_install</b>(package) </div> <div class="description"> <p> @@ -272,55 +277,55 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000067_source')" id="l_M000067_source">show source</a> ]</p> - <div id="M000067_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000021_source')" id="l_M000021_source">show source</a> ]</p> + <div id="M000021_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 139</span> -139: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_package_install</span>(<span class="ruby-identifier">package</span>) -140: <span class="ruby-comment cmt"># some dirs we will not add to an install log.</span> -141: <span class="ruby-identifier">excluded_pattern</span> = <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"^(/dev|/proc|/tmp|/var/tmp|/usr/src|/sys)+"</span>) -142: <span class="ruby-identifier">badLine</span> = <span class="ruby-keyword kw">false</span> <span class="ruby-comment cmt"># used to mark excluded lines from installwatch log.</span> -143: -144: <span class="ruby-comment cmt"># our log locations.</span> -145: <span class="ruby-identifier">installLog</span> = <span class="ruby-identifier">get_log</span>(<span class="ruby-identifier">package</span>, <span class="ruby-value str">'install'</span>) -146: <span class="ruby-identifier">tmpInstallLog</span> = <span class="ruby-identifier">get_log</span>(<span class="ruby-identifier">package</span>, <span class="ruby-value str">'tmpinstall'</span>) -147: -148: <span class="ruby-comment cmt"># get the installed files from the tmp file</span> -149: <span class="ruby-comment cmt"># into our install log.</span> -150: <span class="ruby-keyword kw">if</span> (<span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">tmpInstallLog</span>)) -151: <span class="ruby-identifier">installFile</span> = <span class="ruby-identifier">open</span>(<span class="ruby-identifier">installLog</span>, <span class="ruby-value str">'w'</span>) -152: -153: <span class="ruby-comment cmt"># include only the file names from open calls</span> -154: <span class="ruby-comment cmt"># and not part of the excluded range of directories.</span> -155: <span class="ruby-constant">IO</span>.<span class="ruby-identifier">foreach</span>(<span class="ruby-identifier">tmpInstallLog</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> -156: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>[<span class="ruby-value">1</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'open'</span>) -157: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>[<span class="ruby-value">2</span>] <span class="ruby-operator">=~</span> <span class="ruby-identifier">excluded_pattern</span>) -158: <span class="ruby-identifier">badLine</span> = <span class="ruby-keyword kw">true</span> -159: <span class="ruby-keyword kw">else</span> -160: <span class="ruby-identifier">badLine</span> = <span class="ruby-keyword kw">false</span> -161: <span class="ruby-keyword kw">end</span> -162: -163: <span class="ruby-keyword kw">if</span> (<span class="ruby-operator">!</span><span class="ruby-identifier">badLine</span>) -164: <span class="ruby-identifier">installFile</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{line.split[2]}\n"</span> -165: <span class="ruby-keyword kw">end</span> -166: <span class="ruby-keyword kw">end</span> -167: <span class="ruby-keyword kw">end</span> -168: -169: <span class="ruby-identifier">installFile</span>.<span class="ruby-identifier">close</span> -170: <span class="ruby-keyword kw">else</span> -171: <span class="ruby-comment cmt"># no tmp install file, thus no install running.</span> -172: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -173: <span class="ruby-keyword kw">end</span> -174: -175: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>; -176: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 144</span> +144: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_package_install</span>(<span class="ruby-identifier">package</span>) +145: <span class="ruby-comment cmt"># some dirs we will not add to an install log.</span> +146: <span class="ruby-identifier">excluded_pattern</span> = <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"^(/dev|/proc|/tmp|/var/tmp|/usr/src|/sys)+"</span>) +147: <span class="ruby-identifier">badLine</span> = <span class="ruby-keyword kw">false</span> <span class="ruby-comment cmt"># used to mark excluded lines from installwatch log.</span> +148: +149: <span class="ruby-comment cmt"># our log locations.</span> +150: <span class="ruby-identifier">installLog</span> = <span class="ruby-identifier">get_log</span>(<span class="ruby-identifier">package</span>, <span class="ruby-value str">'install'</span>) +151: <span class="ruby-identifier">tmpInstallLog</span> = <span class="ruby-identifier">get_log</span>(<span class="ruby-identifier">package</span>, <span class="ruby-value str">'tmpinstall'</span>) +152: +153: <span class="ruby-comment cmt"># get the installed files from the tmp file</span> +154: <span class="ruby-comment cmt"># into our install log.</span> +155: <span class="ruby-keyword kw">if</span> (<span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">tmpInstallLog</span>)) +156: <span class="ruby-identifier">installFile</span> = <span class="ruby-identifier">open</span>(<span class="ruby-identifier">installLog</span>, <span class="ruby-value str">'w'</span>) +157: +158: <span class="ruby-comment cmt"># include only the file names from open calls</span> +159: <span class="ruby-comment cmt"># and not part of the excluded range of directories.</span> +160: <span class="ruby-constant">IO</span>.<span class="ruby-identifier">foreach</span>(<span class="ruby-identifier">tmpInstallLog</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> +161: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>[<span class="ruby-value">1</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'open'</span>) +162: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>[<span class="ruby-value">2</span>] <span class="ruby-operator">=~</span> <span class="ruby-identifier">excluded_pattern</span>) +163: <span class="ruby-identifier">badLine</span> = <span class="ruby-keyword kw">true</span> +164: <span class="ruby-keyword kw">else</span> +165: <span class="ruby-identifier">badLine</span> = <span class="ruby-keyword kw">false</span> +166: <span class="ruby-keyword kw">end</span> +167: +168: <span class="ruby-keyword kw">if</span> (<span class="ruby-operator">!</span><span class="ruby-identifier">badLine</span>) +169: <span class="ruby-identifier">installFile</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{line.split[2]}\n"</span> +170: <span class="ruby-keyword kw">end</span> +171: <span class="ruby-keyword kw">end</span> +172: <span class="ruby-keyword kw">end</span> +173: +174: <span class="ruby-identifier">installFile</span>.<span class="ruby-identifier">close</span> +175: <span class="ruby-keyword kw">else</span> +176: <span class="ruby-comment cmt"># no tmp install file, thus no install running.</span> +177: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +178: <span class="ruby-keyword kw">end</span> +179: +180: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>; +181: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000066"></a><b>log_package_integrity</b>(package) + <a name="M000020"></a><b>log_package_integrity</b>(package) </div> <div class="description"> <p> @@ -337,37 +342,37 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000066_source')" id="l_M000066_source">show source</a> ]</p> - <div id="M000066_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000020_source')" id="l_M000020_source">show source</a> ]</p> + <div id="M000020_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 102</span> -102: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_package_integrity</span>(<span class="ruby-identifier">package</span>) -103: -104: <span class="ruby-comment cmt"># our log locations.</span> -105: <span class="ruby-identifier">installLog</span> = <span class="ruby-identifier">get_log</span>(<span class="ruby-identifier">package</span>, <span class="ruby-value str">'install'</span>) -106: <span class="ruby-identifier">integrityLog</span> = <span class="ruby-identifier">get_log</span>(<span class="ruby-identifier">package</span>, <span class="ruby-value str">'integrity'</span>) -107: -108: <span class="ruby-comment cmt"># get the installed files from the tmp file</span> -109: <span class="ruby-comment cmt"># into our install log.</span> -110: <span class="ruby-keyword kw">if</span> (<span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">installLog</span>)) -111: <span class="ruby-identifier">installFile</span> = <span class="ruby-identifier">open</span>(<span class="ruby-identifier">installLog</span>, <span class="ruby-value str">'r'</span>) -112: <span class="ruby-identifier">integrityFile</span> = <span class="ruby-identifier">open</span>(<span class="ruby-identifier">integrityLog</span>, <span class="ruby-value str">'w'</span>) -113: -114: <span class="ruby-comment cmt"># get the integrity for each file, initially just permissions. </span> -115: <span class="ruby-constant">IO</span>.<span class="ruby-identifier">foreach</span>(<span class="ruby-identifier">installLog</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> -116: <span class="ruby-identifier">status</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">stat</span>(<span class="ruby-identifier">line</span>.<span class="ruby-identifier">chomp</span>) -117: <span class="ruby-identifier">octal</span> = <span class="ruby-identifier">sprintf</span>(<span class="ruby-value str">"%o"</span>, <span class="ruby-identifier">status</span>.<span class="ruby-identifier">mode</span>) -118: <span class="ruby-identifier">integrityFile</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{line.chomp}:#{octal}\n"</span> -119: <span class="ruby-keyword kw">end</span> -120: -121: <span class="ruby-identifier">installFile</span>.<span class="ruby-identifier">close</span> -122: <span class="ruby-identifier">integrityFile</span>.<span class="ruby-identifier">close</span> -123: <span class="ruby-keyword ... [truncated message content] |
From: <esc...@us...> - 2008-01-27 21:29:49
|
Revision: 490 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=490&view=rev Author: eschabell Date: 2008-01-27 13:29:52 -0800 (Sun, 27 Jan 2008) Log Message: ----------- System calls need to be looked at closer, seems they are true if everything works fine, but return some integer (the shell command exit value?) when failing. Modified Paths: -------------- src/trunk/libs/abtdownloadmanager.rb src/trunk/libs/abtpackage.rb Modified: src/trunk/libs/abtdownloadmanager.rb =================================================================== --- src/trunk/libs/abtdownloadmanager.rb 2008-01-27 21:11:45 UTC (rev 489) +++ src/trunk/libs/abtdownloadmanager.rb 2008-01-27 21:29:52 UTC (rev 490) @@ -64,7 +64,7 @@ end Dir.chdir(destination) - if (system("wget #{package.srcUrl}") != 0) + if !system("wget #{package.srcUrl}") return false # download failed. end @@ -98,7 +98,7 @@ else # pacakge directory does not exist, svn co. - if (system("svn co #{$ABTLINUX_PACKAGES} #{$PACKAGE_PATH}") != 0) + if !system("svn co #{$ABTLINUX_PACKAGES} #{$PACKAGE_PATH}") logger.error "Package tree not installed (svn co), problems!" return false end @@ -179,7 +179,7 @@ if File.exists?("#{$PACKAGE_PATH}/#{packageName}.rb") # check if svn directory. if File.directory?("#{$PACKAGE_PATH}/.svn") - if (system("svn update #{$PACKAGE_PATH}/#{packageName.downcase}.rb") != 0) + if !system("svn update #{$PACKAGE_PATH}/#{packageName.downcase}.rb") logger.error "Package #{packageName.downcase} unable to update (svn update)." return false end @@ -215,7 +215,7 @@ if File.directory?($PACKAGE_PATH) # check if svn directory. if File.directory?("#{$PACKAGE_PATH}/.svn") - if (system("svn update #{$PACKAGE_PATH}") != 0) + if !system("svn update #{$PACKAGE_PATH}") logger.error "Package tree unable to update (svn update)." return false end Modified: src/trunk/libs/abtpackage.rb =================================================================== --- src/trunk/libs/abtpackage.rb 2008-01-27 21:11:45 UTC (rev 489) +++ src/trunk/libs/abtpackage.rb 2008-01-27 21:29:52 UTC (rev 490) @@ -78,7 +78,7 @@ end Dir.chdir($BUILD_LOCATION) - if (system("#{unpackTool} #{sourcesToUnpack}") != 0) + if !system("#{unpackTool} #{sourcesToUnpack}") return false end @@ -252,7 +252,7 @@ Dir.chdir("#{$BUILD_LOCATION}/#{@srcDir}") - if (system(command) != 0) + if !system(command) puts "[AbtPackage.configure] - configure section failed." return false end @@ -280,7 +280,7 @@ Dir.chdir("#{$BUILD_LOCATION}/#{@srcDir}") - if(system(command) != 0) + if !system(command) puts "[AbtPackage.build] - build section failed." return false end @@ -328,7 +328,7 @@ Dir.chdir("#{$BUILD_LOCATION}/#{@srcDir}") - if(system(command) != 0) + if !system(command) puts "[AbtPackage.install] - install section failed." return false end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-27 21:11:44
|
Revision: 489 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=489&view=rev Author: eschabell Date: 2008-01-27 13:11:45 -0800 (Sun, 27 Jan 2008) Log Message: ----------- Refactored all system commands to properly check if the called action succeded. Modified Paths: -------------- src/trunk/libs/abtdownloadmanager.rb src/trunk/libs/abtpackage.rb Modified: src/trunk/libs/abtdownloadmanager.rb =================================================================== --- src/trunk/libs/abtdownloadmanager.rb 2008-01-27 10:39:40 UTC (rev 488) +++ src/trunk/libs/abtdownloadmanager.rb 2008-01-27 21:11:45 UTC (rev 489) @@ -64,12 +64,12 @@ end Dir.chdir(destination) - if (system("wget #{package.srcUrl}")) - logger.info("Download completed for #{packageName}") - return true + if (system("wget #{package.srcUrl}") != 0) + return false # download failed. end - - return false # download failed. + + logger.info("Download completed for #{packageName}") + return true end ## @@ -98,13 +98,12 @@ else # pacakge directory does not exist, svn co. - if system("svn co #{$ABTLINUX_PACKAGES} #{$PACKAGE_PATH}") - logger.info "Package tree installed (svn co)" - else + if (system("svn co #{$ABTLINUX_PACKAGES} #{$PACKAGE_PATH}") != 0) logger.error "Package tree not installed (svn co), problems!" return false end + logger.info "Package tree installed (svn co)" end return true @@ -180,12 +179,12 @@ if File.exists?("#{$PACKAGE_PATH}/#{packageName}.rb") # check if svn directory. if File.directory?("#{$PACKAGE_PATH}/.svn") - if system("svn update #{$PACKAGE_PATH}/#{packageName.downcase}.rb") - logger.info "Package #{packageName.downcase} updated (svn update)" - else - logger.error "Package #{packageName.downcase} unable to update (svn update)." - return false + if (system("svn update #{$PACKAGE_PATH}/#{packageName.downcase}.rb") != 0) + logger.error "Package #{packageName.downcase} unable to update (svn update)." + return false end + + logger.info "Package #{packageName.downcase} updated (svn update)" else # package exists, but not an valid tree. logger.error "Package #{packageName} exists, but not valid package tree (svn)." @@ -216,12 +215,12 @@ if File.directory?($PACKAGE_PATH) # check if svn directory. if File.directory?("#{$PACKAGE_PATH}/.svn") - if system("svn update #{$PACKAGE_PATH}") - logger.info "Package tree updated (svn update)" - else - logger.error "Package tree unable to update (svn update)." - return false + if (system("svn update #{$PACKAGE_PATH}") != 0) + logger.error "Package tree unable to update (svn update)." + return false end + + logger.info "Package tree updated (svn update)" else # package directory exists, but is not a valid tree. logger.error "Package tree exists, but is not valid svn tree." Modified: src/trunk/libs/abtpackage.rb =================================================================== --- src/trunk/libs/abtpackage.rb 2008-01-27 10:39:40 UTC (rev 488) +++ src/trunk/libs/abtpackage.rb 2008-01-27 21:11:45 UTC (rev 489) @@ -78,7 +78,7 @@ end Dir.chdir($BUILD_LOCATION) - if (!system("#{unpackTool} #{sourcesToUnpack}")) + if (system("#{unpackTool} #{sourcesToUnpack}") != 0) return false end @@ -252,7 +252,7 @@ Dir.chdir("#{$BUILD_LOCATION}/#{@srcDir}") - if (!system(command)) + if (system(command) != 0) puts "[AbtPackage.configure] - configure section failed." return false end @@ -280,7 +280,7 @@ Dir.chdir("#{$BUILD_LOCATION}/#{@srcDir}") - if(!system(command)) + if(system(command) != 0) puts "[AbtPackage.build] - build section failed." return false end @@ -328,7 +328,7 @@ Dir.chdir("#{$BUILD_LOCATION}/#{@srcDir}") - if(!system(command)) + if(system(command) != 0) puts "[AbtPackage.install] - install section failed." return false end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-27 10:39:38
|
Revision: 488 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=488&view=rev Author: eschabell Date: 2008-01-27 02:39:40 -0800 (Sun, 27 Jan 2008) Log Message: ----------- Updated abt main file to fix missing package directory, now running any abt command the first time should check and setup the system (in /usr/local by default) to work with abt package manager. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2008-01-27 09:19:16 UTC (rev 487) +++ src/trunk/abt.rb 2008-01-27 10:39:40 UTC (rev 488) @@ -83,15 +83,34 @@ system("svn export #{$ABTLINUX_MAIN_CONFIG} #{configfile}") end - $LOAD_PATH.unshift "#{$DEFAULT_PREFIX}/etc/abt/" - load 'abtconfig.rb' - if File.exist?("#{$DEFAULT_PREFIX}/etc/abt/local/localconfig.rb") $LOAD_PATH.unshift maxconfigpath load 'localconfig.rb' end end +# should be installed, load config. +$LOAD_PATH.unshift "#{$DEFAULT_PREFIX}/etc/abt/" +load 'abtconfig.rb' + +# Check for missing default packages path, if needed install them. +# +if (! File.directory?($PACKAGE_PATH) || (Dir.entries($PACKAGE_PATH) - [ '.', '..' ]).empty?) + puts "\nMissing our main packages directory at #{$PACKAGE_PATH}" + puts "\nMaybe time for an abt update? Let us try to fix it for you!\n" + + # check for root login. + if (Process.uid != 0) + puts "\nMust be root to install package files." + exit + else + FileUtils.mkdir_p($PACKAGE_PATH) + puts "Created missing directory: #{$PACKAGE_PATH}" + end + + system("svn --force export #{$ABTLINUX_PACKAGES} #{$PACKAGE_PATH}") +end + ## # Setup needed classes and get ready to parse arguments. ## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-27 09:19:12
|
Revision: 487 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=487&view=rev Author: eschabell Date: 2008-01-27 01:19:16 -0800 (Sun, 27 Jan 2008) Log Message: ----------- Adjusted startup to initialize logging directories as needed if missing. Modified Paths: -------------- src/trunk/abt.rb src/trunk/libs/abtlogmanager.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2008-01-21 21:53:38 UTC (rev 486) +++ src/trunk/abt.rb 2008-01-27 09:19:16 UTC (rev 487) @@ -101,7 +101,12 @@ system = AbtSystemManager.new options = Hash.new show = AbtUsage.new +myLogger = AbtLogManager.new # initializes all ABT directories if missing. +# setup timestamp. +logger = Logger.new($JOURNAL) # initializes all needed paths. +logger.datetime_format = "%Y-%m-%d %H:%M:%S " + # deal with usage request. if (ARGV.length == 0 || (ARGV.length == 1 && (ARGV[0] == '--help' || ARGV[0] == '-h' || ARGV[0].downcase == 'help'))) show.usage("all") @@ -111,13 +116,6 @@ # login as root for the rest. manager.root_login(ARGV) -# setup timestamp. -logger = Logger.new($JOURNAL) # initializes all needed paths. -logger.datetime_format = "%Y-%m-%d %H:%M:%S " - -# TODO: used only until refactoring done. -myLogger = AbtLogManager.new - # And loading local file if found. if File.exist?("#{$DEFAULT_PREFIX}/etc/abt/local/localconfig.rb") load "#{$DEFAULT_PREFIX}/etc/abt/local/localconfig.rb" Modified: src/trunk/libs/abtlogmanager.rb =================================================================== --- src/trunk/libs/abtlogmanager.rb 2008-01-21 21:53:38 UTC (rev 486) +++ src/trunk/libs/abtlogmanager.rb 2008-01-27 09:19:16 UTC (rev 487) @@ -78,7 +78,12 @@ # <b>RETURN</b> <i>AbtLogManager</i> - an initialized AbtLogManager object. ## def initialize - logger = Logger.new($JOURNAL) + if (! File.directory?($JOURNAL)) + # logging directory missing, create it! + FileUtils.mkdir_p($ABT_LOGS) + end + + logger = Logger.new($JOURNAL) [$ABT_LOGS, $ABT_CACHES, $ABT_STATE, $BUILD_LOCATION, $PACKAGE_INSTALLED, $ABT_LIBS, $PACKAGE_CACHED, $ABT_TMP, $ABT_CONFIG, $ABT_LOCAL_CONFIG, $SOURCES_REPOSITORY].each { |dir| This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-21 21:55:44
|
Revision: 486 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=486&view=rev Author: eschabell Date: 2008-01-21 13:53:38 -0800 (Mon, 21 Jan 2008) Log Message: ----------- Large refactoring of the auto installation part of abt.rb. Removed some logic errors in this code for a clean installation when run the first time (such as 'abt --help'), it now properly creates any missing directories and installs the central configuration file and all libs. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2008-01-21 21:47:58 UTC (rev 485) +++ src/trunk/abt.rb 2008-01-21 21:53:38 UTC (rev 486) @@ -27,11 +27,12 @@ # Check and install our library files. # -$DEFAULT_PREFIX = "/usr/local" +$DEFAULT_PREFIX = "/usr/local" +libpath = "#{$DEFAULT_PREFIX}/var/lib/abt" $ABTLINUX_CLASS_LIBS = "https://abtlinux.svn.sourceforge.net/svnroot/abtlinux/src/trunk/libs" -if (! File.directory?("#{$DEFAULT_PREFIX}/var/lib/abt") || Dir["#{$DEFAULT_PREFIX}/var/lib/abt"].empty?) - puts "\nMissing needed AbTLinux library files at /var/lib/abt" +if (! File.directory?(libpath) || Dir[libpath].empty?) + puts "\nMissing needed AbTLinux library files..." puts "\nMaybe time for an abt update? Let us try to fix it for you!\n" # check for root login. @@ -39,24 +40,33 @@ puts "\nMust be root to fix library files." exit else - system("svn co #{$ABTLINUX_CLASS_LIBS} #{$DEFAULT_PREFIX}/var/lib/abt/") + require 'fileutils' # needed here, normally in abtconfig. + + if (! File.directory?(libpath)) + FileUtils.mkdir_p(libpath) + puts "Created directory: #{libpath}" + end + + system("svn co #{$ABTLINUX_CLASS_LIBS} #{libpath}") end - - $LOAD_PATH.unshift "#{$DEFAULT_PREFIX}/var/lib/abt/" end +$LOAD_PATH.unshift libpath + # Load our central configuration file. # $ABTLINUX_MAIN_CONFIG = "https://abtlinux.svn.sourceforge.net/svnroot/abtlinux/src/trunk/abtconfig.rb" +configfile = "#{$DEFAULT_PREFIX}/etc/abt/abtconfig.rb" +maxconfigpath = "#{$DEFAULT_PREFIX}/etc/abt/local" -if File.exist?("#{$DEFAULT_PREFIX}/etc/abt/abtconfig.rb") +if File.exist?(configfile) $LOAD_PATH.unshift "#{$DEFAULT_PREFIX}/etc/abt/" load 'abtconfig.rb' else require 'fileutils' # need this here, usually in abtconfig. # missing configuration file, do some abt update? - puts "\nMissing our main configuration file at /etc/abt/abtconfig.rb" + puts "\nMissing our main configuration file at #{configfile}" puts "\nMaybe time for an abt update? Let us try to fix it for you!\n" # check for root login. @@ -64,25 +74,24 @@ puts "\nMust be root to fix configuration files." exit else - ["#{$DEFAULT_PREFIX}/etc/abt", "#{$DEFAULT_PREFIX}/etc/abt/local"].each { |dir| - if (! File.directory?(dir)) - FileUtils.mkdir_p(dir) - puts "Created directory: #{dir}." - end - } - system("svn export #{$ABTLINUX_MAIN_CONFIG} #{$DEFAULT_PREFIX}/etc/abt/abtconfig.rb") + if (! File.directory?(maxconfigpath)) + puts "debug: directory to be created: #{maxconfigpath}" + FileUtils.mkdir_p maxconfigpath + puts "Created directory: #{maxconfigpath}" + end + + system("svn export #{$ABTLINUX_MAIN_CONFIG} #{configfile}") end $LOAD_PATH.unshift "#{$DEFAULT_PREFIX}/etc/abt/" load 'abtconfig.rb' if File.exist?("#{$DEFAULT_PREFIX}/etc/abt/local/localconfig.rb") - $LOAD_PATH.unshift "#{$DEFAULT_PREFIX}/etc/abt/local/" + $LOAD_PATH.unshift maxconfigpath load 'localconfig.rb' end end - ## # Setup needed classes and get ready to parse arguments. ## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-21 21:49:28
|
Revision: 485 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=485&view=rev Author: eschabell Date: 2008-01-21 13:47:58 -0800 (Mon, 21 Jan 2008) Log Message: ----------- Small cosmetic fix, removed extra spaces. Modified Paths: -------------- src/trunk/abtconfig.rb Modified: src/trunk/abtconfig.rb =================================================================== --- src/trunk/abtconfig.rb 2008-01-21 21:22:35 UTC (rev 484) +++ src/trunk/abtconfig.rb 2008-01-21 21:47:58 UTC (rev 485) @@ -1,5 +1,5 @@ #!/usr/bin/ruby -w -$DEFAULT_PREFIX = "/usr/local" +$DEFAULT_PREFIX = "/usr/local" $LOAD_PATH.unshift "#{$DEFAULT_PREFIX}/var/lib/abt/" ## # abtconfig.rb This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-21 21:23:18
|
Revision: 484 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=484&view=rev Author: eschabell Date: 2008-01-21 13:22:35 -0800 (Mon, 21 Jan 2008) Log Message: ----------- Added missing require if abtconfig is missing. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2008-01-20 20:36:09 UTC (rev 483) +++ src/trunk/abt.rb 2008-01-21 21:22:35 UTC (rev 484) @@ -53,6 +53,8 @@ $LOAD_PATH.unshift "#{$DEFAULT_PREFIX}/etc/abt/" load 'abtconfig.rb' else + require 'fileutils' # need this here, usually in abtconfig. + # missing configuration file, do some abt update? puts "\nMissing our main configuration file at /etc/abt/abtconfig.rb" puts "\nMaybe time for an abt update? Let us try to fix it for you!\n" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-20 20:36:24
|
Revision: 483 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=483&view=rev Author: eschabell Date: 2008-01-20 12:36:09 -0800 (Sun, 20 Jan 2008) Log Message: ----------- Updated api docs. Modified Paths: -------------- src/trunk/doc/classes/AbtDepEngine.html src/trunk/doc/classes/AbtDownloadManager.html src/trunk/doc/classes/AbtLogManager.html src/trunk/doc/classes/AbtPackageManager.html src/trunk/doc/classes/AbtQueueManager.html src/trunk/doc/classes/AbtReportManager.html src/trunk/doc/classes/AbtSystemManager.html src/trunk/doc/classes/AbtUsage.html src/trunk/doc/classes/TestAbtDepEngine.html src/trunk/doc/classes/TestAbtDownloadManager.html src/trunk/doc/classes/TestAbtLogManager.html src/trunk/doc/classes/TestAbtPackage.html src/trunk/doc/classes/TestAbtPackageManager.html src/trunk/doc/classes/TestAbtQueueManager.html src/trunk/doc/classes/TestAbtReportManager.html src/trunk/doc/classes/TestAbtSystemManager.html src/trunk/doc/created.rid src/trunk/doc/files/libs/abtdownloadmanager_rb.html src/trunk/doc/files/libs/abtlogmanager_rb.html src/trunk/doc/files/libs/abtpackagemanager_rb.html src/trunk/doc/files/libs/abtreportmanager_rb.html src/trunk/doc/files/libs/abtsystemmanager_rb.html src/trunk/doc/files/libs/abtusage_rb.html src/trunk/doc/files/tests/testabtdownloadmanager_rb.html src/trunk/doc/files/tests/testabtlogmanager_rb.html src/trunk/doc/files/tests/testabtpackage_rb.html src/trunk/doc/files/tests/testabtpackagemanager_rb.html src/trunk/doc/files/tests/testabtreportmanager_rb.html src/trunk/doc/fr_method_index.html Modified: src/trunk/doc/classes/AbtDepEngine.html =================================================================== --- src/trunk/doc/classes/AbtDepEngine.html 2008-01-20 20:25:43 UTC (rev 482) +++ src/trunk/doc/classes/AbtDepEngine.html 2008-01-20 20:36:09 UTC (rev 483) @@ -118,7 +118,7 @@ <div class="sectiontitle">Methods</div> <ul> - <li><a href="#M000095">new</a></li> + <li><a href="#M000093">new</a></li> </ul> @@ -129,7 +129,7 @@ <div class="sectiontitle">Public Class methods</div> <div class="method"> <div class="title"> - <a name="M000095"></a><b>new</b>() + <a name="M000093"></a><b>new</b>() </div> <div class="description"> <p> @@ -141,8 +141,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000095_source')" id="l_M000095_source">show source</a> ]</p> - <div id="M000095_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000093_source')" id="l_M000093_source">show source</a> ]</p> + <div id="M000093_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtdepengine.rb, line 41</span> 41: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> Modified: src/trunk/doc/classes/AbtDownloadManager.html =================================================================== --- src/trunk/doc/classes/AbtDownloadManager.html 2008-01-20 20:25:43 UTC (rev 482) +++ src/trunk/doc/classes/AbtDownloadManager.html 2008-01-20 20:36:09 UTC (rev 483) @@ -254,7 +254,7 @@ <pre> <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 56</span> 56: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieve_package_source</span>(<span class="ruby-identifier">packageName</span>, <span class="ruby-identifier">destination</span>) -57: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}#{packageName}"</span> +57: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}/#{packageName}"</span> 58: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) 59: <span class="ruby-identifier">package</span> = <span class="ruby-identifier">eval</span>(<span class="ruby-identifier">packageName</span>.<span class="ruby-identifier">capitalize</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'.new'</span>) 60: @@ -298,12 +298,12 @@ <pre> <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 83</span> 83: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieve_package_tree</span>(<span class="ruby-identifier">packageTreeName</span>=<span class="ruby-value str">"AbTLinux"</span>) - 84: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) + 84: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) 85: 86: <span class="ruby-comment cmt"># check if package tree exists.</span> 87: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">$PACKAGE_PATH</span>) 88: <span class="ruby-comment cmt"># check if svn directory.</span> - 89: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-node">"#{$PACKAGE_PATH}.svn"</span>) + 89: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-node">"#{$PACKAGE_PATH}/.svn"</span>) 90: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"Package tree #{packageTreeName} already installed."</span> 91: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> 92: <span class="ruby-keyword kw">else</span> @@ -357,7 +357,7 @@ 179: <span class="ruby-comment cmt"># check if package exists in tree. </span> 180: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-node">"#{$PACKAGE_PATH}/#{packageName}.rb"</span>) 181: <span class="ruby-comment cmt"># check if svn directory.</span> -182: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-node">"#{$PACKAGE_PATH}.svn"</span>) +182: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-node">"#{$PACKAGE_PATH}/.svn"</span>) 183: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">system</span>(<span class="ruby-node">"svn update #{$PACKAGE_PATH}/#{packageName.downcase}.rb"</span>) 184: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"Package #{packageName.downcase} updated (svn update)"</span> 185: <span class="ruby-keyword kw">else</span> @@ -383,52 +383,53 @@ </div> <div class="method"> <div class="title"> - <a name="M000017"></a><b>update_package_tree</b>(packageTreeName="AbTLinux") + <a name="M000017"></a><b>update_package_tree</b>() </div> <div class="description"> - <p> -Updates the package tree. -</p> + <pre> + Updates the package tree. + + <b>PARAM</b> <i>String</i> - the name of the tree to be updated, defaults to AbTLinux repo. + + <b>RETURN</b> <i>boolean</i> - True if the package tree has been updated, + otherwise false. +</pre> <p> -<b>PARAM</b> <em>String</em> - the name of the tree to be updated, defaults -to AbTLinux repo. +def <a +href="AbtDownloadManager.html#M000017">update_package_tree</a>(packageTreeName="AbTLinux") </p> -<p> -<b>RETURN</b> <em>boolean</em> - True if the package tree has been updated, -otherwise false. -</p> </div> <div class="sourcecode"> <p class="source-link">[ <a href="javascript:toggleSource('M000017_source')" id="l_M000017_source">show source</a> ]</p> <div id="M000017_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 211</span> -211: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_package_tree</span>(<span class="ruby-identifier">packageTreeName</span>=<span class="ruby-value str">"AbTLinux"</span>) -212: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) -213: -214: <span class="ruby-comment cmt"># check if package tree exists.</span> -215: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">$PACKAGE_PATH</span>) -216: <span class="ruby-comment cmt"># check if svn directory.</span> -217: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-node">"#{$PACKAGE_PATH}.svn"</span>) -218: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">system</span>(<span class="ruby-node">"svn update #{$PACKAGE_PATH}"</span>) -219: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-value str">"Package tree updated (svn update)"</span> -220: <span class="ruby-keyword kw">else</span> -221: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"Package tree unable to update (svn update)."</span> -222: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -223: <span class="ruby-keyword kw">end</span> -224: <span class="ruby-keyword kw">else</span> -225: <span class="ruby-comment cmt"># package directory exists, but is not a valid tree.</span> -226: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"Package tree exists, but is not valid svn tree."</span> -227: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -228: <span class="ruby-keyword kw">end</span> -229: <span class="ruby-keyword kw">else</span> -230: <span class="ruby-comment cmt"># package directory does not exist.</span> -231: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"Package tree not installed!"</span> -232: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -233: <span class="ruby-keyword kw">end</span> -234: -235: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -236: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 212</span> +212: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_package_tree</span>() +213: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) +214: +215: <span class="ruby-comment cmt"># check if package tree exists.</span> +216: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">$PACKAGE_PATH</span>) +217: <span class="ruby-comment cmt"># check if svn directory.</span> +218: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-node">"#{$PACKAGE_PATH}/.svn"</span>) +219: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">system</span>(<span class="ruby-node">"svn update #{$PACKAGE_PATH}"</span>) +220: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-value str">"Package tree updated (svn update)"</span> +221: <span class="ruby-keyword kw">else</span> +222: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"Package tree unable to update (svn update)."</span> +223: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +224: <span class="ruby-keyword kw">end</span> +225: <span class="ruby-keyword kw">else</span> +226: <span class="ruby-comment cmt"># package directory exists, but is not a valid tree.</span> +227: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"Package tree exists, but is not valid svn tree."</span> +228: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +229: <span class="ruby-keyword kw">end</span> +230: <span class="ruby-keyword kw">else</span> +231: <span class="ruby-comment cmt"># package directory does not exist.</span> +232: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"Package tree not installed!"</span> +233: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +234: <span class="ruby-keyword kw">end</span> +235: +236: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +237: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -455,20 +456,20 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000018_source')" id="l_M000018_source">show source</a> ]</p> <div id="M000018_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 247</span> -247: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validated</span>(<span class="ruby-identifier">hashvalue</span>, <span class="ruby-identifier">path</span>) -248: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) -249: -250: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hashvalue</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">SHA1</span>.<span class="ruby-identifier">hexdigest</span>(<span class="ruby-identifier">path</span>) -251: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"Source hash validated successfully..."</span> -252: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">"Validated sources successfully..."</span>) -253: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -254: <span class="ruby-keyword kw">end</span> -255: -256: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"Source hash failed validation..."</span> -257: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">"Validating sources failed..."</span>) -258: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -259: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 248</span> +248: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validated</span>(<span class="ruby-identifier">hashvalue</span>, <span class="ruby-identifier">path</span>) +249: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) +250: +251: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hashvalue</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">SHA1</span>.<span class="ruby-identifier">hexdigest</span>(<span class="ruby-identifier">path</span>) +252: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"Source hash validated successfully..."</span> +253: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">"Validated sources successfully..."</span>) +254: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +255: <span class="ruby-keyword kw">end</span> +256: +257: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"Source hash failed validation..."</span> +258: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">"Validating sources failed..."</span>) +259: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +260: <span class="ruby-keyword kw">end</span> </pre> </div> </div> Modified: src/trunk/doc/classes/AbtLogManager.html =================================================================== --- src/trunk/doc/classes/AbtLogManager.html 2008-01-20 20:25:43 UTC (rev 482) +++ src/trunk/doc/classes/AbtLogManager.html 2008-01-20 20:36:09 UTC (rev 483) @@ -117,12 +117,11 @@ <div class="sectiontitle">Methods</div> <ul> - <li><a href="#M000070">cache_package</a></li> - <li><a href="#M000065">get_log</a></li> - <li><a href="#M000069">log_package_build</a></li> - <li><a href="#M000068">log_package_install</a></li> - <li><a href="#M000067">log_package_integrity</a></li> - <li><a href="#M000066">new</a></li> + <li><a href="#M000064">get_log</a></li> + <li><a href="#M000068">log_package_build</a></li> + <li><a href="#M000067">log_package_install</a></li> + <li><a href="#M000066">log_package_integrity</a></li> + <li><a href="#M000065">new</a></li> </ul> @@ -133,7 +132,7 @@ <div class="sectiontitle">Public Class methods</div> <div class="method"> <div class="title"> - <a name="M000066"></a><b>new</b>() + <a name="M000065"></a><b>new</b>() </div> <div class="description"> <p> @@ -146,8 +145,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000066_source')" id="l_M000066_source">show source</a> ]</p> - <div id="M000066_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000065_source')" id="l_M000065_source">show source</a> ]</p> + <div id="M000065_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 80</span> 80: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> @@ -168,113 +167,10 @@ <div class="sectiontitle">Public Instance methods</div> <div class="method"> <div class="title"> - <a name="M000070"></a><b>cache_package</b>(package) + <a name="M000064"></a><b>get_log</b>(package, type) </div> <div class="description"> <p> -Provides a complete log of the given packages build. Includes everything -needed to duplicate the build at a later date. -</p> -<p> -<b>PARAM</b> <em>String</em> - Package name. -</p> -<p> -<b>RETURN</b> <em>boolean</em> - True if package cache created -successfully, otherwise false. -</p> - </div> -<div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000070_source')" id="l_M000070_source">show source</a> ]</p> - <div id="M000070_source" class="dyn-source"> -<pre> - <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 207</span> -207: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cache_package</span>(<span class="ruby-identifier">package</span>) -208: <span class="ruby-identifier">system</span> = <span class="ruby-constant">AbtSystemManager</span>.<span class="ruby-identifier">new</span> -209: -210: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">system</span>.<span class="ruby-identifier">package_installed</span>(<span class="ruby-identifier">package</span>)) -211: <span class="ruby-identifier">sw</span> = <span class="ruby-identifier">eval</span>(<span class="ruby-node">"#{package.capitalize}.new"</span>) -212: <span class="ruby-identifier">cachedDir</span> = <span class="ruby-identifier">$PACKAGE_CACHED</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"/"</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">sw</span>.<span class="ruby-identifier">srcDir</span> -213: <span class="ruby-identifier">sourcePath</span> = <span class="ruby-identifier">$SOURCES_REPOSITORY</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"/"</span> <span class="ruby-operator">+</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">sw</span>.<span class="ruby-identifier">srcUrl</span>) -214: <span class="ruby-identifier">sourceFile</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">sw</span>.<span class="ruby-identifier">srcUrl</span>) -215: <span class="ruby-identifier">installLog</span> = <span class="ruby-identifier">get_log</span>(<span class="ruby-identifier">package</span>, <span class="ruby-value str">'install'</span>) -216: <span class="ruby-identifier">buildLog</span> = <span class="ruby-identifier">get_log</span>(<span class="ruby-identifier">package</span>, <span class="ruby-value str">'build'</span>) -217: <span class="ruby-identifier">configureLog</span> = <span class="ruby-identifier">get_log</span>(<span class="ruby-identifier">package</span>, <span class="ruby-value str">'configure'</span>) -218: <span class="ruby-identifier">integrityLog</span> = <span class="ruby-identifier">get_log</span>(<span class="ruby-identifier">package</span>, <span class="ruby-value str">'integrity'</span>) -219: <span class="ruby-identifier">packageFile</span> = <span class="ruby-node">"#{$PACKAGE_PATH}#{package}.rb"</span> -220: -221: -222: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">cachedDir</span>) -223: -224: <span class="ruby-comment cmt"># collect package source.</span> -225: <span class="ruby-keyword kw">if</span> (<span class="ruby-constant">FileTest</span><span class="ruby-operator">::</span><span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">sourcePath</span>)) -226: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">copy_file</span>(<span class="ruby-identifier">sourcePath</span>, <span class="ruby-node">"#{cachedDir}/#{sourceFile}"</span>) -227: <span class="ruby-identifier">puts</span> <span class="ruby-node">"\nCaching copy of #{package} source."</span> -228: <span class="ruby-keyword kw">else</span> -229: <span class="ruby-identifier">puts</span> <span class="ruby-node">"\nUnable to cache copy of #{package} source."</span> -230: <span class="ruby-keyword kw">end</span> -231: -232: <span class="ruby-comment cmt"># collect package install log. </span> -233: <span class="ruby-keyword kw">if</span> (<span class="ruby-constant">FileTest</span><span class="ruby-operator">::</span><span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">installLog</span>)) -234: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">copy_file</span>(<span class="ruby-identifier">installLog</span>, <span class="ruby-node">"#{cachedDir}/#{sw.srcDir}.install"</span>) -235: <span class="ruby-identifier">puts</span> <span class="ruby-node">"\nCaching copy of #{package} install log."</span> -236: <span class="ruby-keyword kw">else</span> -237: <span class="ruby-identifier">puts</span> <span class="ruby-node">"\nUnable to cache copy of #{package} install log."</span> -238: <span class="ruby-keyword kw">end</span> -239: -240: <span class="ruby-comment cmt"># collect package build log. </span> -241: <span class="ruby-keyword kw">if</span> (<span class="ruby-constant">FileTest</span><span class="ruby-operator">::</span><span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">buildLog</span>)) -242: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">copy_file</span>(<span class="ruby-identifier">buildLog</span>, <span class="ruby-node">"#{cachedDir}/#{sw.srcDir}.build"</span>) -243: <span class="ruby-identifier">puts</span> <span class="ruby-node">"\nCaching copy of #{package} build log."</span> -244: <span class="ruby-keyword kw">else</span> -245: <span class="ruby-identifier">puts</span> <span class="ruby-node">"\nUnable to cache copy of #{package} build log."</span> -246: <span class="ruby-keyword kw">end</span> -247: -248: <span class="ruby-comment cmt"># collect package configure log. </span> -249: <span class="ruby-keyword kw">if</span> (<span class="ruby-constant">FileTest</span><span class="ruby-operator">::</span><span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">configureLog</span>)) -250: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">copy_file</span>(<span class="ruby-identifier">configureLog</span>, <span class="ruby-node">"#{cachedDir}/#{sw.srcDir}.configure"</span>) -251: <span class="ruby-identifier">puts</span> <span class="ruby-node">"\nCaching copy of #{package} configure log."</span> -252: <span class="ruby-keyword kw">else</span> -253: <span class="ruby-identifier">puts</span> <span class="ruby-node">"\nUnable to cache copy of #{package} configure log."</span> -254: <span class="ruby-keyword kw">end</span> -255: -256: <span class="ruby-comment cmt"># collect package integrity log.</span> -257: <span class="ruby-keyword kw">if</span> (<span class="ruby-constant">FileTest</span><span class="ruby-operator">::</span><span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">integrityLog</span>)) -258: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">copy_file</span>(<span class="ruby-identifier">integrityLog</span>, <span class="ruby-node">"#{cachedDir}/#{sw.srcDir}.integrity"</span>) -259: <span class="ruby-identifier">puts</span> <span class="ruby-node">"\nCaching copy of #{package} integrity log."</span> -260: <span class="ruby-keyword kw">else</span> -261: <span class="ruby-identifier">puts</span> <span class="ruby-node">"\nUnable to cache copy of #{package} integrity log."</span> -262: <span class="ruby-keyword kw">end</span> -263: -264: <span class="ruby-comment cmt"># collect package description (class file).</span> -265: <span class="ruby-keyword kw">if</span> (<span class="ruby-constant">FileTest</span><span class="ruby-operator">::</span><span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">packageFile</span>)) -266: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">copy_file</span>(<span class="ruby-identifier">packageFile</span>, <span class="ruby-node">"#{cachedDir}/#{package}.rb"</span>) -267: <span class="ruby-identifier">puts</span> <span class="ruby-node">"\nCaching copy of #{package} package description."</span> -268: <span class="ruby-keyword kw">else</span> -269: <span class="ruby-identifier">puts</span> <span class="ruby-node">"\nUnable to cache copy of #{package} package description, from location #{packageFile}"</span> -270: <span class="ruby-keyword kw">end</span> -271: -272: <span class="ruby-comment cmt"># tar and bzip this directory (package-cache-version.tar.bz2) </span> -273: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-identifier">$PACKAGE_CACHED</span>) -274: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">system</span>(<span class="ruby-node">"tar -cf #{sw.srcDir}.tar #{sw.srcDir}"</span>) <span class="ruby-operator">&&</span> -275: <span class="ruby-identifier">system</span>(<span class="ruby-node">"bzip2 -f #{sw.srcDir}.tar"</span>)) -276: <span class="ruby-comment cmt"># last but not least, remove our tarball directory</span> -277: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span>(<span class="ruby-identifier">cachedDir</span>) -278: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -279: <span class="ruby-keyword kw">end</span> -280: <span class="ruby-keyword kw">end</span> -281: -282: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-comment cmt"># package not installed, can't cache it.</span> -283: <span class="ruby-keyword kw">end</span> -</pre> - </div> -</div> -</div> -<div class="method"> - <div class="title"> - <a name="M000065"></a><b>get_log</b>(package, type) - </div> - <div class="description"> - <p> Returns the path to given packages install log. </p> <p> @@ -285,12 +181,12 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000065_source')" id="l_M000065_source">show source</a> ]</p> - <div id="M000065_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000064_source')" id="l_M000064_source">show source</a> ]</p> + <div id="M000064_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 43</span> 43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_log</span>(<span class="ruby-identifier">package</span>, <span class="ruby-identifier">type</span>) -44: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}#{package}"</span> +44: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}/#{package}"</span> 45: <span class="ruby-identifier">sw</span> = <span class="ruby-identifier">eval</span>(<span class="ruby-node">"#{package.capitalize}.new"</span>) 46: <span class="ruby-identifier">details</span> = <span class="ruby-identifier">sw</span>.<span class="ruby-identifier">details</span> 47: @@ -324,7 +220,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000069"></a><b>log_package_build</b>(package) + <a name="M000068"></a><b>log_package_build</b>(package) </div> <div class="description"> <p> @@ -340,8 +236,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000069_source')" id="l_M000069_source">show source</a> ]</p> - <div id="M000069_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000068_source')" id="l_M000068_source">show source</a> ]</p> + <div id="M000068_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 187</span> 187: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_package_build</span>(<span class="ruby-identifier">package</span>) @@ -360,7 +256,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000068"></a><b>log_package_install</b>(package) + <a name="M000067"></a><b>log_package_install</b>(package) </div> <div class="description"> <p> @@ -376,8 +272,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000068_source')" id="l_M000068_source">show source</a> ]</p> - <div id="M000068_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000067_source')" id="l_M000067_source">show source</a> ]</p> + <div id="M000067_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 139</span> 139: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_package_install</span>(<span class="ruby-identifier">package</span>) @@ -424,7 +320,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000067"></a><b>log_package_integrity</b>(package) + <a name="M000066"></a><b>log_package_integrity</b>(package) </div> <div class="description"> <p> @@ -441,8 +337,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000067_source')" id="l_M000067_source">show source</a> ]</p> - <div id="M000067_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000066_source')" id="l_M000066_source">show source</a> ]</p> + <div id="M000066_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 102</span> 102: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_package_integrity</span>(<span class="ruby-identifier">package</span>) Modified: src/trunk/doc/classes/AbtPackageManager.html =================================================================== --- src/trunk/doc/classes/AbtPackageManager.html 2008-01-20 20:25:43 UTC (rev 482) +++ src/trunk/doc/classes/AbtPackageManager.html 2008-01-20 20:36:09 UTC (rev 483) @@ -118,13 +118,13 @@ <div class="sectiontitle">Methods</div> <ul> - <li><a href="#M000047">downgrade_package</a></li> - <li><a href="#M000048">freeze_package</a></li> + <li><a href="#M000049">cache_package</a></li> + <li><a href="#M000047">freeze_package</a></li> <li><a href="#M000044">install_package</a></li> <li><a href="#M000043">new</a></li> <li><a href="#M000045">reinstall_package</a></li> <li><a href="#M000046">remove_package</a></li> - <li><a href="#M000049">root_login</a></li> + <li><a href="#M000048">root_login</a></li> </ul> @@ -161,48 +161,111 @@ <div class="sectiontitle">Public Instance methods</div> <div class="method"> <div class="title"> - <a name="M000047"></a><b>downgrade_package</b>(package, version) + <a name="M000049"></a><b>cache_package</b>(package) </div> <div class="description"> <p> -Downgrades a given package. +Provides a complete log of the given packages build. Includes everything +needed to duplicate the build at a later date. </p> <p> -<b>PARAM</b> <em>String</em> - the name of the package to be downgraded. +<b>PARAM</b> <em>String</em> - Package name. </p> <p> -<b>PARAM</b> <em>String</em> - the version number to be downgraded to. +<b>RETURN</b> <em>boolean</em> - True if package cache created +successfully, otherwise false. </p> -<p> -<b>RETURN</b> <em>boolean</em> - True if the package is downgraded, -otherwise false. -</p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000047_source')" id="l_M000047_source">show source</a> ]</p> - <div id="M000047_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000049_source')" id="l_M000049_source">show source</a> ]</p> + <div id="M000049_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtpackagemanager.rb, line 350</span> -350: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">downgrade_package</span>(<span class="ruby-identifier">package</span>, <span class="ruby-identifier">version</span>) -351: <span class="ruby-identifier">system</span> = <span class="ruby-constant">AbtSystemManager</span>.<span class="ruby-identifier">new</span> -352: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) -353: -354: <span class="ruby-comment cmt"># check for frozen.</span> -355: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">system</span>.<span class="ruby-identifier">package_frozen</span>(<span class="ruby-identifier">package</span>)) -356: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"Package #{package} is frozen, can not proceed with downgrade package call."</span> -357: <span class="ruby-identifier">puts</span> <span class="ruby-node">"\nPackage #{package} is frozen, can not proceed with downgrade package call."</span> -358: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -359: <span class="ruby-keyword kw">end</span> -360: -361: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -362: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtpackagemanager.rb, line 428</span> +428: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cache_package</span>(<span class="ruby-identifier">package</span>) +429: <span class="ruby-identifier">system</span> = <span class="ruby-constant">AbtSystemManager</span>.<span class="ruby-identifier">new</span> +430: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">AbtLogManager</span>.<span class="ruby-identifier">new</span> +431: +432: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">system</span>.<span class="ruby-identifier">package_installed</span>(<span class="ruby-identifier">package</span>)) +433: <span class="ruby-identifier">sw</span> = <span class="ruby-identifier">eval</span>(<span class="ruby-node">"#{package.capitalize}.new"</span>) +434: <span class="ruby-identifier">cachedDir</span> = <span class="ruby-identifier">$PACKAGE_CACHED</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"/"</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">sw</span>.<span class="ruby-identifier">srcDir</span> +435: <span class="ruby-identifier">sourcePath</span> = <span class="ruby-identifier">$SOURCES_REPOSITORY</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"/"</span> <span class="ruby-operator">+</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">sw</span>.<span class="ruby-identifier">srcUrl</span>) +436: <span class="ruby-identifier">sourceFile</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">sw</span>.<span class="ruby-identifier">srcUrl</span>) +437: <span class="ruby-identifier">installLog</span> = <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">get_log</span>(<span class="ruby-identifier">package</span>, <span class="ruby-value str">'install'</span>) +438: <span class="ruby-identifier">buildLog</span> = <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">get_log</span>(<span class="ruby-identifier">package</span>, <span class="ruby-value str">'build'</span>) +439: <span class="ruby-identifier">configureLog</span> = <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">get_log</span>(<span class="ruby-identifier">package</span>, <span class="ruby-value str">'configure'</span>) +440: <span class="ruby-identifier">integrityLog</span> = <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">get_log</span>(<span class="ruby-identifier">package</span>, <span class="ruby-value str">'integrity'</span>) +441: <span class="ruby-identifier">packageFile</span> = <span class="ruby-node">"#{$PACKAGE_PATH}#{package}.rb"</span> +442: +443: +444: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">cachedDir</span>) +445: +446: <span class="ruby-comment cmt"># collect package source.</span> +447: <span class="ruby-keyword kw">if</span> (<span class="ruby-constant">FileTest</span><span class="ruby-operator">::</span><span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">sourcePath</span>)) +448: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">copy_file</span>(<span class="ruby-identifier">sourcePath</span>, <span class="ruby-node">"#{cachedDir}/#{sourceFile}"</span>) +449: <span class="ruby-identifier">puts</span> <span class="ruby-node">"\nCaching copy of #{package} source."</span> +450: <span class="ruby-keyword kw">else</span> +451: <span class="ruby-identifier">puts</span> <span class="ruby-node">"\nUnable to cache copy of #{package} source."</span> +452: <span class="ruby-keyword kw">end</span> +453: +454: <span class="ruby-comment cmt"># collect package install log. </span> +455: <span class="ruby-keyword kw">if</span> (<span class="ruby-constant">FileTest</span><span class="ruby-operator">::</span><span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">installLog</span>)) +456: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">copy_file</span>(<span class="ruby-identifier">installLog</span>, <span class="ruby-node">"#{cachedDir}/#{sw.srcDir}.install"</span>) +457: <span class="ruby-identifier">puts</span> <span class="ruby-node">"\nCaching copy of #{package} install log."</span> +458: <span class="ruby-keyword kw">else</span> +459: <span class="ruby-identifier">puts</span> <span class="ruby-node">"\nUnable to cache copy of #{package} install log."</span> +460: <span class="ruby-keyword kw">end</span> +461: +462: <span class="ruby-comment cmt"># collect package build log. </span> +463: <span class="ruby-keyword kw">if</span> (<span class="ruby-constant">FileTest</span><span class="ruby-operator">::</span><span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">buildLog</span>)) +464: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">copy_file</span>(<span class="ruby-identifier">buildLog</span>, <span class="ruby-node">"#{cachedDir}/#{sw.srcDir}.build"</span>) +465: <span class="ruby-identifier">puts</span> <span class="ruby-node">"\nCaching copy of #{package} build log."</span> +466: <span class="ruby-keyword kw">else</span> +467: <span class="ruby-identifier">puts</span> <span class="ruby-node">"\nUnable to cache copy of #{package} build log."</span> +468: <span class="ruby-keyword kw">end</span> +469: +470: <span class="ruby-comment cmt"># collect package configure log. </span> +471: <span class="ruby-keyword kw">if</span> (<span class="ruby-constant">FileTest</span><span class="ruby-operator">::</span><span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">configureLog</span>)) +472: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">copy_file</span>(<span class="ruby-identifier">configureLog</span>, <span class="ruby-node">"#{cachedDir}/#{sw.srcDir}.configure"</span>) +473: <span class="ruby-identifier">puts</span> <span class="ruby-node">"\nCaching copy of #{package} configure log."</span> +474: <span class="ruby-keyword kw">else</span> +475: <span class="ruby-identifier">puts</span> <span class="ruby-node">"\nUnable to cache copy of #{package} configure log."</span> +476: <span class="ruby-keyword kw">end</span> +477: +478: <span class="ruby-comment cmt"># collect package integrity log.</span> +479: <span class="ruby-keyword kw">if</span> (<span class="ruby-constant">FileTest</span><span class="ruby-operator">::</span><span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">integrityLog</span>)) +480: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">copy_file</span>(<span class="ruby-identifier">integrityLog</span>, <span class="ruby-node">"#{cachedDir}/#{sw.srcDir}.integrity"</span>) +481: <span class="ruby-identifier">puts</span> <span class="ruby-node">"\nCaching copy of #{package} integrity log."</span> +482: <span class="ruby-keyword kw">else</span> +483: <span class="ruby-identifier">puts</span> <span class="ruby-node">"\nUnable to cache copy of #{package} integrity log."</span> +484: <span class="ruby-keyword kw">end</span> +485: +486: <span class="ruby-comment cmt"># collect package description (class file).</span> +487: <span class="ruby-keyword kw">if</span> (<span class="ruby-constant">FileTest</span><span class="ruby-operator">::</span><span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">packageFile</span>)) +488: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">copy_file</span>(<span class="ruby-identifier">packageFile</span>, <span class="ruby-node">"#{cachedDir}/#{package}.rb"</span>) +489: <span class="ruby-identifier">puts</span> <span class="ruby-node">"\nCaching copy of #{package} package description."</span> +490: <span class="ruby-keyword kw">else</span> +491: <span class="ruby-identifier">puts</span> <span class="ruby-node">"\nUnable to cache copy of #{package} package description, from location #{packageFile}"</span> +492: <span class="ruby-keyword kw">end</span> +493: +494: <span class="ruby-comment cmt"># tar and bzip this directory (package-cache-version.tar.bz2) </span> +495: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-identifier">$PACKAGE_CACHED</span>) +496: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">system</span>(<span class="ruby-node">"tar -cf #{sw.srcDir}.tar #{sw.srcDir}"</span>) <span class="ruby-operator">&&</span> +497: <span class="ruby-identifier">system</span>(<span class="ruby-node">"bzip2 -f #{sw.srcDir}.tar"</span>)) +498: <span class="ruby-comment cmt"># last but not least, remove our tarball directory</span> +499: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span>(<span class="ruby-identifier">cachedDir</span>) +500: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +501: <span class="ruby-keyword kw">end</span> +502: <span class="ruby-keyword kw">end</span> +503: +504: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-comment cmt"># package not installed, can't cache it.</span> +505: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000048"></a><b>freeze_package</b>(package) + <a name="M000047"></a><b>freeze_package</b>(package) </div> <div class="description"> <p> @@ -218,40 +281,39 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000048_source')" id="l_M000048_source">show source</a> ]</p> - <div id="M000048_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000047_source')" id="l_M000047_source">show source</a> ]</p> + <div id="M000047_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtpackagemanager.rb, line 373</span> -373: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">freeze_package</span>(<span class="ruby-identifier">package</span>) -374: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}#{package}"</span> -375: <span class="ruby-identifier">sw</span> = <span class="ruby-identifier">eval</span>(<span class="ruby-node">"#{package.capitalize}.new"</span>) -376: <span class="ruby-identifier">myLogger</span> = <span class="ruby-constant">AbtLogManager</span>.<span class="ruby-identifier">new</span> <span class="ruby-comment cmt"># TODO: refactor myLogger.</span> -377: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) -378: <span class="ruby-identifier">system</span> = <span class="ruby-constant">AbtSystemManager</span>.<span class="ruby-identifier">new</span> -379: -380: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">system</span>.<span class="ruby-identifier">package_installed</span>(<span class="ruby-identifier">package</span>)) -381: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">system</span>.<span class="ruby-identifier">package_frozen</span>(<span class="ruby-identifier">package</span>)) -382: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Package #{package} is already frozen!"</span>) -383: -384: <span class="ruby-comment cmt"># package already frozen, need to un-freeze by removing frozen.log</span> -385: <span class="ruby-comment cmt"># file.</span> -386: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm</span> <span class="ruby-node">"#{$PACKAGE_INSTALLED}/#{sw.srcDir}/frozen.log"</span> -387: <span class="ruby-identifier">puts</span> <span class="ruby-node">"\nPackage #{package} was frozen, it has now been relased for use."</span> -388: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"Package #{package} released : removed file #{$PACKAGE_INSTALLED}/#{sw.srcDir}/frozen.log"</span> -389: <span class="ruby-keyword kw">else</span> -390: <span class="ruby-comment cmt"># place file in $PACKAGE_INSTALLED frozen.log with date.</span> -391: <span class="ruby-identifier">frozen</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-node">"#{$PACKAGE_INSTALLED}/#{sw.srcDir}/frozen.log"</span>, <span class="ruby-value str">"w"</span>) -392: <span class="ruby-identifier">frozen</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"#{$TIMESTAMP}"</span> -393: <span class="ruby-identifier">frozen</span>.<span class="ruby-identifier">close</span> -394: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Package #{package} is now frozen."</span>) -395: <span class="ruby-keyword kw">end</span> -396: -397: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -398: <span class="ruby-keyword kw">end</span> -399: -400: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Package #{package} is not installed, unable to freeze it."</span>) -401: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -402: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtpackagemanager.rb, line 367</span> +367: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">freeze_package</span>(<span class="ruby-identifier">package</span>) +368: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}/#{package}"</span> +369: <span class="ruby-identifier">sw</span> = <span class="ruby-identifier">eval</span>(<span class="ruby-node">"#{package.capitalize}.new"</span>) +370: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) +371: <span class="ruby-identifier">system</span> = <span class="ruby-constant">AbtSystemManager</span>.<span class="ruby-identifier">new</span> +372: +373: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">system</span>.<span class="ruby-identifier">package_installed</span>(<span class="ruby-identifier">package</span>)) +374: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">system</span>.<span class="ruby-identifier">package_frozen</span>(<span class="ruby-identifier">package</span>)) +375: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Package #{package} is already frozen!"</span>) +376: +377: <span class="ruby-comment cmt"># package already frozen, need to un-freeze by removing frozen.log</span> +378: <span class="ruby-comment cmt"># file.</span> +379: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm</span> <span class="ruby-node">"#{$PACKAGE_INSTALLED}/#{sw.srcDir}/frozen.log"</span> +380: <span class="ruby-identifier">puts</span> <span class="ruby-node">"\nPackage #{package} was frozen, it has now been relased for use."</span> +381: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"Package #{package} released : removed file #{$PACKAGE_INSTALLED}/#{sw.srcDir}/frozen.log"</span> +382: <span class="ruby-keyword kw">else</span> +383: <span class="ruby-comment cmt"># place file in $PACKAGE_INSTALLED frozen.log with date.</span> +384: <span class="ruby-identifier">frozen</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-node">"#{$PACKAGE_INSTALLED}/#{sw.srcDir}/frozen.log"</span>, <span class="ruby-value str">"w"</span>) +385: <span class="ruby-identifier">frozen</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"#{$TIMESTAMP}"</span> +386: <span class="ruby-identifier">frozen</span>.<span class="ruby-identifier">close</span> +387: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Package #{package} is now frozen."</span>) +388: <span class="ruby-keyword kw">end</span> +389: +390: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +391: <span class="ruby-keyword kw">end</span> +392: +393: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Package #{package} is not installed, unable to freeze it."</span>) +394: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +395: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -280,7 +342,7 @@ <pre> <span class="ruby-comment cmt"># File libs/abtpackagemanager.rb, line 91</span> 91: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">install_package</span>(<span class="ruby-identifier">package</span>, <span class="ruby-identifier">verbose</span>=<span class="ruby-keyword kw">true</span>) - 92: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}#{package}"</span> + 92: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}/#{package}"</span> 93: <span class="ruby-identifier">sw</span> = <span class="ruby-identifier">eval</span>(<span class="ruby-node">"#{package.capitalize}.new"</span>) 94: <span class="ruby-identifier">queuer</span> = <span class="ruby-constant">AbtQueueManager</span>.<span class="ruby-identifier">new</span> 95: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) @@ -427,63 +489,57 @@ <span class="ruby-comment cmt"># File libs/abtpackagemanager.rb, line 222</span> 222: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reinstall_package</span>(<span class="ruby-identifier">package</span>, <span class="ruby-identifier">automated_build</span>=<span class="ruby-keyword kw">false</span>) 223: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) -224: <span class="ruby-comment cmt"># TODO: look into refactoring myLogger:</span> -225: <span class="ruby-identifier">myLogger</span> = <span class="ruby-constant">AbtLogManager</span>.<span class="ruby-identifier">new</span> -226: <span class="ruby-identifier">system</span> = <span class="ruby-constant">AbtSystemManager</span>.<span class="ruby-identifier">new</span> -227: -228: <span class="ruby-comment cmt"># check for frozen.</span> -229: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">system</span>.<span class="ruby-identifier">package_frozen</span>(<span class="ruby-identifier">package</span>)) -230: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"Package #{package} is frozen, can not proceed with reinstall package call."</span> -231: <span class="ruby-identifier">puts</span> <span class="ruby-node">"\nPackage #{package} is frozen, can not proceed with reinstall package call."</span> -232: <span class="ruby... [truncated message content] |
From: <esc...@us...> - 2008-01-20 20:25:59
|
Revision: 482 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=482&view=rev Author: eschabell Date: 2008-01-20 12:25:43 -0800 (Sun, 20 Jan 2008) Log Message: ----------- Refactored to include a DEFAULT_PREFIX for all paths used by abt, default is /usr/local. This means entire abt setup is in /usr/local/*. Many fixes applied throughout code base to facilitate this rework. Modified Paths: -------------- src/trunk/abt.rb src/trunk/abtconfig.rb src/trunk/libs/abtdownloadmanager.rb src/trunk/libs/abtlogmanager.rb src/trunk/libs/abtpackagemanager.rb src/trunk/libs/abtreportmanager.rb src/trunk/libs/abtsystemmanager.rb src/trunk/tests/testabtdownloadmanager.rb src/trunk/tests/testabtpackage.rb src/trunk/tests/testabtreportmanager.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2008-01-20 20:07:24 UTC (rev 481) +++ src/trunk/abt.rb 2008-01-20 20:25:43 UTC (rev 482) @@ -27,9 +27,10 @@ # Check and install our library files. # +$DEFAULT_PREFIX = "/usr/local" $ABTLINUX_CLASS_LIBS = "https://abtlinux.svn.sourceforge.net/svnroot/abtlinux/src/trunk/libs" -if (! File.directory?('/var/lib/abt') || Dir["/var/lib/abt"].empty?) +if (! File.directory?("#{$DEFAULT_PREFIX}/var/lib/abt") || Dir["#{$DEFAULT_PREFIX}/var/lib/abt"].empty?) puts "\nMissing needed AbTLinux library files at /var/lib/abt" puts "\nMaybe time for an abt update? Let us try to fix it for you!\n" @@ -38,18 +39,18 @@ puts "\nMust be root to fix library files." exit else - system("svn co #{$ABTLINUX_CLASS_LIBS} /var/lib/abt/") + system("svn co #{$ABTLINUX_CLASS_LIBS} #{$DEFAULT_PREFIX}/var/lib/abt/") end - $LOAD_PATH.unshift '/var/lib/abt/' + $LOAD_PATH.unshift "#{$DEFAULT_PREFIX}/var/lib/abt/" end # Load our central configuration file. # $ABTLINUX_MAIN_CONFIG = "https://abtlinux.svn.sourceforge.net/svnroot/abtlinux/src/trunk/abtconfig.rb" -if File.exist?("/etc/abt/abtconfig.rb") - $LOAD_PATH.unshift '/etc/abt/' +if File.exist?("#{$DEFAULT_PREFIX}/etc/abt/abtconfig.rb") + $LOAD_PATH.unshift "#{$DEFAULT_PREFIX}/etc/abt/" load 'abtconfig.rb' else # missing configuration file, do some abt update? @@ -61,20 +62,20 @@ puts "\nMust be root to fix configuration files." exit else - ["/etc/abt", "/etc/abt/local"].each { |dir| + ["#{$DEFAULT_PREFIX}/etc/abt", "#{$DEFAULT_PREFIX}/etc/abt/local"].each { |dir| if (! File.directory?(dir)) FileUtils.mkdir_p(dir) puts "Created directory: #{dir}." end } - system("svn export #{$ABTLINUX_MAIN_CONFIG} /etc/abt/abtconfig.rb") + system("svn export #{$ABTLINUX_MAIN_CONFIG} #{$DEFAULT_PREFIX}/etc/abt/abtconfig.rb") end - $LOAD_PATH.unshift '/etc/abt/' + $LOAD_PATH.unshift "#{$DEFAULT_PREFIX}/etc/abt/" load 'abtconfig.rb' - if File.exist?("/etc/abt/local/localconfig.rb") - $LOAD_PATH.unshift '/etc/abt/local/' + if File.exist?("#{$DEFAULT_PREFIX}/etc/abt/local/localconfig.rb") + $LOAD_PATH.unshift "#{$DEFAULT_PREFIX}/etc/abt/local/" load 'localconfig.rb' end end @@ -107,8 +108,8 @@ myLogger = AbtLogManager.new # And loading local file if found. -if File.exist?("/etc/abt/local/localconfig.rb") - load '/etc/abt/local/localconfig.rb' +if File.exist?("#{$DEFAULT_PREFIX}/etc/abt/local/localconfig.rb") + load "#{$DEFAULT_PREFIX}/etc/abt/local/localconfig.rb" end @@ -117,7 +118,7 @@ # abt [ -i | install ] <package> when "install", "-i" - if (ARGV.length == 2 && File.exist?("#{$PACKAGE_PATH}#{ARGV[1]}.rb")) + if (ARGV.length == 2 && File.exist?("#{$PACKAGE_PATH}/#{ARGV[1]}.rb")) options['package'] = ARGV[1] logger.info("Starting to install #{options['package']}") @@ -135,7 +136,7 @@ puts "\n\n" logger.info("Completed install of #{options['package']}.") - if (myLogger.cache_package(options['package'])) + if (manager.cache_package(options['package'])) puts "\n\n" puts "*** Completed caching of package #{options['package']}. ***" puts "\n\n" @@ -152,7 +153,7 @@ end when "reinstall", "-ri" - if (ARGV.length == 2 && File.exist?("#{$PACKAGE_PATH}#{ARGV[1]}.rb")) + if (ARGV.length == 2 && File.exist?("#{$PACKAGE_PATH}/#{ARGV[1]}.rb")) options['package'] = ARGV[1] logger.info("Starting to reinstall #{options['package']}") @@ -180,7 +181,7 @@ puts "\n\n" puts "*** No need to remove #{options['package']}, it was not installed! ***" puts "\n\n" - logger.info("Unabel to complete removal of #{options['package']}.") + logger.info("Completed removal of #{options['package']}.") exit end @@ -189,11 +190,10 @@ puts "\n\n" puts "*** Completed removal of #{options['package']}. ***" puts "\n\n" - logger.info("Unabel to complete removal of #{options['package']}.") + logger.info("Complete removal of #{options['package']}.") + exit end - puts "\n*** Unable to completed removal of #{options['package']}, see why in the journal. ***" - logger.info("Unabel to complete removal of #{options['package']}.") else puts "\n*** Unable to completed removal of #{options['package']}, see why in the journal. ***" logger.info("Unabel to complete removal of #{options['package']}.") @@ -265,7 +265,7 @@ # abt show-details <package> when "show-details" - if (ARGV.length == 2 && File.exist?($PACKAGE_PATH + ARGV[1] + ".rb")) + if (ARGV.length == 2 && File.exist?("#{$PACKAGE_PATH}/#{ARGV[1]}.rb")) options['pkg'] = ARGV[1] logger.info("Starting show details for #{options['pkg']}") @@ -343,7 +343,7 @@ end when "show-depends" - if (ARGV.length == 2 && File.exist?($PACKAGE_PATH + ARGV[1] + ".rb")) + if (ARGV.length == 2 && File.exist?("#{$PACKAGE_PATH}/#{ARGV[1]}.rb")) options['pkg'] = ARGV[1] logger.info("Starting show depends for #{options['pkg']}") if (reporter.show_package_dependencies(options['pkg'])) @@ -471,7 +471,7 @@ # abt [-d | download ] <package> when "download", "-d" - if (ARGV.length == 2 && File.exist?($PACKAGE_PATH + ARGV[1] + ".rb")) + if (ARGV.length == 2 && File.exist?("#{$PACKAGE_PATH}/#{ARGV[1]}.rb")) options['pkg'] = ARGV[1] logger.info("Starting to download " + options['pkg']) @@ -696,13 +696,13 @@ end end - when "remove" + when "remove" # FIXME: implement this. - if options['repoUri'].length > 0 - puts "Removing package repository : " + options['repoUri'] - else - puts "Removing package repository : Default AbTLinux Package Tree" - end + if options['repoUri'].length > 0 + puts "TODO: Removing package repository : " + options['repoUri'] + else + puts "TODO: Removing package repository : Default AbTLinux Package Tree" + end when "list" # FIXME: implement this. Modified: src/trunk/abtconfig.rb =================================================================== --- src/trunk/abtconfig.rb 2008-01-20 20:07:24 UTC (rev 481) +++ src/trunk/abtconfig.rb 2008-01-20 20:25:43 UTC (rev 482) @@ -1,6 +1,6 @@ #!/usr/bin/ruby -w - -$LOAD_PATH.unshift '/var/lib/abt/' +$DEFAULT_PREFIX = "/usr/local" +$LOAD_PATH.unshift "#{$DEFAULT_PREFIX}/var/lib/abt/" ## # abtconfig.rb # @@ -43,19 +43,19 @@ require 'digest/sha1' # default paths / locations. -$ABT_LOGS = "/var/log/abt" -$ABT_CACHES = "/var/spool/abt" -$ABT_STATE = "/var/state/abt" +$ABT_LOGS = "#{$DEFAULT_PREFIX}/var/log/abt" +$ABT_CACHES = "#{$DEFAULT_PREFIX}/var/spool/abt" +$ABT_STATE = "#{$DEFAULT_PREFIX}/var/state/abt" $ABT_TMP = "/tmp/abt" -$ABT_CONFIG = "/etc/abt" -$ABT_LIBS = "/var/lib/abt" -$ABT_LOCAL_CONFIG = "/etc/abt/local" +$ABT_CONFIG = "#{$DEFAULT_PREFIX}/etc/abt" +$ABT_LIBS = "#{$DEFAULT_PREFIX}/var/lib/abt" +$ABT_LOCAL_CONFIG = "#{$DEFAULT_PREFIX}/etc/abt/local" $ABTNEWS_LOG = "#{$ABT_LOGS}/news.log" -$BUILD_LOCATION = "/usr/src" -$JOURNAL = "#{$ABT_LOGS}/journal.log" # use logger.info. +$BUILD_LOCATION = "#{$DEFAULT_PREFIX}/usr/src" +$JOURNAL = "#{$ABT_LOGS}/journal.log" # use logger.info. $PACKAGE_INSTALLED = "#{$ABT_STATE}/installed" $PACKAGE_CACHED = "#{$ABT_STATE}/cached" -$PACKAGE_PATH = "#{$ABT_CACHES}/packages/" +$PACKAGE_PATH = "#{$ABT_CACHES}/packages" $SOURCES_REPOSITORY = "#{$ABT_CACHES}/sources" @@ -64,7 +64,6 @@ $ABT_VERSION = "0.1" $BUILD_ARCHITECTURE = "i686" $BUILD_OPTIMIZATIONS = "strip" -$DEFAULT_PREFIX = "/usr/local" $REMOVE_BUILD_SOURCES = true $TIMESTAMP = Time.now.strftime( "%Y-%m-%d %H:%M:%S (%Z)" ) $PAGER_DEFAULT = "less -R -E -X -f" Modified: src/trunk/libs/abtdownloadmanager.rb =================================================================== --- src/trunk/libs/abtdownloadmanager.rb 2008-01-20 20:07:24 UTC (rev 481) +++ src/trunk/libs/abtdownloadmanager.rb 2008-01-20 20:25:43 UTC (rev 482) @@ -54,7 +54,7 @@ # downloaded, otherwise false. ## def retrieve_package_source(packageName, destination) - require "#{$PACKAGE_PATH}#{packageName}" + require "#{$PACKAGE_PATH}/#{packageName}" logger = Logger.new($JOURNAL) package = eval(packageName.capitalize + '.new') @@ -81,12 +81,12 @@ # otherwise false. ## def retrieve_package_tree(packageTreeName="AbTLinux") - logger = Logger.new($JOURNAL) + logger = Logger.new($JOURNAL) # check if package tree exists. if File.directory?($PACKAGE_PATH) # check if svn directory. - if File.directory?("#{$PACKAGE_PATH}.svn") + if File.directory?("#{$PACKAGE_PATH}/.svn") logger.info "Package tree #{packageTreeName} already installed." return true else @@ -179,7 +179,7 @@ # check if package exists in tree. if File.exists?("#{$PACKAGE_PATH}/#{packageName}.rb") # check if svn directory. - if File.directory?("#{$PACKAGE_PATH}.svn") + if File.directory?("#{$PACKAGE_PATH}/.svn") if system("svn update #{$PACKAGE_PATH}/#{packageName.downcase}.rb") logger.info "Package #{packageName.downcase} updated (svn update)" else @@ -208,13 +208,14 @@ # <b>RETURN</b> <i>boolean</i> - True if the package tree has been updated, # otherwise false. ## - def update_package_tree(packageTreeName="AbTLinux") - logger = Logger.new($JOURNAL) + #def update_package_tree(packageTreeName="AbTLinux") + def update_package_tree() + logger = Logger.new($JOURNAL) # check if package tree exists. if File.directory?($PACKAGE_PATH) # check if svn directory. - if File.directory?("#{$PACKAGE_PATH}.svn") + if File.directory?("#{$PACKAGE_PATH}/.svn") if system("svn update #{$PACKAGE_PATH}") logger.info "Package tree updated (svn update)" else Modified: src/trunk/libs/abtlogmanager.rb =================================================================== --- src/trunk/libs/abtlogmanager.rb 2008-01-20 20:07:24 UTC (rev 481) +++ src/trunk/libs/abtlogmanager.rb 2008-01-20 20:25:43 UTC (rev 482) @@ -41,7 +41,7 @@ # <b>RETURN</b> <i>String</i> - Full path to install log. ## def get_log(package, type) - require "#{$PACKAGE_PATH}#{package}" + require "#{$PACKAGE_PATH}/#{package}" sw = eval("#{package.capitalize}.new") details = sw.details Modified: src/trunk/libs/abtpackagemanager.rb =================================================================== --- src/trunk/libs/abtpackagemanager.rb 2008-01-20 20:07:24 UTC (rev 481) +++ src/trunk/libs/abtpackagemanager.rb 2008-01-20 20:25:43 UTC (rev 482) @@ -89,7 +89,7 @@ # false. ## def install_package(package, verbose=true) - require "#{$PACKAGE_PATH}#{package}" + require "#{$PACKAGE_PATH}/#{package}" sw = eval("#{package.capitalize}.new") queuer = AbtQueueManager.new logger = Logger.new($JOURNAL) @@ -251,11 +251,6 @@ end else puts "\n*** Package #{package} is not installed, we will install it for you now! ***\n" - puts "Hit enter to continue..." - while continue = STDIN.gets - continue.chomp! - break - end end if (install_package(package)) @@ -287,7 +282,7 @@ # false. ## def remove_package(package) - require "#{$PACKAGE_PATH}#{package}" + require "#{$PACKAGE_PATH}/#{package}" sw = eval("#{package.capitalize}.new") # TODO: refactor myLogger. myLogger = AbtLogManager.new @@ -370,7 +365,7 @@ # false. ## def freeze_package(package) - require "#{$PACKAGE_PATH}#{package}" + require "#{$PACKAGE_PATH}/#{package}" sw = eval("#{package.capitalize}.new") logger = Logger.new($JOURNAL) system = AbtSystemManager.new Modified: src/trunk/libs/abtreportmanager.rb =================================================================== --- src/trunk/libs/abtreportmanager.rb 2008-01-20 20:07:24 UTC (rev 481) +++ src/trunk/libs/abtreportmanager.rb 2008-01-20 20:25:43 UTC (rev 482) @@ -51,7 +51,7 @@ # otherwise false. ## def show_package_details(package) - require "#{$PACKAGE_PATH}#{package}" + require "#{$PACKAGE_PATH}/#{package}" if (package = eval("#{package.capitalize}.new")) details = package.details @@ -184,7 +184,7 @@ # hash of problem files and their encountered errors. ## def show_package_dependencies(package) - require "#{$PACKAGE_PATH}#{package}" + require "#{$PACKAGE_PATH}/#{package}" if (package = eval("#{package.capitalize}.new")) details = package.details @@ -284,8 +284,8 @@ packageName = packageArray[0] # check for match to name and description if the package file exists. - if (File.exist?("#{$PACKAGE_PATH}#{packageName}.rb")) - require "#{$PACKAGE_PATH}#{packageName}" + if (File.exist?("#{$PACKAGE_PATH}/#{packageName}.rb")) + require "#{$PACKAGE_PATH}/#{packageName}" sw = eval("#{packageName.capitalize}.new") # add if matches name or description entries. Modified: src/trunk/libs/abtsystemmanager.rb =================================================================== --- src/trunk/libs/abtsystemmanager.rb 2008-01-20 20:07:24 UTC (rev 481) +++ src/trunk/libs/abtsystemmanager.rb 2008-01-20 20:25:43 UTC (rev 482) @@ -196,7 +196,7 @@ # file names and the values are the package name and the problem detected. ## def verify_package_integrity(package) - require "#{$PACKAGE_PATH}#{package}" + require "#{$PACKAGE_PATH}/#{package}" sw = eval("#{package.capitalize}.new") # TODO: refactor myLogger. @@ -290,7 +290,7 @@ # false. ## def package_installed(package) - require "#{$PACKAGE_PATH}#{package}" + require "#{$PACKAGE_PATH}/#{package}" sw = eval("#{package.capitalize}.new") if (found_entry($PACKAGE_INSTALLED, sw.srcDir)) @@ -310,7 +310,7 @@ # false. ## def package_frozen(package) - require "#{$PACKAGE_PATH}#{package}" + require "#{$PACKAGE_PATH}/#{package}" sw = eval("#{package.capitalize}.new") # looking for frozen log file. Modified: src/trunk/tests/testabtdownloadmanager.rb =================================================================== --- src/trunk/tests/testabtdownloadmanager.rb 2008-01-20 20:07:24 UTC (rev 481) +++ src/trunk/tests/testabtdownloadmanager.rb 2008-01-20 20:25:43 UTC (rev 482) @@ -92,6 +92,6 @@ # ensure a tarball is available to test! FileUtils.cp "#{$PACKAGE_PATH}/ipc-1.4.tar.gz", "#{$SOURCES_REPOSITORY}", :verbose => true if !File.exist?("#{$SOURCES_REPOSITORY}/ipc-1.4.tar.gz") - assert(@download.validated('e81278607b1d65dcb18c3613ec00fbf588b50319', "#{$SOURCES_REPOSITORY}/ipc-1.4.tar.gz"), "test_validated") + assert(@download.validated('c7100a74f4f6cafa4607bc5bd68a1175a1876ecc', "#{$SOURCES_REPOSITORY}/ipc-1.4.tar.gz"), "test_validated") end end Modified: src/trunk/tests/testabtpackage.rb =================================================================== --- src/trunk/tests/testabtpackage.rb 2008-01-20 20:07:24 UTC (rev 481) +++ src/trunk/tests/testabtpackage.rb 2008-01-20 20:25:43 UTC (rev 482) @@ -1,11 +1,12 @@ #!/usr/bin/ruby -w $LOAD_PATH.unshift '../' -$LOAD_PATH.unshift '/var/spool/abt/packages/' require 'test/unit/testcase' require 'test/unit/autorunner' require 'abtconfig' + +$LOAD_PATH.unshift "#{$DEFAULT_PREFIX}/var/spool/abt/packages/" require 'ipc' ## Modified: src/trunk/tests/testabtreportmanager.rb =================================================================== --- src/trunk/tests/testabtreportmanager.rb 2008-01-20 20:07:24 UTC (rev 481) +++ src/trunk/tests/testabtreportmanager.rb 2008-01-20 20:25:43 UTC (rev 482) @@ -101,13 +101,6 @@ end ## - # Test method for 'AbtReportManager.test_show_package_dependencies()' - ## - def test_show_package_dependencies - assert(false, "test_show_package_dependencies()") - end - - ## # Test method for 'AbtReportManager.test_show_untracked_files()' ## def test_show_untracked_files This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-20 20:07:24
|
Revision: 481 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=481&view=rev Author: eschabell Date: 2008-01-20 12:07:24 -0800 (Sun, 20 Jan 2008) Log Message: ----------- Updated new files verifcation hash. Modified Paths: -------------- src/trunk/packages/ipc.rb Modified: src/trunk/packages/ipc.rb =================================================================== --- src/trunk/packages/ipc.rb 2008-01-20 16:47:12 UTC (rev 480) +++ src/trunk/packages/ipc.rb 2008-01-20 20:07:24 UTC (rev 481) @@ -50,7 +50,7 @@ 'reliesOn' => "", 'optionalDO' => "", 'optionalRO' => "", - 'hashCheck' => "e81278607b1d65dcb18c3613ec00fbf588b50319", + 'hashCheck' => "c7100a74f4f6cafa4607bc5bd68a1175a1876ecc", 'patches' => "", 'patchesHashCheck' => "", 'mirrorPath' => "", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-20 16:47:52
|
Revision: 480 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=480&view=rev Author: eschabell Date: 2008-01-20 08:47:12 -0800 (Sun, 20 Jan 2008) Log Message: ----------- removed a fixme marker in the commented out downgrade code. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2008-01-20 16:45:39 UTC (rev 479) +++ src/trunk/abt.rb 2008-01-20 16:47:12 UTC (rev 480) @@ -208,7 +208,7 @@ # if (ARGV.length == 3) # options['version'] = ARGV[1] # options['package'] = ARGV[2] -# # FIXME: downgrade pkg implementation. +# # downgrade pkg implementation. # print "Downgradinging package : #{options['package']} " # puts "to version : #{options['version']}" # else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-20 16:46:09
|
Revision: 479 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=479&view=rev Author: eschabell Date: 2008-01-20 08:45:39 -0800 (Sun, 20 Jan 2008) Log Message: ----------- Commented out the downgrade feature... this will be postponed for future implementation. After some discussion on the forums with LOW I have decided to comment this feature out and wait with it. Modified Paths: -------------- src/trunk/abt.rb src/trunk/libs/abtpackagemanager.rb src/trunk/libs/abtusage.rb src/trunk/tests/testabtpackagemanager.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2008-01-14 11:32:04 UTC (rev 478) +++ src/trunk/abt.rb 2008-01-20 16:45:39 UTC (rev 479) @@ -200,19 +200,22 @@ show.usage("packages") exit end + +## +# [POSTPONED FEATURE, TO BE ADDED AT LATER VERSION/DATE] +## +#when "downgrade", "-dg" +# if (ARGV.length == 3) +# options['version'] = ARGV[1] +# options['package'] = ARGV[2] +# # FIXME: downgrade pkg implementation. +# print "Downgradinging package : #{options['package']} " +# puts "to version : #{options['version']}" +# else +# show.usage("packages") +# exit +# end -when "downgrade", "-dg" - if (ARGV.length == 3) - options['version'] = ARGV[1] - options['package'] = ARGV[2] - # FIXME: downgrade pkg implementation. - print "Downgradinging package : #{options['package']} " - puts "to version : #{options['version']}" - else - show.usage("packages") - exit - end - when "freeze", "-f" if (ARGV.length == 2) options['package'] = ARGV[1] Modified: src/trunk/libs/abtpackagemanager.rb =================================================================== --- src/trunk/libs/abtpackagemanager.rb 2008-01-14 11:32:04 UTC (rev 478) +++ src/trunk/libs/abtpackagemanager.rb 2008-01-20 16:45:39 UTC (rev 479) @@ -337,7 +337,7 @@ end ## - # Downgrades a given package. + # Downgrades a given package. [POSTPONED FEATURE, TO BE ADDED AT LATER VERSION/DATE] # # <b>PARAM</b> <i>String</i> - the name of the package to be downgraded. # @@ -346,19 +346,19 @@ # <b>RETURN</b> <i>boolean</i> - True if the package is downgraded, otherwise # false. ## - def downgrade_package(package, version) - system = AbtSystemManager.new - logger = Logger.new($JOURNAL) - - # check for frozen. - if (system.package_frozen(package)) - logger.info "Package #{package} is frozen, can not proceed with downgrade package call." - puts "\nPackage #{package} is frozen, can not proceed with downgrade package call." - return false - end - - return false - end +# def downgrade_package(package, version) +# system = AbtSystemManager.new +# logger = Logger.new($JOURNAL) +# +# # check for frozen. +# if (system.package_frozen(package)) +# logger.info "Package #{package} is frozen, can not proceed with downgrade package call." +# puts "\nPackage #{package} is frozen, can not proceed with downgrade package call." +# return false +# end +# +# return false +# end ## # Freezes a given package. If successful will add give package to the frozen Modified: src/trunk/libs/abtusage.rb =================================================================== --- src/trunk/libs/abtusage.rb 2008-01-14 11:32:04 UTC (rev 478) +++ src/trunk/libs/abtusage.rb 2008-01-20 16:45:39 UTC (rev 479) @@ -76,9 +76,13 @@ puts " -i, install [package]\t\tInstall given package." puts " -ri, reinstall [package]\t\tReinstall given package." puts " -r, remove [package]\t\tRemove given package." - puts " -dg, downgrade [version] [package]\tDowngrade given package to given version." puts " -f, freeze [package]\t\tHolds given package at current version, prevents upgrades.\n" - puts "\t\t\t\t\tIf the given package is already frozen, it will be released.\n" + puts "\t\t\t\t\tIf the given package is already frozen, it will be released.\n" + + ## + # [POSTPONED FEATURE, TO BE ADDED AT LATER VERSION/DATE] + ## + # puts " -dg, downgrade [version] [package]\tDowngrade given package to given version." end ## Modified: src/trunk/tests/testabtpackagemanager.rb =================================================================== --- src/trunk/tests/testabtpackagemanager.rb 2008-01-14 11:32:04 UTC (rev 478) +++ src/trunk/tests/testabtpackagemanager.rb 2008-01-20 16:45:39 UTC (rev 479) @@ -98,20 +98,23 @@ assert(@pkgMgr.remove_package("ipc"), "test_remove_package()") end +## +# [POSTPONED FEATURE, TO BE ADDED AT LATER VERSION/DATE] +## ## # Test method for 'AbtPackageManager.test_downgrade_package()' ## - def test_downgrade_package - if !@system.package_installed("ipc") - @manager.install_package("ipc") - end - - if @system.package_frozen("ipc") - @manager.freeze_package("ipc") - end - - assert(@pkgMgr.downgrade_package("ipc", "1.2"), "test_downgrade_package()") - end +# def test_downgrade_package +# if !@system.package_installed("ipc") +# @manager.install_package("ipc") +# end +# +# if @system.package_frozen("ipc") +# @manager.freeze_package("ipc") +# end +# +# assert(@pkgMgr.downgrade_package("ipc", "1.2"), "test_downgrade_package()") +# end ## # Test method for 'AbtPackageManager.test_freeze_package()' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-14 11:32:11
|
Revision: 478 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=478&view=rev Author: eschabell Date: 2008-01-14 03:32:04 -0800 (Mon, 14 Jan 2008) Log Message: ----------- Refactored cache package from logmanager to the package manager, makes more sense to me. Fixed unit tests to reflect move. Modified Paths: -------------- src/trunk/libs/abtlogmanager.rb src/trunk/libs/abtpackagemanager.rb src/trunk/tests/testabtlogmanager.rb src/trunk/tests/testabtpackagemanager.rb Modified: src/trunk/libs/abtlogmanager.rb =================================================================== --- src/trunk/libs/abtlogmanager.rb 2008-01-12 18:32:06 UTC (rev 477) +++ src/trunk/libs/abtlogmanager.rb 2008-01-14 11:32:04 UTC (rev 478) @@ -194,92 +194,5 @@ return true end - - ## - # Provides a complete log of the given packages build. Includes everything - # needed to duplicate the build at a later date. - # - # <b>PARAM</b> <i>String</i> - Package name. - # - # <b>RETURN</b> <i>boolean</i> - True if package cache created successfully, - # otherwise false. - ## - def cache_package(package) - system = AbtSystemManager.new - - if (system.package_installed(package)) - sw = eval("#{package.capitalize}.new") - cachedDir = $PACKAGE_CACHED + "/" + sw.srcDir - sourcePath = $SOURCES_REPOSITORY + "/" + File.basename(sw.srcUrl) - sourceFile = File.basename(sw.srcUrl) - installLog = get_log(package, 'install') - buildLog = get_log(package, 'build') - configureLog = get_log(package, 'configure') - integrityLog = get_log(package, 'integrity') - packageFile = "#{$PACKAGE_PATH}#{package}.rb" - - - FileUtils.mkdir_p(cachedDir) - # collect package source. - if (FileTest::exist?(sourcePath)) - FileUtils.copy_file(sourcePath, "#{cachedDir}/#{sourceFile}") - puts "\nCaching copy of #{package} source." - else - puts "\nUnable to cache copy of #{package} source." - end - - # collect package install log. - if (FileTest::exist?(installLog)) - FileUtils.copy_file(installLog, "#{cachedDir}/#{sw.srcDir}.install") - puts "\nCaching copy of #{package} install log." - else - puts "\nUnable to cache copy of #{package} install log." - end - - # collect package build log. - if (FileTest::exist?(buildLog)) - FileUtils.copy_file(buildLog, "#{cachedDir}/#{sw.srcDir}.build") - puts "\nCaching copy of #{package} build log." - else - puts "\nUnable to cache copy of #{package} build log." - end - - # collect package configure log. - if (FileTest::exist?(configureLog)) - FileUtils.copy_file(configureLog, "#{cachedDir}/#{sw.srcDir}.configure") - puts "\nCaching copy of #{package} configure log." - else - puts "\nUnable to cache copy of #{package} configure log." - end - - # collect package integrity log. - if (FileTest::exist?(integrityLog)) - FileUtils.copy_file(integrityLog, "#{cachedDir}/#{sw.srcDir}.integrity") - puts "\nCaching copy of #{package} integrity log." - else - puts "\nUnable to cache copy of #{package} integrity log." - end - - # collect package description (class file). - if (FileTest::exist?(packageFile)) - FileUtils.copy_file(packageFile, "#{cachedDir}/#{package}.rb") - puts "\nCaching copy of #{package} package description." - else - puts "\nUnable to cache copy of #{package} package description, from location #{packageFile}" - end - - # tar and bzip this directory (package-cache-version.tar.bz2) - Dir.chdir($PACKAGE_CACHED) - if (system("tar -cf #{sw.srcDir}.tar #{sw.srcDir}") && - system("bzip2 -f #{sw.srcDir}.tar")) - # last but not least, remove our tarball directory - FileUtils.rm_rf(cachedDir) - return true - end - end - - return false # package not installed, can't cache it. - end - end Modified: src/trunk/libs/abtpackagemanager.rb =================================================================== --- src/trunk/libs/abtpackagemanager.rb 2008-01-12 18:32:06 UTC (rev 477) +++ src/trunk/libs/abtpackagemanager.rb 2008-01-14 11:32:04 UTC (rev 478) @@ -221,8 +221,7 @@ ## def reinstall_package(package, automated_build=false) logger = Logger.new($JOURNAL) - # TODO: look into refactoring myLogger: - myLogger = AbtLogManager.new + manager = AbtPackageManager.new system = AbtSystemManager.new # check for frozen. @@ -265,7 +264,7 @@ puts "\n\n" logger.info("Completed reinstall of #{package}.") - if (myLogger.cache_package(package)) + if (manager.cache_package(package)) puts "\n\n" puts "*** Completed caching of package #{package}. ***" puts "\n\n" @@ -421,4 +420,93 @@ exit end end + + ## + # Provides a complete log of the given packages build. Includes everything + # needed to duplicate the build at a later date. + # + # <b>PARAM</b> <i>String</i> - Package name. + # + # <b>RETURN</b> <i>boolean</i> - True if package cache created successfully, + # otherwise false. + ## + def cache_package(package) + system = AbtSystemManager.new + logger = AbtLogManager.new + + if (system.package_installed(package)) + sw = eval("#{package.capitalize}.new") + cachedDir = $PACKAGE_CACHED + "/" + sw.srcDir + sourcePath = $SOURCES_REPOSITORY + "/" + File.basename(sw.srcUrl) + sourceFile = File.basename(sw.srcUrl) + installLog = logger.get_log(package, 'install') + buildLog = logger.get_log(package, 'build') + configureLog = logger.get_log(package, 'configure') + integrityLog = logger.get_log(package, 'integrity') + packageFile = "#{$PACKAGE_PATH}#{package}.rb" + + + FileUtils.mkdir_p(cachedDir) + + # collect package source. + if (FileTest::exist?(sourcePath)) + FileUtils.copy_file(sourcePath, "#{cachedDir}/#{sourceFile}") + puts "\nCaching copy of #{package} source." + else + puts "\nUnable to cache copy of #{package} source." + end + + # collect package install log. + if (FileTest::exist?(installLog)) + FileUtils.copy_file(installLog, "#{cachedDir}/#{sw.srcDir}.install") + puts "\nCaching copy of #{package} install log." + else + puts "\nUnable to cache copy of #{package} install log." + end + + # collect package build log. + if (FileTest::exist?(buildLog)) + FileUtils.copy_file(buildLog, "#{cachedDir}/#{sw.srcDir}.build") + puts "\nCaching copy of #{package} build log." + else + puts "\nUnable to cache copy of #{package} build log." + end + + # collect package configure log. + if (FileTest::exist?(configureLog)) + FileUtils.copy_file(configureLog, "#{cachedDir}/#{sw.srcDir}.configure") + puts "\nCaching copy of #{package} configure log." + else + puts "\nUnable to cache copy of #{package} configure log." + end + + # collect package integrity log. + if (FileTest::exist?(integrityLog)) + FileUtils.copy_file(integrityLog, "#{cachedDir}/#{sw.srcDir}.integrity") + puts "\nCaching copy of #{package} integrity log." + else + puts "\nUnable to cache copy of #{package} integrity log." + end + + # collect package description (class file). + if (FileTest::exist?(packageFile)) + FileUtils.copy_file(packageFile, "#{cachedDir}/#{package}.rb") + puts "\nCaching copy of #{package} package description." + else + puts "\nUnable to cache copy of #{package} package description, from location #{packageFile}" + end + + # tar and bzip this directory (package-cache-version.tar.bz2) + Dir.chdir($PACKAGE_CACHED) + if (system("tar -cf #{sw.srcDir}.tar #{sw.srcDir}") && + system("bzip2 -f #{sw.srcDir}.tar")) + # last but not least, remove our tarball directory + FileUtils.rm_rf(cachedDir) + return true + end + end + + return false # package not installed, can't cache it. + end + end Modified: src/trunk/tests/testabtlogmanager.rb =================================================================== --- src/trunk/tests/testabtlogmanager.rb 2008-01-12 18:32:06 UTC (rev 477) +++ src/trunk/tests/testabtlogmanager.rb 2008-01-14 11:32:04 UTC (rev 478) @@ -96,15 +96,4 @@ assert(@logger.log_package_build("ipc"), "test_log_package_build()") end - ## - # Test method for 'AbtLogManager.test_cache_package()' - ## - def test_cache_package() - if !@system.package_installed("ipc") - @manager.install_package("ipc") - end - - assert(@logger.cache_package("ipc"), "test_cache_package()") - end - end Modified: src/trunk/tests/testabtpackagemanager.rb =================================================================== --- src/trunk/tests/testabtpackagemanager.rb 2008-01-12 18:32:06 UTC (rev 477) +++ src/trunk/tests/testabtpackagemanager.rb 2008-01-14 11:32:04 UTC (rev 478) @@ -130,5 +130,16 @@ assert(true) end end - + + ## + # Test method for 'AbtLogManager.test_cache_package()' + ## + def test_cache_package() + if !@system.package_installed("ipc") + @manager.install_package("ipc") + end + + assert(@manager.cache_package("ipc"), "test_cache_package()") + end + end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |