abtlinux-svn Mailing List for ABout Time Linux (AbTLinux) (Page 4)
Status: Alpha
Brought to you by:
eschabell
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(12) |
Apr
(4) |
May
(61) |
Jun
(5) |
Jul
(12) |
Aug
(1) |
Sep
|
Oct
(29) |
Nov
(89) |
Dec
(37) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(4) |
Feb
(33) |
Mar
(12) |
Apr
|
May
(2) |
Jun
(13) |
Jul
(76) |
Aug
(7) |
Sep
(21) |
Oct
|
Nov
|
Dec
(33) |
2008 |
Jan
(32) |
Feb
(24) |
Mar
(17) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(10) |
From: <esc...@us...> - 2008-01-12 18:33:29
|
Revision: 477 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=477&view=rev Author: eschabell Date: 2008-01-12 10:32:06 -0800 (Sat, 12 Jan 2008) Log Message: ----------- Removed an unused object. Modified Paths: -------------- src/trunk/libs/abtpackagemanager.rb Modified: src/trunk/libs/abtpackagemanager.rb =================================================================== --- src/trunk/libs/abtpackagemanager.rb 2008-01-12 15:14:21 UTC (rev 476) +++ src/trunk/libs/abtpackagemanager.rb 2008-01-12 18:32:06 UTC (rev 477) @@ -373,7 +373,6 @@ def freeze_package(package) require "#{$PACKAGE_PATH}#{package}" sw = eval("#{package.capitalize}.new") - myLogger = AbtLogManager.new # TODO: refactor myLogger. logger = Logger.new($JOURNAL) system = AbtSystemManager.new This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-12 15:14:16
|
Revision: 476 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=476&view=rev Author: eschabell Date: 2008-01-12 07:14:21 -0800 (Sat, 12 Jan 2008) Log Message: ----------- Changes to make these work in eclipse testing framework (still works cli too). Modified Paths: -------------- src/trunk/tests/testabtpackage.rb src/trunk/tests/testsuiteabt.rb Modified: src/trunk/tests/testabtpackage.rb =================================================================== --- src/trunk/tests/testabtpackage.rb 2008-01-11 20:25:55 UTC (rev 475) +++ src/trunk/tests/testabtpackage.rb 2008-01-12 15:14:21 UTC (rev 476) @@ -1,7 +1,7 @@ #!/usr/bin/ruby -w $LOAD_PATH.unshift '../' -$LOAD_PATH.unshift '../packages/' +$LOAD_PATH.unshift '/var/spool/abt/packages/' require 'test/unit/testcase' require 'test/unit/autorunner' Modified: src/trunk/tests/testsuiteabt.rb =================================================================== --- src/trunk/tests/testsuiteabt.rb 2008-01-11 20:25:55 UTC (rev 475) +++ src/trunk/tests/testsuiteabt.rb 2008-01-12 15:14:21 UTC (rev 476) @@ -6,7 +6,7 @@ exit end -$LOAD_PATH.unshift '/etc/abt/' +$LOAD_PATH.unshift '../' require 'test/unit' require 'abtconfig' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-11 20:25:51
|
Revision: 475 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=475&view=rev Author: eschabell Date: 2008-01-11 12:25:55 -0800 (Fri, 11 Jan 2008) Log Message: ----------- Mega cleanup of code as changed a few coding standards. Regenerated api docs. Modified Paths: -------------- src/trunk/abt.rb src/trunk/abttemplate.rb src/trunk/doc/classes/AbtDepEngine.html src/trunk/doc/classes/AbtDownloadManager.html src/trunk/doc/classes/AbtLogManager.html src/trunk/doc/classes/AbtPackage.html src/trunk/doc/classes/AbtPackageManager.html src/trunk/doc/classes/AbtQueueManager.html src/trunk/doc/classes/AbtReportManager.html src/trunk/doc/classes/AbtSystemManager.html src/trunk/doc/classes/AbtUsage.html src/trunk/doc/classes/TestAbtDepEngine.html src/trunk/doc/classes/TestAbtDownloadManager.html src/trunk/doc/classes/TestAbtLogManager.html src/trunk/doc/classes/TestAbtPackage.html src/trunk/doc/classes/TestAbtPackageManager.html src/trunk/doc/classes/TestAbtQueueManager.html src/trunk/doc/classes/TestAbtReportManager.html src/trunk/doc/classes/TestAbtSystemManager.html src/trunk/doc/created.rid src/trunk/doc/files/libs/abtdepengine_rb.html src/trunk/doc/files/libs/abtdownloadmanager_rb.html src/trunk/doc/files/libs/abtlogmanager_rb.html src/trunk/doc/files/libs/abtpackage_rb.html src/trunk/doc/files/libs/abtpackagemanager_rb.html src/trunk/doc/files/libs/abtqueuemanager_rb.html src/trunk/doc/files/libs/abtreportmanager_rb.html src/trunk/doc/files/libs/abtsystemmanager_rb.html src/trunk/doc/files/libs/abtusage_rb.html src/trunk/doc/files/tests/testabtdepengine_rb.html src/trunk/doc/files/tests/testabtdownloadmanager_rb.html src/trunk/doc/files/tests/testabtlogmanager_rb.html src/trunk/doc/files/tests/testabtpackage_rb.html src/trunk/doc/files/tests/testabtpackagemanager_rb.html src/trunk/doc/files/tests/testabtqueuemanager_rb.html src/trunk/doc/files/tests/testabtreportmanager_rb.html src/trunk/doc/files/tests/testabtsystemmanager_rb.html src/trunk/libs/abtdownloadmanager.rb src/trunk/libs/abtlogmanager.rb src/trunk/libs/abtpackage.rb src/trunk/libs/abtpackagemanager.rb src/trunk/libs/abtqueuemanager.rb src/trunk/libs/abtreportmanager.rb src/trunk/libs/abtsystemmanager.rb src/trunk/libs/abtusage.rb src/trunk/packages/fortune.rb src/trunk/packages/ipc.rb src/trunk/tests/testabtdepengine.rb src/trunk/tests/testabtdownloadmanager.rb src/trunk/tests/testabtlogmanager.rb src/trunk/tests/testabtpackage.rb src/trunk/tests/testabtpackagemanager.rb src/trunk/tests/testabtqueuemanager.rb src/trunk/tests/testabtreportmanager.rb src/trunk/tests/testabtsystemmanager.rb src/trunk/tests/testsuiteabt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2008-01-02 21:10:48 UTC (rev 474) +++ src/trunk/abt.rb 2008-01-11 20:25:55 UTC (rev 475) @@ -29,16 +29,16 @@ # $ABTLINUX_CLASS_LIBS = "https://abtlinux.svn.sourceforge.net/svnroot/abtlinux/src/trunk/libs" -if ( ! File.directory?( '/var/lib/abt' ) || Dir["/var/lib/abt"].empty? ) +if (! File.directory?('/var/lib/abt') || Dir["/var/lib/abt"].empty?) puts "\nMissing needed AbTLinux library files at /var/lib/abt" puts "\nMaybe time for an abt update? Let us try to fix it for you!\n" # check for root login. - if ( Process.uid != 0 ) + if (Process.uid != 0) puts "\nMust be root to fix library files." exit else - system( "svn co #{$ABTLINUX_CLASS_LIBS} /var/lib/abt/" ) + system("svn co #{$ABTLINUX_CLASS_LIBS} /var/lib/abt/") end $LOAD_PATH.unshift '/var/lib/abt/' @@ -48,7 +48,7 @@ # $ABTLINUX_MAIN_CONFIG = "https://abtlinux.svn.sourceforge.net/svnroot/abtlinux/src/trunk/abtconfig.rb" -if File.exist?( "/etc/abt/abtconfig.rb" ) +if File.exist?("/etc/abt/abtconfig.rb") $LOAD_PATH.unshift '/etc/abt/' load 'abtconfig.rb' else @@ -57,23 +57,23 @@ puts "\nMaybe time for an abt update? Let us try to fix it for you!\n" # check for root login. - if ( Process.uid != 0 ) + if (Process.uid != 0) puts "\nMust be root to fix configuration files." exit else ["/etc/abt", "/etc/abt/local"].each { |dir| - if ( ! File.directory?( dir ) ) - FileUtils.mkdir_p( dir ) + if (! File.directory?(dir)) + FileUtils.mkdir_p(dir) puts "Created directory: #{dir}." end } - system( "svn export #{$ABTLINUX_MAIN_CONFIG} /etc/abt/abtconfig.rb" ) + system("svn export #{$ABTLINUX_MAIN_CONFIG} /etc/abt/abtconfig.rb") end $LOAD_PATH.unshift '/etc/abt/' load 'abtconfig.rb' - if File.exist?( "/etc/abt/local/localconfig.rb" ) + if File.exist?("/etc/abt/local/localconfig.rb") $LOAD_PATH.unshift '/etc/abt/local/' load 'localconfig.rb' end @@ -91,13 +91,13 @@ show = AbtUsage.new # deal with usage request. -if ( ARGV.length == 0 || ( ARGV.length == 1 && ( ARGV[0] == '--help' || ARGV[0] == '-h' || ARGV[0].downcase == 'help' ) ) ) - show.usage( "all" ) +if (ARGV.length == 0 || (ARGV.length == 1 && (ARGV[0] == '--help' || ARGV[0] == '-h' || ARGV[0].downcase == 'help'))) + show.usage("all") exit end # login as root for the rest. -manager.root_login( ARGV ) +manager.root_login(ARGV) # setup timestamp. logger = Logger.new($JOURNAL) # initializes all needed paths. @@ -107,7 +107,7 @@ myLogger = AbtLogManager.new # And loading local file if found. -if File.exist?( "/etc/abt/local/localconfig.rb" ) +if File.exist?("/etc/abt/local/localconfig.rb") load '/etc/abt/local/localconfig.rb' end @@ -117,125 +117,125 @@ # abt [ -i | install ] <package> when "install", "-i" - if ( ARGV.length == 2 && File.exist?( "#{$PACKAGE_PATH}#{ARGV[1]}.rb" ) ) + if (ARGV.length == 2 && File.exist?("#{$PACKAGE_PATH}#{ARGV[1]}.rb")) options['package'] = ARGV[1] - logger.info( "Starting to install #{options['package']}" ) + logger.info("Starting to install #{options['package']}") # return if already installed. - if ( system.package_installed( options['package'] ) ) + if (system.package_installed(options['package'])) puts "\n*** Package #{options['package']} is installed, might want to try reinstall? ***" puts "\n\tabt reinstall #{options['package']}\n\n" - logger.info( "Completed install of #{options['package']}." ) + logger.info("Completed install of #{options['package']}.") exit end - if ( manager.install_package( options['package'] ) ) + if (manager.install_package(options['package'])) puts "\n\n" puts "*** Completed install of #{options['package']}. ***" puts "\n\n" - logger.info( "Completed install of #{options['package']}." ) + logger.info("Completed install of #{options['package']}.") - if ( myLogger.cache_package( options['package'] ) ) + if (myLogger.cache_package(options['package'])) puts "\n\n" puts "*** Completed caching of package #{options['package']}. ***" puts "\n\n" - logger.info( "Caching completed for package #{options['package']}." ) + logger.info("Caching completed for package #{options['package']}.") else - logger.info( "Caching of package #{options['package']} failed.") + logger.info("Caching of package #{options['package']} failed.") end else puts "*** #{options['package'].capitalize} install failed, see journal. ***" end else - show.usage( "packages" ) + show.usage("packages") exit end when "reinstall", "-ri" - if ( ARGV.length == 2 && File.exist?( "#{$PACKAGE_PATH}#{ARGV[1]}.rb" ) ) + if (ARGV.length == 2 && File.exist?("#{$PACKAGE_PATH}#{ARGV[1]}.rb")) options['package'] = ARGV[1] - logger.info( "Starting to reinstall #{options['package']}" ) + logger.info("Starting to reinstall #{options['package']}") - if ( manager.reinstall_package( options['package'] ) ) + if (manager.reinstall_package(options['package'])) puts "\n\n" puts "*** Completed reinstall of #{options['package']}. ***" puts "\n\n" - logger.info( "Completed reinstall of #{options['package']}." ) + logger.info("Completed reinstall of #{options['package']}.") else puts "\n*** Unable to reinstall package #{options['package'].capitalize}, see why in the journal. ***" end else - show.usage( "packages" ) + show.usage("packages") exit end when "remove", "-r" - if ( ARGV.length == 2 ) + if (ARGV.length == 2) options['package'] = ARGV[1] puts "Starting to remove #{options['package']}." - logger.info( "Starting to remove #{options['package']}." ) + logger.info("Starting to remove #{options['package']}.") # return if not installed. - if ( !( system.package_installed( options['package'] ) ) ) + if (!(system.package_installed(options['package']))) puts "\n\n" puts "*** No need to remove #{options['package']}, it was not installed! ***" puts "\n\n" - logger.info( "Unabel to complete removal of #{options['package']}." ) + logger.info("Unabel to complete removal of #{options['package']}.") exit end # is installed, remove package. - if ( manager.remove_package( options['package'] ) ) + if (manager.remove_package(options['package'])) puts "\n\n" puts "*** Completed removal of #{options['package']}. ***" puts "\n\n" - logger.info( "Unabel to complete removal of #{options['package']}." ) + logger.info("Unabel to complete removal of #{options['package']}.") end puts "\n*** Unable to completed removal of #{options['package']}, see why in the journal. ***" - logger.info( "Unabel to complete removal of #{options['package']}." ) + logger.info("Unabel to complete removal of #{options['package']}.") else puts "\n*** Unable to completed removal of #{options['package']}, see why in the journal. ***" - logger.info( "Unabel to complete removal of #{options['package']}." ) - show.usage( "packages" ) + logger.info("Unabel to complete removal of #{options['package']}.") + show.usage("packages") exit end when "downgrade", "-dg" - if ( ARGV.length == 3 ) + if (ARGV.length == 3) options['version'] = ARGV[1] options['package'] = ARGV[2] # FIXME: downgrade pkg implementation. print "Downgradinging package : #{options['package']} " puts "to version : #{options['version']}" else - show.usage( "packages" ) + show.usage("packages") exit end when "freeze", "-f" - if ( ARGV.length == 2 ) + if (ARGV.length == 2) options['package'] = ARGV[1] - logger.info( "Starting freeze of package : #{options['package']}" ) + logger.info("Starting freeze of package : #{options['package']}") puts "\nAttempting to freeze package #{options['package']}." - if ( !manager.freeze_package( options['package'] ) ) + if (!manager.freeze_package(options['package'])) puts "\nUnable to freeze package #{options['package']}, see journal for details." end - logger.info( "Completed (un)freeze of package : #{options['package']}" ) + logger.info("Completed (un)freeze of package : #{options['package']}") puts "\nCompleted freeze of package : #{options['package']}" else - show.usage( "packages" ) - logger.info( "Completed (un)freeze of package : #{options['package']}" ) + show.usage("packages") + logger.info("Completed (un)freeze of package : #{options['package']}") exit end when "search", "-s" - if ( ARGV.length == 2 ) + if (ARGV.length == 2) options['searchString'] = ARGV[1] - logger.info( "Starting search of package descriptions for : #{options['searchString']}" ) - searchResults = reporter.search_package_descriptions( options['searchString'].chomp ) - if ( searchResults.empty? ) + logger.info("Starting search of package descriptions for : #{options['searchString']}") + searchResults = reporter.search_package_descriptions(options['searchString'].chomp) + if (searchResults.empty?) puts "\nNothing found matching your search query." exit else @@ -245,155 +245,155 @@ searchResults.each_pair { |name, description| puts "#{name} \t: #{description}" } end - logger.info( "Completed search of package descriptions for : #{options['searchString']}" ) + logger.info("Completed search of package descriptions for : #{options['searchString']}") else - show.usage( "queries" ) + show.usage("queries") exit end # abt -v | --version when "-v", "--version" - if ( ARGV.length == 1 ) + if (ARGV.length == 1) puts "Abt Package Manager version is : #{$ABT_VERSION}" else - show.usage( "queries" ) + show.usage("queries") exit end # abt show-details <package> when "show-details" - if ( ARGV.length == 2 && File.exist?( $PACKAGE_PATH + ARGV[1] + ".rb" ) ) + if (ARGV.length == 2 && File.exist?($PACKAGE_PATH + ARGV[1] + ".rb")) options['pkg'] = ARGV[1] - logger.info( "Starting show details for #{options['pkg']}" ) + logger.info("Starting show details for #{options['pkg']}") - if ( reporter.show_package_details( options['pkg'] ) ) - logger.info( "Completed show details for #{options['pkg']}" ) + if (reporter.show_package_details(options['pkg'])) + logger.info("Completed show details for #{options['pkg']}") else puts "Problems processing the details for #{options['pkg']}." end else - show.usage( "queries" ) + show.usage("queries") end when "show-config" - if ( ARGV.length == 2 ) + if (ARGV.length == 2) options['package'] = ARGV[1] - if !system.package_installed( options['package'] ) + if !system.package_installed(options['package']) puts "\nThe package #{options['package']} is not installed, can't show the configure log." exit end puts "\nDisplay configure log for package : #{options['package']}" puts "===============================\n" - reporter.show_package_log( options['package'], "configure" ) + reporter.show_package_log(options['package'], "configure") else - show.usage( "queries" ) + show.usage("queries") exit end when "show-build" - if ( ARGV.length == 2 ) + if (ARGV.length == 2) options['package'] = ARGV[1] - if !system.package_installed( options['package'] ) + if !system.package_installed(options['package']) puts "\nThe package #{options['package']} is not installed, can't show the build log." exit end puts "\nDisplay build log for package : #{options['package']}" puts "===============================\n" - reporter.show_package_log( options['package'], "build" ) + reporter.show_package_log(options['package'], "build") else - show.usage( "queries" ) + show.usage("queries") exit end when "show-install" - if ( ARGV.length == 2 ) + if (ARGV.length == 2) options['package'] = ARGV[1] - if !system.package_installed( options['package'] ) + if !system.package_installed(options['package']) puts "\nThe package #{options['package']} is not installed, can't show the install log." exit end puts "\nDisplay install log for package : #{options['package']}" puts "===============================\n" - reporter.show_package_log( options['package'], "install" ) + reporter.show_package_log(options['package'], "install") else - show.usage( "queries" ) + show.usage("queries") exit end when "show-integrity" - if ( ARGV.length == 2 ) + if (ARGV.length == 2) options['package'] = ARGV[1] - if !system.package_installed( options['package'] ) + if !system.package_installed(options['package']) puts "\nThe package #{options['package']} is not installed, can't show the integrity log." exit end puts "\nDisplay integrity log for package : #{options['package']}" puts "=================================\n" - reporter.show_package_log( options['package'], "integrity" ) + reporter.show_package_log(options['package'], "integrity") else - show.usage( "queries" ) + show.usage("queries") exit end when "show-depends" - if ( ARGV.length == 2 && File.exist?( $PACKAGE_PATH + ARGV[1] + ".rb" ) ) + if (ARGV.length == 2 && File.exist?($PACKAGE_PATH + ARGV[1] + ".rb")) options['pkg'] = ARGV[1] - logger.info( "Starting show depends for #{options['pkg']}" ) - if ( reporter.show_package_dependencies( options['pkg'] ) ) - logger.info( "Completed show depends for #{options['pkg']}" ) + logger.info("Starting show depends for #{options['pkg']}") + if (reporter.show_package_dependencies(options['pkg'])) + logger.info("Completed show depends for #{options['pkg']}") else puts "Problems showing the depends for #{options['pkg']}." end else - show.usage( "queries" ) + show.usage("queries") exit end when "show-files" - if ( ARGV.length == 2 ) + if (ARGV.length == 2) options['package'] = ARGV[1] - if !system.package_installed( options['package'] ) + if !system.package_installed(options['package']) puts "\nThe package #{options['package']} is not installed, can't show it's installed files." exit end puts "\nDisplay installed files from package : #{options['package']}" puts "====================================\n" - reporter.show_package_log( options['package'], "install" ) + reporter.show_package_log(options['package'], "install") else - show.usage( "queries" ) + show.usage("queries") exit end when "show-owner" - if ( ARGV.length == 2 ) + if (ARGV.length == 2) options['fileName'] = ARGV[1] # FIXME : display a file owner implementation. puts "Display owning package for file : " + options['fileName'] else - show.usage( "queries" ) + show.usage("queries") exit end when "show-installed" - if ( ARGV.length == 1 ) + if (ARGV.length == 1) reporter.show_installed_packages() else - show.usage( "queries" ) + show.usage("queries") exit end when "show-frozen" - if ( ARGV.length == 1 ) - logger.info( "Starting display of frozen packages." ) + if (ARGV.length == 1) + logger.info("Starting display of frozen packages.") frozenResults = reporter.show_frozen_packages - if ( frozenResults.empty? ) + if (frozenResults.empty?) puts "\n\nNothing is frozen at this time.\n\n" - logger.info( "Completed display of frozen packages." ) + logger.info("Completed display of frozen packages.") exit else # we have results hash! @@ -407,110 +407,110 @@ #puts "===========================================" puts "\n\n" - logger.info( "Completed display of frozen packages." ) + logger.info("Completed display of frozen packages.") else - show.usage( "queries" ) + show.usage("queries") exit end when "show-untracked" # FIXME : show untracked files implementation. puts "Display all files on system not tracked by AbTLinux." - show.usage( "queries" ) + show.usage("queries") # abt show-journal when "show-journal" - reporter.show_journal( $JOURNAL ) + reporter.show_journal($JOURNAL) when "show-iqueue" - reporter.show_queue( "install" ) + reporter.show_queue("install") when "show-patches" # FIXME : show patches implementation. puts "Display currently available patches for installed package tree." - show.usage( "queries" ) + show.usage("queries") when "show-updates" # FIXME : show updates implementation. puts "Display package listing with available update versions." - show.usage( "generation" ) + show.usage("generation") when "html" # FIXME : generate html installed pkgs implementation. puts "Generate HTML page from installed packages:" puts " (package name with link to package website/version installed)" - show.usage( "generation" ) + show.usage("generation") # abt news | -n when "news", "-n" - logger.info( "Starting to retrieve AbTLinux news." ) + logger.info("Starting to retrieve AbTLinux news.") # abtlinux.org news feeds. puts "\n" - if ( !downloader.retrieve_news_feed( $ABTNEWS ) ) + if (!downloader.retrieve_news_feed($ABTNEWS)) puts "Failed to retrieve the AbTLinux news feed." end puts "\n" - if ( !downloader.retrieve_news_feed( $ABTNEWS_THREADS, false ) ) + if (!downloader.retrieve_news_feed($ABTNEWS_THREADS, false)) puts "Failed to retrieve the AbTLinux forum threads news feed." end puts "\n" - if ( !downloader.retrieve_news_feed( $ABTNEWS_POSTS, false ) ) + if (!downloader.retrieve_news_feed($ABTNEWS_POSTS, false)) puts "Failed to retrieve the AbTLinux new posts news feed." end # display the file contents. - reporter.show_journal( $ABTNEWS_LOG ) + reporter.show_journal($ABTNEWS_LOG) - logger.info( "Completed the retrieval of AbTLinux news." ) + logger.info("Completed the retrieval of AbTLinux news.") # abt [-d | download ] <package> when "download", "-d" - if ( ARGV.length == 2 && File.exist?( $PACKAGE_PATH + ARGV[1] + ".rb" ) ) + if (ARGV.length == 2 && File.exist?($PACKAGE_PATH + ARGV[1] + ".rb")) options['pkg'] = ARGV[1] - logger.info( "Starting to download " + options['pkg'] ) + logger.info("Starting to download " + options['pkg']) manager = AbtDownloadManager.new - if ( manager.retrieve_package_source( options['pkg'], $SOURCES_REPOSITORY ) ) - logger.info( "Finished download for " + options['pkg'] ) + if (manager.retrieve_package_source(options['pkg'], $SOURCES_REPOSITORY)) + logger.info("Finished download for " + options['pkg']) puts "\n"; print "Downloading of #{options['pkg']} to #{$SOURCES_REPOSITORY} " puts "completed." puts "\n\n" else - logger.info( "FAILURE to download " + options['pkg'] ) + logger.info("FAILURE to download " + options['pkg']) puts "\n" puts "DOWNLOADING - failed to download source for #{options['pkg']}" puts "\n\n" end else - show.usage( "downloads" ) + show.usage("downloads") exit end when "update", "-u" - if ( ARGV.length == 2 ) + if (ARGV.length == 2) - if ( ARGV[1].length > 0 || ARGV[1] == "tree" || ARGV[1].downcase == "abtlinux" ) + if (ARGV[1].length > 0 || ARGV[1] == "tree" || ARGV[1].downcase == "abtlinux") if ARGV[1].downcase == "tree" || ARGV[1].downcase == "abtlinux" options['updateItem'] = "AbTLinux" puts "Start updating package tree : #{options['updateItem']}." logger.info "Start updating package tree : #{options['updateItem']}." - if downloader.update_package_tree( options['updateItem'] ) + if downloader.update_package_tree(options['updateItem']) puts "Updated package tree : #{options['updateItem']}." else puts "Unable to update package tree : #{options['updateItem']}." logger.error "Unable to update package tree : #{options['updateItem']}." - logger.info( "Finished updating package tree : #{options['updateItem']}.") + logger.info("Finished updating package tree : #{options['updateItem']}.") exit end - logger.info( "Finished updating package tree : #{options['updateItem']}.") + logger.info("Finished updating package tree : #{options['updateItem']}.") else # assuming package to be updated. @@ -519,120 +519,120 @@ puts "Start updating package : #{options['updateItem']}." logger.info "Start updating package : #{options['updateItem']}." - if downloader.update_package( options['updateItem'] ) + if downloader.update_package(options['updateItem']) puts "Updated package : #{options['updateItem']}." else puts "Unable to update package : #{options['updateItem']}." logger.error "Unable to update package : #{options['updateItem']}." - logger.info( "Finished updating package : #{options['updateItem']}") + logger.info("Finished updating package : #{options['updateItem']}") exit end - logger.info( "Finished updating package : #{options['updateItem']}") + logger.info("Finished updating package : #{options['updateItem']}") end else - show.usage( "downloads" ) + show.usage("downloads") exit end else - show.usage( "downloads" ) + show.usage("downloads") exit end when "purge-src" - if ( ARGV.length == 1 ) - logger.info( "Starting to purge sources from packages that are not installed.") - if ( system.cleanup_package_sources ) + if (ARGV.length == 1) + logger.info("Starting to purge sources from packages that are not installed.") + if (system.cleanup_package_sources) puts "\nPurged sources from packages that are not installed." - logger.info( "Finished purging sources from packages that are not installed.") + logger.info("Finished purging sources from packages that are not installed.") else puts "\nUnable to complete a purge of sources from packages that are not installed, see journal." - logger.info( "Cleanup of package sources encountered problems, see journal." ) + logger.info("Cleanup of package sources encountered problems, see journal.") end else - show.usage( "fix" ) + show.usage("fix") exit end when "verify-files" - if ( ARGV.length == 2 ) + if (ARGV.length == 2) options['package'] = ARGV[1] - logger.info( "Starting verifcation of files for package : #{options['package']}.") + logger.info("Starting verifcation of files for package : #{options['package']}.") - if system.verify_installed_files( options['package'] ) + if system.verify_installed_files(options['package']) puts "\nInstalled files verified for package : #{options['package']}" - logger.info( "Finished verifcation of files for package : #{options['package']}.") + logger.info("Finished verifcation of files for package : #{options['package']}.") exit end - logger.info( "Finished verifcation of files for package : #{options['package']}.") + logger.info("Finished verifcation of files for package : #{options['package']}.") puts "/nInstalled files verification for package : #{options['package']} failed, see journal." else - show.usage( "fix" ) + show.usage("fix") exit end when "verify-symlinks" - if ( ARGV.length == 2 ) + if (ARGV.length == 2) options['package'] = ARGV[1] # FIXME : verify symlinks for pkg implementation. puts "Symlinks verified for package : " + options['package'] else - show.usage( "fix" ) + show.usage("fix") exit end when "verify-deps" - if ( ARGV.length == 2 ) + if (ARGV.length == 2) options['package'] = ARGV[1] # FIXME : verify deps for pkg implementation. puts "Symlinks verified for package : " + options['package'] else - show.usage( "fix" ) + show.usage("fix") exit end when "verify-integrity" - if ( ARGV.length == 2 ) + if (ARGV.length == 2) options['package'] = ARGV[1] - logger.info( "Starting verification of files for package : #{options['package']}.") + logger.info("Starting verification of files for package : #{options['package']}.") - integrityHash = system.verify_package_integrity( options['package'] ) + integrityHash = system.verify_package_integrity(options['package']) if integrityHash.empty? puts "\nInstalled files integrity check completed without problems being detected for package : #{options['package']}" - logger.info( "Finished verification of files for package : #{options['package']}.") + logger.info("Finished verification of files for package : #{options['package']}.") exit end integrityHash.each_pair {|file, problem| puts "Problem with #{file} from package #{problem}" - logger.info( "Problem with #{file} from package #{problem}." ) + logger.info("Problem with #{file} from package #{problem}.") } puts "/nInstalled files integrity check failed for package : #{options['package']} failed, see journal." else - show.usage( "fix" ) + show.usage("fix") exit end when "fix" - if ( ARGV.length == 2 ) + if (ARGV.length == 2) options['pkg'] = ARGV[1] # FIXME : fix package impelmentation. puts "Package : #{options['pkg']} is verified and checked if needed." else - show.usage( "fix" ) + show.usage("fix") exit end when "build-location" - if ( ARGV.length == 2 ) + if (ARGV.length == 2) options['buildHost'] = ARGV[1] # FIXME : set global cache build location implementation. print "Sets global location for retrieving cached build packages " puts "to : #{options['buildHost']}" else - show.usage( "maintenance" ) + show.usage("maintenance") exit end @@ -648,7 +648,7 @@ # list called. when 2 # FIXME: implements this. - if ( ARGV[1] == "list" ) + if (ARGV[1] == "list") options['repoAction'] = ARGV[1] logger.info "TODO: Listing package repositories." elsif ARGV[1] == "add" || ARGV[1] == "remove" @@ -656,16 +656,16 @@ options['repoAction'] = ARGV[1] options['repoUri'] = "" else - show.usage( "maintenance" ) + show.usage("maintenance") exit end else - show.usage( "maintenance" ) + show.usage("maintenance") exit end # case ARGV.length. - logger.info( "Starting package-repo : #{options['repoAction']}.") + logger.info("Starting package-repo : #{options['repoAction']}.") # hook location based on action. case options['repoAction'] @@ -673,12 +673,12 @@ when "add" if options['repoUri'].length > 0 puts "Adding package repository : " + options['repoUri'] - if downloader.retrieve_package_tree( options['repoUri'] ) + if downloader.retrieve_package_tree(options['repoUri']) puts "Added package tree : #{options['repoUri']}." else puts "Unable to add package tree : #{options['repoUri']}." logger.error "Unable to add package tree : #{options['repoUri']}." - logger.info( "Finished package-repo : #{options['repoAction']}.") + logger.info("Finished package-repo : #{options['repoAction']}.") exit end else @@ -688,7 +688,7 @@ else puts "Unable to add package tree : Default AbTLinux Package Tree." logger.error "Unable to add package tree : Default AbTLinux Package Tree." - logger.info( "Finished package-repo : #{options['repoAction']}.") + logger.info("Finished package-repo : #{options['repoAction']}.") exit end end @@ -706,12 +706,12 @@ puts "TODO: Display listing of package repositories." else - show.usage( "maintenance" ) + show.usage("maintenance") exit end # case repoAction. - logger.info( "Finished package-repo : #{options['repoAction']}.") + logger.info("Finished package-repo : #{options['repoAction']}.") else - show.usage( "all" ) + show.usage("all") end # case ARGV[0]. Modified: src/trunk/abttemplate.rb =================================================================== --- src/trunk/abttemplate.rb 2008-01-02 21:10:48 UTC (rev 474) +++ src/trunk/abttemplate.rb 2008-01-11 20:25:55 UTC (rev 475) @@ -198,25 +198,25 @@ <script language="JavaScript" type="text/javascript"> // <![CDATA[ - function toggleSource( id ) + function toggleSource(id) { var elem var link - if( document.getElementById ) + if(document.getElementById) { - elem = document.getElementById( id ) - link = document.getElementById( "l_" + id ) + elem = document.getElementById(id) + link = document.getElementById("l_" + id) } - else if ( document.all ) + else if (document.all) { - elem = eval( "document.all." + id ) - link = eval( "document.all.l_" + id ) + elem = eval("document.all." + id) + link = eval("document.all.l_" + id) } else return false; - if( elem.style.display == "block" ) + if(elem.style.display == "block") { elem.style.display = "none" link.innerHTML = "show source" @@ -228,9 +228,9 @@ } } - function openCode( url ) + function openCode(url) { - window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" ) + window.open(url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes") } // ]]> </script> Modified: src/trunk/doc/classes/AbtDepEngine.html =================================================================== --- src/trunk/doc/classes/AbtDepEngine.html 2008-01-02 21:10:48 UTC (rev 474) +++ src/trunk/doc/classes/AbtDepEngine.html 2008-01-11 20:25:55 UTC (rev 475) @@ -11,25 +11,25 @@ <script language="JavaScript" type="text/javascript"> // <![CDATA[ - function toggleSource( id ) + function toggleSource(id) { var elem var link - if( document.getElementById ) + if(document.getElementById) { - elem = document.getElementById( id ) - link = document.getElementById( "l_" + id ) + elem = document.getElementById(id) + link = document.getElementById("l_" + id) } - else if ( document.all ) + else if (document.all) { - elem = eval( "document.all." + id ) - link = eval( "document.all.l_" + id ) + elem = eval("document.all." + id) + link = eval("document.all.l_" + id) } else return false; - if( elem.style.display == "block" ) + if(elem.style.display == "block") { elem.style.display = "none" link.innerHTML = "show source" @@ -41,9 +41,9 @@ } } - function openCode( url ) + function openCode(url) { - window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" ) + window.open(url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes") } // ]]> </script> Modified: src/trunk/doc/classes/AbtDownloadManager.html =================================================================== --- src/trunk/doc/classes/AbtDownloadManager.html 2008-01-02 21:10:48 UTC (rev 474) +++ src/trunk/doc/classes/AbtDownloadManager.html 2008-01-11 20:25:55 UTC (rev 475) @@ -11,25 +11,25 @@ <script language="JavaScript" type="text/javascript"> // <![CDATA[ - function toggleSource( id ) + function toggleSource(id) { var elem var link - if( document.getElementById ) + if(document.getElementById) { - elem = document.getElementById( id ) - link = document.getElementById( "l_" + id ) + elem = document.getElementById(id) + link = document.getElementById("l_" + id) } - else if ( document.all ) + else if (document.all) { - elem = eval( "document.all." + id ) - link = eval( "document.all.l_" + id ) + elem = eval("document.all." + id) + link = eval("document.all.l_" + id) } else return false; - if( elem.style.display == "block" ) + if(elem.style.display == "block") { elem.style.display = "none" link.innerHTML = "show source" @@ -41,9 +41,9 @@ } } - function openCode( url ) + function openCode(url) { - window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" ) + window.open(url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes") } // ]]> </script> @@ -161,7 +161,7 @@ <div class="sectiontitle">Public Instance methods</div> <div class="method"> <div class="title"> - <a name="M000015"></a><b>retrieve_news_feed</b>( uri, cleanLog=true ) + <a name="M000015"></a><b>retrieve_news_feed</b>(uri, cleanLog=true) </div> <div class="description"> <p> @@ -180,24 +180,24 @@ <div id="M000015_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 122</span> -122: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieve_news_feed</span>( <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">cleanLog</span>=<span class="ruby-keyword kw">true</span> ) +122: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieve_news_feed</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">cleanLog</span>=<span class="ruby-keyword kw">true</span>) 123: <span class="ruby-identifier">require</span> <span class="ruby-value str">'net/http'</span> 124: <span class="ruby-identifier">require</span> <span class="ruby-value str">'uri'</span> 125: <span class="ruby-identifier">require</span> <span class="ruby-value str">'rss/1.0'</span> 126: <span class="ruby-identifier">require</span> <span class="ruby-value str">'rss/2.0'</span> 127: <span class="ruby-identifier">newsLog</span> = <span class="ruby-value str">""</span> -128: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">$JOURNAL</span>) +128: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) 129: 130: <span class="ruby-comment cmt"># ensure we have our news logfile.</span> -131: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">cleanLog</span> ) -132: <span class="ruby-identifier">newsLog</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">$ABTNEWS_LOG</span>, <span class="ruby-value str">"w+"</span> ) +131: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">cleanLog</span>) +132: <span class="ruby-identifier">newsLog</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$ABTNEWS_LOG</span>, <span class="ruby-value str">"w+"</span>) 133: <span class="ruby-keyword kw">else</span> -134: <span class="ruby-identifier">newsLog</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">$ABTNEWS_LOG</span>, <span class="ruby-value str">"a+"</span> ) +134: <span class="ruby-identifier">newsLog</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$ABTNEWS_LOG</span>, <span class="ruby-value str">"a+"</span>) 135: <span class="ruby-keyword kw">end</span> 136: 137: <span class="ruby-comment cmt"># pick up the abtlinux.org news feed.</span> -138: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">news</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">get</span>( <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>( <span class="ruby-identifier">uri</span> ) ) ) -139: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>( <span class="ruby-node">"Failed to retrieve news feed #{uri}."</span> ) +138: <span class="ruby-keyword kw">if</span> (<span class="ruby-operator">!</span><span class="ruby-identifier">news</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">get</span>(<span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">uri</span>))) +139: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Failed to retrieve news feed #{uri}."</span>) 140: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> 141: <span class="ruby-keyword kw">end</span> 142: @@ -208,8 +208,8 @@ 147: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">RSS</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span> 148: <span class="ruby-keyword kw">end</span> 149: -150: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">rss</span>.<span class="ruby-identifier">nil?</span> ) -151: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>( <span class="ruby-node">"Failed to display news feed as feed #{uri} is not RSS 1.0/2.0."</span> ) +150: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">rss</span>.<span class="ruby-identifier">nil?</span>) +151: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Failed to display news feed as feed #{uri} is not RSS 1.0/2.0."</span>) 152: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> 153: <span class="ruby-keyword kw">else</span> 154: <span class="ruby-identifier">newsLog</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"*** #{rss.channel.title} ***\n"</span> @@ -231,7 +231,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000013"></a><b>retrieve_package_source</b>( packageName, destination ) + <a name="M000013"></a><b>retrieve_package_source</b>(packageName, destination) </div> <div class="description"> <p> @@ -253,19 +253,19 @@ <div id="M000013_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 56</span> -56: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieve_package_source</span>( <span class="ruby-identifier">packageName</span>, <span class="ruby-identifier">destination</span> ) +56: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieve_package_source</span>(<span class="ruby-identifier">packageName</span>, <span class="ruby-identifier">destination</span>) 57: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}#{packageName}"</span> 58: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) -59: <span class="ruby-identifier">package</span> = <span class="ruby-identifier">eval</span>( <span class="ruby-identifier">packageName</span>.<span class="ruby-identifier">capitalize</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'.new'</span> ) +59: <span class="ruby-identifier">package</span> = <span class="ruby-identifier">eval</span>(<span class="ruby-identifier">packageName</span>.<span class="ruby-identifier">capitalize</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'.new'</span>) 60: -61: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>( <span class="ruby-node">"#{destination}/#{File.basename( package.srcUrl )}"</span> ) ) -62: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>( <span class="ruby-node">"Download not needed, existing source found for #{packageName}"</span> ) +61: <span class="ruby-keyword kw">if</span> (<span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-node">"#{destination}/#{File.basename(package.srcUrl)}"</span>)) +62: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Download not needed, existing source found for #{packageName}"</span>) 63: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> 64: <span class="ruby-keyword kw">end</span> 65: -66: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>( <span class="ruby-identifier">destination</span> ) -67: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">system</span>( <span class="ruby-node">"wget #{package.srcUrl}"</span> ) ) -68: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>( <span class="ruby-node">"Download completed for #{packageName}"</span> ) +66: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-identifier">destination</span>) +67: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">system</span>(<span class="ruby-node">"wget #{package.srcUrl}"</span>)) +68: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Download completed for #{packageName}"</span>) 69: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> 70: <span class="ruby-keyword kw">end</span> 71: @@ -277,7 +277,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000014"></a><b>retrieve_package_tree</b>( packageTreeName="AbTLinux" ) + <a name="M000014"></a><b>retrieve_package_tree</b>(packageTreeName="AbTLinux") </div> <div class="description"> <p> @@ -297,13 +297,13 @@ <div id="M000014_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 83</span> - 83: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieve_package_tree</span>( <span class="ruby-identifier">packageTreeName</span>=<span class="ruby-value str">"AbTLinux"</span> ) + 83: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieve_package_tree</span>(<span class="ruby-identifier">packageTreeName</span>=<span class="ruby-value str">"AbTLinux"</span>) 84: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) 85: 86: <span class="ruby-comment cmt"># check if package tree exists.</span> - 87: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>( <span class="ruby-identifier">$PACKAGE_PATH</span> ) + 87: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">$PACKAGE_PATH</span>) 88: <span class="ruby-comment cmt"># check if svn directory.</span> - 89: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>( <span class="ruby-node">"#{$PACKAGE_PATH}.svn"</span> ) + 89: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-node">"#{$PACKAGE_PATH}.svn"</span>) 90: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"Package tree #{packageTreeName} already installed."</span> 91: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> 92: <span class="ruby-keyword kw">else</span> @@ -315,7 +315,7 @@ 98: <span class="ruby-keyword kw">else</span> 99: 100: <span class="ruby-comment cmt"># pacakge directory does not exist, svn co.</span> -101: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">system</span>( <span class="ruby-node">"svn co #{$ABTLINUX_PACKAGES} #{$PACKAGE_PATH}"</span> ) +101: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">system</span>(<span class="ruby-node">"svn co #{$ABTLINUX_PACKAGES} #{$PACKAGE_PATH}"</span>) 102: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-value str">"Package tree installed (svn co)"</span> 103: <span class="ruby-keyword kw">else</span> 104: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"Package tree not installed (svn co), problems!"</span> @@ -332,7 +332,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000016"></a><b>update_package</b>( packageName ) + <a name="M000016"></a><b>update_package</b>(packageName) </div> <div class="description"> <p> @@ -351,14 +351,14 @@ <div id="M000016_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 176</span> -176: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_package</span>( <span class="ruby-identifier">packageName</span> ) -177: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) +176: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_package</span>(<span class="ruby-identifier">packageName</span>) +177: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) 178: 179: <span class="ruby-comment cmt"># check if package exists in tree. </span> -180: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>( <span class="ruby-node">"#{$PACKAGE_PATH}/#{packageName}.rb"</span> ) +180: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-node">"#{$PACKAGE_PATH}/#{packageName}.rb"</span>) 181: <span class="ruby-comment cmt"># check if svn directory.</span> -182: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>( <span class="ruby-node">"#{$PACKAGE_PATH}.svn"</span> ) -183: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">system</span>( <span class="ruby-node">"svn update #{$PACKAGE_PATH}/#{packageName.downcase}.rb"</span> ) +182: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-node">"#{$PACKAGE_PATH}.svn"</span>) +183: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">system</span>(<span class="ruby-node">"svn update #{$PACKAGE_PATH}/#{packageName.downcase}.rb"</span>) 184: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"Package #{packageName.downcase} updated (svn update)"</span> 185: <span class="ruby-keyword kw">else</span> 186: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-node">"Package #{packageName.downcase} unable to update (svn update)."</span> @@ -383,7 +383,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000017"></a><b>update_package_tree</b>( packageTreeName="AbTLinux" ) + <a name="M000017"></a><b>update_package_tree</b>(packageTreeName="AbTLinux") </div> <div class="description"> <p> @@ -403,14 +403,14 @@ <div id="M000017_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 211</span> -211: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_package_tree</span>( <span class="ruby-identifier">packageTreeName</span>=<span class="ruby-value str">"AbTLinux"</span> ) +211: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_package_tree</span>(<span class="ruby-identifier">packageTreeName</span>=<span class="ruby-value str">"AbTLinux"</span>) 212: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) 213: 214: <span class="ruby-comment cmt"># check if package tree exists.</span> -215: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>( <span class="ruby-identifier">$PACKAGE_PATH</span> ) +215: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">$PACKAGE_PATH</span>) 216: <span class="ruby-comment cmt"># check if svn directory.</span> -217: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>( <span class="ruby-node">"#{$PACKAGE_PATH}.svn"</span> ) -218: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">system</span>( <span class="ruby-node">"svn update #{$PACKAGE_PATH}"</span> ) +217: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-node">"#{$PACKAGE_PATH}.svn"</span>) +218: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">system</span>(<span class="ruby-node">"svn update #{$PACKAGE_PATH}"</span>) 219: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-value str">"Package tree updated (svn update)"</span> 220: <span class="ruby-keyword kw">else</span> 221: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"Package tree unable to update (svn update)."</span> @@ -435,7 +435,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000018"></a><b>validated</b>( hashvalue, path ) + <a name="M000018"></a><b>validated</b>(hashvalue, path) </div> <div class="description"> <p> @@ -456,17 +456,17 @@ <div id="M000018_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 247</span> -247: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validated</span>( <span class="ruby-identifier">hashvalue</span>, <span class="ruby-identifier">path</span> ) -248: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">$JOURNAL</span> ) +247: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validated</span>(<span class="ruby-identifier">hashvalue</span>, <span class="ruby-identifier">path</span>) +248: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) 249: -250: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hashvalue</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">SHA1</span>.<span class="ruby-identifier">hexdigest</span>( <span class="ruby-identifier">path</span> ) +250: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hashvalue</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">SHA1</span>.<span class="ruby-identifier">hexdigest</span>(<span class="ruby-identifier">path</span>) 251: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"Source hash validated successfully..."</span> -252: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>( <span class="ruby-value str">"Validated sources successfully..."</span> ) +252: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">"Validated sources successfully..."</span>) 253: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> 254: <span class="ruby-keyword kw">end</span> 255: 256: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"Source hash failed validation..."</span> -257: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>( <span class="ruby-value str">"Validating sources failed..."</span> ) +257: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">"Validating sources failed..."</span>) 258: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> 259: <span class="ruby-keyword kw">end</span> </pre> Modified: src/trunk/doc/classes/AbtLogManager.html =================================================================== --- src/trunk/doc/classes/AbtLogManager.html 2008-01-02 21:10:48 UTC (rev 474) +++ src/trunk/doc/classes/AbtLogManager.html 2008-01-11 20:25:55 UTC (rev 475) @@ -11,25 +11,25 @@ <script language="JavaScript" type="text/javascript"> // <![CDATA[ - function toggleSource( id ) + function toggleSource(id) { var elem var link - if( document.getElementById ) + if(document.getElementById) { - elem = document.getElementById( id ) - link = document.getElementById( "l_" + id ) + elem = document.getElementById(id) + link = document.getElementById("l_" + id) } - else if ( document.all ) + else if (document.all) { - elem = eval( "document.all." + id ) - link = eval( "document.all.l_" + id ) + elem = eval("document.all." + id) + link = eval("document.all.l_" + id) } else return false; - if( elem.style.display == "block" ) + if(elem.style.display == "block") { elem.style.display = "none" link.innerHTML = "show source" @@ -41,9 +41,9 @@ } } - function openCode( url ) + function openCode(url) { - window.open... [truncated message content] |
From: <esc...@us...> - 2008-01-02 22:10:53
|
Revision: 470 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=470&view=rev Author: eschabell Date: 2008-01-02 13:05:42 -0800 (Wed, 02 Jan 2008) Log Message: ----------- Removed the local libs path search in packages. Modified Paths: -------------- src/trunk/packages/fortune.rb src/trunk/packages/ipc.rb Modified: src/trunk/packages/fortune.rb =================================================================== --- src/trunk/packages/fortune.rb 2007-12-31 14:29:57 UTC (rev 469) +++ src/trunk/packages/fortune.rb 2008-01-02 21:05:42 UTC (rev 470) @@ -1,7 +1,6 @@ #!/usr/bin/ruby -w $LOAD_PATH.unshift '/var/lib/abt/' -$LOAD_PATH.unshift '../libs/' # development only. require "abtpackage" @@ -46,10 +45,10 @@ 'srcDir' => $srcDir, 'homepage' => "http://www.ibiblio.org/pub/Linux/games/amusements/#{$name.downcase}/", 'srcUrl' => "http://www.ibiblio.org/pub/Linux/games/amusements/#{$name.downcase}/#{$srcDir}.tar.gz", - 'dependsOn' => "", - 'reliesOn' => "", - 'optionalDO' => "", - 'optionalRO' => "", + 'dependsOn' => "my patience", + 'reliesOn' => "simply nothing", + 'optionalDO' => "garbage", + 'optionalRO' => "sense of humor", 'hashCheck' => "sha512:80c5b71d84eeb3092b2dfe483f0dad8ed42e2efeaa1f8791c2", 'patches' => "http://patches.abtlinux.org/#{$srcDir}-patches-1.tar.gz", 'patchesHashCheck' => "", Modified: src/trunk/packages/ipc.rb =================================================================== --- src/trunk/packages/ipc.rb 2007-12-31 14:29:57 UTC (rev 469) +++ src/trunk/packages/ipc.rb 2008-01-02 21:05:42 UTC (rev 470) @@ -1,7 +1,6 @@ #!/usr/bin/ruby -w $LOAD_PATH.unshift '/var/lib/abt/' -$LOAD_PATH.unshift '../libs/' # development only. require 'abtpackage' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-02 21:10:45
|
Revision: 474 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=474&view=rev Author: eschabell Date: 2008-01-02 13:10:48 -0800 (Wed, 02 Jan 2008) Log Message: ----------- Regenerated api docs. Modified Paths: -------------- src/trunk/doc/classes/AbtDepEngine.html src/trunk/doc/classes/AbtLogManager.html src/trunk/doc/classes/AbtQueueManager.html src/trunk/doc/classes/AbtReportManager.html src/trunk/doc/classes/TestAbtDepEngine.html src/trunk/doc/classes/TestAbtDownloadManager.html src/trunk/doc/classes/TestAbtLogManager.html src/trunk/doc/classes/TestAbtPackage.html src/trunk/doc/classes/TestAbtQueueManager.html src/trunk/doc/classes/TestAbtReportManager.html src/trunk/doc/classes/TestAbtSystemManager.html src/trunk/doc/created.rid src/trunk/doc/files/libs/abtreportmanager_rb.html src/trunk/doc/files/tests/testabtreportmanager_rb.html src/trunk/doc/fr_method_index.html Modified: src/trunk/doc/classes/AbtDepEngine.html =================================================================== --- src/trunk/doc/classes/AbtDepEngine.html 2008-01-02 21:08:23 UTC (rev 473) +++ src/trunk/doc/classes/AbtDepEngine.html 2008-01-02 21:10:48 UTC (rev 474) @@ -118,7 +118,7 @@ <div class="sectiontitle">Methods</div> <ul> - <li><a href="#M000094">new</a></li> + <li><a href="#M000095">new</a></li> </ul> @@ -129,7 +129,7 @@ <div class="sectiontitle">Public Class methods</div> <div class="method"> <div class="title"> - <a name="M000094"></a><b>new</b>() + <a name="M000095"></a><b>new</b>() </div> <div class="description"> <p> @@ -141,8 +141,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000094_source')" id="l_M000094_source">show source</a> ]</p> - <div id="M000094_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000095_source')" id="l_M000095_source">show source</a> ]</p> + <div id="M000095_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtdepengine.rb, line 41</span> 41: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> Modified: src/trunk/doc/classes/AbtLogManager.html =================================================================== --- src/trunk/doc/classes/AbtLogManager.html 2008-01-02 21:08:23 UTC (rev 473) +++ src/trunk/doc/classes/AbtLogManager.html 2008-01-02 21:10:48 UTC (rev 474) @@ -117,12 +117,12 @@ <div class="sectiontitle">Methods</div> <ul> - <li><a href="#M000069">cache_package</a></li> - <li><a href="#M000064">get_log</a></li> - <li><a href="#M000068">log_package_build</a></li> - <li><a href="#M000067">log_package_install</a></li> - <li><a href="#M000066">log_package_integrity</a></li> - <li><a href="#M000065">new</a></li> + <li><a href="#M000070">cache_package</a></li> + <li><a href="#M000065">get_log</a></li> + <li><a href="#M000069">log_package_build</a></li> + <li><a href="#M000068">log_package_install</a></li> + <li><a href="#M000067">log_package_integrity</a></li> + <li><a href="#M000066">new</a></li> </ul> @@ -133,7 +133,7 @@ <div class="sectiontitle">Public Class methods</div> <div class="method"> <div class="title"> - <a name="M000065"></a><b>new</b>() + <a name="M000066"></a><b>new</b>() </div> <div class="description"> <p> @@ -146,8 +146,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000065_source')" id="l_M000065_source">show source</a> ]</p> - <div id="M000065_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000066_source')" id="l_M000066_source">show source</a> ]</p> + <div id="M000066_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 80</span> 80: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> @@ -168,7 +168,7 @@ <div class="sectiontitle">Public Instance methods</div> <div class="method"> <div class="title"> - <a name="M000069"></a><b>cache_package</b>( package ) + <a name="M000070"></a><b>cache_package</b>( package ) </div> <div class="description"> <p> @@ -184,8 +184,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000069_source')" id="l_M000069_source">show source</a> ]</p> - <div id="M000069_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000070_source')" id="l_M000070_source">show source</a> ]</p> + <div id="M000070_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 207</span> 207: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cache_package</span>( <span class="ruby-identifier">package</span> ) @@ -271,7 +271,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000064"></a><b>get_log</b>( package, type ) + <a name="M000065"></a><b>get_log</b>( package, type ) </div> <div class="description"> <p> @@ -285,8 +285,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000064_source')" id="l_M000064_source">show source</a> ]</p> - <div id="M000064_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000065_source')" id="l_M000065_source">show source</a> ]</p> + <div id="M000065_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 43</span> 43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_log</span>( <span class="ruby-identifier">package</span>, <span class="ruby-identifier">type</span> ) @@ -324,7 +324,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000068"></a><b>log_package_build</b>( package ) + <a name="M000069"></a><b>log_package_build</b>( package ) </div> <div class="description"> <p> @@ -340,8 +340,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000068_source')" id="l_M000068_source">show source</a> ]</p> - <div id="M000068_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000069_source')" id="l_M000069_source">show source</a> ]</p> + <div id="M000069_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 187</span> 187: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_package_build</span>( <span class="ruby-identifier">package</span> ) @@ -360,7 +360,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000067"></a><b>log_package_install</b>( package ) + <a name="M000068"></a><b>log_package_install</b>( package ) </div> <div class="description"> <p> @@ -376,8 +376,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000067_source')" id="l_M000067_source">show source</a> ]</p> - <div id="M000067_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000068_source')" id="l_M000068_source">show source</a> ]</p> + <div id="M000068_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 139</span> 139: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_package_install</span>( <span class="ruby-identifier">package</span> ) @@ -424,7 +424,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000066"></a><b>log_package_integrity</b>( package ) + <a name="M000067"></a><b>log_package_integrity</b>( package ) </div> <div class="description"> <p> @@ -441,8 +441,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000066_source')" id="l_M000066_source">show source</a> ]</p> - <div id="M000066_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000067_source')" id="l_M000067_source">show source</a> ]</p> + <div id="M000067_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 102</span> 102: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_package_integrity</span>( <span class="ruby-identifier">package</span> ) Modified: src/trunk/doc/classes/AbtQueueManager.html =================================================================== --- src/trunk/doc/classes/AbtQueueManager.html 2008-01-02 21:08:23 UTC (rev 473) +++ src/trunk/doc/classes/AbtQueueManager.html 2008-01-02 21:10:48 UTC (rev 474) @@ -117,8 +117,8 @@ <div class="sectiontitle">Methods</div> <ul> - <li><a href="#M000093">action_package_queue</a></li> - <li><a href="#M000092">new</a></li> + <li><a href="#M000094">action_package_queue</a></li> + <li><a href="#M000093">new</a></li> </ul> @@ -129,7 +129,7 @@ <div class="sectiontitle">Public Class methods</div> <div class="method"> <div class="title"> - <a name="M000092"></a><b>new</b>() + <a name="M000093"></a><b>new</b>() </div> <div class="description"> <p> @@ -142,8 +142,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000092_source')" id="l_M000092_source">show source</a> ]</p> - <div id="M000092_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000093_source')" id="l_M000093_source">show source</a> ]</p> + <div id="M000093_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtqueuemanager.rb, line 41</span> 41: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> @@ -155,7 +155,7 @@ <div class="sectiontitle">Public Instance methods</div> <div class="method"> <div class="title"> - <a name="M000093"></a><b>action_package_queue</b>( package, queue, action="add" ) + <a name="M000094"></a><b>action_package_queue</b>( package, queue, action="add" ) </div> <div class="description"> <p> @@ -171,8 +171,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000093_source')" id="l_M000093_source">show source</a> ]</p> - <div id="M000093_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000094_source')" id="l_M000094_source">show source</a> ]</p> + <div id="M000094_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtqueuemanager.rb, line 54</span> 54: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">action_package_queue</span>( <span class="ruby-identifier">package</span>, <span class="ruby-identifier">queue</span>, <span class="ruby-identifier">action</span>=<span class="ruby-value str">"add"</span> ) Modified: src/trunk/doc/classes/AbtReportManager.html =================================================================== --- src/trunk/doc/classes/AbtReportManager.html 2008-01-02 21:08:23 UTC (rev 473) +++ src/trunk/doc/classes/AbtReportManager.html 2008-01-02 21:10:48 UTC (rev 474) @@ -117,19 +117,19 @@ <div class="sectiontitle">Methods</div> <ul> - <li><a href="#M000125">generate_HTML_package_listing</a></li> - <li><a href="#M000113">new</a></li> - <li><a href="#M000122">search_package_descriptions</a></li> - <li><a href="#M000121">show_file_owner</a></li> - <li><a href="#M000117">show_frozen_packages</a></li> - <li><a href="#M000115">show_installed_packages</a></li> - <li><a href="#M000120">show_journal</a></li> - <li><a href="#M000118">show_package_dependencies</a></li> - <li><a href="#M000114">show_package_details</a></li> - <li><a href="#M000116">show_package_log</a></li> - <li><a href="#M000123">show_queue</a></li> - <li><a href="#M000119">show_untracked_files</a></li> - <li><a href="#M000124">show_updates</a></li> + <li><a href="#M000126">generate_HTML_package_listing</a></li> + <li><a href="#M000114">new</a></li> + <li><a href="#M000123">search_package_descriptions</a></li> + <li><a href="#M000122">show_file_owner</a></li> + <li><a href="#M000118">show_frozen_packages</a></li> + <li><a href="#M000116">show_installed_packages</a></li> + <li><a href="#M000121">show_journal</a></li> + <li><a href="#M000119">show_package_dependencies</a></li> + <li><a href="#M000115">show_package_details</a></li> + <li><a href="#M000117">show_package_log</a></li> + <li><a href="#M000124">show_queue</a></li> + <li><a href="#M000120">show_untracked_files</a></li> + <li><a href="#M000125">show_updates</a></li> </ul> @@ -140,7 +140,7 @@ <div class="sectiontitle">Public Class methods</div> <div class="method"> <div class="title"> - <a name="M000113"></a><b>new</b>() + <a name="M000114"></a><b>new</b>() </div> <div class="description"> <p> @@ -152,8 +152,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000113_source')" id="l_M000113_source">show source</a> ]</p> - <div id="M000113_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000114_source')" id="l_M000114_source">show source</a> ]</p> + <div id="M000114_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 42</span> 42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> @@ -165,7 +165,7 @@ <div class="sectiontitle">Public Instance methods</div> <div class="method"> <div class="title"> - <a name="M000125"></a><b>generate_HTML_package_listing</b>() + <a name="M000126"></a><b>generate_HTML_package_listing</b>() </div> <div class="description"> <p> @@ -176,21 +176,21 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000125_source')" id="l_M000125_source">show source</a> ]</p> - <div id="M000125_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000126_source')" id="l_M000126_source">show source</a> ]</p> + <div id="M000126_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 334</span> -334: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generate_HTML_package_listing</span> -335: <span class="ruby-comment cmt"># TODO: implement this.</span> -336: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -337: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 358</span> +358: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generate_HTML_package_listing</span> +359: <span class="ruby-comment cmt"># TODO: implement this.</span> +360: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +361: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000122"></a><b>search_package_descriptions</b>( searchText ) + <a name="M000123"></a><b>search_package_descriptions</b>( searchText ) </div> <div class="description"> <p> @@ -206,51 +206,51 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000122_source')" id="l_M000122_source">show source</a> ]</p> - <div id="M000122_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000123_source')" id="l_M000123_source">show source</a> ]</p> + <div id="M000123_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 249</span> -249: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">search_package_descriptions</span>( <span class="ruby-identifier">searchText</span> ) -250: <span class="ruby-identifier">packageHash</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span> <span class="ruby-comment cmt"># has for values found.</span> -251: -252: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">entries</span>( <span class="ruby-identifier">$PACKAGE_INSTALLED</span> ) <span class="ruby-operator">-</span> [ <span class="ruby-value str">'.'</span>, <span class="ruby-value str">'..'</span> ] ).<span class="ruby-identifier">empty?</span> -253: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">packageHash</span> <span class="ruby-comment cmt"># empty hash, no entries.</span> -254: <span class="ruby-keyword kw">else</span> -255: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">foreach</span>( <span class="ruby-identifier">$PACKAGE_INSTALLED</span> ) { <span class="ruby-operator">|</span><span class="ruby-identifier">package</span><span class="ruby-operator">|</span> -256: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">package</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">"."</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">package</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">".."</span>) -257: <span class="ruby-comment cmt"># split the installed entry into two parts,</span> -258: <span class="ruby-comment cmt"># the package name and the version number.</span> -259: <span class="ruby-identifier">packageArray</span> = <span class="ruby-identifier">package</span>.<span class="ruby-identifier">split</span>( <span class="ruby-value str">"-"</span> ) -260: <span class="ruby-identifier">packageName</span> = <span class="ruby-identifier">packageArray</span>[<span class="ruby-value">0</span>] -261: -262: <span class="ruby-comment cmt"># check for match to name and description if the package file exists.</span> -263: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>( <span class="ruby-node">"#{$PACKAGE_PATH}#{packageName}.rb"</span> ) ) -264: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}#{packageName}"</span> -265: <span class="ruby-identifier">sw</span> = <span class="ruby-identifier">eval</span>( <span class="ruby-node">"#{packageName.capitalize}.new"</span> ) -266: -267: <span class="ruby-comment cmt"># add if matches name or description entries.</span> -268: <span class="ruby-identifier">matchesArray</span> = <span class="ruby-identifier">sw</span>.<span class="ruby-identifier">description</span>.<span class="ruby-identifier">scan</span>( <span class="ruby-identifier">searchText</span> ) -269: <span class="ruby-identifier">matchesArray</span> = <span class="ruby-identifier">matchesArray</span>.<span class="ruby-identifier">concat</span>( <span class="ruby-identifier">packageName</span>.<span class="ruby-identifier">scan</span>( <span class="ruby-identifier">searchText</span> ) ) -270: -271: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">matchesArray</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span> ) -272: <span class="ruby-comment cmt"># matches so add to hash.</span> -273: <span class="ruby-identifier">packageHash</span> = <span class="ruby-identifier">packageHash</span>.<span class="ruby-identifier">merge</span>( <span class="ruby-constant">Hash</span>[ <span class="ruby-node">"#{package}"</span> =<span class="ruby-operator">></span> <span class="ruby-node">"#{sw.description}"</span> ] ) -274: <span class="ruby-keyword kw">end</span> -275: <span class="ruby-keyword kw">end</span> -276: <span class="ruby-keyword kw">end</span> -277: } -278: <span class="ruby-keyword kw">end</span> -279: -280: <span class="ruby-comment cmt"># finished search results.</span> -281: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">packageHash</span> -282: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 273</span> +273: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">search_package_descriptions</span>( <span class="ruby-identifier">searchText</span> ) +274: <span class="ruby-identifier">packageHash</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span> <span class="ruby-comment cmt"># has for values found.</span> +275: +276: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">entries</span>( <span class="ruby-identifier">$PACKAGE_INSTALLED</span> ) <span class="ruby-operator">-</span> [ <span class="ruby-value str">'.'</span>, <span class="ruby-value str">'..'</span> ] ).<span class="ruby-identifier">empty?</span> +277: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">packageHash</span> <span class="ruby-comment cmt"># empty hash, no entries.</span> +278: <span class="ruby-keyword kw">else</span> +279: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">foreach</span>( <span class="ruby-identifier">$PACKAGE_INSTALLED</span> ) { <span class="ruby-operator">|</span><span class="ruby-identifier">package</span><span class="ruby-operator">|</span> +280: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">package</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">"."</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">package</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">".."</span>) +281: <span class="ruby-comment cmt"># split the installed entry into two parts,</span> +282: <span class="ruby-comment cmt"># the package name and the version number.</span> +283: <span class="ruby-identifier">packageArray</span> = <span class="ruby-identifier">package</span>.<span class="ruby-identifier">split</span>( <span class="ruby-value str">"-"</span> ) +284: <span class="ruby-identifier">packageName</span> = <span class="ruby-identifier">packageArray</span>[<span class="ruby-value">0</span>] +285: +286: <span class="ruby-comment cmt"># check for match to name and description if the package file exists.</span> +287: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>( <span class="ruby-node">"#{$PACKAGE_PATH}#{packageName}.rb"</span> ) ) +288: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}#{packageName}"</span> +289: <span class="ruby-identifier">sw</span> = <span class="ruby-identifier">eval</span>( <span class="ruby-node">"#{packageName.capitalize}.new"</span> ) +290: +291: <span class="ruby-comment cmt"># add if matches name or description entries.</span> +292: <span class="ruby-identifier">matchesArray</span> = <span class="ruby-identifier">sw</span>.<span class="ruby-identifier">description</span>.<span class="ruby-identifier">scan</span>( <span class="ruby-identifier">searchText</span> ) +293: <span class="ruby-identifier">matchesArray</span> = <span class="ruby-identifier">matchesArray</span>.<span class="ruby-identifier">concat</span>( <span class="ruby-identifier">packageName</span>.<span class="ruby-identifier">scan</span>( <span class="ruby-identifier">searchText</span> ) ) +294: +295: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">matchesArray</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span> ) +296: <span class="ruby-comment cmt"># matches so add to hash.</span> +297: <span class="ruby-identifier">packageHash</span> = <span class="ruby-identifier">packageHash</span>.<span class="ruby-identifier">merge</span>( <span class="ruby-constant">Hash</span>[ <span class="ruby-node">"#{package}"</span> =<span class="ruby-operator">></span> <span class="ruby-node">"#{sw.description}"</span> ] ) +298: <span class="ruby-keyword kw">end</span> +299: <span class="ruby-keyword kw">end</span> +300: <span class="ruby-keyword kw">end</span> +301: } +302: <span class="ruby-keyword kw">end</span> +303: +304: <span class="ruby-comment cmt"># finished search results.</span> +305: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">packageHash</span> +306: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000121"></a><b>show_file_owner</b>( file ) + <a name="M000122"></a><b>show_file_owner</b>( file ) </div> <div class="description"> <p> @@ -264,21 +264,21 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000121_source')" id="l_M000121_source">show source</a> ]</p> - <div id="M000121_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000122_source')" id="l_M000122_source">show source</a> ]</p> + <div id="M000122_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 235</span> -235: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_file_owner</span>( <span class="ruby-identifier">file</span> ) -236: <span class="ruby-comment cmt"># TODO: implement this.</span> -237: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -238: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 259</span> +259: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_file_owner</span>( <span class="ruby-identifier">file</span> ) +260: <span class="ruby-comment cmt"># TODO: implement this.</span> +261: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +262: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000117"></a><b>show_frozen_packages</b>() + <a name="M000118"></a><b>show_frozen_packages</b>() </div> <div class="description"> <p> @@ -290,8 +290,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000117_source')" id="l_M000117_source">show source</a> ]</p> - <div id="M000117_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000118_source')" id="l_M000118_source">show source</a> ]</p> + <div id="M000118_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 139</span> 139: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_frozen_packages</span> @@ -336,7 +336,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000115"></a><b>show_installed_packages</b>() + <a name="M000116"></a><b>show_installed_packages</b>() </div> <div class="description"> <p> @@ -347,8 +347,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000115_source')" id="l_M000115_source">show source</a> ]</p> - <div id="M000115_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000116_source')" id="l_M000116_source">show source</a> ]</p> + <div id="M000116_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 98</span> 98: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_installed_packages</span> @@ -367,7 +367,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000120"></a><b>show_journal</b>( fileName ) + <a name="M000121"></a><b>show_journal</b>( fileName ) </div> <div class="description"> <p> @@ -381,34 +381,34 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000120_source')" id="l_M000120_source">show source</a> ]</p> - <div id="M000120_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000121_source')" id="l_M000121_source">show source</a> ]</p> + <div id="M000121_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 210</span> -210: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_journal</span>( <span class="ruby-identifier">fileName</span> ) -211: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>( <span class="ruby-identifier">fileName</span> ) ) -212: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> -213: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"AbTLinux log:"</span> -214: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"============="</span> -215: <span class="ruby-identifier">log</span> = <span class="ruby-constant">IO</span>.<span class="ruby-identifier">readlines</span>( <span class="ruby-identifier">fileName</span> ) -216: <span class="ruby-identifier">log</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">entry</span><span class="ruby-operator">|</span> <span class="ruby-identifier">puts</span> <span class="ruby-identifier">entry</span> } -217: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> -218: <span class="ruby-keyword kw">else</span> -219: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> -220: <span class="ruby-identifier">puts</span> <span class="ruby-node">"AbtLinux log ( #{File.basename( fileName )} ) "</span> <span class="ruby-operator">+</span> -221: <span class="ruby-value str">"is empty at this time."</span> -222: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</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> + <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 234</span> +234: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_journal</span>( <span class="ruby-identifier">fileName</span> ) +235: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>( <span class="ruby-identifier">fileName</span> ) ) +236: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> +237: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"AbTLinux log:"</span> +238: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"============="</span> +239: <span class="ruby-identifier">log</span> = <span class="ruby-constant">IO</span>.<span class="ruby-identifier">readlines</span>( <span class="ruby-identifier">fileName</span> ) +240: <span class="ruby-identifier">log</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">entry</span><span class="ruby-operator">|</span> <span class="ruby-identifier">puts</span> <span class="ruby-identifier">entry</span> } +241: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> +242: <span class="ruby-keyword kw">else</span> +243: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> +244: <span class="ruby-identifier">puts</span> <span class="ruby-node">"AbtLinux log ( #{File.basename( fileName )} ) "</span> <span class="ruby-operator">+</span> +245: <span class="ruby-value str">"is empty at this time."</span> +246: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> +247: <span class="ruby-keyword kw">end</span> +248: +249: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +250: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000118"></a><b>show_package_dependencies</b>( package ) + <a name="M000119"></a><b>show_package_dependencies</b>( package ) </div> <div class="description"> <p> @@ -425,21 +425,45 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000118_source')" id="l_M000118_source">show source</a> ]</p> - <div id="M000118_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000119_source')" id="l_M000119_source">show source</a> ]</p> + <div id="M000119_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 186</span> 186: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_package_dependencies</span>( <span class="ruby-identifier">package</span> ) -187: <span class="ruby-comment cmt"># TODO: implement this.</span> -188: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -189: <span class="ruby-keyword kw">end</span> +187: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}#{package}"</span> +188: +189: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">package</span> = <span class="ruby-identifier">eval</span>( <span class="ruby-node">"#{package.capitalize}.new"</span> ) ) +190: <span class="ruby-identifier">details</span> = <span class="ruby-identifier">package</span>.<span class="ruby-identifier">details</span> +191: +192: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"|====================================="</span> +193: <span class="ruby-identifier">puts</span> <span class="ruby-node">"| Package name\t\t: #{details['Package name']}"</span> +194: <span class="ruby-identifier">puts</span> <span class="ruby-node">"| Version\t\t: #{details['Version']}"</span> +195: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"|====================================="</span> +196: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"|====================================="</span> +197: +198: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">details</span>[<span class="ruby-value str">'Depends On'</span>].<span class="ruby-identifier">empty?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">details</span>[<span class="ruby-value str">'Relies On'</span>].<span class="ruby-identifier">empty?</span> <span class="ruby-operator">&&</span> +199: <span class="ruby-identifier">details</span>[<span class="ruby-value str">'Optional DO'</span>].<span class="ruby-identifier">empty?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">details</span>[<span class="ruby-value str">'Optional RO'</span>].<span class="ruby-identifier">empty?</span> +200: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"| No dependencies listed for this package."</span> +201: <span class="ruby-keyword kw">else</span> +202: <span class="ruby-identifier">puts</span> <span class="ruby-node">"| Depends On\t\t: #{details['Depends On']}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">details</span>[<span class="ruby-value str">'Depends On'</span>].<span class="ruby-identifier">empty?</span> +203: <span class="ruby-identifier">puts</span> <span class="ruby-node">"| Relies On\t\t: #{details['Relies On']}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">details</span>[<span class="ruby-value str">'Relies On'</span>].<span class="ruby-identifier">empty?</span> +204: <span class="ruby-identifier">puts</span> <span class="ruby-node">"| Optional Depends On\t: #{details['Optional DO']}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">details</span>[<span class="ruby-value str">'Optional DO'</span>].<span class="ruby-identifier">empty?</span> +205: <span class="ruby-identifier">puts</span> <span class="ruby-node">"| Optional Relies On\t: #{details['Optional RO']}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">details</span>[<span class="ruby-value str">'Optional RO'</span>].<span class="ruby-identifier">empty?</span> +206: <span class="ruby-keyword kw">end</span> +207: +208: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"|====================================="</span> +209: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +210: <span class="ruby-keyword kw">end</span> +211: +212: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +213: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000114"></a><b>show_package_details</b>( package ) + <a name="M000115"></a><b>show_package_details</b>( package ) </div> <div class="description"> <p> @@ -454,8 +478,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000114_source')" id="l_M000114_source">show source</a> ]</p> - <div id="M000114_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000115_source')" id="l_M000115_source">show source</a> ]</p> + <div id="M000115_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 53</span> 53: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_package_details</span>( <span class="ruby-identifier">package</span> ) @@ -503,7 +527,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000116"></a><b>show_package_log</b>( package, logType ) + <a name="M000117"></a><b>show_package_log</b>( package, logType ) </div> <div class="description"> <p> @@ -522,8 +546,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000116_source')" id="l_M000116_source">show source</a> ]</p> - <div id="M000116_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000117_source')" id="l_M000117_source">show source</a> ]</p> + <div id="M000117_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 120</span> 120: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_package_log</span>( <span class="ruby-identifier">package</span>, <span class="ruby-identifier">logType</span> ) @@ -544,7 +568,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000123"></a><b>show_queue</b>( queueType ) + <a name="M000124"></a><b>show_queue</b>( queueType ) </div> <div class="description"> <p> @@ -559,38 +583,38 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000123_source')" id="l_M000123_source">show source</a> ]</p> - <div id="M000123_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000124_source')" id="l_M000124_source">show source</a> ]</p> + <div id="M000124_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 292</span> -292: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_queue</span>( <span class="ruby-identifier">queueType</span> ) -293: -294: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">queueType</span> -295: -296: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"install"</span> -297: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>( <span class="ruby-node">"#{$ABT_LOGS}/#{queueType}.queue"</span> ) ) -298: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> -299: <span class="ruby-identifier">puts</span> <span class="ruby-node">"AbTLinux #{queueType} queue:"</span> -300: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"======================="</span> -301: <span class="ruby-identifier">queue</span> = <span class="ruby-constant">IO</span>.<span class="ruby-identifier">readlines</span>( <span class="ruby-node">"#{$ABT_LOGS}/#{queueType}.queue"</span> ) -302: <span class="ruby-identifier">queue</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">entry</span><span class="ruby-operator">|</span> <span class="ruby-identifier">puts</span> <span class="ruby-identifier">entry</span> } -303: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> -304: <span class="ruby-keyword kw">else</span> -305: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> -306: <span class="ruby-identifier">puts</span> <span class="ruby-node">"AbtLinux #{queueType} is empty at this time."</span> -307: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> -308: <span class="ruby-keyword kw">end</span> -309: <span class="ruby-keyword kw">else</span> -310: <span class="ruby-identifier">puts</span> <span class="ruby-node">"#{queueType.capitalize} is not an AbTLinux queue."</span> -311: <span class="ruby-keyword kw">end</span> -312: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 316</span> +316: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_queue</span>( <span class="ruby-identifier">queueType</span> ) +317: +318: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">queueType</span> +319: +320: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"install"</span> +321: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>( <span class="ruby-node">"#{$ABT_LOGS}/#{queueType}.queue"</span> ) ) +322: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> +323: <span class="ruby-identifier">puts</span> <span class="ruby-node">"AbTLinux #{queueType} queue:"</span> +324: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"======================="</span> +325: <span class="ruby-identifier">queue</span> = <span class="ruby-constant">IO</span>.<span class="ruby-identifier">readlines</span>( <span class="ruby-node">"#{$ABT_LOGS}/#{queueType}.queue"</span> ) +326: <span class="ruby-identifier">queue</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">entry</span><span class="ruby-operator">|</span> <span class="ruby-identifier">puts</span> <span class="ruby-identifier">entry</span> } +327: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> +328: <span class="ruby-keyword kw">else</span> +329: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> +330: <span class="ruby-identifier">puts</span> <span class="ruby-node">"AbtLinux #{queueType} is empty at this time."</span> +331: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> +332: <span class="ruby-keyword kw">end</span> +333: <span class="ruby-keyword kw">else</span> +334: <span class="ruby-identifier">puts</span> <span class="ruby-node">"#{queueType.capitalize} is not an AbTLinux queue."</span> +335: <span class="ruby-keyword kw">end</span> +336: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000119"></a><b>show_untracked_files</b>() + <a name="M000120"></a><b>show_untracked_files</b>() </div> <div class="description"> <p> @@ -602,21 +626,21 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000119_source')" id="l_M000119_source">show source</a> ]</p> - <div id="M000119_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000120_source')" id="l_M000120_source">show source</a> ]</p> + <div id="M000120_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 198</span> -198: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_untracked_files</span> -199: <span class="ruby-comment cmt"># TODO: implement this.</span> -200: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -201: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 222</span> +222: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_untracked_files</span> +223: <span class="ruby-comment cmt"># TODO: implement this.</span> +224: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +225: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000124"></a><b>show_updates</b>( target ) + <a name="M000125"></a><b>show_updates</b>( target ) </div> <div class="description"> <p> @@ -633,14 +657,14 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000124_source')" id="l_M000124_source">show source</a> ]</p> - <div id="M000124_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000125_source')" id="l_M000125_source">show source</a> ]</p> + <div id="M000125_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 324</span> -324: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_updates</span>( <span class="ruby-identifier">target</span> ) -325: <span class="ruby-comment cmt"># TODO: implement this.</span> -326: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -327: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 348</span> +348: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_updates</span>( <span class="ruby-identifier">target</span> ) +349: <span class="ruby-comment cmt"># TODO: implement this.</span> +350: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +351: <span class="ruby-keyword kw">end</span> </pre> </div> </div> Modified: src/trunk/doc/classes/TestAbtDepEngine.html =================================================================== --- src/trunk/doc/classes/TestAbtDepEngine.html 2008-01-02 21:08:23 UTC (rev 473) +++ src/trunk/doc/classes/TestAbtDepEngine.html 2008-01-02 21:10:48 UTC (rev 474) @@ -117,9 +117,9 @@ <div class="sectiontitle">Methods</div> <ul> - <li><a href="#M000104">setup</a></li> - <li><a href="#M000105">teardown</a></li> - <li><a href="#M000106">test_dep_engine</a></li> + <li><a href="#M000105">setup</a></li> + <li><a href="#M000106">teardown</a></li> + <li><a href="#M000107">test_dep_engine</a></li> </ul> @@ -130,17 +130,17 @@ <div class="sectiontitle">Public Instance methods</div> <div class="method"> <div class="title"> - <a name="M000104"></a><b>setup</b>() + <a name="M000105"></a><b>setup</b>() </div> <div class="description"> <p> -<a href="TestAbtDepEngine.html#M000104">setup</a> method for testing <a +<a href="TestAbtDepEngine.html#M000105">setup</a> method for testing <a href="AbtDepEngine.html">AbtDepEngine</a>. </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000104_source')" id="l_M000104_source">show source</a> ]</p> - <div id="M000104_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000105_source')" id="l_M000105_source">show source</a> ]</p> + <div id="M000105_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File tests/testabtdepengine.rb, line 38</span> 38: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span> @@ -152,17 +152,17 @@ </div> <div class="method"> <div class="title"> - <a name="M000105"></a><b>teardown</b>() + <a name="M000106"></a><b>teardown</b>() </div> <div class="description"> <p> -<a href="TestAbtDepEngine.html#M000105">teardown</a> method to cleanup +<a href="TestAbtDepEngine.html#M000106">teardown</a> method to cleanup after testing. </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000105_source')" id="l_M000105_source">show source</a> ]</p> - <div id="M000105_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000106_source')" id="l_M000106_source">show source</a> ]</p> + <div id="M000106_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File tests/testabtdepengine.rb, line 45</span> 45: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">teardown</span> @@ -173,7 +173,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000106"></a><b>test_dep_engine</b>() + <a name="M000107"></a><b>test_dep_engine</b>() </div> <div class="description"> <p> @@ -181,8 +181,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000106_source')" id="l_M000106_source">show source</a> ]</p> - <div id="M000106_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000107_source')" id="l_M000107_source">show source</a> ]</p> + <div id="M000107_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File tests/testabtdepengine.rb, line 51</span> 51: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_dep_engine</span> Modified: src/trunk/doc/classes/TestAbtDownloadManager.html =================================================================== --- src/trunk/doc/classes/TestAbtDownloadManager.html 2008-01-02 21:08:23 UTC (rev 473) +++ src/trunk/doc/classes/TestAbtDownloadManager.html 2008-01-02 21:10:48 UTC (rev 474) @@ -118,14 +118,14 @@ <div class="sectiontitle">Methods</div> <ul> - <li><a href="#M000084">setup</a></li> - <li><a href="#M000085">teardown</a></li> - <li><a href="#M000088">test_retrieve_news_feed</a></li> - <li><a href="#M000086">test_retrieve_package_source</a></li> - <li><a href="#M000087">test_retrieve_package_tree</a></li> - <li><a href="#M000089">test_update_package</a></li> - <li><a href="#M000090">test_update_package_tree</a></li> - <li><a href="#M000091">test_validated</a></li> + <li><a href="#M000085">setup</a></li> + <li><a href="#M000086">teardown</a></li> + <li><a href="#M000089">test_retrieve_news_feed</a></li> + <li><a href="#M000087">test_retrieve_package_source</a></li> + <li><a href="#M000088">test_retrieve_package_tree</a></li> + <li><a href="#M000090">test_update_package</a></li> + <li><a href="#M000091">test_update_package_tree</a></li> + <li><a href="#M000092">test_validated</a></li> </ul> @@ -136,17 +136,17 @@ <div class="sectiontitle">Public Instance methods</div> <div class="method"> <div class="title"> - <a name="M000084"></a><b>setup</b>() + <a name="M000085"></a><b>setup</b>() </div> <div class="description"> <p> -<a href="TestAbtDownloadManager.html#M000084">setup</a> method for testing +<a href="TestAbtDownloadManager.html#M000085">setup</a> method for testing <a href="AbtDownloadManager.html">AbtDownloadManager</a>. </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000084_source')" id="l_M000084_source">show source</a> ]</p> - <div id="M000084_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000085_source')" id="l_M000085_source">show source</a> ]</p> + <div id="M000085_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File tests/testabtdownloadmanager.rb, line 38</span> 38: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span> @@ -160,17 +160,17 @@ </div> <div class="method"> <div class="title"> - <a name="M000085"></a><b>teardown</b>() + <a name="M000086"></a><b>teardown</b>() </div> <div class="description"> <p> -<a href="TestAbtDownloadManager.html#M000085">teardown</a> method to +<a href="TestAbtDownloadManager.html#M000086">teardown</a> method to cleanup after testing. </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000085_source')" id="l_M000085_source">show source</a> ]</p> - <div id="M000085_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000086_source')" id="l_M000086_source">show source</a> ]</p> + <div id="M000086_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File tests/testabtdownloadmanager.rb, line 47</span> 47: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">teardown</span> @@ -181,7 +181,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000088"></a><b>test_retrieve_news_feed</b>() + <a name="M000089"></a><b>test_retrieve_news_feed</b>() </div> <div class="description"> <p> @@ -189,8 +189,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000088_source')" id="l_M000088_source">show source</a> ]</p> - <div id="M000088_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000089_source')" id="l_M000089_source">show source</a> ]</p> + <div id="M000089_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File tests/testabtdownloadmanager.rb, line 70</span> 70: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_retrieve_news_feed</span>() @@ -202,7 +202,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000086"></a><b>test_retrieve_package_source</b>() + <a name="M000087"></a><b>test_retrieve_package_source</b>() </div> <div class="description"> <p> @@ -211,8 +211,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000086_source')" id="l_M000086_source">show source</a> ]</p> - <div id="M000086_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000087_source')" id="l_M000087_source">show source</a> ]</p> + <div id="M000087_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File tests/testabtdownloadmanager.rb, line 53</span> 53: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_retrieve_package_source</span>() @@ -227,7 +227,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000087"></a><b>test_retrieve_package_tree</b>() + <a name="M000088"></a><b>test_retrieve_package_tree</b>() </div> <div class="description"> <p> @@ -236,8 +236,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000087_source')" id="l_M000087_source">show source</a> ]</p> - <div id="M000087_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000088_source')" id="l_M000088_source">show source</a> ]</p> + <div id="M000088_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File tests/testabtdownloadmanager.rb, line 63</span> 63: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_retrieve_package_tree</span>() @@ -249,7 +249,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000089"></a><b>test_update_package</b>() + <a name="M000090"></a><b>test_update_package</b>() </div> <div class="description"> <p> @@ -257,8 +257,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000089_source')" id="l_M000089_source">show source</a> ]</p> - <div id="M000089_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000090_source')" id="l_M000090_source">show source</a> ]</p> + <div id="M000090_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File tests/testabtdownloadmanager.rb, line 77</span> 77: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_update_package</span>() @@ -270,7 +270,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000090"></a><b>test_update_package_tree</b>() + <a name="M000091"></a><b>test_update_package_tree</b>() </div> <div class="description"> <p> @@ -278,8 +278,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000090_source')" id="l_M000090_source">show source</a> ]</p> - <div id="M000090_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000091_source')" id="l_M000091_source">show source</a> ]</p> + <div id="M000091_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File tests/testabtdownloadmanager.rb, line 84</span> 84: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_update_package_tree</span>() @@ -291,7 +291,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000091"></a><b>test_validated</b>() + <a name="M000092"></a><b>test_validated</b>() </div> <div class="description"> <p> @@ -299,8 +299,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000091... [truncated message content] |
From: <esc...@us...> - 2008-01-02 21:08:33
|
Revision: 473 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=473&view=rev Author: eschabell Date: 2008-01-02 13:08:23 -0800 (Wed, 02 Jan 2008) Log Message: ----------- Implemented show_package_dependencies, a simple readout of the package definition file. Added test for this feature. Only 11 unit tests to go! Modified Paths: -------------- src/trunk/abt.rb src/trunk/libs/abtreportmanager.rb src/trunk/tests/testabtreportmanager.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2008-01-02 21:07:16 UTC (rev 472) +++ src/trunk/abt.rb 2008-01-02 21:08:23 UTC (rev 473) @@ -25,6 +25,25 @@ # St, Fifth Floor, Boston, MA 02110-1301 USA ## +# Check and install our library files. +# +$ABTLINUX_CLASS_LIBS = "https://abtlinux.svn.sourceforge.net/svnroot/abtlinux/src/trunk/libs" + +if ( ! File.directory?( '/var/lib/abt' ) || Dir["/var/lib/abt"].empty? ) + puts "\nMissing needed AbTLinux library files at /var/lib/abt" + puts "\nMaybe time for an abt update? Let us try to fix it for you!\n" + + # check for root login. + if ( Process.uid != 0 ) + puts "\nMust be root to fix library files." + exit + else + system( "svn co #{$ABTLINUX_CLASS_LIBS} /var/lib/abt/" ) + end + + $LOAD_PATH.unshift '/var/lib/abt/' +end + # Load our central configuration file. # $ABTLINUX_MAIN_CONFIG = "https://abtlinux.svn.sourceforge.net/svnroot/abtlinux/src/trunk/abtconfig.rb" @@ -60,25 +79,7 @@ end end -# Check and install our library files. -# -$ABTLINUX_CLASS_LIBS = "https://abtlinux.svn.sourceforge.net/svnroot/abtlinux/src/trunk/libs" -if ( ! File.directory?( '/var/lib/abt' ) || Dir["/var/lib/abt"].empty? ) - puts "\nMissing needed AbTLinux library files at /var/lib/abt" - puts "\nMaybe time for an abt update? Let us try to fix it for you!\n" - - # check for root login. - if ( Process.uid != 0 ) - puts "\nMust be root to fix library files." - exit - else - system( "svn co #{$ABTLINUX_CLASS_LIBS} /var/lib/abt/" ) - end - - $LOAD_PATH.unshift '/var/lib/abt/' -end - ## # Setup needed classes and get ready to parse arguments. ## @@ -108,8 +109,6 @@ # And loading local file if found. if File.exist?( "/etc/abt/local/localconfig.rb" ) load '/etc/abt/local/localconfig.rb' -else - logger.info( "[abt.rb] No local configuration file found, not a problem, just informing." ) end @@ -341,10 +340,14 @@ end when "show-depends" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - # FIXME : show package depends implementation. - puts "Display dependency tree for package : " + options['package'] + if ( ARGV.length == 2 && File.exist?( $PACKAGE_PATH + ARGV[1] + ".rb" ) ) + options['pkg'] = ARGV[1] + logger.info( "Starting show depends for #{options['pkg']}" ) + if ( reporter.show_package_dependencies( options['pkg'] ) ) + logger.info( "Completed show depends for #{options['pkg']}" ) + else + puts "Problems showing the depends for #{options['pkg']}." + end else show.usage( "queries" ) exit Modified: src/trunk/libs/abtreportmanager.rb =================================================================== --- src/trunk/libs/abtreportmanager.rb 2008-01-02 21:07:16 UTC (rev 472) +++ src/trunk/libs/abtreportmanager.rb 2008-01-02 21:08:23 UTC (rev 473) @@ -184,7 +184,31 @@ # hash of problem files and their encountered errors. ## def show_package_dependencies( package ) - # TODO: implement this. + require "#{$PACKAGE_PATH}#{package}" + + if ( package = eval( "#{package.capitalize}.new" ) ) + details = package.details + + puts "|=====================================" + puts "| Package name\t\t: #{details['Package name']}" + puts "| Version\t\t: #{details['Version']}" + puts "|=====================================" + puts "|=====================================" + + if details['Depends On'].empty? && details['Relies On'].empty? && + details['Optional DO'].empty? && details['Optional RO'].empty? + puts "| No dependencies listed for this package." + else + puts "| Depends On\t\t: #{details['Depends On']}" if !details['Depends On'].empty? + puts "| Relies On\t\t: #{details['Relies On']}" if !details['Relies On'].empty? + puts "| Optional Depends On\t: #{details['Optional DO']}" if !details['Optional DO'].empty? + puts "| Optional Relies On\t: #{details['Optional RO']}" if !details['Optional RO'].empty? + end + + puts "|=====================================" + return true + end + return false end Modified: src/trunk/tests/testabtreportmanager.rb =================================================================== --- src/trunk/tests/testabtreportmanager.rb 2008-01-02 21:07:16 UTC (rev 472) +++ src/trunk/tests/testabtreportmanager.rb 2008-01-02 21:08:23 UTC (rev 473) @@ -167,5 +167,12 @@ assert( @report.generate_HTML_package_listing(), "test_generate_HTML_package_listing()" ) end - + + ## + # Test method for 'AbtReportManager.test_show_package_dependencies()' + ## + def test_show_package_dependencies + assert( @report.show_package_dependencies( "ipc" ), "test_show_package_dependencies()" ) + end + end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-02 21:07:31
|
Revision: 472 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=472&view=rev Author: eschabell Date: 2008-01-02 13:07:16 -0800 (Wed, 02 Jan 2008) Log Message: ----------- Removed the local libs path search and libs path search as it is done in abtconfig file. Modified Paths: -------------- src/trunk/tests/testsuiteabt.rb Modified: src/trunk/tests/testsuiteabt.rb =================================================================== --- src/trunk/tests/testsuiteabt.rb 2008-01-02 21:06:19 UTC (rev 471) +++ src/trunk/tests/testsuiteabt.rb 2008-01-02 21:07:16 UTC (rev 472) @@ -7,8 +7,6 @@ end $LOAD_PATH.unshift '/etc/abt/' -$LOAD_PATH.unshift '/var/lib/abt/' -$LOAD_PATH.unshift '../libs/' # development only. require 'test/unit' require 'abtconfig' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-02 21:06:43
|
Revision: 471 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=471&view=rev Author: eschabell Date: 2008-01-02 13:06:19 -0800 (Wed, 02 Jan 2008) Log Message: ----------- Removed the local libs path search. Modified Paths: -------------- src/trunk/abtconfig.rb Modified: src/trunk/abtconfig.rb =================================================================== --- src/trunk/abtconfig.rb 2008-01-02 21:05:42 UTC (rev 470) +++ src/trunk/abtconfig.rb 2008-01-02 21:06:19 UTC (rev 471) @@ -1,7 +1,6 @@ #!/usr/bin/ruby -w $LOAD_PATH.unshift '/var/lib/abt/' -$LOAD_PATH.unshift './libs/' # for development. ## # abtconfig.rb # This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2007-12-31 14:29:55
|
Revision: 469 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=469&view=rev Author: eschabell Date: 2007-12-31 06:29:57 -0800 (Mon, 31 Dec 2007) Log Message: ----------- Regenerated api docs. Modified Paths: -------------- src/trunk/doc/created.rid Added Paths: ----------- src/trunk/doc/files/libs/ src/trunk/doc/files/libs/abtdepengine_rb.html src/trunk/doc/files/libs/abtdownloadmanager_rb.html src/trunk/doc/files/libs/abtlogmanager_rb.html src/trunk/doc/files/libs/abtpackage_rb.html src/trunk/doc/files/libs/abtpackagemanager_rb.html src/trunk/doc/files/libs/abtqueuemanager_rb.html src/trunk/doc/files/libs/abtreportmanager_rb.html src/trunk/doc/files/libs/abtsystemmanager_rb.html src/trunk/doc/files/libs/abtusage_rb.html src/trunk/doc/files/tests/ src/trunk/doc/files/tests/testabtdepengine_rb.html src/trunk/doc/files/tests/testabtdownloadmanager_rb.html src/trunk/doc/files/tests/testabtlogmanager_rb.html src/trunk/doc/files/tests/testabtpackage_rb.html src/trunk/doc/files/tests/testabtpackagemanager_rb.html src/trunk/doc/files/tests/testabtqueuemanager_rb.html src/trunk/doc/files/tests/testabtreportmanager_rb.html src/trunk/doc/files/tests/testabtsystemmanager_rb.html Modified: src/trunk/doc/created.rid =================================================================== --- src/trunk/doc/created.rid 2007-12-31 14:28:33 UTC (rev 468) +++ src/trunk/doc/created.rid 2007-12-31 14:29:57 UTC (rev 469) @@ -1 +1 @@ -Mon Dec 31 14:56:06 +0100 2007 +Mon Dec 31 15:21:34 +0100 2007 Added: src/trunk/doc/files/libs/abtdepengine_rb.html =================================================================== --- src/trunk/doc/files/libs/abtdepengine_rb.html (rev 0) +++ src/trunk/doc/files/libs/abtdepengine_rb.html 2007-12-31 14:29:57 UTC (rev 469) @@ -0,0 +1,130 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + <head> + <title>File: abtdepengine.rb</title> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> + <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> + + <script language="JavaScript" type="text/javascript"> + // <![CDATA[ + + function toggleSource( id ) + { + var elem + var link + + if( document.getElementById ) + { + elem = document.getElementById( id ) + link = document.getElementById( "l_" + id ) + } + else if ( document.all ) + { + elem = eval( "document.all." + id ) + link = eval( "document.all.l_" + id ) + } + else + return false; + + if( elem.style.display == "block" ) + { + elem.style.display = "none" + link.innerHTML = "show source" + } + else + { + elem.style.display = "block" + link.innerHTML = "hide source" + } + } + + function openCode( url ) + { + window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" ) + } + // ]]> + </script> + </head> + + <body> + <table border='0' cellpadding='0' cellspacing='0' width="100%" class='banner'> + <tr><td> + <table width="100%" border='0' cellpadding='0' cellspacing='0'><tr> + <td class="file-title" colspan="2"><span class="file-title-prefix">File</span><br />abtdepengine.rb</td> + <td align="right"> + <table border='0' cellspacing="0" cellpadding="2"> + <tr> + <td>Path:</td> + <td>libs/abtdepengine.rb + </td> + </tr> + <tr> + <td>Modified:</td> + <td>Mon Dec 31 14:44:04 +0100 2007</td> + </tr> + </table> + </td></tr> + </table> + </td></tr> +</table><br> + <!-- banner header --> + + <div id="bodyContent"> + <div id="content"> + <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center"> + <map id="map" name="map"> + <area shape="rect" coords="27,50,125,98" href="../../classes/AbtDepEngine.html" alt="AbtDepEngine" /> +</map> +<img src="../../dot/f_0.png" usemap="#map" border="0" alt="dot/f_0.png"> + </td></tr></table> + + <div class="description"><p> +abtdepengine.rb +</p> +<p> +<a href="../../classes/AbtDepEngine.html">AbtDepEngine</a> class handles +all dependency aspects of the AbTLinux system. It is part of a sub-project +with it‘s own requirements document. +</p> +<p> +Created by Eric D. Schabell <er...@ab...> Copyright 2006, GPL. +</p> +<p> +This file is part of AbTLinux. +</p> +<p> +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. +</p> +<p> +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. +</p> +<p> +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 +</p> +</div> + + + + + + + + + +</div> + + </div> + + </body> +</html> \ No newline at end of file Added: src/trunk/doc/files/libs/abtdownloadmanager_rb.html =================================================================== --- src/trunk/doc/files/libs/abtdownloadmanager_rb.html (rev 0) +++ src/trunk/doc/files/libs/abtdownloadmanager_rb.html 2007-12-31 14:29:57 UTC (rev 469) @@ -0,0 +1,136 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + <head> + <title>File: abtdownloadmanager.rb</title> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> + <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> + + <script language="JavaScript" type="text/javascript"> + // <![CDATA[ + + function toggleSource( id ) + { + var elem + var link + + if( document.getElementById ) + { + elem = document.getElementById( id ) + link = document.getElementById( "l_" + id ) + } + else if ( document.all ) + { + elem = eval( "document.all." + id ) + link = eval( "document.all.l_" + id ) + } + else + return false; + + if( elem.style.display == "block" ) + { + elem.style.display = "none" + link.innerHTML = "show source" + } + else + { + elem.style.display = "block" + link.innerHTML = "hide source" + } + } + + function openCode( url ) + { + window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" ) + } + // ]]> + </script> + </head> + + <body> + <table border='0' cellpadding='0' cellspacing='0' width="100%" class='banner'> + <tr><td> + <table width="100%" border='0' cellpadding='0' cellspacing='0'><tr> + <td class="file-title" colspan="2"><span class="file-title-prefix">File</span><br />abtdownloadmanager.rb</td> + <td align="right"> + <table border='0' cellspacing="0" cellpadding="2"> + <tr> + <td>Path:</td> + <td>libs/abtdownloadmanager.rb + </td> + </tr> + <tr> + <td>Modified:</td> + <td>Mon Dec 31 14:45:42 +0100 2007</td> + </tr> + </table> + </td></tr> + </table> + </td></tr> +</table><br> + <!-- banner header --> + + <div id="bodyContent"> + <div id="content"> + <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center"> + <map id="map" name="map"> + <area shape="rect" coords="27,50,160,98" href="../../classes/AbtDownloadManager.html" alt="AbtDownloadManager" /> +</map> +<img src="../../dot/f_1.png" usemap="#map" border="0" alt="dot/f_1.png"> + </td></tr></table> + + <div class="description"><p> +abtdownloadmanager.rb +</p> +<p> +<a href="../../classes/AbtDownloadManager.html">AbtDownloadManager</a> +class handles all downloading of components needed for AbTLinux. +</p> +<p> +Created by Eric D. Schabell <er...@ab...> Copyright 2006, GPL. +</p> +<p> +This file is part of AbTLinux. +</p> +<p> +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. +</p> +<p> +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. +</p> +<p> +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 +</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> + + + + + + + + +</div> + + </div> + + </body> +</html> \ No newline at end of file Added: src/trunk/doc/files/libs/abtlogmanager_rb.html =================================================================== --- src/trunk/doc/files/libs/abtlogmanager_rb.html (rev 0) +++ src/trunk/doc/files/libs/abtlogmanager_rb.html 2007-12-31 14:29:57 UTC (rev 469) @@ -0,0 +1,130 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + <head> + <title>File: abtlogmanager.rb</title> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> + <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> + + <script language="JavaScript" type="text/javascript"> + // <![CDATA[ + + function toggleSource( id ) + { + var elem + var link + + if( document.getElementById ) + { + elem = document.getElementById( id ) + link = document.getElementById( "l_" + id ) + } + else if ( document.all ) + { + elem = eval( "document.all." + id ) + link = eval( "document.all.l_" + id ) + } + else + return false; + + if( elem.style.display == "block" ) + { + elem.style.display = "none" + link.innerHTML = "show source" + } + else + { + elem.style.display = "block" + link.innerHTML = "hide source" + } + } + + function openCode( url ) + { + window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" ) + } + // ]]> + </script> + </head> + + <body> + <table border='0' cellpadding='0' cellspacing='0' width="100%" class='banner'> + <tr><td> + <table width="100%" border='0' cellpadding='0' cellspacing='0'><tr> + <td class="file-title" colspan="2"><span class="file-title-prefix">File</span><br />abtlogmanager.rb</td> + <td align="right"> + <table border='0' cellspacing="0" cellpadding="2"> + <tr> + <td>Path:</td> + <td>libs/abtlogmanager.rb + </td> + </tr> + <tr> + <td>Modified:</td> + <td>Mon Dec 31 14:46:05 +0100 2007</td> + </tr> + </table> + </td></tr> + </table> + </td></tr> +</table><br> + <!-- banner header --> + + <div id="bodyContent"> + <div id="content"> + <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center"> + <map id="map" name="map"> + <area shape="rect" coords="27,50,131,98" href="../../classes/AbtLogManager.html" alt="AbtLogManager" /> +</map> +<img src="../../dot/f_2.png" usemap="#map" border="0" alt="dot/f_2.png"> + </td></tr></table> + + <div class="description"><p> +abtlogmanager.rb +</p> +<p> +<a href="../../classes/AbtLogManager.html">AbtLogManager</a> class handles +all aspects of logging and access to existing logs within the AbTLinux +system. +</p> +<p> +Created by Eric D. Schabell <er...@ab...> Copyright 2006, GPL. +</p> +<p> +This file is part of AbTLinux. +</p> +<p> +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. +</p> +<p> +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. +</p> +<p> +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 +</p> +</div> + + + + + + + + + +</div> + + </div> + + </body> +</html> \ No newline at end of file Added: src/trunk/doc/files/libs/abtpackage_rb.html =================================================================== --- src/trunk/doc/files/libs/abtpackage_rb.html (rev 0) +++ src/trunk/doc/files/libs/abtpackage_rb.html 2007-12-31 14:29:57 UTC (rev 469) @@ -0,0 +1,134 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + <head> + <title>File: abtpackage.rb</title> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> + <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> + + <script language="JavaScript" type="text/javascript"> + // <![CDATA[ + + function toggleSource( id ) + { + var elem + var link + + if( document.getElementById ) + { + elem = document.getElementById( id ) + link = document.getElementById( "l_" + id ) + } + else if ( document.all ) + { + elem = eval( "document.all." + id ) + link = eval( "document.all.l_" + id ) + } + else + return false; + + if( elem.style.display == "block" ) + { + elem.style.display = "none" + link.innerHTML = "show source" + } + else + { + elem.style.display = "block" + link.innerHTML = "hide source" + } + } + + function openCode( url ) + { + window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" ) + } + // ]]> + </script> + </head> + + <body> + <table border='0' cellpadding='0' cellspacing='0' width="100%" class='banner'> + <tr><td> + <table width="100%" border='0' cellpadding='0' cellspacing='0'><tr> + <td class="file-title" colspan="2"><span class="file-title-prefix">File</span><br />abtpackage.rb</td> + <td align="right"> + <table border='0' cellspacing="0" cellpadding="2"> + <tr> + <td>Path:</td> + <td>libs/abtpackage.rb + </td> + </tr> + <tr> + <td>Modified:</td> + <td>Mon Dec 31 14:45:53 +0100 2007</td> + </tr> + </table> + </td></tr> + </table> + </td></tr> +</table><br> + <!-- banner header --> + + <div id="bodyContent"> + <div id="content"> + <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center"> + <map id="map" name="map"> + <area shape="rect" coords="27,50,115,98" href="../../classes/AbtPackage.html" alt="AbtPackage" /> +</map> +<img src="../../dot/f_3.png" usemap="#map" border="0" alt="dot/f_3.png"> + </td></tr></table> + + <div class="description"><p> +abtpackage.rb +</p> +<p> +<a href="../../classes/AbtPackage.html">AbtPackage</a> class provides an +interface to <a href="../../classes/AbtPackage.html">AbtPackage</a> +creation within AbTLinux. By inheriting from this class (class Fortune < +<a href="../../classes/AbtPackage.html">AbtPackage</a>) one picks up all +supported standard functions for the abt <a +href="../../classes/AbtPackage.html">AbtPackage</a> manager to make use of +the new <a href="../../classes/AbtPackage.html">AbtPackage</a>. +</p> +<p> +Created by Eric D. Schabell <er...@ab...> Copyright 2006, GPL. +</p> +<p> +This file is part of AbTLinux. +</p> +<p> +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. +</p> +<p> +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. +</p> +<p> +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 +</p> +</div> + + + + + + + + + +</div> + + </div> + + </body> +</html> \ No newline at end of file Added: src/trunk/doc/files/libs/abtpackagemanager_rb.html =================================================================== --- src/trunk/doc/files/libs/abtpackagemanager_rb.html (rev 0) +++ src/trunk/doc/files/libs/abtpackagemanager_rb.html 2007-12-31 14:29:57 UTC (rev 469) @@ -0,0 +1,130 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + <head> + <title>File: abtpackagemanager.rb</title> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> + <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> + + <script language="JavaScript" type="text/javascript"> + // <![CDATA[ + + function toggleSource( id ) + { + var elem + var link + + if( document.getElementById ) + { + elem = document.getElementById( id ) + link = document.getElementById( "l_" + id ) + } + else if ( document.all ) + { + elem = eval( "document.all." + id ) + link = eval( "document.all.l_" + id ) + } + else + return false; + + if( elem.style.display == "block" ) + { + elem.style.display = "none" + link.innerHTML = "show source" + } + else + { + elem.style.display = "block" + link.innerHTML = "hide source" + } + } + + function openCode( url ) + { + window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" ) + } + // ]]> + </script> + </head> + + <body> + <table border='0' cellpadding='0' cellspacing='0' width="100%" class='banner'> + <tr><td> + <table width="100%" border='0' cellpadding='0' cellspacing='0'><tr> + <td class="file-title" colspan="2"><span class="file-title-prefix">File</span><br />abtpackagemanager.rb</td> + <td align="right"> + <table border='0' cellspacing="0" cellpadding="2"> + <tr> + <td>Path:</td> + <td>libs/abtpackagemanager.rb + </td> + </tr> + <tr> + <td>Modified:</td> + <td>Mon Dec 31 14:45:47 +0100 2007</td> + </tr> + </table> + </td></tr> + </table> + </td></tr> +</table><br> + <!-- banner header --> + + <div id="bodyContent"> + <div id="content"> + <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center"> + <map id="map" name="map"> + <area shape="rect" coords="27,50,155,98" href="../../classes/AbtPackageManager.html" alt="AbtPackageManager" /> +</map> +<img src="../../dot/f_4.png" usemap="#map" border="0" alt="dot/f_4.png"> + </td></tr></table> + + <div class="description"><p> +abtpackagemanager.rb +</p> +<p> +<a href="../../classes/AbtPackageManager.html">AbtPackageManager</a> class +will take care of the installation, removal, updating, downgrading and +freezing of AbTLinux software packages. +</p> +<p> +Created by Eric D. Schabell <er...@ab...> Copyright 2006, GPL. +</p> +<p> +This file is part of AbTLinux. +</p> +<p> +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. +</p> +<p> +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. +</p> +<p> +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 +</p> +</div> + + + + + + + + + +</div> + + </div> + + </body> +</html> \ No newline at end of file Added: src/trunk/doc/files/libs/abtqueuemanager_rb.html =================================================================== --- src/trunk/doc/files/libs/abtqueuemanager_rb.html (rev 0) +++ src/trunk/doc/files/libs/abtqueuemanager_rb.html 2007-12-31 14:29:57 UTC (rev 469) @@ -0,0 +1,133 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + <head> + <title>File: abtqueuemanager.rb</title> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> + <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> + + <script language="JavaScript" type="text/javascript"> + // <![CDATA[ + + function toggleSource( id ) + { + var elem + var link + + if( document.getElementById ) + { + elem = document.getElementById( id ) + link = document.getElementById( "l_" + id ) + } + else if ( document.all ) + { + elem = eval( "document.all." + id ) + link = eval( "document.all.l_" + id ) + } + else + return false; + + if( elem.style.display == "block" ) + { + elem.style.display = "none" + link.innerHTML = "show source" + } + else + { + elem.style.display = "block" + link.innerHTML = "hide source" + } + } + + function openCode( url ) + { + window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" ) + } + // ]]> + </script> + </head> + + <body> + <table border='0' cellpadding='0' cellspacing='0' width="100%" class='banner'> + <tr><td> + <table width="100%" border='0' cellpadding='0' cellspacing='0'><tr> + <td class="file-title" colspan="2"><span class="file-title-prefix">File</span><br />abtqueuemanager.rb</td> + <td align="right"> + <table border='0' cellspacing="0" cellpadding="2"> + <tr> + <td>Path:</td> + <td>libs/abtqueuemanager.rb + </td> + </tr> + <tr> + <td>Modified:</td> + <td>Mon Dec 31 14:45:59 +0100 2007</td> + </tr> + </table> + </td></tr> + </table> + </td></tr> +</table><br> + <!-- banner header --> + + <div id="bodyContent"> + <div id="content"> + <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center"> + <map id="map" name="map"> + <area shape="rect" coords="27,50,144,98" href="../../classes/AbtQueueManager.html" alt="AbtQueueManager" /> +</map> +<img src="../../dot/f_5.png" usemap="#map" border="0" alt="dot/f_5.png"> + </td></tr></table> + + <div class="description"><p> +abtqueuemanager.rb +</p> +<p> +<a href="../../classes/AbtQueueManager.html">AbtQueueManager</a> class +handles all AbTLinux queue interaction. +</p> +<p> +Created by Eric D. Schabell <er...@ab...> Copyright 2006, GPL. +</p> +<p> +This file is part of AbTLinux. +</p> +<p> +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. +</p> +<p> +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. +</p> +<p> +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 +</p> +</div> + + <div class="sectiontitle">Required Files</div> + <ul> + <li>fileutils</li> + </ul> + + + + + + + + +</div> + + </div> + + </body> +</html> \ No newline at end of file Added: src/trunk/doc/files/libs/abtreportmanager_rb.html =================================================================== --- src/trunk/doc/files/libs/abtreportmanager_rb.html (rev 0) +++ src/trunk/doc/files/libs/abtreportmanager_rb.html 2007-12-31 14:29:57 UTC (rev 469) @@ -0,0 +1,129 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + <head> + <title>File: abtreportmanager.rb</title> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> + <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> + + <script language="JavaScript" type="text/javascript"> + // <![CDATA[ + + function toggleSource( id ) + { + var elem + var link + + if( document.getElementById ) + { + elem = document.getElementById( id ) + link = document.getElementById( "l_" + id ) + } + else if ( document.all ) + { + elem = eval( "document.all." + id ) + link = eval( "document.all.l_" + id ) + } + else + return false; + + if( elem.style.display == "block" ) + { + elem.style.display = "none" + link.innerHTML = "show source" + } + else + { + elem.style.display = "block" + link.innerHTML = "hide source" + } + } + + function openCode( url ) + { + window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" ) + } + // ]]> + </script> + </head> + + <body> + <table border='0' cellpadding='0' cellspacing='0' width="100%" class='banner'> + <tr><td> + <table width="100%" border='0' cellpadding='0' cellspacing='0'><tr> + <td class="file-title" colspan="2"><span class="file-title-prefix">File</span><br />abtreportmanager.rb</td> + <td align="right"> + <table border='0' cellspacing="0" cellpadding="2"> + <tr> + <td>Path:</td> + <td>libs/abtreportmanager.rb + </td> + </tr> + <tr> + <td>Modified:</td> + <td>Mon Dec 31 14:46:10 +0100 2007</td> + </tr> + </table> + </td></tr> + </table> + </td></tr> +</table><br> + <!-- banner header --> + + <div id="bodyContent"> + <div id="content"> + <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center"> + <map id="map" name="map"> + <area shape="rect" coords="27,50,144,98" href="../../classes/AbtReportManager.html" alt="AbtReportManager" /> +</map> +<img src="../../dot/f_6.png" usemap="#map" border="0" alt="dot/f_6.png"> + </td></tr></table> + + <div class="description"><p> +abtreportmanager.rb +</p> +<p> +<a href="../../classes/AbtReportManager.html">AbtReportManager</a> class +handles all sort of report and query generation within the AbTLinux system. +</p> +<p> +Created by Eric D. Schabell <er...@ab...> Copyright 2006, GPL. +</p> +<p> +This file is part of AbTLinux. +</p> +<p> +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. +</p> +<p> +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. +</p> +<p> +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 +</p> +</div> + + + + + + + + + +</div> + + </div> + + </body> +</html> \ No newline at end of file Added: src/trunk/doc/files/libs/abtsystemmanager_rb.html =================================================================== --- src/trunk/doc/files/libs/abtsystemmanager_rb.html (rev 0) +++ src/trunk/doc/files/libs/abtsystemmanager_rb.html 2007-12-31 14:29:57 UTC (rev 469) @@ -0,0 +1,130 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + <head> + <title>File: abtsystemmanager.rb</title> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> + <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> + + <script language="JavaScript" type="text/javascript"> + // <![CDATA[ + + function toggleSource( id ) + { + var elem + var link + + if( document.getElementById ) + { + elem = document.getElementById( id ) + link = document.getElementById( "l_" + id ) + } + else if ( document.all ) + { + elem = eval( "document.all." + id ) + link = eval( "document.all.l_" + id ) + } + else + return false; + + if( elem.style.display == "block" ) + { + elem.style.display = "none" + link.innerHTML = "show source" + } + else + { + elem.style.display = "block" + link.innerHTML = "hide source" + } + } + + function openCode( url ) + { + window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" ) + } + // ]]> + </script> + </head> + + <body> + <table border='0' cellpadding='0' cellspacing='0' width="100%" class='banner'> + <tr><td> + <table width="100%" border='0' cellpadding='0' cellspacing='0'><tr> + <td class="file-title" colspan="2"><span class="file-title-prefix">File</span><br />abtsystemmanager.rb</td> + <td align="right"> + <table border='0' cellspacing="0" cellpadding="2"> + <tr> + <td>Path:</td> + <td>libs/abtsystemmanager.rb + </td> + </tr> + <tr> + <td>Modified:</td> + <td>Mon Dec 31 14:46:18 +0100 2007</td> + </tr> + </table> + </td></tr> + </table> + </td></tr> +</table><br> + <!-- banner header --> + + <div id="bodyContent"> + <div id="content"> + <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center"> + <map id="map" name="map"> + <area shape="rect" coords="27,50,149,98" href="../../classes/AbtSystemManager.html" alt="AbtSystemManager" /> +</map> +<img src="../../dot/f_7.png" usemap="#map" border="0" alt="dot/f_7.png"> + </td></tr></table> + + <div class="description"><p> +abtsystemmanager.rb +</p> +<p> +<a href="../../classes/AbtSystemManager.html">AbtSystemManager</a> class +handles all aspects of the AbTLinux system. It takes care of such tasks as +cleanup, fixing, verification and management of settings within the system. +</p> +<p> +Created by Eric D. Schabell <er...@ab...> Copyright 2006, GPL. +</p> +<p> +This file is part of AbTLinux. +</p> +<p> +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. +</p> +<p> +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. +</p> +<p> +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 +</p> +</div> + + + + + + + + + +</div> + + </div> + + </body> +</html> \ No newline at end of file Added: src/trunk/doc/files/libs/abtusage_rb.html =================================================================== --- src/trunk/doc/files/libs/abtusage_rb.html (rev 0) +++ src/trunk/doc/files/libs/abtusage_rb.html 2007-12-31 14:29:57 UTC (rev 469) @@ -0,0 +1,129 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + <head> + <title>File: abtusage.rb</title> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> + <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> + + <script language="JavaScript" type="text/javascript"> + // <![CDATA[ + + function toggleSource( id ) + { + var elem + var link + + if( document.getElementById ) + { + elem = document.getElementById( id ) + link = document.getElementById( "l_" + id ) + } + else if ( document.all ) + { + elem = eval( "document.all." + id ) + link = eval( "document.all.l_" + id ) + } + else + return false; + + if( elem.style.display == "block" ) + { + elem.style.display = "none" + link.innerHTML = "show source" + } + else + { + elem.style.display = "block" + link.innerHTML = "hide source" + } + } + + function openCode( url ) + { + window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" ) + } + // ]]> + </script> + </head> + + <body> + <table border='0' cellpadding='0' cellspacing='0' width="100%" class='banner'> + <tr><td> + <table width="100%" border='0' cellpadding='0' cellspacing='0'><tr> + <td class="file-title" colspan="2"><span class="file-title-prefix">File</span><br />abtusage.rb</td> + <td align="right"> + <table border='0' cellspacing="0" cellpadding="2"> + <tr> + <td>Path:</td> + <td>libs/abtusage.rb + </td> + </tr> + <tr> + <td>Modified:</td> + <td>Mon Dec 31 14:46:37 +0100 2007</td> + </tr> + </table> + </td></tr> + </table> + </td></tr> +</table><br> + <!-- banner header --> + + <div id="bodyContent"> + <div id="content"> + <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center"> + <map id="map" name="map"> + <area shape="rect" coords="27,50,104,98" href="../../classes/AbtUsage.html" alt="AbtUsage" /> +</map> +<img src="../../dot/f_8.png" usemap="#map" border="0" alt="dot/f_8.png"> + </td></tr></table> + + <div class="description"><p> +abtusage.rb +</p> +<p> +The usage reporting class for AbTLinux. +</p> +<p> +Created by Eric D. Schabell <er...@ab...> Copyright November +2006, GPL. +</p> +<p> +This file is part of AbTLinux. +</p> +<p> +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. +</p> +<p> +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. +</p> +<p> +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 +</p> +</div> + + + + + + + + + +</div> + + </div> + + </body> +</html> \ No newline at end of file Added: src/trunk/doc/files/tests/testabtdepengine_rb.html =================================================================== --- src/trunk/doc/files/tests/testabtdepengine_rb.html (rev 0) +++ src/trunk/doc/files/tests/testabtdepengine_rb.html 2007-12-31 14:29:57 UTC (rev 469) @@ -0,0 +1,105 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + <head> + <title>File: testabtdepengine.rb</title> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> + <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> + + <script language="JavaScript" type="text/javascript"> + // <![CDATA[ + + function toggleSource( id ) + { + var elem + var link + + if( document.getElementById ) + { + elem = document.getElementById( id ) + link = document.getElementById( "l_" + id ) + } + else if ( document.all ) + { + elem = eval( "document.all." + id ) + link = eval( "document.all.l_" + id ) + } + else + return false; + + if( elem.style.display == "block" ) + { + elem.style.display = "none" + link.innerHTML = "show source" + } + else + { + elem.style.display = "block" + link.innerHTML = "hide source" + } + } + + function openCode( url ) + { + window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" ) + } + // ]]> + </script> + </head> + + <body> + <table border='0' cellpadding='0' cellspacing='0' width="100%" class='banner'> + <tr><td> + <table width="100%" border='0' cellpadding='0' cellspacing='0'><tr> + <td class="file-title" colspan="2"><span class="file-title-prefix">File</span><br />testabtdepengine.rb</td> + <td align="right"> + <table border='0' cellspacing="0" cellpadding="2"> + <tr> + <td>Path:</td> + <td>tests/testabtdepengine.rb + </td> + </tr> + <tr> + <td>Modified:</td> + <td>Mon Dec 31 13:17:25 +0100 2007</td> + </tr> + </table> + </td></tr> + </table> + </td></tr> +</table><br> + <!-- banner header --> + + <div id="bodyContent"> + <div id="content"> + <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center"> + <map id="map" name="map"> + <area shape="rect" coords="27,124,144,172" href="../../classes/TestAbtDepEngine.html" alt="TestAbtDepEngine" /> + <area shape="rect" coords="24,5,147,53" href="../../classes/Test/Unit/TestCase.html" alt="Test::Unit::TestCase" /> +</map> +<img src="../../dot/f_9.png" usemap="#map" border="0" alt="dot/f_9.png"> + </td></tr></table> + + + <div class="sectiontitle">Required Files</div> + <ul> + <li>test/unit/testcase</li> + <li>test/unit/autorunner</li> + <li>abtconfig</li> + </ul> + + + + + + + + +</div> + + </div> + + </body> +</html> \ No newline at end of file Added: src/trunk/doc/files/tests/testabtdownloadmanager_rb.html =================================================================== --- src/trunk/doc/files/tests/testabtdownloadmanager_rb.html (rev 0) +++ src/trunk/doc/files/tests/testabtdownloadmanager_rb.html 2007-12-31 14:29:57 UTC (rev 469) @@ -0,0 +1,105 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + <head> + <title>File: testabtdownloadmanager.rb</title> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> + <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> + + <script language="JavaScript" type="text/javascript"> + // <![CDATA[ + + function toggleSource( id ) + { + var elem + var link + + if( document.getElementById ) + { + elem = document.getElementById( id ) + link = document.getElementById( "l_" + id ) + } + else if ( document.all ) + { + elem = eval( "document.all." + id ) + link = eval( "document.all.l_" + id ) + } + else + return false; + + if( elem.style.display == "block" ) + { + elem.style.display = "none" + link.innerHTML = "show source" + } + else + { + elem.style.display = "block" + link.innerHTML = "hide source" + } + } + + function openCode( url ) + { + window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" ) + } + // ]]> + </script> + </head> + + <body> + <table border='0' cellpadding='0' cellspacing='0' width="100%" class='banner'> + <tr><td> + <table width="100%" border='0' cellpadding='0' cellspacing='0'><tr> + <td class="file-title" colspan="2"><span class="file-title-prefix">File</span><br />testabtdownloadmanager.rb</td> + <td align="right"> + <table border='0' cellspacing="0" cellpadding="2"> + <tr> + <td>Path:</td> + <td>tests/testabtdownloadmanager.rb + </td> + </tr> + <tr> + <td>Modified:</td> + <td>Mon Dec 31 13:19:59 +0100 2007</td> + </tr> + </table> + </td></tr> + </table> + </td></tr> +</table><br> + <!-- banner header --> + + <div id="bodyContent"> + <div id="content"> + <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center"> + <map id="map" name="map"> + <area shape="rect" coords="27,124,179,172" href="../../classes/TestAbtDownloadManager.html" alt="TestAbtDownloadManager" /> + <area shape="rect" coords="41,5,164,53" href="../../classes/Test/Unit/TestCase.html" alt="Test::Unit::TestCase" /> +</map> +<img src="../../dot/f_10.png" usemap="#map" border="0" alt="dot/f_10.png"> + </td></tr></table> + + + <div class="sectiontitle">Required Files</div> + <ul> + <li>test/unit/testcase</li> + <li>test/unit/autorunner</li> + <li>abtconfig</li> + </ul> + + + + + + + + +</div> + + </div> + + </body> +</html> \ No newline at end of file Added: src/trunk/doc/files/tests/testabtlogmanager_rb.html =================================================================== --- src/trunk/doc/files/tests/testabtlogmanager_rb.html (rev 0) +++ src/trunk/doc/files/tests/testabtlogmanager_rb.html 2007-12-31 14:29:57 UTC (rev 469) @@ -0,0 +1,105 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + <head> + <title>File: testabtlogmanager.rb</title> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> + <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> + + <script language="JavaScript" type="text/javascript"> + // <![CDATA[ + + function toggleSource( id ) + { + var elem + var link + + if( document.getElementById ) + { + elem = document.getElementById( id ) + link = document.getElementById( "l_" + id ) + } + else if ( document.all ) + { + elem = eval( "document.all." + id ) + link = eval( "document.all.l_" + id ) + } + else + return false; + + if( elem.style.display == "block" ) + { + elem.style.display = "none" + link.innerHTML = "show source" + } + else + { + elem.style.display = "block" + link.innerHTML = "hide source" + } + } + + function openCode( url ) + { + window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" ) + } + // ]]> + </script> + </head> + + <body> + <table border='0' cellpadding='0' cellspacing='0' width="100%" class='banner'> + <tr><td> + <table width="100%" border='0' cellpadding='0' cellspacing='0'><tr> + <td class="file-title" colspan="2"><span class="file-title-prefix">File</span><br />testabtlogmanager.rb</td> + <td align="right"> + <table border='0' cellspacing="0" cellpadding="2"> + <tr> + <td>Path:</td> + <td>tests/testabtlogmanager.rb + </td> + </tr> + <tr> + <td>Modified:</td> + <td>Mon Dec 31 13:20:46 +0100 2007</td> + </tr> + </table> + </td></tr> + </table> + </td></tr> +</table><br> + <!-- banner header --> + + <div id="bodyContent"> + <div id="content"> + <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center"> + <map id="map" name="map"> + <area shape="rect" coords="27,124,149,172" href="../../classes/TestAbtLogManager.html" alt="TestAbtLogManager" /> + <area shape="rect" coords="27,5,149,53" href="../../classes/Test/Unit/TestCase.html" alt="Test::Unit::TestCase" /> +</map> +<img src="../../dot/f_11.png" usemap="#map" border="0" alt="dot/f_11.png"> + </td></tr></table> + + + <div class="sectiontitle">Required Files</div> + <ul> + <li>test/unit/testcase</li> + <li>test/unit/autorunner</li> + <li>abtconfig</li> + </ul> + + + + + + + + +</div> + + </div> + + </body> +</html> \ No newline at end of file Added: src/trunk/doc/files/tests/testabtpackage_rb.html =================================================================== --- src/trunk/doc/files/tests/testabtpackage_rb.html (rev 0) +++ src/trunk/doc/files/tests/testabtpackage_rb.html 2007-12-31 14:29:57 UTC (rev 469) @@ -0,0 +1,106 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + <head> + <title>File: testabtpackage.rb</title> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> + <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> + + <script language="JavaScript" type="text/javascript"> + // <![CDATA[ + + function toggleSource( id ) + { + var elem + var link + + if( document.getElementById ) + { + elem = document.getElementById( id ) + link = document.getElementById( "l_" + id ) + } + else if ( document.all ) + { + elem = eval( "document.all." + id ) + link = eval( "document.all.l_" + id ) + } + else + return false; + + if( elem.style.display == "block" ) + { + elem.style.display = "none" + link.innerHTML = "show source" + } + else + { + elem.style.display = "block" + link.innerHTML = "hide source" + } + } + + function openCode( url ) + { + window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" ) + } + // ]]> + </script> + </head> + + <body> + <table border='0' cellpadding='0' cellspacing='0' width="100%" class='banner'> + <tr><td> + <table width="100%" border='0' cellpadding='0' cellspacing='0'><tr> + <td class="file-title" colspan="2"><span class="file-title-prefix">File</span><br />testabtpackage.rb</td> + <td align="right"> + <table border='0' cellspacing="0" cellpadding="2"> + <tr> + <td>Path:</td> + <td>tests/testabtpackage.rb + </td> + </tr> + <tr> + <td>Modified:</td> + <td>Mon Dec 31 13:24:24 +0100 2007</td> + </tr> + </table> + </td></tr> + </table> + </td></tr> +</table><br> + <!-- banner header --> + + <div id="bodyContent"> + <div id="content"> + <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center"> + <map id="map" name="map"> + <area shape="rect" coords="27,124,133,172" href="../../classes/TestAbtPackage.html" alt="TestAbtPackage" /> + <area shape="rect" coords="19,5,141,53" href="../../classes/Test/Unit/TestCase.html" alt="Test::Unit::TestCase" /> +</map> +<img src="../../dot/f_12.png" usemap="#map" border="0" alt="dot/f_12.png"> + </td></tr></table> + + + <div class="sectiontitle">Required Files</div> + <ul> + <li>test/unit/testcase</li> + <li>test/unit/autorunner</li> + <li>abtconfig</li> + <li>ipc</li> + </ul> + + + + + + + + +</div> + + </div> + + </body> +</html> \ No newline at end of file Added: src/trunk/doc/files/tests/testabtpackagemanager_rb.html =================================================================== --- src/trunk/doc/files/tests/testabtpackagemanager_rb.html (rev 0) +++ src/trunk/doc/files/tests/testabtpackagemanager_rb.html 2007-12-31 14:29:57 UTC (rev 469) @@ -0,0 +1,105 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + <head> + <title>File: testabtpackagemanager.rb</title> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> + <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> + + <script language="JavaScript" type="text/javascript"> + // <![CDATA[ + + function toggleSource( id ) + { + var elem + var link + + if( document.getElementById ) + { + elem = document.getElementById( id ) + link = document.getElementById( "l_" + id ) + } + else if ( document.all ) + { + elem = eval( "document.all." + id ) + link = eval( "document.all.l_" + id ) + } + else + return false; + + if( elem.style.display == "block" ) + { + elem.style.display = "none" + link.innerHTML = "show source" + } + else + { + elem.style.display = "block" + link.innerHTML = "hide source" + } + } + + function openCode( url ) + { + window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" ) + } + // ]]> + </script> + </head> + + <body> + <table border='0' cellpadding='0' cellspacing='0' width="100%" class='banner'> + <tr><td> + <table width="100%" border='0' cellpadding='0' cellspacing='0'><tr> + <td class="file-title" colspan="2"><span class="file-title-prefix">File</span><br />testabtpackagemanager.rb</td> + <td align="right"> + <table border='0' cellspacing="0" cellpadding="2"> + <tr> + <td>Path:</td> + <td>tests/testabtpackagemanager.rb + </td> + </tr> + <tr> + <td>Modified:</td> + <td>Mon Dec 31 13:16:24 +0100 2007</td> + </tr> + </table> + </td></tr> + </table> + </td></tr> +</table><br> + <!-- banner header --> + + <div id="bodyContent"> + <div id="content"> + <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center"> + <map id="map" name="map"> + <area shape="rect" coords="27,124,173,172" href="../../classes/TestAbtPackageManager.html" alt="TestAbtPackageManager" /> + <area shape="rect" coords="39,5,161,53" href="../../classes/Test/Unit/TestCase.html" alt="Test::Unit::TestCase" /> +</map> +<img src="../../dot/f_13.png" usemap="#map" border="0" alt="dot/f_13.png"> + </td></tr></table> + + + <div class="sectiontitle">Required Files</div> + <ul> + <li>test/unit/testcase</li> + <li>test/unit/autorunner</li> + <li>abtconfig</li> + </ul> + + + + + + + + +</div> + + </div> + + </body> +</html> \ No newline at end of file Added: src/trunk/doc/files/tests/testabtqueuemanager_rb.html =================================================================== --- src/trunk/doc/files/tests/testabtqueuemanager_rb.html (rev 0) +++ src/trunk/doc/files/tests/testabtqueuemanager_rb.html 2007-12-31 14:29:57 UTC (rev 469) @@ -0,0 +1,105 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + <head> + <title>File: testabtqueuemanager.rb</title> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> + <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> + + <script language="JavaScript" type="text/javascript"> + // <![CDATA[ + + function toggleSource( id ) + { + var elem + var link + + if( document.getElementById ) + { + elem = document.getElementById( id ) + link = document.getElementById( "l_" + id ) + } + else if ( document.all ) + { + elem = eval( "document.all." + id ) + link = eval( "document.all.l_" + id ) + } + else + return false; + + if( elem.style.display == "block" ) + { + elem.style.display = "none" + link.innerHTML = "show source" + } + else + { + elem.style.display = "block" + link.innerHTML = "hide source" + } + } + + function openCode( url ) + { + window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" ) + } + // ]]> + </script> + </head> + + <body> + <table border='0' cellpadding='0' cellspacing='0' width="100%" class='banner'> + <tr><td> + <table width="100%" border='0' cellpadding='0' cellspacing='0'><tr> + <td class="file-title" colspan="2"><span class="file-title-prefix">File</span><br />testabtqueuemanager.rb</td> + <td align="right"> + <table border='0' cellspacing="0" cellpadding="2"> + <tr> + <td>Path:</td> + <td>tests/testabtqueuemanager.rb + </td> + </tr> + <tr> + <td>Modified:</td> + <td>Mon Dec 31 13:25:49 +0100 2007</td> + </tr> + </table> + </td></tr> + </table> + </td></tr> +</table><br> + <!-- banner header --> + + <div id="bodyContent"> + <div id="content"> + <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center"> + <map id="map" name="map"> + <area shape="rect" coords="27,124,163,172" href="../../classes/TestAbtQueueManager.html" alt="TestAbtQueueManager" /> + <area shape="rect" coords="34,5,156,53" href="../../classes/Test/Unit/TestCase.html" alt="Test::Unit::TestCase" /> +</map> +<img src="../../dot/f_14.png" usemap="#map" border="0" alt="dot/f_14.png"> + </td></tr></table> + + + <div class="sectiontitle">Required Files</div> + <ul> + <li>test/unit/testcase</li> + <li>test/unit/autorunner</li> + <li>abtconfig</li> + </ul> + + + + + + + + +</div> + + </div> + + </body> +</html> \ No newline at end of file Added: src/trunk/doc/files/tests/testabtreportmanager_rb.html =================================================================== --- src/trunk/doc/files/tests/testabtreportmanager_rb.html (rev 0) +++ src/trunk/doc/files/tests/testabtreportmanager_rb.html 2007-12-31 14:29:57 UTC (rev 469) @@ -0,0 +1,105 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + <head> + <title>File: testabtreportmanager.rb</title> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> + <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> + + <script language="JavaScript" type="text/javascript"> + // <![CDATA[ + + function toggleSource( id ) + { + var elem + var link + + if( document.getElementById ) + { + elem = document.getElementById( id ) + link = document.getElementById( "l_" + id ) + } + else if ( document.all ) + { + elem = eval( "document.all." + id ) + link = eval( "document.all.l_" + id ) + } + else + return false; + + if( elem.style.display == "block" ) + { + elem.style.display = "none" + link.innerHTML = "show source" + } + else + { + elem.style.display = "block" + link.innerHTML = "hide source" + } + } + + function openCode( url ) + { + window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" ) + } + // ]]> + </script> + </head> + + <body> + <table border='0' cellpadding='0' cellspacing='0' width="100%" class='banner'> + <tr><td> + <table width="100%" border='0' cellpadding='0' cellspacing='0'><tr> + <td class="file-title" colspan="2"><span class="file-title-prefix">File</span><br />testabtreportmanager.rb</td> + <td align="right"> + <table border='0' cellspacing="0" cellpadding="2"> + <tr> + <td>Path:</td> + <td>tests/testabtreportmanager.rb + </td> + </tr> + <tr> + <td>Modified:</td> + <td>Mon Dec 31 13:27:21 +0100 2007</td> + </tr> + </table> + </td></tr> + </table> + </td></tr> +</table><br> + <!-- banner header --> + + <div id="bodyContent"> + <div id="content"> + <table cellpadding='0' cellspacing='0' border='0' width="100%">... [truncated message content] |
From: <esc...@us...> - 2007-12-31 14:28:41
|
Revision: 468 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=468&view=rev Author: eschabell Date: 2007-12-31 06:28:33 -0800 (Mon, 31 Dec 2007) Log Message: ----------- Added load path for configuration file for testsuite. Modified Paths: -------------- src/trunk/tests/testsuiteabt.rb Modified: src/trunk/tests/testsuiteabt.rb =================================================================== --- src/trunk/tests/testsuiteabt.rb 2007-12-31 14:27:06 UTC (rev 467) +++ src/trunk/tests/testsuiteabt.rb 2007-12-31 14:28:33 UTC (rev 468) @@ -6,6 +6,7 @@ exit end +$LOAD_PATH.unshift '/etc/abt/' $LOAD_PATH.unshift '/var/lib/abt/' $LOAD_PATH.unshift '../libs/' # development only. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2007-12-31 14:27:12
|
Revision: 467 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=467&view=rev Author: eschabell Date: 2007-12-31 06:27:06 -0800 (Mon, 31 Dec 2007) Log Message: ----------- This completes the libs move. Removed Paths: ------------- src/trunk/abtdepengine.rb src/trunk/abtdownloadmanager.rb src/trunk/abtlogmanager.rb src/trunk/abtpackage.rb src/trunk/abtpackagemanager.rb src/trunk/abtqueuemanager.rb src/trunk/abtreportmanager.rb src/trunk/abtsystemmanager.rb src/trunk/abtusage.rb Deleted: src/trunk/abtdepengine.rb =================================================================== --- src/trunk/abtdepengine.rb 2007-12-31 14:26:27 UTC (rev 466) +++ src/trunk/abtdepengine.rb 2007-12-31 14:27:06 UTC (rev 467) @@ -1,45 +0,0 @@ -#!/usr/bin/ruby -w - -## -# abtdepengine.rb -# -# AbtDepEngine class handles all dependency aspects of the AbTLinux system. It is -# part of a sub-project with it's own requirements document. -# -# 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 AbtDepEngine - - protected - - private - - public - - ## - # Constructor for the AbtDepEngine class. - # - # <b>RETURN</b> <i>AbtDepEngine</i> - an initialized AbtDepEngine object. - ## - def initialize - # TODO: implement this. - end - -end Deleted: src/trunk/abtdownloadmanager.rb =================================================================== --- src/trunk/abtdownloadmanager.rb 2007-12-31 14:26:27 UTC (rev 466) +++ src/trunk/abtdownloadmanager.rb 2007-12-31 14:27:06 UTC (rev 467) @@ -1,260 +0,0 @@ -#!/usr/bin/ruby -w - -## -# abtdownloadmanager.rb -# -# AbtDownloadManager class handles all downloading of components needed for -# AbTLinux. -# -# 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 AbtDownloadManager - - protected - - private - - public - - ## - # Constructor for the AbtDownloadManager class. - # - # <b>RETURN</b> <i>AbtDownloadManager</i> - an initialized - # AbtDownloadManager object. - ## - def initialize - end - - ## - # Downloads a given package source. If the file already exists, returns - # true as if download completed. - # - # <b>PARAM</b> <i>String</i> - the name of the package for which the source - # is to be downloaded. - # <b>PARAM</b> <i>String</i> - the path to the download destination. - # - # <b>RETURN</b> <i>boolean</i> - True if the package source has been - # downloaded, otherwise false. - ## - def retrieve_package_source( packageName, destination ) - require "#{$PACKAGE_PATH}#{packageName}" - logger = Logger.new($JOURNAL) - package = eval( packageName.capitalize + '.new' ) - - if ( File.exist?( "#{destination}/#{File.basename( package.srcUrl )}" ) ) - logger.info( "Download not needed, existing source found for #{packageName}" ) - return true - end - - Dir.chdir( destination ) - if ( system( "wget #{package.srcUrl}" ) ) - logger.info( "Download completed for #{packageName}" ) - return true - end - - return false # download failed. - end - - ## - # Downloads a given pacakge tree. - # - # <b>PARAM</b> <i>String</i> - the name of the package tree to be retrieved. - # - # <b>RETURN</b> <i>boolean</i> - True if the package tree is retrieved, - # otherwise false. - ## - def retrieve_package_tree( packageTreeName="AbTLinux" ) - logger = Logger.new($JOURNAL) - - # check if package tree exists. - if File.directory?( $PACKAGE_PATH ) - # check if svn directory. - if File.directory?( "#{$PACKAGE_PATH}.svn" ) - logger.info "Package tree #{packageTreeName} already installed." - return true - else - # package directory exists, but is not a valid tree. - logger.error "Package tree exists, but is not valid svn tree." - return false - end - - else - - # pacakge directory does not exist, svn co. - if system( "svn co #{$ABTLINUX_PACKAGES} #{$PACKAGE_PATH}" ) - logger.info "Package tree installed (svn co)" - else - logger.error "Package tree not installed (svn co), problems!" - return false - end - - end - - return true - end - - ## - # 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>boolean</i> - default is to emplty the log file, - # passing 'false' will append to news file. - # <b>RETURN</b> <i>boolean</i> - True if the AbTLinux news feed has been - # retrieved, otherwise false. - ## - def retrieve_news_feed( uri, cleanLog=true ) - require 'net/http' - require 'uri' - require 'rss/1.0' - require 'rss/2.0' - newsLog = "" - logger = Logger.new( $JOURNAL) - - # ensure we have our news logfile. - if ( cleanLog ) - newsLog = File.new( $ABTNEWS_LOG, "w+" ) - else - newsLog = File.new( $ABTNEWS_LOG, "a+" ) - end - - # pick up the abtlinux.org news feed. - if ( !news = Net::HTTP.get( URI.parse( uri ) ) ) - logger.info( "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.info( "Failed to display news feed as feed #{uri} is not RSS 1.0/2.0." ) - return false - else - newsLog << "*** #{rss.channel.title} ***\n" - - rss.items.each_with_index do |item, itemCount| - itemCount += 1 - newsLog << "#{itemCount} #{item.link} #{item.title}\n" - end - end - - newsLog << "\n\n" - newsLog.close - return true - - end - - ## - # Updates a given package with available patches (version updates). - # - # <b>PARAM</b> <i>String</i> - the name of the package to be updated. - # - # <b>RETURN</b> <i>boolean</i> - True if the given package has been updated, - # otherwise false. - ## - def update_package( packageName ) - logger = Logger.new($JOURNAL) - - # check if package exists in tree. - if File.exists?( "#{$PACKAGE_PATH}/#{packageName}.rb" ) - # check if svn directory. - if File.directory?( "#{$PACKAGE_PATH}.svn" ) - if system( "svn update #{$PACKAGE_PATH}/#{packageName.downcase}.rb" ) - logger.info "Package #{packageName.downcase} updated (svn update)" - else - logger.error "Package #{packageName.downcase} unable to update (svn update)." - return false - end - else - # package exists, but not an valid tree. - logger.error "Package #{packageName} exists, but not valid package tree (svn)." - return false - end - else - # package does not exist. - logger.error "Package is not installed, not possible to update!" - return false - end - - return true - end - - ## - # Updates the package tree. - # - # <b>PARAM</b> <i>String</i> - the name of the tree to be updated, defaults to AbTLinux repo. - # - # <b>RETURN</b> <i>boolean</i> - True if the package tree has been updated, - # otherwise false. - ## - def update_package_tree( packageTreeName="AbTLinux" ) - logger = Logger.new($JOURNAL) - - # check if package tree exists. - if File.directory?( $PACKAGE_PATH ) - # check if svn directory. - if File.directory?( "#{$PACKAGE_PATH}.svn" ) - if system( "svn update #{$PACKAGE_PATH}" ) - logger.info "Package tree updated (svn update)" - else - logger.error "Package tree unable to update (svn update)." - return false - end - else - # package directory exists, but is not a valid tree. - logger.error "Package tree exists, but is not valid svn tree." - return false - end - else - # package directory does not exist. - logger.error "Package tree not installed!" - return false - end - - return true - end - - ## - # Validates the sources based on package hash value. - # - # <b>PARAM</b> <i>String</i> - security hash value from the packages description. - # <b>PARAM</b> <i>String</i> - source tarball location to be checked. - # - # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, - # otherwise false. - ## - def validated( hashvalue, path ) - logger = Logger.new( $JOURNAL ) - - if hashvalue == Digest::SHA1.hexdigest( path ) - puts "Source hash validated successfully..." - logger.info( "Validated sources successfully..." ) - return true - end - - puts "Source hash failed validation..." - logger.info( "Validating sources failed..." ) - return false - end -end Deleted: src/trunk/abtlogmanager.rb =================================================================== --- src/trunk/abtlogmanager.rb 2007-12-31 14:26:27 UTC (rev 466) +++ src/trunk/abtlogmanager.rb 2007-12-31 14:27:06 UTC (rev 467) @@ -1,285 +0,0 @@ -#!/usr/bin/ruby -w - -## -# abtlogmanager.rb -# -# AbtLogManager class handles all aspects of logging and access to existing logs -# within the AbTLinux system. -# -# 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 AbtLogManager - - protected - - private - - public - - ## - # Returns the path to given packages install log. - # - # <b>PARAM</b> <i>String</i> - Package name. - # - # <b>RETURN</b> <i>String</i> - Full path to install log. - ## - def get_log( package, type ) - require "#{$PACKAGE_PATH}#{package}" - sw = eval( "#{package.capitalize}.new" ) - details = sw.details - - case type - - when 'install' - log = "#{$PACKAGE_INSTALLED}/#{details['Source location']}/#{details['Source location']}.install" - - when 'integrity' - log = "#{$PACKAGE_INSTALLED}/#{details['Source location']}/#{details['Source location']}.integrity" - - when 'tmpinstall' - log = "#{$ABT_TMP}/#{details['Source location']}.watch" - - when 'build' - log = "#{$PACKAGE_INSTALLED}/#{details['Source location']}/#{details['Source location']}.build" - - when 'configure' - log = "#{$PACKAGE_INSTALLED}/#{details['Source location']}/#{details['Source location']}.configure" - - else - log = "" - - end - - return log - end - - ## - # Constructor for the AbtLogManager. It ensures all needed logs paths are - # initialized. - # - # - # <b>RETURN</b> <i>AbtLogManager</i> - an initialized AbtLogManager object. - ## - def initialize - logger = Logger.new( $JOURNAL ) - [$ABT_LOGS, $ABT_CACHES, $ABT_STATE, $BUILD_LOCATION, $PACKAGE_INSTALLED, $ABT_LIBS, - $PACKAGE_CACHED, $ABT_TMP, $ABT_CONFIG, $ABT_LOCAL_CONFIG, $SOURCES_REPOSITORY].each { |dir| - - if ( ! File.directory?( dir ) ) - FileUtils.mkdir_p( dir ) - logger.info( "Created directory: #{dir}." ) - end - } - end - - ## - # Provides logging of the integrity of all installed files for the given - # package. Will be called as part of the logging done during the install - # phase. - # - # <b>PARAM</b> <i>String</i> - Package name. - # - # <b>RETURN</b> <i>boolean</i> - True if integrity log created successfully, - # otherwise false. - ## - def log_package_integrity( package ) - - # our log locations. - installLog = get_log( package, 'install' ) - integrityLog = get_log( package, 'integrity' ) - - # get the installed files from the tmp file - # into our install log. - if ( File.exist?( installLog ) ) - installFile = open( installLog, 'r' ) - integrityFile = open( integrityLog, 'w' ) - - # get the integrity for each file, initially just permissions. - IO.foreach( installLog ) do |line| - status = File.stat( line.chomp ) - octal = sprintf( "%o", status.mode ) - integrityFile << "#{line.chomp}:#{octal}\n" - end - - installFile.close - integrityFile.close - else - return false # no install log! - end - - return true; - end - - ## - # Provides logging of all files installed by given package. Should be called - # as part of the install phase of the build. - # - # <b>PARAM</b> <i>String</i> - Package name. - # - # <b>RETURN</b> <i>boolean</i> - True if install log created successfully, - # otherwise false. - ## - def log_package_install( package ) - # some dirs we will not add to an install log. - excluded_pattern = Regexp.new( "^(/dev|/proc|/tmp|/var/tmp|/usr/src|/sys)+" ) - badLine = false # used to mark excluded lines from installwatch log. - - # our log locations. - installLog = get_log( package, 'install' ) - tmpInstallLog = get_log( package, 'tmpinstall' ) - - # get the installed files from the tmp file - # into our install log. - if ( File.exist?( tmpInstallLog ) ) - installFile = open( installLog, 'w') - - # include only the file names from open calls - # and not part of the excluded range of directories. - IO.foreach( tmpInstallLog ) do |line| - if ( line.split[1] == 'open' ) - if ( line.split[2] =~ excluded_pattern ) - badLine = true - else - badLine = false - end - - if ( !badLine ) - installFile << "#{line.split[2]}\n" - end - end - end - - installFile.close - else - # no tmp install file, thus no install running. - return false - end - - return true; - end - - ## - # Provides logging of all output produced during the build phase of the - # given package. Should be called as part of the install phase of the build. - # - # <b>PARAM</b> <i>String</i> - Package name. - # - # <b>RETURN</b> <i>boolean</i> - True if build log created successfully, - # otherwise false. - ## - def log_package_build( package ) - buildLog = get_log( package, 'build' ) - - # make sure the build file exists. - if ( !File.exist?( buildLog ) ) - return false - end - - return true - end - - ## - # Provides a complete log of the given packages build. Includes everything - # needed to duplicate the build at a later date. - # - # <b>PARAM</b> <i>String</i> - Package name. - # - # <b>RETURN</b> <i>boolean</i> - True if package cache created successfully, - # otherwise false. - ## - def cache_package( package ) - system = AbtSystemManager.new - - if ( system.package_installed( package ) ) - sw = eval( "#{package.capitalize}.new" ) - cachedDir = $PACKAGE_CACHED + "/" + sw.srcDir - sourcePath = $SOURCES_REPOSITORY + "/" + File.basename( sw.srcUrl ) - sourceFile = File.basename( sw.srcUrl ) - installLog = get_log( package, 'install' ) - buildLog = get_log( package, 'build' ) - configureLog = get_log( package, 'configure' ) - integrityLog = get_log( package, 'integrity' ) - packageFile = "#{$PACKAGE_PATH}#{package}.rb" - - - FileUtils.mkdir_p( cachedDir ) - - # collect package source. - if ( FileTest::exist?( sourcePath ) ) - FileUtils.copy_file( sourcePath, "#{cachedDir}/#{sourceFile}" ) - puts "\nCaching copy of #{package} source." - else - puts "\nUnable to cache copy of #{package} source." - end - - # collect package install log. - if ( FileTest::exist?( installLog ) ) - FileUtils.copy_file( installLog, "#{cachedDir}/#{sw.srcDir}.install" ) - puts "\nCaching copy of #{package} install log." - else - puts "\nUnable to cache copy of #{package} install log." - end - - # collect package build log. - if ( FileTest::exist?( buildLog ) ) - FileUtils.copy_file( buildLog, "#{cachedDir}/#{sw.srcDir}.build" ) - puts "\nCaching copy of #{package} build log." - else - puts "\nUnable to cache copy of #{package} build log." - end - - # collect package configure log. - if ( FileTest::exist?( configureLog ) ) - FileUtils.copy_file( configureLog, "#{cachedDir}/#{sw.srcDir}.configure" ) - puts "\nCaching copy of #{package} configure log." - else - puts "\nUnable to cache copy of #{package} configure log." - end - - # collect package integrity log. - if ( FileTest::exist?( integrityLog ) ) - FileUtils.copy_file( integrityLog, "#{cachedDir}/#{sw.srcDir}.integrity" ) - puts "\nCaching copy of #{package} integrity log." - else - puts "\nUnable to cache copy of #{package} integrity log." - end - - # collect package description (class file). - if ( FileTest::exist?( packageFile ) ) - FileUtils.copy_file( packageFile, "#{cachedDir}/#{package}.rb" ) - puts "\nCaching copy of #{package} package description." - else - puts "\nUnable to cache copy of #{package} package description, from location #{packageFile}" - end - - # tar and bzip this directory (package-cache-version.tar.bz2) - Dir.chdir( $PACKAGE_CACHED ) - if ( system( "tar -cf #{sw.srcDir}.tar #{sw.srcDir}" ) && - system( "bzip2 -f #{sw.srcDir}.tar" ) ) - # last but not least, remove our tarball directory - FileUtils.rm_rf( cachedDir ) - return true - end - end - - return false # package not installed, can't cache it. - end - -end Deleted: src/trunk/abtpackage.rb =================================================================== --- src/trunk/abtpackage.rb 2007-12-31 14:26:27 UTC (rev 466) +++ src/trunk/abtpackage.rb 2007-12-31 14:27:06 UTC (rev 467) @@ -1,377 +0,0 @@ -#!/usr/bin/ruby -w - -## -# abtpackage.rb -# -# AbtPackage class provides an interface to AbtPackage creation within -# AbTLinux. By inheriting from this class (class Fortune < AbtPackage) one -# picks up all supported standard functions for the abt AbtPackage manager -# to make use of the new AbtPackage. -# -# 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 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 unpack_sources - 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 - - Dir.chdir( $BUILD_LOCATION ) - if ( !system( "#{unpackTool} #{sourcesToUnpack}" ) ) - return false - end - - return true - end - - private - - public - - # the name of the package. - attr_reader :name - - # the executable name for the package. - attr_reader :execName - - # the package version number. - attr_reader :version - - # the source directory for the package. - attr_reader :srcDir - - # the packages homepage. - attr_reader :homepage - - # the URL where this packages sources can be obtained. - attr_reader :srcUrl - - # list of dependsOn (DO) related package dependencies. - attr_reader :dependsOn - - # list of reliesOn (RO) related package dependencies. - attr_reader :reliesOn - - # list of optional reliesOn (oRO) related package dependencies. - attr_reader :optionalDO - - # list of optional dependsOn (oDO) related package dependencies. - attr_reader :optionalRO - - # security hash value of package sources. - attr_reader :hashCheck - - # list of available patches for this package. - attr_reader :patches - - # security hash value of this packages patches. - attr_reader :patchesHashCheck - - # available mirrors for this package. - attr_reader :mirrorPath - - # type of license this package has. - attr_reader :licence - - # the package description. - attr_reader :description - - - ## - # Constructor for an AbtPackage, requires all the packge details. - # - # <b>PARAM</b> <i>Hash</i> - hash containing all package data. - # - ## - def initialize( data ) - @name = data['name'] - @execName = data['execName'] - @version = data['version'] - @srcDir = data['srcDir'] - @homepage = data['homepage'] - @srcUrl = data['srcUrl'] - @dependsOn = data['dependsOn'] - @reliesOn = data['reliesOn'] - @optionalDO = data['optionalDO'] - @optionalRO = data['optionalRO'] - @hashCheck = data['hashCheck'] - @patches = data['patches'] - @patchesHashCheck = data['patchesHashCheck'] - @mirrorPath = data['mirrorPath'] - @license = data['license'] - @description = data['description'] - end - - ## - # Provides all the data needed for this AbtPackage. - # - # <b>RETURNS:</b> <i>hash</i> - Contains all AbtPackage - # attributes (constants). - ## - def details - return { - "Package name" => @name, - "Executable" => @execName, - "Version" => @version, - "Source location" => @srcDir, - "Homepage" => @homepage, - "Source uri" => @srcUrl, - "Depends On" => @dependsOn, - "Relies On" => @reliesOn, - "Optional DO" => @optionalDO, - "Optional RO" => @optionalRO, - "Security hash" => @hashCheck, - "Patches" => @patches, - "Patches hash" => @patchesHashCheck, - "Mirror" => @mirrorPath, - "License" => @license, - "Description" => @description - } - end - - ## - # Preliminary work will happen here such as downloading the tarball, - # unpacking it, downloading and applying patches. - # - # <b>PARAM</b> <i>boolean</i> - true if you want to see the verbose output, - # otherwise false. Defaults to true. - # - # <b>RETURNS:</b> <i>boolean</i> - True if completes sucessfully, - # otherwise false. - ## - def pre( verbose=true ) - downloader = AbtDownloadManager.new - - # download sources. - if ( !downloader.retrieve_package_source( @name.downcase, $SOURCES_REPOSITORY ) ) - return false - end - - # validate sources sha1. - if ( !downloader.validated( @hashCheck, "#{$SOURCES_REPOSITORY}/#{File.basename( @srcUrl )}" ) ) - return false - end - - # unpack sources. - if ( !unpack_sources ) - return false - end - - # ensure we have an installed directory to use. - if ( ! File.directory?( "#{$PACKAGE_INSTALLED}/#{@srcDir}" ) ) - FileUtils.mkdir_p( "#{$PACKAGE_INSTALLED}/#{@srcDir}" ) - end - - # TODO: implement pre section retrieve patches? - # TODO: implement pre section apply patches? - - return true - end - - ## - # Here we manage the ./configure step (or equivalent). We need - # to give ./configure (or autogen.sh, or whatever) the correct options - # so files are to be placed later in the right directories, so doc files - # and man pages are all in the same common location, etc. - # Don't forget too that it's here where we interact with the user in - # case there are optionnal dependencies. - # - # <b>PARAM</b> <i>boolean</i> - true if you want to see the verbose output, - # otherwise false. Defaults to true. - # - # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, - # otherwise false. - ## - def configure( verbose=true ) - if ( verbose ) - command = "./configure --prefix=#{$DEFAULT_PREFIX} | tee #{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.configure" - else - command = "./configure --prefix=#{$DEFAULT_PREFIX} 1> #{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.configure 2>&1" - end - - Dir.chdir( "#{$BUILD_LOCATION}/#{@srcDir}" ) - - if ( !system( command ) ) - puts "[AbtPackage.configure] - configure section failed." - return false - end - - puts "[AbtPackage.configure] - configure section completed!" if (verbose ) - return true - end - - ## - # Here is where the actual builing of the software starts, - # for example running 'make'. - # - # <b>PARAM</b> <i>boolean</i> - true if you want to see the verbose output, - # otherwise false. Defaults to true. - # - # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, - # otherwise false. - ## - def build( verbose=true ) - if ( verbose ) - command = "make | tee #{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.build" - else - command = "make > #{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.build 2>&1" - end - - Dir.chdir( "#{$BUILD_LOCATION}/#{@srcDir}" ) - - if( !system( command ) ) - puts "[AbtPackage.build] - build section failed." - return false - end - - puts "[AbtPackage.build] - build section completed!" if ( verbose ) - return true - end - - ## - # Any actions needed before the installation can occur will happen here, - # such as creating new user accounts, dealing with existing configuration - # files, etc. - # - # <b>PARAM</b> <i>boolean</i> - true if you want to see the verbose output, - # otherwise false. Defaults to true. - # - # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, - # otherwise false. - ## - def preinstall( verbose=true ) - # TODO: preinstall section create_group? - # TODO: preinstall section create_user? - return true; - end - - ## - # All files to be installed are installed here. - # - # <b>PARAM</b> <i>boolean</i> - true if you want to see the verbose output, - # otherwise false. Defaults to true. - # - # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, - # otherwise false. - ## - def install( verbose=true ) - if ( verbose ) - command = "installwatch --transl=no --backup=no " + - "--exclude=/dev,/proc,/tmp,/var/tmp,/usr/src,/sys " + - "--logfile=#{$ABT_TMP}/#{@srcDir}.watch make install" - else - command = "installwatch --transl=no --backup=no " + - "--exclude=/dev,/proc,/tmp,/var/tmp,/usr/src,/sys " + - "--logfile=#{$ABT_TMP}/#{@srcDir}.watch make install >/dev/null" - end - - Dir.chdir( "#{$BUILD_LOCATION}/#{@srcDir}" ) - - if( !system( command ) ) - puts "[AbtPackage.install] - install section failed." - return false - end - - puts "[AbtPackage.install] - install section completed!" if ( verbose ) - return true - end - - ## - # Last bits of installation. adding the service for automatic - # start in init.d for example. - # - # <b>PARAM</b> <i>boolean</i> - true if you want to see the verbose output, - # otherwise false. Defaults to true. - # - # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, - # otherwise false. - ## - def post( verbose=true ) - # TODO: implement post section install init scripts service - return true - end - - ## - # Cleans up this packages source build directory. - # - # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, - # otherwise false. - ## - def remove_build - puts "Removings build..." - if ( $REMOVE_BUILD_SOURCES ) - buildSourcesLocation = "#{$BUILD_LOCATION}/#{srcDir}" - - if ( !File.directory?( buildSourcesLocation ) ) - return true - end - - if ( !FileUtils.rm_rf buildSourcesLocation, :verbose => true ) - return false - end - end - - return true - end -end Deleted: src/trunk/abtpackagemanager.rb =================================================================== --- src/trunk/abtpackagemanager.rb 2007-12-31 14:26:27 UTC (rev 466) +++ src/trunk/abtpackagemanager.rb 2007-12-31 14:27:06 UTC (rev 467) @@ -1,425 +0,0 @@ -#!/usr/bin/ruby -w - -## -# abtpackagemanager.rb -# -# AbtPackageManager class will take care of the installation, removal, updating, -# downgrading and freezing of AbTLinux software packages. -# -# 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 AbtPackageManager - - protected - - private - - ## - # Attempts to roll back a type of action. Current supported types are - # install. Removes installed files and logs as needed. - # - # <b>PARAM</b> <i>String</i> - the type of rollback option to attempt. - # <b>PARAM</b> <i>Array</i> - The details of the package for which the - # rollback action is being called. - # - # <b>RETURN</b> <i>boolean</i> - True if the action rolls back, otherwise - # false. - ## - def roll_back( type, details ) - logFile = "#{$PACKAGE_INSTALLED}/#{details['Source location']}/" - - case type - when "install" - logFile = logFile + "#{details['Source location']}.install" - - file = File.new( logFile, "r" ) - while ( line = file.gets ) - if ( File.file?( line.chomp ) ) - File.delete( line.chomp ) - end - end - file.close - - # cleanup install log as it is incomplete. - File.delete( logFile ) - else - return false - end - - return true - end - - - public - - ## - # Constructor for AbtPackageManager. - # - # <b>RETURN</b> <i>AbtPackageManager</i> - an initialized - # AbtPackageManager object. - ## - def initialize - end - - ## - # Installs a given package. - # - # <b>PARAM</b> <i>String</i> - the name of the package to be installed. - # <b>PARAM</b> <i>boolean</i> - true for verbose output from the process, - # otherwise false. Default is true. - # - # <b>RETURN</b> <i>boolean</i> - True if the package is installed, otherwise - # false. - ## - def install_package( package, verbose=true ) - require "#{$PACKAGE_PATH}#{package}" - sw = eval( "#{package.capitalize}.new" ) - queuer = AbtQueueManager.new - logger = Logger.new( $JOURNAL ) - system = AbtSystemManager.new - - # TODO: refactor myLogger: - myLogger = AbtLogManager.new - - # get package details. - details = sw.details - - # check for frozen. - if ( system.package_frozen( package ) ) - logger.info "Package #{package} is frozen, can not proceed with install package call." - puts "\nPackage #{package} is frozen, can not proceed with install package call." - return false - end - - # TODO: check deps - - # add to install queue. - puts "\n*** Adding #{package} to the INSTALL QUEUE. ***" if ( verbose ) - - if ( !queuer.action_package_queue( package, "install", "add" ) ) - logger.info( "Failed to add #{package} to install queue." ) - return false - end - - # pre section. - puts "\n*** Processing the PRE section for #{package}. ***" if (verbose ) - - if ( !sw.pre ) - logger.info( "Failed to process pre-section in the package description of #{package}." ) - return false - else - logger.info( "Finished #{package} pre section." ) - end - - # configure section. - puts "\n*** Processing the CONFIGURE section for #{package}. ***" if ( verbose ) - - if ( !sw.configure( verbose ) ) - logger.info( "Failed to process configure section in the package description of #{package}." ) - return false - else - logger.info( "Finished #{package} configure section." ) - end - - # build section. - puts "\n*** Processing the BUILD section for #{package}. ***" if ( verbose ) - - if ( !sw.build( verbose ) ) - logger.info( "Failed to process build section in the package description of #{package}." ) - return false - else - if ( !myLogger.log_package_build( sw.name.downcase ) ) - logger.info( "Failed to create a package build log." ) - return false - end - logger.info( "Finished #{package} build section." ) - end - - # preinstall section. - puts "\n*** Processing the PREINSTALL section for #{package}. ***" if ( verbose ) - - if ( !sw.preinstall ) - logger.info( "Failed to process preinstall section in the package description of #{package}." ) - return false - else - logger.info( "Finished #{package} preinstall section." ) - end - - # install section. - puts "\n*** Processing the INSTALL section for #{package}. ***" if ( verbose ) - - if ( !sw.install ) - # rollback installed files if any and remove install log. - logger.info( "Failed to process install section in the package description of #{package}." ) - myLogger.log_package_install( sw.name.downcase ) - logger.info( "***Starting rollback of #{package} install and removing install log." ) - roll_back( "install", details ) - return false - else - myLogger.log_package_install( sw.name.downcase ) - myLogger.log_package_integrity( sw.name.downcase ) - - # cleanup tmp files from installwatch. - File.delete( "#{$ABT_TMP}/#{details['Source location']}.watch" ) - - logger.info( "Finished #{package} install section." ) - end - - # post section. - puts "\n*** Processing the POST section for #{package}. ***" if ( verbose ) - - if ( !sw.post ) - logger.info( "Failed to process post section in the package description of #{package}." ) - return false - else - logger.info( "Finished #{package} post section." ) - end - - # clean out build sources. - puts "\n*** Cleaning up the sources for #{package}. ***" if ( verbose ) - - if ( !sw.remove_build ) - logger.info( "Failed to remove the build sources for #{package}." ) - #return false # commented out as this is not a reason to fail. - end - - # remove pacakge from install queue. - if ( !queuer.action_package_queue( sw.name.downcase, "install", "remove" ) ) - logger.info( "Failed to remove #{sw.name.downcase} from install queue." ) - end - - return true # install completed! - end - - # TODO: add install_cached_package( package ) - - ## - # Reinstalls a given package. - # - # <b>PARAM</b> <i>String</i> - the name of the package to be reinstalled. - # <b>PARAM</b> <i>Boolean</i> - query the user if false (default), otherwise true and skip query. - # - # <b>RETURN</b> <i>boolean</i> - True if the package is reinstalled, - # otherwise false. - ## - def reinstall_package( package, automated_build=false ) - logger = Logger.new( $JOURNAL ) - # TODO: look into refactoring myLogger: - myLogger = AbtLogManager.new - system = AbtSystemManager.new - - # check for frozen. - if ( system.package_frozen( package ) ) - logger.info "Package #{package} is frozen, can not proceed with reinstall package call." - puts "\nPackage #{package} is frozen, can not proceed with reinstall package call." - return false - end - - # check if already installed. - if ( system.package_installed( package ) ) - - if !automated_build - puts "\n*** Package #{package} is already installed! ***\n" - puts "Are you sure you want to proceed with a reinstall? (y/n)" - - while answer = STDIN.gets - answer.chomp! - if answer == "y" - break - elsif answer == "n" - exit - else - puts "Are you sure you want to reinstall #{package}? (y/n)" - end - end - end - else - puts "\n*** Package #{package} is not installed, we will install it for you now! ***\n" - puts "Hit enter to continue..." - while continue = STDIN.gets - continue.chomp! - break - end - end - - if ( install_package( package ) ) - puts "\n\n" - puts "*** Completed reinstall of #{package}. ***" - puts "\n\n" - logger.info( "Completed reinstall of #{package}." ) - - if ( myLogger.cache_package( package ) ) - puts "\n\n" - puts "*** Completed caching of package #{package}. ***" - puts "\n\n" - logger.info( "Caching completed for package #{package}." ) - return true - else - logger.info( "Caching of package #{package} failed.") - end - end - - return false - end - - ## - # Removes a given package. - # - # <b>PARAM</b> <i>String</i> - the name of the package to be removed. - # - # <b>RETURN</b> <i>boolean</i> - True if the package is removed, otherwise - # false. - ## - def remove_package( package ) - require "#{$PACKAGE_PATH}#{package}" - sw = eval( "#{package.capitalize}.new" ) - # TODO: refactor myLogger. - myLogger = AbtLogManager.new - logger = Logger.new( $JOURNAL ) - system = AbtSystemManager.new - - # get package details. - details = sw.details - - # check for frozen. - if ( system.package_frozen( package ) ) - logger.info "Package #{package} is frozen, can not proceed with remove package call." - puts "\nPackage #{package} is frozen, can not proceed with remove package call." - return false - end - - # TODO: something with possible /etc or other configure files before removal, check maybe integrity for changes since install? - - # remove listings in install log. - installLog = myLogger.get_log( package, 'install' ) - - # only process install log if it exists, continue on with - # journal log warning. - if File.exist?( installLog ) - IO.foreach( installLog ) do |line| - if File.exist?( line.chomp ) - FileUtils.rm( line.chomp ) - logger.info( "Removed file #{line.chomp} from #{package} install log.") - else - logger.info( "Unable to remove #{line.chomp} from #{package} install log, does not exist.") - # do not return false, removed is ok, just put warning in journal log. - end - end - - logger.info( "Removed files from #{File.basename( installLog )} for #{package}." ) - else - puts "Install log missing for #{package}, see journal..." - logger.info( "Install log was missing for #{package}..." ) - logger.info( "...continuing to remove package from install listing, but might have files still installed on system." ) - end - - - # remove entry in install listing. - FileUtils.remove_dir( "#{$PACKAGE_INSTALLED}/#{details['Source location']}" ) - logger.info( "Removed entry from installed packages." ) - return true - end - - ## - # Downgrades a given package. - # - # <b>PARAM</b> <i>String</i> - the name of the package to be downgraded. - # - # <b>PARAM</b> <i>String</i> - the version number to be downgraded to. - # - # <b>RETURN</b> <i>boolean</i> - True if the package is downgraded, otherwise - # false. - ## - def downgrade_package( package, version ) - system = AbtSystemManager.new - logger = Logger.new( $JOURNAL ) - - # check for frozen. - if ( system.package_frozen( package ) ) - logger.info "Package #{package} is frozen, can not proceed with downgrade package call." - puts "\nPackage #{package} is frozen, can not proceed with downgrade package call." - return false - end - - return false - end - - ## - # Freezes a given package. If successful will add give package to the frozen - # list. If the given package is already frozen, it will be released. - # - # <b>PARAM</b> <i>String</i> - the name of the package to be frozen. - # - # <b>RETURN</b> <i>boolean</i> - True if the package is frozen, otherwise - # false. - ## - def freeze_package( package ) - require "#{$PACKAGE_PATH}#{package}" - sw = eval( "#{package.capitalize}.new" ) - myLogger = AbtLogManager.new # TODO: refactor myLogger. - logger = Logger.new( $JOURNAL ) - system = AbtSystemManager.new - - if ( system.package_installed( package ) ) - if ( system.package_frozen( package ) ) - logger.info( "Package #{package} is already frozen!" ) - - # package already frozen, need to un-freeze by removing frozen.log - # file. - FileUtils.rm "#{$PACKAGE_INSTALLED}/#{sw.srcDir}/frozen.log" - puts "\nPackage #{package} was frozen, it has now been relased for use." - logger.info "Package #{package} released : removed file #{$PACKAGE_INSTALLED}/#{sw.srcDir}/frozen.log" - else - # place file in $PACKAGE_INSTALLED frozen.log with date. - frozen = File.open( "#{$PACKAGE_INSTALLED}/#{sw.srcDir}/frozen.log", "w" ) - frozen.puts "#{$TIMESTAMP}" - frozen.close - logger.info( "Package #{package} is now frozen." ) - end - - return true - end - - logger.info( "Package #{package} is not installed, unable to freeze it." ) - return false - end - - ## - # Provides for a log through for root access using su. - # - # <b>PARAM</b> <i>Array</i> - the arguments passed to abt. - # - # <b>RETURN</b> <i>void</i> - ## - def root_login( arguments ) - if ( Process.uid != 0 ) - args = "" - puts "\nYou need to be root for accessing the requested functionality.\n" - puts "\nEnter root password:" - - for i in 0...ARGV.length - args = args + " " + ARGV[i] - end - - system( 'su -c "./abt ' + args + '" root' ) - exit - end - end -end Deleted: src/trunk/abtqueuemanager.rb =================================================================== --- src/trunk/abtqueuemanager.rb 2007-12-31 14:26:27 UTC (rev 466) +++ src/trunk/abtqueuemanager.rb 2007-12-31 14:27:06 UTC (rev 467) @@ -1,113 +0,0 @@ -#!/usr/bin/ruby -w - -## -# abtqueuemanager.rb -# -# AbtQueueManager class handles all AbTLinux queue interaction. -# -# 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 AbtQueueManager - - protected - - private - - public - - ## - # Constructor for the AbtQueueManager class. - # - # <b>RETURN</b> <i>AbtQueueManager</i> - an initialized - # AbtQueueManager object. - ## - def initialize - end - - ## - # Add/Remove a given package to the given queue. - # If adding a package already in the queue then it will not - # be added twice and return succes. - # - # <b>PARAM</b> <i>String</i> - the package to be added/removed. - # <b>PARAM</b> <i>String</i> - the queue. - # - # <b>RETURN</b> <i>boolean</i> - true if action succeeds, otherwise false. - ## - def action_package_queue( package, queue, action="add" ) - require 'fileutils' - logger = Logger.new( $JOURNAL ) - queueFile = "" # used to hold the queue location. - - # want to name install queue differently from log files. - if ( queue == 'install' ) - queueFile = "#{$ABT_LOGS}/#{queue}.queue" - else - queueFile = "#{$ABT_LOGS}/#{queue}.log" - end - - if ( action == "add") - if ( - log = File.new( queueFile, File::WRONLY|File::APPEND|File::CREAT, 0644 ) ) - # pickup queue contents to ensure no duplicates. - checkingQueue = IO.readlines( queueFile ) - - # check if package exists, otherwise add. - if ( - !checkingQueue.collect{ |i| i.split( '|' )[0] }.include?( - package ) ) - log.puts "#{package}|#{$TIMESTAMP}" - logger.info( "Added #{package} to #{queue} queue." ) - else - logger.info( "Did not add #{package} to #{queue}, already exists." ) - end - - log.close - return true - end - end - - if ( action == "remove" ) - # remove entry from given queue. - if ( - log = File.new( queueFile, File::WRONLY|File::APPEND|File::CREAT, 0644 ) ) - # use temp file to filter out entry to be removed. - temp = File.new(queueFile + ".tmp", "a+") - - # now check for line to be removed. - IO.foreach( queueFile ) do |line| - entryName = line.split( '|' )[0] - if ( entryName != package.downcase ) - temp.puts line - end - end - - temp.close - FileUtils.mv( temp.path, queueFile ) - end - - log.close - return true - end - - logger.info( "Failed to open #{queueFile}." ) - return false - end -end Deleted: src/trunk/abtreportmanager.rb =================================================================== --- src/trunk/abtreportmanager.rb 2007-12-31 14:26:27 UTC (rev 466) +++ src/trunk/abtreportmanager.rb 2007-12-31 14:27:06 UTC (rev 467) @@ -1,338 +0,0 @@ -#!/usr/bin/ruby -w - -## -# abtreportmanager.rb -# -# AbtReportManager class handles all sort of report and query generation within -# the AbTLinux system. -# -# 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 AbtReportManager - - protected - - private - - public - - ## - # Constructor for the AbtReportManager. - # - # <b>RETURN</b> <i>AbtReportManager</i> - an initialized - # Report1Manager object. - ## - def initialize - end - - ## - # Display all data for a given package. - # - # <b>PARAM</b> <i>String</i> - Package name. - # - # <b>RETURN</b> <i>boolean</i> - True if completes without error, - # otherwise false. - ## - def show_package_details( package ) - require "#{$PACKAGE_PATH}#{package}" - - if ( package = eval( "#{package.capitalize}.new" ) ) - details = package.details - - puts "|=====================================" - puts "| Package name\t: #{details['Package name']}" - details.delete( "Package name" ) - puts "| Version\t: #{details['Version']}" - details.delete( "Version" ) - puts "| Homepage\t: #{details['Homepage']}" - details.delete( "Homepage" ) - puts "| Executable\t: #{details['Executable']}" - details.delete( "Executable" ) - puts "| Source uri\t: #{details['Source uri']}" - details.delete( "Source uri" ) - puts "| Description\t: #{details['Description']}" - details.delete( "Description" ) - puts "|=====================================" - puts "|=====================================" - - details.each do |name, value| - print "| #{name}\t" - - if ( name.length < 14 ) - print "\t" - end - - puts ": #{value}" - end - - puts "|=====================================" - return true - end - - logger.debug( "[AbtReportManger::showPackageDetails] - failed to show details for ${package}." ) - return false - end - - ## - # Display all packages installed and tracked by AbTLinux. - # - # <b>RETURN</b> <i>void.</i> - ## - def show_installed_packages - if ( Dir.entries( $PACKAGE_INSTALLED ) - [ '.', '..' ] ).empty? - puts "\nNo AbTLinux packages are listed as installed, is your #{$PACKAGE_INSTALLED} empty?\n\n" - else - puts "\nInstalled AbTLinux packages:" - puts "============================" - Dir.foreach( $PACKAGE_INSTALLED ) { |package| puts package if package != "." && package != ".." } - puts "\n" - end - end - - ## - # Display the contents of the requested log for a given package. Possible - # log types are; configure, install, build and integrity. This method will return nothing - # if the package log is not installed. - # - # <b>PARAM</b> <i>String</i> - Package name. - # - # <b>PARAM</b> <i>String</i> - log type. - # - # <b>RETURN</b> <i>void.</i> - ## - def show_package_log( package, logType ) - system = AbtSystemManager.new - logger = AbtLogManager.new - - # just return if package not installed, up to - # caller to message the user about why. - if !system.package_installed( package ) - return - end - - File.open( logger.get_log( package, logType ) ).each { |line| puts line } - end - - ## - # Display a list of the packages found in the frozen list. - # - # <b>RETURN</b> <i>hash</i> - a hash of the frozen packages, keys are package - # names and values are the frozen timestamps. - ## - def show_frozen_packages - - # determine if there are frozen pacakges. - frozenHash = Hash.new # has for values found. - - if ( Dir.entries( $PACKAGE_INSTALLED ) - [ '.', '..' ] ).empty? - return Hash.new # empty hash, no entries. - else - Dir.foreach( $PACKAGE_INSTALLED ) { |package| - if ( package != "." && package != "..") - # split the installed entry into two parts, - # the package name and the version number. - #packageArray = package.split( "-" ) - #packageName = packageArray[0] - - # check for frozen log file. - if ( File.exist?( "#{$PACKAGE_INSTALLED}/#{package}/frozen.log" ) ) - # dump packgae + frozen.log timestamp in packageHash. - begin - file = File.new("#{$PACKAGE_INSTALLED}/#{package}/frozen.log", "r") - #while (line = file.gets) - line = file.gets - frozenHash = frozenHash.merge( Hash[ "#{package}" => "#{line}" ] ) - #end - file.close - rescue => error - puts "Exception: #{error}" - return false - end - end - end - } - end - - return frozenHash - end - - ## - # Provides access to dependency checking via the AbTLinux DepEngine. (This - # portal to the DepEngine will be expanded in apart sub-project, more - # details at a later date.) - # - # <b>PARAM</b> <i>String</i> - Package name. - # - # <b>RETURN</b> <i>hash</i> - Empty hash if no problems found, otherwise - # hash of problem files and their encountered errors. - ## - def show_package_dependencies( package ) - # TODO: implement this. - return false - end - - ## - # Display all files not part of any installed AbTLinux package. This - # delivers a list of files that are not tracked by AbTLinux package - # management. - # - # <b>RETURN</b> <i>void.</i> - ## - def show_untracked_files - # TODO: implement this. - return false - end - - ## - # Display the AbTLinux journal file. - # - # <b> PARAM</b> <i>string</i> The complete path of the file to display. - # - # <b>RETURN</b> <i>iboolean</i> True if journal shown, otherwise false. - ## - def show_journal( fileName ) - if ( File.exist?( fileName ) ) - puts "\n\n" - puts "AbTLinux log:" - puts "=============" - log = IO.readlines( fileName ) - log.each{ |entry| puts entry } - puts "\n\n" - else - puts "\n\n" - puts "AbtLinux log ( #{File.basename( fileName )} ) " + - "is empty at this time." - puts "\n\n" - end - - return true - end - - ## - # Display the name of the package(s) that own the given file. - # - # <b>PARAM</b> <i>String</i> - a file name. - # - # <b>RETURN</b> <i>void.</i> - ## - def show_file_owner( file ) - # TODO: implement this. - return false - end - - ## - # Searches the installed package trees package descriptions for matching - # occurrances of the given search text. - # - # <b>PARAM</b> <i>String</i> - a search text. - # - # <b>RETURN</b> <i>hash</i> - a hash of the search results, keys are package - # names and values are matching descriptions. - ## - def search_package_descriptions( searchText ) - packageHash = Hash.new # has for values found. - - if ( Dir.entries( $PACKAGE_INSTALLED ) - [ '.', '..' ] ).empty? - return packageHash # empty hash, no entries. - else - Dir.foreach( $PACKAGE_INSTALLED ) { |package| - if ( package != "." && package != "..") - # split the installed entry into two parts, - # the package name and the version number. - packageArray = package.split( "-" ) - packageName = packageArray[0] - - # check for match to name and description if the package file exists. - if ( File.exist?( "#{$PACKAGE_PATH}#{packageName}.rb" ) ) - require "#{$PACKAGE_PATH}#{packageName}" - sw = eval( "#{packageName.capitalize}.new" ) - - # add if matches name or description entries. - matchesArray = sw.description.scan( searchText ) - matchesArray = matchesArray.concat( packageName.scan( searchText ) ) - - if ( matchesArray.length > 0 ) - # matches so add to hash. - packageHash = packageHash.merge( Hash[ "#{package}" => "#{sw.description}" ] ) - end - end - end - } - end - - # finished search results. - return packageHash - end - - ## - # Displays the contents of the current queue based on the given queue. - # - # <b>PARAM</b> <i>String</i> - the type of queue to display such as install - # queue. - # - # <b>RETURN</b> <i>void.</i> - ## - def show_queue( queueType ) - - case queueType - - when "install" - if ( File.exist?( "#{$ABT_LOGS}/#{queueType}.queue" ) ) - puts "\n\n" - puts "AbTLinux #{queueType} queue:" - puts "=======================" - queue = IO.readlines( "#{$ABT_LOGS}/#{queueType}.queue" ) - queue.each{ |entry| puts entry } - puts "\n\n" - else - puts "\n\n" - puts "AbtLinux #{queueType} is empty at this time." - puts "\n\n" - end - else - puts "#{queueType.capitalize} is not an AbTLinux queue." - end - end - - ## - # Reports available updates for a given package or package tree based on the - # current system. - # - # <b>PARAM</b> <i>String</i> - the target of the update check, either a - # package name or a package tree name. - # - # <b>RETURN</b> <i>boolean</i> - True if completes without error, otherwise - # false. - ## - def show_updates( target ) - # TODO: implement this. - return false - end - - ## - # Generates an HTML page of installed packages from installed packages list. - # - # <b>RETURN</b> <i>void.</i> - ## - def generate_HTML_package_listing - # TODO: implement this. - return false - end -end Deleted: src/trunk/abtsystemmanager.rb =================================================================== --- src/trunk/abtsystemmanager.rb 2007-12-31 14:26:27 UTC (rev 466) +++ src/trunk/abtsystemmanager.rb 2007-12-31 14:27:06 UTC (rev 467) @@ -1,324 +0,0 @@ -#!/usr/bin/ruby -w - -## -# abtsystemmanager.rb -# -# AbtSystemManager class handles all aspects of the AbTLinux system. It takes -# care of such tasks as cleanup, fixing, verification and management ... [truncated message content] |
From: <esc...@us...> - 2007-12-31 14:26:28
|
Revision: 466 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=466&view=rev Author: eschabell Date: 2007-12-31 06:26:27 -0800 (Mon, 31 Dec 2007) Log Message: ----------- Implemented auto fix/setup of configuration and libs. This includes setting load paths and loading. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2007-12-31 14:08:51 UTC (rev 465) +++ src/trunk/abt.rb 2007-12-31 14:26:27 UTC (rev 466) @@ -1,8 +1,5 @@ #!/usr/bin/ruby -w -$LOAD_PATH.unshift '/etc/abt/' -$LOAD_PATH.unshift '/var/lib/abt/' - ## # abt.rb # @@ -29,15 +26,18 @@ ## # Load our central configuration file. +# $ABTLINUX_MAIN_CONFIG = "https://abtlinux.svn.sourceforge.net/svnroot/abtlinux/src/trunk/abtconfig.rb" if File.exist?( "/etc/abt/abtconfig.rb" ) - load '/etc/abt/abtconfig.rb' + $LOAD_PATH.unshift '/etc/abt/' + load 'abtconfig.rb' else # missing configuration file, do some abt update? puts "\nMissing our main configuration file at /etc/abt/abtconfig.rb" puts "\nMaybe time for an abt update? Let us try to fix it for you!\n" - # TODO: check for root login. + + # check for root login. if ( Process.uid != 0 ) puts "\nMust be root to fix configuration files." exit @@ -49,10 +49,36 @@ end } system( "svn export #{$ABTLINUX_MAIN_CONFIG} /etc/abt/abtconfig.rb" ) - exit end + + $LOAD_PATH.unshift '/etc/abt/' + load 'abtconfig.rb' + + if File.exist?( "/etc/abt/local/localconfig.rb" ) + $LOAD_PATH.unshift '/etc/abt/local/' + load 'localconfig.rb' + end end +# Check and install our library files. +# +$ABTLINUX_CLASS_LIBS = "https://abtlinux.svn.sourceforge.net/svnroot/abtlinux/src/trunk/libs" + +if ( ! File.directory?( '/var/lib/abt' ) || Dir["/var/lib/abt"].empty? ) + puts "\nMissing needed AbTLinux library files at /var/lib/abt" + puts "\nMaybe time for an abt update? Let us try to fix it for you!\n" + + # check for root login. + if ( Process.uid != 0 ) + puts "\nMust be root to fix library files." + exit + else + system( "svn co #{$ABTLINUX_CLASS_LIBS} /var/lib/abt/" ) + end + + $LOAD_PATH.unshift '/var/lib/abt/' +end + ## # Setup needed classes and get ready to parse arguments. ## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2007-12-31 14:09:17
|
Revision: 465 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=465&view=rev Author: eschabell Date: 2007-12-31 06:08:51 -0800 (Mon, 31 Dec 2007) Log Message: ----------- Updated path for documentation generation. Modified Paths: -------------- src/trunk/docgen.sh Modified: src/trunk/docgen.sh =================================================================== --- src/trunk/docgen.sh 2007-12-31 14:08:19 UTC (rev 464) +++ src/trunk/docgen.sh 2007-12-31 14:08:51 UTC (rev 465) @@ -16,23 +16,23 @@ #=============================================================================== TEMPLATE="./abttemplate.rb"; -FILES="abtdepengine.rb - abtdownloadmanager.rb - abtlogmanager.rb - abtpackage.rb - abtpackagemanager.rb - abtqueuemanager.rb - abtreportmanager.rb - abtsystemmanager.rb - abtusage.rb - testabtdepengine.rb - testabtdownloadmanager.rb - testabtlogmanager.rb - testabtpackage.rb - testabtpackagemanager.rb - testabtqueuemanager.rb - testabtreportmanager.rb - testabtsystemmanager.rb +FILES="./libs/abtdepengine.rb + ./libs/abtdownloadmanager.rb + ./libs/abtlogmanager.rb + ./libs/abtpackage.rb + ./libs/abtpackagemanager.rb + ./libs/abtqueuemanager.rb + ./libs/abtreportmanager.rb + ./libs/abtsystemmanager.rb + ./libs/abtusage.rb + ./tests/testabtdepengine.rb + ./tests/testabtdownloadmanager.rb + ./tests/testabtlogmanager.rb + ./tests/testabtpackage.rb + ./tests/testabtpackagemanager.rb + ./tests/testabtqueuemanager.rb + ./tests/testabtreportmanager.rb + ./tests/testabtsystemmanager.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...> - 2007-12-31 14:08:42
|
Revision: 464 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=464&view=rev Author: eschabell Date: 2007-12-31 06:08:19 -0800 (Mon, 31 Dec 2007) Log Message: ----------- Updated load path after libs move. Modified Paths: -------------- src/trunk/abtconfig.rb Modified: src/trunk/abtconfig.rb =================================================================== --- src/trunk/abtconfig.rb 2007-12-31 14:07:13 UTC (rev 463) +++ src/trunk/abtconfig.rb 2007-12-31 14:08:19 UTC (rev 464) @@ -1,5 +1,7 @@ #!/usr/bin/ruby -w +$LOAD_PATH.unshift '/var/lib/abt/' +$LOAD_PATH.unshift './libs/' # for development. ## # abtconfig.rb # This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2007-12-31 14:07:10
|
Revision: 463 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=463&view=rev Author: eschabell Date: 2007-12-31 06:07:13 -0800 (Mon, 31 Dec 2007) Log Message: ----------- Updated load paths after libs move. Modified Paths: -------------- src/trunk/tests/testsuiteabt.rb Modified: src/trunk/tests/testsuiteabt.rb =================================================================== --- src/trunk/tests/testsuiteabt.rb 2007-12-31 14:05:23 UTC (rev 462) +++ src/trunk/tests/testsuiteabt.rb 2007-12-31 14:07:13 UTC (rev 463) @@ -6,7 +6,8 @@ exit end -$LOAD_PATH.unshift '../' +$LOAD_PATH.unshift '/var/lib/abt/' +$LOAD_PATH.unshift '../libs/' # development only. require 'test/unit' require 'abtconfig' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2007-12-31 14:05:23
|
Revision: 462 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=462&view=rev Author: eschabell Date: 2007-12-31 06:05:23 -0800 (Mon, 31 Dec 2007) Log Message: ----------- Updated packages with load paths. Modified Paths: -------------- src/trunk/packages/fortune.rb src/trunk/packages/ipc.rb Modified: src/trunk/packages/fortune.rb =================================================================== --- src/trunk/packages/fortune.rb 2007-12-31 14:04:48 UTC (rev 461) +++ src/trunk/packages/fortune.rb 2007-12-31 14:05:23 UTC (rev 462) @@ -1,6 +1,7 @@ #!/usr/bin/ruby -w -$LOAD_PATH.unshift '../' +$LOAD_PATH.unshift '/var/lib/abt/' +$LOAD_PATH.unshift '../libs/' # development only. require "abtpackage" Modified: src/trunk/packages/ipc.rb =================================================================== --- src/trunk/packages/ipc.rb 2007-12-31 14:04:48 UTC (rev 461) +++ src/trunk/packages/ipc.rb 2007-12-31 14:05:23 UTC (rev 462) @@ -1,6 +1,7 @@ #!/usr/bin/ruby -w -$LOAD_PATH.unshift '../' +$LOAD_PATH.unshift '/var/lib/abt/' +$LOAD_PATH.unshift '../libs/' # development only. require 'abtpackage' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2007-12-31 14:04:49
|
Revision: 461 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=461&view=rev Author: eschabell Date: 2007-12-31 06:04:48 -0800 (Mon, 31 Dec 2007) Log Message: ----------- Regenerated api docs. Modified Paths: -------------- src/trunk/doc/classes/AbtDepEngine.html src/trunk/doc/classes/AbtDownloadManager.html src/trunk/doc/classes/AbtLogManager.html src/trunk/doc/classes/AbtPackage.html src/trunk/doc/classes/AbtPackageManager.html src/trunk/doc/classes/AbtQueueManager.html src/trunk/doc/classes/AbtReportManager.html src/trunk/doc/classes/AbtSystemManager.html src/trunk/doc/classes/AbtUsage.html src/trunk/doc/classes/TestAbtDepEngine.html src/trunk/doc/classes/TestAbtDownloadManager.html src/trunk/doc/classes/TestAbtLogManager.html src/trunk/doc/classes/TestAbtPackage.html src/trunk/doc/classes/TestAbtPackageManager.html src/trunk/doc/classes/TestAbtQueueManager.html src/trunk/doc/classes/TestAbtReportManager.html src/trunk/doc/classes/TestAbtSystemManager.html src/trunk/doc/created.rid src/trunk/doc/dot/f_0.dot src/trunk/doc/dot/f_0.png src/trunk/doc/dot/f_1.dot src/trunk/doc/dot/f_1.png src/trunk/doc/dot/f_10.dot src/trunk/doc/dot/f_10.png src/trunk/doc/dot/f_11.dot src/trunk/doc/dot/f_11.png src/trunk/doc/dot/f_12.dot src/trunk/doc/dot/f_12.png src/trunk/doc/dot/f_13.dot src/trunk/doc/dot/f_13.png src/trunk/doc/dot/f_14.dot src/trunk/doc/dot/f_14.png src/trunk/doc/dot/f_15.dot src/trunk/doc/dot/f_15.png src/trunk/doc/dot/f_16.dot src/trunk/doc/dot/f_16.png src/trunk/doc/dot/f_2.dot src/trunk/doc/dot/f_2.png src/trunk/doc/dot/f_3.dot src/trunk/doc/dot/f_3.png src/trunk/doc/dot/f_4.dot src/trunk/doc/dot/f_4.png src/trunk/doc/dot/f_5.dot src/trunk/doc/dot/f_5.png src/trunk/doc/dot/f_6.dot src/trunk/doc/dot/f_6.png src/trunk/doc/dot/f_7.dot src/trunk/doc/dot/f_7.png src/trunk/doc/dot/f_8.dot src/trunk/doc/dot/f_8.png src/trunk/doc/dot/f_9.dot src/trunk/doc/dot/f_9.png src/trunk/doc/fr_file_index.html Modified: src/trunk/doc/classes/AbtDepEngine.html =================================================================== --- src/trunk/doc/classes/AbtDepEngine.html 2007-12-31 14:01:22 UTC (rev 460) +++ src/trunk/doc/classes/AbtDepEngine.html 2007-12-31 14:04:48 UTC (rev 461) @@ -57,7 +57,7 @@ <tr valign="top"> <td>In:</td> <td> -<a href="../files/abtdepengine_rb.html">abtdepengine.rb</a> +<a href="../files/libs/abtdepengine_rb.html">libs/abtdepengine.rb</a> </td> </tr> <tr> @@ -144,7 +144,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000094_source')" id="l_M000094_source">show source</a> ]</p> <div id="M000094_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtdepengine.rb, line 41</span> + <span class="ruby-comment cmt"># File libs/abtdepengine.rb, line 41</span> 41: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> 42: <span class="ruby-comment cmt"># TODO: implement this.</span> 43: <span class="ruby-keyword kw">end</span> Modified: src/trunk/doc/classes/AbtDownloadManager.html =================================================================== --- src/trunk/doc/classes/AbtDownloadManager.html 2007-12-31 14:01:22 UTC (rev 460) +++ src/trunk/doc/classes/AbtDownloadManager.html 2007-12-31 14:04:48 UTC (rev 461) @@ -57,7 +57,7 @@ <tr valign="top"> <td>In:</td> <td> -<a href="../files/abtdownloadmanager_rb.html">abtdownloadmanager.rb</a> +<a href="../files/libs/abtdownloadmanager_rb.html">libs/abtdownloadmanager.rb</a> </td> </tr> <tr> @@ -151,7 +151,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000012_source')" id="l_M000012_source">show source</a> ]</p> <div id="M000012_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtdownloadmanager.rb, line 42</span> + <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 42</span> 42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> 43: <span class="ruby-keyword kw">end</span> </pre> @@ -179,7 +179,7 @@ <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 122</span> + <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 122</span> 122: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieve_news_feed</span>( <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">cleanLog</span>=<span class="ruby-keyword kw">true</span> ) 123: <span class="ruby-identifier">require</span> <span class="ruby-value str">'net/http'</span> 124: <span class="ruby-identifier">require</span> <span class="ruby-value str">'uri'</span> @@ -252,7 +252,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000013_source')" id="l_M000013_source">show source</a> ]</p> <div id="M000013_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtdownloadmanager.rb, line 56</span> + <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 56</span> 56: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieve_package_source</span>( <span class="ruby-identifier">packageName</span>, <span class="ruby-identifier">destination</span> ) 57: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}#{packageName}"</span> 58: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) @@ -296,7 +296,7 @@ <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 83</span> + <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 83</span> 83: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieve_package_tree</span>( <span class="ruby-identifier">packageTreeName</span>=<span class="ruby-value str">"AbTLinux"</span> ) 84: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) 85: @@ -350,7 +350,7 @@ <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 176</span> + <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 176</span> 176: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_package</span>( <span class="ruby-identifier">packageName</span> ) 177: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) 178: @@ -402,7 +402,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000017_source')" id="l_M000017_source">show source</a> ]</p> <div id="M000017_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtdownloadmanager.rb, line 211</span> + <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 211</span> 211: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_package_tree</span>( <span class="ruby-identifier">packageTreeName</span>=<span class="ruby-value str">"AbTLinux"</span> ) 212: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) 213: @@ -455,7 +455,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000018_source')" id="l_M000018_source">show source</a> ]</p> <div id="M000018_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtdownloadmanager.rb, line 247</span> + <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 247</span> 247: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validated</span>( <span class="ruby-identifier">hashvalue</span>, <span class="ruby-identifier">path</span> ) 248: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">$JOURNAL</span> ) 249: Modified: src/trunk/doc/classes/AbtLogManager.html =================================================================== --- src/trunk/doc/classes/AbtLogManager.html 2007-12-31 14:01:22 UTC (rev 460) +++ src/trunk/doc/classes/AbtLogManager.html 2007-12-31 14:04:48 UTC (rev 461) @@ -57,7 +57,7 @@ <tr valign="top"> <td>In:</td> <td> -<a href="../files/abtlogmanager_rb.html">abtlogmanager.rb</a> +<a href="../files/libs/abtlogmanager_rb.html">libs/abtlogmanager.rb</a> </td> </tr> <tr> @@ -149,10 +149,10 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000065_source')" id="l_M000065_source">show source</a> ]</p> <div id="M000065_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtlogmanager.rb, line 80</span> + <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 80</span> 80: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> 81: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">$JOURNAL</span> ) -82: [<span class="ruby-identifier">$ABT_LOGS</span>, <span class="ruby-identifier">$ABT_CACHES</span>, <span class="ruby-identifier">$ABT_STATE</span>, <span class="ruby-identifier">$BUILD_LOCATION</span>, <span class="ruby-identifier">$PACKAGE_INSTALLED</span>, +82: [<span class="ruby-identifier">$ABT_LOGS</span>, <span class="ruby-identifier">$ABT_CACHES</span>, <span class="ruby-identifier">$ABT_STATE</span>, <span class="ruby-identifier">$BUILD_LOCATION</span>, <span class="ruby-identifier">$PACKAGE_INSTALLED</span>, <span class="ruby-identifier">$ABT_LIBS</span>, 83: <span class="ruby-identifier">$PACKAGE_CACHED</span>, <span class="ruby-identifier">$ABT_TMP</span>, <span class="ruby-identifier">$ABT_CONFIG</span>, <span class="ruby-identifier">$ABT_LOCAL_CONFIG</span>, <span class="ruby-identifier">$SOURCES_REPOSITORY</span>].<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">dir</span><span class="ruby-operator">|</span> 84: 85: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>( <span class="ruby-identifier">dir</span> ) ) @@ -187,7 +187,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000069_source')" id="l_M000069_source">show source</a> ]</p> <div id="M000069_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtlogmanager.rb, line 207</span> + <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 207</span> 207: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cache_package</span>( <span class="ruby-identifier">package</span> ) 208: <span class="ruby-identifier">system</span> = <span class="ruby-constant">AbtSystemManager</span>.<span class="ruby-identifier">new</span> 209: @@ -288,7 +288,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000064_source')" id="l_M000064_source">show source</a> ]</p> <div id="M000064_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtlogmanager.rb, line 43</span> + <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 43</span> 43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_log</span>( <span class="ruby-identifier">package</span>, <span class="ruby-identifier">type</span> ) 44: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}#{package}"</span> 45: <span class="ruby-identifier">sw</span> = <span class="ruby-identifier">eval</span>( <span class="ruby-node">"#{package.capitalize}.new"</span> ) @@ -343,7 +343,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000068_source')" id="l_M000068_source">show source</a> ]</p> <div id="M000068_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtlogmanager.rb, line 187</span> + <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 187</span> 187: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_package_build</span>( <span class="ruby-identifier">package</span> ) 188: <span class="ruby-identifier">buildLog</span> = <span class="ruby-identifier">get_log</span>( <span class="ruby-identifier">package</span>, <span class="ruby-value str">'build'</span> ) 189: @@ -379,7 +379,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000067_source')" id="l_M000067_source">show source</a> ]</p> <div id="M000067_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtlogmanager.rb, line 139</span> + <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 139</span> 139: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_package_install</span>( <span class="ruby-identifier">package</span> ) 140: <span class="ruby-comment cmt"># some dirs we will not add to an install log.</span> 141: <span class="ruby-identifier">excluded_pattern</span> = <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">new</span>( <span class="ruby-value str">"^(/dev|/proc|/tmp|/var/tmp|/usr/src|/sys)+"</span> ) @@ -444,7 +444,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000066_source')" id="l_M000066_source">show source</a> ]</p> <div id="M000066_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtlogmanager.rb, line 102</span> + <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 102</span> 102: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_package_integrity</span>( <span class="ruby-identifier">package</span> ) 103: 104: <span class="ruby-comment cmt"># our log locations.</span> Modified: src/trunk/doc/classes/AbtPackage.html =================================================================== --- src/trunk/doc/classes/AbtPackage.html 2007-12-31 14:01:22 UTC (rev 460) +++ src/trunk/doc/classes/AbtPackage.html 2007-12-31 14:04:48 UTC (rev 461) @@ -57,7 +57,7 @@ <tr valign="top"> <td>In:</td> <td> -<a href="../files/abtpackage_rb.html">abtpackage.rb</a> +<a href="../files/libs/abtpackage_rb.html">libs/abtpackage.rb</a> </td> </tr> <tr> @@ -320,7 +320,7 @@ <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 147</span> + <span class="ruby-comment cmt"># File libs/abtpackage.rb, line 147</span> 147: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>( <span class="ruby-identifier">data</span> ) 148: <span class="ruby-ivar">@name</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'name'</span>] 149: <span class="ruby-ivar">@execName</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'execName'</span>] @@ -366,7 +366,7 @@ <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 274</span> + <span class="ruby-comment cmt"># File libs/abtpackage.rb, line 274</span> 274: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build</span>( <span class="ruby-identifier">verbose</span>=<span class="ruby-keyword kw">true</span> ) 275: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">verbose</span> ) 276: <span class="ruby-identifier">command</span> = <span class="ruby-node">"make | tee #{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.build"</span> @@ -415,7 +415,7 @@ <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 246</span> + <span class="ruby-comment cmt"># File libs/abtpackage.rb, line 246</span> 246: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">configure</span>( <span class="ruby-identifier">verbose</span>=<span class="ruby-keyword kw">true</span> ) 247: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">verbose</span> ) 248: <span class="ruby-identifier">command</span> = <span class="ruby-node">"./configure --prefix=#{$DEFAULT_PREFIX} | tee #{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.configure"</span> @@ -455,7 +455,7 @@ <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 172</span> + <span class="ruby-comment cmt"># File libs/abtpackage.rb, line 172</span> 172: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">details</span> 173: <span class="ruby-keyword kw">return</span> { 174: <span class="ruby-value str">"Package name"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@name</span>, @@ -501,7 +501,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000033_source')" id="l_M000033_source">show source</a> ]</p> <div id="M000033_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtpackage.rb, line 318</span> + <span class="ruby-comment cmt"># File libs/abtpackage.rb, line 318</span> 318: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">install</span>( <span class="ruby-identifier">verbose</span>=<span class="ruby-keyword kw">true</span> ) 319: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">verbose</span> ) 320: <span class="ruby-identifier">command</span> = <span class="ruby-value str">"installwatch --transl=no --backup=no "</span> <span class="ruby-operator">+</span> @@ -549,7 +549,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000034_source')" id="l_M000034_source">show source</a> ]</p> <div id="M000034_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtpackage.rb, line 350</span> + <span class="ruby-comment cmt"># File libs/abtpackage.rb, line 350</span> 350: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post</span>( <span class="ruby-identifier">verbose</span>=<span class="ruby-keyword kw">true</span> ) 351: <span class="ruby-comment cmt"># TODO: implement post section install init scripts service</span> 352: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> @@ -580,7 +580,7 @@ <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 203</span> + <span class="ruby-comment cmt"># File libs/abtpackage.rb, line 203</span> 203: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pre</span>( <span class="ruby-identifier">verbose</span>=<span class="ruby-keyword kw">true</span> ) 204: <span class="ruby-identifier">downloader</span> = <span class="ruby-constant">AbtDownloadManager</span>.<span class="ruby-identifier">new</span> 205: @@ -636,7 +636,7 @@ <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 303</span> + <span class="ruby-comment cmt"># File libs/abtpackage.rb, line 303</span> 303: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">preinstall</span>( <span class="ruby-identifier">verbose</span>=<span class="ruby-keyword kw">true</span> ) 304: <span class="ruby-comment cmt"># TODO: preinstall section create_group?</span> 305: <span class="ruby-comment cmt"># TODO: preinstall section create_user?</span> @@ -664,7 +664,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000035_source')" id="l_M000035_source">show source</a> ]</p> <div id="M000035_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtpackage.rb, line 361</span> + <span class="ruby-comment cmt"># File libs/abtpackage.rb, line 361</span> 361: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove_build</span> 362: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"Removings build..."</span> 363: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">$REMOVE_BUILD_SOURCES</span> ) @@ -704,7 +704,7 @@ <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 40</span> + <span class="ruby-comment cmt"># File libs/abtpackage.rb, line 40</span> 40: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unpack_sources</span> 41: <span class="ruby-identifier">srcFile</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>( <span class="ruby-ivar">@srcUrl</span> ) 42: <span class="ruby-identifier">sourcesToUnpack</span> = <span class="ruby-node">"#{$SOURCES_REPOSITORY}/#{srcFile}"</span> Modified: src/trunk/doc/classes/AbtPackageManager.html =================================================================== --- src/trunk/doc/classes/AbtPackageManager.html 2007-12-31 14:01:22 UTC (rev 460) +++ src/trunk/doc/classes/AbtPackageManager.html 2007-12-31 14:04:48 UTC (rev 461) @@ -57,7 +57,7 @@ <tr valign="top"> <td>In:</td> <td> -<a href="../files/abtpackagemanager_rb.html">abtpackagemanager.rb</a> +<a href="../files/libs/abtpackagemanager_rb.html">libs/abtpackagemanager.rb</a> </td> </tr> <tr> @@ -151,7 +151,7 @@ <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 78</span> + <span class="ruby-comment cmt"># File libs/abtpackagemanager.rb, line 78</span> 78: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> 79: <span class="ruby-keyword kw">end</span> </pre> @@ -182,7 +182,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000047_source')" id="l_M000047_source">show source</a> ]</p> <div id="M000047_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtpackagemanager.rb, line 350</span> + <span class="ruby-comment cmt"># File libs/abtpackagemanager.rb, line 350</span> 350: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">downgrade_package</span>( <span class="ruby-identifier">package</span>, <span class="ruby-identifier">version</span> ) 351: <span class="ruby-identifier">system</span> = <span class="ruby-constant">AbtSystemManager</span>.<span class="ruby-identifier">new</span> 352: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">$JOURNAL</span> ) @@ -221,7 +221,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000048_source')" id="l_M000048_source">show source</a> ]</p> <div id="M000048_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtpackagemanager.rb, line 373</span> + <span class="ruby-comment cmt"># File libs/abtpackagemanager.rb, line 373</span> 373: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">freeze_package</span>( <span class="ruby-identifier">package</span> ) 374: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}#{package}"</span> 375: <span class="ruby-identifier">sw</span> = <span class="ruby-identifier">eval</span>( <span class="ruby-node">"#{package.capitalize}.new"</span> ) @@ -278,7 +278,7 @@ <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 91</span> + <span class="ruby-comment cmt"># File libs/abtpackagemanager.rb, line 91</span> 91: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">install_package</span>( <span class="ruby-identifier">package</span>, <span class="ruby-identifier">verbose</span>=<span class="ruby-keyword kw">true</span> ) 92: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}#{package}"</span> 93: <span class="ruby-identifier">sw</span> = <span class="ruby-identifier">eval</span>( <span class="ruby-node">"#{package.capitalize}.new"</span> ) @@ -424,7 +424,7 @@ <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 222</span> + <span class="ruby-comment cmt"># File libs/abtpackagemanager.rb, line 222</span> 222: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reinstall_package</span>( <span class="ruby-identifier">package</span>, <span class="ruby-identifier">automated_build</span>=<span class="ruby-keyword kw">false</span> ) 223: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">$JOURNAL</span> ) 224: <span class="ruby-comment cmt"># TODO: look into refactoring myLogger:</span> @@ -508,7 +508,7 @@ <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 290</span> + <span class="ruby-comment cmt"># File libs/abtpackagemanager.rb, line 290</span> 290: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove_package</span>( <span class="ruby-identifier">package</span> ) 291: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}#{package}"</span> 292: <span class="ruby-identifier">sw</span> = <span class="ruby-identifier">eval</span>( <span class="ruby-node">"#{package.capitalize}.new"</span> ) @@ -581,7 +581,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000049_source')" id="l_M000049_source">show source</a> ]</p> <div id="M000049_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtpackagemanager.rb, line 411</span> + <span class="ruby-comment cmt"># File libs/abtpackagemanager.rb, line 411</span> 411: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">root_login</span>( <span class="ruby-identifier">arguments</span> ) 412: <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> ) 413: <span class="ruby-identifier">args</span> = <span class="ruby-value str">""</span> Modified: src/trunk/doc/classes/AbtQueueManager.html =================================================================== --- src/trunk/doc/classes/AbtQueueManager.html 2007-12-31 14:01:22 UTC (rev 460) +++ src/trunk/doc/classes/AbtQueueManager.html 2007-12-31 14:04:48 UTC (rev 461) @@ -57,7 +57,7 @@ <tr valign="top"> <td>In:</td> <td> -<a href="../files/abtqueuemanager_rb.html">abtqueuemanager.rb</a> +<a href="../files/libs/abtqueuemanager_rb.html">libs/abtqueuemanager.rb</a> </td> </tr> <tr> @@ -145,7 +145,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000092_source')" id="l_M000092_source">show source</a> ]</p> <div id="M000092_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtqueuemanager.rb, line 41</span> + <span class="ruby-comment cmt"># File libs/abtqueuemanager.rb, line 41</span> 41: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> 42: <span class="ruby-keyword kw">end</span> </pre> @@ -174,7 +174,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000093_source')" id="l_M000093_source">show source</a> ]</p> <div id="M000093_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtqueuemanager.rb, line 54</span> + <span class="ruby-comment cmt"># File libs/abtqueuemanager.rb, line 54</span> 54: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">action_package_queue</span>( <span class="ruby-identifier">package</span>, <span class="ruby-identifier">queue</span>, <span class="ruby-identifier">action</span>=<span class="ruby-value str">"add"</span> ) 55: <span class="ruby-identifier">require</span> <span class="ruby-value str">'fileutils'</span> 56: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">$JOURNAL</span> ) Modified: src/trunk/doc/classes/AbtReportManager.html =================================================================== --- src/trunk/doc/classes/AbtReportManager.html 2007-12-31 14:01:22 UTC (rev 460) +++ src/trunk/doc/classes/AbtReportManager.html 2007-12-31 14:04:48 UTC (rev 461) @@ -57,7 +57,7 @@ <tr valign="top"> <td>In:</td> <td> -<a href="../files/abtreportmanager_rb.html">abtreportmanager.rb</a> +<a href="../files/libs/abtreportmanager_rb.html">libs/abtreportmanager.rb</a> </td> </tr> <tr> @@ -155,7 +155,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000113_source')" id="l_M000113_source">show source</a> ]</p> <div id="M000113_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtreportmanager.rb, line 42</span> + <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 42</span> 42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> 43: <span class="ruby-keyword kw">end</span> </pre> @@ -179,7 +179,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000125_source')" id="l_M000125_source">show source</a> ]</p> <div id="M000125_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtreportmanager.rb, line 334</span> + <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 334</span> 334: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generate_HTML_package_listing</span> 335: <span class="ruby-comment cmt"># TODO: implement this.</span> 336: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> @@ -209,7 +209,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000122_source')" id="l_M000122_source">show source</a> ]</p> <div id="M000122_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtreportmanager.rb, line 249</span> + <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 249</span> 249: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">search_package_descriptions</span>( <span class="ruby-identifier">searchText</span> ) 250: <span class="ruby-identifier">packageHash</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span> <span class="ruby-comment cmt"># has for values found.</span> 251: @@ -267,7 +267,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000121_source')" id="l_M000121_source">show source</a> ]</p> <div id="M000121_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtreportmanager.rb, line 235</span> + <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 235</span> 235: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_file_owner</span>( <span class="ruby-identifier">file</span> ) 236: <span class="ruby-comment cmt"># TODO: implement this.</span> 237: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> @@ -293,7 +293,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000117_source')" id="l_M000117_source">show source</a> ]</p> <div id="M000117_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtreportmanager.rb, line 139</span> + <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 139</span> 139: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_frozen_packages</span> 140: 141: <span class="ruby-comment cmt"># determine if there are frozen pacakges.</span> @@ -350,7 +350,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000115_source')" id="l_M000115_source">show source</a> ]</p> <div id="M000115_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtreportmanager.rb, line 98</span> + <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 98</span> 98: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_installed_packages</span> 99: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">entries</span>( <span class="ruby-identifier">$PACKAGE_INSTALLED</span> ) <span class="ruby-operator">-</span> [ <span class="ruby-value str">'.'</span>, <span class="ruby-value str">'..'</span> ] ).<span class="ruby-identifier">empty?</span> 100: <span class="ruby-identifier">puts</span> <span class="ruby-node">"\nNo AbTLinux packages are listed as installed, is your #{$PACKAGE_INSTALLED} empty?\n\n"</span> @@ -384,7 +384,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000120_source')" id="l_M000120_source">show source</a> ]</p> <div id="M000120_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtreportmanager.rb, line 210</span> + <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 210</span> 210: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_journal</span>( <span class="ruby-identifier">fileName</span> ) 211: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>( <span class="ruby-identifier">fileName</span> ) ) 212: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> @@ -428,7 +428,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000118_source')" id="l_M000118_source">show source</a> ]</p> <div id="M000118_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtreportmanager.rb, line 186</span> + <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 186</span> 186: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_package_dependencies</span>( <span class="ruby-identifier">package</span> ) 187: <span class="ruby-comment cmt"># TODO: implement this.</span> 188: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> @@ -457,7 +457,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000114_source')" id="l_M000114_source">show source</a> ]</p> <div id="M000114_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtreportmanager.rb, line 53</span> + <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 53</span> 53: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_package_details</span>( <span class="ruby-identifier">package</span> ) 54: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}#{package}"</span> 55: @@ -525,7 +525,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000116_source')" id="l_M000116_source">show source</a> ]</p> <div id="M000116_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtreportmanager.rb, line 120</span> + <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 120</span> 120: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_package_log</span>( <span class="ruby-identifier">package</span>, <span class="ruby-identifier">logType</span> ) 121: <span class="ruby-identifier">system</span> = <span class="ruby-constant">AbtSystemManager</span>.<span class="ruby-identifier">new</span> 122: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">AbtLogManager</span>.<span class="ruby-identifier">new</span> @@ -562,7 +562,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000123_source')" id="l_M000123_source">show source</a> ]</p> <div id="M000123_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtreportmanager.rb, line 292</span> + <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 292</span> 292: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_queue</span>( <span class="ruby-identifier">queueType</span> ) 293: 294: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">queueType</span> @@ -605,7 +605,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000119_source')" id="l_M000119_source">show source</a> ]</p> <div id="M000119_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtreportmanager.rb, line 198</span> + <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 198</span> 198: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_untracked_files</span> 199: <span class="ruby-comment cmt"># TODO: implement this.</span> 200: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> @@ -636,7 +636,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000124_source')" id="l_M000124_source">show source</a> ]</p> <div id="M000124_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtreportmanager.rb, line 324</span> + <span class="ruby-comment cmt"># File libs/abtreportmanager.rb, line 324</span> 324: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_updates</span>( <span class="ruby-identifier">target</span> ) 325: <span class="ruby-comment cmt"># TODO: implement this.</span> 326: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> Modified: src/trunk/doc/classes/AbtSystemManager.html =================================================================== --- src/trunk/doc/classes/AbtSystemManager.html 2007-12-31 14:01:22 UTC (rev 460) +++ src/trunk/doc/classes/AbtSystemManager.html 2007-12-31 14:04:48 UTC (rev 461) @@ -57,7 +57,7 @@ <tr valign="top"> <td>In:</td> <td> -<a href="../files/abtsystemmanager_rb.html">abtsystemmanager.rb</a> +<a href="../files/libs/abtsystemmanager_rb.html">libs/abtsystemmanager.rb</a> </td> </tr> <tr> @@ -155,7 +155,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000001_source')" id="l_M000001_source">show source</a> ]</p> <div id="M000001_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtsystemmanager.rb, line 68</span> + <span class="ruby-comment cmt"># File libs/abtsystemmanager.rb, line 68</span> 68: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> 69: <span class="ruby-keyword kw">end</span> </pre> @@ -185,7 +185,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000002_source')" id="l_M000002_source">show source</a> ]</p> <div id="M000002_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtsystemmanager.rb, line 81</span> + <span class="ruby-comment cmt"># File libs/abtsystemmanager.rb, line 81</span> 81: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cleanup_package_sources</span>( <span class="ruby-identifier">verbose</span>=<span class="ruby-keyword kw">true</span>) 82: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">$JOURNAL</span> ) 83: <span class="ruby-identifier">sourcesArray</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span> @@ -254,7 +254,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000007_source')" id="l_M000007_source">show source</a> ]</p> <div id="M000007_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtsystemmanager.rb, line 251</span> + <span class="ruby-comment cmt"># File libs/abtsystemmanager.rb, line 251</span> 251: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fix_package</span>( <span class="ruby-identifier">package</span> ) 252: <span class="ruby-comment cmt"># TODO: implement this.</span> 253: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> @@ -284,7 +284,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000011_source')" id="l_M000011_source">show source</a> ]</p> <div id="M000011_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtsystemmanager.rb, line 312</span> + <span class="ruby-comment cmt"># File libs/abtsystemmanager.rb, line 312</span> 312: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">package_frozen</span>( <span class="ruby-identifier">package</span> ) 313: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}#{package}"</span> 314: <span class="ruby-identifier">sw</span> = <span class="ruby-identifier">eval</span>( <span class="ruby-node">"#{package.capitalize}.new"</span> ) @@ -321,7 +321,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000010_source')" id="l_M000010_source">show source</a> ]</p> <div id="M000010_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtsystemmanager.rb, line 292</span> + <span class="ruby-comment cmt"># File libs/abtsystemmanager.rb, line 292</span> 292: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">package_installed</span>( <span class="ruby-identifier">package</span> ) 293: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}#{package}"</span> 294: <span class="ruby-identifier">sw</span> = <span class="ruby-identifier">eval</span>( <span class="ruby-node">"#{package.capitalize}.new"</span> ) @@ -356,7 +356,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000008_source')" id="l_M000008_source">show source</a> ]</p> <div id="M000008_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtsystemmanager.rb, line 264</span> + <span class="ruby-comment cmt"># File libs/abtsystemmanager.rb, line 264</span> 264: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_central_repo</span>( <span class="ruby-identifier">uri</span> ) 265: <span class="ruby-comment cmt"># TODO: implement this.</span> 266: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> @@ -386,7 +386,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000009_source')" id="l_M000009_source">show source</a> ]</p> <div id="M000009_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtsystemmanager.rb, line 278</span> + <span class="ruby-comment cmt"># File libs/abtsystemmanager.rb, line 278</span> 278: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_package_tree_location</span>( <span class="ruby-identifier">location</span> ) 279: <span class="ruby-comment cmt"># TODO: implement this.</span> 280: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> @@ -415,7 +415,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000003_source')" id="l_M000003_source">show source</a> ]</p> <div id="M000003_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtsystemmanager.rb, line 134</span> + <span class="ruby-comment cmt"># File libs/abtsystemmanager.rb, line 134</span> 134: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">verify_installed_files</span>( <span class="ruby-identifier">package</span> ) 135: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">$JOURNAL</span> ) 136: <span class="ruby-comment cmt"># TODO: refactor myLogger:</span> @@ -467,7 +467,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000005_source')" id="l_M000005_source">show source</a> ]</p> <div id="M000005_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtsystemmanager.rb, line 183</span> + <span class="ruby-comment cmt"># File libs/abtsystemmanager.rb, line 183</span> 183: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">verify_package_depends</span>( <span class="ruby-identifier">package</span> ) 184: <span class="ruby-comment cmt"># TODO: implement this.</span> 185: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> @@ -498,7 +498,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000006_source')" id="l_M000006_source">show source</a> ]</p> <div id="M000006_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtsystemmanager.rb, line 198</span> + <span class="ruby-comment cmt"># File libs/abtsystemmanager.rb, line 198</span> 198: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">verify_package_integrity</span>( <span class="ruby-identifier">package</span> ) 199: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}#{package}"</span> 200: <span class="ruby-identifier">sw</span> = <span class="ruby-identifier">eval</span>( <span class="ruby-node">"#{package.capitalize}.new"</span> ) @@ -567,7 +567,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000004_source')" id="l_M000004_source">show source</a> ]</p> <div id="M000004_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtsystemmanager.rb, line 170</span> + <span class="ruby-comment cmt"># File libs/abtsystemmanager.rb, line 170</span> 170: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">verify_symlinks</span>( <span class="ruby-identifier">package</span> ) 171: <span class="ruby-comment cmt"># TODO: implement this.</span> 172: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> Modified: src/trunk/doc/classes/AbtUsage.html =================================================================== --- src/trunk/doc/classes/AbtUsage.html 2007-12-31 14:01:22 UTC (rev 460) +++ src/trunk/doc/classes/AbtUsage.html 2007-12-31 14:04:48 UTC (rev 461) @@ -57,7 +57,7 @@ <tr valign="top"> <td>In:</td> <td> -<a href="../files/abtusage_rb.html">abtusage.rb</a> +<a href="../files/libs/abtusage_rb.html">libs/abtusage.rb</a> </td> </tr> <tr> @@ -152,7 +152,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000036_source')" id="l_M000036_source">show source</a> ]</p> <div id="M000036_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtusage.rb, line 36</span> + <span class="ruby-comment cmt"># File libs/abtusage.rb, line 36</span> 36: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usage</span>( <span class="ruby-identifier">section</span> ) 37: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"Usage: abt.rb [options]\n\n"</span> 38: @@ -206,7 +206,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000040_source')" id="l_M000040_source">show source</a> ]</p> <div id="M000040_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtusage.rb, line 126</span> + <span class="ruby-comment cmt"># File libs/abtusage.rb, line 126</span> 126: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usage_downloads</span> 127: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\ndownloads:"</span> 128: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" -d, download [package]\t\tRetrieve given package sources."</span> @@ -234,7 +234,7 @@ <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 abtusage.rb, line 138</span> + <span class="ruby-comment cmt"># File libs/abtusage.rb, line 138</span> 138: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usage_fix</span> 139: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\nfix:"</span> 140: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" purge-src\t\t\t\tRemove source caches for packages no longer installed."</span> @@ -265,7 +265,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000039_source')" id="l_M000039_source">show source</a> ]</p> <div id="M000039_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtusage.rb, line 114</span> + <span class="ruby-comment cmt"># File libs/abtusage.rb, line 114</span> 114: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usage_generation</span> 115: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\ngeneration:"</span> 116: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-updates\t\tShow a package listing with available update versions."</span> @@ -293,7 +293,7 @@ <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 abtusage.rb, line 153</span> + <span class="ruby-comment cmt"># File libs/abtusage.rb, line 153</span> 153: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usage_maintenance</span> 154: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\nmaintenance:"</span> 155: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" build-location [host]\t\tSets global location (default: localhost) for retrieving cached package builds."</span> @@ -323,7 +323,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000037_source')" id="l_M000037_source">show source</a> ]</p> <div id="M000037_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtusage.rb, line 74</span> + <span class="ruby-comment cmt"># File libs/abtusage.rb, line 74</span> 74: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usage_packages</span> 75: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\npackages:"</span> 76: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" -i, install [package]\t\tInstall given package."</span> @@ -354,7 +354,7 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000038_source')" id="l_M000038_source">show source</a> ]</p> <div id="M000038_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtusage.rb, line 89</span> + <span class="ruby-comment cmt"># File libs/abtusage.rb, line 89</span> 89: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usage_queries</span> 90: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\nqueries:"</span> 91: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" -s, search [string | regexp ]\tSearch package descriptions for given input."</span> Modified: src/trunk/doc/classes/TestAbtDepEngine.html =================================================================== --- src/trunk/doc/classes/TestAbtDepEngine.html 2007-12-31 14:01:22 UTC (rev 460) +++ src/trunk/doc/classes/TestAbtDepEngine.html 2007-12-31 14:04:48 UTC (rev 461) @@ -57,7 +57,7 @@ <tr valign="top"> <td>In:</td> <td> -<a href="../files/testabtdepengine_rb.html">testabtdepengine.rb</a> +<a href="../files/tests/testabtdepengine_rb.html">tests/testabtdepengine.rb</a> </td> </tr> <tr> @@ -142,10 +142,10 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000104_source')" id="l_M000104_source">show source</a> ]</p> <div id="M000104_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File testabtdepengine.rb, line 36</span> -36: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span> -37: <span class="ruby-ivar">@depEngine</span> = <span class="ruby-constant">AbtDepEngine</span>.<span class="ruby-identifier">new</span> -38: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File tests/testabtdepengine.rb, line 38</span> +38: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span> +39: <span class="ruby-ivar">@depEngine</span> = <span class="ruby-constant">AbtDepEngine</span>.<span class="ruby-identifier">new</span> +40: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -164,9 +164,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000105_source')" id="l_M000105_source">show source</a> ]</p> <div id="M000105_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File testabtdepengine.rb, line 43</span> -43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">teardown</span> -44: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File tests/testabtdepengine.rb, line 45</span> +45: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">teardown</span> +46: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -184,10 +184,10 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000106_source')" id="l_M000106_source">show source</a> ]</p> <div id="M000106_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File testabtdepengine.rb, line 49</span> -49: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_dep_engine</span> -50: <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">"test_dep_engine()"</span> ) -51: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File tests/testabtdepengine.rb, line 51</span> +51: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_dep_engine</span> +52: <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">"test_dep_engine()"</span> ) +53: <span class="ruby-keyword kw">end</span> </pre> </div> </div> Modified: src/trunk/doc/classes/TestAbtDownloadManager.html =================================================================== --- src/trunk/doc/classes/TestAbtDownloadManager.html 2007-12-31 14:01:22 UTC (rev 460) +++ src/trunk/doc/classes/TestAbtDownloadManager.html 2007-12-31 14:04:48 UTC (rev 461) @@ -57,7 +57,7 @@ <tr valign="top"> <td>In:</td> <td> -<a href="../files/testabtdownloadmanager_rb.html">testabtdownloadmanager.rb</a> +<a href="../files/tests/testabtdownloadmanager_rb.html">tests/testabtdownloadmanager.rb</a> </td> </tr> <tr> @@ -148,12 +148,12 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000084_source')" id="l_M000084_source">show source</a> ]</p> <div id="M000084_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File testabtdownloadmanager.rb, line 36</span> -36: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span> -37: <span class="ruby-ivar">@download</span> = <span class="ruby-constant">AbtDownloadManager</span>.<span class="ruby-identifier">new</span> -38: <span class="ruby-ivar">@manager</span> = <span class="ruby-constant">AbtPackageManager</span>.<span class="ruby-identifier">new</span> -39: <span class="ruby-ivar">@system</span> = <span class="ruby-constant">AbtSystemManager</span>.<span class="ruby-identifier">new</span> -40: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File tests/testabtdownloadmanager.rb, line 38</span> +38: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span> +39: <span class="ruby-ivar">@download</span> = <span class="ruby-constant">AbtDownloadManager</span>.<span class="ruby-identifier">new</span> +40: <span class="ruby-ivar">@manager</span> = <span class="ruby-constant">AbtPackageManager</span>.<span class="ruby-identifier">new</span> +41: <span class="ruby-ivar">@system</span> = <span class="ruby-constant">AbtSystemManager</sp... [truncated message content] |
From: <esc...@us...> - 2007-12-31 14:01:18
|
Revision: 460 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=460&view=rev Author: eschabell Date: 2007-12-31 06:01:22 -0800 (Mon, 31 Dec 2007) Log Message: ----------- Moved core class libs into libs directory, this facilitates installations. Added Paths: ----------- src/trunk/libs/ src/trunk/libs/abtdepengine.rb src/trunk/libs/abtdownloadmanager.rb src/trunk/libs/abtlogmanager.rb src/trunk/libs/abtpackage.rb src/trunk/libs/abtpackagemanager.rb src/trunk/libs/abtqueuemanager.rb src/trunk/libs/abtreportmanager.rb src/trunk/libs/abtsystemmanager.rb src/trunk/libs/abtusage.rb Copied: src/trunk/libs/abtdepengine.rb (from rev 459, src/trunk/abtdepengine.rb) =================================================================== --- src/trunk/libs/abtdepengine.rb (rev 0) +++ src/trunk/libs/abtdepengine.rb 2007-12-31 14:01:22 UTC (rev 460) @@ -0,0 +1,45 @@ +#!/usr/bin/ruby -w + +## +# abtdepengine.rb +# +# AbtDepEngine class handles all dependency aspects of the AbTLinux system. It is +# part of a sub-project with it's own requirements document. +# +# 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 AbtDepEngine + + protected + + private + + public + + ## + # Constructor for the AbtDepEngine class. + # + # <b>RETURN</b> <i>AbtDepEngine</i> - an initialized AbtDepEngine object. + ## + def initialize + # TODO: implement this. + end + +end Copied: src/trunk/libs/abtdownloadmanager.rb (from rev 459, src/trunk/abtdownloadmanager.rb) =================================================================== --- src/trunk/libs/abtdownloadmanager.rb (rev 0) +++ src/trunk/libs/abtdownloadmanager.rb 2007-12-31 14:01:22 UTC (rev 460) @@ -0,0 +1,260 @@ +#!/usr/bin/ruby -w + +## +# abtdownloadmanager.rb +# +# AbtDownloadManager class handles all downloading of components needed for +# AbTLinux. +# +# 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 AbtDownloadManager + + protected + + private + + public + + ## + # Constructor for the AbtDownloadManager class. + # + # <b>RETURN</b> <i>AbtDownloadManager</i> - an initialized + # AbtDownloadManager object. + ## + def initialize + end + + ## + # Downloads a given package source. If the file already exists, returns + # true as if download completed. + # + # <b>PARAM</b> <i>String</i> - the name of the package for which the source + # is to be downloaded. + # <b>PARAM</b> <i>String</i> - the path to the download destination. + # + # <b>RETURN</b> <i>boolean</i> - True if the package source has been + # downloaded, otherwise false. + ## + def retrieve_package_source( packageName, destination ) + require "#{$PACKAGE_PATH}#{packageName}" + logger = Logger.new($JOURNAL) + package = eval( packageName.capitalize + '.new' ) + + if ( File.exist?( "#{destination}/#{File.basename( package.srcUrl )}" ) ) + logger.info( "Download not needed, existing source found for #{packageName}" ) + return true + end + + Dir.chdir( destination ) + if ( system( "wget #{package.srcUrl}" ) ) + logger.info( "Download completed for #{packageName}" ) + return true + end + + return false # download failed. + end + + ## + # Downloads a given pacakge tree. + # + # <b>PARAM</b> <i>String</i> - the name of the package tree to be retrieved. + # + # <b>RETURN</b> <i>boolean</i> - True if the package tree is retrieved, + # otherwise false. + ## + def retrieve_package_tree( packageTreeName="AbTLinux" ) + logger = Logger.new($JOURNAL) + + # check if package tree exists. + if File.directory?( $PACKAGE_PATH ) + # check if svn directory. + if File.directory?( "#{$PACKAGE_PATH}.svn" ) + logger.info "Package tree #{packageTreeName} already installed." + return true + else + # package directory exists, but is not a valid tree. + logger.error "Package tree exists, but is not valid svn tree." + return false + end + + else + + # pacakge directory does not exist, svn co. + if system( "svn co #{$ABTLINUX_PACKAGES} #{$PACKAGE_PATH}" ) + logger.info "Package tree installed (svn co)" + else + logger.error "Package tree not installed (svn co), problems!" + return false + end + + end + + return true + end + + ## + # 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>boolean</i> - default is to emplty the log file, + # passing 'false' will append to news file. + # <b>RETURN</b> <i>boolean</i> - True if the AbTLinux news feed has been + # retrieved, otherwise false. + ## + def retrieve_news_feed( uri, cleanLog=true ) + require 'net/http' + require 'uri' + require 'rss/1.0' + require 'rss/2.0' + newsLog = "" + logger = Logger.new( $JOURNAL) + + # ensure we have our news logfile. + if ( cleanLog ) + newsLog = File.new( $ABTNEWS_LOG, "w+" ) + else + newsLog = File.new( $ABTNEWS_LOG, "a+" ) + end + + # pick up the abtlinux.org news feed. + if ( !news = Net::HTTP.get( URI.parse( uri ) ) ) + logger.info( "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.info( "Failed to display news feed as feed #{uri} is not RSS 1.0/2.0." ) + return false + else + newsLog << "*** #{rss.channel.title} ***\n" + + rss.items.each_with_index do |item, itemCount| + itemCount += 1 + newsLog << "#{itemCount} #{item.link} #{item.title}\n" + end + end + + newsLog << "\n\n" + newsLog.close + return true + + end + + ## + # Updates a given package with available patches (version updates). + # + # <b>PARAM</b> <i>String</i> - the name of the package to be updated. + # + # <b>RETURN</b> <i>boolean</i> - True if the given package has been updated, + # otherwise false. + ## + def update_package( packageName ) + logger = Logger.new($JOURNAL) + + # check if package exists in tree. + if File.exists?( "#{$PACKAGE_PATH}/#{packageName}.rb" ) + # check if svn directory. + if File.directory?( "#{$PACKAGE_PATH}.svn" ) + if system( "svn update #{$PACKAGE_PATH}/#{packageName.downcase}.rb" ) + logger.info "Package #{packageName.downcase} updated (svn update)" + else + logger.error "Package #{packageName.downcase} unable to update (svn update)." + return false + end + else + # package exists, but not an valid tree. + logger.error "Package #{packageName} exists, but not valid package tree (svn)." + return false + end + else + # package does not exist. + logger.error "Package is not installed, not possible to update!" + return false + end + + return true + end + + ## + # Updates the package tree. + # + # <b>PARAM</b> <i>String</i> - the name of the tree to be updated, defaults to AbTLinux repo. + # + # <b>RETURN</b> <i>boolean</i> - True if the package tree has been updated, + # otherwise false. + ## + def update_package_tree( packageTreeName="AbTLinux" ) + logger = Logger.new($JOURNAL) + + # check if package tree exists. + if File.directory?( $PACKAGE_PATH ) + # check if svn directory. + if File.directory?( "#{$PACKAGE_PATH}.svn" ) + if system( "svn update #{$PACKAGE_PATH}" ) + logger.info "Package tree updated (svn update)" + else + logger.error "Package tree unable to update (svn update)." + return false + end + else + # package directory exists, but is not a valid tree. + logger.error "Package tree exists, but is not valid svn tree." + return false + end + else + # package directory does not exist. + logger.error "Package tree not installed!" + return false + end + + return true + end + + ## + # Validates the sources based on package hash value. + # + # <b>PARAM</b> <i>String</i> - security hash value from the packages description. + # <b>PARAM</b> <i>String</i> - source tarball location to be checked. + # + # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, + # otherwise false. + ## + def validated( hashvalue, path ) + logger = Logger.new( $JOURNAL ) + + if hashvalue == Digest::SHA1.hexdigest( path ) + puts "Source hash validated successfully..." + logger.info( "Validated sources successfully..." ) + return true + end + + puts "Source hash failed validation..." + logger.info( "Validating sources failed..." ) + return false + end +end Copied: src/trunk/libs/abtlogmanager.rb (from rev 459, src/trunk/abtlogmanager.rb) =================================================================== --- src/trunk/libs/abtlogmanager.rb (rev 0) +++ src/trunk/libs/abtlogmanager.rb 2007-12-31 14:01:22 UTC (rev 460) @@ -0,0 +1,285 @@ +#!/usr/bin/ruby -w + +## +# abtlogmanager.rb +# +# AbtLogManager class handles all aspects of logging and access to existing logs +# within the AbTLinux system. +# +# 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 AbtLogManager + + protected + + private + + public + + ## + # Returns the path to given packages install log. + # + # <b>PARAM</b> <i>String</i> - Package name. + # + # <b>RETURN</b> <i>String</i> - Full path to install log. + ## + def get_log( package, type ) + require "#{$PACKAGE_PATH}#{package}" + sw = eval( "#{package.capitalize}.new" ) + details = sw.details + + case type + + when 'install' + log = "#{$PACKAGE_INSTALLED}/#{details['Source location']}/#{details['Source location']}.install" + + when 'integrity' + log = "#{$PACKAGE_INSTALLED}/#{details['Source location']}/#{details['Source location']}.integrity" + + when 'tmpinstall' + log = "#{$ABT_TMP}/#{details['Source location']}.watch" + + when 'build' + log = "#{$PACKAGE_INSTALLED}/#{details['Source location']}/#{details['Source location']}.build" + + when 'configure' + log = "#{$PACKAGE_INSTALLED}/#{details['Source location']}/#{details['Source location']}.configure" + + else + log = "" + + end + + return log + end + + ## + # Constructor for the AbtLogManager. It ensures all needed logs paths are + # initialized. + # + # + # <b>RETURN</b> <i>AbtLogManager</i> - an initialized AbtLogManager object. + ## + def initialize + logger = Logger.new( $JOURNAL ) + [$ABT_LOGS, $ABT_CACHES, $ABT_STATE, $BUILD_LOCATION, $PACKAGE_INSTALLED, $ABT_LIBS, + $PACKAGE_CACHED, $ABT_TMP, $ABT_CONFIG, $ABT_LOCAL_CONFIG, $SOURCES_REPOSITORY].each { |dir| + + if ( ! File.directory?( dir ) ) + FileUtils.mkdir_p( dir ) + logger.info( "Created directory: #{dir}." ) + end + } + end + + ## + # Provides logging of the integrity of all installed files for the given + # package. Will be called as part of the logging done during the install + # phase. + # + # <b>PARAM</b> <i>String</i> - Package name. + # + # <b>RETURN</b> <i>boolean</i> - True if integrity log created successfully, + # otherwise false. + ## + def log_package_integrity( package ) + + # our log locations. + installLog = get_log( package, 'install' ) + integrityLog = get_log( package, 'integrity' ) + + # get the installed files from the tmp file + # into our install log. + if ( File.exist?( installLog ) ) + installFile = open( installLog, 'r' ) + integrityFile = open( integrityLog, 'w' ) + + # get the integrity for each file, initially just permissions. + IO.foreach( installLog ) do |line| + status = File.stat( line.chomp ) + octal = sprintf( "%o", status.mode ) + integrityFile << "#{line.chomp}:#{octal}\n" + end + + installFile.close + integrityFile.close + else + return false # no install log! + end + + return true; + end + + ## + # Provides logging of all files installed by given package. Should be called + # as part of the install phase of the build. + # + # <b>PARAM</b> <i>String</i> - Package name. + # + # <b>RETURN</b> <i>boolean</i> - True if install log created successfully, + # otherwise false. + ## + def log_package_install( package ) + # some dirs we will not add to an install log. + excluded_pattern = Regexp.new( "^(/dev|/proc|/tmp|/var/tmp|/usr/src|/sys)+" ) + badLine = false # used to mark excluded lines from installwatch log. + + # our log locations. + installLog = get_log( package, 'install' ) + tmpInstallLog = get_log( package, 'tmpinstall' ) + + # get the installed files from the tmp file + # into our install log. + if ( File.exist?( tmpInstallLog ) ) + installFile = open( installLog, 'w') + + # include only the file names from open calls + # and not part of the excluded range of directories. + IO.foreach( tmpInstallLog ) do |line| + if ( line.split[1] == 'open' ) + if ( line.split[2] =~ excluded_pattern ) + badLine = true + else + badLine = false + end + + if ( !badLine ) + installFile << "#{line.split[2]}\n" + end + end + end + + installFile.close + else + # no tmp install file, thus no install running. + return false + end + + return true; + end + + ## + # Provides logging of all output produced during the build phase of the + # given package. Should be called as part of the install phase of the build. + # + # <b>PARAM</b> <i>String</i> - Package name. + # + # <b>RETURN</b> <i>boolean</i> - True if build log created successfully, + # otherwise false. + ## + def log_package_build( package ) + buildLog = get_log( package, 'build' ) + + # make sure the build file exists. + if ( !File.exist?( buildLog ) ) + return false + end + + return true + end + + ## + # Provides a complete log of the given packages build. Includes everything + # needed to duplicate the build at a later date. + # + # <b>PARAM</b> <i>String</i> - Package name. + # + # <b>RETURN</b> <i>boolean</i> - True if package cache created successfully, + # otherwise false. + ## + def cache_package( package ) + system = AbtSystemManager.new + + if ( system.package_installed( package ) ) + sw = eval( "#{package.capitalize}.new" ) + cachedDir = $PACKAGE_CACHED + "/" + sw.srcDir + sourcePath = $SOURCES_REPOSITORY + "/" + File.basename( sw.srcUrl ) + sourceFile = File.basename( sw.srcUrl ) + installLog = get_log( package, 'install' ) + buildLog = get_log( package, 'build' ) + configureLog = get_log( package, 'configure' ) + integrityLog = get_log( package, 'integrity' ) + packageFile = "#{$PACKAGE_PATH}#{package}.rb" + + + FileUtils.mkdir_p( cachedDir ) + + # collect package source. + if ( FileTest::exist?( sourcePath ) ) + FileUtils.copy_file( sourcePath, "#{cachedDir}/#{sourceFile}" ) + puts "\nCaching copy of #{package} source." + else + puts "\nUnable to cache copy of #{package} source." + end + + # collect package install log. + if ( FileTest::exist?( installLog ) ) + FileUtils.copy_file( installLog, "#{cachedDir}/#{sw.srcDir}.install" ) + puts "\nCaching copy of #{package} install log." + else + puts "\nUnable to cache copy of #{package} install log." + end + + # collect package build log. + if ( FileTest::exist?( buildLog ) ) + FileUtils.copy_file( buildLog, "#{cachedDir}/#{sw.srcDir}.build" ) + puts "\nCaching copy of #{package} build log." + else + puts "\nUnable to cache copy of #{package} build log." + end + + # collect package configure log. + if ( FileTest::exist?( configureLog ) ) + FileUtils.copy_file( configureLog, "#{cachedDir}/#{sw.srcDir}.configure" ) + puts "\nCaching copy of #{package} configure log." + else + puts "\nUnable to cache copy of #{package} configure log." + end + + # collect package integrity log. + if ( FileTest::exist?( integrityLog ) ) + FileUtils.copy_file( integrityLog, "#{cachedDir}/#{sw.srcDir}.integrity" ) + puts "\nCaching copy of #{package} integrity log." + else + puts "\nUnable to cache copy of #{package} integrity log." + end + + # collect package description (class file). + if ( FileTest::exist?( packageFile ) ) + FileUtils.copy_file( packageFile, "#{cachedDir}/#{package}.rb" ) + puts "\nCaching copy of #{package} package description." + else + puts "\nUnable to cache copy of #{package} package description, from location #{packageFile}" + end + + # tar and bzip this directory (package-cache-version.tar.bz2) + Dir.chdir( $PACKAGE_CACHED ) + if ( system( "tar -cf #{sw.srcDir}.tar #{sw.srcDir}" ) && + system( "bzip2 -f #{sw.srcDir}.tar" ) ) + # last but not least, remove our tarball directory + FileUtils.rm_rf( cachedDir ) + return true + end + end + + return false # package not installed, can't cache it. + end + +end Copied: src/trunk/libs/abtpackage.rb (from rev 459, src/trunk/abtpackage.rb) =================================================================== --- src/trunk/libs/abtpackage.rb (rev 0) +++ src/trunk/libs/abtpackage.rb 2007-12-31 14:01:22 UTC (rev 460) @@ -0,0 +1,377 @@ +#!/usr/bin/ruby -w + +## +# abtpackage.rb +# +# AbtPackage class provides an interface to AbtPackage creation within +# AbTLinux. By inheriting from this class (class Fortune < AbtPackage) one +# picks up all supported standard functions for the abt AbtPackage manager +# to make use of the new AbtPackage. +# +# 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 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 unpack_sources + 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 + + Dir.chdir( $BUILD_LOCATION ) + if ( !system( "#{unpackTool} #{sourcesToUnpack}" ) ) + return false + end + + return true + end + + private + + public + + # the name of the package. + attr_reader :name + + # the executable name for the package. + attr_reader :execName + + # the package version number. + attr_reader :version + + # the source directory for the package. + attr_reader :srcDir + + # the packages homepage. + attr_reader :homepage + + # the URL where this packages sources can be obtained. + attr_reader :srcUrl + + # list of dependsOn (DO) related package dependencies. + attr_reader :dependsOn + + # list of reliesOn (RO) related package dependencies. + attr_reader :reliesOn + + # list of optional reliesOn (oRO) related package dependencies. + attr_reader :optionalDO + + # list of optional dependsOn (oDO) related package dependencies. + attr_reader :optionalRO + + # security hash value of package sources. + attr_reader :hashCheck + + # list of available patches for this package. + attr_reader :patches + + # security hash value of this packages patches. + attr_reader :patchesHashCheck + + # available mirrors for this package. + attr_reader :mirrorPath + + # type of license this package has. + attr_reader :licence + + # the package description. + attr_reader :description + + + ## + # Constructor for an AbtPackage, requires all the packge details. + # + # <b>PARAM</b> <i>Hash</i> - hash containing all package data. + # + ## + def initialize( data ) + @name = data['name'] + @execName = data['execName'] + @version = data['version'] + @srcDir = data['srcDir'] + @homepage = data['homepage'] + @srcUrl = data['srcUrl'] + @dependsOn = data['dependsOn'] + @reliesOn = data['reliesOn'] + @optionalDO = data['optionalDO'] + @optionalRO = data['optionalRO'] + @hashCheck = data['hashCheck'] + @patches = data['patches'] + @patchesHashCheck = data['patchesHashCheck'] + @mirrorPath = data['mirrorPath'] + @license = data['license'] + @description = data['description'] + end + + ## + # Provides all the data needed for this AbtPackage. + # + # <b>RETURNS:</b> <i>hash</i> - Contains all AbtPackage + # attributes (constants). + ## + def details + return { + "Package name" => @name, + "Executable" => @execName, + "Version" => @version, + "Source location" => @srcDir, + "Homepage" => @homepage, + "Source uri" => @srcUrl, + "Depends On" => @dependsOn, + "Relies On" => @reliesOn, + "Optional DO" => @optionalDO, + "Optional RO" => @optionalRO, + "Security hash" => @hashCheck, + "Patches" => @patches, + "Patches hash" => @patchesHashCheck, + "Mirror" => @mirrorPath, + "License" => @license, + "Description" => @description + } + end + + ## + # Preliminary work will happen here such as downloading the tarball, + # unpacking it, downloading and applying patches. + # + # <b>PARAM</b> <i>boolean</i> - true if you want to see the verbose output, + # otherwise false. Defaults to true. + # + # <b>RETURNS:</b> <i>boolean</i> - True if completes sucessfully, + # otherwise false. + ## + def pre( verbose=true ) + downloader = AbtDownloadManager.new + + # download sources. + if ( !downloader.retrieve_package_source( @name.downcase, $SOURCES_REPOSITORY ) ) + return false + end + + # validate sources sha1. + if ( !downloader.validated( @hashCheck, "#{$SOURCES_REPOSITORY}/#{File.basename( @srcUrl )}" ) ) + return false + end + + # unpack sources. + if ( !unpack_sources ) + return false + end + + # ensure we have an installed directory to use. + if ( ! File.directory?( "#{$PACKAGE_INSTALLED}/#{@srcDir}" ) ) + FileUtils.mkdir_p( "#{$PACKAGE_INSTALLED}/#{@srcDir}" ) + end + + # TODO: implement pre section retrieve patches? + # TODO: implement pre section apply patches? + + return true + end + + ## + # Here we manage the ./configure step (or equivalent). We need + # to give ./configure (or autogen.sh, or whatever) the correct options + # so files are to be placed later in the right directories, so doc files + # and man pages are all in the same common location, etc. + # Don't forget too that it's here where we interact with the user in + # case there are optionnal dependencies. + # + # <b>PARAM</b> <i>boolean</i> - true if you want to see the verbose output, + # otherwise false. Defaults to true. + # + # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, + # otherwise false. + ## + def configure( verbose=true ) + if ( verbose ) + command = "./configure --prefix=#{$DEFAULT_PREFIX} | tee #{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.configure" + else + command = "./configure --prefix=#{$DEFAULT_PREFIX} 1> #{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.configure 2>&1" + end + + Dir.chdir( "#{$BUILD_LOCATION}/#{@srcDir}" ) + + if ( !system( command ) ) + puts "[AbtPackage.configure] - configure section failed." + return false + end + + puts "[AbtPackage.configure] - configure section completed!" if (verbose ) + return true + end + + ## + # Here is where the actual builing of the software starts, + # for example running 'make'. + # + # <b>PARAM</b> <i>boolean</i> - true if you want to see the verbose output, + # otherwise false. Defaults to true. + # + # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, + # otherwise false. + ## + def build( verbose=true ) + if ( verbose ) + command = "make | tee #{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.build" + else + command = "make > #{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.build 2>&1" + end + + Dir.chdir( "#{$BUILD_LOCATION}/#{@srcDir}" ) + + if( !system( command ) ) + puts "[AbtPackage.build] - build section failed." + return false + end + + puts "[AbtPackage.build] - build section completed!" if ( verbose ) + return true + end + + ## + # Any actions needed before the installation can occur will happen here, + # such as creating new user accounts, dealing with existing configuration + # files, etc. + # + # <b>PARAM</b> <i>boolean</i> - true if you want to see the verbose output, + # otherwise false. Defaults to true. + # + # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, + # otherwise false. + ## + def preinstall( verbose=true ) + # TODO: preinstall section create_group? + # TODO: preinstall section create_user? + return true; + end + + ## + # All files to be installed are installed here. + # + # <b>PARAM</b> <i>boolean</i> - true if you want to see the verbose output, + # otherwise false. Defaults to true. + # + # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, + # otherwise false. + ## + def install( verbose=true ) + if ( verbose ) + command = "installwatch --transl=no --backup=no " + + "--exclude=/dev,/proc,/tmp,/var/tmp,/usr/src,/sys " + + "--logfile=#{$ABT_TMP}/#{@srcDir}.watch make install" + else + command = "installwatch --transl=no --backup=no " + + "--exclude=/dev,/proc,/tmp,/var/tmp,/usr/src,/sys " + + "--logfile=#{$ABT_TMP}/#{@srcDir}.watch make install >/dev/null" + end + + Dir.chdir( "#{$BUILD_LOCATION}/#{@srcDir}" ) + + if( !system( command ) ) + puts "[AbtPackage.install] - install section failed." + return false + end + + puts "[AbtPackage.install] - install section completed!" if ( verbose ) + return true + end + + ## + # Last bits of installation. adding the service for automatic + # start in init.d for example. + # + # <b>PARAM</b> <i>boolean</i> - true if you want to see the verbose output, + # otherwise false. Defaults to true. + # + # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, + # otherwise false. + ## + def post( verbose=true ) + # TODO: implement post section install init scripts service + return true + end + + ## + # Cleans up this packages source build directory. + # + # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, + # otherwise false. + ## + def remove_build + puts "Removings build..." + if ( $REMOVE_BUILD_SOURCES ) + buildSourcesLocation = "#{$BUILD_LOCATION}/#{srcDir}" + + if ( !File.directory?( buildSourcesLocation ) ) + return true + end + + if ( !FileUtils.rm_rf buildSourcesLocation, :verbose => true ) + return false + end + end + + return true + end +end Copied: src/trunk/libs/abtpackagemanager.rb (from rev 459, src/trunk/abtpackagemanager.rb) =================================================================== --- src/trunk/libs/abtpackagemanager.rb (rev 0) +++ src/trunk/libs/abtpackagemanager.rb 2007-12-31 14:01:22 UTC (rev 460) @@ -0,0 +1,425 @@ +#!/usr/bin/ruby -w + +## +# abtpackagemanager.rb +# +# AbtPackageManager class will take care of the installation, removal, updating, +# downgrading and freezing of AbTLinux software packages. +# +# 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 AbtPackageManager + + protected + + private + + ## + # Attempts to roll back a type of action. Current supported types are + # install. Removes installed files and logs as needed. + # + # <b>PARAM</b> <i>String</i> - the type of rollback option to attempt. + # <b>PARAM</b> <i>Array</i> - The details of the package for which the + # rollback action is being called. + # + # <b>RETURN</b> <i>boolean</i> - True if the action rolls back, otherwise + # false. + ## + def roll_back( type, details ) + logFile = "#{$PACKAGE_INSTALLED}/#{details['Source location']}/" + + case type + when "install" + logFile = logFile + "#{details['Source location']}.install" + + file = File.new( logFile, "r" ) + while ( line = file.gets ) + if ( File.file?( line.chomp ) ) + File.delete( line.chomp ) + end + end + file.close + + # cleanup install log as it is incomplete. + File.delete( logFile ) + else + return false + end + + return true + end + + + public + + ## + # Constructor for AbtPackageManager. + # + # <b>RETURN</b> <i>AbtPackageManager</i> - an initialized + # AbtPackageManager object. + ## + def initialize + end + + ## + # Installs a given package. + # + # <b>PARAM</b> <i>String</i> - the name of the package to be installed. + # <b>PARAM</b> <i>boolean</i> - true for verbose output from the process, + # otherwise false. Default is true. + # + # <b>RETURN</b> <i>boolean</i> - True if the package is installed, otherwise + # false. + ## + def install_package( package, verbose=true ) + require "#{$PACKAGE_PATH}#{package}" + sw = eval( "#{package.capitalize}.new" ) + queuer = AbtQueueManager.new + logger = Logger.new( $JOURNAL ) + system = AbtSystemManager.new + + # TODO: refactor myLogger: + myLogger = AbtLogManager.new + + # get package details. + details = sw.details + + # check for frozen. + if ( system.package_frozen( package ) ) + logger.info "Package #{package} is frozen, can not proceed with install package call." + puts "\nPackage #{package} is frozen, can not proceed with install package call." + return false + end + + # TODO: check deps + + # add to install queue. + puts "\n*** Adding #{package} to the INSTALL QUEUE. ***" if ( verbose ) + + if ( !queuer.action_package_queue( package, "install", "add" ) ) + logger.info( "Failed to add #{package} to install queue." ) + return false + end + + # pre section. + puts "\n*** Processing the PRE section for #{package}. ***" if (verbose ) + + if ( !sw.pre ) + logger.info( "Failed to process pre-section in the package description of #{package}." ) + return false + else + logger.info( "Finished #{package} pre section." ) + end + + # configure section. + puts "\n*** Processing the CONFIGURE section for #{package}. ***" if ( verbose ) + + if ( !sw.configure( verbose ) ) + logger.info( "Failed to process configure section in the package description of #{package}." ) + return false + else + logger.info( "Finished #{package} configure section." ) + end + + # build section. + puts "\n*** Processing the BUILD section for #{package}. ***" if ( verbose ) + + if ( !sw.build( verbose ) ) + logger.info( "Failed to process build section in the package description of #{package}." ) + return false + else + if ( !myLogger.log_package_build( sw.name.downcase ) ) + logger.info( "Failed to create a package build log." ) + return false + end + logger.info( "Finished #{package} build section." ) + end + + # preinstall section. + puts "\n*** Processing the PREINSTALL section for #{package}. ***" if ( verbose ) + + if ( !sw.preinstall ) + logger.info( "Failed to process preinstall section in the package description of #{package}." ) + return false + else + logger.info( "Finished #{package} preinstall section." ) + end + + # install section. + puts "\n*** Processing the INSTALL section for #{package}. ***" if ( verbose ) + + if ( !sw.install ) + # rollback installed files if any and remove install log. + logger.info( "Failed to process install section in the package description of #{package}." ) + myLogger.log_package_install( sw.name.downcase ) + logger.info( "***Starting rollback of #{package} install and removing install log." ) + roll_back( "install", details ) + return false + else + myLogger.log_package_install( sw.name.downcase ) + myLogger.log_package_integrity( sw.name.downcase ) + + # cleanup tmp files from installwatch. + File.delete( "#{$ABT_TMP}/#{details['Source location']}.watch" ) + + logger.info( "Finished #{package} install section." ) + end + + # post section. + puts "\n*** Processing the POST section for #{package}. ***" if ( verbose ) + + if ( !sw.post ) + logger.info( "Failed to process post section in the package description of #{package}." ) + return false + else + logger.info( "Finished #{package} post section." ) + end + + # clean out build sources. + puts "\n*** Cleaning up the sources for #{package}. ***" if ( verbose ) + + if ( !sw.remove_build ) + logger.info( "Failed to remove the build sources for #{package}." ) + #return false # commented out as this is not a reason to fail. + end + + # remove pacakge from install queue. + if ( !queuer.action_package_queue( sw.name.downcase, "install", "remove" ) ) + logger.info( "Failed to remove #{sw.name.downcase} from install queue." ) + end + + return true # install completed! + end + + # TODO: add install_cached_package( package ) + + ## + # Reinstalls a given package. + # + # <b>PARAM</b> <i>String</i> - the name of the package to be reinstalled. + # <b>PARAM</b> <i>Boolean</i> - query the user if false (default), otherwise true and skip query. + # + # <b>RETURN</b> <i>boolean</i> - True if the package is reinstalled, + # otherwise false. + ## + def reinstall_package( package, automated_build=false ) + logger = Logger.new( $JOURNAL ) + # TODO: look into refactoring myLogger: + myLogger = AbtLogManager.new + system = AbtSystemManager.new + + # check for frozen. + if ( system.package_frozen( package ) ) + logger.info "Package #{package} is frozen, can not proceed with reinstall package call." + puts "\nPackage #{package} is frozen, can not proceed with reinstall package call." + return false + end + + # check if already installed. + if ( system.package_installed( package ) ) + + if !automated_build + puts "\n*** Package #{package} is already installed! ***\n" + puts "Are you sure you want to proceed with a reinstall? (y/n)" + + while answer = STDIN.gets + answer.chomp! + if answer == "y" + break + elsif answer == "n" + exit + else + puts "Are you sure you want to reinstall #{package}? (y/n)" + end + end + end + else + puts "\n*** Package #{package} is not installed, we will install it for you now! ***\n" + puts "Hit enter to continue..." + while continue = STDIN.gets + continue.chomp! + break + end + end + + if ( install_package( package ) ) + puts "\n\n" + puts "*** Completed reinstall of #{package}. ***" + puts "\n\n" + logger.info( "Completed reinstall of #{package}." ) + + if ( myLogger.cache_package( package ) ) + puts "\n\n" + puts "*** Completed caching of package #{package}. ***" + puts "\n\n" + logger.info( "Caching completed for package #{package}." ) + return true + else + logger.info( "Caching of package #{package} failed.") + end + end + + return false + end + + ## + # Removes a given package. + # + # <b>PARAM</b> <i>String</i> - the name of the package to be removed. + # + # <b>RETURN</b> <i>boolean</i> - True if the package is removed, otherwise + # false. + ## + def remove_package( package ) + require "#{$PACKAGE_PATH}#{package}" + sw = eval( "#{package.capitalize}.new" ) + # TODO: refactor myLogger. + myLogger = AbtLogManager.new + logger = Logger.new( $JOURNAL ) + system = AbtSystemManager.new + + # get package details. + details = sw.details + + # check for frozen. + if ( system.package_frozen( package ) ) + logger.info "Package #{package} is frozen, can not proceed with remove package call." + puts "\nPackage #{package} is frozen, can not proceed with remove package call." + return false + end + + # TODO: something with possible /etc or other configure files before removal, check maybe integrity for changes since install? + + # remove listings in install log. + installLog = myLogger.get_log( package, 'install' ) + + # only process install log if it exists, continue on with + # journal log warning. + if File.exist?( installLog ) + IO.foreach( installLog ) do |line| + if File.exist?( line.chomp ) + FileUtils.rm( line.chomp ) + logger.info( "Removed file #{line.chomp} from #{package} install log.") + else + logger.info( "Unable to remove #{line.chomp} from #{package} install log, does not exist.") + # do not return false, removed is ok, just put warning in journal log. + end + end + + logger.info( "Removed files from #{File.basename( installLog )} for #{package}." ) + else + puts "Install log missing for #{package}, see journal..." + logger.info( "Install log was missing for #{package}..." ) + logger.info( "...continuing to remove package from install listing, but might have files still installed on system." ) + end + + + # remove entry in install listing. + FileUtils.remove_dir( "#{$PACKAGE_INSTALLED}/#{details['Source location']}" ) + logger.info( "Removed entry from installed packages." ) + return true + end + + ## + # Downgrades a given package. + # + # <b>PARAM</b> <i>String</i> - the name of the package to be downgraded. + # + # <b>PARAM</b> <i>String</i> - the version number to be downgraded to. + # + # <b>RETURN</b> <i>boolean</i> - True if the package is downgraded, otherwise + # false. + ## + def downgrade_package( package, version ) + system = AbtSystemManager.new + logger = Logger.new( $JOURNAL ) + + # check for frozen. + if ( system.package_frozen( package ) ) + logger.info "Package #{package} is frozen, can not proceed with downgrade package call." + puts "\nPackage #{package} is frozen, can not proceed with downgrade package call." + return false + end + + return false + end + + ## + # Freezes a given package. If successful will add give package to the frozen + # list. If the given package is already frozen, it will be released. + # + # <b>PARAM</b> <i>String</i> - the name of the package to be frozen. + # + # <b>RETURN</b> <i>boolean</i> - True if the package is frozen, otherwise + # false. + ## + def freeze_package( package ) + require "#{$PACKAGE_PATH}#{package}" + sw = eval( "#{package.capitalize}.new" ) + myLogger = AbtLogManager.new # TODO: refactor myLogger. + logger = Logger.new( $JOURNAL ) + system = AbtSystemManager.new + + if ( system.package_installed( package ) ) + if ( system.package_frozen( package ) ) + logger.info( "Package #{package} is already frozen!" ) + + # package already frozen, need to un-freeze by removing frozen.log + # file. + FileUtils.rm "#{$PACKAGE_INSTALLED}/#{sw.srcDir}/frozen.log" + puts "\nPackage #{package} was frozen, it has now been relased for use." + logger.info "Package #{package} released : removed file #{$PACKAGE_INSTALLED}/#{sw.srcDir}/frozen.log" + else + # place file in $PACKAGE_INSTALLED frozen.log with date. + frozen = File.open( "#{$PACKAGE_INSTALLED}/#{sw.srcDir}/frozen.log", "w" ) + frozen.puts "#{$TIMESTAMP}" + frozen.close + logger.info( "Package #{package} is now frozen." ) + end + + return true + end + + logger.info( "Package #{package} is not installed, unable to freeze it." ) + return false + end + + ## + # Provides for a log through for root access using su. + # + # <b>PARAM</b> <i>Array</i> - the arguments passed to abt. + # + # <b>RETURN</b> <i>void</i> + ## + def root_login( arguments ) + if ( Process.uid != 0 ) + args = "" + puts "\nYou need to be root for accessing the requested functionality.\n" + puts "\nEnter root password:" + + for i in 0...ARGV.length + args = args + " " + ARGV[i] + end + + system( 'su -c "./abt ' + args + '" root' ) + exit + end + end +end Copied: src/trunk/libs/abtqueuemanager.rb (from rev 459, src/trunk/abtqueuemanager.rb) =================================================================== --- src/trunk/libs/abtqueuemanager.rb (rev 0) +++ src/trunk/libs/abtqueuemanager.rb 2007-12-31 14:01:22 UTC (rev 460) @@ -0,0 +1,113 @@ +#!/usr/bin/ruby -w + +## +# abtqueuemanager.rb +# +# AbtQueueManager class handles all AbTLinux queue interaction. +# +# 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 AbtQueueManager + + protected + + private + + public + + ## + # Constructor for the AbtQueueManager class. + # + # <b>RETURN</b> <i>AbtQueueManager</i> - an initialized + # AbtQueueManager object. + ## + def initialize + end + + ## + # Add/Remove a given package to the given queue. + # If adding a package already in the queue then it will not + # be added twice and return succes. + # + # <b>PARAM</b> <i>String</i> - the package to be added/removed. + # <b>PARAM</b> <i>String</i> - the queue. + # + # <b>RETURN</b> <i>boolean</i> - true if action succeeds, otherwise false. + ## + def action_package_queue( package, queue, action="add" ) + require 'fileutils' + logger = Logger.new( $JOURNAL ) + queueFile = "" # used to hold the queue location. + + # want to name install queue differently from log files. + if ( queue == 'install' ) + queueFile = "#{$ABT_LOGS}/#{queue}.queue" + else + queueFile = "#{$ABT_LOGS}/#{queue}.log" + end + + if ( action == "add") + if ( + log = File.new( queueFile, File::WRONLY|File::APPEND|File::CREAT, 0644 ) ) + # pickup queue contents to ensure no duplicates. + checkingQueue = IO.readlines( queueFile ) + + # check if package exists, otherwise add. + if ( + !checkingQueue.collect{ |i| i.split( '|' )[0] }.include?( + package ) ) + log.puts "#{package}|#{$TIMESTAMP}" + logger.info( "Added #{package} to #{queue} queue." ) + else + logger.info( "Did not add #{package} to #{queue}, already exists." ) + end + + log.close + return true + end + end + + if ( action == "remove" ) + # remove entry from given queue. + if ( + log = File.new( queueFile, File::WRONLY|File::APPEND|File::CREAT, 0644 ) ) + # use temp file to filter out entry to be removed. + temp = File.new(queueFile + ".tmp", "a+") + + # now check for line to be removed. + IO.foreach( queueFile ) do |line| + entryName = line.split( '|' )[0] + if ( entryName != package.downcase ) + temp.puts line + end + end + + temp.close + FileUtils.mv( temp.path, queueFile ) + end + + log.close + return true + end + + logger.info( "Failed to open #{queueFile}." ) + return false + end +end Copied: src/trunk/libs/abtreportmanager.rb (from rev 459, src/trunk/abtreportmanager.rb) =================================================================== --- src/trunk/libs/abtreportmanager.rb (rev 0) +++ src/trunk/libs/abtreportmanager.rb 2007-12-31 14:01:22 UTC (rev 460) @@ -0,0 +1,338 @@ +#!/usr/bin/ruby -w + +## +# abtreportmanager.rb +# +# AbtReportManager class handles all sort of report and query generation within +# the AbTLinux system. +# +# 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 AbtReportManager + + protected + + private + + public + + ## + # Constructor for the AbtReportManager. + # + # <b>RETURN</b> <i>AbtReportManager</i> - an initialized + # Report1Manager object. + ## + def initialize + end + + ## + # Display all data for a given package. + # + # <b>PARAM</b> <i>String</i> - Package name. + # + # <b>RETURN</b> <i>boolean</i> - True if completes without error, + # otherwise false. + ## + def show_package_details( package ) + require "#{$PACKAGE_PATH}#{package}" + + if ( package = eval( "#{package.capitalize}.new" ) ) + details = package.details + + puts "|=====================================" + puts "| Package name\t: #{details['Package name']}" + details.delete( "Package name" ) + puts "| Version\t: #{details['Version']}" + details.delete( "Version" ) + puts "| Homepage\t: #{details['Homepage']}" + details.delete( "Homepage" ) + puts "| Executable\t: #{details['Executable']}" + details.delete( "Executable" ) + puts "| Source uri\t: #{details['Source uri']}" + details.delete( "Source uri" ) + puts "| Description\t: #{details['Description']}" + details.delete( "Description" ) + puts "|=====================================" + puts "|=====================================" + + details.each do |name, value| + print "| #{name}\t" + + if ( name.length < 14 ) + print "\t" + end + + puts ": #{value}" + end + + puts "|=====================================" + return true + end + + logger.debug( "[AbtReportManger::showPackageDetails] - failed to show details for ${package}." ) + return false + end + + ## + # Display all packages installed and tracked by AbTLinux. + # + # <b>RETURN</b> <i>void.</i> + ## + def show_installed_packages + if ( Dir.entries( $PACKAGE_INSTALLED ) - [ '.', '..' ] ).empty? + puts "\nNo AbTLinux packages are listed as installed, is your #{$PACKAGE_INSTALLED} empty?\n\n" + else + puts "\nInstalled AbTLinux packages:" + puts "============================" + Dir.foreach( $PACKAGE_INSTALLED ) { |package| puts package if package != "." && package != ".." } + puts "\n" + end + end + + ## + # Display the contents of the requested log for a given package. Possible + # log types are; configure, install, build and integrity. This method will return nothing + # if the package log is not installed. + # + # <b>PARAM</b> <i>String</i> - Package name. + # + # <b>PARAM</b> <i>String</i> - log type. + # + # <b>RETURN</b> <i>void.</i> + ## + def show_package_log( package, logType ) + system = AbtSystemManager.new + logger = AbtLogManager.new + + # just return if package not installed, up to + # caller to message the user about why. + if !system.package_installed( package ) + return + end + + File.open( logger.get_log( package, logType ) ).each { |line| puts line } + end + + ## + # Display a list of the packages found in the frozen list. + # + # <b>RETURN</b> <i>hash</i> - a hash of the frozen packages, keys are package + # names and values are the frozen timestamps. + ## + def show_frozen_packages + + # determine if there are frozen pacakges. + frozenHash = Hash.new # has for values found. + + if ( Dir.entries( $PACKAGE_INSTALLED ) - [ '.', '..' ] ).empty? + return Hash.new # empty hash, no entries. + else + Dir.foreach( $PACKAGE_INSTALLED ) { |package| + if ( package != "." && package != "..") + # split the installed entry into two parts, + # the package name and the version number. + #packageArray = package.split( "-" ) + #packageName = packageArray[0] + + # check for frozen log file. + if ( File.exist?( "#{$PACKAGE_INSTALLED}/#{package}/frozen.log" ) ) + # dump packgae + frozen.log timestamp in packageHash. + begin + file = File.new("#{$PACKAGE_INSTALLED}/#{package}/frozen.log", "r") + #while (line = file.gets) + line = file.gets + frozenHash = frozenHash.merge( Hash[ "#{package}" => "#{line}" ] ) + #end + file.close + rescue => error + puts "Exception: #{error}" + return false + end + end + end + } + end + + return frozenHash + end + + ## + # Provides access to dependency checking via the AbTLinux DepEngine. (This + # portal to the DepEngine will be expanded in apart sub-project, more + # details at a later date.) + # + # <b>PARAM</b> <i>String</i> - Package name. + # + # <b>RETURN</b> <i>hash</i> - Empty hash if no problems found, otherwise + # hash of problem files and their encountered errors. + ## + def show_package_dependencies( package ) + # TODO: implement this. + return false + end + + ## + # Display all files not part of any installed AbTLinux package. This + # delivers a list of files that are not tracked by AbTLinux package + # management. + # + # <b>RETURN</b> <i>void.</i> + ## + def show_untracked_files + # TODO: implement this. + return false + end + + ## + # Display the AbTLinux journal file. + # + # <b> PARAM</b> <i>string</i> The complete path of the file to display. + # + # <b>RETURN</b> <i>iboolean</i> True if journal shown, otherwise false. + ## + def show_journal( fileName ) + if ( File.exist?( fileName ) ) + puts "\n\n" + puts "AbTLinux log:" + puts "=============" + log = IO.readlines( fileName ) + log.each{ |entry| puts entry } + puts "\n\n" + else + puts "\n\n" + puts "AbtLinux log ( #{File.basename( fileName )} ) " + + "is empty at this time." + puts "\n\n" + end + + return true + end + + ## + # Display the name of the package(s) that own the given file. + # + # <b>PARAM</b> <i>String</i> - a file name. + # + # <b>RETURN</b> <i>void.</i> + ## + def show_file_owner( file ) + # TODO: implement this. + return false + end + + ## + # Searches the installed package trees package descriptions for matching + # occurrances of the given search text. + # + # <b>PARAM</b> <i>String</i> - a search text. + # + # <b>RETURN</b> <i>hash</i> - a hash of the search results, keys are package + # names and values are matching descriptions. + ## + def search_package_descriptions( searchText ) + packageHash = Hash.new # has for values found. + + if ( Dir.entries( $PACKAGE_INSTALLED ) - [ '.', '..' ] ).empty? + return packageHash # empty hash, no entries. + else + Dir.foreach( $PACKAGE_INSTALLED ) { |package| + if ( package != "." && package != "..") + # split the installed entry into two parts, + # the package name and the version number. + packageArray = package.split( "-" ) + packageName = packageArray[0] + + # check for match to name and description if the package file exists. + if ( File.exist?( "#{$PACKAGE_PATH}#{packageName}.rb" ) ) + require "#{$PACKAGE_PATH}#{packageName}" + sw = eval( "#{packageName.capitalize}.new" ) + + # add if matches name or description entries. + matchesArray = sw.description.scan( searchText ) + matchesArray = matchesArray.concat( packageName.scan( searchText ) ) + + if ( matchesArray.length > 0 ) + # matches so add to hash. + packageHash = packageHash.merge( Hash[ "#{package}" => "#{sw.description}" ] ) + end + end + end + } + end + + # finished search results. + return packageHash + end + + ## + # Displays the contents of the current queue based on the given queue. + # + # <b>PARAM</b> <i>String</i> - the type of queue to display such as install + # queue. + # + # <b>RETURN</b> <i>void.</i> + ## + def show_queue( queueType ) + + case queueType + + when "install" + if ( File.exist?( "#{$ABT_LOGS}/#{queueType}.queue" ) ) + puts "\n\n" + puts "AbTLinux #{queueType} queue:" + puts "=======================" + queue = IO.readlines( "#{$ABT_LOGS}/#{queueType}.queue" ) + queue.each{ |entry| puts entry } + puts "\n\n" + else + puts "\n\n" + puts "AbtLinux #{queueType} is empty at this time." + puts "\n\n" + end + else + puts "#{queueType.capitalize} is not an AbTLinux queue." + end + end + + ## + # Reports available updates for a given package or package tree based on the + # current system. + # + # <b>PARAM</b> <i>String</i> - the target of the update check, either a + # package name or a package tree name. + # + # <b>RETURN</b> <i>boolean</i> - True if completes without error, otherwise + # false. + ## + def show_updates( target ) + # TODO: implement this. + return false + end + + ## + # Generates an HTML page of installed packages from installed packages list. + # + # <b>RETURN</b> <i>void.</i> + ## + def generate_HTML_package_listing + # TODO: implement ... [truncated message content] |
From: <esc...@us...> - 2007-12-31 12:54:09
|
Revision: 459 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=459&view=rev Author: eschabell Date: 2007-12-31 04:54:11 -0800 (Mon, 31 Dec 2007) Log Message: ----------- Completes move of tests into apart test directory. Removed Paths: ------------- src/trunk/testabtdepengine.rb src/trunk/testabtdownloadmanager.rb src/trunk/testabtlogmanager.rb src/trunk/testabtpackage.rb src/trunk/testabtpackagemanager.rb src/trunk/testabtqueuemanager.rb src/trunk/testabtreportmanager.rb src/trunk/testabtsystemmanager.rb src/trunk/testsuiteabt.rb Deleted: src/trunk/testabtdepengine.rb =================================================================== --- src/trunk/testabtdepengine.rb 2007-12-31 12:53:26 UTC (rev 458) +++ src/trunk/testabtdepengine.rb 2007-12-31 12:54:11 UTC (rev 459) @@ -1,53 +0,0 @@ -#!/usr/bin/ruby -w - -require 'test/unit/testcase' -require 'test/unit/autorunner' -require 'abtconfig' - -## -# testabtdepengine.rb -# -# Unit testing for AbtDepEngine class. -# -# 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 TestAbtDepEngine < Test::Unit::TestCase - - ## - # setup method for testing AbtDepEngine. - ## - def setup - @depEngine = AbtDepEngine.new - end - - ## - # teardown method to cleanup after testing. - ## - def teardown - end - - ## - # Test method for 'AbtDepEngine.test_dep_engine()' - ## - def test_dep_engine - assert_equal( false, true, "test_dep_engine()" ) - end - -end Deleted: src/trunk/testabtdownloadmanager.rb =================================================================== --- src/trunk/testabtdownloadmanager.rb 2007-12-31 12:53:26 UTC (rev 458) +++ src/trunk/testabtdownloadmanager.rb 2007-12-31 12:54:11 UTC (rev 459) @@ -1,95 +0,0 @@ -#!/usr/bin/ruby -w - -require 'test/unit/testcase' -require 'test/unit/autorunner' -require 'abtconfig' - -## -# testabtdownloadmanager.rb -# -# Unit testing for AbtDownloadManager class. -# -# 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 TestAbtDownloadManager < Test::Unit::TestCase - - ## - # setup method for testing AbtDownloadManager. - ## - def setup - @download = AbtDownloadManager.new - @manager = AbtPackageManager.new - @system = AbtSystemManager.new - end - - ## - # teardown method to cleanup after testing. - ## - def teardown - end - - ## - # Test method for 'AbtDownloadManager.test_retrieve_package_source()' - ## - def test_retrieve_package_source() - # ensures download not needed. - FileUtils.cp "#{$PACKAGE_PATH}/ipc-1.4.tar.gz", "#{$SOURCES_REPOSITORY}", :verbose => true if !File.exist?( "#{$SOURCES_REPOSITORY}/ipc-1.4.tar.gz" ) - - assert( @download.retrieve_package_source( "ipc", "#{$SOURCES_REPOSITORY}" ), "test_retrieve_package_source()" ) - end - - ## - # Test method for 'AbtDownloadManager.test_retrieve_package_tree()' - ## - def test_retrieve_package_tree() - assert( @download.retrieve_package_tree( "dummy" ), "test_retrieve_package_tree()" ) - end - - ## - # Test method for 'AbtDownloadManager.test_retrieve_news_feed()' - ## - def test_retrieve_news_feed() - assert( @download.retrieve_news_feed( $ABTNEWS ), "test_retrieve_news_feed()" ) - end - - ## - # Test method for 'AbtDownloadManager.test_update_package()' - ## - def test_update_package() - assert( @download.update_package( "ipc") , "test_update_package()" ) - end - - ## - # Test method for 'AbtDownloadManager.test_update_package_tree()' - ## - def test_update_package_tree() - assert( @download.update_package_tree(), "test_update_package_tree()" ) - end - - ## - # Test method for 'AbtDownloadManager.test_validated()' - ## - def test_validated() - # ensure a tarball is available to test! - FileUtils.cp "#{$PACKAGE_PATH}/ipc-1.4.tar.gz", "#{$SOURCES_REPOSITORY}", :verbose => true if !File.exist?( "#{$SOURCES_REPOSITORY}/ipc-1.4.tar.gz" ) - - assert( @download.validated( 'e81278607b1d65dcb18c3613ec00fbf588b50319', "#{$SOURCES_REPOSITORY}/ipc-1.4.tar.gz" ), "test_validated" ) - end -end Deleted: src/trunk/testabtlogmanager.rb =================================================================== --- src/trunk/testabtlogmanager.rb 2007-12-31 12:53:26 UTC (rev 458) +++ src/trunk/testabtlogmanager.rb 2007-12-31 12:54:11 UTC (rev 459) @@ -1,108 +0,0 @@ -#!/usr/bin/ruby -w - -require 'test/unit/testcase' -require 'test/unit/autorunner' -require 'abtconfig' - -## -# testabtlogmanager.rb -# -# Unit testing for AbtLogManager class. -# -# 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 TestAbtLogManager < Test::Unit::TestCase - - ## - # setup method for testing AbtLogManager. - ## - def setup - @logger = AbtLogManager.new - @manager = AbtPackageManager.new - @system = AbtSystemManager.new - - # ensures download not needed. - FileUtils.cp "#{$PACKAGE_PATH}/ipc-1.4.tar.gz", "#{$SOURCES_REPOSITORY}", :verbose => true if !File.exist?( "#{$SOURCES_REPOSITORY}/ipc-1.4.tar.gz" ) - end - - ## - # teardown method to cleanup after testing. - ## - def teardown - FileUtils.rm( "#{$ABT_TMP}/ipc-1.4.watch" ) if File.exist?( "#{$ABT_TMP}/ipc-1.2.watch" ) - end - - ## - # Test method for 'AbtLogManager.test_log_package_integrity()' - ## - def test_log_package_integrity() - if !@system.package_installed( "ipc" ) - @manager.install_package( "ipc" ) - end - - assert( @logger.log_package_integrity( "ipc" ), "test_log_package_integrity()" ) - end - - ## - # Test method for 'AbtLogManager.test_log_package_install()' - ## - def test_log_package_install() - if !@system.package_installed( "ipc" ) - @manager.install_package( "ipc" ) - end - - # fill installwatch file. - File.open( "#{$ABT_TMP}/ipc-1.4.watch", "w" ) do |file| - file.puts "5 open /usr/local/bin/ipc #success" - file.puts "0 chmod /usr/local/bin/ipc 00600 #success" - file.puts "0 chown /usr/local/bin/ipc -1 -1 #success" - file.puts "0 chmod /usr/local/bin/ipc 00755 #success" - file.puts "5 open /usr/local/share/ipc/elemente #success" - file.puts "0 chmod /usr/local/share/ipc/elemente 00600 #success" - file.puts "0 chown /usr/local/share/ipc/elemente -1 -1 #success" - file.puts "0 chmod /usr/local/share/ipc/elemente 00644 #success" - end - - assert( @logger.log_package_install( "ipc" ), "test_log_package_install()" ) - end - - ## - # Test method for 'AbtLogManager.test_log_package_build()' - ## - def test_log_package_build() - if !@system.package_installed( "ipc" ) - @manager.install_package( "ipc" ) - end - - assert( @logger.log_package_build( "ipc" ), "test_log_package_build()" ) - end - - ## - # Test method for 'AbtLogManager.test_cache_package()' - ## - def test_cache_package() - if !@system.package_installed( "ipc" ) - @manager.install_package( "ipc" ) - end - - assert( @logger.cache_package( "ipc" ), "test_cache_package()" ) - end - -end Deleted: src/trunk/testabtpackage.rb =================================================================== --- src/trunk/testabtpackage.rb 2007-12-31 12:53:26 UTC (rev 458) +++ src/trunk/testabtpackage.rb 2007-12-31 12:54:11 UTC (rev 459) @@ -1,144 +0,0 @@ -#!/usr/bin/ruby -w - -require "test/unit/testcase" -require "test/unit/autorunner" -require "abtconfig" -require "#{$PACKAGE_PATH}ipc" - -## -# testabtpackage.rb -# -# Unit testing for AbtPackage class. -# -# 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 TestAbtPackage < Test::Unit::TestCase - - $nameTest = "Ipc" - $versionTest = "1.4" - $verbose = false - $srcDirTest = "#{$nameTest.downcase}-#{$versionTest}" - - $dataTest = { - 'name' => $nameTest, - 'execName' => $nameTest.downcase, - 'version' => $versionTest, - 'srcDir' => $srcDirTest, - 'homepage' => "http://isotopatcalc.sourceforge.net/" - } - - ## - # setup method for testing AbtPackage. - ## - def setup - @ipc = Ipc.new - - # ensures download not needed. - FileUtils.cp "#{$PACKAGE_PATH}/ipc-1.4.tar.gz", "#{$SOURCES_REPOSITORY}", :verbose => true if !File.exist? "#{$SOURCES_REPOSITORY}/ipc-1.4.tar.gz" - end - - ## - # teardown method to cleanup after testing. - ## - def teardown - FileUtils.rm_r "#{$BUILD_LOCATION}/#{$dataTest['srcDir']}", :verbose => true if File.exist? "#{$BUILD_LOCATION}/#{$dataTest['srcDir']}" - end - - ## - # Test method for 'AbtPackage.test_details()' - ## - def test_details - assert_equal( $dataTest['name'], @ipc.details['Package name'], "test_details(name)" ) - assert_equal( $dataTest['execName'], @ipc.details['Executable'], "test_details(execName)" ) - assert_equal( $dataTest['version'], @ipc.details['Version'], "test_details(version)" ) - assert_equal( $dataTest['srcDir'], @ipc.details['Source location'], "test_details(srcDir)" ) - assert_equal( $dataTest['homepage'], @ipc.details['Homepage'], "test_details(homepage)" ) - end - - ## - # Test method for 'AbtPackage.test_pre()' - ## - def test_pre - assert( @ipc.pre( $verbose ), "test_pre()" ) - end - - ## - # Test method for 'AbtPackage.test_configure()' - ## - def test_configure - if ( !@ipc.pre( $verbose ) ) - assert_equals( true, false, "test_configure(pre)" ) - end - assert( @ipc.configure( $verbose ), "test_configure(configure)" ) - end - - ## - # Test method for 'AbtPackage.test_build()' - ## - def test_build - if ( !@ipc.pre( $verbose ) ) - assert_equals( true, false, "test_build(pre)" ) - end - if ( !@ipc.configure( $verbose ) ) - assert_equals( true, false, "test_build(configure)" ) - end - assert( @ipc.build( $verbose ), "test_build(build)" ) - end - - ## - # Test method for 'AbtPackage.test_preinstall()' - ## - def test_preinstall - assert( @ipc.preinstall( $verbose ), "test_preinstall()" ) - end - - ## - # Test method for 'AbtPackage.test_install()' - ## - def test_install - - if ( !@ipc.pre( $verbose ) ) - assert_equals( true, false, "test_install(pre)" ) - end - if ( !@ipc.configure( $verbose ) ) - assert_equals( true, false, "test_install(configure)" ) - end - if ( !@ipc.build( $verbose ) ) - assert_equals( true, false, "test_install(build)" ) - end - if ( !@ipc.preinstall( $verbose ) ) - assert_equals( true, false, "test_install(install)" ) - end - assert( @ipc.install( $verbose ), "test_install(install)" ) - end - - ## - # Test method for 'AbtPackage.test_post()' - ## - def test_post - assert_equals( true, false, "test_post(pre)" ) if ( !@ipc.pre( $verbose ) ) - assert_equals( true, false, "test_post(configure)" ) if ( !@ipc.configure( $verbose ) ) - assert_equals( true, false, "test_post(build)" ) if ( !@ipc.build( $verbose ) ) - assert_equals( true, false, "test_post(preinstall)" ) if ( !@ipc.preinstall( $verbose ) ) - assert_equals( true, false, "test_post(install)" ) if ( !@ipc.install( $verbose ) ) - assert( @ipc.post( $verbose ), "test_post(post)" ) - end - -end Deleted: src/trunk/testabtpackagemanager.rb =================================================================== --- src/trunk/testabtpackagemanager.rb 2007-12-31 12:53:26 UTC (rev 458) +++ src/trunk/testabtpackagemanager.rb 2007-12-31 12:54:11 UTC (rev 459) @@ -1,132 +0,0 @@ -#!/usr/bin/ruby -w - -require 'test/unit/testcase' -require 'test/unit/autorunner' -require 'abtconfig' - -## -# testabtpackagemanager.rb -# -# Unit testing for AbtPackageManager class. -# -# 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 TestAbtPackageManager < Test::Unit::TestCase - - $verbose = false; # quiets testing output. - - ## - # setup method for testing AbtPackageManager. - ## - def setup - @pkgMgr = AbtPackageManager.new - @manager = AbtPackageManager.new - @system = AbtSystemManager.new - - # ensures download not needed. - FileUtils.cp "#{$PACKAGE_PATH}/ipc-1.4.tar.gz", "#{$SOURCES_REPOSITORY}", :verbose => true if !File.exist?( "#{$SOURCES_REPOSITORY}/ipc-1.4.tar.gz" ) - end - - ## - # teardown method to cleanup after testing. - ## - def teardown - end - - ## - # Test method for 'AbtPackageManager.test_install_package()' - ## - def test_install_package - if @system.package_installed( "ipc" ) - - if @system.package_frozen( "ipc" ) - @manager.freeze_package( "ipc" ) - end - - @manager.remove_package( "ipc" ) - end - - assert( @pkgMgr.install_package( "ipc", $verbose ), "test_install_package()" ) - end - - ## - # Test method for 'AbtPackageManager.test_reinstall_package()' - ## - def test_reinstall_package - if !@system.package_installed( "ipc" ) - @manager.install_package( "ipc" ) - end - - if @system.package_frozen( "ipc" ) - @manager.freeze_package( "ipc" ) - end - - assert( @pkgMgr.reinstall_package( "ipc", true ), "test_reinstall_package()" ) - end - - ## - # Test method for 'AbtPackageManager.test_remove_package()' - ## - def test_remove_package - if !@system.package_installed( "ipc" ) - @manager.install_package( "ipc" ) - end - - if @system.package_frozen( "ipc" ) - @manager.freeze_package( "ipc" ) - end - - assert( @pkgMgr.remove_package( "ipc" ), "test_remove_package()" ) - end - - ## - # Test method for 'AbtPackageManager.test_downgrade_package()' - ## - def test_downgrade_package - if !@system.package_installed( "ipc" ) - @manager.install_package( "ipc" ) - end - - if @system.package_frozen( "ipc" ) - @manager.freeze_package( "ipc" ) - end - - assert( @pkgMgr.downgrade_package( "ipc", "1.2" ), "test_downgrade_package()" ) - end - - ## - # Test method for 'AbtPackageManager.test_freeze_package()' - ## - def test_freeze_package - if !@system.package_installed( "ipc" ) - @manager.install_package( "ipc" ) - end - - if !@system.package_frozen( "ipc" ) - assert( @pkgMgr.freeze_package( "ipc" ), "test_freeze_package()" ) - - # need to return package to initial state, un-frozen. - @pkgMgr.freeze_package( "ipc" ) - else - assert( true ) - end - end - -end Deleted: src/trunk/testabtqueuemanager.rb =================================================================== --- src/trunk/testabtqueuemanager.rb 2007-12-31 12:53:26 UTC (rev 458) +++ src/trunk/testabtqueuemanager.rb 2007-12-31 12:54:11 UTC (rev 459) @@ -1,56 +0,0 @@ -#!/usr/bin/ruby -w - -require 'test/unit/testcase' -require 'test/unit/autorunner' -require 'abtconfig' - -## -# testabtqueuemanager.rb -# -# Unit testing for AbtQueueManager class. -# -# 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 TestAbtQueueManager < Test::Unit::TestCase - - ## - # setup method for testing AbtQueueManager. - ## - def setup - @queue = AbtQueueManager.new - end - - ## - # teardown method to cleanup after testing. - ## - def teardown - end - - ## - # Test method for 'AbtQueueManager.action_package_queue()' - ## - def test_action_package_queue - assert( @queue.action_package_queue( "ipc", "install", "add" ), "test_action_package_queue(add)" ) - assert( @queue.action_package_queue( "ipc", "install" ), "test_action_package_queue(default add again)" ) - assert( @queue.action_package_queue( "ipc", "install", "remove" ), "test_action_package_queue(remove)" ) - - end - -end Deleted: src/trunk/testabtreportmanager.rb =================================================================== --- src/trunk/testabtreportmanager.rb 2007-12-31 12:53:26 UTC (rev 458) +++ src/trunk/testabtreportmanager.rb 2007-12-31 12:54:11 UTC (rev 459) @@ -1,169 +0,0 @@ -#!/usr/bin/ruby -w - -require 'test/unit/testcase' -require 'test/unit/autorunner' -require 'abtconfig' - -## -# testabtreportmanager.rb -# -# Unit testing for AbtReportManager class. -# -# 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 TestAbtReportManager < Test::Unit::TestCase - - ## - # setup method for testing AbtReportManager. - ## - def setup - @report = AbtReportManager.new - @manager = AbtPackageManager.new - @system = AbtSystemManager.new - - # ensure tarball available without downloading. - FileUtils.cp( "#{$PACKAGE_PATH}/ipc-1.4.tar.gz", "#{$SOURCES_REPOSITORY}", :verbose => true ) if !File.exist?( "#{$SOURCES_REPOSITORY}/ipc-1.4.tar.gz" ) - end - - ## - # teardown method to cleanup after testing. - ## - def teardown - # TODO: if test package frozen, unfreeze it. - end - - ## - # Test method for 'AbtReportManager.test_show_package_details()' - ## - def test_show_package_details - assert( @report.show_package_details( "ipc" ), "test_show_package_details()" ) - end - - ## - # Test method for 'AbtReportManager.test_show_installed_packages()' - ## - def test_show_installed_packages - # ensure test pacakge installed for listing. - if !@system.package_installed( "ipc" ) - @manager.install_package( "ipc" ) - end - - assert_nil( @report.show_installed_packages(), "test_show_installed_packages()" ) - end - - ## - # Test method for 'AbtReportManager.test_show_package_log()' - ## - def test_show_package_log - if !@system.package_installed( "ipc" ) - @manager.install_package( "ipc" ) - end - - assert( @report.show_package_log( "ipc", "install" ), "test_show_package_log(install)" ) - assert( @report.show_package_log( "ipc", "build" ), "test_show_package_log(build)" ) - assert( @report.show_package_log( "ipc", "integrity" ), "test_show_package_log(integrity)" ) - end - - ## - # Test method for 'AbtReportManager.test_show_frozen_packages()' - ## - def test_show_frozen_packages - # ensure test package installed. - if !@system.package_installed( "ipc" ) - @manager.install_package( "ipc" ) - end - - # ensure test package freeze. - if !@system.package_frozen( "ipc" ) - @manager.freeze_package "ipc" - end - - assert( @report.show_frozen_packages(), "test_show_frozen_packages()" ) - end - - ## - # Test method for 'AbtReportManager.test_show_package_dependencies()' - ## - def test_show_package_dependencies - assert( false, "test_show_package_dependencies()" ) - end - - ## - # Test method for 'AbtReportManager.test_show_untracked_files()' - ## - def test_show_untracked_files - assert( @report.show_untracked_files(), "test_show_untracked_files()" ) - end - - ## - # Test method for 'AbtReportManager.test_show_journal()' - ## - def test_show_journal - assert( @report.show_journal( $JOURNAL ), "test_show_journal()" ) - end - - ## - # Test method for 'AbtReportManager.test_show_file_owner()' - ## - def test_show_file_owner - # ensure package installed for testing file owner. - if !@system.package_installed( "ipc" ) - @manager.install_package( "ipc" ) - end - - assert( @report.show_file_owner( "ipcFile" ), "test_show_file_owner()" ) - end - - ## - # Test method for 'AbtReportManager.test_search_package_descriptions()' - ## - def test_search_package_descriptions - expectedHash = Hash[ "ipc-1.4" => "IPC is a program that calculates the isotopic distribution of a given chemical formula."] - - assert_equal( @report.search_package_descriptions( "ipc" ), expectedHash, "test_search_package_descriptions()" ) - end - - ## - # Test method for 'AbtReportManager.test_show_queue()' - ## - def test_show_queue - assert_nil( @report.show_queue( "install" ), "test_show_queue(install)" ) - end - - ## - # Test method for 'AbtReportManager.test_show_updates()' - ## - def test_show_updates - assert( @report.show_updates( "ipc" ), "test_show_updates()" ) - end - - ## - # Test method for 'AbtReportManager.test_generate_HTML_package_listing()' - ## - def test_generate_HTML_package_listing - # ensure at least one package is installed. - if !@system.package_installed( "ipc" ) - @manager.install_package( "ipc" ) - end - - assert( @report.generate_HTML_package_listing(), "test_generate_HTML_package_listing()" ) - end - -end Deleted: src/trunk/testabtsystemmanager.rb =================================================================== --- src/trunk/testabtsystemmanager.rb 2007-12-31 12:53:26 UTC (rev 458) +++ src/trunk/testabtsystemmanager.rb 2007-12-31 12:54:11 UTC (rev 459) @@ -1,134 +0,0 @@ -#!/usr/bin/ruby -w - -require 'test/unit/testcase' -require 'test/unit/autorunner' -require 'abtconfig' - -## -# testabtsystemmanager.rb -# -# Unit testing for AbtSystemManager class. -# -# 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 TestAbtSystemManager < Test::Unit::TestCase - - ## - # setup method for testing AbtSystemManager. - ## - def setup - @system = AbtSystemManager.new - @manager = AbtPackageManager.new - - # ensure tarball availabe without downloading. - FileUtils.cp( "#{$PACKAGE_PATH}/ipc-1.4.tar.gz", "#{$SOURCES_REPOSITORY}", :verbose => true ) if !File.exist?( "#{$SOURCES_REPOSITORY}/ipc-1.4.tar.gz" ) - end - - ## - # teardown method to cleanup after testing. - ## - def teardown - end - - ## - # Test method for 'AbtSystemManager.test_cleanup_package_sources()' - ## - def test_cleanup_package_sources - # remove test package so that sources can be removed. - if @system.package_installed( "ipc" ) - @manager.remove_package( "ipc" ) - end - - # ensure tarball availabe without downloading. - FileUtils.cp( "#{$PACKAGE_PATH}/ipc-1.4.tar.gz", "#{$SOURCES_REPOSITORY}", :verbose => true ) if !File.exist?( "#{$SOURCES_REPOSITORY}/ipc-1.4.tar.gz" ) - - assert( @system.cleanup_package_sources(), "test_cleanup_package_sources()" ) - end - - ## - # Test method for 'AbtSystemManager.test_verify_installed_files()' - ## - def test_verify_installed_files - # ensure test package installed. - if !@system.package_installed( "ipc" ) - @manager.install_package( "ipc" ) - end - - assert( @system.verify_installed_files( "ipc" ), "test_verify_installed_files()" ) - end - - ## - # Test method for 'AbtSystemManager.test_verify_symlinks()' - ## - def test_verify_symlinks - assert( @system.verify_symlinks( "dummy" ), "test_verify_symlinks()" ) - end - - ## - # Test method for 'AbtSystemManager.test_verify_package_depends()' - ## - def test_verify_package_depends - assert( @system.verify_package_depends( "dummy" ), "test_verify_package_depends()" ) - end - - ## - # Test method for 'AbtSystemManager.test_verify_package_integrity()' - ## - def test_verify_package_integrity - if !@system.package_installed( "ipc" ) - @manager.install_package( "ipc" ) - end - - assert( @system.verify_package_integrity( "ipc" ), "test_verify_package_integrity()" ) - end - - ## - # Test method for 'AbtSystemManager.test_fix_package()' - ## - def test_fix_package - assert( @system.fix_package( "dummy" ), "test_fix_package()" ) - end - - ## - # Test method for 'AbtSystemManager.test_set_central_repo()' - ## - def test_set_central_repo - assert( @system.set_central_repo( "http://localhost" ), "test_set_central_repo()" ) - end - - ## - # Test method for 'AbtSystemManager.test_set_package_tree_location()' - ## - def test_set_package_tree_location - assert( @system.set_package_tree_location( "/var/lib/ericsPackages" ), "test_set_package_tree_location()" ) - end - - ## - # Test method for 'AbtSystemManager.test_package_installed()' - ## - def test_package_installed - if !@system.package_installed( "ipc" ) - @manager.install_package( "ipc" ) - end - - assert( @system.package_installed( "ipc" ), "test_package_installed()" ) - end - -end Deleted: src/trunk/testsuiteabt.rb =================================================================== --- src/trunk/testsuiteabt.rb 2007-12-31 12:53:26 UTC (rev 458) +++ src/trunk/testsuiteabt.rb 2007-12-31 12:54:11 UTC (rev 459) @@ -1,28 +0,0 @@ -#!/usr/bin/ruby -w - -if ( Process.uid != 0 ) - puts "Enter root password:" - system( 'su -c ./testsuiteabt.rb root' ) - exit -end - -require 'test/unit' -require 'abtconfig' - -# By ensuring an install of the test package ipc -# is done prior to running unit tests, we are able -# to ensure that all needed directories, logs, etc -# are created prior to running the tests. If ipc is -# already installed, this process is not repleated. -# -# This speeds up the test suit by more than 10 sec -# on my machine. I get avg runs of around 17,5 sec. -# -require 'testabtpackagemanager' -require 'testabtlogmanager' -require 'testabtdownloadmanager' -require 'testabtpackage' -require 'testabtqueuemanager' -require 'testabtreportmanager' -require 'testabtsystemmanager' -require 'testabtdepengine' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2007-12-31 12:53:31
|
Revision: 458 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=458&view=rev Author: eschabell Date: 2007-12-31 04:53:26 -0800 (Mon, 31 Dec 2007) Log Message: ----------- Added LOAD_PATH for acutal config and libs directories. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2007-12-31 12:52:46 UTC (rev 457) +++ src/trunk/abt.rb 2007-12-31 12:53:26 UTC (rev 458) @@ -1,5 +1,8 @@ #!/usr/bin/ruby -w +$LOAD_PATH.unshift '/etc/abt/' +$LOAD_PATH.unshift '/var/lib/abt/' + ## # abt.rb # This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2007-12-31 12:52:49
|
Revision: 457 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=457&view=rev Author: eschabell Date: 2007-12-31 04:52:46 -0800 (Mon, 31 Dec 2007) Log Message: ----------- Added initialize of our libs directory. Modified Paths: -------------- src/trunk/abtlogmanager.rb Modified: src/trunk/abtlogmanager.rb =================================================================== --- src/trunk/abtlogmanager.rb 2007-12-31 12:51:46 UTC (rev 456) +++ src/trunk/abtlogmanager.rb 2007-12-31 12:52:46 UTC (rev 457) @@ -79,7 +79,7 @@ ## def initialize logger = Logger.new( $JOURNAL ) - [$ABT_LOGS, $ABT_CACHES, $ABT_STATE, $BUILD_LOCATION, $PACKAGE_INSTALLED, + [$ABT_LOGS, $ABT_CACHES, $ABT_STATE, $BUILD_LOCATION, $PACKAGE_INSTALLED, $ABT_LIBS, $PACKAGE_CACHED, $ABT_TMP, $ABT_CONFIG, $ABT_LOCAL_CONFIG, $SOURCES_REPOSITORY].each { |dir| if ( ! File.directory?( dir ) ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2007-12-31 12:51:42
|
Revision: 456 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=456&view=rev Author: eschabell Date: 2007-12-31 04:51:46 -0800 (Mon, 31 Dec 2007) Log Message: ----------- Updated packages with a LOAD_PATH. Modified Paths: -------------- src/trunk/packages/fortune.rb src/trunk/packages/ipc.rb Modified: src/trunk/packages/fortune.rb =================================================================== --- src/trunk/packages/fortune.rb 2007-12-31 12:50:39 UTC (rev 455) +++ src/trunk/packages/fortune.rb 2007-12-31 12:51:46 UTC (rev 456) @@ -1,5 +1,7 @@ #!/usr/bin/ruby -w +$LOAD_PATH.unshift '../' + require "abtpackage" ## Modified: src/trunk/packages/ipc.rb =================================================================== --- src/trunk/packages/ipc.rb 2007-12-31 12:50:39 UTC (rev 455) +++ src/trunk/packages/ipc.rb 2007-12-31 12:51:46 UTC (rev 456) @@ -1,5 +1,7 @@ #!/usr/bin/ruby -w +$LOAD_PATH.unshift '../' + require 'abtpackage' ## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2007-12-31 12:50:37
|
Revision: 455 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=455&view=rev Author: eschabell Date: 2007-12-31 04:50:39 -0800 (Mon, 31 Dec 2007) Log Message: ----------- Added actual lib path for all our classes. Modified Paths: -------------- src/trunk/abtconfig.rb Modified: src/trunk/abtconfig.rb =================================================================== --- src/trunk/abtconfig.rb 2007-12-31 12:49:44 UTC (rev 454) +++ src/trunk/abtconfig.rb 2007-12-31 12:50:39 UTC (rev 455) @@ -47,6 +47,7 @@ $ABT_STATE = "/var/state/abt" $ABT_TMP = "/tmp/abt" $ABT_CONFIG = "/etc/abt" +$ABT_LIBS = "/var/lib/abt" $ABT_LOCAL_CONFIG = "/etc/abt/local" $ABTNEWS_LOG = "#{$ABT_LOGS}/news.log" $BUILD_LOCATION = "/usr/src" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2007-12-31 12:49:45
|
Revision: 454 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=454&view=rev Author: eschabell Date: 2007-12-31 04:49:44 -0800 (Mon, 31 Dec 2007) Log Message: ----------- Moved tests into apart test directory, also update tests with LOAD_PATH pointing to class lib locations. Added Paths: ----------- src/trunk/tests/ src/trunk/tests/testabtdepengine.rb src/trunk/tests/testabtdownloadmanager.rb src/trunk/tests/testabtlogmanager.rb src/trunk/tests/testabtpackage.rb src/trunk/tests/testabtpackagemanager.rb src/trunk/tests/testabtqueuemanager.rb src/trunk/tests/testabtreportmanager.rb src/trunk/tests/testabtsystemmanager.rb src/trunk/tests/testsuiteabt.rb Copied: src/trunk/tests/testabtdepengine.rb (from rev 450, src/trunk/testabtdepengine.rb) =================================================================== --- src/trunk/tests/testabtdepengine.rb (rev 0) +++ src/trunk/tests/testabtdepengine.rb 2007-12-31 12:49:44 UTC (rev 454) @@ -0,0 +1,55 @@ +#!/usr/bin/ruby -w + +$LOAD_PATH.unshift '../' + +require 'test/unit/testcase' +require 'test/unit/autorunner' +require 'abtconfig' + +## +# testabtdepengine.rb +# +# Unit testing for AbtDepEngine class. +# +# 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 TestAbtDepEngine < Test::Unit::TestCase + + ## + # setup method for testing AbtDepEngine. + ## + def setup + @depEngine = AbtDepEngine.new + end + + ## + # teardown method to cleanup after testing. + ## + def teardown + end + + ## + # Test method for 'AbtDepEngine.test_dep_engine()' + ## + def test_dep_engine + assert_equal( false, true, "test_dep_engine()" ) + end + +end Copied: src/trunk/tests/testabtdownloadmanager.rb (from rev 450, src/trunk/testabtdownloadmanager.rb) =================================================================== --- src/trunk/tests/testabtdownloadmanager.rb (rev 0) +++ src/trunk/tests/testabtdownloadmanager.rb 2007-12-31 12:49:44 UTC (rev 454) @@ -0,0 +1,97 @@ +#!/usr/bin/ruby -w + +$LOAD_PATH.unshift '../' + +require 'test/unit/testcase' +require 'test/unit/autorunner' +require 'abtconfig' + +## +# testabtdownloadmanager.rb +# +# Unit testing for AbtDownloadManager class. +# +# 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 TestAbtDownloadManager < Test::Unit::TestCase + + ## + # setup method for testing AbtDownloadManager. + ## + def setup + @download = AbtDownloadManager.new + @manager = AbtPackageManager.new + @system = AbtSystemManager.new + end + + ## + # teardown method to cleanup after testing. + ## + def teardown + end + + ## + # Test method for 'AbtDownloadManager.test_retrieve_package_source()' + ## + def test_retrieve_package_source() + # ensures download not needed. + FileUtils.cp "#{$PACKAGE_PATH}/ipc-1.4.tar.gz", "#{$SOURCES_REPOSITORY}", :verbose => true if !File.exist?( "#{$SOURCES_REPOSITORY}/ipc-1.4.tar.gz" ) + + assert( @download.retrieve_package_source( "ipc", "#{$SOURCES_REPOSITORY}" ), "test_retrieve_package_source()" ) + end + + ## + # Test method for 'AbtDownloadManager.test_retrieve_package_tree()' + ## + def test_retrieve_package_tree() + assert( @download.retrieve_package_tree( "dummy" ), "test_retrieve_package_tree()" ) + end + + ## + # Test method for 'AbtDownloadManager.test_retrieve_news_feed()' + ## + def test_retrieve_news_feed() + assert( @download.retrieve_news_feed( $ABTNEWS ), "test_retrieve_news_feed()" ) + end + + ## + # Test method for 'AbtDownloadManager.test_update_package()' + ## + def test_update_package() + assert( @download.update_package( "ipc") , "test_update_package()" ) + end + + ## + # Test method for 'AbtDownloadManager.test_update_package_tree()' + ## + def test_update_package_tree() + assert( @download.update_package_tree(), "test_update_package_tree()" ) + end + + ## + # Test method for 'AbtDownloadManager.test_validated()' + ## + def test_validated() + # ensure a tarball is available to test! + FileUtils.cp "#{$PACKAGE_PATH}/ipc-1.4.tar.gz", "#{$SOURCES_REPOSITORY}", :verbose => true if !File.exist?( "#{$SOURCES_REPOSITORY}/ipc-1.4.tar.gz" ) + + assert( @download.validated( 'e81278607b1d65dcb18c3613ec00fbf588b50319', "#{$SOURCES_REPOSITORY}/ipc-1.4.tar.gz" ), "test_validated" ) + end +end Copied: src/trunk/tests/testabtlogmanager.rb (from rev 450, src/trunk/testabtlogmanager.rb) =================================================================== --- src/trunk/tests/testabtlogmanager.rb (rev 0) +++ src/trunk/tests/testabtlogmanager.rb 2007-12-31 12:49:44 UTC (rev 454) @@ -0,0 +1,110 @@ +#!/usr/bin/ruby -w + +$LOAD_PATH.unshift '../' + +require 'test/unit/testcase' +require 'test/unit/autorunner' +require 'abtconfig' + +## +# testabtlogmanager.rb +# +# Unit testing for AbtLogManager class. +# +# 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 TestAbtLogManager < Test::Unit::TestCase + + ## + # setup method for testing AbtLogManager. + ## + def setup + @logger = AbtLogManager.new + @manager = AbtPackageManager.new + @system = AbtSystemManager.new + + # ensures download not needed. + FileUtils.cp "#{$PACKAGE_PATH}/ipc-1.4.tar.gz", "#{$SOURCES_REPOSITORY}", :verbose => true if !File.exist?( "#{$SOURCES_REPOSITORY}/ipc-1.4.tar.gz" ) + end + + ## + # teardown method to cleanup after testing. + ## + def teardown + FileUtils.rm( "#{$ABT_TMP}/ipc-1.4.watch" ) if File.exist?( "#{$ABT_TMP}/ipc-1.2.watch" ) + end + + ## + # Test method for 'AbtLogManager.test_log_package_integrity()' + ## + def test_log_package_integrity() + if !@system.package_installed( "ipc" ) + @manager.install_package( "ipc" ) + end + + assert( @logger.log_package_integrity( "ipc" ), "test_log_package_integrity()" ) + end + + ## + # Test method for 'AbtLogManager.test_log_package_install()' + ## + def test_log_package_install() + if !@system.package_installed( "ipc" ) + @manager.install_package( "ipc" ) + end + + # fill installwatch file. + File.open( "#{$ABT_TMP}/ipc-1.4.watch", "w" ) do |file| + file.puts "5 open /usr/local/bin/ipc #success" + file.puts "0 chmod /usr/local/bin/ipc 00600 #success" + file.puts "0 chown /usr/local/bin/ipc -1 -1 #success" + file.puts "0 chmod /usr/local/bin/ipc 00755 #success" + file.puts "5 open /usr/local/share/ipc/elemente #success" + file.puts "0 chmod /usr/local/share/ipc/elemente 00600 #success" + file.puts "0 chown /usr/local/share/ipc/elemente -1 -1 #success" + file.puts "0 chmod /usr/local/share/ipc/elemente 00644 #success" + end + + assert( @logger.log_package_install( "ipc" ), "test_log_package_install()" ) + end + + ## + # Test method for 'AbtLogManager.test_log_package_build()' + ## + def test_log_package_build() + if !@system.package_installed( "ipc" ) + @manager.install_package( "ipc" ) + end + + assert( @logger.log_package_build( "ipc" ), "test_log_package_build()" ) + end + + ## + # Test method for 'AbtLogManager.test_cache_package()' + ## + def test_cache_package() + if !@system.package_installed( "ipc" ) + @manager.install_package( "ipc" ) + end + + assert( @logger.cache_package( "ipc" ), "test_cache_package()" ) + end + +end Copied: src/trunk/tests/testabtpackage.rb (from rev 450, src/trunk/testabtpackage.rb) =================================================================== --- src/trunk/tests/testabtpackage.rb (rev 0) +++ src/trunk/tests/testabtpackage.rb 2007-12-31 12:49:44 UTC (rev 454) @@ -0,0 +1,147 @@ +#!/usr/bin/ruby -w + +$LOAD_PATH.unshift '../' +$LOAD_PATH.unshift '../packages/' + +require 'test/unit/testcase' +require 'test/unit/autorunner' +require 'abtconfig' +require 'ipc' + +## +# testabtpackage.rb +# +# Unit testing for AbtPackage class. +# +# 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 TestAbtPackage < Test::Unit::TestCase + + $nameTest = "Ipc" + $versionTest = "1.4" + $verbose = false + $srcDirTest = "#{$nameTest.downcase}-#{$versionTest}" + + $dataTest = { + 'name' => $nameTest, + 'execName' => $nameTest.downcase, + 'version' => $versionTest, + 'srcDir' => $srcDirTest, + 'homepage' => "http://isotopatcalc.sourceforge.net/" + } + + ## + # setup method for testing AbtPackage. + ## + def setup + @ipc = Ipc.new + + # ensures download not needed. + FileUtils.cp "#{$PACKAGE_PATH}/ipc-1.4.tar.gz", "#{$SOURCES_REPOSITORY}", :verbose => true if !File.exist? "#{$SOURCES_REPOSITORY}/ipc-1.4.tar.gz" + end + + ## + # teardown method to cleanup after testing. + ## + def teardown + FileUtils.rm_r "#{$BUILD_LOCATION}/#{$dataTest['srcDir']}", :verbose => true if File.exist? "#{$BUILD_LOCATION}/#{$dataTest['srcDir']}" + end + + ## + # Test method for 'AbtPackage.test_details()' + ## + def test_details + assert_equal( $dataTest['name'], @ipc.details['Package name'], "test_details(name)" ) + assert_equal( $dataTest['execName'], @ipc.details['Executable'], "test_details(execName)" ) + assert_equal( $dataTest['version'], @ipc.details['Version'], "test_details(version)" ) + assert_equal( $dataTest['srcDir'], @ipc.details['Source location'], "test_details(srcDir)" ) + assert_equal( $dataTest['homepage'], @ipc.details['Homepage'], "test_details(homepage)" ) + end + + ## + # Test method for 'AbtPackage.test_pre()' + ## + def test_pre + assert( @ipc.pre( $verbose ), "test_pre()" ) + end + + ## + # Test method for 'AbtPackage.test_configure()' + ## + def test_configure + if ( !@ipc.pre( $verbose ) ) + assert_equals( true, false, "test_configure(pre)" ) + end + assert( @ipc.configure( $verbose ), "test_configure(configure)" ) + end + + ## + # Test method for 'AbtPackage.test_build()' + ## + def test_build + if ( !@ipc.pre( $verbose ) ) + assert_equals( true, false, "test_build(pre)" ) + end + if ( !@ipc.configure( $verbose ) ) + assert_equals( true, false, "test_build(configure)" ) + end + assert( @ipc.build( $verbose ), "test_build(build)" ) + end + + ## + # Test method for 'AbtPackage.test_preinstall()' + ## + def test_preinstall + assert( @ipc.preinstall( $verbose ), "test_preinstall()" ) + end + + ## + # Test method for 'AbtPackage.test_install()' + ## + def test_install + + if ( !@ipc.pre( $verbose ) ) + assert_equals( true, false, "test_install(pre)" ) + end + if ( !@ipc.configure( $verbose ) ) + assert_equals( true, false, "test_install(configure)" ) + end + if ( !@ipc.build( $verbose ) ) + assert_equals( true, false, "test_install(build)" ) + end + if ( !@ipc.preinstall( $verbose ) ) + assert_equals( true, false, "test_install(install)" ) + end + assert( @ipc.install( $verbose ), "test_install(install)" ) + end + + ## + # Test method for 'AbtPackage.test_post()' + ## + def test_post + assert_equals( true, false, "test_post(pre)" ) if ( !@ipc.pre( $verbose ) ) + assert_equals( true, false, "test_post(configure)" ) if ( !@ipc.configure( $verbose ) ) + assert_equals( true, false, "test_post(build)" ) if ( !@ipc.build( $verbose ) ) + assert_equals( true, false, "test_post(preinstall)" ) if ( !@ipc.preinstall( $verbose ) ) + assert_equals( true, false, "test_post(install)" ) if ( !@ipc.install( $verbose ) ) + assert( @ipc.post( $verbose ), "test_post(post)" ) + end + +end Copied: src/trunk/tests/testabtpackagemanager.rb (from rev 450, src/trunk/testabtpackagemanager.rb) =================================================================== --- src/trunk/tests/testabtpackagemanager.rb (rev 0) +++ src/trunk/tests/testabtpackagemanager.rb 2007-12-31 12:49:44 UTC (rev 454) @@ -0,0 +1,134 @@ +#!/usr/bin/ruby -w + +$LOAD_PATH.unshift '../' + +require 'test/unit/testcase' +require 'test/unit/autorunner' +require 'abtconfig' + +## +# testabtpackagemanager.rb +# +# Unit testing for AbtPackageManager class. +# +# 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 TestAbtPackageManager < Test::Unit::TestCase + + $verbose = false; # quiets testing output. + + ## + # setup method for testing AbtPackageManager. + ## + def setup + @pkgMgr = AbtPackageManager.new + @manager = AbtPackageManager.new + @system = AbtSystemManager.new + + # ensures download not needed. + FileUtils.cp "#{$PACKAGE_PATH}/ipc-1.4.tar.gz", "#{$SOURCES_REPOSITORY}", :verbose => true if !File.exist?( "#{$SOURCES_REPOSITORY}/ipc-1.4.tar.gz" ) + end + + ## + # teardown method to cleanup after testing. + ## + def teardown + end + + ## + # Test method for 'AbtPackageManager.test_install_package()' + ## + def test_install_package + if @system.package_installed( "ipc" ) + + if @system.package_frozen( "ipc" ) + @manager.freeze_package( "ipc" ) + end + + @manager.remove_package( "ipc" ) + end + + assert( @pkgMgr.install_package( "ipc", $verbose ), "test_install_package()" ) + end + + ## + # Test method for 'AbtPackageManager.test_reinstall_package()' + ## + def test_reinstall_package + if !@system.package_installed( "ipc" ) + @manager.install_package( "ipc" ) + end + + if @system.package_frozen( "ipc" ) + @manager.freeze_package( "ipc" ) + end + + assert( @pkgMgr.reinstall_package( "ipc", true ), "test_reinstall_package()" ) + end + + ## + # Test method for 'AbtPackageManager.test_remove_package()' + ## + def test_remove_package + if !@system.package_installed( "ipc" ) + @manager.install_package( "ipc" ) + end + + if @system.package_frozen( "ipc" ) + @manager.freeze_package( "ipc" ) + end + + assert( @pkgMgr.remove_package( "ipc" ), "test_remove_package()" ) + end + + ## + # Test method for 'AbtPackageManager.test_downgrade_package()' + ## + def test_downgrade_package + if !@system.package_installed( "ipc" ) + @manager.install_package( "ipc" ) + end + + if @system.package_frozen( "ipc" ) + @manager.freeze_package( "ipc" ) + end + + assert( @pkgMgr.downgrade_package( "ipc", "1.2" ), "test_downgrade_package()" ) + end + + ## + # Test method for 'AbtPackageManager.test_freeze_package()' + ## + def test_freeze_package + if !@system.package_installed( "ipc" ) + @manager.install_package( "ipc" ) + end + + if !@system.package_frozen( "ipc" ) + assert( @pkgMgr.freeze_package( "ipc" ), "test_freeze_package()" ) + + # need to return package to initial state, un-frozen. + @pkgMgr.freeze_package( "ipc" ) + else + assert( true ) + end + end + +end Copied: src/trunk/tests/testabtqueuemanager.rb (from rev 450, src/trunk/testabtqueuemanager.rb) =================================================================== --- src/trunk/tests/testabtqueuemanager.rb (rev 0) +++ src/trunk/tests/testabtqueuemanager.rb 2007-12-31 12:49:44 UTC (rev 454) @@ -0,0 +1,58 @@ +#!/usr/bin/ruby -w + +$LOAD_PATH.unshift '../' + +require 'test/unit/testcase' +require 'test/unit/autorunner' +require 'abtconfig' + +## +# testabtqueuemanager.rb +# +# Unit testing for AbtQueueManager class. +# +# 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 TestAbtQueueManager < Test::Unit::TestCase + + ## + # setup method for testing AbtQueueManager. + ## + def setup + @queue = AbtQueueManager.new + end + + ## + # teardown method to cleanup after testing. + ## + def teardown + end + + ## + # Test method for 'AbtQueueManager.action_package_queue()' + ## + def test_action_package_queue + assert( @queue.action_package_queue( "ipc", "install", "add" ), "test_action_package_queue(add)" ) + assert( @queue.action_package_queue( "ipc", "install" ), "test_action_package_queue(default add again)" ) + assert( @queue.action_package_queue( "ipc", "install", "remove" ), "test_action_package_queue(remove)" ) + + end + +end Copied: src/trunk/tests/testabtreportmanager.rb (from rev 450, src/trunk/testabtreportmanager.rb) =================================================================== --- src/trunk/tests/testabtreportmanager.rb (rev 0) +++ src/trunk/tests/testabtreportmanager.rb 2007-12-31 12:49:44 UTC (rev 454) @@ -0,0 +1,171 @@ +#!/usr/bin/ruby -w + +$LOAD_PATH.unshift '../' + +require 'test/unit/testcase' +require 'test/unit/autorunner' +require 'abtconfig' + +## +# testabtreportmanager.rb +# +# Unit testing for AbtReportManager class. +# +# 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 TestAbtReportManager < Test::Unit::TestCase + + ## + # setup method for testing AbtReportManager. + ## + def setup + @report = AbtReportManager.new + @manager = AbtPackageManager.new + @system = AbtSystemManager.new + + # ensure tarball available without downloading. + FileUtils.cp( "#{$PACKAGE_PATH}/ipc-1.4.tar.gz", "#{$SOURCES_REPOSITORY}", :verbose => true ) if !File.exist?( "#{$SOURCES_REPOSITORY}/ipc-1.4.tar.gz" ) + end + + ## + # teardown method to cleanup after testing. + ## + def teardown + # TODO: if test package frozen, unfreeze it. + end + + ## + # Test method for 'AbtReportManager.test_show_package_details()' + ## + def test_show_package_details + assert( @report.show_package_details( "ipc" ), "test_show_package_details()" ) + end + + ## + # Test method for 'AbtReportManager.test_show_installed_packages()' + ## + def test_show_installed_packages + # ensure test pacakge installed for listing. + if !@system.package_installed( "ipc" ) + @manager.install_package( "ipc" ) + end + + assert_nil( @report.show_installed_packages(), "test_show_installed_packages()" ) + end + + ## + # Test method for 'AbtReportManager.test_show_package_log()' + ## + def test_show_package_log + if !@system.package_installed( "ipc" ) + @manager.install_package( "ipc" ) + end + + assert( @report.show_package_log( "ipc", "install" ), "test_show_package_log(install)" ) + assert( @report.show_package_log( "ipc", "build" ), "test_show_package_log(build)" ) + assert( @report.show_package_log( "ipc", "integrity" ), "test_show_package_log(integrity)" ) + end + + ## + # Test method for 'AbtReportManager.test_show_frozen_packages()' + ## + def test_show_frozen_packages + # ensure test package installed. + if !@system.package_installed( "ipc" ) + @manager.install_package( "ipc" ) + end + + # ensure test package freeze. + if !@system.package_frozen( "ipc" ) + @manager.freeze_package "ipc" + end + + assert( @report.show_frozen_packages(), "test_show_frozen_packages()" ) + end + + ## + # Test method for 'AbtReportManager.test_show_package_dependencies()' + ## + def test_show_package_dependencies + assert( false, "test_show_package_dependencies()" ) + end + + ## + # Test method for 'AbtReportManager.test_show_untracked_files()' + ## + def test_show_untracked_files + assert( @report.show_untracked_files(), "test_show_untracked_files()" ) + end + + ## + # Test method for 'AbtReportManager.test_show_journal()' + ## + def test_show_journal + assert( @report.show_journal( $JOURNAL ), "test_show_journal()" ) + end + + ## + # Test method for 'AbtReportManager.test_show_file_owner()' + ## + def test_show_file_owner + # ensure package installed for testing file owner. + if !@system.package_installed( "ipc" ) + @manager.install_package( "ipc" ) + end + + assert( @report.show_file_owner( "ipcFile" ), "test_show_file_owner()" ) + end + + ## + # Test method for 'AbtReportManager.test_search_package_descriptions()' + ## + def test_search_package_descriptions + expectedHash = Hash[ "ipc-1.4" => "IPC is a program that calculates the isotopic distribution of a given chemical formula."] + + assert_equal( @report.search_package_descriptions( "ipc" ), expectedHash, "test_search_package_descriptions()" ) + end + + ## + # Test method for 'AbtReportManager.test_show_queue()' + ## + def test_show_queue + assert_nil( @report.show_queue( "install" ), "test_show_queue(install)" ) + end + + ## + # Test method for 'AbtReportManager.test_show_updates()' + ## + def test_show_updates + assert( @report.show_updates( "ipc" ), "test_show_updates()" ) + end + + ## + # Test method for 'AbtReportManager.test_generate_HTML_package_listing()' + ## + def test_generate_HTML_package_listing + # ensure at least one package is installed. + if !@system.package_installed( "ipc" ) + @manager.install_package( "ipc" ) + end + + assert( @report.generate_HTML_package_listing(), "test_generate_HTML_package_listing()" ) + end + +end Copied: src/trunk/tests/testabtsystemmanager.rb (from rev 450, src/trunk/testabtsystemmanager.rb) =================================================================== --- src/trunk/tests/testabtsystemmanager.rb (rev 0) +++ src/trunk/tests/testabtsystemmanager.rb 2007-12-31 12:49:44 UTC (rev 454) @@ -0,0 +1,136 @@ +#!/usr/bin/ruby -w + +$LOAD_PATH.unshift '../' + +require 'test/unit/testcase' +require 'test/unit/autorunner' +require 'abtconfig' + +## +# testabtsystemmanager.rb +# +# Unit testing for AbtSystemManager class. +# +# 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 TestAbtSystemManager < Test::Unit::TestCase + + ## + # setup method for testing AbtSystemManager. + ## + def setup + @system = AbtSystemManager.new + @manager = AbtPackageManager.new + + # ensure tarball availabe without downloading. + FileUtils.cp( "#{$PACKAGE_PATH}/ipc-1.4.tar.gz", "#{$SOURCES_REPOSITORY}", :verbose => true ) if !File.exist?( "#{$SOURCES_REPOSITORY}/ipc-1.4.tar.gz" ) + end + + ## + # teardown method to cleanup after testing. + ## + def teardown + end + + ## + # Test method for 'AbtSystemManager.test_cleanup_package_sources()' + ## + def test_cleanup_package_sources + # remove test package so that sources can be removed. + if @system.package_installed( "ipc" ) + @manager.remove_package( "ipc" ) + end + + # ensure tarball availabe without downloading. + FileUtils.cp( "#{$PACKAGE_PATH}/ipc-1.4.tar.gz", "#{$SOURCES_REPOSITORY}", :verbose => true ) if !File.exist?( "#{$SOURCES_REPOSITORY}/ipc-1.4.tar.gz" ) + + assert( @system.cleanup_package_sources(), "test_cleanup_package_sources()" ) + end + + ## + # Test method for 'AbtSystemManager.test_verify_installed_files()' + ## + def test_verify_installed_files + # ensure test package installed. + if !@system.package_installed( "ipc" ) + @manager.install_package( "ipc" ) + end + + assert( @system.verify_installed_files( "ipc" ), "test_verify_installed_files()" ) + end + + ## + # Test method for 'AbtSystemManager.test_verify_symlinks()' + ## + def test_verify_symlinks + assert( @system.verify_symlinks( "dummy" ), "test_verify_symlinks()" ) + end + + ## + # Test method for 'AbtSystemManager.test_verify_package_depends()' + ## + def test_verify_package_depends + assert( @system.verify_package_depends( "dummy" ), "test_verify_package_depends()" ) + end + + ## + # Test method for 'AbtSystemManager.test_verify_package_integrity()' + ## + def test_verify_package_integrity + if !@system.package_installed( "ipc" ) + @manager.install_package( "ipc" ) + end + + assert( @system.verify_package_integrity( "ipc" ), "test_verify_package_integrity()" ) + end + + ## + # Test method for 'AbtSystemManager.test_fix_package()' + ## + def test_fix_package + assert( @system.fix_package( "dummy" ), "test_fix_package()" ) + end + + ## + # Test method for 'AbtSystemManager.test_set_central_repo()' + ## + def test_set_central_repo + assert( @system.set_central_repo( "http://localhost" ), "test_set_central_repo()" ) + end + + ## + # Test method for 'AbtSystemManager.test_set_package_tree_location()' + ## + def test_set_package_tree_location + assert( @system.set_package_tree_location( "/var/lib/ericsPackages" ), "test_set_package_tree_location()" ) + end + + ## + # Test method for 'AbtSystemManager.test_package_installed()' + ## + def test_package_installed + if !@system.package_installed( "ipc" ) + @manager.install_package( "ipc" ) + end + + assert( @system.package_installed( "ipc" ), "test_package_installed()" ) + end + +end Copied: src/trunk/tests/testsuiteabt.rb (from rev 450, src/trunk/testsuiteabt.rb) =================================================================== --- src/trunk/tests/testsuiteabt.rb (rev 0) +++ src/trunk/tests/testsuiteabt.rb 2007-12-31 12:49:44 UTC (rev 454) @@ -0,0 +1,30 @@ +#!/usr/bin/ruby -w + +if ( Process.uid != 0 ) + puts "Enter root password:" + system( 'su -c ./testsuiteabt.rb root' ) + exit +end + +$LOAD_PATH.unshift '../' + +require 'test/unit' +require 'abtconfig' + +# By ensuring an install of the test package ipc +# is done prior to running unit tests, we are able +# to ensure that all needed directories, logs, etc +# are created prior to running the tests. If ipc is +# already installed, this process is not repleated. +# +# This speeds up the test suit by more than 10 sec +# on my machine. I get avg runs of around 17,5 sec. +# +require 'testabtpackagemanager' +require 'testabtlogmanager' +require 'testabtdownloadmanager' +require 'testabtpackage' +require 'testabtqueuemanager' +require 'testabtreportmanager' +require 'testabtsystemmanager' +require 'testabtdepengine' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2007-12-31 11:29:36
|
Revision: 453 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=453&view=rev Author: eschabell Date: 2007-12-31 03:29:35 -0800 (Mon, 31 Dec 2007) Log Message: ----------- Regenerated api docs. Modified Paths: -------------- src/trunk/doc/classes/AbtDepEngine.html src/trunk/doc/classes/AbtPackageManager.html src/trunk/doc/classes/AbtReportManager.html src/trunk/doc/classes/AbtSystemManager.html src/trunk/doc/created.rid src/trunk/doc/files/abtdepengine_rb.html src/trunk/doc/files/abtpackagemanager_rb.html src/trunk/doc/files/abtreportmanager_rb.html src/trunk/doc/files/abtsystemmanager_rb.html Modified: src/trunk/doc/classes/AbtDepEngine.html =================================================================== --- src/trunk/doc/classes/AbtDepEngine.html 2007-12-31 11:27:36 UTC (rev 452) +++ src/trunk/doc/classes/AbtDepEngine.html 2007-12-31 11:29:35 UTC (rev 453) @@ -146,7 +146,8 @@ <pre> <span class="ruby-comment cmt"># File abtdepengine.rb, line 41</span> 41: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> -42: <span class="ruby-keyword kw">end</span> +42: <span class="ruby-comment cmt"># TODO: implement this.</span> +43: <span class="ruby-keyword kw">end</span> </pre> </div> </div> Modified: src/trunk/doc/classes/AbtPackageManager.html =================================================================== --- src/trunk/doc/classes/AbtPackageManager.html 2007-12-31 11:27:36 UTC (rev 452) +++ src/trunk/doc/classes/AbtPackageManager.html 2007-12-31 11:29:35 UTC (rev 453) @@ -585,16 +585,17 @@ 411: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">root_login</span>( <span class="ruby-identifier">arguments</span> ) 412: <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> ) 413: <span class="ruby-identifier">args</span> = <span class="ruby-value str">""</span> -414: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\nEnter root password:"</span> -415: -416: <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> -417: <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>] -418: <span class="ruby-keyword kw">end</span> -419: -420: <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> ) -421: <span class="ruby-identifier">exit</span> -422: <span class="ruby-keyword kw">end</span> -423: <span class="ruby-keyword kw">end</span> +414: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\nYou need to be root for accessing the requested functionality.\n"</span> +415: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\nEnter root password:"</span> +416: +417: <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> +418: <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>] +419: <span class="ruby-keyword kw">end</span> +420: +421: <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> ) +422: <span class="ruby-identifier">exit</span> +423: <span class="ruby-keyword kw">end</span> +424: <span class="ruby-keyword kw">end</span> </pre> </div> </div> Modified: src/trunk/doc/classes/AbtReportManager.html =================================================================== --- src/trunk/doc/classes/AbtReportManager.html 2007-12-31 11:27:36 UTC (rev 452) +++ src/trunk/doc/classes/AbtReportManager.html 2007-12-31 11:29:35 UTC (rev 453) @@ -179,10 +179,11 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000125_source')" id="l_M000125_source">show source</a> ]</p> <div id="M000125_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtreportmanager.rb, line 330</span> -330: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generate_HTML_package_listing</span> -331: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -332: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File abtreportmanager.rb, line 334</span> +334: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generate_HTML_package_listing</span> +335: <span class="ruby-comment cmt"># TODO: implement this.</span> +336: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +337: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -208,41 +209,41 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000122_source')" id="l_M000122_source">show source</a> ]</p> <div id="M000122_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtreportmanager.rb, line 246</span> -246: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">search_package_descriptions</span>( <span class="ruby-identifier">searchText</span> ) -247: <span class="ruby-identifier">packageHash</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span> <span class="ruby-comment cmt"># has for values found.</span> -248: -249: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">entries</span>( <span class="ruby-identifier">$PACKAGE_INSTALLED</span> ) <span class="ruby-operator">-</span> [ <span class="ruby-value str">'.'</span>, <span class="ruby-value str">'..'</span> ] ).<span class="ruby-identifier">empty?</span> -250: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">packageHash</span> <span class="ruby-comment cmt"># empty hash, no entries.</span> -251: <span class="ruby-keyword kw">else</span> -252: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">foreach</span>( <span class="ruby-identifier">$PACKAGE_INSTALLED</span> ) { <span class="ruby-operator">|</span><span class="ruby-identifier">package</span><span class="ruby-operator">|</span> -253: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">package</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">"."</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">package</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">".."</span>) -254: <span class="ruby-comment cmt"># split the installed entry into two parts,</span> -255: <span class="ruby-comment cmt"># the package name and the version number.</span> -256: <span class="ruby-identifier">packageArray</span> = <span class="ruby-identifier">package</span>.<span class="ruby-identifier">split</span>( <span class="ruby-value str">"-"</span> ) -257: <span class="ruby-identifier">packageName</span> = <span class="ruby-identifier">packageArray</span>[<span class="ruby-value">0</span>] -258: -259: <span class="ruby-comment cmt"># check for match to name and description if the package file exists.</span> -260: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>( <span class="ruby-node">"#{$PACKAGE_PATH}#{packageName}.rb"</span> ) ) -261: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}#{packageName}"</span> -262: <span class="ruby-identifier">sw</span> = <span class="ruby-identifier">eval</span>( <span class="ruby-node">"#{packageName.capitalize}.new"</span> ) -263: -264: <span class="ruby-comment cmt"># add if matches name or description entries.</span> -265: <span class="ruby-identifier">matchesArray</span> = <span class="ruby-identifier">sw</span>.<span class="ruby-identifier">description</span>.<span class="ruby-identifier">scan</span>( <span class="ruby-identifier">searchText</span> ) -266: <span class="ruby-identifier">matchesArray</span> = <span class="ruby-identifier">matchesArray</span>.<span class="ruby-identifier">concat</span>( <span class="ruby-identifier">packageName</span>.<span class="ruby-identifier">scan</span>( <span class="ruby-identifier">searchText</span> ) ) -267: -268: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">matchesArray</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span> ) -269: <span class="ruby-comment cmt"># matches so add to hash.</span> -270: <span class="ruby-identifier">packageHash</span> = <span class="ruby-identifier">packageHash</span>.<span class="ruby-identifier">merge</span>( <span class="ruby-constant">Hash</span>[ <span class="ruby-node">"#{package}"</span> =<span class="ruby-operator">></span> <span class="ruby-node">"#{sw.description}"</span> ] ) -271: <span class="ruby-keyword kw">end</span> -272: <span class="ruby-keyword kw">end</span> -273: <span class="ruby-keyword kw">end</span> -274: } -275: <span class="ruby-keyword kw">end</span> -276: -277: <span class="ruby-comment cmt"># finished search results.</span> -278: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">packageHash</span> -279: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File abtreportmanager.rb, line 249</span> +249: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">search_package_descriptions</span>( <span class="ruby-identifier">searchText</span> ) +250: <span class="ruby-identifier">packageHash</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span> <span class="ruby-comment cmt"># has for values found.</span> +251: +252: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">entries</span>( <span class="ruby-identifier">$PACKAGE_INSTALLED</span> ) <span class="ruby-operator">-</span> [ <span class="ruby-value str">'.'</span>, <span class="ruby-value str">'..'</span> ] ).<span class="ruby-identifier">empty?</span> +253: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">packageHash</span> <span class="ruby-comment cmt"># empty hash, no entries.</span> +254: <span class="ruby-keyword kw">else</span> +255: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">foreach</span>( <span class="ruby-identifier">$PACKAGE_INSTALLED</span> ) { <span class="ruby-operator">|</span><span class="ruby-identifier">package</span><span class="ruby-operator">|</span> +256: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">package</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">"."</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">package</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">".."</span>) +257: <span class="ruby-comment cmt"># split the installed entry into two parts,</span> +258: <span class="ruby-comment cmt"># the package name and the version number.</span> +259: <span class="ruby-identifier">packageArray</span> = <span class="ruby-identifier">package</span>.<span class="ruby-identifier">split</span>( <span class="ruby-value str">"-"</span> ) +260: <span class="ruby-identifier">packageName</span> = <span class="ruby-identifier">packageArray</span>[<span class="ruby-value">0</span>] +261: +262: <span class="ruby-comment cmt"># check for match to name and description if the package file exists.</span> +263: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>( <span class="ruby-node">"#{$PACKAGE_PATH}#{packageName}.rb"</span> ) ) +264: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}#{packageName}"</span> +265: <span class="ruby-identifier">sw</span> = <span class="ruby-identifier">eval</span>( <span class="ruby-node">"#{packageName.capitalize}.new"</span> ) +266: +267: <span class="ruby-comment cmt"># add if matches name or description entries.</span> +268: <span class="ruby-identifier">matchesArray</span> = <span class="ruby-identifier">sw</span>.<span class="ruby-identifier">description</span>.<span class="ruby-identifier">scan</span>( <span class="ruby-identifier">searchText</span> ) +269: <span class="ruby-identifier">matchesArray</span> = <span class="ruby-identifier">matchesArray</span>.<span class="ruby-identifier">concat</span>( <span class="ruby-identifier">packageName</span>.<span class="ruby-identifier">scan</span>( <span class="ruby-identifier">searchText</span> ) ) +270: +271: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">matchesArray</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span> ) +272: <span class="ruby-comment cmt"># matches so add to hash.</span> +273: <span class="ruby-identifier">packageHash</span> = <span class="ruby-identifier">packageHash</span>.<span class="ruby-identifier">merge</span>( <span class="ruby-constant">Hash</span>[ <span class="ruby-node">"#{package}"</span> =<span class="ruby-operator">></span> <span class="ruby-node">"#{sw.description}"</span> ] ) +274: <span class="ruby-keyword kw">end</span> +275: <span class="ruby-keyword kw">end</span> +276: <span class="ruby-keyword kw">end</span> +277: } +278: <span class="ruby-keyword kw">end</span> +279: +280: <span class="ruby-comment cmt"># finished search results.</span> +281: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">packageHash</span> +282: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -266,10 +267,11 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000121_source')" id="l_M000121_source">show source</a> ]</p> <div id="M000121_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtreportmanager.rb, line 233</span> -233: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_file_owner</span>( <span class="ruby-identifier">file</span> ) -234: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -235: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File abtreportmanager.rb, line 235</span> +235: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_file_owner</span>( <span class="ruby-identifier">file</span> ) +236: <span class="ruby-comment cmt"># TODO: implement this.</span> +237: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +238: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -382,24 +384,24 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000120_source')" id="l_M000120_source">show source</a> ]</p> <div id="M000120_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtreportmanager.rb, line 208</span> -208: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_journal</span>( <span class="ruby-identifier">fileName</span> ) -209: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>( <span class="ruby-identifier">fileName</span> ) ) -210: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> -211: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"AbTLinux log:"</span> -212: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"============="</span> -213: <span class="ruby-identifier">log</span> = <span class="ruby-constant">IO</span>.<span class="ruby-identifier">readlines</span>( <span class="ruby-identifier">fileName</span> ) -214: <span class="ruby-identifier">log</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">entry</span><span class="ruby-operator">|</span> <span class="ruby-identifier">puts</span> <span class="ruby-identifier">entry</span> } -215: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> -216: <span class="ruby-keyword kw">else</span> + <span class="ruby-comment cmt"># File abtreportmanager.rb, line 210</span> +210: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_journal</span>( <span class="ruby-identifier">fileName</span> ) +211: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>( <span class="ruby-identifier">fileName</span> ) ) +212: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> +213: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"AbTLinux log:"</span> +214: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"============="</span> +215: <span class="ruby-identifier">log</span> = <span class="ruby-constant">IO</span>.<span class="ruby-identifier">readlines</span>( <span class="ruby-identifier">fileName</span> ) +216: <span class="ruby-identifier">log</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">entry</span><span class="ruby-operator">|</span> <span class="ruby-identifier">puts</span> <span class="ruby-identifier">entry</span> } 217: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> -218: <span class="ruby-identifier">puts</span> <span class="ruby-node">"AbtLinux log ( #{File.basename( fileName )} ) "</span> <span class="ruby-operator">+</span> -219: <span class="ruby-value str">"is empty at this time."</span> -220: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> -221: <span class="ruby-keyword kw">end</span> -222: -223: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -224: <span class="ruby-keyword kw">end</span> +218: <span class="ruby-keyword kw">else</span> +219: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> +220: <span class="ruby-identifier">puts</span> <span class="ruby-node">"AbtLinux log ( #{File.basename( fileName )} ) "</span> <span class="ruby-operator">+</span> +221: <span class="ruby-value str">"is empty at this time."</span> +222: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</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> </pre> </div> </div> @@ -428,8 +430,9 @@ <pre> <span class="ruby-comment cmt"># File abtreportmanager.rb, line 186</span> 186: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_package_dependencies</span>( <span class="ruby-identifier">package</span> ) -187: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -188: <span class="ruby-keyword kw">end</span> +187: <span class="ruby-comment cmt"># TODO: implement this.</span> +188: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +189: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -559,28 +562,28 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000123_source')" id="l_M000123_source">show source</a> ]</p> <div id="M000123_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtreportmanager.rb, line 289</span> -289: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_queue</span>( <span class="ruby-identifier">queueType</span> ) -290: -291: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">queueType</span> -292: -293: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"install"</span> -294: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>( <span class="ruby-node">"#{$ABT_LOGS}/#{queueType}.queue"</span> ) ) -295: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> -296: <span class="ruby-identifier">puts</span> <span class="ruby-node">"AbTLinux #{queueType} queue:"</span> -297: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"======================="</span> -298: <span class="ruby-identifier">queue</span> = <span class="ruby-constant">IO</span>.<span class="ruby-identifier">readlines</span>( <span class="ruby-node">"#{$ABT_LOGS}/#{queueType}.queue"</span> ) -299: <span class="ruby-identifier">queue</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">entry</span><span class="ruby-operator">|</span> <span class="ruby-identifier">puts</span> <span class="ruby-identifier">entry</span> } -300: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> -301: <span class="ruby-keyword kw">else</span> -302: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> -303: <span class="ruby-identifier">puts</span> <span class="ruby-node">"AbtLinux #{queueType} is empty at this time."</span> -304: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> -305: <span class="ruby-keyword kw">end</span> -306: <span class="ruby-keyword kw">else</span> -307: <span class="ruby-identifier">puts</span> <span class="ruby-node">"#{queueType.capitalize} is not an AbTLinux queue."</span> -308: <span class="ruby-keyword kw">end</span> -309: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File abtreportmanager.rb, line 292</span> +292: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_queue</span>( <span class="ruby-identifier">queueType</span> ) +293: +294: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">queueType</span> +295: +296: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"install"</span> +297: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>( <span class="ruby-node">"#{$ABT_LOGS}/#{queueType}.queue"</span> ) ) +298: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> +299: <span class="ruby-identifier">puts</span> <span class="ruby-node">"AbTLinux #{queueType} queue:"</span> +300: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"======================="</span> +301: <span class="ruby-identifier">queue</span> = <span class="ruby-constant">IO</span>.<span class="ruby-identifier">readlines</span>( <span class="ruby-node">"#{$ABT_LOGS}/#{queueType}.queue"</span> ) +302: <span class="ruby-identifier">queue</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">entry</span><span class="ruby-operator">|</span> <span class="ruby-identifier">puts</span> <span class="ruby-identifier">entry</span> } +303: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> +304: <span class="ruby-keyword kw">else</span> +305: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> +306: <span class="ruby-identifier">puts</span> <span class="ruby-node">"AbtLinux #{queueType} is empty at this time."</span> +307: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> +308: <span class="ruby-keyword kw">end</span> +309: <span class="ruby-keyword kw">else</span> +310: <span class="ruby-identifier">puts</span> <span class="ruby-node">"#{queueType.capitalize} is not an AbTLinux queue."</span> +311: <span class="ruby-keyword kw">end</span> +312: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -602,10 +605,11 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000119_source')" id="l_M000119_source">show source</a> ]</p> <div id="M000119_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtreportmanager.rb, line 197</span> -197: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_untracked_files</span> -198: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -199: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File abtreportmanager.rb, line 198</span> +198: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_untracked_files</span> +199: <span class="ruby-comment cmt"># TODO: implement this.</span> +200: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +201: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -632,10 +636,11 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000124_source')" id="l_M000124_source">show source</a> ]</p> <div id="M000124_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtreportmanager.rb, line 321</span> -321: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_updates</span>( <span class="ruby-identifier">target</span> ) -322: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -323: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File abtreportmanager.rb, line 324</span> +324: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_updates</span>( <span class="ruby-identifier">target</span> ) +325: <span class="ruby-comment cmt"># TODO: implement this.</span> +326: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +327: <span class="ruby-keyword kw">end</span> </pre> </div> </div> Modified: src/trunk/doc/classes/AbtSystemManager.html =================================================================== --- src/trunk/doc/classes/AbtSystemManager.html 2007-12-31 11:27:36 UTC (rev 452) +++ src/trunk/doc/classes/AbtSystemManager.html 2007-12-31 11:29:35 UTC (rev 453) @@ -254,10 +254,11 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000007_source')" id="l_M000007_source">show source</a> ]</p> <div id="M000007_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtsystemmanager.rb, line 249</span> -249: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fix_package</span>( <span class="ruby-identifier">package</span> ) -250: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -251: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File abtsystemmanager.rb, line 251</span> +251: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fix_package</span>( <span class="ruby-identifier">package</span> ) +252: <span class="ruby-comment cmt"># TODO: implement this.</span> +253: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +254: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -283,18 +284,18 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000011_source')" id="l_M000011_source">show source</a> ]</p> <div id="M000011_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtsystemmanager.rb, line 307</span> -307: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">package_frozen</span>( <span class="ruby-identifier">package</span> ) -308: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}#{package}"</span> -309: <span class="ruby-identifier">sw</span> = <span class="ruby-identifier">eval</span>( <span class="ruby-node">"#{package.capitalize}.new"</span> ) -310: -311: <span class="ruby-comment cmt"># looking for frozen log file.</span> -312: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">found_entry</span>( <span class="ruby-node">"#{$PACKAGE_INSTALLED}/#{sw.srcDir}"</span>, <span class="ruby-value str">"frozen.log"</span> ) ) -313: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -314: <span class="ruby-keyword kw">end</span> -315: -316: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -317: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File abtsystemmanager.rb, line 312</span> +312: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">package_frozen</span>( <span class="ruby-identifier">package</span> ) +313: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}#{package}"</span> +314: <span class="ruby-identifier">sw</span> = <span class="ruby-identifier">eval</span>( <span class="ruby-node">"#{package.capitalize}.new"</span> ) +315: +316: <span class="ruby-comment cmt"># looking for frozen log file.</span> +317: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">found_entry</span>( <span class="ruby-node">"#{$PACKAGE_INSTALLED}/#{sw.srcDir}"</span>, <span class="ruby-value str">"frozen.log"</span> ) ) +318: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +319: <span class="ruby-keyword kw">end</span> +320: +321: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +322: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -320,17 +321,17 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000010_source')" id="l_M000010_source">show source</a> ]</p> <div id="M000010_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtsystemmanager.rb, line 287</span> -287: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">package_installed</span>( <span class="ruby-identifier">package</span> ) -288: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}#{package}"</span> -289: <span class="ruby-identifier">sw</span> = <span class="ruby-identifier">eval</span>( <span class="ruby-node">"#{package.capitalize}.new"</span> ) -290: -291: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">found_entry</span>( <span class="ruby-identifier">$PACKAGE_INSTALLED</span>, <span class="ruby-identifier">sw</span>.<span class="ruby-identifier">srcDir</span> ) ) -292: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -293: <span class="ruby-keyword kw">end</span> -294: -295: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -296: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File abtsystemmanager.rb, line 292</span> +292: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">package_installed</span>( <span class="ruby-identifier">package</span> ) +293: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}#{package}"</span> +294: <span class="ruby-identifier">sw</span> = <span class="ruby-identifier">eval</span>( <span class="ruby-node">"#{package.capitalize}.new"</span> ) +295: +296: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">found_entry</span>( <span class="ruby-identifier">$PACKAGE_INSTALLED</span>, <span class="ruby-identifier">sw</span>.<span class="ruby-identifier">srcDir</span> ) ) +297: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +298: <span class="ruby-keyword kw">end</span> +299: +300: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +301: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -355,10 +356,11 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000008_source')" id="l_M000008_source">show source</a> ]</p> <div id="M000008_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtsystemmanager.rb, line 261</span> -261: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_central_repo</span>( <span class="ruby-identifier">uri</span> ) -262: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -263: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File abtsystemmanager.rb, line 264</span> +264: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_central_repo</span>( <span class="ruby-identifier">uri</span> ) +265: <span class="ruby-comment cmt"># TODO: implement this.</span> +266: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +267: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -384,10 +386,11 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000009_source')" id="l_M000009_source">show source</a> ]</p> <div id="M000009_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtsystemmanager.rb, line 274</span> -274: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_package_tree_location</span>( <span class="ruby-identifier">location</span> ) -275: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -276: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File abtsystemmanager.rb, line 278</span> +278: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_package_tree_location</span>( <span class="ruby-identifier">location</span> ) +279: <span class="ruby-comment cmt"># TODO: implement this.</span> +280: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +281: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -464,10 +467,11 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000005_source')" id="l_M000005_source">show source</a> ]</p> <div id="M000005_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtsystemmanager.rb, line 182</span> -182: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">verify_package_depends</span>( <span class="ruby-identifier">package</span> ) -183: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -184: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File abtsystemmanager.rb, line 183</span> +183: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">verify_package_depends</span>( <span class="ruby-identifier">package</span> ) +184: <span class="ruby-comment cmt"># TODO: implement this.</span> +185: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +186: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -494,51 +498,51 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000006_source')" id="l_M000006_source">show source</a> ]</p> <div id="M000006_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File abtsystemmanager.rb, line 196</span> -196: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">verify_package_integrity</span>( <span class="ruby-identifier">package</span> ) -197: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}#{package}"</span> -198: <span class="ruby-identifier">sw</span> = <span class="ruby-identifier">eval</span>( <span class="ruby-node">"#{package.capitalize}.new"</span> ) -199: -200: <span class="ruby-comment cmt"># TODO: refactor myLogger.</span> -201: <span class="ruby-identifier">myLogger</span> = <span class="ruby-constant">AbtLogManager</span>.<span class="ruby-identifier">new</span> -202: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">$JOURNAL</span> ) -203: <span class="ruby-identifier">integrityHash</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span> <span class="ruby-comment cmt"># holds files failing interity check.</span> -204: -205: <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-node">"#{$PACKAGE_INSTALLED}/#{sw.srcDir}/#{sw.srcDir}.integrity"</span> ) -206: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>( <span class="ruby-node">"Unable to check file integrity for #{package}, integrity log missing!"</span> ) -207: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">integrityHash</span> <span class="ruby-comment cmt"># empty hash, no entries.</span> -208: <span class="ruby-keyword kw">else</span> -209: -210: <span class="ruby-comment cmt"># FIXME: pickup each integrity file and check each entry (filename integrityvalue)</span> -211: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>( <span class="ruby-identifier">myLogger</span>.<span class="ruby-identifier">get_log</span>( <span class="ruby-identifier">package</span>, <span class="ruby-value str">"integrity"</span> ) ).<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> -212: -213: <span class="ruby-comment cmt"># seperate the filepath and integrity value.</span> -214: <span class="ruby-identifier">lineArray</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>( <span class="ruby-value str">':'</span> ) -215: -216: <span class="ruby-comment cmt"># check for existing file.</span> -217: <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">lineArray</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">chomp</span> ) -218: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>( <span class="ruby-node">"The file : #{lineArray[0].chomp} is missing for #{package}."</span> ) -219: -220: <span class="ruby-comment cmt"># any failure or discrepency is added to hash: file => package + problem</span> -221: <span class="ruby-identifier">integrityHash</span> = <span class="ruby-identifier">integrityHash</span>.<span class="ruby-identifier">merge</span>( <span class="ruby-constant">Hash</span>[ <span class="ruby-identifier">lineArray</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">chomp</span> =<span class="ruby-operator">></span> <span class="ruby-node">"#{package} - file missing."</span> ] ) -222: <span class="ruby-keyword kw">end</span> -223: -224: <span class="ruby-comment cmt"># passed existence check, now integrity check, need to ensure</span> -225: <span class="ruby-comment cmt"># value computed matches our logged octal results. This requires</span> -226: <span class="ruby-comment cmt"># computing the results, converting to octal, then chop off the </span> -227: <span class="ruby-comment cmt"># first char by reversing the string and chopping the last (is</span> -228: <span class="ruby-comment cmt"># there a better way?) char and then reversing those results.</span> -229: <span class="ruby-identifier">octalResults</span> = <span class="ruby-value str">'%07o'</span> <span class="ruby-operator">%</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">lstat</span>( <span class="ruby-identifier">lineArray</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">chomp</span> ).<span class="ruby-identifier">mode</span> -230: -231: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">lineArray</span>[<span class="ruby-value">1</span>].<span class="ruby-identifier">chomp</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">octalResults</span>.<span class="ruby-identifier">reverse</span>.<span class="ruby-identifier">chop</span>.<span class="ruby-identifier">reverse</span> -232: <span class="ruby-comment cmt"># any failure or discrepency is added to hash: file => package + problem</span> -233: <span class="ruby-identifier">integrityHash</span> = <span class="ruby-identifier">integrityHash</span>.<span class="ruby-identifier">merge</span>( <span class="ruby-constant">Hash</span>[ <span class="ruby-identifier">file</span> =<span class="ruby-operator">></span> <span class="ruby-node">"#{package} #{sw.description}"</span> ] ) -234: <span class="ruby-keyword kw">end</span> -235: } -236: <span class="ruby-keyword kw">end</span> -237: -238: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">integrityHash</span> -239: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File abtsystemmanager.rb, line 198</span> +198: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">verify_package_integrity</span>( <span class="ruby-identifier">package</span> ) +199: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}#{package}"</span> +200: <span class="ruby-identifier">sw</span> = <span class="ruby-identifier">eval</span>( <span class="ruby-node">"#{package.capitalize}.new"</span> ) +201: +202: <span class="ruby-comment cmt"># TODO: refactor myLogger.</span> +203: <span class="ruby-identifier">myLogger</span> = <span class="ruby-constant">AbtLogManager</span>.<span class="ruby-identifier">new</span> +204: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">$JOURNAL</span> ) +205: <span class="ruby-identifier">integrityHash</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span> <span class="ruby-comment cmt"># holds files failing interity check.</span> +206: +207: <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-node">"#{$PACKAGE_INSTALLED}/#{sw.srcDir}/#{sw.srcDir}.integrity"</span> ) +208: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>( <span class="ruby-node">"Unable to check file integrity for #{package}, integrity log missing!"</span> ) +209: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">integrityHash</span> <span class="ruby-comment cmt"># empty hash, no entries.</span> +210: <span class="ruby-keyword kw">else</span> +211: +212: <span class="ruby-comment cmt"># FIXME: pickup each integrity file and check each entry (filename integrityvalue)</span> +213: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>( <span class="ruby-identifier">myLogger</span>.<span class="ruby-identifier">get_log</span>( <span class="ruby-identifier">package</span>, <span class="ruby-value str">"integrity"</span> ) ).<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> +214: +215: <span class="ruby-comment cmt"># seperate the filepath and integrity value.</span> +216: <span class="ruby-identifier">lineArray</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>( <span class="ruby-value str">':'</span> ) +217: +218: <span class="ruby-comment cmt"># check for existing file.</span> +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">lineArray</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">chomp</span> ) +220: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>( <span class="ruby-node">"The file : #{lineArray[0].chomp} is missing for #{package}."</span> ) +221: +222: <span class="ruby-comment cmt"># any failure or discrepency is added to hash: file => package + problem</span> +223: <span class="ruby-identifier">integrityHash</span> = <span class="ruby-identifier">integrityHash</span>.<span class="ruby-identifier">merge</span>( <span class="ruby-constant">Hash</span>[ <span class="ruby-identifier">lineArray</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">chomp</span> =<span class="ruby-operator">></span> <span class="ruby-node">"#{package} - file missing."</span> ] ) +224: <span class="ruby-keyword kw">end</span> +225: +226: <span class="ruby-comment cmt"># passed existence check, now integrity check, need to ensure</span> +227: <span class="ruby-comment cmt"># value computed matches our logged octal results. This requires</span> +228: <span class="ruby-comment cmt"># computing the results, converting to octal, then chop off the </span> +229: <span class="ruby-comment cmt"># first char by reversing the string and chopping the last (is</span> +230: <span class="ruby-comment cmt"># there a better way?) char and then reversing those results.</span> +231: <span class="ruby-identifier">octalResults</span> = <span class="ruby-value str">'%07o'</span> <span class="ruby-operator">%</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">lstat</span>( <span class="ruby-identifier">lineArray</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">chomp</span> ).<span class="ruby-identifier">mode</span> +232: +233: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">lineArray</span>[<span class="ruby-value">1</span>].<span class="ruby-identifier">chomp</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">octalResults</span>.<span class="ruby-identifier">reverse</span>.<span class="ruby-identifier">chop</span>.<span class="ruby-identifier">reverse</span> +234: <span class="ruby-comment cmt"># any failure or discrepency is added to hash: file => package + problem</span> +235: <span class="ruby-identifier">integrityHash</span> = <span class="ruby-identifier">integrityHash</span>.<span class="ruby-identifier">merge</span>( <span class="ruby-constant">Hash</span>[ <span class="ruby-identifier">file</span> =<span class="ruby-operator">></span> <span class="ruby-node">"#{package} #{sw.description}"</span> ] ) +236: <span class="ruby-keyword kw">end</span> +237: } +238: <span class="ruby-keyword kw">end</span> +239: +240: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">integrityHash</span> +241: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -565,8 +569,9 @@ <pre> <span class="ruby-comment cmt"># File abtsystemmanager.rb, line 170</span> 170: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">verify_symlinks</span>( <span class="ruby-identifier">package</span> ) -171: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -172: <span class="ruby-keyword kw">end</span> +171: <span class="ruby-comment cmt"># TODO: implement this.</span> +172: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +173: <span class="ruby-keyword kw">end</span> </pre> </div> </div> Modified: src/trunk/doc/created.rid =================================================================== --- src/trunk/doc/created.rid 2007-12-31 11:27:36 UTC (rev 452) +++ src/trunk/doc/created.rid 2007-12-31 11:29:35 UTC (rev 453) @@ -1 +1 @@ -Thu Dec 27 20:15:11 +0100 2007 +Mon Dec 31 12:21:36 +0100 2007 Modified: src/trunk/doc/files/abtdepengine_rb.html =================================================================== --- src/trunk/doc/files/abtdepengine_rb.html 2007-12-31 11:27:36 UTC (rev 452) +++ src/trunk/doc/files/abtdepengine_rb.html 2007-12-31 11:29:35 UTC (rev 453) @@ -63,7 +63,7 @@ </tr> <tr> <td>Modified:</td> - <td>Tue Jul 17 10:06:29 +0200 2007</td> + <td>Mon Dec 31 11:33:12 +0100 2007</td> </tr> </table> </td></tr> Modified: src/trunk/doc/files/abtpackagemanager_rb.html =================================================================== --- src/trunk/doc/files/abtpackagemanager_rb.html 2007-12-31 11:27:36 UTC (rev 452) +++ src/trunk/doc/files/abtpackagemanager_rb.html 2007-12-31 11:29:35 UTC (rev 453) @@ -63,7 +63,7 @@ </tr> <tr> <td>Modified:</td> - <td>Thu Dec 27 19:58:19 +0100 2007</td> + <td>Mon Dec 31 12:15:42 +0100 2007</td> </tr> </table> </td></tr> Modified: src/trunk/doc/files/abtreportmanager_rb.html =================================================================== --- src/trunk/doc/files/abtreportmanager_rb.html 2007-12-31 11:27:36 UTC (rev 452) +++ src/trunk/doc/files/abtreportmanager_rb.html 2007-12-31 11:29:35 UTC (rev 453) @@ -63,7 +63,7 @@ </tr> <tr> <td>Modified:</td> - <td>Thu Dec 27 19:13:14 +0100 2007</td> + <td>Mon Dec 31 11:33:12 +0100 2007</td> </tr> </table> </td></tr> Modified: src/trunk/doc/files/abtsystemmanager_rb.html =================================================================== --- src/trunk/doc/files/abtsystemmanager_rb.html 2007-12-31 11:27:36 UTC (rev 452) +++ src/trunk/doc/files/abtsystemmanager_rb.html 2007-12-31 11:29:35 UTC (rev 453) @@ -63,7 +63,7 @@ </tr> <tr> <td>Modified:</td> - <td>Tue Dec 25 14:53:06 +0100 2007</td> + <td>Mon Dec 31 11:33:12 +0100 2007</td> </tr> </table> </td></tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |