[Abtlinux-svn] SF.net SVN: abtlinux:[526] src/trunk
Status: Alpha
Brought to you by:
eschabell
From: <esc...@us...> - 2008-12-04 07:43:01
|
Revision: 526 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=526&view=rev Author: eschabell Date: 2008-12-04 07:42:59 +0000 (Thu, 04 Dec 2008) Log Message: ----------- Putting project back into sourceforge... these are the changes since flirting with assembla.com: ------------------------------------------------------------------------ r582 | eschabell | 2008-10-15 22:05:15 +0200 (Wed, 15 Oct 2008) | 1 line Added new package unzip, not working but package is done. ------------------------------------------------------------------------ r581 | eschabell | 2008-10-15 22:04:38 +0200 (Wed, 15 Oct 2008) | 1 line Another fix to automate the hash generation in new packages. ------------------------------------------------------------------------ r580 | eschabell | 2008-10-15 21:50:59 +0200 (Wed, 15 Oct 2008) | 1 line Added new package gzip. ------------------------------------------------------------------------ r579 | eschabell | 2008-10-15 21:50:46 +0200 (Wed, 15 Oct 2008) | 1 line Update hash generation to work correctly I hope. ------------------------------------------------------------------------ r578 | eschabell | 2008-10-13 22:15:09 +0200 (Mon, 13 Oct 2008) | 1 line Updated glibc to version 2.7, build still needs work and is broken. ------------------------------------------------------------------------ r577 | eschabell | 2008-10-13 22:07:55 +0200 (Mon, 13 Oct 2008) | 1 line Updated and automated a bit more in the new package generation tool. ------------------------------------------------------------------------ r576 | eschabell | 2008-10-13 22:06:52 +0200 (Mon, 13 Oct 2008) | 1 line Gcc version bumped to 4.3.2, it builds so for now leaving older version (commented out) and has in the package file. ------------------------------------------------------------------------ r575 | eschabell | 2008-10-05 22:15:47 +0200 (Sun, 05 Oct 2008) | 1 line Cleanup of some packages and applied the configure shell passing fix for the packages overriding the main configure. ------------------------------------------------------------------------ r574 | eschabell | 2008-10-05 22:14:51 +0200 (Sun, 05 Oct 2008) | 1 line Fix to broken configure and builds using a shell command without delimter (%x), now it is passing the shell command as a shell command and not trying to expand it as a string with variables in the ruby interpreter. ------------------------------------------------------------------------ r573 | eschabell | 2008-10-05 21:16:23 +0200 (Sun, 05 Oct 2008) | 1 line Updated bash configure override to new method. ------------------------------------------------------------------------ r572 | eschabell | 2008-09-29 22:34:04 +0200 (Mon, 29 Sep 2008) | 1 line Created gcc package, is not yet compiling but it is a start on this monster ------------------------------------------------------------------------ r571 | eschabell | 2008-09-28 22:15:48 +0200 (Sun, 28 Sep 2008) | 1 line Fixed show-config to not depend on package being on the installed list, as failure of configure results in a log but not in an installed status. ------------------------------------------------------------------------ r570 | eschabell | 2008-09-28 22:15:02 +0200 (Sun, 28 Sep 2008) | 1 line Small fix to add missing docs for input parameter. ------------------------------------------------------------------------ r569 | eschabell | 2008-09-28 11:40:18 +0200 (Sun, 28 Sep 2008) | 1 line Found one error already, need to cleanup the basic make command to seperate concerns. ------------------------------------------------------------------------ r568 | eschabell | 2008-09-28 11:38:28 +0200 (Sun, 28 Sep 2008) | 1 line This should fix the problem with chaining piped commands and the missing exit codes on return. Untested as I am not on a Linux machine at the moment. ------------------------------------------------------------------------ r567 | eschabell | 2008-09-27 23:25:44 +0200 (Sat, 27 Sep 2008) | 1 line Partial fix to the configure section (still build section to fix), now able to track failures, but unacceptable wait to rerun configure to log the output on failure. So if all goes well, then no logging of configure right now, only on failure. So be it for now... ------------------------------------------------------------------------ r566 | eschabell | 2008-09-27 22:58:47 +0200 (Sat, 27 Sep 2008) | 1 line Removed usage of pipe through tee as system unable to detect failure of command chained through tee, tee is always exit code 0. ------------------------------------------------------------------------ r565 | eschabell | 2008-09-27 12:51:54 +0200 (Sat, 27 Sep 2008) | 1 line Added package less, there are depencencies on ncurses which does not build yet so this is also broken now. ------------------------------------------------------------------------ r564 | eschabell | 2008-09-27 12:22:06 +0200 (Sat, 27 Sep 2008) | 1 line Added bit more info as to failur in pre-section being related to downloading. ------------------------------------------------------------------------ r563 | eschabell | 2008-09-27 12:21:37 +0200 (Sat, 27 Sep 2008) | 1 line Fixed missing quotes and updated hash for gawk, package now working. ------------------------------------------------------------------------ r562 | eschabell | 2008-09-24 22:10:01 +0200 (Wed, 24 Sep 2008) | 1 line Added initial setup for gawk package, fails in pre-section so needs some override work I guess... ------------------------------------------------------------------------ r561 | eschabell | 2008-09-24 21:56:17 +0200 (Wed, 24 Sep 2008) | 1 line Updated last three packages that do not yet build, seems like dependency problems. ------------------------------------------------------------------------ r560 | eschabell | 2008-09-22 22:08:20 +0200 (Mon, 22 Sep 2008) | 1 line Added cpio package. ------------------------------------------------------------------------ r559 | eschabell | 2008-09-22 21:30:31 +0200 (Mon, 22 Sep 2008) | 1 line Added bzip2 package. ------------------------------------------------------------------------ r558 | eschabell | 2008-07-18 22:27:20 +0200 (Fri, 18 Jul 2008) | 1 line The rest of the api docs for the packages. ------------------------------------------------------------------------ r557 | eschabell | 2008-07-18 22:17:22 +0200 (Fri, 18 Jul 2008) | 1 line Updated api doc generation script to pick up the packages. Regnerated api docs. ------------------------------------------------------------------------ r556 | eschabell | 2008-07-18 22:10:27 +0200 (Fri, 18 Jul 2008) | 1 line Added two working packages (wget and tar), and one new with some errors (texinfo) thus todo marked. ------------------------------------------------------------------------ r555 | eschabell | 2008-06-05 22:13:52 +0200 (Thu, 05 Jun 2008) | 1 line Regenerated api docs. ------------------------------------------------------------------------ r554 | eschabell | 2008-06-05 22:09:32 +0200 (Thu, 05 Jun 2008) | 1 line Fixed removal of the time offset element in the show_installed_packages report. ------------------------------------------------------------------------ r553 | eschabell | 2008-06-04 22:19:10 +0200 (Wed, 04 Jun 2008) | 1 line Regenerated api docs. ------------------------------------------------------------------------ r552 | eschabell | 2008-06-04 22:03:24 +0200 (Wed, 04 Jun 2008) | 1 line Regenerated api docs. ------------------------------------------------------------------------ r551 | eschabell | 2008-06-04 22:02:19 +0200 (Wed, 04 Jun 2008) | 1 line Adjusted tabbing on longer package names. ------------------------------------------------------------------------ r550 | eschabell | 2008-06-04 21:49:54 +0200 (Wed, 04 Jun 2008) | 1 line Refactored display of show-installed to show package, version and neater installed timestamp. ------------------------------------------------------------------------ r549 | eschabell | 2008-06-01 22:50:24 +0200 (Sun, 01 Jun 2008) | 1 line Updated api docs. ------------------------------------------------------------------------ r548 | eschabell | 2008-06-01 22:49:20 +0200 (Sun, 01 Jun 2008) | 1 line Improved show-installed to display timestamp of installed packages, check for corrupted installed packages repo, and logged findings to journal. There is a new bug in the running of the search_descriptions in testabtreportmanager, but this is something to do with the test class setup and not the command itself, might be a ruby version bug not sure. Will look into it more later. ------------------------------------------------------------------------ r547 | eschabell | 2008-06-01 22:47:27 +0200 (Sun, 01 Jun 2008) | 1 line Grep description removed lines feeds. ------------------------------------------------------------------------ r545 | eschabell | 2008-05-22 16:34:24 +0200 (Thu, 22 May 2008) | 1 line Bumped version to v0.3. ------------------------------------------------------------------------ r544 | eschabell | 2008-05-22 16:32:37 +0200 (Thu, 22 May 2008) | 1 line Regenerated api docs. ------------------------------------------------------------------------ r543 | eschabell | 2008-05-22 16:09:10 +0200 (Thu, 22 May 2008) | 1 line Added packages 9 and 10, finishes task #17. ------------------------------------------------------------------------ r542 | eschabell | 2008-05-22 15:40:36 +0200 (Thu, 22 May 2008) | 1 line Refactored log_package_install to prevent double entries in logging. Refactored log_package_integrity to test for existing files on system before adding into log. ------------------------------------------------------------------------ r541 | eschabell | 2008-05-22 12:05:20 +0200 (Thu, 22 May 2008) | 1 line Commented out some debug. ------------------------------------------------------------------------ r540 | eschabell | 2008-05-22 12:04:15 +0200 (Thu, 22 May 2008) | 1 line Fixed problems with renaming of install files during build/installation. Binutils was doing this, my first encounter with renaming of files in install process. ------------------------------------------------------------------------ r539 | eschabell | 2008-05-20 22:07:40 +0200 (Tue, 20 May 2008) | 1 line Regenerated api docs. ------------------------------------------------------------------------ r538 | eschabell | 2008-05-20 22:03:48 +0200 (Tue, 20 May 2008) | 1 line Binutils needs to be tested on build machine yet, but think it is ready to go. Glibc is work in progress, marked with todo. ------------------------------------------------------------------------ r537 | eschabell | 2008-05-20 21:54:45 +0200 (Tue, 20 May 2008) | 1 line Clarified error and success reporting on ldconfig run. ------------------------------------------------------------------------ r536 | eschabell | 2008-05-20 18:31:17 +0200 (Tue, 20 May 2008) | 1 line Added ncurses package. ------------------------------------------------------------------------ r535 | eschabell | 2008-05-20 18:18:25 +0200 (Tue, 20 May 2008) | 1 line Added sed package and migrated gnu repo to http. ------------------------------------------------------------------------ r534 | eschabell | 2008-05-20 15:50:23 +0200 (Tue, 20 May 2008) | 1 line Removed exit strategy for missing checkinstall. ------------------------------------------------------------------------ r533 | eschabell | 2008-05-18 10:12:06 +0200 (Sun, 18 May 2008) | 3 lines Changed all references to sourceforge repo to the assembla (current) repo. Api docs regenerated. ------------------------------------------------------------------------ r532 | eschabell | 2008-05-14 22:19:06 +0200 (Wed, 14 May 2008) | 1 line Regenerated api docs. ------------------------------------------------------------------------ r531 | eschabell | 2008-05-14 22:15:25 +0200 (Wed, 14 May 2008) | 1 line Fix to override main configuration file with a myabtconfig.rb file. This fixes / implements ticket #16. ------------------------------------------------------------------------ r530 | eschabell | 2008-04-28 22:09:56 +0200 (Mon, 28 Apr 2008) | 1 line Regenerated api docs. ------------------------------------------------------------------------ r529 | eschabell | 2008-04-28 22:07:00 +0200 (Mon, 28 Apr 2008) | 1 line Some require cleanup and added two sections (commented out) that can be used on an initial setup machine to get the testsuite to make it through an initial run automagically. ------------------------------------------------------------------------ r528 | eschabell | 2008-04-28 22:05:32 +0200 (Mon, 28 Apr 2008) | 1 line Updated variable to point to correct svn repo, reflects new trac migration. ------------------------------------------------------------------------ r527 | eschabell | 2008-04-26 22:32:24 +0200 (Sat, 26 Apr 2008) | 1 line Regenerated docs as a test. ------------------------------------------------------------------------ r526 | eschabell | 2008-04-05 17:18:05 +0200 (Sat, 05 Apr 2008) | 1 line Update api docs. ------------------------------------------------------------------------ Modified Paths: -------------- src/trunk/abt.rb src/trunk/abtconfig.rb src/trunk/doc/classes/AbtDepEngine.html src/trunk/doc/classes/AbtDownloadManager.html src/trunk/doc/classes/AbtLogManager.html src/trunk/doc/classes/AbtPackage.html src/trunk/doc/classes/AbtPackageManager.html src/trunk/doc/classes/AbtQueueManager.html src/trunk/doc/classes/AbtReportManager.html src/trunk/doc/classes/AbtSystemManager.html src/trunk/doc/classes/AbtUsage.html src/trunk/doc/classes/TestAbtDepEngine.html src/trunk/doc/classes/TestAbtDownloadManager.html src/trunk/doc/classes/TestAbtLogManager.html src/trunk/doc/classes/TestAbtPackage.html src/trunk/doc/classes/TestAbtPackageManager.html src/trunk/doc/classes/TestAbtQueueManager.html src/trunk/doc/classes/TestAbtReportManager.html src/trunk/doc/classes/TestAbtSystemManager.html src/trunk/doc/created.rid src/trunk/doc/dot/f_0.png src/trunk/doc/dot/f_1.png src/trunk/doc/dot/f_10.png src/trunk/doc/dot/f_11.png src/trunk/doc/dot/f_12.png src/trunk/doc/dot/f_13.png src/trunk/doc/dot/f_14.png src/trunk/doc/dot/f_15.png src/trunk/doc/dot/f_16.png src/trunk/doc/dot/f_2.png src/trunk/doc/dot/f_3.png src/trunk/doc/dot/f_4.png src/trunk/doc/dot/f_5.png src/trunk/doc/dot/f_6.png src/trunk/doc/dot/f_7.png src/trunk/doc/dot/f_8.png src/trunk/doc/dot/f_9.png src/trunk/doc/files/libs/abtdepengine_rb.html src/trunk/doc/files/libs/abtdownloadmanager_rb.html src/trunk/doc/files/libs/abtlogmanager_rb.html src/trunk/doc/files/libs/abtpackage_rb.html src/trunk/doc/files/libs/abtpackagemanager_rb.html src/trunk/doc/files/libs/abtqueuemanager_rb.html src/trunk/doc/files/libs/abtreportmanager_rb.html src/trunk/doc/files/libs/abtsystemmanager_rb.html src/trunk/doc/files/libs/abtusage_rb.html src/trunk/doc/files/tests/testabtdepengine_rb.html src/trunk/doc/files/tests/testabtdownloadmanager_rb.html src/trunk/doc/files/tests/testabtlogmanager_rb.html src/trunk/doc/files/tests/testabtpackage_rb.html src/trunk/doc/files/tests/testabtpackagemanager_rb.html src/trunk/doc/files/tests/testabtqueuemanager_rb.html src/trunk/doc/files/tests/testabtreportmanager_rb.html src/trunk/doc/files/tests/testabtsystemmanager_rb.html src/trunk/doc/fr_class_index.html src/trunk/doc/fr_file_index.html src/trunk/doc/fr_method_index.html src/trunk/docgen.sh src/trunk/libs/abtlogmanager.rb src/trunk/libs/abtpackage.rb src/trunk/libs/abtpackagemanager.rb src/trunk/libs/abtreportmanager.rb src/trunk/new_abt_package.rb src/trunk/packages/bash.rb src/trunk/packages/grep.rb src/trunk/packages/ipc.rb src/trunk/tests/testsuiteabt.rb Added Paths: ----------- src/trunk/doc/classes/Bash.html src/trunk/doc/classes/Binutils.html src/trunk/doc/classes/Checkinstall.html src/trunk/doc/classes/Diffutils.html src/trunk/doc/classes/Findutils.html src/trunk/doc/classes/Fortune.html src/trunk/doc/classes/Grep.html src/trunk/doc/classes/Ipc.html src/trunk/doc/classes/Ncurses.html src/trunk/doc/classes/Sed.html src/trunk/doc/classes/Tar.html src/trunk/doc/classes/Wget.html src/trunk/doc/dot/f_17.dot src/trunk/doc/dot/f_17.png src/trunk/doc/dot/f_18.dot src/trunk/doc/dot/f_18.png src/trunk/doc/dot/f_19.dot src/trunk/doc/dot/f_19.png src/trunk/doc/dot/f_20.dot src/trunk/doc/dot/f_20.png src/trunk/doc/dot/f_21.dot src/trunk/doc/dot/f_21.png src/trunk/doc/dot/f_22.dot src/trunk/doc/dot/f_22.png src/trunk/doc/dot/f_23.dot src/trunk/doc/dot/f_23.png src/trunk/doc/dot/f_24.dot src/trunk/doc/dot/f_24.png src/trunk/doc/dot/f_25.dot src/trunk/doc/dot/f_25.png src/trunk/doc/dot/f_26.dot src/trunk/doc/dot/f_26.png src/trunk/doc/dot/f_27.dot src/trunk/doc/dot/f_27.png src/trunk/doc/dot/f_28.dot src/trunk/doc/dot/f_28.png src/trunk/packages/binutils.rb src/trunk/packages/bzip2.rb src/trunk/packages/cpio.rb src/trunk/packages/diffutils.rb src/trunk/packages/findutils.rb src/trunk/packages/gawk.rb src/trunk/packages/gcc.rb src/trunk/packages/glibc.rb src/trunk/packages/gzip.rb src/trunk/packages/less.rb src/trunk/packages/ncurses.rb src/trunk/packages/sed.rb src/trunk/packages/tar.rb src/trunk/packages/texinfo.rb src/trunk/packages/unzip.rb src/trunk/packages/wget.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2008-02-14 20:37:09 UTC (rev 525) +++ src/trunk/abt.rb 2008-12-04 07:42:59 UTC (rev 526) @@ -39,15 +39,15 @@ } if !($counter > 0) - puts "\n\nUnable to run without installwatch, see package details of checkinstall." - exit + puts "\n\nUnable to run properly without installwatch, see package details of checkinstall." + puts "\nWe can continue but you may experience unexpected results, please install checkinstall asap.\n\n" end # Check and install our library files. # $DEFAULT_PREFIX = "/usr/local" libpath = "#{$DEFAULT_PREFIX}/var/lib/abt" -$ABTLINUX_CLASS_LIBS = "https://abtlinux.svn.sourceforge.net/svnroot/abtlinux/src/trunk/libs" +$ABTLINUX_CLASS_LIBS = "http://svn2.assembla.com/svn/abtlinux/src/trunk/libs" if (! File.directory?(libpath) || Dir[libpath].empty?) puts "\nMissing needed AbTLinux library files..." @@ -73,42 +73,46 @@ # Load our central configuration file. # -$ABTLINUX_MAIN_CONFIG = "https://abtlinux.svn.sourceforge.net/svnroot/abtlinux/src/trunk/abtconfig.rb" +$ABTLINUX_MAIN_CONFIG = "http://svn2.assembla.com/svn/abtlinux/src/trunk/abtconfig.rb" configfile = "#{$DEFAULT_PREFIX}/etc/abt/abtconfig.rb" +myconfig = "#{$DEFAULT_PREFIX}/etc/abt/local/myabtconfig.rb" maxconfigpath = "#{$DEFAULT_PREFIX}/etc/abt/local" if File.exist?(configfile) $LOAD_PATH.unshift "#{$DEFAULT_PREFIX}/etc/abt/" load 'abtconfig.rb' + + # do we need to load a local config file? + if File.exist?(myconfig) + $LOAD_PATH.unshift maxconfigpath + load 'myabtconfig.rb' + end + else - require 'fileutils' # need this here, usually in abtconfig. + # no config file, need to download it. + require 'fileutils' # need this here, usually in abtconfig. # missing configuration file, do some abt update? 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. + + # check for root login. if (Process.uid != 0) - puts "\nMust be root to fix configuration files." - exit - else - 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 + puts "\nMust be root to fix configuration files." + exit + else + 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 # should be installed, load config. $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 @@ -348,10 +352,6 @@ when "show-config" if (ARGV.length == 2) options['package'] = ARGV[1] - if !system.package_installed(options['package']) - puts "\nThe package #{options['package']} is not installed, can't show the configure log." - exit - end puts "\nDisplay configure log for package : #{options['package']}" puts "===============================\n" Modified: src/trunk/abtconfig.rb =================================================================== --- src/trunk/abtconfig.rb 2008-02-14 20:37:09 UTC (rev 525) +++ src/trunk/abtconfig.rb 2008-12-04 07:42:59 UTC (rev 526) @@ -61,7 +61,7 @@ # default config options. # -$ABT_VERSION = "0.2" +$ABT_VERSION = "0.3" $BUILD_ARCH = "-march=pentium2" # i686, pentium II. $BUILD_SIZE = "-Os" # optimize for size. $BUILD_NODEBUG = "-fomit-frame-pointer" # removes debug info. @@ -77,7 +77,7 @@ $TIMESTAMP = Time.now.strftime( "%Y-%m-%d %H:%M:%S (%Z)" ) $PAGER_DEFAULT = "less -R -E -X -f" $LOG_LEVEL = "Logger::DEBUG" -$ABTLINUX_PACKAGES = "https://abtlinux.svn.sourceforge.net/svnroot/abtlinux/src/trunk/packages" +$ABTLINUX_PACKAGES = "https://svn2.assembla.com/svn/abtlinux/src/trunk/packages" # default URL listing. # @@ -88,7 +88,7 @@ $APACHE_URL = "http://www.ibiblio.org/pub/mirrors/apache" $CTAN_URL = "ftp://tug.ctan.org/tex-archive" $GNOME_URL = "ftp://ftp.gnome.org/pub/GNOME" -$GNU_URL = "ftp://ftp.gnu.org/pub/gnu" +$GNU_URL = "http://ftp.gnu.org/gnu" $KDE_URL = "ftp://ftp.kde.org/pub/kde" $KERNEL_URL = "ftp://ftp.kernel.org" $SOURCEFORGE_URL = "http://osdn.dl.sourceforge.net/sourceforge" Modified: src/trunk/doc/classes/AbtDepEngine.html =================================================================== --- src/trunk/doc/classes/AbtDepEngine.html 2008-02-14 20:37:09 UTC (rev 525) +++ src/trunk/doc/classes/AbtDepEngine.html 2008-12-04 07:42:59 UTC (rev 526) @@ -76,7 +76,7 @@ <div id="content"> <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center"> <map id="map" name="map"> - <area shape="rect" coords="27,50,125,98" href="AbtDepEngine.html" alt="AbtDepEngine" /> + <area shape="rect" coords="27,52,128,100" href="AbtDepEngine.html" alt="AbtDepEngine" /> </map> <img src="../dot/f_0.png" usemap="#map" border="0" alt="dot/f_0.png"> </td></tr></table> @@ -118,7 +118,7 @@ <div class="sectiontitle">Methods</div> <ul> - <li><a href="#M000093">new</a></li> + <li><a href="#M000106">new</a></li> </ul> @@ -129,7 +129,7 @@ <div class="sectiontitle">Public Class methods</div> <div class="method"> <div class="title"> - <a name="M000093"></a><b>new</b>() + <a name="M000106"></a><b>new</b>() </div> <div class="description"> <p> @@ -141,8 +141,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000093_source')" id="l_M000093_source">show source</a> ]</p> - <div id="M000093_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000106_source')" id="l_M000106_source">show source</a> ]</p> + <div id="M000106_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtdepengine.rb, line 41</span> 41: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> Modified: src/trunk/doc/classes/AbtDownloadManager.html =================================================================== --- src/trunk/doc/classes/AbtDownloadManager.html 2008-02-14 20:37:09 UTC (rev 525) +++ src/trunk/doc/classes/AbtDownloadManager.html 2008-12-04 07:42:59 UTC (rev 526) @@ -76,7 +76,7 @@ <div id="content"> <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center"> <map id="map" name="map"> - <area shape="rect" coords="27,50,160,98" href="AbtDownloadManager.html" alt="AbtDownloadManager" /> + <area shape="rect" coords="27,52,165,100" href="AbtDownloadManager.html" alt="AbtDownloadManager" /> </map> <img src="../dot/f_1.png" usemap="#map" border="0" alt="dot/f_1.png"> </td></tr></table> @@ -117,13 +117,13 @@ <div class="sectiontitle">Methods</div> <ul> - <li><a href="#M000012">new</a></li> - <li><a href="#M000015">retrieve_news_feed</a></li> - <li><a href="#M000013">retrieve_package_source</a></li> - <li><a href="#M000014">retrieve_package_tree</a></li> - <li><a href="#M000016">update_package</a></li> - <li><a href="#M000017">update_package_tree</a></li> - <li><a href="#M000018">validated</a></li> + <li><a href="#M000013">new</a></li> + <li><a href="#M000016">retrieve_news_feed</a></li> + <li><a href="#M000014">retrieve_package_source</a></li> + <li><a href="#M000015">retrieve_package_tree</a></li> + <li><a href="#M000017">update_package</a></li> + <li><a href="#M000018">update_package_tree</a></li> + <li><a href="#M000019">validated</a></li> </ul> @@ -134,7 +134,7 @@ <div class="sectiontitle">Public Class methods</div> <div class="method"> <div class="title"> - <a name="M000012"></a><b>new</b>() + <a name="M000013"></a><b>new</b>() </div> <div class="description"> <p> @@ -148,8 +148,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000012_source')" id="l_M000012_source">show source</a> ]</p> - <div id="M000012_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000013_source')" id="l_M000013_source">show source</a> ]</p> + <div id="M000013_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 42</span> 42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> @@ -161,7 +161,7 @@ <div class="sectiontitle">Public Instance methods</div> <div class="method"> <div class="title"> - <a name="M000015"></a><b>retrieve_news_feed</b>(uri, cleanLog=true) + <a name="M000016"></a><b>retrieve_news_feed</b>(uri, cleanLog=true) </div> <div class="description"> <p> @@ -176,8 +176,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000015_source')" id="l_M000015_source">show source</a> ]</p> - <div id="M000015_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000016_source')" id="l_M000016_source">show source</a> ]</p> + <div id="M000016_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 122</span> 122: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieve_news_feed</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">cleanLog</span>=<span class="ruby-keyword kw">true</span>) @@ -231,7 +231,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000013"></a><b>retrieve_package_source</b>(packageName, destination) + <a name="M000014"></a><b>retrieve_package_source</b>(packageName, destination) </div> <div class="description"> <p> @@ -249,8 +249,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000013_source')" id="l_M000013_source">show source</a> ]</p> - <div id="M000013_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000014_source')" id="l_M000014_source">show source</a> ]</p> + <div id="M000014_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 56</span> 56: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieve_package_source</span>(<span class="ruby-identifier">packageName</span>, <span class="ruby-identifier">destination</span>) @@ -278,7 +278,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000014"></a><b>retrieve_package_tree</b>(packageTreeName="AbTLinux") + <a name="M000015"></a><b>retrieve_package_tree</b>(packageTreeName="AbTLinux") </div> <div class="description"> <p> @@ -294,8 +294,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000014_source')" id="l_M000014_source">show source</a> ]</p> - <div id="M000014_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000015_source')" id="l_M000015_source">show source</a> ]</p> + <div id="M000015_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 84</span> 84: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieve_package_tree</span>(<span class="ruby-identifier">packageTreeName</span>=<span class="ruby-value str">"AbTLinux"</span>) @@ -332,7 +332,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000016"></a><b>update_package</b>(packageName) + <a name="M000017"></a><b>update_package</b>(packageName) </div> <div class="description"> <p> @@ -347,8 +347,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000016_source')" id="l_M000016_source">show source</a> ]</p> - <div id="M000016_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000017_source')" id="l_M000017_source">show source</a> ]</p> + <div id="M000017_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 176</span> 176: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_package</span>(<span class="ruby-identifier">packageName</span>) @@ -383,7 +383,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000017"></a><b>update_package_tree</b>() + <a name="M000018"></a><b>update_package_tree</b>() </div> <div class="description"> <p> @@ -395,8 +395,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000017_source')" id="l_M000017_source">show source</a> ]</p> - <div id="M000017_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000018_source')" id="l_M000018_source">show source</a> ]</p> + <div id="M000018_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 209</span> 209: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_package_tree</span>() @@ -431,7 +431,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000018"></a><b>validated</b>(hashvalue, path) + <a name="M000019"></a><b>validated</b>(hashvalue, path) </div> <div class="description"> <p> @@ -448,8 +448,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000018_source')" id="l_M000018_source">show source</a> ]</p> - <div id="M000018_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000019_source')" id="l_M000019_source">show source</a> ]</p> + <div id="M000019_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File libs/abtdownloadmanager.rb, line 245</span> 245: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validated</span>(<span class="ruby-identifier">hashvalue</span>, <span class="ruby-identifier">path</span>) Modified: src/trunk/doc/classes/AbtLogManager.html =================================================================== --- src/trunk/doc/classes/AbtLogManager.html 2008-02-14 20:37:09 UTC (rev 525) +++ src/trunk/doc/classes/AbtLogManager.html 2008-12-04 07:42:59 UTC (rev 526) @@ -76,7 +76,7 @@ <div id="content"> <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center"> <map id="map" name="map"> - <area shape="rect" coords="27,50,131,98" href="AbtLogManager.html" alt="AbtLogManager" /> + <area shape="rect" coords="27,52,136,100" href="AbtLogManager.html" alt="AbtLogManager" /> </map> <img src="../dot/f_2.png" usemap="#map" border="0" alt="dot/f_2.png"> </td></tr></table> @@ -117,11 +117,11 @@ <div class="sectiontitle">Methods</div> <ul> - <li><a href="#M000064">get_log</a></li> - <li><a href="#M000068">log_package_build</a></li> - <li><a href="#M000067">log_package_install</a></li> - <li><a href="#M000066">log_package_integrity</a></li> - <li><a href="#M000065">new</a></li> + <li><a href="#M000072">get_log</a></li> + <li><a href="#M000076">log_package_build</a></li> + <li><a href="#M000075">log_package_install</a></li> + <li><a href="#M000074">log_package_integrity</a></li> + <li><a href="#M000073">new</a></li> </ul> @@ -132,7 +132,7 @@ <div class="sectiontitle">Public Class methods</div> <div class="method"> <div class="title"> - <a name="M000065"></a><b>new</b>() + <a name="M000073"></a><b>new</b>() </div> <div class="description"> <p> @@ -145,26 +145,26 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000065_source')" id="l_M000065_source">show source</a> ]</p> - <div id="M000065_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000073_source')" id="l_M000073_source">show source</a> ]</p> + <div id="M000073_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 80</span> -80: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> -81: <span class="ruby-keyword kw">if</span> (<span class="ruby-operator">!</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">$JOURNAL</span>)) -82: <span class="ruby-comment cmt"># logging directory missing, create it!</span> -83: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">$ABT_LOGS</span>) -84: <span class="ruby-keyword kw">end</span> -85: -86: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) -87: [<span class="ruby-identifier">$ABT_LOGS</span>, <span class="ruby-identifier">$ABT_CACHES</span>, <span class="ruby-identifier">$ABT_STATE</span>, <span class="ruby-identifier">$BUILD_LOCATION</span>, <span class="ruby-identifier">$PACKAGE_INSTALLED</span>, <span class="ruby-identifier">$ABT_LIBS</span>, -88: <span class="ruby-identifier">$PACKAGE_CACHED</span>, <span class="ruby-identifier">$ABT_TMP</span>, <span class="ruby-identifier">$ABT_CONFIG</span>, <span class="ruby-identifier">$ABT_LOCAL_CONFIG</span>, <span class="ruby-identifier">$SOURCES_REPOSITORY</span>].<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">dir</span><span class="ruby-operator">|</span> -89: -90: <span class="ruby-keyword kw">if</span> (<span class="ruby-operator">!</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">dir</span>)) -91: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">dir</span>) -92: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Created directory: #{dir}."</span>) -93: <span class="ruby-keyword kw">end</span> -94: } -95: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 117</span> +117: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> +118: <span class="ruby-keyword kw">if</span> (<span class="ruby-operator">!</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">$JOURNAL</span>)) +119: <span class="ruby-comment cmt"># logging directory missing, create it!</span> +120: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">$ABT_LOGS</span>) +121: <span class="ruby-keyword kw">end</span> +122: +123: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">$JOURNAL</span>) +124: [<span class="ruby-identifier">$ABT_LOGS</span>, <span class="ruby-identifier">$ABT_CACHES</span>, <span class="ruby-identifier">$ABT_STATE</span>, <span class="ruby-identifier">$BUILD_LOCATION</span>, <span class="ruby-identifier">$PACKAGE_INSTALLED</span>, <span class="ruby-identifier">$ABT_LIBS</span>, +125: <span class="ruby-identifier">$PACKAGE_CACHED</span>, <span class="ruby-identifier">$ABT_TMP</span>, <span class="ruby-identifier">$ABT_CONFIG</span>, <span class="ruby-identifier">$ABT_LOCAL_CONFIG</span>, <span class="ruby-identifier">$SOURCES_REPOSITORY</span>].<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">dir</span><span class="ruby-operator">|</span> +126: +127: <span class="ruby-keyword kw">if</span> (<span class="ruby-operator">!</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">dir</span>)) +128: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">dir</span>) +129: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Created directory: #{dir}."</span>) +130: <span class="ruby-keyword kw">end</span> +131: } +132: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -172,7 +172,7 @@ <div class="sectiontitle">Public Instance methods</div> <div class="method"> <div class="title"> - <a name="M000064"></a><b>get_log</b>(package, type) + <a name="M000072"></a><b>get_log</b>(package, type) </div> <div class="description"> <p> @@ -186,46 +186,46 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000064_source')" id="l_M000064_source">show source</a> ]</p> - <div id="M000064_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000072_source')" id="l_M000072_source">show source</a> ]</p> + <div id="M000072_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 43</span> -43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_log</span>(<span class="ruby-identifier">package</span>, <span class="ruby-identifier">type</span>) -44: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}/#{package}"</span> -45: <span class="ruby-identifier">sw</span> = <span class="ruby-identifier">eval</span>(<span class="ruby-node">"#{package.capitalize}.new"</span>) -46: <span class="ruby-identifier">details</span> = <span class="ruby-identifier">sw</span>.<span class="ruby-identifier">details</span> -47: -48: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">type</span> -49: -50: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'install'</span> -51: <span class="ruby-identifier">log</span> = <span class="ruby-node">"#{$PACKAGE_INSTALLED}/#{details['Source location']}/#{details['Source location']}.install"</span> -52: -53: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'integrity'</span> -54: <span class="ruby-identifier">log</span> = <span class="ruby-node">"#{$PACKAGE_INSTALLED}/#{details['Source location']}/#{details['Source location']}.integrity"</span> -55: -56: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'tmpinstall'</span> -57: <span class="ruby-identifier">log</span> = <span class="ruby-node">"#{$ABT_TMP}/#{details['Source location']}.watch"</span> -58: -59: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'build'</span> -60: <span class="ruby-identifier">log</span> = <span class="ruby-node">"#{$PACKAGE_INSTALLED}/#{details['Source location']}/#{details['Source location']}.build"</span> -61: -62: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'configure'</span> -63: <span class="ruby-identifier">log</span> = <span class="ruby-node">"#{$PACKAGE_INSTALLED}/#{details['Source location']}/#{details['Source location']}.configure"</span> -64: -65: <span class="ruby-keyword kw">else</span> -66: <span class="ruby-identifier">log</span> = <span class="ruby-value str">""</span> -67: -68: <span class="ruby-keyword kw">end</span> -69: -70: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">log</span> -71: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 80</span> + 80: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_log</span>(<span class="ruby-identifier">package</span>, <span class="ruby-identifier">type</span>) + 81: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{$PACKAGE_PATH}/#{package}"</span> + 82: <span class="ruby-identifier">sw</span> = <span class="ruby-identifier">eval</span>(<span class="ruby-node">"#{package.capitalize}.new"</span>) + 83: <span class="ruby-identifier">details</span> = <span class="ruby-identifier">sw</span>.<span class="ruby-identifier">details</span> + 84: + 85: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">type</span> + 86: + 87: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'install'</span> + 88: <span class="ruby-identifier">log</span> = <span class="ruby-node">"#{$PACKAGE_INSTALLED}/#{details['Source location']}/#{details['Source location']}.install"</span> + 89: + 90: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'integrity'</span> + 91: <span class="ruby-identifier">log</span> = <span class="ruby-node">"#{$PACKAGE_INSTALLED}/#{details['Source location']}/#{details['Source location']}.integrity"</span> + 92: + 93: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'tmpinstall'</span> + 94: <span class="ruby-identifier">log</span> = <span class="ruby-node">"#{$ABT_TMP}/#{details['Source location']}.watch"</span> + 95: + 96: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'build'</span> + 97: <span class="ruby-identifier">log</span> = <span class="ruby-node">"#{$PACKAGE_INSTALLED}/#{details['Source location']}/#{details['Source location']}.build"</span> + 98: + 99: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'configure'</span> +100: <span class="ruby-identifier">log</span> = <span class="ruby-node">"#{$PACKAGE_INSTALLED}/#{details['Source location']}/#{details['Source location']}.configure"</span> +101: +102: <span class="ruby-keyword kw">else</span> +103: <span class="ruby-identifier">log</span> = <span class="ruby-value str">""</span> +104: +105: <span class="ruby-keyword kw">end</span> +106: +107: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">log</span> +108: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000068"></a><b>log_package_build</b>(package) + <a name="M000076"></a><b>log_package_build</b>(package) </div> <div class="description"> <p> @@ -241,27 +241,27 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000068_source')" id="l_M000068_source">show source</a> ]</p> - <div id="M000068_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000076_source')" id="l_M000076_source">show source</a> ]</p> + <div id="M000076_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 192</span> -192: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_package_build</span>(<span class="ruby-identifier">package</span>) -193: <span class="ruby-identifier">buildLog</span> = <span class="ruby-identifier">get_log</span>(<span class="ruby-identifier">package</span>, <span class="ruby-value str">'build'</span>) -194: -195: <span class="ruby-comment cmt"># make sure the build file exists.</span> -196: <span class="ruby-keyword kw">if</span> (<span class="ruby-operator">!</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">buildLog</span>)) -197: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -198: <span class="ruby-keyword kw">end</span> -199: -200: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -201: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 242</span> +242: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_package_build</span>(<span class="ruby-identifier">package</span>) +243: <span class="ruby-identifier">buildLog</span> = <span class="ruby-identifier">get_log</span>(<span class="ruby-identifier">package</span>, <span class="ruby-value str">'build'</span>) +244: +245: <span class="ruby-comment cmt"># make sure the build file exists.</span> +246: <span class="ruby-keyword kw">if</span> (<span class="ruby-operator">!</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">buildLog</span>)) +247: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +248: <span class="ruby-keyword kw">end</span> +249: +250: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +251: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000067"></a><b>log_package_install</b>(package) + <a name="M000075"></a><b>log_package_install</b>(package) </div> <div class="description"> <p> @@ -277,55 +277,63 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000067_source')" id="l_M000067_source">show source</a> ]</p> - <div id="M000067_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000075_source')" id="l_M000075_source">show source</a> ]</p> + <div id="M000075_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 144</span> -144: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_package_install</span>(<span class="ruby-identifier">package</span>) -145: <span class="ruby-comment cmt"># some dirs we will not add to an install log.</span> -146: <span class="ruby-identifier">excluded_pattern</span> = <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"^(/dev|/proc|/tmp|/var/tmp|/usr/src|/sys)+"</span>) -147: <span class="ruby-identifier">badLine</span> = <span class="ruby-keyword kw">false</span> <span class="ruby-comment cmt"># used to mark excluded lines from installwatch log.</span> -148: -149: <span class="ruby-comment cmt"># our log locations.</span> -150: <span class="ruby-identifier">installLog</span> = <span class="ruby-identifier">get_log</span>(<span class="ruby-identifier">package</span>, <span class="ruby-value str">'install'</span>) -151: <span class="ruby-identifier">tmpInstallLog</span> = <span class="ruby-identifier">get_log</span>(<span class="ruby-identifier">package</span>, <span class="ruby-value str">'tmpinstall'</span>) -152: -153: <span class="ruby-comment cmt"># get the installed files from the tmp file</span> -154: <span class="ruby-comment cmt"># into our install log.</span> -155: <span class="ruby-keyword kw">if</span> (<span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">tmpInstallLog</span>)) -156: <span class="ruby-identifier">installFile</span> = <span class="ruby-identifier">open</span>(<span class="ruby-identifier">installLog</span>, <span class="ruby-value str">'w'</span>) -157: -158: <span class="ruby-comment cmt"># include only the file names from open calls</span> -159: <span class="ruby-comment cmt"># and not part of the excluded range of directories.</span> -160: <span class="ruby-constant">IO</span>.<span class="ruby-identifier">foreach</span>(<span class="ruby-identifier">tmpInstallLog</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> -161: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>[<span class="ruby-value">1</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'open'</span>) -162: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>[<span class="ruby-value">2</span>] <span class="ruby-operator">=~</span> <span class="ruby-identifier">excluded_pattern</span>) -163: <span class="ruby-identifier">badLine</span> = <span class="ruby-keyword kw">true</span> -164: <span class="ruby-keyword kw">else</span> -165: <span class="ruby-identifier">badLine</span> = <span class="ruby-keyword kw">false</span> -166: <span class="ruby-keyword kw">end</span> -167: -168: <span class="ruby-keyword kw">if</span> (<span class="ruby-operator">!</span><span class="ruby-identifier">badLine</span>) -169: <span class="ruby-identifier">installFile</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{line.split[2]}\n"</span> -170: <span class="ruby-keyword kw">end</span> -171: <span class="ruby-keyword kw">end</span> -172: <span class="ruby-keyword kw">end</span> -173: -174: <span class="ruby-identifier">installFile</span>.<span class="ruby-identifier">close</span> -175: <span class="ruby-keyword kw">else</span> -176: <span class="ruby-comment cmt"># no tmp install file, thus no install running.</span> -177: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -178: <span class="ruby-keyword kw">end</span> -179: -180: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>; -181: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File libs/abtlogmanager.rb, line 186</span> +186: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_package_install</span>(<span class="ruby-identifier">package</span>) +187: <span class="ruby-identifier">renames</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span> <span class="ruby-comment cmt"># to hold installwatch identified renames.</span> +188: <span class="ruby-identifier">duplicates</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span> <span class="ruby-comment cmt"># to hold entries for duplicate checking.</span> +189: +190: <span class="ruby-comment cmt"># some dirs we will not add to an install log.</span> +191: <span class="ruby-identifier">excluded_pattern</span> = <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"^(/dev|/proc|/tmp|/var/tmp|/usr/src|/sys|#{$DEFAULT_PREFIX}/usr/src)+"</span>) +192: +193: <span class="ruby-comment cmt"># our log locations.</span> +194: <span class="ruby-identifier">installLog</span> = <span class="ruby-identifier">get_log</span>(<span class="ruby-identifier">package</span>, <span class="ruby-value str">'install'</span>) +195: <span class="ruby-identifier">tmpInstallLog</span> = <span class="ruby-identifier">get_log</span>(<span class="ruby-identifier">package</span>, <span class="ruby-value str">'tmpinstall'</span>) +196: +197: <span class="ruby-comment cmt"># get the installed files from the tmp file</span> +198: <span class="ruby-comment cmt"># into our install log.</span> +199: <span class="ruby-keyword kw">if</span> (<span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">tmpInstallLog</span>)) +200: <span class="ruby-identifier">installFile</span> = <span class="ruby-identifier">open</span>(<span class="ruby-identifier">installLog</span>, <span class="ruby-value str">'w'</span>) +201: +202: <span class="ruby-comment cmt"># include only the file names from open calls</span> +203: <span class="ruby-comment cmt"># and not part of the excluded range of directories.</span> +204: <span class="ruby-constant">IO</span>.<span class="ruby-identifier">foreach</span>(<span class="ruby-identifier">tmpInstallLog</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> +205: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>[<span class="ruby-value">1</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'rename'</span>) +206: <span class="ruby-comment cmt"># they renamed the line, save this entry for cleaning</span> +207: <span class="ruby-comment cmt"># after install log is closed. Hash key is the original</span> +208: <span class="ruby-comment cmt"># installed file name, Hash value is the new file name.</span> +209: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span>(<span class="ruby-identifier">renames</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>[<span class="ruby-value">2</span>])) +210: <span class="ruby-identifier">renames</span>[<span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>[<span class="ruby-value">2</span>]] = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>[<span class="ruby-value">3</span>] +211: <span class="ruby-keyword kw">end</span> +212: <span class="ruby-keyword kw">elsif</span> (<span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>[<span class="ruby-value">1</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'open'</span>) <span class="ruby-keyword kw">and</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>[<span class="ruby-value">2</span>]) +213: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span>(<span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>[<span class="ruby-value">2</span>] <span class="ruby-operator">=~</span> <span class="ruby-identifier">excluded_pattern</span>) +214: <span class="ruby-comment cmt"># possible install log addition.</span> +215: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">duplicates</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>[<span class="ruby-value">2</span>]) +216: <span class="ruby-comment cmt"># add to duplicate tracking hash and install log.</span> +217: <span class="ruby-identifier">duplicates</span>[<span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>[<span class="ruby-value">2</span>]] = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>[<span class="ruby-value">2</span>] +218: <span class="ruby-identifier">installFile</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{line.split[2]}\n"</span> +219: <span class="ruby-keyword kw">end</span> +220: <span class="ruby-keyword kw">end</span> +221: <span class="ruby-keyword kw">end</span> +222: <span class="ruby-keyword kw">end</span> +223: +224: <span class="ruby-identifier">check_for_file_renames</span>(<span class="ruby-identifier">renames</span>, <span class="ruby-identifier">installLog</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">renames</span>.<span class="ruby-identifier">empty?</span> +225: <span class="ruby-keyword kw">else</span> +226: <span class="ruby-comment cmt"># no tmp install file, thus no install running.</span> +227: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +228: <span class="ruby-keyword kw">end</span> +229: +230: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>; +231: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000066"></a><b>log_package_integrity</b>(package) + <a name="M000074"></a><b>log_package_integrity</b>(package) </div> <div class="description"> <p> @@ -342,37 +350,42 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000066_source')" id="l_M000066_source">show source</a> ]</p> - <div id="M000066_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000074_source')" id="l_M000074_source">show source</a> ]</p> + <div id="M000074_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File libs/abtlogmanager.... [truncated message content] |