Thread: [Abtlinux-svn] SF.net SVN: abtlinux: [144] src/trunk/abt.rb
Status: Alpha
Brought to you by:
eschabell
From: <esc...@us...> - 2006-10-08 12:27:31
|
Revision: 144 http://svn.sourceforge.net/abtlinux/?rev=144&view=rev Author: eschabell Date: 2006-10-08 05:27:25 -0700 (Sun, 08 Oct 2006) Log Message: ----------- Have started adding option processing code for abt script. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-10-08 11:49:50 UTC (rev 143) +++ src/trunk/abt.rb 2006-10-08 12:27:25 UTC (rev 144) @@ -27,4 +27,18 @@ require "AbtPackageManager" require "AbtLogManager" require "AbtReportManager" +require 'optparse' +## +# Parsing our options. +## +options = {} +ARGV.options do |options| + options.on_tail('-h', '--help', 'Print this help information'){puts options; exit} + options.on('-q', '--quiet', 'be verry quiet') do + puts "OK, I'm being very, very, very quiet... can't you tell?" + end + options.on('-v', '--verbose', 'Run verbosely'){|v| puts "Option to be verbose passed"} + + options.parse! +end \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-10-12 20:15:27
|
Revision: 149 http://svn.sourceforge.net/abtlinux/?rev=149&view=rev Author: eschabell Date: 2006-10-12 13:15:23 -0700 (Thu, 12 Oct 2006) Log Message: ----------- Played a bit more with how this optparse lib works. Small cosmetic changes made, nothing exciting. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-10-12 19:03:02 UTC (rev 148) +++ src/trunk/abt.rb 2006-10-12 20:15:23 UTC (rev 149) @@ -24,21 +24,35 @@ # AbTLinux; if not, write to the Free Software Foundation, Inc., 51 Franklin # St, Fifth Floor, Boston, MA 02110-1301 USA ## -require "AbtPackageManager" -require "AbtLogManager" -require "AbtReportManager" +require 'AbtPackageManager' +require 'AbtLogManager' +require 'AbtReportManager' require 'optparse' ## # Parsing our options. ## options = {} -ARGV.options do |options| - options.on_tail('-h', '--help', 'Print this help information'){puts options; exit} - options.on('-q', '--quiet', 'be verry quiet') do - puts "OK, I'm being very, very, very quiet... can't you tell?" +OptionParser.new do |opts| + opts.banner = "AbTLinux Package Mangaer Usage: abt.rb [options]\n\n" + + opts.on_tail('-h', '--help', 'Print this help information'){puts opts; exit} + opts.on('-v', '--verbose', 'Run verbosely') { |v| puts 'Option to be verbose passed' } + opts.on('-q', '--quiet', 'Be very quiet') do + puts 'Be very, very quiet!' end - options.on('-v', '--verbose', 'Run verbosely'){|v| puts "Option to be verbose passed"} - - options.parse! -end \ No newline at end of file + + opts.parse + + if ARGV.length == 0 + puts opts + end + +end + + +#puts options +#puts 'DEBUG: ' +#puts ARGV +#puts 'Number of args:' +#puts ARGV.length \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-10-13 20:19:17
|
Revision: 150 http://svn.sourceforge.net/abtlinux/?rev=150&view=rev Author: eschabell Date: 2006-10-13 13:19:11 -0700 (Fri, 13 Oct 2006) Log Message: ----------- Given up on the optparse library, just doing it myself. The library cost more time to learn than writing it myself. Created class for showing usage of the abt.rb. Added the scenarios from section 3.1 options and have the options setting the 'package' elements in the hash with passed value. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-10-12 20:15:23 UTC (rev 149) +++ src/trunk/abt.rb 2006-10-13 20:19:11 UTC (rev 150) @@ -29,30 +29,75 @@ require 'AbtReportManager' require 'optparse' +class AbtUsage + def usage + puts "Usage: abt.rb [options]\n\n" + puts " -i, install [package]\t\tInstall given package." + puts " -ri, reinstall [package]\t\tReinstall given package." + puts " -r, remove [package]\t\tRemove given package." + puts " -dg, downgrade [version] [package]\tDowngrade given package to given version." + puts " -f, freeze [package]\t\tHolds given package at current version, prevents upgrades." + end +end + ## # Parsing our options. ## -options = {} -OptionParser.new do |opts| - opts.banner = "AbTLinux Package Mangaer Usage: abt.rb [options]\n\n" +options = Hash.new() +show = AbtUsage.new(); - opts.on_tail('-h', '--help', 'Print this help information'){puts opts; exit} - opts.on('-v', '--verbose', 'Run verbosely') { |v| puts 'Option to be verbose passed' } - opts.on('-q', '--quiet', 'Be very quiet') do - puts 'Be very, very quiet!' - end - - opts.parse - - if ARGV.length == 0 - puts opts - end - +if ( ARGV.length == 0 ) + show.usage end +case ARGV[0] + + when "install", "-i" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + else + show.usage + exit + end + + + when "reinstall", "-ri" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + else + show.usage + exit + end + + when "remove", "-r" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + else + show.usage + exit + end + + when "downgrade", "-dg" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + else + show.usage + exit + end + + when "freeze", "-f" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + else + show.usage + exit + end +end -#puts options -#puts 'DEBUG: ' -#puts ARGV -#puts 'Number of args:' +#puts 'DEBUG: options are -' +#puts 'package => ' + options['package'] +#puts 'DEBUG: argv is -' +#puts ARGV[0] +#puts ARGV[1] +#puts 'DEBUG: number of args are -' #puts ARGV.length \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-10-14 12:26:32
|
Revision: 151 http://svn.sourceforge.net/abtlinux/?rev=151&view=rev Author: eschabell Date: 2006-10-14 05:26:26 -0700 (Sat, 14 Oct 2006) Log Message: ----------- Added fake message as placeholder for executing each command. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-10-13 20:19:11 UTC (rev 150) +++ src/trunk/abt.rb 2006-10-14 12:26:26 UTC (rev 151) @@ -30,74 +30,81 @@ require 'optparse' class AbtUsage - def usage - puts "Usage: abt.rb [options]\n\n" - puts " -i, install [package]\t\tInstall given package." - puts " -ri, reinstall [package]\t\tReinstall given package." - puts " -r, remove [package]\t\tRemove given package." - puts " -dg, downgrade [version] [package]\tDowngrade given package to given version." - puts " -f, freeze [package]\t\tHolds given package at current version, prevents upgrades." - end -end -## -# Parsing our options. -## -options = Hash.new() -show = AbtUsage.new(); - -if ( ARGV.length == 0 ) - show.usage + def usage + puts "Usage: abt.rb [options]\n\n" + puts " -i, install [package]\t\tInstall given package." + puts " -ri, reinstall [package]\t\tReinstall given package." + puts " -r, remove [package]\t\tRemove given package." + puts " -dg, downgrade [version] [package]\tDowngrade given package to given version." + puts " -f, freeze [package]\t\tHolds given package at current version, prevents upgrades." + end end -case ARGV[0] - - when "install", "-i" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - else - show.usage - exit - end - - - when "reinstall", "-ri" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - else - show.usage - exit - end - - when "remove", "-r" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - else - show.usage - exit - end - - when "downgrade", "-dg" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - else - show.usage - exit - end - - when "freeze", "-f" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - else - show.usage - exit - end -end - -#puts 'DEBUG: options are -' -#puts 'package => ' + options['package'] -#puts 'DEBUG: argv is -' -#puts ARGV[0] -#puts ARGV[1] -#puts 'DEBUG: number of args are -' -#puts ARGV.length \ No newline at end of file + ## + # Parsing our options. + ## + options = Hash.new() + show = AbtUsage.new(); + + if ( ARGV.length == 0 ) + show.usage + end + + case ARGV[0] + + when "install", "-i" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Installing package : " + options['package'] + else + show.usage + exit + end + + + when "reinstall", "-ri" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Reinstalling package : " + options['package'] + else + show.usage + exit + end + + when "remove", "-r" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Removing package : " + options['package'] + else + show.usage + exit + end + + when "downgrade", "-dg" + if ( ARGV.length == 3 ) + options['version'] = ARGV[1] + options['package'] = ARGV[2] + puts "Downgradinging package : " + options['package'] + " to version : " + options['version'] + else + show.usage + exit + end + + when "freeze", "-f" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Holdinging package : " + options['package'] + " at the current version." + else + show.usage + exit + end + end + + #puts 'DEBUG: options are -' + #puts 'package => ' + options['package'] + #puts 'DEBUG: argv is -' + #puts ARGV[0] + #puts ARGV[1] + #puts 'DEBUG: number of args are -' + #puts ARGV.length \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-10-14 13:12:46
|
Revision: 152 http://svn.sourceforge.net/abtlinux/?rev=152&view=rev Author: eschabell Date: 2006-10-14 06:12:40 -0700 (Sat, 14 Oct 2006) Log Message: ----------- Added the scenarios from section 3.2 options. Overview of available options: Usage: abt.rb [options] -i, install [package] Install given package. -ri, reinstall [package] Reinstall given package. -r, remove [package] Remove given package. -dg, downgrade [version] [package] Downgrade given package to given version. -f, freeze [package] Holds given package at current version, prevents upgrades. -s, search [string | regexp ] Search package descriptions for given input. show-details [package] Show give package details. show-build [package] Show build log of given package. show-depends [package] Show the dependency tree of given package. show-files [package] Show all installed files from given package. show-owner [file] Show the package owning given file. show-installed Show list of all installed packages. show-frozen Show list of all frozen packages. show-untracked Show all files on system not tracked by AbTLinux. show-journal Show the system journal. show-iqueue Show the contents of the install queue. show-patches Show the current available patches for installed package tree. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-10-14 12:26:26 UTC (rev 151) +++ src/trunk/abt.rb 2006-10-14 13:12:40 UTC (rev 152) @@ -38,6 +38,20 @@ puts " -r, remove [package]\t\tRemove given package." puts " -dg, downgrade [version] [package]\tDowngrade given package to given version." puts " -f, freeze [package]\t\tHolds given package at current version, prevents upgrades." + puts " -s, search [string | regexp ]\tSearch package descriptions for given input." + puts + puts " show-details [package]\t\tShow give package details." + puts " show-build [package]\t\tShow build log of given package." + puts " show-depends [package]\t\tShow the dependency tree of given package." + puts " show-files [package]\t\tShow all installed files from given package." + puts " show-owner [file]\t\tShow the package owning given file." + puts + puts " show-installed\t\t\tShow list of all installed packages." + puts " show-frozen\t\t\t\tShow list of all frozen packages." + puts " show-untracked\t\t\tShow all files on system not tracked by AbTLinux." + puts " show-journal\t\t\t\tShow the system journal." + puts " show-iqueue\t\t\t\tShow the contents of the install queue." + puts " show-patches\t\t\t\tShow the current available patches for installed package tree." end end @@ -99,7 +113,81 @@ show.usage exit end - end + + when "search", "-s" + if ( ARGV.length == 2 ) + options['searchString'] = ARGV[1] + puts "Searching package descriptions for : " + options['searchString'] + else + show.usage + exit + end + + when "show-details" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Display details for package : " + options['package'] + else + show.usage + exit + end + + when "show-build" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Display build log for package : " + options['package'] + else + show.usage + exit + end + + + when "show-depends" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Display dependency tree for package : " + options['package'] + else + show.usage + exit + end + + when "show-files" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Display installed files from package : " + options['package'] + else + show.usage + exit + end + + when "show-owner" + if ( ARGV.length == 2 ) + options['fileName'] = ARGV[1] + puts "Display owning package for file : " + options['fileName'] + else + show.usage + exit + end + + when "show-installed" + puts "Display all installed packages." + + when "show-frozen" + puts "Display all packages frozen at current version." + + when "show-untracked" + puts "Display all files on system not tracked by AbTLinux." + + when "show-journal" + puts "Display system log with AbTLinux activity." + + when "show-iqueue" + puts "Display contents of install queue." + + when "show-patches" + puts "Display currently available patches for installed package tree." + + end # case #puts 'DEBUG: options are -' #puts 'package => ' + options['package'] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-10-14 13:26:18
|
Revision: 153 http://svn.sourceforge.net/abtlinux/?rev=153&view=rev Author: eschabell Date: 2006-10-14 06:26:15 -0700 (Sat, 14 Oct 2006) Log Message: ----------- Added the scenarios from section 3.3 options. Overview of available options: Usage: abt.rb [options] packages: -i, install [package] Install given package. -ri, reinstall [package] Reinstall given package. -r, remove [package] Remove given package. -dg, downgrade [version] [package] Downgrade given package to given version. -f, freeze [package] Holds given package at current version, prevents upgrades. queries: -s, search [string | regexp ] Search package descriptions for given input. show-details [package] Show give package details. show-build [package] Show build log of given package. show-depends [package] Show the dependency tree of given package. show-files [package] Show all installed files from given package. show-owner [file] Show the package owning given file. show-installed Show list of all installed packages. show-frozen Show list of all frozen packages. show-untracked Show all files on system not tracked by AbTLinux. show-journal Show the system journal. show-iqueue Show the contents of the install queue. show-patches Show the current available patches for installed package tree. generation: show-updates Show a package listing with available update versions. html Generate HTML page from installed packages: (package name with hyperlink to package website and version installed) Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-10-14 13:12:40 UTC (rev 152) +++ src/trunk/abt.rb 2006-10-14 13:26:15 UTC (rev 153) @@ -33,25 +33,33 @@ def usage puts "Usage: abt.rb [options]\n\n" + + puts "packages:" puts " -i, install [package]\t\tInstall given package." puts " -ri, reinstall [package]\t\tReinstall given package." puts " -r, remove [package]\t\tRemove given package." puts " -dg, downgrade [version] [package]\tDowngrade given package to given version." puts " -f, freeze [package]\t\tHolds given package at current version, prevents upgrades." + puts + puts "queries:" puts " -s, search [string | regexp ]\tSearch package descriptions for given input." - puts puts " show-details [package]\t\tShow give package details." puts " show-build [package]\t\tShow build log of given package." puts " show-depends [package]\t\tShow the dependency tree of given package." puts " show-files [package]\t\tShow all installed files from given package." puts " show-owner [file]\t\tShow the package owning given file." - puts puts " show-installed\t\t\tShow list of all installed packages." puts " show-frozen\t\t\t\tShow list of all frozen packages." puts " show-untracked\t\t\tShow all files on system not tracked by AbTLinux." puts " show-journal\t\t\t\tShow the system journal." puts " show-iqueue\t\t\t\tShow the contents of the install queue." puts " show-patches\t\t\t\tShow the current available patches for installed package tree." + puts + puts "generation:" + puts " show-updates\t\tShow a package listing with available update versions." + puts " html\t\t\tGenerate HTML page from installed packages:" + puts " \t\t\t\t(package name with hyperlink to package website and version installed)" + end end @@ -187,6 +195,12 @@ when "show-patches" puts "Display currently available patches for installed package tree." + when "show-updates" + puts "Display package listing with available update versions." + + when "html" + puts "Generate HTML page from installed packages:" + puts " (package name with hyperlink to package website and version installed)" end # case #puts 'DEBUG: options are -' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-10-14 17:30:47
|
Revision: 154 http://svn.sourceforge.net/abtlinux/?rev=154&view=rev Author: eschabell Date: 2006-10-14 10:30:41 -0700 (Sat, 14 Oct 2006) Log Message: ----------- Added the scenarios from section 3.4 options. Overview of available options: Usage: abt.rb [options] packages: -i, install [package] Install given package. -ri, reinstall [package] Reinstall given package. -r, remove [package] Remove given package. -dg, downgrade [version] [package] Downgrade given package to given version. -f, freeze [package] Holds given package at current version, prevents upgrades. queries: -s, search [string | regexp ] Search package descriptions for given input. show-details [package] Show give package details. show-build [package] Show build log of given package. show-depends [package] Show the dependency tree of given package. show-files [package] Show all installed files from given package. show-owner [file] Show the package owning given file. show-installed Show list of all installed packages. show-frozen Show list of all frozen packages. show-untracked Show all files on system not tracked by AbTLinux. show-journal Show the system journal. show-iqueue Show the contents of the install queue. show-patches Show the current available patches for installed package tree. generation: show-updates Show a package listing with available update versions. html Generate HTML page from installed packages: (package name with hyperlink to package website and version installed) downloads: -d, download [package] Retrieve given package sources. -u, update [package]|[tree] Update given package or tree from AbTLinux repository. news Displays newsfeed from AbTLinux website. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-10-14 13:26:15 UTC (rev 153) +++ src/trunk/abt.rb 2006-10-14 17:30:41 UTC (rev 154) @@ -59,7 +59,11 @@ puts " show-updates\t\tShow a package listing with available update versions." puts " html\t\t\tGenerate HTML page from installed packages:" puts " \t\t\t\t(package name with hyperlink to package website and version installed)" - + puts + puts "downloads:" + puts " -d, download [package]\t\tRetrieve given package sources." + puts " -u, update [package]|[tree]\tUpdate given package or tree from AbTLinux repository." + puts " news\t\t\t\t\tDisplays newsfeed from AbTLinux website." end end @@ -198,9 +202,30 @@ when "show-updates" puts "Display package listing with available update versions." + when "news" + puts "Display AbTLinux website newsfeed." + when "html" puts "Generate HTML page from installed packages:" puts " (package name with hyperlink to package website and version installed)" + + when "download", "-d" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Retrieve sources for package : " + options['package'] + else + show.usage + exit + end + + when "update", "-u" + if ( ARGV.length == 2 ) + options['updateItem'] = ARGV[1] + puts "Updating this item (either package or a package tree : " + options['updateItem'] + else + show.usage + exit + end end # case #puts 'DEBUG: options are -' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-10-14 17:50:37
|
Revision: 155 http://svn.sourceforge.net/abtlinux/?rev=155&view=rev Author: eschabell Date: 2006-10-14 10:50:31 -0700 (Sat, 14 Oct 2006) Log Message: ----------- Added the scenarios from section 3.6 options. Overview of available options: Usage: abt.rb [options] packages: -i, install [package] Install given package. -ri, reinstall [package] Reinstall given package. -r, remove [package] Remove given package. -dg, downgrade [version] [package] Downgrade given package to given version. -f, freeze [package] Holds given package at current version, prevents upgrades. queries: -s, search [string | regexp ] Search package descriptions for given input. show-details [package] Show give package details. show-build [package] Show build log of given package. show-depends [package] Show the dependency tree of given package. show-files [package] Show all installed files from given package. show-owner [file] Show the package owning given file. show-installed Show list of all installed packages. show-frozen Show list of all frozen packages. show-untracked Show all files on system not tracked by AbTLinux. show-journal Show the system journal. show-iqueue Show the contents of the install queue. show-patches Show the current available patches for installed package tree. generation: show-updates Show a package listing with available update versions. html Generate HTML page from installed packages: (package name with hyperlink to package website and version installed) downloads: -d, download [package] Retrieve given package sources. -u, update [package]|[tree] Update given package or tree from AbTLinux repository. -n, news Displays newsfeed from AbTLinux website. fix: purge-src Remove source caches for packages no longer installed. purge-logs Remove log files for packages no longer installed. verify-files [package] Installed files are verified for given package. verify-symlinks [package] Symlinks verified for given package. verify-deps [package] Dependency tree is verified for given package. verify-integrity [package] Verify integrity of installed files for given package. fix [package] Given package is verified and fixed if needed. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-10-14 17:30:41 UTC (rev 154) +++ src/trunk/abt.rb 2006-10-14 17:50:31 UTC (rev 155) @@ -63,7 +63,16 @@ puts "downloads:" puts " -d, download [package]\t\tRetrieve given package sources." puts " -u, update [package]|[tree]\tUpdate given package or tree from AbTLinux repository." - puts " news\t\t\t\t\tDisplays newsfeed from AbTLinux website." + puts " -n, news\t\t\t\tDisplays newsfeed from AbTLinux website." + puts + puts "fix:" + puts " purge-src\t\t\t\tRemove source caches for packages no longer installed." + puts " purge-logs\t\t\t\tRemove log files for packages no longer installed." + puts " verify-files [package]\t\tInstalled files are verified for given package." + puts " verify-symlinks [package]\t\tSymlinks verified for given package." + puts " verify-deps [package]\t\tDependency tree is verified for given package." + puts " verify-integrity [package]\t\tVerify integrity of installed files for given package." + puts " fix [package]\t\tGiven package is verified and fixed if needed." end end @@ -202,13 +211,13 @@ when "show-updates" puts "Display package listing with available update versions." - when "news" - puts "Display AbTLinux website newsfeed." - when "html" puts "Generate HTML page from installed packages:" puts " (package name with hyperlink to package website and version installed)" - + + when "news", "-n" + puts "Display AbTLinux website newsfeed." + when "download", "-d" if ( ARGV.length == 2 ) options['package'] = ARGV[1] @@ -226,6 +235,57 @@ show.usage exit end + + when "purge-src" + puts "Remove source caches for packages no longer installed." + + when "purge-logs" + puts "Remove log files for packages no longer installed." + + when "verify-files" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Installed files verified for package : " + options['package'] + else + show.usage + exit + end + + when "verify-symlinks" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Symlinks verified for package : " + options['package'] + else + show.usage + exit + end + + when "verify-deps" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Symlinks verified for package : " + options['package'] + else + show.usage + exit + end + + when "verify-integrity" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Verifiy the integrity of installed files for package : " + options['package'] + else + show.usage + exit + end + + when "fix" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Package : " + options['package'] + " is verified and checked if needed." + else + show.usage + exit + end end # case #puts 'DEBUG: options are -' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-10-15 12:02:33
|
Revision: 156 http://svn.sourceforge.net/abtlinux/?rev=156&view=rev Author: eschabell Date: 2006-10-15 05:02:27 -0700 (Sun, 15 Oct 2006) Log Message: ----------- Added the last scenarios options. Overview of available options: Usage: abt.rb [options] packages: -i, install [package] Install given package. -ri, reinstall [package] Reinstall given package. -r, remove [package] Remove given package. -dg, downgrade [version] [package] Downgrade given package to given version. -f, freeze [package] Holds given package at current version, prevents upgrades. queries: -s, search [string | regexp ] Search package descriptions for given input. show-details [package] Show give package details. show-build [package] Show build log of given package. show-depends [package] Show the dependency tree of given package. show-files [package] Show all installed files from given package. show-owner [file] Show the package owning given file. show-installed Show list of all installed packages. show-frozen Show list of all frozen packages. show-untracked Show all files on system not tracked by AbTLinux. show-journal Show the system journal. show-iqueue Show the contents of the install queue. show-patches Show the current available patches for installed package tree. generation: show-updates Show a package listing with available update versions. html Generate HTML page from installed packages: (package name with hyperlink to package website and version installed) downloads: -d, download [package] Retrieve given package sources. -u, update [package]|[tree] Update given package or tree from AbTLinux repository. -n, news Displays newsfeed from AbTLinux website. fix: purge-src Remove source caches for packages no longer installed. purge-logs Remove log files for packages no longer installed. verify-files [package] Installed files are verified for given package. verify-symlinks [package] Symlinks verified for given package. verify-deps [package] Dependency tree is verified for given package. verify-integrity [package] Verify integrity of installed files for given package. fix [package] Given package is verified and fixed if needed. maintenance: build-location [host] Sets global location (default: localhost) for retrieving cached package builds. package-repo [add|remove|list] [URI] add - add package repository to list. remove - remove a package repository from list. list - display current repository list. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-10-14 17:50:31 UTC (rev 155) +++ src/trunk/abt.rb 2006-10-15 12:02:27 UTC (rev 156) @@ -73,90 +73,97 @@ puts " verify-deps [package]\t\tDependency tree is verified for given package." puts " verify-integrity [package]\t\tVerify integrity of installed files for given package." puts " fix [package]\t\tGiven package is verified and fixed if needed." + puts + puts "maintenance:" + puts " build-location [host]\t\tSets global location (default: localhost) for retrieving cached package builds." + puts " package-repo [add|remove|list] [URI]" + puts " add - add package repository to list." + puts " remove - remove a package repository from list." + puts " list - display current repository list." end end - ## - # Parsing our options. - ## - options = Hash.new() - show = AbtUsage.new(); +## +# Parsing our options. +## +options = Hash.new() +show = AbtUsage.new(); + +if ( ARGV.length == 0 ) + show.usage +end + +case ARGV[0] - if ( ARGV.length == 0 ) +when "install", "-i" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Installing package : " + options['package'] + else show.usage + exit end - case ARGV[0] - - when "install", "-i" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Installing package : " + options['package'] + +when "reinstall", "-ri" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Reinstalling package : " + options['package'] + else + show.usage + exit + end + +when "remove", "-r" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Removing package : " + options['package'] + else + show.usage + exit + end + +when "downgrade", "-dg" + if ( ARGV.length == 3 ) + options['version'] = ARGV[1] + options['package'] = ARGV[2] + puts "Downgradinging package : " + options['package'] + " to version : " + options['version'] + else + show.usage + exit + end + +when "freeze", "-f" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Holdinging package : " + options['package'] + " at the current version." + else + show.usage + exit + end + +when "search", "-s" + if ( ARGV.length == 2 ) + options['searchString'] = ARGV[1] + puts "Searching package descriptions for : " + options['searchString'] else show.usage exit end - - - when "reinstall", "-ri" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Reinstalling package : " + options['package'] - else - show.usage - exit - end - - when "remove", "-r" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Removing package : " + options['package'] - else - show.usage - exit - end - - when "downgrade", "-dg" - if ( ARGV.length == 3 ) - options['version'] = ARGV[1] - options['package'] = ARGV[2] - puts "Downgradinging package : " + options['package'] + " to version : " + options['version'] - else - show.usage - exit - end - - when "freeze", "-f" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Holdinging package : " + options['package'] + " at the current version." - else - show.usage - exit - end - - when "search", "-s" - if ( ARGV.length == 2 ) - options['searchString'] = ARGV[1] - puts "Searching package descriptions for : " + options['searchString'] - else - show.usage - exit - end when "show-details" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Display details for package : " + options['package'] + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Display details for package : " + options['package'] else show.usage exit end when "show-build" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Display build log for package : " + options['package'] + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Display build log for package : " + options['package'] else show.usage exit @@ -164,134 +171,176 @@ when "show-depends" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Display dependency tree for package : " + options['package'] + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Display dependency tree for package : " + options['package'] else show.usage exit end when "show-files" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Display installed files from package : " + options['package'] + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Display installed files from package : " + options['package'] else show.usage exit end when "show-owner" - if ( ARGV.length == 2 ) - options['fileName'] = ARGV[1] - puts "Display owning package for file : " + options['fileName'] + if ( ARGV.length == 2 ) + options['fileName'] = ARGV[1] + puts "Display owning package for file : " + options['fileName'] else show.usage exit end when "show-installed" - puts "Display all installed packages." + puts "Display all installed packages." when "show-frozen" - puts "Display all packages frozen at current version." + puts "Display all packages frozen at current version." when "show-untracked" - puts "Display all files on system not tracked by AbTLinux." + puts "Display all files on system not tracked by AbTLinux." when "show-journal" - puts "Display system log with AbTLinux activity." + puts "Display system log with AbTLinux activity." when "show-iqueue" - puts "Display contents of install queue." + puts "Display contents of install queue." when "show-patches" - puts "Display currently available patches for installed package tree." + puts "Display currently available patches for installed package tree." when "show-updates" - puts "Display package listing with available update versions." + puts "Display package listing with available update versions." when "html" - puts "Generate HTML page from installed packages:" - puts " (package name with hyperlink to package website and version installed)" + puts "Generate HTML page from installed packages:" + puts " (package name with hyperlink to package website and version installed)" when "news", "-n" - puts "Display AbTLinux website newsfeed." - - when "download", "-d" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Retrieve sources for package : " + options['package'] + puts "Display AbTLinux website newsfeed." + +when "download", "-d" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Retrieve sources for package : " + options['package'] + else + show.usage + exit + end + +when "update", "-u" + if ( ARGV.length == 2 ) + options['updateItem'] = ARGV[1] + puts "Updating this item (either package or a package tree : " + options['updateItem'] else show.usage exit end - - when "update", "-u" - if ( ARGV.length == 2 ) - options['updateItem'] = ARGV[1] - puts "Updating this item (either package or a package tree : " + options['updateItem'] - else - show.usage - exit - end when "purge-src" - puts "Remove source caches for packages no longer installed." + puts "Remove source caches for packages no longer installed." when "purge-logs" - puts "Remove log files for packages no longer installed." + puts "Remove log files for packages no longer installed." when "verify-files" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Installed files verified for package : " + options['package'] + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Installed files verified for package : " + options['package'] else show.usage exit end when "verify-symlinks" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Symlinks verified for package : " + options['package'] + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Symlinks verified for package : " + options['package'] else show.usage exit end when "verify-deps" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Symlinks verified for package : " + options['package'] + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Symlinks verified for package : " + options['package'] + else + show.usage + exit + end + +when "verify-integrity" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Verifiy the integrity of installed files for package : " + options['package'] else show.usage exit end - - when "verify-integrity" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Verifiy the integrity of installed files for package : " + options['package'] + + when "fix" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Package : " + options['package'] + " is verified and checked if needed." else show.usage exit end - when "fix" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Package : " + options['package'] + " is verified and checked if needed." + when "build-location" + if ( ARGV.length == 2 ) + options['buildHost'] = ARGV[1] + puts "Sets global location for retrieving cached build packages to : " + options['buildHost'] else show.usage exit end - end # case + + when "package-repo" + + # sort out that we have enough args. + case ARGV.length + + # add or remove called. + when 3 + options['repoAction'] = ARGV[1] + options['repoUri'] = ARGV[2] + + # list called. + when 2 + if ( ARGV[1] == "list" ) + options['repoAction'] = ARGV[1] + else + show.usage + exit + end + + else + show.usage + exit + end - #puts 'DEBUG: options are -' - #puts 'package => ' + options['package'] - #puts 'DEBUG: argv is -' - #puts ARGV[0] - #puts ARGV[1] - #puts 'DEBUG: number of args are -' - #puts ARGV.length \ No newline at end of file + # hook location based on action. + case options['repoAction'] + + when "add" + puts "Adding package repository : " + options['repoUri'] + + when "remove" + puts "Remove package repository : " + options['repoUri'] + + when "list" + puts "Display listing of package repositories." + + else + show.usage + exit + end +end # case \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-13 21:46:37
|
Revision: 163 http://svn.sourceforge.net/abtlinux/?rev=163&view=rev Author: eschabell Date: 2006-11-13 13:46:06 -0800 (Mon, 13 Nov 2006) Log Message: ----------- Now checking for valid package (FileTest.exists?) name for better error handling. Adjusted usage to be more dynamic (only report for section being used) to shorten usage message where possible. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-11-13 08:31:15 UTC (rev 162) +++ src/trunk/abt.rb 2006-11-13 21:46:06 UTC (rev 163) @@ -31,16 +31,52 @@ class AbtUsage - def usage + $PACKAGE_PATH = "./packages/" + + def usage( section ) puts "Usage: abt.rb [options]\n\n" - puts "packages:" + + case section + + when "packages" + usagePackages + + when "queries" + usageQueries + + when "generation" + usageGeneration + + when "downloads" + usageDownloads + + when "fix" + usageFix + + when "maintenance" + usageMaintenance + + else + usagePackages + usageQueries + usageGeneration + usageDownloads + usageFix + usageMaintenance + end + end + + def usagePackages + puts "\npackages:" puts " -i, install [package]\t\tInstall given package." puts " -ri, reinstall [package]\t\tReinstall given package." puts " -r, remove [package]\t\tRemove given package." puts " -dg, downgrade [version] [package]\tDowngrade given package to given version." - puts " -f, freeze [package]\t\tHolds given package at current version, prevents upgrades." - puts - puts "queries:" + puts " -f, freeze [package]\t\tHolds given package at current version, prevents upgrades.\n" + end + + def usageQueries + puts "\nqueries:" puts " -s, search [string | regexp ]\tSearch package descriptions for given input." puts " show-details [package]\t\tShow give package details." puts " show-build [package]\t\tShow build log of given package." @@ -52,33 +88,41 @@ puts " show-untracked\t\t\tShow all files on system not tracked by AbTLinux." puts " show-journal\t\t\t\tShow the system journal." puts " show-iqueue\t\t\t\tShow the contents of the install queue." - puts " show-patches\t\t\t\tShow the current available patches for installed package tree." - puts - puts "generation:" + puts " show-patches\t\t\t\tShow the current available patches for installed package tree.\n" + end + + def usageGeneration + puts "\ngeneration:" puts " show-updates\t\tShow a package listing with available update versions." puts " html\t\t\tGenerate HTML page from installed packages:" - puts " \t\t\t\t(package name with hyperlink to package website and version installed)" - puts - puts "downloads:" + puts " \t\t\t\t(package name with hyperlink to package website and version installed)\n" + end + + def usageDownloads + puts "\ndownloads:" puts " -d, download [package]\t\tRetrieve given package sources." puts " -u, update [package]|[tree]\tUpdate given package or tree from AbTLinux repository." - puts " -n, news\t\t\t\tDisplays newsfeed from AbTLinux website." - puts - puts "fix:" + puts " -n, news\t\t\t\tDisplays newsfeed from AbTLinux website.\n" + end + + def usageFix + puts "\nfix:" puts " purge-src\t\t\t\tRemove source caches for packages no longer installed." puts " purge-logs\t\t\t\tRemove log files for packages no longer installed." puts " verify-files [package]\t\tInstalled files are verified for given package." puts " verify-symlinks [package]\t\tSymlinks verified for given package." puts " verify-deps [package]\t\tDependency tree is verified for given package." puts " verify-integrity [package]\t\tVerify integrity of installed files for given package." - puts " fix [package]\t\tGiven package is verified and fixed if needed." - puts - puts "maintenance:" + puts " fix [package]\t\tGiven package is verified and fixed if needed.\n" + end + + def usageMaintenance + puts "\nmaintenance:" puts " build-location [host]\t\tSets global location (default: localhost) for retrieving cached package builds." puts " package-repo [add|remove|list] [URI]" puts " add - add package repository to list." puts " remove - remove a package repository from list." - puts " list - display current repository list." + puts " list - display current repository list.\n" end end @@ -89,7 +133,7 @@ show = AbtUsage.new(); if ( ARGV.length == 0 ) - show.usage + show.usage( "all" ) end case ARGV[0] @@ -99,7 +143,7 @@ options['package'] = ARGV[1] puts "Installing package : " + options['package'] else - show.usage + show.usage( "packages" ) exit end @@ -108,7 +152,7 @@ options['package'] = ARGV[1] puts "Reinstalling package : " + options['package'] else - show.usage + show.usage( "packages" ) exit end @@ -117,7 +161,7 @@ options['package'] = ARGV[1] puts "Removing package : " + options['package'] else - show.usage + show.usage( "packages" ) exit end @@ -127,7 +171,7 @@ options['package'] = ARGV[2] puts "Downgradinging package : " + options['package'] + " to version : " + options['version'] else - show.usage + show.usage( "packages" ) exit end @@ -136,7 +180,7 @@ options['package'] = ARGV[1] puts "Holdinging package : " + options['package'] + " at the current version." else - show.usage + show.usage( "packages" ) exit end @@ -145,19 +189,19 @@ options['searchString'] = ARGV[1] puts "Searching package descriptions for : " + options['searchString'] else - show.usage + show.usage( "queries" ) exit end when "show-details" - if ( ARGV.length == 2 ) + if ( ARGV.length == 2 && FileTest.exist?( $PACKAGE_PATH + ARGV[1] + ".rb" ) ) options['package'] = ARGV[1] require options['package'] package = Fortune.new puts package.details else - show.usage + show.usage( "queries" ) exit end @@ -166,7 +210,7 @@ options['package'] = ARGV[1] puts "Display build log for package : " + options['package'] else - show.usage + show.usage( "queries" ) exit end @@ -176,7 +220,7 @@ options['package'] = ARGV[1] puts "Display dependency tree for package : " + options['package'] else - show.usage + show.usage( "queries" ) exit end @@ -185,7 +229,7 @@ options['package'] = ARGV[1] puts "Display installed files from package : " + options['package'] else - show.usage + show.usage( "queries" ) exit end @@ -194,44 +238,53 @@ options['fileName'] = ARGV[1] puts "Display owning package for file : " + options['fileName'] else - show.usage + show.usage( "queries" ) exit end when "show-installed" puts "Display all installed packages." + show.usage( "queries" ) when "show-frozen" puts "Display all packages frozen at current version." + show.usage( "queries" ) when "show-untracked" puts "Display all files on system not tracked by AbTLinux." + show.usage( "queries" ) when "show-journal" puts "Display system log with AbTLinux activity." + show.usage( "queries" ) when "show-iqueue" puts "Display contents of install queue." + show.usage( "queries" ) when "show-patches" puts "Display currently available patches for installed package tree." + show.usage( "queries" ) when "show-updates" puts "Display package listing with available update versions." + show.usage( "generation" ) when "html" puts "Generate HTML page from installed packages:" puts " (package name with hyperlink to package website and version installed)" + show.usage( "generation" ) when "news", "-n" puts "Display AbTLinux website newsfeed." + show.usage( "downloads" ) when "download", "-d" if ( ARGV.length == 2 ) options['package'] = ARGV[1] puts "Retrieve sources for package : " + options['package'] else - show.usage + show.usage( "downloads" ) exit end @@ -240,22 +293,24 @@ options['updateItem'] = ARGV[1] puts "Updating this item (either package or a package tree : " + options['updateItem'] else - show.usage + show.usage( "downloads" ) exit end when "purge-src" puts "Remove source caches for packages no longer installed." + show.usage( "fix" ) when "purge-logs" puts "Remove log files for packages no longer installed." + show.usage( "fix" ) when "verify-files" if ( ARGV.length == 2 ) options['package'] = ARGV[1] puts "Installed files verified for package : " + options['package'] else - show.usage + show.usage( "fix" ) exit end @@ -264,7 +319,7 @@ options['package'] = ARGV[1] puts "Symlinks verified for package : " + options['package'] else - show.usage + show.usage( "fix" ) exit end @@ -273,7 +328,7 @@ options['package'] = ARGV[1] puts "Symlinks verified for package : " + options['package'] else - show.usage + show.usage( "fix" ) exit end @@ -282,7 +337,7 @@ options['package'] = ARGV[1] puts "Verifiy the integrity of installed files for package : " + options['package'] else - show.usage + show.usage( "fix" ) exit end @@ -291,7 +346,7 @@ options['package'] = ARGV[1] puts "Package : " + options['package'] + " is verified and checked if needed." else - show.usage + show.usage( "fix" ) exit end @@ -300,7 +355,7 @@ options['buildHost'] = ARGV[1] puts "Sets global location for retrieving cached build packages to : " + options['buildHost'] else - show.usage + show.usage( "maintenance" ) exit end @@ -318,12 +373,12 @@ if ( ARGV[1] == "list" ) options['repoAction'] = ARGV[1] else - show.usage + show.usage( "maintenance" ) exit end else - show.usage + show.usage( "maintenance" ) exit end # case ARGV.length. @@ -340,7 +395,7 @@ puts "Display listing of package repositories." else - show.usage + show.usage( "maintenance" ) exit end # case repoAction. end # case ARGV[0]. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-13 22:55:06
|
Revision: 159 http://svn.sourceforge.net/abtlinux/?rev=159&view=rev Author: eschabell Date: 2006-11-12 09:32:49 -0800 (Sun, 12 Nov 2006) Log Message: ----------- Cleanup and beautification of the code layout. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-10-18 10:07:28 UTC (rev 158) +++ src/trunk/abt.rb 2006-11-12 17:32:49 UTC (rev 159) @@ -31,10 +31,9 @@ class AbtUsage - def usage - puts "Usage: abt.rb [options]\n\n" - - puts "packages:" + def usage + puts "Usage: abt.rb [options]\n\n" + puts "packages:" puts " -i, install [package]\t\tInstall given package." puts " -ri, reinstall [package]\t\tReinstall given package." puts " -r, remove [package]\t\tRemove given package." @@ -48,7 +47,7 @@ puts " show-depends [package]\t\tShow the dependency tree of given package." puts " show-files [package]\t\tShow all installed files from given package." puts " show-owner [file]\t\tShow the package owning given file." - puts " show-installed\t\t\tShow list of all installed packages." + puts " show-installed\t\t\tShow list of all installed packages." puts " show-frozen\t\t\t\tShow list of all frozen packages." puts " show-untracked\t\t\tShow all files on system not tracked by AbTLinux." puts " show-journal\t\t\t\tShow the system journal." @@ -58,28 +57,28 @@ puts "generation:" puts " show-updates\t\tShow a package listing with available update versions." puts " html\t\t\tGenerate HTML page from installed packages:" - puts " \t\t\t\t(package name with hyperlink to package website and version installed)" - puts - puts "downloads:" - puts " -d, download [package]\t\tRetrieve given package sources." - puts " -u, update [package]|[tree]\tUpdate given package or tree from AbTLinux repository." - puts " -n, news\t\t\t\tDisplays newsfeed from AbTLinux website." - puts - puts "fix:" - puts " purge-src\t\t\t\tRemove source caches for packages no longer installed." - puts " purge-logs\t\t\t\tRemove log files for packages no longer installed." - puts " verify-files [package]\t\tInstalled files are verified for given package." - puts " verify-symlinks [package]\t\tSymlinks verified for given package." - puts " verify-deps [package]\t\tDependency tree is verified for given package." - puts " verify-integrity [package]\t\tVerify integrity of installed files for given package." - puts " fix [package]\t\tGiven package is verified and fixed if needed." - puts - puts "maintenance:" - puts " build-location [host]\t\tSets global location (default: localhost) for retrieving cached package builds." - puts " package-repo [add|remove|list] [URI]" - puts " add - add package repository to list." - puts " remove - remove a package repository from list." - puts " list - display current repository list." + puts " \t\t\t\t(package name with hyperlink to package website and version installed)" + puts + puts "downloads:" + puts " -d, download [package]\t\tRetrieve given package sources." + puts " -u, update [package]|[tree]\tUpdate given package or tree from AbTLinux repository." + puts " -n, news\t\t\t\tDisplays newsfeed from AbTLinux website." + puts + puts "fix:" + puts " purge-src\t\t\t\tRemove source caches for packages no longer installed." + puts " purge-logs\t\t\t\tRemove log files for packages no longer installed." + puts " verify-files [package]\t\tInstalled files are verified for given package." + puts " verify-symlinks [package]\t\tSymlinks verified for given package." + puts " verify-deps [package]\t\tDependency tree is verified for given package." + puts " verify-integrity [package]\t\tVerify integrity of installed files for given package." + puts " fix [package]\t\tGiven package is verified and fixed if needed." + puts + puts "maintenance:" + puts " build-location [host]\t\tSets global location (default: localhost) for retrieving cached package builds." + puts " package-repo [add|remove|list] [URI]" + puts " add - add package repository to list." + puts " remove - remove a package repository from list." + puts " list - display current repository list." end end @@ -94,253 +93,251 @@ end case ARGV[0] + + when "install", "-i" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Installing package : " + options['package'] + else + show.usage + exit + end -when "install", "-i" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Installing package : " + options['package'] - else - show.usage - exit - end + when "reinstall", "-ri" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Reinstalling package : " + options['package'] + else + show.usage + exit + end + when "remove", "-r" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Removing package : " + options['package'] + else + show.usage + exit + end -when "reinstall", "-ri" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Reinstalling package : " + options['package'] - else - show.usage - exit - end + when "downgrade", "-dg" + if ( ARGV.length == 3 ) + options['version'] = ARGV[1] + options['package'] = ARGV[2] + puts "Downgradinging package : " + options['package'] + " to version : " + options['version'] + else + show.usage + exit + end -when "remove", "-r" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Removing package : " + options['package'] - else - show.usage - exit - end - -when "downgrade", "-dg" - if ( ARGV.length == 3 ) - options['version'] = ARGV[1] - options['package'] = ARGV[2] - puts "Downgradinging package : " + options['package'] + " to version : " + options['version'] - else - show.usage - exit - end - -when "freeze", "-f" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Holdinging package : " + options['package'] + " at the current version." - else - show.usage - exit - end - -when "search", "-s" - if ( ARGV.length == 2 ) - options['searchString'] = ARGV[1] - puts "Searching package descriptions for : " + options['searchString'] + when "freeze", "-f" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Holdinging package : " + options['package'] + " at the current version." else show.usage exit end - - when "show-details" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Display details for package : " + options['package'] + + when "search", "-s" + if ( ARGV.length == 2 ) + options['searchString'] = ARGV[1] + puts "Searching package descriptions for : " + options['searchString'] else show.usage exit end - - when "show-build" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Display build log for package : " + options['package'] + + when "show-details" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Display details for package : " + options['package'] else show.usage exit end + + when "show-build" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Display build log for package : " + options['package'] + else + show.usage + exit + end - when "show-depends" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Display dependency tree for package : " + options['package'] + when "show-depends" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Display dependency tree for package : " + options['package'] else show.usage exit end - - when "show-files" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Display installed files from package : " + options['package'] + + when "show-files" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Display installed files from package : " + options['package'] else show.usage exit end - when "show-owner" - if ( ARGV.length == 2 ) - options['fileName'] = ARGV[1] - puts "Display owning package for file : " + options['fileName'] + when "show-owner" + if ( ARGV.length == 2 ) + options['fileName'] = ARGV[1] + puts "Display owning package for file : " + options['fileName'] else show.usage exit end + + when "show-installed" + puts "Display all installed packages." + + when "show-frozen" + puts "Display all packages frozen at current version." + + when "show-untracked" + puts "Display all files on system not tracked by AbTLinux." - when "show-installed" - puts "Display all installed packages." - - when "show-frozen" - puts "Display all packages frozen at current version." - - when "show-untracked" - puts "Display all files on system not tracked by AbTLinux." - - when "show-journal" - puts "Display system log with AbTLinux activity." - - when "show-iqueue" - puts "Display contents of install queue." - - when "show-patches" - puts "Display currently available patches for installed package tree." - - when "show-updates" - puts "Display package listing with available update versions." - - when "html" - puts "Generate HTML page from installed packages:" - puts " (package name with hyperlink to package website and version installed)" - - when "news", "-n" - puts "Display AbTLinux website newsfeed." - -when "download", "-d" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Retrieve sources for package : " + options['package'] - else - show.usage - exit - end + when "show-journal" + puts "Display system log with AbTLinux activity." -when "update", "-u" - if ( ARGV.length == 2 ) - options['updateItem'] = ARGV[1] - puts "Updating this item (either package or a package tree : " + options['updateItem'] + when "show-iqueue" + puts "Display contents of install queue." + + when "show-patches" + puts "Display currently available patches for installed package tree." + + when "show-updates" + puts "Display package listing with available update versions." + + when "html" + puts "Generate HTML page from installed packages:" + puts " (package name with hyperlink to package website and version installed)" + + when "news", "-n" + puts "Display AbTLinux website newsfeed." + + when "download", "-d" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Retrieve sources for package : " + options['package'] else show.usage exit end - - when "purge-src" - puts "Remove source caches for packages no longer installed." - - when "purge-logs" - puts "Remove log files for packages no longer installed." - - when "verify-files" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Installed files verified for package : " + options['package'] + + when "update", "-u" + if ( ARGV.length == 2 ) + options['updateItem'] = ARGV[1] + puts "Updating this item (either package or a package tree : " + options['updateItem'] else show.usage exit end - when "verify-symlinks" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Symlinks verified for package : " + options['package'] + when "purge-src" + puts "Remove source caches for packages no longer installed." + + when "purge-logs" + puts "Remove log files for packages no longer installed." + + when "verify-files" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Installed files verified for package : " + options['package'] else show.usage exit end - - when "verify-deps" - if ( ARGV.length == 2 ) + + when "verify-symlinks" + if ( ARGV.length == 2 ) options['package'] = ARGV[1] puts "Symlinks verified for package : " + options['package'] else show.usage exit end - -when "verify-integrity" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Verifiy the integrity of installed files for package : " + options['package'] + + when "verify-deps" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Symlinks verified for package : " + options['package'] else show.usage exit end - - when "fix" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Package : " + options['package'] + " is verified and checked if needed." + + when "verify-integrity" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Verifiy the integrity of installed files for package : " + options['package'] else show.usage exit end - when "build-location" - if ( ARGV.length == 2 ) - options['buildHost'] = ARGV[1] - puts "Sets global location for retrieving cached build packages to : " + options['buildHost'] + when "fix" + if ( ARGV.length == 2 ) + options['package'] = ARGV[1] + puts "Package : " + options['package'] + " is verified and checked if needed." else show.usage exit end + + when "build-location" + if ( ARGV.length == 2 ) + options['buildHost'] = ARGV[1] + puts "Sets global location for retrieving cached build packages to : " + options['buildHost'] + else + show.usage + exit + end - when "package-repo" - - # sort out that we have enough args. - case ARGV.length - - # add or remove called. - when 3 - options['repoAction'] = ARGV[1] - options['repoUri'] = ARGV[2] - - # list called. - when 2 - if ( ARGV[1] == "list" ) - options['repoAction'] = ARGV[1] - else - show.usage - exit - end - - else - show.usage - exit - end + when "package-repo" + # sort out that we have enough args. + case ARGV.length - # hook location based on action. - case options['repoAction'] + # add or remove called. + when 3 + options['repoAction'] = ARGV[1] + options['repoUri'] = ARGV[2] + + # list called. + when 2 + if ( ARGV[1] == "list" ) + options['repoAction'] = ARGV[1] + else + show.usage + exit + end + + else + show.usage + exit + end # case ARGV.length. - when "add" - puts "Adding package repository : " + options['repoUri'] + # hook location based on action. + case options['repoAction'] + + when "add" + puts "Adding package repository : " + options['repoUri'] + + when "remove" + puts "Remove package repository : " + options['repoUri'] - when "remove" - puts "Remove package repository : " + options['repoUri'] - - when "list" - puts "Display listing of package repositories." + when "list" + puts "Display listing of package repositories." - else - show.usage - exit - end -end # case \ No newline at end of file + else + show.usage + exit + end # case repoAction. +end # case ARGV[0]. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-13 22:55:06
|
Revision: 160 http://svn.sourceforge.net/abtlinux/?rev=160&view=rev Author: eschabell Date: 2006-11-12 12:26:08 -0800 (Sun, 12 Nov 2006) Log Message: ----------- Started to work out show-details. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-11-12 17:32:49 UTC (rev 159) +++ src/trunk/abt.rb 2006-11-12 20:26:08 UTC (rev 160) @@ -153,6 +153,12 @@ if ( ARGV.length == 2 ) options['package'] = ARGV[1] puts "Display details for package : " + options['package'] + + # TODO: make this work! + #require "AbtFortune" + #package = AbtFortune.new + #puts package.details + #exit else show.usage exit This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-14 16:00:07
|
Revision: 168 http://svn.sourceforge.net/abtlinux/?rev=168&view=rev Author: eschabell Date: 2006-11-14 08:00:02 -0800 (Tue, 14 Nov 2006) Log Message: ----------- Now have dynamic loading of package class file by evaluating the requested class. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-11-14 15:01:50 UTC (rev 167) +++ src/trunk/abt.rb 2006-11-14 16:00:02 UTC (rev 168) @@ -105,8 +105,8 @@ if ( ARGV.length == 2 && File.exist?( $PACKAGE_PATH + ARGV[1] + ".rb" ) ) options['package'] = ARGV[1] - require options['package'] # pickup the package data. - package = Fortune.new # TODO: change this to dynamic naming. + require options['package'] # pickup called package class. + package = eval( options['package'].capitalize + '.new' ) # evaluates package.new methode dynamically. details = package.details puts "**************************************" @@ -212,7 +212,7 @@ if ( !File.directory?( $SOURCES_REPOSITORY ) ) FileUtils.mkdir_p $SOURCES_REPOSITORY # initialize directory. end - manager = AbtDownloadManager.new() + manager = AbtDownloadManager.new if ( manager.retrievePackageSource( options['package'] ) ) puts "\nDownloading of package " + options['package'] + " sources completed, see " + $SOURCES_REPOSITORY else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-14 21:32:50
|
Revision: 174 http://svn.sourceforge.net/abtlinux/?rev=174&view=rev Author: eschabell Date: 2006-11-14 13:32:48 -0800 (Tue, 14 Nov 2006) Log Message: ----------- Added in warning flag and blocking non-root users from all functionality except usage. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-11-14 21:30:54 UTC (rev 173) +++ src/trunk/abt.rb 2006-11-14 21:32:48 UTC (rev 174) @@ -1,4 +1,4 @@ -#!/usr/bin/ruby -I./packages +#!/usr/bin/ruby -wI./packages ## # abt.rb @@ -32,6 +32,7 @@ require 'fileutils' require 'optparse' + $PACKAGE_PATH = "./packages/" $SOURCES_REPOSITORY = "/var/spool/abt/sources" @@ -45,6 +46,12 @@ show.usage( "all" ) end +# TODO: provide root login here? +if ( Process.uid != 0 ) + puts "\nYou need to run abt as root.\n\n" + exit +end + case ARGV[0] when "install", "-i" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-15 11:06:08
|
Revision: 175 http://svn.sourceforge.net/abtlinux/?rev=175&view=rev Author: eschabell Date: 2006-11-15 03:06:07 -0800 (Wed, 15 Nov 2006) Log Message: ----------- Now jumping thru with root login automatically before running abt. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-11-14 21:32:48 UTC (rev 174) +++ src/trunk/abt.rb 2006-11-15 11:06:07 UTC (rev 175) @@ -46,12 +46,22 @@ show.usage( "all" ) end -# TODO: provide root login here? +# from here on out, need root access. if ( Process.uid != 0 ) - puts "\nYou need to run abt as root.\n\n" + args = "" + + puts "\nEnter root password:" + + for i in 0...ARGV.length + args = args + " " + ARGV[i] + end + + # TODO: remove the ./abt call on deployment. + system( 'su -c "./abt ' + args + '" root' ) exit end + case ARGV[0] when "install", "-i" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-15 21:43:54
|
Revision: 183 http://svn.sourceforge.net/abtlinux/?rev=183&view=rev Author: eschabell Date: 2006-11-15 13:43:52 -0800 (Wed, 15 Nov 2006) Log Message: ----------- Implemented show-journal functionality, now able to view the contents of the journal. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-11-15 14:40:02 UTC (rev 182) +++ src/trunk/abt.rb 2006-11-15 21:43:52 UTC (rev 183) @@ -192,8 +192,11 @@ show.usage( "queries" ) when "show-journal" - puts "Display system log with AbTLinux activity." - show.usage( "queries" ) + if ( File.exist?( $JOURNAL ) ) + system( 'less ' + $JOURNAL ) + else + puts "AbTLinux journal is empty at this time." + end when "show-iqueue" puts "Display contents of install queue." This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-16 10:03:24
|
Revision: 184 http://svn.sourceforge.net/abtlinux/?rev=184&view=rev Author: eschabell Date: 2006-11-16 02:03:14 -0800 (Thu, 16 Nov 2006) Log Message: ----------- Adjusted show-journal to not use a system call, that is one gone. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-11-15 21:43:52 UTC (rev 183) +++ src/trunk/abt.rb 2006-11-16 10:03:14 UTC (rev 184) @@ -193,7 +193,11 @@ when "show-journal" if ( File.exist?( $JOURNAL ) ) - system( 'less ' + $JOURNAL ) + puts "\n\nAbTLinux journal:" + puts "=================" + log = IO.readlines( $JOURNAL ) + log.each{ |line| puts line } + puts "\n\n" else puts "AbTLinux journal is empty at this time." end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-16 10:41:11
|
Revision: 185 http://svn.sourceforge.net/abtlinux/?rev=185&view=rev Author: eschabell Date: 2006-11-16 02:41:10 -0800 (Thu, 16 Nov 2006) Log Message: ----------- Implemented news feed retrieval from abtlinux.org (abt -n). Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-11-16 10:03:14 UTC (rev 184) +++ src/trunk/abt.rb 2006-11-16 10:41:10 UTC (rev 185) @@ -30,11 +30,16 @@ require 'AbtDownloadManager' require 'AbtUsage' require 'fileutils' +require 'net/http' +require 'uri' +require 'rss/1.0' +require 'rss/2.0' require 'optparse' $PACKAGE_PATH = "./packages/" $SOURCES_REPOSITORY = "/var/spool/abt/sources" +$ABTNEWS = "http://abtlinux.org/e107_plugins/rss_menu/rss.php?1.2" ## # Setup for parsing arguments. @@ -220,8 +225,28 @@ show.usage( "generation" ) when "news", "-n" - puts "Display AbTLinux website newsfeed." - show.usage( "downloads" ) + # pick up the abtlinux.org news feed. + news = Net::HTTP.get( URI.parse( $ABTNEWS ) ) + + # display the feed neatly. + rss = nil + begin + rss = RSS::Parser.parse(news, false) + rescue RSS::Error + end + + if ( rss.nil? ) + puts $ABTNEWS + " is not RSS 1.0/2.0." + else + i = 0 + rss.items.each do |item| + i = i + 1 + puts "\nNews item number #{i}:" + puts "=========================" + puts "TITLE: #{item.title}\n" + puts "SUBJECT: #{item.description}\n" + end + end when "download", "-d" if ( ARGV.length == 2 && File.exist?( $PACKAGE_PATH + ARGV[1] + ".rb" ) ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-16 10:46:57
|
Revision: 186 http://svn.sourceforge.net/abtlinux/?rev=186&view=rev Author: eschabell Date: 2006-11-16 02:46:57 -0800 (Thu, 16 Nov 2006) Log Message: ----------- Addeed a title to the output of our news. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-11-16 10:41:10 UTC (rev 185) +++ src/trunk/abt.rb 2006-11-16 10:46:57 UTC (rev 186) @@ -238,6 +238,8 @@ if ( rss.nil? ) puts $ABTNEWS + " is not RSS 1.0/2.0." else + puts "\n\nThe latest and greatest news from AbTLinux:" + puts "===========================================" i = 0 rss.items.each do |item| i = i + 1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-16 14:30:08
|
Revision: 190 http://svn.sourceforge.net/abtlinux/?rev=190&view=rev Author: eschabell Date: 2006-11-16 06:16:50 -0800 (Thu, 16 Nov 2006) Log Message: ----------- Expanded a comment. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-11-16 14:14:50 UTC (rev 189) +++ src/trunk/abt.rb 2006-11-16 14:16:50 UTC (rev 190) @@ -40,7 +40,8 @@ ## -# Setup for parsing arguments. +# Setup needed classes and get ready +# to parse arguments. ## manager = AbtPackageManager.new logger = AbtLogManager.new This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-16 20:47:27
|
Revision: 191 http://svn.sourceforge.net/abtlinux/?rev=191&view=rev Author: eschabell Date: 2006-11-16 12:47:21 -0800 (Thu, 16 Nov 2006) Log Message: ----------- Reversed the list of news items to show most recent news first. Also cleaned up news items (stupid tags from site gone). Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-11-16 14:16:50 UTC (rev 190) +++ src/trunk/abt.rb 2006-11-16 20:47:21 UTC (rev 191) @@ -242,13 +242,18 @@ else puts "\n\nThe latest and greatest news from AbTLinux:" puts "===========================================" - i = 0 - rss.items.each do |item| - i = i + 1 - puts "\nNews item number #{i}:" - puts "=========================" - puts "TITLE: #{item.title}\n" - puts "SUBJECT: #{item.description}\n" + + rss.items.reverse.each do |item| + title = "News item : #{item.title}" + puts "\n#{title}" + + for i in 0...title.length + print "=" + end + + stripped = item.description.sub( '[/html]', '' ) + stripped = stripped.sub( '[click here]', ' ' ) + puts "\n#{stripped}\n\n" end end logger.logToJournal( "Completed the retrieval of AbTLinux news." ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-17 15:26:26
|
Revision: 194 http://svn.sourceforge.net/abtlinux/?rev=194&view=rev Author: eschabell Date: 2006-11-17 07:17:53 -0800 (Fri, 17 Nov 2006) Log Message: ----------- Fixed spacing typo. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-11-17 15:17:16 UTC (rev 193) +++ src/trunk/abt.rb 2006-11-17 15:17:53 UTC (rev 194) @@ -124,7 +124,7 @@ details = package.details puts "|=====================================" - puts "| Package name\t:#{details['Package name']}" + puts "| Package name\t: #{details['Package name']}" details.delete( "Package name" ) puts "| Version\t: #{details['Version']}" details.delete( "Version" ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-22 20:01:12
|
Revision: 231 http://svn.sourceforge.net/abtlinux/?rev=231&view=rev Author: eschabell Date: 2006-11-22 12:01:11 -0800 (Wed, 22 Nov 2006) Log Message: ----------- Added some eye-candy returns to install output. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-11-22 20:00:15 UTC (rev 230) +++ src/trunk/abt.rb 2006-11-22 20:01:11 UTC (rev 231) @@ -62,7 +62,9 @@ logger.logToJournal( "Starting to install #{options['package']}" ) if ( manager.installPackage( options['package'] ) ) + puts "\n\n" puts "Completed install of #{options['package']}." + puts "\n\n" logger.logToJournal( "Completed install of #{options['package']}." ) else puts "#{options['package'].capitalize} install failed, see journal." This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-25 15:18:21
|
Revision: 237 http://svn.sourceforge.net/abtlinux/?rev=237&view=rev Author: eschabell Date: 2006-11-25 07:18:21 -0800 (Sat, 25 Nov 2006) Log Message: ----------- Added version reporting. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-11-25 15:17:51 UTC (rev 236) +++ src/trunk/abt.rb 2006-11-25 15:18:21 UTC (rev 237) @@ -123,6 +123,15 @@ exit end + # abt -v | --version + when "-v", "--version" + if ( ARGV.length == 1 ) + puts "Abt Package Manager version is : #{$ABT_VERSION}" + else + show.usage( "queries" ) + exit + end + # abt show-details <package> when "show-details" if ( ARGV.length == 2 && File.exist?( $PACKAGE_PATH + ARGV[1] + ".rb" ) ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-25 16:14:07
|
Revision: 242 http://svn.sourceforge.net/abtlinux/?rev=242&view=rev Author: eschabell Date: 2006-11-25 08:14:07 -0800 (Sat, 25 Nov 2006) Log Message: ----------- Updated to work with the new log display method. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-11-25 16:13:17 UTC (rev 241) +++ src/trunk/abt.rb 2006-11-25 16:14:07 UTC (rev 242) @@ -198,7 +198,7 @@ # abt show-journal when "show-journal" - reporter.showJournal + reporter.showJournal( $JOURNAL ) when "show-iqueue" puts "Display contents of install queue." @@ -223,7 +223,7 @@ # abtlinux.org news feeds. puts "\n" - if ( !downloader.retrieveNewsFeed( $ABTNEWS ) ) + if ( !downloader.retrieveNewsFeed( $ABTNEWS , "true" ) ) puts "Failed to retrieve the AbTLinux news feed." end @@ -236,6 +236,9 @@ if ( !downloader.retrieveNewsFeed( $ABTNEWS_POSTS ) ) puts "Failed to retrieve the AbTLinux new posts news feed." end + + # display the file contents. + reporter.showJournal( $ABTNEWS_LOG ) logger.logToJournal( "Completed the retrieval of AbTLinux news." ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |