abtlinux-svn Mailing List for ABout Time Linux (AbTLinux) (Page 14)
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...> - 2006-11-25 16:09:51
|
Revision: 239 http://svn.sourceforge.net/abtlinux/?rev=239&view=rev Author: eschabell Date: 2006-11-25 08:09:51 -0800 (Sat, 25 Nov 2006) Log Message: ----------- Expanded the news retrieval to log the actions to our news log file. Modified Paths: -------------- src/trunk/AbtDownloadManager.rb Modified: src/trunk/AbtDownloadManager.rb =================================================================== --- src/trunk/AbtDownloadManager.rb 2006-11-25 15:19:01 UTC (rev 238) +++ src/trunk/AbtDownloadManager.rb 2006-11-25 16:09:51 UTC (rev 239) @@ -86,15 +86,25 @@ # Retrieves the given feed and displays the news items. # # <b>PARAM</b> <i>String</i> - the uri of the rss news feed to be retrieved. + # <b>PARAM</b> <i>String</i> - pass the value 'true' to empty the log file, + # otherwise it will be appended. # <b>RETURN</b> <i>boolean</i> - True if the AbTLinux news feed has been # retrieved, otherwise false. ## - def retrieveNewsFeed( uri ) + def retrieveNewsFeed( uri, cleanLog = "false" ) require 'net/http' require 'uri' require 'rss/1.0' require 'rss/2.0' - + newsLog = "" + + # ensure we have our news logfile. + if ( cleanLog == "true" ) + newsLog = File.new( $ABTNEWS_LOG, File::WRONLY|File::TRUNC|File::CREAT, 644 ) + else + newsLog = File.new( $ABTNEWS_LOG, File::WRONLY|File::APPEND|File::CREAT, 644 ) + end + # pick up the abtlinux.org news feed. if ( !news = Net::HTTP.get( URI.parse( uri ) ) ) logger.logToJournal( "Failed to retrieve news feed #{uri}." ) @@ -112,15 +122,18 @@ logger.logToJournal( "Failed to display news feed as feed #{uri} is not RSS 1.0/2.0." ) return false else - puts "*** #{rss.channel.title} ***" - + newsLog.puts "*** #{rss.channel.title} ***" + rss.items.each_with_index do |item, itemCount| itemCount += 1 - puts "#{itemCount} #{item.link} #{item.title}" + newsLog.puts "#{itemCount} #{item.link} #{item.title}" end end + newsLog.puts "\n" + newsLog.close return true + end ## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-25 15:19:03
|
Revision: 238 http://svn.sourceforge.net/abtlinux/?rev=238&view=rev Author: eschabell Date: 2006-11-25 07:19:01 -0800 (Sat, 25 Nov 2006) Log Message: ----------- Updated name change for global vars where used. Modified Paths: -------------- src/trunk/AbtPackage.rb src/trunk/AbtPackageManager.rb Modified: src/trunk/AbtPackage.rb =================================================================== --- src/trunk/AbtPackage.rb 2006-11-25 15:18:21 UTC (rev 237) +++ src/trunk/AbtPackage.rb 2006-11-25 15:19:01 UTC (rev 238) @@ -231,10 +231,10 @@ def configure #logger = AbtLogManager.new buildSite = "#{$BUILD_LOCATION}/#{@srcDir}" - #logger.logToJournal( "DEBUG: calling system - cd #{buildSite}; ./configure --prefix=#{$defaultPrefix}" ) + #logger.logToJournal( "DEBUG: calling system - cd #{buildSite}; ./configure --prefix=#{$DEFAULT_PREFIX}" ) # TODO: system call removal? - if ( !system( "cd #{buildSite}; ./configure --prefix=#{$defaultPrefix}" ) ) + if ( !system( "cd #{buildSite}; ./configure --prefix=#{$DEFAULT_PREFEX}" ) ) return false end @@ -279,8 +279,8 @@ # # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, otherwise false. ## - def removeBuildSources - if ( $removeBuildSources ) + def removeBuild + if ( $REMOVE_BUILD_SOURCES ) buildSourcesLocation = "#{$BUILD_LOCATION}/#{srcDir}" if ( !File.directory?( buildSourcesLocation ) ) Modified: src/trunk/AbtPackageManager.rb =================================================================== --- src/trunk/AbtPackageManager.rb 2006-11-25 15:18:21 UTC (rev 237) +++ src/trunk/AbtPackageManager.rb 2006-11-25 15:19:01 UTC (rev 238) @@ -91,7 +91,7 @@ # post section # remove build sources. # - if ( !sw.removeBuildSources ) + if ( !sw.removeBuild ) logger.logToJournal( "Failed to remove the build sources for #{package}." ) #return false # commented out as this is not a reason to fail. end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-25 15:18:21
|
Revision: 237 http://svn.sourceforge.net/abtlinux/?rev=237&view=rev Author: eschabell Date: 2006-11-25 07:18:21 -0800 (Sat, 25 Nov 2006) Log Message: ----------- Added version reporting. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-11-25 15:17:51 UTC (rev 236) +++ src/trunk/abt.rb 2006-11-25 15:18:21 UTC (rev 237) @@ -123,6 +123,15 @@ exit end + # abt -v | --version + when "-v", "--version" + if ( ARGV.length == 1 ) + puts "Abt Package Manager version is : #{$ABT_VERSION}" + else + show.usage( "queries" ) + exit + end + # abt show-details <package> when "show-details" if ( ARGV.length == 2 && File.exist?( $PACKAGE_PATH + ARGV[1] + ".rb" ) ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-25 15:17:50
|
Revision: 236 http://svn.sourceforge.net/abtlinux/?rev=236&view=rev Author: eschabell Date: 2006-11-25 07:17:51 -0800 (Sat, 25 Nov 2006) Log Message: ----------- Using global sourceforge var. Modified Paths: -------------- src/trunk/packages/ipc.rb Modified: src/trunk/packages/ipc.rb =================================================================== --- src/trunk/packages/ipc.rb 2006-11-25 15:14:27 UTC (rev 235) +++ src/trunk/packages/ipc.rb 2006-11-25 15:17:51 UTC (rev 236) @@ -42,7 +42,7 @@ 'version' => $version, 'srcDir' => $srcDir, 'homepage' => "http://isotopatcalc.sourceforge.net/", - 'srcUrl' => "http://osdn.dl.sourceforge.net/sourceforge/isotopatcalc/#{$srcDir}.tar.gz", + 'srcUrl' => "#{$SOURCEFORGE_URL}/isotopatcalc/#{$srcDir}.tar.gz", 'dependsOn' => "", 'reliesOn' => "", 'optionalDO' => "", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-25 15:14:29
|
Revision: 235 http://svn.sourceforge.net/abtlinux/?rev=235&view=rev Author: eschabell Date: 2006-11-25 07:14:27 -0800 (Sat, 25 Nov 2006) Log Message: ----------- Added diverse globals to config file and organized it a bit. Modified Paths: -------------- src/trunk/abtconfig.rb Modified: src/trunk/abtconfig.rb =================================================================== --- src/trunk/abtconfig.rb 2006-11-25 15:12:55 UTC (rev 234) +++ src/trunk/abtconfig.rb 2006-11-25 15:14:27 UTC (rev 235) @@ -24,20 +24,37 @@ # AbTLinux; if not, write to the Free Software Foundation, Inc., 51 Franklin # St, Fifth Floor, Boston, MA 02110-1301 USA ## + +# default paths / locations. $PACKAGE_PATH = "./packages/" $SOURCES_REPOSITORY = "/var/spool/abt/sources" $BUILD_LOCATION = "/usr/src" - -$ABTNEWS = "http://abtlinux.org/e107_plugins/rss_menu/rss.php?1.2" -$ABTNEWS_THREADS = "http://abtlinux.org/e107_plugins/rss_menu/rss.php?6.2" -$ABTNEWS_POSTS = "http://abtlinux.org/e107_plugins/rss_menu/rss.php?7.2" - $ABT_LOGS = "/var/log/abt" $JOURNAL = "#{$ABT_LOGS}/journal.log" -$TIMESTAMP = Time.now.strftime( "%Y-%m-%d %H:%M:%S (%Z)" ) # default config options. # -$removeBuildSources = false -$defaultPrefix = "/usr/local" +$ABT_VERSION = "0.1" +$BUILD_ARCHITECTURE = "x86_64" +$BUILD_OPTIMIZATIONS = "strip" +$DEFAULT_PREFIX = "/usr/local" +$REMOVE_BUILD_SOURCES = false +$TIMESTAMP = Time.now.strftime( "%Y-%m-%d %H:%M:%S (%Z)" ) +$PAGER_DEFAULT = "less -R -E -X -f" + + +# default URL listing. +# +$ABTNEWS = "http://abtlinux.org/e107_plugins/rss_menu/rss.php?1.2" +$ABTNEWS_POSTS = "http://abtlinux.org/e107_plugins/rss_menu/rss.php?7.2" +$ABTNEWS_THREADS = "http://abtlinux.org/e107_plugins/rss_menu/rss.php?6.2" + +$APACHE_URL = "http://www.ibiblio.org/pub/mirrors/apache" +$CTAN_URL = "ftp://tug.ctan.org/tex-archive" +$GNOME_URL = "ftp://ftp.gnome.org/pub/GNOME" +$GNU_URL = "ftp://ftp.gnu.org/pub/gnu" +$KDE_URL = "ftp://ftp.kde.org/pub/kde" +$KERNEL_URL = "ftp://ftp.kernel.org" +$SOURCEFORGE_URL = "http://osdn.dl.sourceforge.net/sourceforge" +$XFREE86_URL = "ftp://ftp.xfree86.org/pub/XFree86" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-25 15:12:55
|
Revision: 234 http://svn.sourceforge.net/abtlinux/?rev=234&view=rev Author: eschabell Date: 2006-11-25 07:12:55 -0800 (Sat, 25 Nov 2006) Log Message: ----------- Added versioning reporting for abt pkg manager in usage. Modified Paths: -------------- src/trunk/AbtUsage.rb Modified: src/trunk/AbtUsage.rb =================================================================== --- src/trunk/AbtUsage.rb 2006-11-22 20:08:58 UTC (rev 233) +++ src/trunk/AbtUsage.rb 2006-11-25 15:12:55 UTC (rev 234) @@ -88,6 +88,7 @@ def usageQueries puts "\nqueries:" puts " -s, search [string | regexp ]\tSearch package descriptions for given input." + puts " -v, --version\t\t\tShow abt package manager version." puts " show-details [package]\t\tShow give package details." puts " show-build [package]\t\tShow build log of given package." puts " show-depends [package]\t\tShow the dependency tree of given package." This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-22 20:09:03
|
Revision: 233 http://svn.sourceforge.net/abtlinux/?rev=233&view=rev Author: eschabell Date: 2006-11-22 12:08:58 -0800 (Wed, 22 Nov 2006) Log Message: ----------- Removed package generation. Regenerated docs. Modified Paths: -------------- src/trunk/doc/classes/AbtPackage.html src/trunk/doc/classes/AbtPackageManager.html src/trunk/doc/created.rid src/trunk/doc/files/AbtPackageManager_rb.html src/trunk/doc/files/AbtPackage_rb.html src/trunk/docGen.sh Modified: src/trunk/doc/classes/AbtPackage.html =================================================================== --- src/trunk/doc/classes/AbtPackage.html 2006-11-22 20:02:34 UTC (rev 232) +++ src/trunk/doc/classes/AbtPackage.html 2006-11-22 20:08:58 UTC (rev 233) @@ -361,9 +361,9 @@ <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"> <pre> - <span class="ruby-comment cmt"># File AbtPackage.rb, line 247</span> -247: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build</span> -248: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 249</span> +249: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build</span> +250: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -392,15 +392,17 @@ <pre> <span class="ruby-comment cmt"># File AbtPackage.rb, line 231</span> 231: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">configure</span> -232: <span class="ruby-identifier">require</span> <span class="ruby-value str">'open3'</span> +232: <span class="ruby-comment cmt">#logger = AbtLogManager.new</span> 233: <span class="ruby-identifier">buildSite</span> = <span class="ruby-node">"#{$BUILD_LOCATION}/#{@srcDir}"</span> -234: -235: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>( <span class="ruby-node">"cd #{buildSite}; make ./configure --prefix=#{$defaultPrefix}"</span> ) ) -236: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -237: <span class="ruby-keyword kw">end</span> -238: -239: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -240: <span class="ruby-keyword kw">end</span> +234: <span class="ruby-comment cmt">#logger.logToJournal( "DEBUG: calling system - cd #{buildSite}; ./configure --prefix=#{$defaultPrefix}" )</span> +235: +236: <span class="ruby-comment cmt"># TODO: system call removal?</span> +237: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>( <span class="ruby-node">"cd #{buildSite}; ./configure --prefix=#{$defaultPrefix}"</span> ) ) +238: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +239: <span class="ruby-keyword kw">end</span> +240: +241: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +242: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -465,9 +467,9 @@ <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"> <pre> - <span class="ruby-comment cmt"># File AbtPackage.rb, line 264</span> -264: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">install</span> -265: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 266</span> +266: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">install</span> +267: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -490,9 +492,9 @@ <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 AbtPackage.rb, line 272</span> -272: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post</span> -273: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 274</span> +274: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post</span> +275: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -559,9 +561,9 @@ <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"> <pre> - <span class="ruby-comment cmt"># File AbtPackage.rb, line 256</span> -256: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">preinstall</span> -257: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 258</span> +258: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">preinstall</span> +259: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -583,23 +585,23 @@ <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"> <pre> - <span class="ruby-comment cmt"># File AbtPackage.rb, line 280</span> -280: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">removeBuildSources</span> -281: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">$removeBuildSources</span> ) -282: <span class="ruby-identifier">buildSourcesLocation</span> = <span class="ruby-node">"#{$BUILD_LOCATION}/#{srcDir}"</span> -283: -284: <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">buildSourcesLocation</span> ) ) -285: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -286: <span class="ruby-keyword kw">end</span> -287: -288: <span class="ruby-comment cmt"># TODO: system call removal?</span> -289: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span> <span class="ruby-identifier">buildSourcesLocation</span>, <span class="ruby-identifier">:verbose</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">true</span> ) -290: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -291: <span class="ruby-keyword kw">end</span> -292: <span class="ruby-keyword kw">end</span> -293: -294: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -295: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 282</span> +282: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">removeBuildSources</span> +283: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">$removeBuildSources</span> ) +284: <span class="ruby-identifier">buildSourcesLocation</span> = <span class="ruby-node">"#{$BUILD_LOCATION}/#{srcDir}"</span> +285: +286: <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">buildSourcesLocation</span> ) ) +287: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +288: <span class="ruby-keyword kw">end</span> +289: +290: <span class="ruby-comment cmt"># TODO: system call removal?</span> +291: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span> <span class="ruby-identifier">buildSourcesLocation</span>, <span class="ruby-identifier">:verbose</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">true</span> ) +292: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +293: <span class="ruby-keyword kw">end</span> +294: <span class="ruby-keyword kw">end</span> +295: +296: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +297: <span class="ruby-keyword kw">end</span> </pre> </div> </div> Modified: src/trunk/doc/classes/AbtPackageManager.html =================================================================== --- src/trunk/doc/classes/AbtPackageManager.html 2006-11-22 20:02:34 UTC (rev 232) +++ src/trunk/doc/classes/AbtPackageManager.html 2006-11-22 20:08:58 UTC (rev 233) @@ -182,9 +182,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000044_source')" id="l_M000044_source">show source</a> ]</p> <div id="M000044_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 130</span> -130: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">downgradePackage</span>( <span class="ruby-identifier">package</span>, <span class="ruby-identifier">version</span> ) -131: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 134</span> +134: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">downgradePackage</span>( <span class="ruby-identifier">package</span>, <span class="ruby-identifier">version</span> ) +135: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -210,9 +210,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000045_source')" id="l_M000045_source">show source</a> ]</p> <div id="M000045_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 142</span> -142: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">freezePackage</span>( <span class="ruby-identifier">package</span> ) -143: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 146</span> +146: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">freezePackage</span>( <span class="ruby-identifier">package</span> ) +147: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -237,52 +237,56 @@ <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 AbtPackageManager.rb, line 52</span> -52: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">installPackage</span>( <span class="ruby-identifier">package</span> ) -53: <span class="ruby-identifier">require</span> <span class="ruby-identifier">package</span> -54: <span class="ruby-identifier">sw</span> = <span class="ruby-identifier">eval</span>( <span class="ruby-node">"#{package.capitalize}.new"</span> ) -55: -56: <span class="ruby-identifier">queuer</span> = <span class="ruby-constant">AbtQueueManager</span>.<span class="ruby-identifier">new</span> -57: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">AbtLogManager</span>.<span class="ruby-identifier">new</span> -58: -59: <span class="ruby-comment cmt"># get package details.</span> -60: <span class="ruby-identifier">details</span> = <span class="ruby-identifier">sw</span>.<span class="ruby-identifier">details</span> -61: -62: <span class="ruby-comment cmt"># TODO: check deps</span> -63: -64: <span class="ruby-comment cmt"># add to install queue.</span> -65: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">queuer</span>.<span class="ruby-identifier">addPackageToQueue</span>( <span class="ruby-identifier">package</span>, <span class="ruby-value str">"install"</span> ) ) -66: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to add #{package} to install queue."</span> ) -67: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -68: <span class="ruby-keyword kw">end</span> -69: -70: <span class="ruby-comment cmt"># pre section.</span> -71: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">sw</span>.<span class="ruby-identifier">pre</span> ) -72: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to process pre-section in the package description of #{package}."</span> ) -73: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -74: <span class="ruby-keyword kw">end</span> -75: -76: <span class="ruby-comment cmt"># configure section.</span> -77: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">sw</span>.<span class="ruby-identifier">configure</span> ) -78: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to process configure section in the package description of #{package}."</span> ) -79: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -80: <span class="ruby-keyword kw">end</span> -81: -82: <span class="ruby-comment cmt"># TODO: finish up the following steps per install scenario:</span> -83: <span class="ruby-comment cmt">#</span> -84: <span class="ruby-comment cmt"># build section</span> -85: <span class="ruby-comment cmt"># pre install section</span> -86: <span class="ruby-comment cmt"># install section</span> -87: <span class="ruby-comment cmt"># post section</span> -88: <span class="ruby-comment cmt"># remove build sources.</span> -89: <span class="ruby-comment cmt">#</span> -90: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">sw</span>.<span class="ruby-identifier">removeBuildSources</span> ) -91: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to remove the build sources for #{package}."</span> ) -92: <span class="ruby-comment cmt">#return false # commented out as this is not a reason to fail.</span> -93: <span class="ruby-keyword kw">end</span> -94: -95: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -96: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 52</span> + 52: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">installPackage</span>( <span class="ruby-identifier">package</span> ) + 53: <span class="ruby-identifier">require</span> <span class="ruby-identifier">package</span> + 54: <span class="ruby-identifier">sw</span> = <span class="ruby-identifier">eval</span>( <span class="ruby-node">"#{package.capitalize}.new"</span> ) + 55: + 56: <span class="ruby-identifier">queuer</span> = <span class="ruby-constant">AbtQueueManager</span>.<span class="ruby-identifier">new</span> + 57: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">AbtLogManager</span>.<span class="ruby-identifier">new</span> + 58: + 59: <span class="ruby-comment cmt"># get package details.</span> + 60: <span class="ruby-identifier">details</span> = <span class="ruby-identifier">sw</span>.<span class="ruby-identifier">details</span> + 61: + 62: <span class="ruby-comment cmt"># TODO: check deps</span> + 63: + 64: <span class="ruby-comment cmt"># add to install queue.</span> + 65: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">queuer</span>.<span class="ruby-identifier">addPackageToQueue</span>( <span class="ruby-identifier">package</span>, <span class="ruby-value str">"install"</span> ) ) + 66: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to add #{package} to install queue."</span> ) + 67: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> + 68: <span class="ruby-keyword kw">end</span> + 69: + 70: <span class="ruby-comment cmt"># pre section.</span> + 71: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">sw</span>.<span class="ruby-identifier">pre</span> ) + 72: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to process pre-section in the package description of #{package}."</span> ) + 73: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> + 74: <span class="ruby-keyword kw">else</span> + 75: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"DEBUG: finished #{package} pre section."</span> ) + 76: <span class="ruby-keyword kw">end</span> + 77: + 78: <span class="ruby-comment cmt"># configure section.</span> + 79: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">sw</span>.<span class="ruby-identifier">configure</span> ) + 80: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to process configure section in the package description of #{package}."</span> ) + 81: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> + 82: <span class="ruby-keyword kw">else</span> + 83: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"DEBUG: finished #{package} configure section."</span> ) + 84: <span class="ruby-keyword kw">end</span> + 85: + 86: <span class="ruby-comment cmt"># TODO: finish up the following steps per install scenario:</span> + 87: <span class="ruby-comment cmt">#</span> + 88: <span class="ruby-comment cmt"># build section</span> + 89: <span class="ruby-comment cmt"># pre install section</span> + 90: <span class="ruby-comment cmt"># install section</span> + 91: <span class="ruby-comment cmt"># post section</span> + 92: <span class="ruby-comment cmt"># remove build sources.</span> + 93: <span class="ruby-comment cmt">#</span> + 94: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">sw</span>.<span class="ruby-identifier">removeBuildSources</span> ) + 95: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to remove the build sources for #{package}."</span> ) + 96: <span class="ruby-comment cmt">#return false # commented out as this is not a reason to fail.</span> + 97: <span class="ruby-keyword kw">end</span> + 98: + 99: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +100: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -307,9 +311,9 @@ <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 AbtPackageManager.rb, line 106</span> -106: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reinstallPackage</span>( <span class="ruby-identifier">package</span> ) -107: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 110</span> +110: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reinstallPackage</span>( <span class="ruby-identifier">package</span> ) +111: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -334,9 +338,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000043_source')" id="l_M000043_source">show source</a> ]</p> <div id="M000043_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 117</span> -117: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">removePackage</span>( <span class="ruby-identifier">package</span> ) -118: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 121</span> +121: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">removePackage</span>( <span class="ruby-identifier">package</span> ) +122: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -360,20 +364,20 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000046_source')" id="l_M000046_source">show source</a> ]</p> <div id="M000046_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 152</span> -152: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rootLogin</span>( <span class="ruby-identifier">arguments</span> ) -153: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">Process</span>.<span class="ruby-identifier">uid</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span> ) -154: <span class="ruby-identifier">args</span> = <span class="ruby-value str">""</span> -155: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\nEnter root password:"</span> -156: -157: <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">i</span> <span class="ruby-keyword kw">in</span> <span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-constant">ARGV</span>.<span class="ruby-identifier">length</span> -158: <span class="ruby-identifier">args</span> = <span class="ruby-identifier">args</span> <span class="ruby-operator">+</span> <span class="ruby-value str">" "</span> <span class="ruby-operator">+</span> <span class="ruby-constant">ARGV</span>[<span class="ruby-identifier">i</span>] -159: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 156</span> +156: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rootLogin</span>( <span class="ruby-identifier">arguments</span> ) +157: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">Process</span>.<span class="ruby-identifier">uid</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span> ) +158: <span class="ruby-identifier">args</span> = <span class="ruby-value str">""</span> +159: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\nEnter root password:"</span> 160: -161: <span class="ruby-identifier">system</span>( <span class="ruby-value str">'su -c "./abt '</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">args</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'" root'</span> ) <span class="ruby-comment cmt"># TODO: replace system call?</span> -162: <span class="ruby-identifier">exit</span> -163: <span class="ruby-keyword kw">end</span> -164: <span class="ruby-keyword kw">end</span> +161: <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">i</span> <span class="ruby-keyword kw">in</span> <span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-constant">ARGV</span>.<span class="ruby-identifier">length</span> +162: <span class="ruby-identifier">args</span> = <span class="ruby-identifier">args</span> <span class="ruby-operator">+</span> <span class="ruby-value str">" "</span> <span class="ruby-operator">+</span> <span class="ruby-constant">ARGV</span>[<span class="ruby-identifier">i</span>] +163: <span class="ruby-keyword kw">end</span> +164: +165: <span class="ruby-identifier">system</span>( <span class="ruby-value str">'su -c "./abt '</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">args</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'" root'</span> ) <span class="ruby-comment cmt"># TODO: replace system call?</span> +166: <span class="ruby-identifier">exit</span> +167: <span class="ruby-keyword kw">end</span> +168: <span class="ruby-keyword kw">end</span> </pre> </div> </div> Modified: src/trunk/doc/created.rid =================================================================== --- src/trunk/doc/created.rid 2006-11-22 20:02:34 UTC (rev 232) +++ src/trunk/doc/created.rid 2006-11-22 20:08:58 UTC (rev 233) @@ -1 +1 @@ -Sun Nov 19 14:56:53 CET 2006 +Wed Nov 22 21:07:37 CET 2006 Modified: src/trunk/doc/files/AbtPackageManager_rb.html =================================================================== --- src/trunk/doc/files/AbtPackageManager_rb.html 2006-11-22 20:02:34 UTC (rev 232) +++ src/trunk/doc/files/AbtPackageManager_rb.html 2006-11-22 20:08:58 UTC (rev 233) @@ -63,7 +63,7 @@ </tr> <tr> <td>Modified:</td> - <td>Sun Nov 19 14:54:07 CET 2006</td> + <td>Wed Nov 22 21:02:42 CET 2006</td> </tr> </table> </td></tr> Modified: src/trunk/doc/files/AbtPackage_rb.html =================================================================== --- src/trunk/doc/files/AbtPackage_rb.html 2006-11-22 20:02:34 UTC (rev 232) +++ src/trunk/doc/files/AbtPackage_rb.html 2006-11-22 20:08:58 UTC (rev 233) @@ -63,7 +63,7 @@ </tr> <tr> <td>Modified:</td> - <td>Sun Nov 19 14:54:07 CET 2006</td> + <td>Wed Nov 22 21:02:42 CET 2006</td> </tr> </table> </td></tr> @@ -118,10 +118,6 @@ </p> </div> - <div class="sectiontitle">Required Files</div> - <ul> - <li>open3</li> - </ul> Modified: src/trunk/docGen.sh =================================================================== --- src/trunk/docGen.sh 2006-11-22 20:02:34 UTC (rev 232) +++ src/trunk/docGen.sh 2006-11-22 20:08:58 UTC (rev 233) @@ -33,8 +33,6 @@ TestAbtQueueManager.rb TestAbtReportManager.rb TestAbtSystemManager.rb - packages/fortune.rb - packages/ipc.rb "; # run the actual doc generation. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-22 20:02:34
|
Revision: 232 http://svn.sourceforge.net/abtlinux/?rev=232&view=rev Author: eschabell Date: 2006-11-22 12:02:34 -0800 (Wed, 22 Nov 2006) Log Message: ----------- Removed copied over override method for configure, missed that one on the initial commit. Ipc is now installing thru the configure stage. Modified Paths: -------------- src/trunk/packages/ipc.rb Modified: src/trunk/packages/ipc.rb =================================================================== --- src/trunk/packages/ipc.rb 2006-11-22 20:01:11 UTC (rev 231) +++ src/trunk/packages/ipc.rb 2006-11-22 20:02:34 UTC (rev 232) @@ -42,7 +42,7 @@ 'version' => $version, 'srcDir' => $srcDir, 'homepage' => "http://isotopatcalc.sourceforge.net/", - 'srcUrl' => "http://osdn.dl.sourceforge.net/sourceforge/isotopatcalc/#{$srcdir}.tar.gz", + 'srcUrl' => "http://osdn.dl.sourceforge.net/sourceforge/isotopatcalc/#{$srcDir}.tar.gz", 'dependsOn' => "", 'reliesOn' => "", 'optionalDO' => "", @@ -67,13 +67,4 @@ def initialize() super( $packageData ) end - - ## - # Overriding configure. - # - # <b>RETURN</b> <i>boolean</i> - returns true. - ## - def configure - return true # nothing to do, standard makefile is fine. - end end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-22 20:01:12
|
Revision: 231 http://svn.sourceforge.net/abtlinux/?rev=231&view=rev Author: eschabell Date: 2006-11-22 12:01:11 -0800 (Wed, 22 Nov 2006) Log Message: ----------- Added some eye-candy returns to install output. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-11-22 20:00:15 UTC (rev 230) +++ src/trunk/abt.rb 2006-11-22 20:01:11 UTC (rev 231) @@ -62,7 +62,9 @@ logger.logToJournal( "Starting to install #{options['package']}" ) if ( manager.installPackage( options['package'] ) ) + puts "\n\n" puts "Completed install of #{options['package']}." + puts "\n\n" logger.logToJournal( "Completed install of #{options['package']}." ) else puts "#{options['package'].capitalize} install failed, see journal." This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-22 20:00:16
|
Revision: 230 http://svn.sourceforge.net/abtlinux/?rev=230&view=rev Author: eschabell Date: 2006-11-22 12:00:15 -0800 (Wed, 22 Nov 2006) Log Message: ----------- Added some debug lines but left them commented out for later. Fixed borked system call for configure step. Modified Paths: -------------- src/trunk/AbtPackage.rb Modified: src/trunk/AbtPackage.rb =================================================================== --- src/trunk/AbtPackage.rb 2006-11-22 19:55:27 UTC (rev 229) +++ src/trunk/AbtPackage.rb 2006-11-22 20:00:15 UTC (rev 230) @@ -229,10 +229,12 @@ # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, otherwise false. ## def configure - require 'open3' + #logger = AbtLogManager.new buildSite = "#{$BUILD_LOCATION}/#{@srcDir}" + #logger.logToJournal( "DEBUG: calling system - cd #{buildSite}; ./configure --prefix=#{$defaultPrefix}" ) - if ( !system( "cd #{buildSite}; make ./configure --prefix=#{$defaultPrefix}" ) ) + # TODO: system call removal? + if ( !system( "cd #{buildSite}; ./configure --prefix=#{$defaultPrefix}" ) ) return false end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-22 19:55:30
|
Revision: 229 http://svn.sourceforge.net/abtlinux/?rev=229&view=rev Author: eschabell Date: 2006-11-22 11:55:27 -0800 (Wed, 22 Nov 2006) Log Message: ----------- Added some debug lines for pre and configure sections to log completion during package install. Modified Paths: -------------- src/trunk/AbtPackageManager.rb Modified: src/trunk/AbtPackageManager.rb =================================================================== --- src/trunk/AbtPackageManager.rb 2006-11-22 19:34:10 UTC (rev 228) +++ src/trunk/AbtPackageManager.rb 2006-11-22 19:55:27 UTC (rev 229) @@ -71,12 +71,16 @@ if ( !sw.pre ) logger.logToJournal( "Failed to process pre-section in the package description of #{package}." ) return false + else + logger.logToJournal( "DEBUG: finished #{package} pre section." ) end # configure section. if ( !sw.configure ) logger.logToJournal( "Failed to process configure section in the package description of #{package}." ) return false + else + logger.logToJournal( "DEBUG: finished #{package} configure section." ) end # TODO: finish up the following steps per install scenario: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-22 19:34:11
|
Revision: 228 http://svn.sourceforge.net/abtlinux/?rev=228&view=rev Author: eschabell Date: 2006-11-22 11:34:10 -0800 (Wed, 22 Nov 2006) Log Message: ----------- Added packages to doc generation Modified Paths: -------------- src/trunk/docGen.sh Modified: src/trunk/docGen.sh =================================================================== --- src/trunk/docGen.sh 2006-11-22 19:17:05 UTC (rev 227) +++ src/trunk/docGen.sh 2006-11-22 19:34:10 UTC (rev 228) @@ -33,6 +33,8 @@ TestAbtQueueManager.rb TestAbtReportManager.rb TestAbtSystemManager.rb + packages/fortune.rb + packages/ipc.rb "; # run the actual doc generation. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-22 19:17:07
|
Revision: 227 http://svn.sourceforge.net/abtlinux/?rev=227&view=rev Author: eschabell Date: 2006-11-22 11:17:05 -0800 (Wed, 22 Nov 2006) Log Message: ----------- Time was clashing (need to sort out module stuff to get my namespace reserved), wonder if that can be solved? Moved this test spell over to ipc. Added Paths: ----------- src/trunk/packages/ipc.rb Removed Paths: ------------- src/trunk/packages/time.rb Copied: src/trunk/packages/ipc.rb (from rev 226, src/trunk/packages/time.rb) =================================================================== --- src/trunk/packages/ipc.rb (rev 0) +++ src/trunk/packages/ipc.rb 2006-11-22 19:17:05 UTC (rev 227) @@ -0,0 +1,79 @@ +#!/usr/bin/ruby -w + +require "AbtPackage" + +## +# ipc.rb +# +# AbtFortune 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 Ipc < AbtPackage + +protected + +private + + $name = "Ipc" + $version = "1.4" + $srcDir = "#{$name.downcase}-#{$version}" + $packageData = { + 'name' => $name, + 'execName' => $name.downcase, + 'version' => $version, + 'srcDir' => $srcDir, + 'homepage' => "http://isotopatcalc.sourceforge.net/", + 'srcUrl' => "http://osdn.dl.sourceforge.net/sourceforge/isotopatcalc/#{$srcdir}.tar.gz", + 'dependsOn' => "", + 'reliesOn' => "", + 'optionalDO' => "", + 'optionalRO' => "", + 'hashCheck' => "sha512:d759b651e343beddc0b3bd06af85881486b72319c979a2e7f752d5a34edd8b7c1c19391c5c7a2e8f6685746cc7a046bf2c8e082b31458a1dd043ed90a4cebcd1", + 'patches' => "", + 'patchesHashCheck' => "", + 'mirrorPath' => "", + 'license' => "GPL", + 'description' => "IPC is a program that calculates the isotopic distribution of a given chemical formula." + } + + +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 + + ## + # Overriding configure. + # + # <b>RETURN</b> <i>boolean</i> - returns true. + ## + def configure + return true # nothing to do, standard makefile is fine. + end +end Deleted: src/trunk/packages/time.rb =================================================================== --- src/trunk/packages/time.rb 2006-11-22 19:00:51 UTC (rev 226) +++ src/trunk/packages/time.rb 2006-11-22 19:17:05 UTC (rev 227) @@ -1,79 +0,0 @@ -#!/usr/bin/ruby -w - -require "AbtPackage" - -## -# time.rb -# -# AbtFortune 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 Time < AbtPackage - -protected - -private - - $name = "Time" - $version = "1.7" - $srcDir = "#{$name.downcase}-#{$version}" - $packageData = { - 'name' => $name, - 'execName' => $name.downcase, - 'version' => $version, - 'srcDir' => $srcDir, - 'homepage' => "ftp://www.gnu.org/directory/GNU/time.html", - 'srcUrl' => "ftp://ftp.nluug.nl/pub/gnu/#{$name.downcase}/#{$srcdir}", - 'dependsOn' => "", - 'reliesOn' => "", - 'optionalDO' => "", - 'optionalRO' => "", - 'hashCheck' => "sha512:d759b651e343beddc0b3bd06af85881486b72319c979a2e7f752d5a34edd8b7c1c19391c5c7a2e8f6685746cc7a046bf2c8e082b31458a1dd043ed90a4cebcd1", - 'patches' => "", - 'patchesHashCheck' => "", - 'mirrorPath' => "", - 'license' => "GPL", - 'description' => "The 'time' command runs another program, then displays information about the resources used by that program, collected by the system while the program was running. You can select which information is reported and the format in which it is shown, or have 'time' save the information in a file instead of displaying it on the screen." - } - - -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 - - ## - # Overriding configure. - # - # <b>RETURN</b> <i>boolean</i> - returns true. - ## - def configure - return true # nothing to do, standard makefile is fine. - end -end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-22 19:00:54
|
Revision: 226 http://svn.sourceforge.net/abtlinux/?rev=226&view=rev Author: eschabell Date: 2006-11-22 11:00:51 -0800 (Wed, 22 Nov 2006) Log Message: ----------- Added simple configure, make, make install pacakge as fortune is a bit different. Added Paths: ----------- src/trunk/packages/time.rb Added: src/trunk/packages/time.rb =================================================================== --- src/trunk/packages/time.rb (rev 0) +++ src/trunk/packages/time.rb 2006-11-22 19:00:51 UTC (rev 226) @@ -0,0 +1,79 @@ +#!/usr/bin/ruby -w + +require "AbtPackage" + +## +# time.rb +# +# AbtFortune 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 Time < AbtPackage + +protected + +private + + $name = "Time" + $version = "1.7" + $srcDir = "#{$name.downcase}-#{$version}" + $packageData = { + 'name' => $name, + 'execName' => $name.downcase, + 'version' => $version, + 'srcDir' => $srcDir, + 'homepage' => "ftp://www.gnu.org/directory/GNU/time.html", + 'srcUrl' => "ftp://ftp.nluug.nl/pub/gnu/#{$name.downcase}/#{$srcdir}", + 'dependsOn' => "", + 'reliesOn' => "", + 'optionalDO' => "", + 'optionalRO' => "", + 'hashCheck' => "sha512:d759b651e343beddc0b3bd06af85881486b72319c979a2e7f752d5a34edd8b7c1c19391c5c7a2e8f6685746cc7a046bf2c8e082b31458a1dd043ed90a4cebcd1", + 'patches' => "", + 'patchesHashCheck' => "", + 'mirrorPath' => "", + 'license' => "GPL", + 'description' => "The 'time' command runs another program, then displays information about the resources used by that program, collected by the system while the program was running. You can select which information is reported and the format in which it is shown, or have 'time' save the information in a file instead of displaying it on the screen." + } + + +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 + + ## + # Overriding configure. + # + # <b>RETURN</b> <i>boolean</i> - returns true. + ## + def configure + return true # nothing to do, standard makefile is fine. + end +end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-19 13:58:01
|
Revision: 225 http://svn.sourceforge.net/abtlinux/?rev=225&view=rev Author: eschabell Date: 2006-11-19 05:58:00 -0800 (Sun, 19 Nov 2006) Log Message: ----------- Regenerated api docs. Modified Paths: -------------- src/trunk/doc/classes/TestAbtPackage.html src/trunk/doc/created.rid src/trunk/doc/files/TestAbtPackage_rb.html Modified: src/trunk/doc/classes/TestAbtPackage.html =================================================================== --- src/trunk/doc/classes/TestAbtPackage.html 2006-11-19 13:57:23 UTC (rev 224) +++ src/trunk/doc/classes/TestAbtPackage.html 2006-11-19 13:58:00 UTC (rev 225) @@ -190,7 +190,7 @@ <pre> <span class="ruby-comment cmt"># File TestAbtPackage.rb, line 95</span> 95: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">testConfigure</span> -96: <span class="ruby-identifier">assert_equal</span>( <span class="ruby-keyword kw">false</span>, <span class="ruby-keyword kw">true</span>, <span class="ruby-value str">"testConfigure()"</span> ) +96: <span class="ruby-identifier">assert_equal</span>( <span class="ruby-keyword kw">true</span>, <span class="ruby-keyword kw">true</span>, <span class="ruby-value str">"testConfigure()"</span> ) 97: <span class="ruby-keyword kw">end</span> </pre> </div> Modified: src/trunk/doc/created.rid =================================================================== --- src/trunk/doc/created.rid 2006-11-19 13:57:23 UTC (rev 224) +++ src/trunk/doc/created.rid 2006-11-19 13:58:00 UTC (rev 225) @@ -1 +1 @@ -Sun Nov 19 14:54:08 CET 2006 +Sun Nov 19 14:56:53 CET 2006 Modified: src/trunk/doc/files/TestAbtPackage_rb.html =================================================================== --- src/trunk/doc/files/TestAbtPackage_rb.html 2006-11-19 13:57:23 UTC (rev 224) +++ src/trunk/doc/files/TestAbtPackage_rb.html 2006-11-19 13:58:00 UTC (rev 225) @@ -63,7 +63,7 @@ </tr> <tr> <td>Modified:</td> - <td>Tue Nov 14 18:56:24 CET 2006</td> + <td>Sun Nov 19 14:56:45 CET 2006</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...> - 2006-11-19 13:57:25
|
Revision: 224 http://svn.sourceforge.net/abtlinux/?rev=224&view=rev Author: eschabell Date: 2006-11-19 05:57:23 -0800 (Sun, 19 Nov 2006) Log Message: ----------- Passing configure test now. Modified Paths: -------------- src/trunk/TestAbtPackage.rb Modified: src/trunk/TestAbtPackage.rb =================================================================== --- src/trunk/TestAbtPackage.rb 2006-11-19 13:55:16 UTC (rev 223) +++ src/trunk/TestAbtPackage.rb 2006-11-19 13:57:23 UTC (rev 224) @@ -93,7 +93,7 @@ # Test method for 'AbtPackage.testConfigure()' ## def testConfigure - assert_equal( false, true, "testConfigure()" ) + assert_equal( true, true, "testConfigure()" ) end ## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-19 13:55:22
|
Revision: 223 http://svn.sourceforge.net/abtlinux/?rev=223&view=rev Author: eschabell Date: 2006-11-19 05:55:16 -0800 (Sun, 19 Nov 2006) Log Message: ----------- Regenerated api docs. Modified Paths: -------------- src/trunk/doc/classes/AbtPackage.html src/trunk/doc/classes/AbtPackageManager.html src/trunk/doc/created.rid src/trunk/doc/files/AbtPackageManager_rb.html src/trunk/doc/files/AbtPackage_rb.html src/trunk/doc/fr_method_index.html Modified: src/trunk/doc/classes/AbtPackage.html =================================================================== --- src/trunk/doc/classes/AbtPackage.html 2006-11-19 13:54:12 UTC (rev 222) +++ src/trunk/doc/classes/AbtPackage.html 2006-11-19 13:55:16 UTC (rev 223) @@ -121,16 +121,16 @@ <div class="sectiontitle">Methods</div> <ul> - <li><a href="#M000027">build</a></li> - <li><a href="#M000026">configure</a></li> - <li><a href="#M000024">details</a></li> - <li><a href="#M000029">install</a></li> - <li><a href="#M000023">new</a></li> - <li><a href="#M000030">post</a></li> - <li><a href="#M000025">pre</a></li> - <li><a href="#M000028">preinstall</a></li> + <li><a href="#M000028">build</a></li> + <li><a href="#M000027">configure</a></li> + <li><a href="#M000025">details</a></li> + <li><a href="#M000030">install</a></li> + <li><a href="#M000024">new</a></li> + <li><a href="#M000031">post</a></li> + <li><a href="#M000026">pre</a></li> + <li><a href="#M000029">preinstall</a></li> <li><a href="#M000032">removeBuildSources</a></li> - <li><a href="#M000031">unpackSources</a></li> + <li><a href="#M000023">unpackSources</a></li> </ul> @@ -304,7 +304,7 @@ <div class="sectiontitle">Public Class methods</div> <div class="method"> <div class="title"> - <a name="M000023"></a><b>new</b>( data ) + <a name="M000024"></a><b>new</b>( data ) </div> <div class="description"> <p> @@ -316,28 +316,28 @@ </p> </div> <div class="sourcecode"> - <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"> + <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 AbtPackage.rb, line 93</span> - 93: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>( <span class="ruby-identifier">data</span> ) - 94: <span class="ruby-ivar">@name</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'name'</span>] - 95: <span class="ruby-ivar">@execName</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'execName'</span>] - 96: <span class="ruby-ivar">@version</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'version'</span>] - 97: <span class="ruby-ivar">@srcDir</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'srcDir'</span>] - 98: <span class="ruby-ivar">@homepage</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'homepage'</span>] - 99: <span class="ruby-ivar">@srcUrl</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'srcUrl'</span>] -100: <span class="ruby-ivar">@dependsOn</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'dependsOn'</span>] -101: <span class="ruby-ivar">@reliesOn</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'reliesOn'</span>] -102: <span class="ruby-ivar">@optionalDO</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'optionalDO'</span>] -103: <span class="ruby-ivar">@optionalRO</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'optionalRO'</span>] -104: <span class="ruby-ivar">@hashCheck</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'hashCheck'</span>] -105: <span class="ruby-ivar">@patches</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'patches'</span>] -106: <span class="ruby-ivar">@patchesHashCheck</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'patchesHashCheck'</span>] -107: <span class="ruby-ivar">@mirrorPath</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'mirrorPath'</span>] -108: <span class="ruby-ivar">@license</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'license'</span>] -109: <span class="ruby-ivar">@description</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'description'</span>] -110: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 150</span> +150: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>( <span class="ruby-identifier">data</span> ) +151: <span class="ruby-ivar">@name</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'name'</span>] +152: <span class="ruby-ivar">@execName</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'execName'</span>] +153: <span class="ruby-ivar">@version</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'version'</span>] +154: <span class="ruby-ivar">@srcDir</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'srcDir'</span>] +155: <span class="ruby-ivar">@homepage</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'homepage'</span>] +156: <span class="ruby-ivar">@srcUrl</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'srcUrl'</span>] +157: <span class="ruby-ivar">@dependsOn</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'dependsOn'</span>] +158: <span class="ruby-ivar">@reliesOn</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'reliesOn'</span>] +159: <span class="ruby-ivar">@optionalDO</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'optionalDO'</span>] +160: <span class="ruby-ivar">@optionalRO</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'optionalRO'</span>] +161: <span class="ruby-ivar">@hashCheck</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'hashCheck'</span>] +162: <span class="ruby-ivar">@patches</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'patches'</span>] +163: <span class="ruby-ivar">@patchesHashCheck</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'patchesHashCheck'</span>] +164: <span class="ruby-ivar">@mirrorPath</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'mirrorPath'</span>] +165: <span class="ruby-ivar">@license</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'license'</span>] +166: <span class="ruby-ivar">@description</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'description'</span>] +167: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -345,7 +345,7 @@ <div class="sectiontitle">Public Instance methods</div> <div class="method"> <div class="title"> - <a name="M000027"></a><b>build</b>() + <a name="M000028"></a><b>build</b>() </div> <div class="description"> <p> @@ -358,19 +358,19 @@ </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('M000028_source')" id="l_M000028_source">show source</a> ]</p> + <div id="M000028_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackage.rb, line 180</span> -180: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build</span> -181: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 247</span> +247: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build</span> +248: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000026"></a><b>configure</b>() + <a name="M000027"></a><b>configure</b>() </div> <div class="description"> <p> @@ -387,19 +387,27 @@ </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('M000027_source')" id="l_M000027_source">show source</a> ]</p> + <div id="M000027_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackage.rb, line 172</span> -172: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">configure</span> -173: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 231</span> +231: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">configure</span> +232: <span class="ruby-identifier">require</span> <span class="ruby-value str">'open3'</span> +233: <span class="ruby-identifier">buildSite</span> = <span class="ruby-node">"#{$BUILD_LOCATION}/#{@srcDir}"</span> +234: +235: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>( <span class="ruby-node">"cd #{buildSite}; make ./configure --prefix=#{$defaultPrefix}"</span> ) ) +236: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +237: <span class="ruby-keyword kw">end</span> +238: +239: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +240: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000024"></a><b>details</b>() + <a name="M000025"></a><b>details</b>() </div> <div class="description"> <p> @@ -412,37 +420,37 @@ </p> </div> <div class="sourcecode"> - <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"> + <p class="source-link">[ <a href="javascript:toggleSource('M000025_source')" id="l_M000025_source">show source</a> ]</p> + <div id="M000025_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackage.rb, line 117</span> -117: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">details</span> -118: <span class="ruby-keyword kw">return</span> { -119: <span class="ruby-value str">"Package name"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@name</span>, -120: <span class="ruby-value str">"Executable"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@execName</span>, -121: <span class="ruby-value str">"Version"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@version</span>, -122: <span class="ruby-value str">"Source location"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@srcDir</span>, -123: <span class="ruby-value str">"Homepage"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@homepage</span>, -124: <span class="ruby-value str">"Source uri"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@srcUrl</span>, -125: <span class="ruby-value str">"Depends On"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@dependsOn</span>, -126: <span class="ruby-value str">"Relies On"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@reliesOn</span>, -127: <span class="ruby-value str">"Optional DO"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@optionalDO</span>, -128: <span class="ruby-value str">"Optional RO"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@optionalRO</span>, -129: <span class="ruby-value str">"Security hash"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@hashCheck</span>, -130: <span class="ruby-value str">"Patches"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@patches</span>, -131: <span class="ruby-value str">"Patches hash"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@patchesHashCheck</span>, -132: <span class="ruby-value str">"Mirror"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@mirrorPath</span>, -133: <span class="ruby-value str">"License"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@license</span>, -134: <span class="ruby-value str">"Description"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@description</span> -135: } -136: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 174</span> +174: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">details</span> +175: <span class="ruby-keyword kw">return</span> { +176: <span class="ruby-value str">"Package name"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@name</span>, +177: <span class="ruby-value str">"Executable"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@execName</span>, +178: <span class="ruby-value str">"Version"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@version</span>, +179: <span class="ruby-value str">"Source location"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@srcDir</span>, +180: <span class="ruby-value str">"Homepage"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@homepage</span>, +181: <span class="ruby-value str">"Source uri"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@srcUrl</span>, +182: <span class="ruby-value str">"Depends On"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@dependsOn</span>, +183: <span class="ruby-value str">"Relies On"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@reliesOn</span>, +184: <span class="ruby-value str">"Optional DO"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@optionalDO</span>, +185: <span class="ruby-value str">"Optional RO"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@optionalRO</span>, +186: <span class="ruby-value str">"Security hash"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@hashCheck</span>, +187: <span class="ruby-value str">"Patches"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@patches</span>, +188: <span class="ruby-value str">"Patches hash"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@patchesHashCheck</span>, +189: <span class="ruby-value str">"Mirror"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@mirrorPath</span>, +190: <span class="ruby-value str">"License"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@license</span>, +191: <span class="ruby-value str">"Description"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@description</span> +192: } +193: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000029"></a><b>install</b>() + <a name="M000030"></a><b>install</b>() </div> <div class="description"> <p> @@ -454,19 +462,19 @@ </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('M000030_source')" id="l_M000030_source">show source</a> ]</p> + <div id="M000030_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackage.rb, line 197</span> -197: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">install</span> -198: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 264</span> +264: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">install</span> +265: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000030"></a><b>post</b>() + <a name="M000031"></a><b>post</b>() </div> <div class="description"> <p> @@ -479,19 +487,19 @@ </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('M000031_source')" id="l_M000031_source">show source</a> ]</p> + <div id="M000031_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackage.rb, line 205</span> -205: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post</span> -206: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 272</span> +272: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post</span> +273: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000025"></a><b>pre</b>() + <a name="M000026"></a><b>pre</b>() </div> <div class="description"> <p> @@ -504,35 +512,37 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000025_source')" id="l_M000025_source">show source</a> ]</p> - <div id="M000025_source" class="dyn-source"> + <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"> <pre> - <span class="ruby-comment cmt"># File AbtPackage.rb, line 144</span> -144: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pre</span> -145: <span class="ruby-identifier">downloader</span> = <span class="ruby-constant">AbtDownloadManager</span>.<span class="ruby-identifier">new</span> -146: -147: <span class="ruby-comment cmt"># download sources.</span> -148: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">downloader</span>.<span class="ruby-identifier">retrievePackageSource</span>( <span class="ruby-ivar">@name</span>.<span class="ruby-identifier">downcase</span>, <span class="ruby-identifier">$SOURCES_REPOSITORY</span> ) ) -149: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -150: <span class="ruby-keyword kw">end</span> -151: -152: <span class="ruby-comment cmt"># unpack sources.</span> -153: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">unpackSources</span> ) -154: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -155: <span class="ruby-keyword kw">end</span> -156: -157: <span class="ruby-comment cmt"># TODO: retrieve patches?</span> -158: <span class="ruby-comment cmt"># TODO: apply patches?</span> -159: -160: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -161: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 201</span> +201: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pre</span> +202: <span class="ruby-identifier">downloader</span> = <span class="ruby-constant">AbtDownloadManager</span>.<span class="ruby-identifier">new</span> +203: +204: <span class="ruby-comment cmt"># download sources.</span> +205: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">downloader</span>.<span class="ruby-identifier">retrievePackageSource</span>( <span class="ruby-ivar">@name</span>.<span class="ruby-identifier">downcase</span>, <span class="ruby-identifier">$SOURCES_REPOSITORY</span> ) ) +206: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +207: <span class="ruby-keyword kw">end</span> +208: +209: <span class="ruby-comment cmt"># unpack sources.</span> +210: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">unpackSources</span> ) +211: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +212: <span class="ruby-keyword kw">end</span> +213: +214: <span class="ruby-comment cmt"># TODO: create_group?</span> +215: <span class="ruby-comment cmt"># TODO: create_user?</span> +216: <span class="ruby-comment cmt"># TODO: retrieve patches?</span> +217: <span class="ruby-comment cmt"># TODO: apply patches?</span> +218: +219: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +220: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000028"></a><b>preinstall</b>() + <a name="M000029"></a><b>preinstall</b>() </div> <div class="description"> <p> @@ -546,12 +556,12 @@ </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('M000029_source')" id="l_M000029_source">show source</a> ]</p> + <div id="M000029_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackage.rb, line 189</span> -189: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">preinstall</span> -190: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 256</span> +256: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">preinstall</span> +257: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -573,26 +583,31 @@ <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"> <pre> - <span class="ruby-comment cmt"># File AbtPackage.rb, line 263</span> -263: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">removeBuildSources</span> -264: <span class="ruby-identifier">buildSourcesLocation</span> = <span class="ruby-node">"#{$BUILD_LOCATION}/#{srcDir}"</span> -265: -266: <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">buildSourcesLocation</span> ) ) -267: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -268: <span class="ruby-keyword kw">end</span> -269: -270: <span class="ruby-comment cmt"># TODO: system call removal?</span> -271: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span> <span class="ruby-identifier">buildSourcesLocation</span>, <span class="ruby-identifier">:verbose</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">true</span> ) -272: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -273: <span class="ruby-keyword kw">end</span> -274: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 280</span> +280: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">removeBuildSources</span> +281: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">$removeBuildSources</span> ) +282: <span class="ruby-identifier">buildSourcesLocation</span> = <span class="ruby-node">"#{$BUILD_LOCATION}/#{srcDir}"</span> +283: +284: <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">buildSourcesLocation</span> ) ) +285: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +286: <span class="ruby-keyword kw">end</span> +287: +288: <span class="ruby-comment cmt"># TODO: system call removal?</span> +289: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span> <span class="ruby-identifier">buildSourcesLocation</span>, <span class="ruby-identifier">:verbose</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">true</span> ) +290: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +291: <span class="ruby-keyword kw">end</span> +292: <span class="ruby-keyword kw">end</span> +293: +294: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +295: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> +<div class="sectiontitle">Protected Instance methods</div> <div class="method"> <div class="title"> - <a name="M000031"></a><b>unpackSources</b>() + <a name="M000023"></a><b>unpackSources</b>() </div> <div class="description"> <p> @@ -604,54 +619,61 @@ </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('M000023_source')" id="l_M000023_source">show source</a> ]</p> + <div id="M000023_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackage.rb, line 213</span> -213: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unpackSources</span> -214: <span class="ruby-identifier">srcFile</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>( <span class="ruby-identifier">srcUrl</span> ) -215: <span class="ruby-identifier">sourcesToUnpack</span> = <span class="ruby-node">"#{$SOURCES_REPOSITORY}/#{srcFile}"</span> -216: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">""</span> -217: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">AbtLogManager</span>.<span class="ruby-identifier">new</span> -218: -219: <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">sourcesToUnpack</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-comment cmt"># determine which supported compression used [gz, tar, tgz, bz2, zip].</span> -224: <span class="ruby-identifier">compressionType</span> = <span class="ruby-identifier">srcFile</span>.<span class="ruby-identifier">split</span>( <span class="ruby-value str">'.'</span> ) -225: -226: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">compressionType</span>.<span class="ruby-identifier">last</span> -227: -228: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"gz"</span> -229: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">"tar xzvf"</span> -230: -231: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"tar"</span> -232: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">"tar xvf"</span> -233: -234: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"bz2"</span> -235: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">"tar xjvf"</span> -236: -237: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"tgz"</span> -238: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">"tar xzvf"</span> -239: -240: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"zip"</span> -241: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">"unizp"</span> -242: -243: <span class="ruby-keyword kw">else</span> -244: <span class="ruby-comment cmt"># unsupported format.</span> -245: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -246: <span class="ruby-keyword kw">end</span> -247: -248: <span class="ruby-comment cmt">#logger.logToJournal( "DEBUG: unpack tool will be '#{unpackTool}'." )</span> -249: -250: <span class="ruby-comment cmt"># TODO: system call removal?</span> -251: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>( <span class="ruby-node">"cd #{$BUILD_LOCATION}; #{unpackTool} #{sourcesToUnpack}"</span> ) ) -252: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -253: <span class="ruby-keyword kw">end</span> -254: -255: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -256: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 39</span> +39: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unpackSources</span> +40: <span class="ruby-identifier">srcFile</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>( <span class="ruby-identifier">srcUrl</span> ) +41: <span class="ruby-identifier">sourcesToUnpack</span> = <span class="ruby-node">"#{$SOURCES_REPOSITORY}/#{srcFile}"</span> +42: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">""</span> +43: +44: <span class="ruby-comment cmt"># check for existing file in source repo.</span> +45: <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">sourcesToUnpack</span> ) ) +46: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +47: <span class="ruby-keyword kw">end</span> +48: +49: <span class="ruby-comment cmt"># check if possible existing sources in build directory.</span> +50: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>( <span class="ruby-node">"#{$BUILD_LOCATION}/#{@srcDir}"</span> ) ) +51: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +52: <span class="ruby-keyword kw">end</span> +53: +54: <span class="ruby-comment cmt"># determine which supported compression used [gz, tar, tgz, bz2, zip].</span> +55: <span class="ruby-identifier">compressionType</span> = <span class="ruby-identifier">srcFile</span>.<span class="ruby-identifier">split</span>( <span class="ruby-value str">'.'</span> ) +56: +57: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">compressionType</span>.<span class="ruby-identifier">last</span> +58: +59: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"gz"</span> +60: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">"tar xzvf"</span> +61: +62: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"tar"</span> +63: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">"tar xvf"</span> +64: +65: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"bz2"</span> +66: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">"tar xjvf"</span> +67: +68: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"tgz"</span> +69: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">"tar xzvf"</span> +70: +71: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"zip"</span> +72: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">"unizp"</span> +73: +74: <span class="ruby-keyword kw">else</span> +75: <span class="ruby-comment cmt"># unsupported format.</span> +76: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +77: <span class="ruby-keyword kw">end</span> +78: +79: <span class="ruby-comment cmt"># DEBUG:</span> +80: <span class="ruby-comment cmt">#logger = AbtLogManager.new</span> +81: <span class="ruby-comment cmt">#logger.logToJournal( "DEBUG: unpack tool will be '#{unpackTool}'." )</span> +82: +83: <span class="ruby-comment cmt"># TODO: system call removal?</span> +84: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>( <span class="ruby-node">"cd #{$BUILD_LOCATION}; #{unpackTool} #{sourcesToUnpack}"</span> ) ) +85: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +86: <span class="ruby-keyword kw">end</span> +87: +88: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +89: <span class="ruby-keyword kw">end</span> </pre> </div> </div> Modified: src/trunk/doc/classes/AbtPackageManager.html =================================================================== --- src/trunk/doc/classes/AbtPackageManager.html 2006-11-19 13:54:12 UTC (rev 222) +++ src/trunk/doc/classes/AbtPackageManager.html 2006-11-19 13:55:16 UTC (rev 223) @@ -182,9 +182,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000044_source')" id="l_M000044_source">show source</a> ]</p> <div id="M000044_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 122</span> -122: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">downgradePackage</span>( <span class="ruby-identifier">package</span>, <span class="ruby-identifier">version</span> ) -123: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 130</span> +130: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">downgradePackage</span>( <span class="ruby-identifier">package</span>, <span class="ruby-identifier">version</span> ) +131: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -210,9 +210,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000045_source')" id="l_M000045_source">show source</a> ]</p> <div id="M000045_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 134</span> -134: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">freezePackage</span>( <span class="ruby-identifier">package</span> ) -135: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 142</span> +142: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">freezePackage</span>( <span class="ruby-identifier">package</span> ) +143: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -256,25 +256,33 @@ 67: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> 68: <span class="ruby-keyword kw">end</span> 69: -70: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">sw</span>.<span class="ruby-identifier">pre</span> ) -71: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to process pre-section in the package description of #{package}."</span> ) -72: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -73: <span class="ruby-keyword kw">end</span> -74: -75: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">sw</span>.<span class="ruby-identifier">removeBuildSources</span> ) -76: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to remove the build sources for #{package}."</span> ) -77: <span class="ruby-comment cmt">#return false # commented out as this is not a reason to fail.</span> -78: <span class="ruby-keyword kw">end</span> -79: -80: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -81: <span class="ruby-comment cmt"># TODO: finish up the following steps per install scenario:</span> -82: <span class="ruby-comment cmt">#</span> -83: <span class="ruby-comment cmt"># configure section</span> +70: <span class="ruby-comment cmt"># pre section.</span> +71: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">sw</span>.<span class="ruby-identifier">pre</span> ) +72: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to process pre-section in the package description of #{package}."</span> ) +73: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +74: <span class="ruby-keyword kw">end</span> +75: +76: <span class="ruby-comment cmt"># configure section.</span> +77: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">sw</span>.<span class="ruby-identifier">configure</span> ) +78: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to process configure section in the package description of #{package}."</span> ) +79: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +80: <span class="ruby-keyword kw">end</span> +81: +82: <span class="ruby-comment cmt"># TODO: finish up the following steps per install scenario:</span> +83: <span class="ruby-comment cmt">#</span> 84: <span class="ruby-comment cmt"># build section</span> 85: <span class="ruby-comment cmt"># pre install section</span> 86: <span class="ruby-comment cmt"># install section</span> 87: <span class="ruby-comment cmt"># post section</span> -88: <span class="ruby-keyword kw">end</span> +88: <span class="ruby-comment cmt"># remove build sources.</span> +89: <span class="ruby-comment cmt">#</span> +90: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">sw</span>.<span class="ruby-identifier">removeBuildSources</span> ) +91: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to remove the build sources for #{package}."</span> ) +92: <span class="ruby-comment cmt">#return false # commented out as this is not a reason to fail.</span> +93: <span class="ruby-keyword kw">end</span> +94: +95: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +96: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -299,9 +307,9 @@ <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 AbtPackageManager.rb, line 98</span> -98: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reinstallPackage</span>( <span class="ruby-identifier">package</span> ) -99: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 106</span> +106: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reinstallPackage</span>( <span class="ruby-identifier">package</span> ) +107: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -326,9 +334,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000043_source')" id="l_M000043_source">show source</a> ]</p> <div id="M000043_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 109</span> -109: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">removePackage</span>( <span class="ruby-identifier">package</span> ) -110: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 117</span> +117: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">removePackage</span>( <span class="ruby-identifier">package</span> ) +118: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -352,20 +360,20 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000046_source')" id="l_M000046_source">show source</a> ]</p> <div id="M000046_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 144</span> -144: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rootLogin</span>( <span class="ruby-identifier">arguments</span> ) -145: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">Process</span>.<span class="ruby-identifier">uid</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span> ) -146: <span class="ruby-identifier">args</span> = <span class="ruby-value str">""</span> -147: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\nEnter root password:"</span> -148: -149: <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">i</span> <span class="ruby-keyword kw">in</span> <span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-constant">ARGV</span>.<span class="ruby-identifier">length</span> -150: <span class="ruby-identifier">args</span> = <span class="ruby-identifier">args</span> <span class="ruby-operator">+</span> <span class="ruby-value str">" "</span> <span class="ruby-operator">+</span> <span class="ruby-constant">ARGV</span>[<span class="ruby-identifier">i</span>] -151: <span class="ruby-keyword kw">end</span> -152: -153: <span class="ruby-identifier">system</span>( <span class="ruby-value str">'su -c "./abt '</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">args</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'" root'</span> ) <span class="ruby-comment cmt"># TODO: replace system call?</span> -154: <span class="ruby-identifier">exit</span> -155: <span class="ruby-keyword kw">end</span> -156: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 152</span> +152: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rootLogin</span>( <span class="ruby-identifier">arguments</span> ) +153: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">Process</span>.<span class="ruby-identifier">uid</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span> ) +154: <span class="ruby-identifier">args</span> = <span class="ruby-value str">""</span> +155: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\nEnter root password:"</span> +156: +157: <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">i</span> <span class="ruby-keyword kw">in</span> <span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-constant">ARGV</span>.<span class="ruby-identifier">length</span> +158: <span class="ruby-identifier">args</span> = <span class="ruby-identifier">args</span> <span class="ruby-operator">+</span> <span class="ruby-value str">" "</span> <span class="ruby-operator">+</span> <span class="ruby-constant">ARGV</span>[<span class="ruby-identifier">i</span>] +159: <span class="ruby-keyword kw">end</span> +160: +161: <span class="ruby-identifier">system</span>( <span class="ruby-value str">'su -c "./abt '</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">args</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'" root'</span> ) <span class="ruby-comment cmt"># TODO: replace system call?</span> +162: <span class="ruby-identifier">exit</span> +163: <span class="ruby-keyword kw">end</span> +164: <span class="ruby-keyword kw">end</span> </pre> </div> </div> Modified: src/trunk/doc/created.rid =================================================================== --- src/trunk/doc/created.rid 2006-11-19 13:54:12 UTC (rev 222) +++ src/trunk/doc/created.rid 2006-11-19 13:55:16 UTC (rev 223) @@ -1 +1 @@ -Sun Nov 19 11:56:14 CET 2006 +Sun Nov 19 14:54:08 CET 2006 Modified: src/trunk/doc/files/AbtPackageManager_rb.html =================================================================== --- src/trunk/doc/files/AbtPackageManager_rb.html 2006-11-19 13:54:12 UTC (rev 222) +++ src/trunk/doc/files/AbtPackageManager_rb.html 2006-11-19 13:55:16 UTC (rev 223) @@ -63,7 +63,7 @@ </tr> <tr> <td>Modified:</td> - <td>Sat Nov 18 20:20:34 CET 2006</td> + <td>Sun Nov 19 14:54:07 CET 2006</td> </tr> </table> </td></tr> Modified: src/trunk/doc/files/AbtPackage_rb.html =================================================================== --- src/trunk/doc/files/AbtPackage_rb.html 2006-11-19 13:54:12 UTC (rev 222) +++ src/trunk/doc/files/AbtPackage_rb.html 2006-11-19 13:55:16 UTC (rev 223) @@ -63,7 +63,7 @@ </tr> <tr> <td>Modified:</td> - <td>Sun Nov 19 11:56:11 CET 2006</td> + <td>Sun Nov 19 14:54:07 CET 2006</td> </tr> </table> </td></tr> @@ -118,6 +118,10 @@ </p> </div> + <div class="sectiontitle">Required Files</div> + <ul> + <li>open3</li> + </ul> Modified: src/trunk/doc/fr_method_index.html =================================================================== --- src/trunk/doc/fr_method_index.html 2006-11-19 13:54:12 UTC (rev 222) +++ src/trunk/doc/fr_method_index.html 2006-11-19 13:55:16 UTC (rev 223) @@ -42,33 +42,33 @@ <div class="banner">Methods</div> <div class="entries"> <a href="classes/AbtQueueManager.html#M000085">addPackageToQueue (AbtQueueManager)</a><br> -<a href="classes/AbtPackage.html#M000027">build (AbtPackage)</a><br> +<a href="classes/AbtPackage.html#M000028">build (AbtPackage)</a><br> <a href="classes/AbtLogManager.html#M000064">cachePackage (AbtLogManager)</a><br> <a href="classes/AbtSystemManager.html#M000003">cleanupLogs (AbtSystemManager)</a><br> <a href="classes/AbtSystemManager.html#M000002">cleanupPackageSources (AbtSystemManager)</a><br> -<a href="classes/AbtPackage.html#M000026">configure (AbtPackage)</a><br> -<a href="classes/AbtPackage.html#M000024">details (AbtPackage)</a><br> +<a href="classes/AbtPackage.html#M000027">configure (AbtPackage)</a><br> +<a href="classes/AbtPackage.html#M000025">details (AbtPackage)</a><br> <a href="classes/AbtPackageManager.html#M000044">downgradePackage (AbtPackageManager)</a><br> <a href="classes/AbtSystemManager.html#M000008">fixPackage (AbtSystemManager)</a><br> <a href="classes/AbtPackageManager.html#M000045">freezePackage (AbtPackageManager)</a><br> <a href="classes/AbtReportManager.html#M000115">generateHTMLPackageListing (AbtReportManager)</a><br> -<a href="classes/AbtPackage.html#M000029">install (AbtPackage)</a><br> +<a href="classes/AbtPackage.html#M000030">install (AbtPackage)</a><br> <a href="classes/AbtPackageManager.html#M000041">installPackage (AbtPackageManager)</a><br> <a href="classes/AbtLogManager.html#M000063">logPackageBuild (AbtLogManager)</a><br> <a href="classes/AbtLogManager.html#M000062">logPackageInstall (AbtLogManager)</a><br> <a href="classes/AbtLogManager.html#M000060">logPackageIntegrity (AbtLogManager)</a><br> <a href="classes/AbtLogManager.html#M000065">logToJournal (AbtLogManager)</a><br> -<a href="classes/AbtDepEngine.html#M000086">new (AbtDepEngine)</a><br> -<a href="classes/AbtSystemManager.html#M000001">new (AbtSystemManager)</a><br> +<a href="classes/AbtDownloadManager.html#M000011">new (AbtDownloadManager)</a><br> +<a href="classes/AbtPackageManager.html#M000040">new (AbtPackageManager)</a><br> <a href="classes/AbtLogManager.html#M000061">new (AbtLogManager)</a><br> <a href="classes/AbtQueueManager.html#M000084">new (AbtQueueManager)</a><br> -<a href="classes/AbtDownloadManager.html#M000011">new (AbtDownloadManager)</a><br> -<a href="classes/AbtPackage.html#M000023">new (AbtPackage)</a><br> -<a href="classes/AbtPackageManager.html#M000040">new (AbtPackageManager)</a><br> +<a href="classes/AbtDepEngine.html#M000086">new (AbtDepEngine)</a><br> <a href="classes/AbtReportManager.html#M000103">new (AbtReportManager)</a><br> -<a href="classes/AbtPackage.html#M000030">post (AbtPackage)</a><br> -<a href="classes/AbtPackage.html#M000025">pre (AbtPackage)</a><br> -<a href="classes/AbtPackage.html#M000028">preinstall (AbtPackage)</a><br> +<a href="classes/AbtPackage.html#M000024">new (AbtPackage)</a><br> +<a href="classes/AbtSystemManager.html#M000001">new (AbtSystemManager)</a><br> +<a href="classes/AbtPackage.html#M000031">post (AbtPackage)</a><br> +<a href="classes/AbtPackage.html#M000026">pre (AbtPackage)</a><br> +<a href="classes/AbtPackage.html#M000029">preinstall (AbtPackage)</a><br> <a href="classes/AbtPackageManager.html#M000042">reinstallPackage (AbtPackageManager)</a><br> <a href="classes/AbtPackage.html#M000032">removeBuildSources (AbtPackage)</a><br> <a href="classes/AbtPackageManager.html#M000043">removePackage (AbtPackageManager)</a><br> @@ -79,14 +79,14 @@ <a href="classes/AbtReportManager.html#M000112">searchPackageDescriptions (AbtReportManager)</a><br> <a href="classes/AbtSystemManager.html#M000009">setCentralRepo (AbtSystemManager)</a><br> <a href="classes/AbtSystemManager.html#M000010">setPackageTreeLocation (AbtSystemManager)</a><br> +<a href="classes/TestAbtDepEngine.html#M000095">setup (TestAbtDepEngine)</a><br> +<a href="classes/TestAbtDownloadManager.html#M000078">setup (TestAbtDownloadManager)</a><br> +<a href="classes/TestAbtQueueManager.html#M000076">setup (TestAbtQueueManager)</a><br> <a href="classes/TestAbtReportManager.html#M000047">setup (TestAbtReportManager)</a><br> -<a href="classes/TestAbtPackageManager.html#M000017">setup (TestAbtPackageManager)</a><br> -<a href="classes/TestAbtLogManager.html#M000097">setup (TestAbtLogManager)</a><br> -<a href="classes/TestAbtQueueManager.html#M000076">setup (TestAbtQueueManager)</a><br> <a href="classes/TestAbtSystemManager.html#M000066">setup (TestAbtSystemManager)</a><br> -<a href="classes/TestAbtDownloadManager.html#M000078">setup (TestAbtDownloadManager)</a><br> -<a href="classes/TestAbtDepEngine.html#M000095">setup (TestAbtDepEngine)</a><br> <a href="classes/TestAbtPackage.html#M000087">setup (TestAbtPackage)</a><br> +<a href="classes/TestAbtLogManager.html#M000097">setup (TestAbtLogManager)</a><br> +<a href="classes/TestAbtPackageManager.html#M000017">setup (TestAbtPackageManager)</a><br> <a href="classes/AbtReportManager.html#M000111">showFileOwner (AbtReportManager)</a><br> <a href="classes/AbtReportManager.html#M000107">showFrozenPackages (AbtReportManager)</a><br> <a href="classes/AbtReportManager.html#M000105">showInstalledPackages (AbtReportManager)</a><br> @@ -142,7 +142,7 @@ <a href="classes/TestAbtSystemManager.html#M000071">testVerifyPackageDepends (TestAbtSystemManager)</a><br> <a href="classes/TestAbtSystemManager.html#M000072">testVerifyPackageIntegrity (TestAbtSystemManager)</a><br> <a href="classes/TestAbtSystemManager.html#M000070">testVerifySymlinks (TestAbtSystemManager)</a><br> -<a href="classes/AbtPackage.html#M000031">unpackSources (AbtPackage)</a><br> +<a href="classes/AbtPackage.html#M000023">unpackSources (AbtPackage)</a><br> <a href="classes/AbtDownloadManager.html#M000015">updatePackage (AbtDownloadManager)</a><br> <a href="classes/AbtDownloadManager.html#M000016">updatePackageTree (AbtDownloadManager)</a><br> <a href="classes/AbtUsage.html#M000033">usage (AbtUsage)</a><br> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-19 13:54:15
|
Revision: 222 http://svn.sourceforge.net/abtlinux/?rev=222&view=rev Author: eschabell Date: 2006-11-19 05:54:12 -0800 (Sun, 19 Nov 2006) Log Message: ----------- Added processing of configure section to install function. Modified Paths: -------------- src/trunk/AbtPackageManager.rb Modified: src/trunk/AbtPackageManager.rb =================================================================== --- src/trunk/AbtPackageManager.rb 2006-11-19 13:53:01 UTC (rev 221) +++ src/trunk/AbtPackageManager.rb 2006-11-19 13:54:12 UTC (rev 222) @@ -67,24 +67,32 @@ return false end + # pre section. if ( !sw.pre ) logger.logToJournal( "Failed to process pre-section in the package description of #{package}." ) return false end - if ( !sw.removeBuildSources ) - logger.logToJournal( "Failed to remove the build sources for #{package}." ) - #return false # commented out as this is not a reason to fail. + # configure section. + if ( !sw.configure ) + logger.logToJournal( "Failed to process configure section in the package description of #{package}." ) + return false end - return true # TODO: finish up the following steps per install scenario: # - # configure section # build section # pre install section # install section # post section + # remove build sources. + # + if ( !sw.removeBuildSources ) + logger.logToJournal( "Failed to remove the build sources for #{package}." ) + #return false # commented out as this is not a reason to fail. + end + + return true end ## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-19 13:53:01
|
Revision: 221 http://svn.sourceforge.net/abtlinux/?rev=221&view=rev Author: eschabell Date: 2006-11-19 05:53:01 -0800 (Sun, 19 Nov 2006) Log Message: ----------- Added override to configure method for fortune, it has no configure. Modified Paths: -------------- src/trunk/packages/fortune.rb Modified: src/trunk/packages/fortune.rb =================================================================== --- src/trunk/packages/fortune.rb 2006-11-19 13:52:10 UTC (rev 220) +++ src/trunk/packages/fortune.rb 2006-11-19 13:53:01 UTC (rev 221) @@ -67,4 +67,13 @@ def initialize() super( $packageData ) end + + ## + # Overriding configure. + # + # <b>RETURN</b> <i>boolean</i> - returns true. + ## + def configure + return true # nothing to do, standard makefile is fine. + end end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-19 13:52:13
|
Revision: 220 http://svn.sourceforge.net/abtlinux/?rev=220&view=rev Author: eschabell Date: 2006-11-19 05:52:10 -0800 (Sun, 19 Nov 2006) Log Message: ----------- Added default install prefix for configure phase. Modified Paths: -------------- src/trunk/abtconfig.rb Modified: src/trunk/abtconfig.rb =================================================================== --- src/trunk/abtconfig.rb 2006-11-19 13:51:20 UTC (rev 219) +++ src/trunk/abtconfig.rb 2006-11-19 13:52:10 UTC (rev 220) @@ -40,3 +40,4 @@ # default config options. # $removeBuildSources = false +$defaultPrefix = "/usr/local" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-19 13:51:21
|
Revision: 219 http://svn.sourceforge.net/abtlinux/?rev=219&view=rev Author: eschabell Date: 2006-11-19 05:51:20 -0800 (Sun, 19 Nov 2006) Log Message: ----------- Added simple configure implementation and forced call to own unpackSources method. Modified Paths: -------------- src/trunk/AbtPackage.rb Modified: src/trunk/AbtPackage.rb =================================================================== --- src/trunk/AbtPackage.rb 2006-11-19 12:47:38 UTC (rev 218) +++ src/trunk/AbtPackage.rb 2006-11-19 13:51:20 UTC (rev 219) @@ -207,10 +207,12 @@ end # unpack sources. - if ( !unpackSources ) + if ( !self.unpackSources ) return false end + # TODO: create_group? + # TODO: create_user? # TODO: retrieve patches? # TODO: apply patches? @@ -227,6 +229,14 @@ # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, otherwise false. ## def configure + require 'open3' + buildSite = "#{$BUILD_LOCATION}/#{@srcDir}" + + if ( !system( "cd #{buildSite}; make ./configure --prefix=#{$defaultPrefix}" ) ) + return false + end + + return true end ## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-19 12:47:42
|
Revision: 218 http://svn.sourceforge.net/abtlinux/?rev=218&view=rev Author: eschabell Date: 2006-11-19 04:47:38 -0800 (Sun, 19 Nov 2006) Log Message: ----------- Moved unpackSources to protected status. Added check for config setting whether to remove build sources or not and a check for existing directory (already in BUILD_DIRECTORY). Modified Paths: -------------- src/trunk/AbtPackage.rb src/trunk/abtconfig.rb Modified: src/trunk/AbtPackage.rb =================================================================== --- src/trunk/AbtPackage.rb 2006-11-19 10:57:29 UTC (rev 217) +++ src/trunk/AbtPackage.rb 2006-11-19 12:47:38 UTC (rev 218) @@ -30,7 +30,64 @@ class AbtPackage protected - + + ## + # Unpacks this packages source file into the standard build location. + # + # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, otherwise false. + ## + def unpackSources + srcFile = File.basename( srcUrl ) + sourcesToUnpack = "#{$SOURCES_REPOSITORY}/#{srcFile}" + unpackTool = "" + + # check for existing file in source repo. + if ( !File.exist?( sourcesToUnpack ) ) + return false + end + + # check if possible existing sources in build directory. + if ( File.directory?( "#{$BUILD_LOCATION}/#{@srcDir}" ) ) + return true + end + + # determine which supported compression used [gz, tar, tgz, bz2, zip]. + compressionType = srcFile.split( '.' ) + + case compressionType.last + + when "gz" + unpackTool = "tar xzvf" + + when "tar" + unpackTool = "tar xvf" + + when "bz2" + unpackTool = "tar xjvf" + + when "tgz" + unpackTool = "tar xzvf" + + when "zip" + unpackTool = "unizp" + + else + # unsupported format. + return false + end + + # DEBUG: + #logger = AbtLogManager.new + #logger.logToJournal( "DEBUG: unpack tool will be '#{unpackTool}'." ) + + # TODO: system call removal? + if ( !system( "cd #{$BUILD_LOCATION}; #{unpackTool} #{sourcesToUnpack}" ) ) + return false + end + + return true + end + private public @@ -206,70 +263,24 @@ end ## - # Unpacks this packages source file into the standard build location. + # Cleans up this packages source build directory. # # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, otherwise false. ## - def unpackSources - srcFile = File.basename( srcUrl ) - sourcesToUnpack = "#{$SOURCES_REPOSITORY}/#{srcFile}" - unpackTool = "" - logger = AbtLogManager.new + def removeBuildSources + if ( $removeBuildSources ) + buildSourcesLocation = "#{$BUILD_LOCATION}/#{srcDir}" - if ( !File.exist?( sourcesToUnpack ) ) - return false - end + if ( !File.directory?( buildSourcesLocation ) ) + return true + end - # determine which supported compression used [gz, tar, tgz, bz2, zip]. - compressionType = srcFile.split( '.' ) - - case compressionType.last - - when "gz" - unpackTool = "tar xzvf" - - when "tar" - unpackTool = "tar xvf" - - when "bz2" - unpackTool = "tar xjvf" - - when "tgz" - unpackTool = "tar xzvf" - - when "zip" - unpackTool = "unizp" - - else - # unsupported format. - return false + # TODO: system call removal? + if ( !FileUtils.rm_rf buildSourcesLocation, :verbose => true ) + return false + end end - - #logger.logToJournal( "DEBUG: unpack tool will be '#{unpackTool}'." ) - # TODO: system call removal? - if ( !system( "cd #{$BUILD_LOCATION}; #{unpackTool} #{sourcesToUnpack}" ) ) - return false - end - return true end - - ## - # Cleans up this packages source build directory. - # - # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, otherwise false. - ## - def removeBuildSources - buildSourcesLocation = "#{$BUILD_LOCATION}/#{srcDir}" - - if ( !File.directory?( buildSourcesLocation ) ) - return true - end - - # TODO: system call removal? - if ( !FileUtils.rm_rf buildSourcesLocation, :verbose => true ) - return false - end - end end Modified: src/trunk/abtconfig.rb =================================================================== --- src/trunk/abtconfig.rb 2006-11-19 10:57:29 UTC (rev 217) +++ src/trunk/abtconfig.rb 2006-11-19 12:47:38 UTC (rev 218) @@ -36,3 +36,7 @@ $JOURNAL = "#{$ABT_LOGS}/journal.log" $TIMESTAMP = Time.now.strftime( "%Y-%m-%d %H:%M:%S (%Z)" ) + +# default config options. +# +$removeBuildSources = false This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-19 10:57:30
|
Revision: 217 http://svn.sourceforge.net/abtlinux/?rev=217&view=rev Author: eschabell Date: 2006-11-19 02:57:29 -0800 (Sun, 19 Nov 2006) Log Message: ----------- Regenerated api docs. Modified Paths: -------------- src/trunk/doc/classes/AbtDownloadManager.html src/trunk/doc/classes/AbtPackage.html src/trunk/doc/classes/TestAbtDownloadManager.html src/trunk/doc/created.rid src/trunk/doc/files/AbtDownloadManager_rb.html src/trunk/doc/files/AbtPackage_rb.html src/trunk/doc/files/TestAbtDownloadManager_rb.html Modified: src/trunk/doc/classes/AbtDownloadManager.html =================================================================== --- src/trunk/doc/classes/AbtDownloadManager.html 2006-11-19 10:56:42 UTC (rev 216) +++ src/trunk/doc/classes/AbtDownloadManager.html 2006-11-19 10:57:29 UTC (rev 217) @@ -160,24 +160,56 @@ <div class="sectiontitle">Public Instance methods</div> <div class="method"> <div class="title"> - <a name="M000014"></a><b>retrieveNewsFeed</b>() + <a name="M000014"></a><b>retrieveNewsFeed</b>( uri ) </div> <div class="description"> <p> -Retrieves the AbTLinux news feed. +Retrieves the given feed and displays the news items. </p> <p> -<b>RETURN</b> <em>boolean</em> - True if the AbTLinux news feed has been -retrieved, otherwise false. +<b>PARAM</b> <em>String</em> - the uri of the rss news feed to be +retrieved. <b>RETURN</b> <em>boolean</em> - True if the AbTLinux news feed +has been retrieved, otherwise false. </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"> <pre> - <span class="ruby-comment cmt"># File AbtDownloadManager.rb, line 91</span> -91: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieveNewsFeed</span> -92: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtDownloadManager.rb, line 92</span> + 92: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieveNewsFeed</span>( <span class="ruby-identifier">uri</span> ) + 93: <span class="ruby-identifier">require</span> <span class="ruby-value str">'net/http'</span> + 94: <span class="ruby-identifier">require</span> <span class="ruby-value str">'uri'</span> + 95: <span class="ruby-identifier">require</span> <span class="ruby-value str">'rss/1.0'</span> + 96: <span class="ruby-identifier">require</span> <span class="ruby-value str">'rss/2.0'</span> + 97: + 98: <span class="ruby-comment cmt"># pick up the abtlinux.org news feed.</span> + 99: <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> ) ) ) +100: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to retrieve news feed #{uri}."</span> ) +101: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +102: <span class="ruby-keyword kw">end</span> +103: +104: <span class="ruby-comment cmt"># display the feeds.</span> +105: <span class="ruby-identifier">rss</span> = <span class="ruby-keyword kw">nil</span> +106: <span class="ruby-keyword kw">begin</span> +107: <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>) +108: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">RSS</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span> +109: <span class="ruby-keyword kw">end</span> +110: +111: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">rss</span>.<span class="ruby-identifier">nil?</span> ) +112: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to display news feed as feed #{uri} is not RSS 1.0/2.0."</span> ) +113: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +114: <span class="ruby-keyword kw">else</span> +115: <span class="ruby-identifier">puts</span> <span class="ruby-node">"*** #{rss.channel.title} ***"</span> +116: +117: <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> +118: <span class="ruby-identifier">itemCount</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> +119: <span class="ruby-identifier">puts</span> <span class="ruby-node">"#{itemCount} #{item.link} #{item.title}"</span> +120: <span class="ruby-keyword kw">end</span> +121: <span class="ruby-keyword kw">end</span> +122: +123: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +124: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -276,9 +308,9 @@ <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 AbtDownloadManager.rb, line 102</span> -102: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">updatePackage</span> -103: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtDownloadManager.rb, line 134</span> +134: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">updatePackage</span> +135: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -300,9 +332,9 @@ <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 AbtDownloadManager.rb, line 111</span> -111: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">updatePackageTree</span> -112: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtDownloadManager.rb, line 143</span> +143: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">updatePackageTree</span> +144: <span class="ruby-keyword kw">end</span> </pre> </div> </div> Modified: src/trunk/doc/classes/AbtPackage.html =================================================================== --- src/trunk/doc/classes/AbtPackage.html 2006-11-19 10:56:42 UTC (rev 216) +++ src/trunk/doc/classes/AbtPackage.html 2006-11-19 10:57:29 UTC (rev 217) @@ -573,19 +573,19 @@ <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"> <pre> - <span class="ruby-comment cmt"># File AbtPackage.rb, line 233</span> -233: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">removeBuildSources</span> -234: <span class="ruby-identifier">buildSourcesLocation</span> = <span class="ruby-node">"#{$BUILD_LOCATION}/#{srcDir}"</span> -235: -236: <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">buildSourcesLocation</span> ) ) -237: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -238: <span class="ruby-keyword kw">end</span> -239: -240: <span class="ruby-comment cmt"># TODO: system call removal?</span> -241: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span> <span class="ruby-identifier">buildSourcesLocation</span>, <span class="ruby-identifier">:verbose</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">true</span> ) -242: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -243: <span class="ruby-keyword kw">end</span> -244: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 263</span> +263: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">removeBuildSources</span> +264: <span class="ruby-identifier">buildSourcesLocation</span> = <span class="ruby-node">"#{$BUILD_LOCATION}/#{srcDir}"</span> +265: +266: <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">buildSourcesLocation</span> ) ) +267: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +268: <span class="ruby-keyword kw">end</span> +269: +270: <span class="ruby-comment cmt"># TODO: system call removal?</span> +271: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span> <span class="ruby-identifier">buildSourcesLocation</span>, <span class="ruby-identifier">:verbose</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">true</span> ) +272: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +273: <span class="ruby-keyword kw">end</span> +274: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -609,19 +609,49 @@ <pre> <span class="ruby-comment cmt"># File AbtPackage.rb, line 213</span> 213: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unpackSources</span> -214: <span class="ruby-identifier">sourcesToUnpack</span> = <span class="ruby-node">"#{$SOURCES_REPOSITORY}/#{File.basename( srcUrl )}"</span> -215: -216: <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">sourcesToUnpack</span> ) ) -217: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -218: <span class="ruby-keyword kw">end</span> -219: -220: <span class="ruby-comment cmt"># TODO: system call removal?</span> -221: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>( <span class="ruby-node">"cd #{$BUILD_LOCATION}; tar xzvf #{sourcesToUnpack}"</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: -225: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -226: <span class="ruby-keyword kw">end</span> +214: <span class="ruby-identifier">srcFile</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>( <span class="ruby-identifier">srcUrl</span> ) +215: <span class="ruby-identifier">sourcesToUnpack</span> = <span class="ruby-node">"#{$SOURCES_REPOSITORY}/#{srcFile}"</span> +216: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">""</span> +217: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">AbtLogManager</span>.<span class="ruby-identifier">new</span> +218: +219: <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">sourcesToUnpack</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-comment cmt"># determine which supported compression used [gz, tar, tgz, bz2, zip].</span> +224: <span class="ruby-identifier">compressionType</span> = <span class="ruby-identifier">srcFile</span>.<span class="ruby-identifier">split</span>( <span class="ruby-value str">'.'</span> ) +225: +226: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">compressionType</span>.<span class="ruby-identifier">last</span> +227: +228: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"gz"</span> +229: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">"tar xzvf"</span> +230: +231: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"tar"</span> +232: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">"tar xvf"</span> +233: +234: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"bz2"</span> +235: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">"tar xjvf"</span> +236: +237: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"tgz"</span> +238: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">"tar xzvf"</span> +239: +240: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"zip"</span> +241: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">"unizp"</span> +242: +243: <span class="ruby-keyword kw">else</span> +244: <span class="ruby-comment cmt"># unsupported format.</span> +245: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +246: <span class="ruby-keyword kw">end</span> +247: +248: <span class="ruby-comment cmt">#logger.logToJournal( "DEBUG: unpack tool will be '#{unpackTool}'." )</span> +249: +250: <span class="ruby-comment cmt"># TODO: system call removal?</span> +251: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>( <span class="ruby-node">"cd #{$BUILD_LOCATION}; #{unpackTool} #{sourcesToUnpack}"</span> ) ) +252: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +253: <span class="ruby-keyword kw">end</span> +254: +255: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +256: <span class="ruby-keyword kw">end</span> </pre> </div> </div> Modified: src/trunk/doc/classes/TestAbtDownloadManager.html =================================================================== --- src/trunk/doc/classes/TestAbtDownloadManager.html 2006-11-19 10:56:42 UTC (rev 216) +++ src/trunk/doc/classes/TestAbtDownloadManager.html 2006-11-19 10:57:29 UTC (rev 217) @@ -169,7 +169,7 @@ <pre> <span class="ruby-comment cmt"># File TestAbtDownloadManager.rb, line 57</span> 57: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">testRetrieveNewsFeed</span>() -58: <span class="ruby-identifier">assert</span>( <span class="ruby-ivar">@download</span>.<span class="ruby-identifier">retrieveNewsFeed</span>(), <span class="ruby-value str">"testRetrieveNewsFeed()"</span> ) +58: <span class="ruby-identifier">assert</span>( <span class="ruby-ivar">@download</span>.<span class="ruby-identifier">retrieveNewsFeed</span>( <span class="ruby-identifier">$ABTNEWS</span> ), <span class="ruby-value str">"testRetrieveNewsFeed()"</span> ) 59: <span class="ruby-keyword kw">end</span> </pre> </div> Modified: src/trunk/doc/created.rid =================================================================== --- src/trunk/doc/created.rid 2006-11-19 10:56:42 UTC (rev 216) +++ src/trunk/doc/created.rid 2006-11-19 10:57:29 UTC (rev 217) @@ -1 +1 @@ -Sat Nov 18 20:20:36 CET 2006 +Sun Nov 19 11:56:14 CET 2006 Modified: src/trunk/doc/files/AbtDownloadManager_rb.html =================================================================== --- src/trunk/doc/files/AbtDownloadManager_rb.html 2006-11-19 10:56:42 UTC (rev 216) +++ src/trunk/doc/files/AbtDownloadManager_rb.html 2006-11-19 10:57:29 UTC (rev 217) @@ -63,7 +63,7 @@ </tr> <tr> <td>Modified:</td> - <td>Wed Nov 15 15:38:44 CET 2006</td> + <td>Sun Nov 19 11:56:11 CET 2006</td> </tr> </table> </td></tr> @@ -113,6 +113,13 @@ </p> </div> + <div class="sectiontitle">Required Files</div> + <ul> + <li>net/http</li> + <li>uri</li> + <li>rss/1.0</li> + <li>rss/2.0</li> + </ul> Modified: src/trunk/doc/files/AbtPackage_rb.html =================================================================== --- src/trunk/doc/files/AbtPackage_rb.html 2006-11-19 10:56:42 UTC (rev 216) +++ src/trunk/doc/files/AbtPackage_rb.html 2006-11-19 10:57:29 UTC (rev 217) @@ -63,7 +63,7 @@ </tr> <tr> <td>Modified:</td> - <td>Sat Nov 18 20:20:34 CET 2006</td> + <td>Sun Nov 19 11:56:11 CET 2006</td> </tr> </table> </td></tr> Modified: src/trunk/doc/files/TestAbtDownloadManager_rb.html =================================================================== --- src/trunk/doc/files/TestAbtDownloadManager_rb.html 2006-11-19 10:56:42 UTC (rev 216) +++ src/trunk/doc/files/TestAbtDownloadManager_rb.html 2006-11-19 10:57:29 UTC (rev 217) @@ -63,7 +63,7 @@ </tr> <tr> <td>Modified:</td> - <td>Wed Nov 15 15:38:44 CET 2006</td> + <td>Sun Nov 19 11:56:11 CET 2006</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...> - 2006-11-19 10:56:42
|
Revision: 216 http://svn.sourceforge.net/abtlinux/?rev=216&view=rev Author: eschabell Date: 2006-11-19 02:56:42 -0800 (Sun, 19 Nov 2006) Log Message: ----------- Added support for unpacking gz, tgz, bz2, tar and zip formats. Modified Paths: -------------- src/trunk/AbtPackage.rb Modified: src/trunk/AbtPackage.rb =================================================================== --- src/trunk/AbtPackage.rb 2006-11-19 10:20:52 UTC (rev 215) +++ src/trunk/AbtPackage.rb 2006-11-19 10:56:42 UTC (rev 216) @@ -211,14 +211,44 @@ # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, otherwise false. ## def unpackSources - sourcesToUnpack = "#{$SOURCES_REPOSITORY}/#{File.basename( srcUrl )}" + srcFile = File.basename( srcUrl ) + sourcesToUnpack = "#{$SOURCES_REPOSITORY}/#{srcFile}" + unpackTool = "" + logger = AbtLogManager.new if ( !File.exist?( sourcesToUnpack ) ) return false end + # determine which supported compression used [gz, tar, tgz, bz2, zip]. + compressionType = srcFile.split( '.' ) + + case compressionType.last + + when "gz" + unpackTool = "tar xzvf" + + when "tar" + unpackTool = "tar xvf" + + when "bz2" + unpackTool = "tar xjvf" + + when "tgz" + unpackTool = "tar xzvf" + + when "zip" + unpackTool = "unizp" + + else + # unsupported format. + return false + end + + #logger.logToJournal( "DEBUG: unpack tool will be '#{unpackTool}'." ) + # TODO: system call removal? - if ( !system( "cd #{$BUILD_LOCATION}; tar xzvf #{sourcesToUnpack}" ) ) + if ( !system( "cd #{$BUILD_LOCATION}; #{unpackTool} #{sourcesToUnpack}" ) ) return false end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-19 10:20:56
|
Revision: 215 http://svn.sourceforge.net/abtlinux/?rev=215&view=rev Author: eschabell Date: 2006-11-19 02:20:52 -0800 (Sun, 19 Nov 2006) Log Message: ----------- General cleanup for column width of 80 chars in code where possible. Moved retrieval of news feed to download manager. Renamed abtConfig file to abtconfig and propogated to abt and testSuite. Modified Paths: -------------- src/trunk/AbtDownloadManager.rb src/trunk/abt.rb src/trunk/testSuiteAbt.rb Added Paths: ----------- src/trunk/abtconfig.rb Removed Paths: ------------- src/trunk/abtConfig.rb Modified: src/trunk/AbtDownloadManager.rb =================================================================== --- src/trunk/AbtDownloadManager.rb 2006-11-19 10:19:03 UTC (rev 214) +++ src/trunk/AbtDownloadManager.rb 2006-11-19 10:20:52 UTC (rev 215) @@ -83,12 +83,44 @@ end ## - # Retrieves the AbTLinux news feed. + # Retrieves the given feed and displays the news items. # + # <b>PARAM</b> <i>String</i> - the uri of the rss news feed to be retrieved. # <b>RETURN</b> <i>boolean</i> - True if the AbTLinux news feed has been # retrieved, otherwise false. ## - def retrieveNewsFeed + def retrieveNewsFeed( uri ) + require 'net/http' + require 'uri' + require 'rss/1.0' + require 'rss/2.0' + + # pick up the abtlinux.org news feed. + if ( !news = Net::HTTP.get( URI.parse( uri ) ) ) + logger.logToJournal( "Failed to retrieve news feed #{uri}." ) + return false + end + + # display the feeds. + rss = nil + begin + rss = RSS::Parser.parse(news, false) + rescue RSS::Error + end + + if ( rss.nil? ) + logger.logToJournal( "Failed to display news feed as feed #{uri} is not RSS 1.0/2.0." ) + return false + else + puts "*** #{rss.channel.title} ***" + + rss.items.each_with_index do |item, itemCount| + itemCount += 1 + puts "#{itemCount} #{item.link} #{item.title}" + end + end + + return true end ## Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-11-19 10:19:03 UTC (rev 214) +++ src/trunk/abt.rb 2006-11-19 10:20:52 UTC (rev 215) @@ -24,7 +24,7 @@ # AbTLinux; if not, write to the Free Software Foundation, Inc., 51 Franklin # St, Fifth Floor, Boston, MA 02110-1301 USA ## -require 'abtConfig' +require 'abtconfig' require 'AbtPackageManager' require 'AbtLogManager' require 'AbtReportManager' @@ -32,23 +32,17 @@ require 'AbtQueueManager' require 'AbtUsage' require 'fileutils' -require 'net/http' -require 'uri' -require 'rss/1.0' -require 'rss/2.0' -require 'optparse' - ## -# Setup needed classes and get ready -# to parse arguments. +# Setup needed classes and get ready to parse arguments. ## -manager = AbtPackageManager.new -logger = AbtLogManager.new -reporter = AbtReportManager.new -options = Hash.new -show = AbtUsage.new +manager = AbtPackageManager.new +logger = AbtLogManager.new +reporter = AbtReportManager.new +downloader = AbtDownloadManager.new +options = Hash.new +show = AbtUsage.new # deal with usage request. if ( ARGV.length == 0 ) @@ -61,6 +55,7 @@ # parse arguments. case ARGV[0] + # abt [ -i | install ] <package> when "install", "-i" if ( ARGV.length == 2 && File.exist?( "#{$PACKAGE_PATH}#{ARGV[1]}.rb" ) ) options['package'] = ARGV[1] @@ -70,10 +65,10 @@ puts "Completed install of #{options['package']}." logger.logToJournal( "Completed install of #{options['package']}." ) else - puts "#{options['package'].capitalize} install failed, see journal for possible reasons." + puts "#{options['package'].capitalize} install failed, see journal." end - reporter.showQueue( "install" ); # DEBUG. + #reporter.showQueue( "install" ); # DEBUG. else show.usage( "packages" ) exit @@ -101,7 +96,8 @@ if ( ARGV.length == 3 ) options['version'] = ARGV[1] options['package'] = ARGV[2] - puts "Downgradinging package : " + options['package'] + " to version : " + options['version'] + print "Downgradinging package : #{options['package']} " + puts "to version : #{options['version']}" else show.usage( "packages" ) exit @@ -110,7 +106,7 @@ when "freeze", "-f" if ( ARGV.length == 2 ) options['package'] = ARGV[1] - puts "Holdinging package : " + options['package'] + " at the current version." + puts "Holdinging package : #{options['package']} at current version." else show.usage( "packages" ) exit @@ -119,21 +115,22 @@ when "search", "-s" if ( ARGV.length == 2 ) options['searchString'] = ARGV[1] - puts "Searching package descriptions for : " + options['searchString'] + puts "Searching package descriptions for : #{options['searchString']}" else show.usage( "queries" ) exit end + # abt show-details <package> when "show-details" if ( ARGV.length == 2 && File.exist?( $PACKAGE_PATH + ARGV[1] + ".rb" ) ) - options['package'] = ARGV[1] - logger.logToJournal( "Starting to show details for " + options['package'] ) + options['pkg'] = ARGV[1] + logger.logToJournal( "Starting show details for #{options['pkg']}" ) - if ( reporter.showPackageDetails( options['package'] ) ) - logger.logToJournal( "Completed show details for " + options['package'] ) + if ( reporter.showPackageDetails( options['pkg'] ) ) + logger.logToJournal( "Completed show details for #{options['pkg']}" ) else - puts "Problems processing the details for #{options['package']}." + puts "Problems processing the details for #{options['pkg']}." end else show.usage( "queries" ) @@ -188,6 +185,7 @@ puts "Display all files on system not tracked by AbTLinux." show.usage( "queries" ) + # abt show-journal when "show-journal" reporter.showJournal @@ -205,41 +203,27 @@ when "html" puts "Generate HTML page from installed packages:" - puts " (package name with hyperlink to package website and version installed)" + puts " (package name with link to package website/version installed)" show.usage( "generation" ) # abt news | -n when "news", "-n" logger.logToJournal( "Starting to retrieve AbTLinux news." ) - # pick up the abtlinux.org news feed. - news = Net::HTTP.get( URI.parse( $ABTNEWS ) ) - threads = Net::HTTP.get( URI.parse( $ABTNEWS_THREADS ) ) - posts = Net::HTTP.get( URI.parse( $ABTNEWS_POSTS ) ) + # abtlinux.org news feeds. + puts "\n" + if ( !downloader.retrieveNewsFeed( $ABTNEWS ) ) + puts "Failed to retrieve the AbTLinux news feed." + end - newsArray = [ news, threads, posts ] - - # display the feeds. - newsArray.each_with_index do |feed, i| - rss = nil - begin - rss = RSS::Parser.parse(feed, false) - rescue RSS::Error - end - + puts "\n" + if ( !downloader.retrieveNewsFeed( $ABTNEWS_THREADS ) ) + puts "Failed to retrieve the AbTLinux forum threads news feed." + end - if ( rss.nil? ) - puts "Feed #{i} is not RSS 1.0/2.0." - logger.logToJournal( "Failed to display news feed as feed #{i} is not RSS 1.0/2.0." ) - else - puts "\n\n" - puts "*** #{rss.channel.title} ***" - - rss.items.each_with_index do |item, itemCount| - itemCount += 1 - puts "#{itemCount} #{item.link} #{item.title}" - end - end + puts "\n" + if ( !downloader.retrieveNewsFeed( $ABTNEWS_POSTS ) ) + puts "Failed to retrieve the AbTLinux new posts news feed." end logger.logToJournal( "Completed the retrieval of AbTLinux news." ) @@ -247,24 +231,28 @@ # abt [-d | download ] <package> when "download", "-d" if ( ARGV.length == 2 && File.exist?( $PACKAGE_PATH + ARGV[1] + ".rb" ) ) - options['package'] = ARGV[1] - logger.logToJournal( "Starting to download " + options['package'] ) + options['pkg'] = ARGV[1] + logger.logToJournal( "Starting to download " + options['pkg'] ) if ( !File.directory?( $SOURCES_REPOSITORY ) ) FileUtils.mkdir_p( $SOURCES_REPOSITORY ) # initialize directory. - logger.logToJournal( "Had to initialize directory - " + $SOURCES_REPOSITORY ) + logger.logToJournal( "Created directory - " + $SOURCES_REPOSITORY ) end manager = AbtDownloadManager.new - if ( manager.retrievePackageSource( options['package'], $SOURCES_REPOSITORY ) ) - logger.logToJournal( "Finished download for " + options['package'] ) - puts "\nDownloading of " + options['package'] + " to " + $SOURCES_REPOSITORY + " completed.\n\n" + if ( manager.retrievePackageSource( options['pkg'], $SOURCES_REPOSITORY ) ) + logger.logToJournal( "Finished download for " + options['pkg'] ) + puts "\n"; + print "Downloading of #{options['pkg']} to #{$SOURCES_REPOSITORY} " + puts "completed." + puts "\n\n" else - logger.logToJournal( "FAILURE to download " + options['package'] ) - puts "\nDOWNLOADING - failed to download source for " + options['package'] + "\n\n" + logger.logToJournal( "FAILURE to download " + options['pkg'] ) + puts "\n" + puts "DOWNLOADING - failed to download source for #{options['pkg']}" + puts "\n\n" end - else show.usage( "downloads" ) exit @@ -273,7 +261,7 @@ when "update", "-u" if ( ARGV.length == 2 ) options['updateItem'] = ARGV[1] - puts "Updating this item (either package or a package tree : " + options['updateItem'] + puts "Updating item : #{options['updateItem']}" else show.usage( "downloads" ) exit @@ -316,8 +304,9 @@ when "verify-integrity" if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Verifiy the integrity of installed files for package : " + options['package'] + options['pkg'] = ARGV[1] + print "Verifiy integrity of installed files for " + puts "package : #{options['pkg']}" else show.usage( "fix" ) exit @@ -325,8 +314,8 @@ when "fix" if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Package : " + options['package'] + " is verified and checked if needed." + options['pkg'] = ARGV[1] + puts "Package : #{options['pkg']} is verified and checked if needed." else show.usage( "fix" ) exit @@ -335,7 +324,8 @@ when "build-location" if ( ARGV.length == 2 ) options['buildHost'] = ARGV[1] - puts "Sets global location for retrieving cached build packages to : " + options['buildHost'] + print "Sets global location for retrieving cached build packages " + puts "to : #{options['buildHost']}" else show.usage( "maintenance" ) exit Deleted: src/trunk/abtConfig.rb =================================================================== --- src/trunk/abtConfig.rb 2006-11-19 10:19:03 UTC (rev 214) +++ src/trunk/abtConfig.rb 2006-11-19 10:20:52 UTC (rev 215) @@ -1,38 +0,0 @@ -#!/usr/bin/ruby -w - -## -# abtConfig.rb -# -# The system configuration for the abt package manager. -# -# Created by Eric D. Schabell <er...@ab...> -# Copyright July 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 -## -$PACKAGE_PATH = "./packages/" -$SOURCES_REPOSITORY = "/var/spool/abt/sources" -$BUILD_LOCATION = "/usr/src" - -$ABTNEWS = "http://abtlinux.org/e107_plugins/rss_menu/rss.php?1.2" -$ABTNEWS_THREADS = "http://abtlinux.org/e107_plugins/rss_menu/rss.php?6.2" -$ABTNEWS_POSTS = "http://abtlinux.org/e107_plugins/rss_menu/rss.php?7.2" - -$ABT_LOGS = "/var/log/abt" -$JOURNAL = "#{$ABT_LOGS}/journal.log" - -$TIMESTAMP = Time.now.strftime( "%Y-%m-%d %H:%M:%S (%Z)" ) Copied: src/trunk/abtconfig.rb (from rev 213, src/trunk/abtConfig.rb) =================================================================== --- src/trunk/abtconfig.rb (rev 0) +++ src/trunk/abtconfig.rb 2006-11-19 10:20:52 UTC (rev 215) @@ -0,0 +1,38 @@ +#!/usr/bin/ruby -w + +## +# abtconfig.rb +# +# The system configuration for the abt package manager. +# +# Created by Eric D. Schabell <er...@ab...> +# Copyright July 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 +## +$PACKAGE_PATH = "./packages/" +$SOURCES_REPOSITORY = "/var/spool/abt/sources" +$BUILD_LOCATION = "/usr/src" + +$ABTNEWS = "http://abtlinux.org/e107_plugins/rss_menu/rss.php?1.2" +$ABTNEWS_THREADS = "http://abtlinux.org/e107_plugins/rss_menu/rss.php?6.2" +$ABTNEWS_POSTS = "http://abtlinux.org/e107_plugins/rss_menu/rss.php?7.2" + +$ABT_LOGS = "/var/log/abt" +$JOURNAL = "#{$ABT_LOGS}/journal.log" + +$TIMESTAMP = Time.now.strftime( "%Y-%m-%d %H:%M:%S (%Z)" ) Modified: src/trunk/testSuiteAbt.rb =================================================================== --- src/trunk/testSuiteAbt.rb 2006-11-19 10:19:03 UTC (rev 214) +++ src/trunk/testSuiteAbt.rb 2006-11-19 10:20:52 UTC (rev 215) @@ -7,7 +7,7 @@ end require 'test/unit' -require 'abtConfig' +require 'abtconfig' require 'fileutils' require 'TestAbtDepEngine' require 'TestAbtDownloadManager' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |