Thread: [Abtlinux-svn] SF.net SVN: abtlinux: [165] src/trunk/AbtPackage.rb
Status: Alpha
Brought to you by:
eschabell
From: <esc...@us...> - 2006-11-14 14:59:23
|
Revision: 165 http://svn.sourceforge.net/abtlinux/?rev=165&view=rev Author: eschabell Date: 2006-11-14 06:59:15 -0800 (Tue, 14 Nov 2006) Log Message: ----------- Changed the details method to return a hash as promised. Modified Paths: -------------- src/trunk/AbtPackage.rb Modified: src/trunk/AbtPackage.rb =================================================================== --- src/trunk/AbtPackage.rb 2006-11-14 12:48:23 UTC (rev 164) +++ src/trunk/AbtPackage.rb 2006-11-14 14:59:15 UTC (rev 165) @@ -91,7 +91,6 @@ # ## def initialize( data ) - @name = data['name'] @execName = data['execName'] @version = data['version'] @@ -108,7 +107,6 @@ @mirrorPath = data['mirrorPath'] @license = data['license'] @description = data['description'] - end ## @@ -117,24 +115,24 @@ # <b>RETURNS:</b> <i>hash</i> - Contains all AbtPackage attributes (constants). ## def details - puts "**************************************" - puts "Package name : " + @name - puts "Executable : " + @execName - puts "Version : " + @version - puts "Source directory : " + @srcDir - puts "Homepage : " + @homepage - puts "Source location : " + @srcUrl - puts "Depends On : " + @dependsOn - puts "Relies On : " + @reliesOn - puts "Optional DO : " + @optionalDO - puts "Optional RO : " + @optionalRO - puts "Security hash : " + @hashCheck - puts "Patches : " + @patches - puts "Patches hash : " + @patchesHashCheck - puts "Mirror : " + @mirrorPath - puts "License : " + @license - puts "Description : " + @description - puts "**************************************" + return { + "name" => @name, + "execName" => @execName, + "version" => @version, + "srcDir" => @srcDir, + "homepage" => @homepage, + "srcUrl" => @srcUrl, + "dependsOn" => @dependsOn, + "reliesOn" => @reliesOn, + "optionalDO" => @optionalDO, + "optionalRO" => @optionalRO, + "hashCheck" => @hashCheck, + "patches" => @patches, + "patchesHashCheck" => @patchesHashCheck, + "mirrorPath" => @mirrorPath, + "license" => @license, + "description" => @description + } end ## @@ -190,5 +188,4 @@ ## def post end - end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-18 19:14:40
|
Revision: 209 http://svn.sourceforge.net/abtlinux/?rev=209&view=rev Author: eschabell Date: 2006-11-18 11:14:41 -0800 (Sat, 18 Nov 2006) Log Message: ----------- Added two new helper methods to unpack and cleanup package sources. Also worked out some of the pre section. Modified Paths: -------------- src/trunk/AbtPackage.rb Modified: src/trunk/AbtPackage.rb =================================================================== --- src/trunk/AbtPackage.rb 2006-11-18 18:16:14 UTC (rev 208) +++ src/trunk/AbtPackage.rb 2006-11-18 19:14:41 UTC (rev 209) @@ -142,6 +142,22 @@ # <b>RETURNS:</b> <i>boolean</i> - True if completes sucessfully, otherwise false. ## def pre + downloader = AbtDownloadManager.new + + # download sources. + if ( !downloader.retrievePackageSource( @name.downcase, $SOURCES_REPOSITORY ) ) + return false + end + + # unpack sources. + if ( !unpackSources ) + return false + end + + # TODO: retrieve patches? + # TODO: apply patches? + + return true end ## @@ -188,4 +204,42 @@ ## def post end + + ## + # Unpacks this packages source file into the standard build location. + # + # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, otherwise false. + ## + def unpackSources + sourcesToUnpack = "#{$SOURCES_REPOSITORY}/#{File.basename( srcUrl )}" + + if ( !File.exist?( sourcesToUnpack ) ) + return false + end + + # TODO: system call removal? + if ( !system( "cd #{$BUILD_LOCATION}; tar xzvf #{sourcesToUnpack}" ) ) + return false + end + + return true + end + + ## + # Cleans up this packages source build directory. + # + # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, otherwise false. + ## + def removeBuildSources + buildSourcesLocation = "#{$BUILD_LOCATION}/#{srcDir}" + + if ( !File.directory?( buildSourcesLocation ) ) + return true + end + + # TODO: system call removal? + if ( !FileUtils.rm_rf buildSourcesLocation, :verbose => true ) + return false + end + end end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-19 10:56:42
|
Revision: 216 http://svn.sourceforge.net/abtlinux/?rev=216&view=rev Author: eschabell Date: 2006-11-19 02:56:42 -0800 (Sun, 19 Nov 2006) Log Message: ----------- Added support for unpacking gz, tgz, bz2, tar and zip formats. Modified Paths: -------------- src/trunk/AbtPackage.rb Modified: src/trunk/AbtPackage.rb =================================================================== --- src/trunk/AbtPackage.rb 2006-11-19 10:20:52 UTC (rev 215) +++ src/trunk/AbtPackage.rb 2006-11-19 10:56:42 UTC (rev 216) @@ -211,14 +211,44 @@ # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, otherwise false. ## def unpackSources - sourcesToUnpack = "#{$SOURCES_REPOSITORY}/#{File.basename( srcUrl )}" + srcFile = File.basename( srcUrl ) + sourcesToUnpack = "#{$SOURCES_REPOSITORY}/#{srcFile}" + unpackTool = "" + logger = AbtLogManager.new if ( !File.exist?( sourcesToUnpack ) ) return false end + # determine which supported compression used [gz, tar, tgz, bz2, zip]. + compressionType = srcFile.split( '.' ) + + case compressionType.last + + when "gz" + unpackTool = "tar xzvf" + + when "tar" + unpackTool = "tar xvf" + + when "bz2" + unpackTool = "tar xjvf" + + when "tgz" + unpackTool = "tar xzvf" + + when "zip" + unpackTool = "unizp" + + else + # unsupported format. + return false + end + + #logger.logToJournal( "DEBUG: unpack tool will be '#{unpackTool}'." ) + # TODO: system call removal? - if ( !system( "cd #{$BUILD_LOCATION}; tar xzvf #{sourcesToUnpack}" ) ) + if ( !system( "cd #{$BUILD_LOCATION}; #{unpackTool} #{sourcesToUnpack}" ) ) return false end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-19 13:51:21
|
Revision: 219 http://svn.sourceforge.net/abtlinux/?rev=219&view=rev Author: eschabell Date: 2006-11-19 05:51:20 -0800 (Sun, 19 Nov 2006) Log Message: ----------- Added simple configure implementation and forced call to own unpackSources method. Modified Paths: -------------- src/trunk/AbtPackage.rb Modified: src/trunk/AbtPackage.rb =================================================================== --- src/trunk/AbtPackage.rb 2006-11-19 12:47:38 UTC (rev 218) +++ src/trunk/AbtPackage.rb 2006-11-19 13:51:20 UTC (rev 219) @@ -207,10 +207,12 @@ end # unpack sources. - if ( !unpackSources ) + if ( !self.unpackSources ) return false end + # TODO: create_group? + # TODO: create_user? # TODO: retrieve patches? # TODO: apply patches? @@ -227,6 +229,14 @@ # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, otherwise false. ## def configure + require 'open3' + buildSite = "#{$BUILD_LOCATION}/#{@srcDir}" + + if ( !system( "cd #{buildSite}; make ./configure --prefix=#{$defaultPrefix}" ) ) + return false + end + + return true end ## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-22 20:00:16
|
Revision: 230 http://svn.sourceforge.net/abtlinux/?rev=230&view=rev Author: eschabell Date: 2006-11-22 12:00:15 -0800 (Wed, 22 Nov 2006) Log Message: ----------- Added some debug lines but left them commented out for later. Fixed borked system call for configure step. Modified Paths: -------------- src/trunk/AbtPackage.rb Modified: src/trunk/AbtPackage.rb =================================================================== --- src/trunk/AbtPackage.rb 2006-11-22 19:55:27 UTC (rev 229) +++ src/trunk/AbtPackage.rb 2006-11-22 20:00:15 UTC (rev 230) @@ -229,10 +229,12 @@ # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, otherwise false. ## def configure - require 'open3' + #logger = AbtLogManager.new buildSite = "#{$BUILD_LOCATION}/#{@srcDir}" + #logger.logToJournal( "DEBUG: calling system - cd #{buildSite}; ./configure --prefix=#{$defaultPrefix}" ) - if ( !system( "cd #{buildSite}; make ./configure --prefix=#{$defaultPrefix}" ) ) + # TODO: system call removal? + if ( !system( "cd #{buildSite}; ./configure --prefix=#{$defaultPrefix}" ) ) return false end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-12-03 10:58:25
|
Revision: 245 http://svn.sourceforge.net/abtlinux/?rev=245&view=rev Author: eschabell Date: 2006-12-03 02:58:25 -0800 (Sun, 03 Dec 2006) Log Message: ----------- Fixed typo in configure call. Modified Paths: -------------- src/trunk/AbtPackage.rb Modified: src/trunk/AbtPackage.rb =================================================================== --- src/trunk/AbtPackage.rb 2006-12-03 10:54:36 UTC (rev 244) +++ src/trunk/AbtPackage.rb 2006-12-03 10:58:25 UTC (rev 245) @@ -234,7 +234,7 @@ #logger.logToJournal( "DEBUG: calling system - cd #{buildSite}; ./configure --prefix=#{$DEFAULT_PREFIX}" ) # TODO: system call removal? - if ( !system( "cd #{buildSite}; ./configure --prefix=#{$DEFAULT_PREFEX}" ) ) + if ( !system( "cd #{buildSite}; ./configure --prefix=#{$DEFAULT_PREFIX}" ) ) return false end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-12-03 12:48:54
|
Revision: 250 http://svn.sourceforge.net/abtlinux/?rev=250&view=rev Author: eschabell Date: 2006-12-03 04:48:55 -0800 (Sun, 03 Dec 2006) Log Message: ----------- Updated configure to use wrapper system call and to produce a configure log. TODO shows work to be done here still. Modified Paths: -------------- src/trunk/AbtPackage.rb Modified: src/trunk/AbtPackage.rb =================================================================== --- src/trunk/AbtPackage.rb 2006-12-03 12:46:29 UTC (rev 249) +++ src/trunk/AbtPackage.rb 2006-12-03 12:48:55 UTC (rev 250) @@ -38,7 +38,7 @@ ## def unpackSources systemMgr = AbtSystemManager.new - srcFile = File.basename( srcUrl ) + srcFile = File.basename( @srcUrl ) sourcesToUnpack = "#{$SOURCES_REPOSITORY}/#{srcFile}" unpackTool = "" @@ -229,12 +229,14 @@ # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, otherwise false. ## def configure - #logger = AbtLogManager.new - buildSite = "#{$BUILD_LOCATION}/#{@srcDir}" - #logger.logToJournal( "DEBUG: calling system - cd #{buildSite}; ./configure --prefix=#{$DEFAULT_PREFIX}" ) + systemMgr = AbtSystemManager.new + buildSite = "#{$BUILD_LOCATION}/#{@srcDir}" - # TODO: system call removal? - if ( !system( "cd #{buildSite}; ./configure --prefix=#{$DEFAULT_PREFIX}" ) ) + # TODO: this should not use tee, but in wrapper deal with stdout to file. + # also need to expand directory with @srcDir/@srcDir.configure. + command = "cd #{buildSite}; ./configure --prefix=#{$DEFAULT_PREFIX} | tee #{$PACKAGE_INSTALLED}/{@srcDir}.configure" + + if ( !systemMgr.runSystemCall( command ) ) return false end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-12-29 14:00:52
|
Revision: 271 http://svn.sourceforge.net/abtlinux/?rev=271&view=rev Author: eschabell Date: 2006-12-29 06:00:52 -0800 (Fri, 29 Dec 2006) Log Message: ----------- Some beautification. Modified Paths: -------------- src/trunk/AbtPackage.rb Modified: src/trunk/AbtPackage.rb =================================================================== --- src/trunk/AbtPackage.rb 2006-12-29 13:52:49 UTC (rev 270) +++ src/trunk/AbtPackage.rb 2006-12-29 14:00:52 UTC (rev 271) @@ -173,22 +173,22 @@ ## def details return { - "Package name" => @name, - "Executable" => @execName, - "Version" => @version, - "Source location" => @srcDir, - "Homepage" => @homepage, - "Source uri" => @srcUrl, - "Depends On" => @dependsOn, - "Relies On" => @reliesOn, - "Optional DO" => @optionalDO, - "Optional RO" => @optionalRO, - "Security hash" => @hashCheck, - "Patches" => @patches, - "Patches hash" => @patchesHashCheck, - "Mirror" => @mirrorPath, - "License" => @license, - "Description" => @description + "Package name" => @name, + "Executable" => @execName, + "Version" => @version, + "Source location" => @srcDir, + "Homepage" => @homepage, + "Source uri" => @srcUrl, + "Depends On" => @dependsOn, + "Relies On" => @reliesOn, + "Optional DO" => @optionalDO, + "Optional RO" => @optionalRO, + "Security hash" => @hashCheck, + "Patches" => @patches, + "Patches hash" => @patchesHashCheck, + "Mirror" => @mirrorPath, + "License" => @license, + "Description" => @description } end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2007-01-23 20:21:28
|
Revision: 280 http://svn.sourceforge.net/abtlinux/?rev=280&view=rev Author: eschabell Date: 2007-01-23 12:21:26 -0800 (Tue, 23 Jan 2007) Log Message: ----------- Removed a bit of unnecessary comments. Modified Paths: -------------- src/trunk/AbtPackage.rb Modified: src/trunk/AbtPackage.rb =================================================================== --- src/trunk/AbtPackage.rb 2007-01-23 18:44:18 UTC (rev 279) +++ src/trunk/AbtPackage.rb 2007-01-23 20:21:26 UTC (rev 280) @@ -233,7 +233,6 @@ # TODO: this should not use tee, but in wrapper deal with stdout to file. # also need to expand directory with @srcDir/@srcDir.configure. - #command = "./configure --prefix=#{$DEFAULT_PREFIX} | tee #{$PACKAGE_INSTALLED}/{@srcDir}.configure" Dir.chdir( buildSite ) if ( !system( "./configure --prefix=#{$DEFAULT_PREFIX} | tee #{$PACKAGE_INSTALLED}/#{@srcDir}.configure" ) ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2007-02-03 19:02:20
|
Revision: 282 http://svn.sourceforge.net/abtlinux/?rev=282&view=rev Author: eschabell Date: 2007-02-03 11:02:10 -0800 (Sat, 03 Feb 2007) Log Message: ----------- Removed obsolete comments. Modified Paths: -------------- src/trunk/AbtPackage.rb Modified: src/trunk/AbtPackage.rb =================================================================== --- src/trunk/AbtPackage.rb 2007-01-23 20:24:55 UTC (rev 281) +++ src/trunk/AbtPackage.rb 2007-02-03 19:02:10 UTC (rev 282) @@ -231,8 +231,7 @@ def configure buildSite = "#{$BUILD_LOCATION}/#{@srcDir}" - # TODO: this should not use tee, but in wrapper deal with stdout to file. - # also need to expand directory with @srcDir/@srcDir.configure. + # TODO: not some better way to deal with this than system and tee? Dir.chdir( buildSite ) if ( !system( "./configure --prefix=#{$DEFAULT_PREFIX} | tee #{$PACKAGE_INSTALLED}/#{@srcDir}.configure" ) ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2007-02-25 13:07:39
|
Revision: 288 http://svn.sourceforge.net/abtlinux/?rev=288&view=rev Author: eschabell Date: 2007-02-25 05:07:40 -0800 (Sun, 25 Feb 2007) Log Message: ----------- Small code cleanup. Modified Paths: -------------- src/trunk/AbtPackage.rb Modified: src/trunk/AbtPackage.rb =================================================================== --- src/trunk/AbtPackage.rb 2007-02-25 13:06:17 UTC (rev 287) +++ src/trunk/AbtPackage.rb 2007-02-25 13:07:40 UTC (rev 288) @@ -37,9 +37,9 @@ # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, otherwise false. ## def unpackSources - srcFile = File.basename( @srcUrl ) + srcFile = File.basename( @srcUrl ) sourcesToUnpack = "#{$SOURCES_REPOSITORY}/#{srcFile}" - unpackTool = "" + unpackTool = "" # check for existing file in source repo. if ( !File.exist?( sourcesToUnpack ) ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2007-02-25 21:22:30
|
Revision: 293 http://svn.sourceforge.net/abtlinux/?rev=293&view=rev Author: eschabell Date: 2007-02-25 13:22:30 -0800 (Sun, 25 Feb 2007) Log Message: ----------- Added todo for post action. Modified Paths: -------------- src/trunk/AbtPackage.rb Modified: src/trunk/AbtPackage.rb =================================================================== --- src/trunk/AbtPackage.rb 2007-02-25 20:58:56 UTC (rev 292) +++ src/trunk/AbtPackage.rb 2007-02-25 21:22:30 UTC (rev 293) @@ -285,6 +285,8 @@ # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, otherwise false. ## def post + # TODO: implement me! + return true end ## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2007-02-26 20:56:17
|
Revision: 303 http://svn.sourceforge.net/abtlinux/?rev=303&view=rev Author: eschabell Date: 2007-02-26 12:56:16 -0800 (Mon, 26 Feb 2007) Log Message: ----------- Moved creation of install directory to another class, todo removed here. Migrated all log directories to proper locations now that install is working. Modified Paths: -------------- src/trunk/AbtPackage.rb Modified: src/trunk/AbtPackage.rb =================================================================== --- src/trunk/AbtPackage.rb 2007-02-26 20:54:16 UTC (rev 302) +++ src/trunk/AbtPackage.rb 2007-02-26 20:56:16 UTC (rev 303) @@ -211,6 +211,11 @@ return false end + # ensure we have an installed directory to use. + if ( ! File.directory?( "#{$PACKAGE_INSTALLED}/#{@srcDir}" ) ) + FileUtils.mkdir_p( "#{$PACKAGE_INSTALLED}/#{@srcDir}" ) + end + # TODO: retrieve patches? # TODO: apply patches? @@ -230,7 +235,7 @@ Dir.chdir( "#{$BUILD_LOCATION}/#{@srcDir}" ) # TODO: not some better way to deal with this than system and tee? - if ( !system( "./configure --prefix=#{$DEFAULT_PREFIX} | tee #{$PACKAGE_INSTALLED}/#{@srcDir}.configure" ) ) + if ( !system( "./configure --prefix=#{$DEFAULT_PREFIX} | tee #{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.configure" ) ) puts "DEBUG: [AbtPackage.configure] - configure section failed." return false end @@ -248,7 +253,7 @@ Dir.chdir( "#{$BUILD_LOCATION}/#{@srcDir}" ) # TODO: not some better way to deal with this than system and tee? - if( !system( "make | tee #{$PACKAGE_INSTALLED}/#{@srcDir}.build" ) ) + if( !system( "make | tee #{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.build" ) ) puts "DEBUG: [AbtPackage.build] - build section failed." return false end @@ -263,7 +268,7 @@ # # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, otherwise false. ## - def preinstall + def preinstall # TODO: create_group? # TODO: create_user? return true; @@ -279,7 +284,7 @@ Dir.chdir( "#{$BUILD_LOCATION}/#{@srcDir}" ) # TODO: can this be done without installwatch? - if( !system( "installwatch --transl=no --backup=no --exclude=/dev,/proc,/tmp,/var/tmp,/usr/src,/sys --logfile=/tmp/#{@srcDir}.watch make install" ) ) + if( !system( "installwatch --transl=no --backup=no --exclude=/dev,/proc,/tmp,/var/tmp,/usr/src,/sys --logfile=#{$ABT_TMP}/#{@srcDir}.watch make install" ) ) puts "DEBUG: [AbtPackage.install] - install section failed." # TODO: rollback any installed files (use install log). return false This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2007-02-28 22:10:23
|
Revision: 312 http://svn.sourceforge.net/abtlinux/?rev=312&view=rev Author: eschabell Date: 2007-02-28 13:59:29 -0800 (Wed, 28 Feb 2007) Log Message: ----------- Small clarification for the TODO, better readability in the task listing. Modified Paths: -------------- src/trunk/AbtPackage.rb Modified: src/trunk/AbtPackage.rb =================================================================== --- src/trunk/AbtPackage.rb 2007-02-28 21:17:25 UTC (rev 311) +++ src/trunk/AbtPackage.rb 2007-02-28 21:59:29 UTC (rev 312) @@ -300,7 +300,7 @@ # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, otherwise false. ## def post - # TODO: implement me! + # TODO: install init scripts service return true end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2007-03-03 13:38:51
|
Revision: 316 http://svn.sourceforge.net/abtlinux/?rev=316&view=rev Author: eschabell Date: 2007-03-03 05:38:48 -0800 (Sat, 03 Mar 2007) Log Message: ----------- Updated the todo's for the task list. Formatted code including 80 column limit. Modified Paths: -------------- src/trunk/AbtPackage.rb Modified: src/trunk/AbtPackage.rb =================================================================== --- src/trunk/AbtPackage.rb 2007-03-01 20:13:59 UTC (rev 315) +++ src/trunk/AbtPackage.rb 2007-03-03 13:38:48 UTC (rev 316) @@ -3,10 +3,10 @@ ## # AbtPackage.rb # -# AbtPackage class provides an interface to AbtPackage creation within AbTLinux. By -# inheriting from this class (class Fortune < AbtPackage) one picks up all -# supported standard functions for the abt AbtPackage manager to make use of the -# new AbtPackage. +# AbtPackage class provides an interface to AbtPackage creation within +# AbTLinux. By inheriting from this class (class Fortune < AbtPackage) one +# picks up all supported standard functions for the abt AbtPackage manager +# to make use of the new AbtPackage. # # Created by Eric D. Schabell <er...@ab...> # Copyright 2006, GPL. @@ -34,7 +34,8 @@ ## # Unpacks this packages source file into the standard build location. # - # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, otherwise false. + # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, + # otherwise false. ## def unpackSources srcFile = File.basename( @srcUrl ) @@ -169,7 +170,8 @@ ## # Provides all the data needed for this AbtPackage. # - # <b>RETURNS:</b> <i>hash</i> - Contains all AbtPackage attributes (constants). + # <b>RETURNS:</b> <i>hash</i> - Contains all AbtPackage + # attributes (constants). ## def details return { @@ -196,13 +198,16 @@ # Preliminary work will happen here such as downloading the tarball, # unpacking it, downloading and applying patches. # - # <b>RETURNS:</b> <i>boolean</i> - True if completes sucessfully, otherwise false. + # <b>RETURNS:</b> <i>boolean</i> - True if completes sucessfully, + # otherwise false. ## def pre downloader = AbtDownloadManager.new # download sources. - if ( !downloader.retrievePackageSource( @name.downcase, $SOURCES_REPOSITORY ) ) + if ( + !downloader.retrievePackageSource( + @name.downcase, $SOURCES_REPOSITORY ) ) return false end @@ -216,26 +221,28 @@ FileUtils.mkdir_p( "#{$PACKAGE_INSTALLED}/#{@srcDir}" ) end - # TODO: retrieve patches? - # TODO: apply patches? + # TODO: implement pre section retrieve patches? + # TODO: implement pre section apply patches? return true end ## - # Here we manage the ./configure step (or equivalent). We need to give ./configure - # (or autogen.sh, or whatever) the correct options so files are to be placed later in the - # right directories, so doc files and man pages are all in the same common location, etc. - # Don't forget too that it's here where we interact with the user in case there are optionnal - # dependencies. + # Here we manage the ./configure step (or equivalent). We need + # to give ./configure (or autogen.sh, or whatever) the correct options + # so files are to be placed later in the right directories, so doc files + # and man pages are all in the same common location, etc. + # Don't forget too that it's here where we interact with the user in + # case there are optionnal dependencies. # - # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, otherwise false. + # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, + # otherwise false. ## def configure Dir.chdir( "#{$BUILD_LOCATION}/#{@srcDir}" ) - # TODO: not some better way to deal with this than system and tee? - if ( !system( "./configure --prefix=#{$DEFAULT_PREFIX} | tee #{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.configure" ) ) + if ( !system( "./configure --prefix=#{$DEFAULT_PREFIX} | tee " + + "#{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.configure" ) ) puts "DEBUG: [AbtPackage.configure] - configure section failed." return false end @@ -245,15 +252,17 @@ end ## - # Here is where the actual builing of the software starts, for example running 'make'. + # Here is where the actual builing of the software starts, + # for example running 'make'. # - # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, otherwise false. + # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, + # otherwise false. ## def build Dir.chdir( "#{$BUILD_LOCATION}/#{@srcDir}" ) - # TODO: not some better way to deal with this than system and tee? - if( !system( "make | tee #{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.build" ) ) + if( !system( + "make | tee #{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.build" ) ) puts "DEBUG: [AbtPackage.build] - build section failed." return false end @@ -263,30 +272,34 @@ end ## - # Any actions needed before the installation can occur will happen here, such as creating - # new user accounts, dealing with existing configuration files, etc. + # Any actions needed before the installation can occur will happen here, + # such as creating new user accounts, dealing with existing configuration + # files, etc. # - # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, otherwise false. + # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, + # otherwise false. ## def preinstall - # TODO: create_group? - # TODO: create_user? + # TODO: preinstall section create_group? + # TODO: preinstall section create_user? return true; end ## # All files to be installed are installed here. # - # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, otherwise false. + # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, + # otherwise false. ## def install - # TODO: implement. Dir.chdir( "#{$BUILD_LOCATION}/#{@srcDir}" ) - # TODO: can this be done without installwatch? - if( !system( "installwatch --transl=no --backup=no --exclude=/dev,/proc,/tmp,/var/tmp,/usr/src,/sys --logfile=#{$ABT_TMP}/#{@srcDir}.watch make install" ) ) + # TODO: install section, can this be done without installwatch? + if( !system( "installwatch --transl=no --backup=no " + + "--exclude=/dev,/proc,/tmp,/var/tmp,/usr/src,/sys " + + "--logfile=#{$ABT_TMP}/#{@srcDir}.watch make install" ) ) puts "DEBUG: [AbtPackage.install] - install section failed." - # TODO: rollback any installed files (use install log). + # TODO: install section, rollback any installed files (use install log). return false end @@ -295,19 +308,22 @@ end ## - # Last bits of installation. adding the service for automatic start in init.d for example. + # Last bits of installation. adding the service for automatic + # start in init.d for example. # - # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, otherwise false. + # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, + # otherwise false. ## def post - # TODO: install init scripts service + # TODO: implement post section install init scripts service return true end ## # Cleans up this packages source build directory. # - # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, otherwise false. + # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, + # otherwise false. ## def removeBuild if ( $REMOVE_BUILD_SOURCES ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2007-07-05 13:42:54
|
Revision: 345 http://svn.sourceforge.net/abtlinux/?rev=345&view=rev Author: eschabell Date: 2007-07-05 06:42:56 -0700 (Thu, 05 Jul 2007) Log Message: ----------- Small auto line break fix. Modified Paths: -------------- src/trunk/AbtPackage.rb Modified: src/trunk/AbtPackage.rb =================================================================== --- src/trunk/AbtPackage.rb 2007-07-05 13:41:05 UTC (rev 344) +++ src/trunk/AbtPackage.rb 2007-07-05 13:42:56 UTC (rev 345) @@ -208,9 +208,7 @@ downloader = AbtDownloadManager.new # download sources. - if ( - !downloader.retrievePackageSource( - @name.downcase, $SOURCES_REPOSITORY ) ) + if ( !downloader.retrievePackageSource( @name.downcase, $SOURCES_REPOSITORY ) ) return false end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |