Thread: [Abtlinux-svn] SF.net SVN: abtlinux: [302] src/trunk/abt.rb (Page 2)
Status: Alpha
Brought to you by:
eschabell
From: <esc...@us...> - 2007-02-26 20:54:15
|
Revision: 302 http://svn.sourceforge.net/abtlinux/?rev=302&view=rev Author: eschabell Date: 2007-02-26 12:54:16 -0800 (Mon, 26 Feb 2007) Log Message: ----------- Placing three stars, ***, for abt messages to terminal during processing. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2007-02-26 20:34:04 UTC (rev 301) +++ src/trunk/abt.rb 2007-02-26 20:54:16 UTC (rev 302) @@ -64,11 +64,11 @@ if ( manager.installPackage( options['package'] ) ) puts "\n\n" - puts "Completed install of #{options['package']}." + 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." + puts "*** #{options['package'].capitalize} install failed, see journal. ***" end #reporter.showQueue( "install" ); # DEBUG. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2007-03-05 20:39:39
|
Revision: 323 http://svn.sourceforge.net/abtlinux/?rev=323&view=rev Author: eschabell Date: 2007-03-05 12:39:40 -0800 (Mon, 05 Mar 2007) Log Message: ----------- Implemented a check for already installed package on install call. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2007-03-05 20:38:59 UTC (rev 322) +++ src/trunk/abt.rb 2007-03-05 20:39:40 UTC (rev 323) @@ -62,6 +62,19 @@ options['package'] = ARGV[1] logger.logToJournal( "Starting to install #{options['package']}" ) + # return if already installed. + require options['package'] + sw = eval( "#{options['package'].capitalize}.new" ) + + if ( File.directory?( + "#{$PACKAGE_INSTALLED}/#{sw.details['Source location']}" ) ) + puts "\n\n" + puts "*** Package #{options['package']} already installed, " + + "try 'abt reinstall #{options['package']}' ***" + puts "\n\n" + exit + end + if ( manager.installPackage( options['package'] ) ) puts "\n\n" puts "*** Completed install of #{options['package']}. ***" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2007-07-17 19:30:34
|
Revision: 373 http://svn.sourceforge.net/abtlinux/?rev=373&view=rev Author: eschabell Date: 2007-07-17 12:30:37 -0700 (Tue, 17 Jul 2007) Log Message: ----------- Typo fixed in install_package to ensure call to journal works. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2007-07-17 19:29:39 UTC (rev 372) +++ src/trunk/abt.rb 2007-07-17 19:30:37 UTC (rev 373) @@ -72,7 +72,7 @@ puts "\n\n" puts "*** Completed caching of package #{options['package']}. ***" puts "\n\n" - logger.to_ournal( "\nCaching completed for package #{options['package']}." ) + logger.to_journal( "\nCaching completed for package #{options['package']}." ) else logger.to_journal( "\nCaching of package #{options['package']} failed.") end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2007-07-17 21:17:21
|
Revision: 375 http://svn.sourceforge.net/abtlinux/?rev=375&view=rev Author: eschabell Date: 2007-07-17 14:17:24 -0700 (Tue, 17 Jul 2007) Log Message: ----------- Small adjustments to help the removal of a package calls. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2007-07-17 20:04:48 UTC (rev 374) +++ src/trunk/abt.rb 2007-07-17 21:17:24 UTC (rev 375) @@ -72,9 +72,9 @@ puts "\n\n" puts "*** Completed caching of package #{options['package']}. ***" puts "\n\n" - logger.to_journal( "\nCaching completed for package #{options['package']}." ) + logger.to_journal( "Caching completed for package #{options['package']}." ) else - logger.to_journal( "\nCaching of package #{options['package']} failed.") + logger.to_journal( "Caching of package #{options['package']} failed.") end else puts "*** #{options['package'].capitalize} install failed, " + @@ -97,7 +97,8 @@ when "remove", "-r" if ( ARGV.length == 2 ) options['package'] = ARGV[1] - logger.to_journal( "Starting to remove #{options['package']}" ) + puts "Starting to remove #{options['package']}." + logger.to_journal( "Starting to remove #{options['package']}." ) # return if not installed. if ( !( system.package_installed( options['package'] ) ) ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2007-07-23 10:11:41
|
Revision: 398 http://svn.sourceforge.net/abtlinux/?rev=398&view=rev Author: eschabell Date: 2007-07-23 03:11:42 -0700 (Mon, 23 Jul 2007) Log Message: ----------- Added some task markers for remaining abt options. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2007-07-23 09:34:17 UTC (rev 397) +++ src/trunk/abt.rb 2007-07-23 10:11:42 UTC (rev 398) @@ -157,6 +157,7 @@ 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 @@ -167,6 +168,7 @@ when "freeze", "-f" if ( ARGV.length == 2 ) options['package'] = ARGV[1] + # FIXME : freeze package implementation. puts "Holdinging package : #{options['package']} at current version." else show.usage( "packages" ) @@ -285,6 +287,7 @@ when "show-depends" if ( ARGV.length == 2 ) options['package'] = ARGV[1] + # FIXME : show package depends implementation. puts "Display dependency tree for package : " + options['package'] else show.usage( "queries" ) @@ -294,6 +297,7 @@ when "show-files" if ( ARGV.length == 2 ) options['package'] = ARGV[1] + # FIXME : show pkg files implementation. puts "Display installed files from package : " + options['package'] else show.usage( "queries" ) @@ -303,6 +307,7 @@ when "show-owner" 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" ) @@ -318,10 +323,12 @@ end when "show-frozen" + # FIXME : show frozen pkg's implementation. puts "Display all packages frozen at current version." show.usage( "queries" ) when "show-untracked" + # FIXME : show untracked files implementation. puts "Display all files on system not tracked by AbTLinux." show.usage( "queries" ) @@ -333,14 +340,17 @@ reporter.show_queue( "install" ) when "show-patches" + # FIXME : show patches implementation. puts "Display currently available patches for installed package tree." show.usage( "queries" ) when "show-updates" + # FIXME : show updates implementation. puts "Display package listing with available update versions." 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" ) @@ -398,6 +408,7 @@ when "update", "-u" if ( ARGV.length == 2 ) options['updateItem'] = ARGV[1] + # FIXME : update package implementation. puts "Updating item : #{options['updateItem']}" else show.usage( "downloads" ) @@ -405,10 +416,12 @@ end when "purge-src" + # FIXME : purge-src implementation. puts "Remove source caches for packages no longer installed." show.usage( "fix" ) when "purge-logs" + # FIXME : purge-logs implementation. puts "Remove log files for packages no longer installed." show.usage( "fix" ) @@ -433,6 +446,7 @@ when "verify-symlinks" 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" ) @@ -442,6 +456,7 @@ when "verify-deps" 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" ) @@ -451,6 +466,7 @@ when "verify-integrity" if ( ARGV.length == 2 ) options['pkg'] = ARGV[1] + # FIXME : verify integrity of install pkg files implementation. print "Verifiy integrity of installed files for " puts "package : #{options['pkg']}" else @@ -461,6 +477,7 @@ when "fix" 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" ) @@ -470,6 +487,7 @@ when "build-location" 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 @@ -478,6 +496,7 @@ end when "package-repo" + # FIXME : packge repo implementation. # sort out that we have enough args. case ARGV.length This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2007-08-12 18:19:49
|
Revision: 418 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=418&view=rev Author: eschabell Date: 2007-08-12 11:19:52 -0700 (Sun, 12 Aug 2007) Log Message: ----------- Expanded abt call to produce usage overview if --help or -h are opted for. This avoids a root login for help calls. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2007-07-24 13:40:05 UTC (rev 417) +++ src/trunk/abt.rb 2007-08-12 18:19:52 UTC (rev 418) @@ -38,8 +38,9 @@ show = AbtUsage.new # deal with usage request. -if ( ARGV.length == 0 ) +if ( ARGV.length == 0 || ( ARGV.length == 1 && ( ARGV[0] == '--help' || ARGV[0] == '-h' ) ) ) show.usage( "all" ) + exit end # login as root for the rest. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2007-08-12 18:21:02
|
Revision: 419 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=419&view=rev Author: eschabell Date: 2007-08-12 11:21:03 -0700 (Sun, 12 Aug 2007) Log Message: ----------- Extended a bit further to take help as a call for help. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2007-08-12 18:19:52 UTC (rev 418) +++ src/trunk/abt.rb 2007-08-12 18:21:03 UTC (rev 419) @@ -38,7 +38,7 @@ show = AbtUsage.new # deal with usage request. -if ( ARGV.length == 0 || ( ARGV.length == 1 && ( ARGV[0] == '--help' || ARGV[0] == '-h' ) ) ) +if ( ARGV.length == 0 || ( ARGV.length == 1 && ( ARGV[0] == '--help' || ARGV[0] == '-h' || ARGV[0].downcase == 'help' ) ) ) show.usage( "all" ) exit end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2007-08-12 19:11:23
|
Revision: 420 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=420&view=rev Author: eschabell Date: 2007-08-12 12:11:22 -0700 (Sun, 12 Aug 2007) Log Message: ----------- Implemented 'abt show-files <package>'. Some display code adjustments to other show-* calls. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2007-08-12 18:21:03 UTC (rev 419) +++ src/trunk/abt.rb 2007-08-12 19:11:22 UTC (rev 420) @@ -230,7 +230,7 @@ end puts "\nDisplay configure log for package : #{options['package']}" - puts "===============================\n\n" + puts "===============================\n" reporter.show_package_log( options['package'], "configure" ) else show.usage( "queries" ) @@ -246,7 +246,7 @@ end puts "\nDisplay build log for package : #{options['package']}" - puts "===============================\n\n" + puts "===============================\n" reporter.show_package_log( options['package'], "build" ) else show.usage( "queries" ) @@ -262,7 +262,7 @@ end puts "\nDisplay install log for package : #{options['package']}" - puts "===============================\n\n" + puts "===============================\n" reporter.show_package_log( options['package'], "install" ) else show.usage( "queries" ) @@ -278,7 +278,7 @@ end puts "\nDisplay integrity log for package : #{options['package']}" - puts "===============================\n\n" + puts "=================================\n" reporter.show_package_log( options['package'], "integrity" ) else show.usage( "queries" ) @@ -298,8 +298,14 @@ when "show-files" if ( ARGV.length == 2 ) options['package'] = ARGV[1] - # FIXME : show pkg files implementation. - puts "Display installed files from package : " + 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" ) else show.usage( "queries" ) exit This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2007-12-30 21:04:45
|
Revision: 450 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=450&view=rev Author: eschabell Date: 2007-12-30 13:04:18 -0800 (Sun, 30 Dec 2007) Log Message: ----------- Implemented checks for main config file and for possible local config file to override settings. Refactored this to use load instead of require which ensures each run will load these files (require does it just once), thereby picking up any changes on next pass. If the main config file is missing, it will attempt to svn a copy from the central repo to fix itself. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2007-12-29 18:25:47 UTC (rev 449) +++ src/trunk/abt.rb 2007-12-30 21:04:18 UTC (rev 450) @@ -24,8 +24,26 @@ # AbTLinux; if not, write to the Free Software Foundation, Inc., 51 Franklin # St, Fifth Floor, Boston, MA 02110-1301 USA ## -require 'abtconfig' +# 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' +else + # missing configuration file, do some abt update? + puts "\n[abt.rb] Missing our main configuration file at /etc/abt/abtconfig.rb" + puts "\n Maybe time for an abt update? Let us try to fix it for you!\n" + ["/etc/abt", "/etc/abt/local"].each { |dir| + if ( ! File.directory?( dir ) ) + FileUtils.mkdir_p( dir ) + puts "Created directory: #{dir}." + end + } + system( "svn export #{$ABTLINUX_MAIN_CONFIG} /etc/abt/abtconfig.rb" ) + exit +end + ## # Setup needed classes and get ready to parse arguments. ## @@ -40,10 +58,16 @@ # setup timestamp. logger.datetime_format = "%Y-%m-%d %H:%M:%S " - # TODO: used only until refactoring done. myLogger = AbtLogManager.new +# And loading local file if found. +if File.exist?( "/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 + # deal with usage request. if ( ARGV.length == 0 || ( ARGV.length == 1 && ( ARGV[0] == '--help' || ARGV[0] == '-h' || ARGV[0].downcase == 'help' ) ) ) show.usage( "all" ) 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:27:59
|
Revision: 452 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=452&view=rev Author: eschabell Date: 2007-12-31 03:27:36 -0800 (Mon, 31 Dec 2007) Log Message: ----------- Refactored some user paths when non-root users try to start abt. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2007-12-31 11:24:54 UTC (rev 451) +++ src/trunk/abt.rb 2007-12-31 11:27:36 UTC (rev 452) @@ -32,30 +32,45 @@ load '/etc/abt/abtconfig.rb' else # missing configuration file, do some abt update? - puts "\n[abt.rb] Missing our main configuration file at /etc/abt/abtconfig.rb" - puts "\n Maybe time for an abt update? Let us try to fix it for you!\n" - ["/etc/abt", "/etc/abt/local"].each { |dir| - if ( ! File.directory?( dir ) ) - FileUtils.mkdir_p( dir ) - puts "Created directory: #{dir}." - end - } - system( "svn export #{$ABTLINUX_MAIN_CONFIG} /etc/abt/abtconfig.rb" ) - exit + 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. + 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 ) + puts "Created directory: #{dir}." + end + } + system( "svn export #{$ABTLINUX_MAIN_CONFIG} /etc/abt/abtconfig.rb" ) + exit + end end ## # Setup needed classes and get ready to parse arguments. ## manager = AbtPackageManager.new -logger = Logger.new($JOURNAL) # initializes all needed paths. reporter = AbtReportManager.new downloader = AbtDownloadManager.new system = AbtSystemManager.new options = Hash.new 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" ) + exit +end + +# login as root for the rest. +manager.root_login( ARGV ) + # setup timestamp. +logger = Logger.new($JOURNAL) # initializes all needed paths. logger.datetime_format = "%Y-%m-%d %H:%M:%S " # TODO: used only until refactoring done. @@ -68,15 +83,7 @@ logger.info( "[abt.rb] No local configuration file found, not a problem, just informing." ) end -# deal with usage request. -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 ) - # parse arguments. case ARGV[0] 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 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...> - 2008-01-20 16:47:52
|
Revision: 480 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=480&view=rev Author: eschabell Date: 2008-01-20 08:47:12 -0800 (Sun, 20 Jan 2008) Log Message: ----------- removed a fixme marker in the commented out downgrade code. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2008-01-20 16:45:39 UTC (rev 479) +++ src/trunk/abt.rb 2008-01-20 16:47:12 UTC (rev 480) @@ -208,7 +208,7 @@ # if (ARGV.length == 3) # options['version'] = ARGV[1] # options['package'] = ARGV[2] -# # FIXME: downgrade pkg implementation. +# # downgrade pkg implementation. # print "Downgradinging package : #{options['package']} " # puts "to version : #{options['version']}" # else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-21 21:23:18
|
Revision: 484 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=484&view=rev Author: eschabell Date: 2008-01-21 13:22:35 -0800 (Mon, 21 Jan 2008) Log Message: ----------- Added missing require if abtconfig is missing. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2008-01-20 20:36:09 UTC (rev 483) +++ src/trunk/abt.rb 2008-01-21 21:22:35 UTC (rev 484) @@ -53,6 +53,8 @@ $LOAD_PATH.unshift "#{$DEFAULT_PREFIX}/etc/abt/" load 'abtconfig.rb' else + require 'fileutils' # need this here, usually in abtconfig. + # missing configuration file, do some abt update? puts "\nMissing our main configuration file at /etc/abt/abtconfig.rb" puts "\nMaybe time for an abt update? Let us try to fix it for you!\n" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-21 21:55:44
|
Revision: 486 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=486&view=rev Author: eschabell Date: 2008-01-21 13:53:38 -0800 (Mon, 21 Jan 2008) Log Message: ----------- Large refactoring of the auto installation part of abt.rb. Removed some logic errors in this code for a clean installation when run the first time (such as 'abt --help'), it now properly creates any missing directories and installs the central configuration file and all libs. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2008-01-21 21:47:58 UTC (rev 485) +++ src/trunk/abt.rb 2008-01-21 21:53:38 UTC (rev 486) @@ -27,11 +27,12 @@ # Check and install our library files. # -$DEFAULT_PREFIX = "/usr/local" +$DEFAULT_PREFIX = "/usr/local" +libpath = "#{$DEFAULT_PREFIX}/var/lib/abt" $ABTLINUX_CLASS_LIBS = "https://abtlinux.svn.sourceforge.net/svnroot/abtlinux/src/trunk/libs" -if (! File.directory?("#{$DEFAULT_PREFIX}/var/lib/abt") || Dir["#{$DEFAULT_PREFIX}/var/lib/abt"].empty?) - puts "\nMissing needed AbTLinux library files at /var/lib/abt" +if (! File.directory?(libpath) || Dir[libpath].empty?) + puts "\nMissing needed AbTLinux library files..." puts "\nMaybe time for an abt update? Let us try to fix it for you!\n" # check for root login. @@ -39,24 +40,33 @@ puts "\nMust be root to fix library files." exit else - system("svn co #{$ABTLINUX_CLASS_LIBS} #{$DEFAULT_PREFIX}/var/lib/abt/") + require 'fileutils' # needed here, normally in abtconfig. + + if (! File.directory?(libpath)) + FileUtils.mkdir_p(libpath) + puts "Created directory: #{libpath}" + end + + system("svn co #{$ABTLINUX_CLASS_LIBS} #{libpath}") end - - $LOAD_PATH.unshift "#{$DEFAULT_PREFIX}/var/lib/abt/" end +$LOAD_PATH.unshift libpath + # Load our central configuration file. # $ABTLINUX_MAIN_CONFIG = "https://abtlinux.svn.sourceforge.net/svnroot/abtlinux/src/trunk/abtconfig.rb" +configfile = "#{$DEFAULT_PREFIX}/etc/abt/abtconfig.rb" +maxconfigpath = "#{$DEFAULT_PREFIX}/etc/abt/local" -if File.exist?("#{$DEFAULT_PREFIX}/etc/abt/abtconfig.rb") +if File.exist?(configfile) $LOAD_PATH.unshift "#{$DEFAULT_PREFIX}/etc/abt/" load 'abtconfig.rb' else require 'fileutils' # need this here, usually in abtconfig. # missing configuration file, do some abt update? - puts "\nMissing our main configuration file at /etc/abt/abtconfig.rb" + puts "\nMissing our main configuration file at #{configfile}" puts "\nMaybe time for an abt update? Let us try to fix it for you!\n" # check for root login. @@ -64,25 +74,24 @@ puts "\nMust be root to fix configuration files." exit else - ["#{$DEFAULT_PREFIX}/etc/abt", "#{$DEFAULT_PREFIX}/etc/abt/local"].each { |dir| - if (! File.directory?(dir)) - FileUtils.mkdir_p(dir) - puts "Created directory: #{dir}." - end - } - system("svn export #{$ABTLINUX_MAIN_CONFIG} #{$DEFAULT_PREFIX}/etc/abt/abtconfig.rb") + if (! File.directory?(maxconfigpath)) + puts "debug: directory to be created: #{maxconfigpath}" + FileUtils.mkdir_p maxconfigpath + puts "Created directory: #{maxconfigpath}" + end + + system("svn export #{$ABTLINUX_MAIN_CONFIG} #{configfile}") end $LOAD_PATH.unshift "#{$DEFAULT_PREFIX}/etc/abt/" load 'abtconfig.rb' if File.exist?("#{$DEFAULT_PREFIX}/etc/abt/local/localconfig.rb") - $LOAD_PATH.unshift "#{$DEFAULT_PREFIX}/etc/abt/local/" + $LOAD_PATH.unshift maxconfigpath load 'localconfig.rb' end end - ## # Setup needed classes and get ready to parse arguments. ## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-27 10:39:38
|
Revision: 488 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=488&view=rev Author: eschabell Date: 2008-01-27 02:39:40 -0800 (Sun, 27 Jan 2008) Log Message: ----------- Updated abt main file to fix missing package directory, now running any abt command the first time should check and setup the system (in /usr/local by default) to work with abt package manager. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2008-01-27 09:19:16 UTC (rev 487) +++ src/trunk/abt.rb 2008-01-27 10:39:40 UTC (rev 488) @@ -83,15 +83,34 @@ system("svn export #{$ABTLINUX_MAIN_CONFIG} #{configfile}") end - $LOAD_PATH.unshift "#{$DEFAULT_PREFIX}/etc/abt/" - load 'abtconfig.rb' - if File.exist?("#{$DEFAULT_PREFIX}/etc/abt/local/localconfig.rb") $LOAD_PATH.unshift maxconfigpath load 'localconfig.rb' end end +# should be installed, load config. +$LOAD_PATH.unshift "#{$DEFAULT_PREFIX}/etc/abt/" +load 'abtconfig.rb' + +# Check for missing default packages path, if needed install them. +# +if (! File.directory?($PACKAGE_PATH) || (Dir.entries($PACKAGE_PATH) - [ '.', '..' ]).empty?) + puts "\nMissing our main packages directory at #{$PACKAGE_PATH}" + puts "\nMaybe time for an abt update? Let us try to fix it for you!\n" + + # check for root login. + if (Process.uid != 0) + puts "\nMust be root to install package files." + exit + else + FileUtils.mkdir_p($PACKAGE_PATH) + puts "Created missing directory: #{$PACKAGE_PATH}" + end + + system("svn --force export #{$ABTLINUX_PACKAGES} #{$PACKAGE_PATH}") +end + ## # Setup needed classes and get ready to parse arguments. ## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-01-28 19:36:02
|
Revision: 496 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=496&view=rev Author: eschabell Date: 2008-01-28 11:36:02 -0800 (Mon, 28 Jan 2008) Log Message: ----------- Added another rather crucial dependency for using abt, this check is required. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2008-01-28 15:40:27 UTC (rev 495) +++ src/trunk/abt.rb 2008-01-28 19:36:02 UTC (rev 496) @@ -25,6 +25,14 @@ # St, Fifth Floor, Boston, MA 02110-1301 USA ## +## +## NOTE: some dependencies; checkinstall. +## +if !File.exists? "/usr/bin/installwatch" + puts "\n\nUnable to run without installwatch, install checkinstall package first." + exit +end + # Check and install our library files. # $DEFAULT_PREFIX = "/usr/local" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-02-14 20:37:04
|
Revision: 525 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=525&view=rev Author: eschabell Date: 2008-02-14 12:37:09 -0800 (Thu, 14 Feb 2008) Log Message: ----------- Refactored abt file to properly check all installwatch locations. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2008-02-11 15:17:21 UTC (rev 524) +++ src/trunk/abt.rb 2008-02-14 20:37:09 UTC (rev 525) @@ -28,8 +28,18 @@ ## ## NOTE: some dependencies; checkinstall. ## -if !File.exists? "/usr/bin/installwatch" - puts "\n\nUnable to run without installwatch, install checkinstall package first." +$counter = 0 +["/usr/bin/installwatch", "/bin/installwatch", "/usr/sbin/installwatch", "/sbin/installwatch", + "/usr/local/bin/installwatch", "/usr/local/usr/bin/installwatch", "/usr/local/sbin/installwatch", + "/usr/local/usr/sbin/installwatch"].each { |file| + + if File.exists?(file) + $counter =+ 1 + end +} + +if !($counter > 0) + puts "\n\nUnable to run without installwatch, see package details of checkinstall." exit end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |