abtlinux-svn Mailing List for ABout Time Linux (AbTLinux) (Page 13)
Status: Alpha
Brought to you by:
eschabell
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(12) |
Apr
(4) |
May
(61) |
Jun
(5) |
Jul
(12) |
Aug
(1) |
Sep
|
Oct
(29) |
Nov
(89) |
Dec
(37) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(4) |
Feb
(33) |
Mar
(12) |
Apr
|
May
(2) |
Jun
(13) |
Jul
(76) |
Aug
(7) |
Sep
(21) |
Oct
|
Nov
|
Dec
(33) |
2008 |
Jan
(32) |
Feb
(24) |
Mar
(17) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(10) |
From: <s_b...@us...> - 2006-12-07 23:29:31
|
Revision: 266 http://svn.sourceforge.net/abtlinux/?rev=266&view=rev Author: s_bosman Date: 2006-12-07 15:29:31 -0800 (Thu, 07 Dec 2006) Log Message: ----------- Removed Paths: ------------- docs/configManager/trunk/requirements/RuDev-group/configmanager.pdf Deleted: docs/configManager/trunk/requirements/RuDev-group/configmanager.pdf =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <s_b...@us...> - 2006-12-07 23:29:03
|
Revision: 265 http://svn.sourceforge.net/abtlinux/?rev=265&view=rev Author: s_bosman Date: 2006-12-07 15:29:00 -0800 (Thu, 07 Dec 2006) Log Message: ----------- Updated for Final Version 0.6 Modified Paths: -------------- docs/configManager/trunk/requirements/RuDev-group/ExpectationsHandled.pdf docs/configManager/trunk/requirements/RuDev-group/Goalsmodel.pdf docs/configManager/trunk/requirements/RuDev-group/configmanager.pdf docs/configManager/trunk/requirements/RuDev-group/configmanager.tex docs/configManager/trunk/requirements/RuDev-group/domainmodel-usecase1.pdf docs/configManager/trunk/requirements/RuDev-group/domainmodel-usecase2.pdf docs/configManager/trunk/requirements/RuDev-group/domainmodel-usecase3.pdf docs/configManager/trunk/requirements/RuDev-group/domainmodel-usecase4.pdf docs/configManager/trunk/requirements/RuDev-group/domainmodel-usecase5.pdf docs/configManager/trunk/requirements/RuDev-group/domainmodel-usecase6.pdf docs/configManager/trunk/requirements/RuDev-group/domainmodels.tex docs/configManager/trunk/requirements/RuDev-group/nonfunctionalGoals.pdf docs/configManager/trunk/requirements/RuDev-group/scenario1.tex docs/configManager/trunk/requirements/RuDev-group/scenario2.tex docs/configManager/trunk/requirements/RuDev-group/scenario3.tex docs/configManager/trunk/requirements/RuDev-group/scenario4.tex docs/configManager/trunk/requirements/RuDev-group/scenario5.tex docs/configManager/trunk/requirements/RuDev-group/scenario6.tex docs/configManager/trunk/requirements/RuDev-group/scenario7.tex docs/configManager/trunk/requirements/RuDev-group/scenario8.tex docs/configManager/trunk/requirements/RuDev-group/statement.tex docs/configManager/trunk/requirements/RuDev-group/terminological.tex docs/configManager/trunk/requirements/RuDev-group/usecase1.tex docs/configManager/trunk/requirements/RuDev-group/usecase2.tex docs/configManager/trunk/requirements/RuDev-group/usecase3.tex docs/configManager/trunk/requirements/RuDev-group/usecase4.tex docs/configManager/trunk/requirements/RuDev-group/usecase5.tex docs/configManager/trunk/requirements/RuDev-group/usecase6.tex docs/configManager/trunk/requirements/RuDev-group/usecase7.tex docs/configManager/trunk/requirements/RuDev-group/usecase8.tex docs/configManager/trunk/requirements/RuDev-group/usecasesurvey.tex Added Paths: ----------- docs/configManager/trunk/requirements/RuDev-group/domainmodel-usecase7.pdf docs/configManager/trunk/requirements/RuDev-group/domainmodel-usecase8.pdf Modified: docs/configManager/trunk/requirements/RuDev-group/ExpectationsHandled.pdf =================================================================== (Binary files differ) Modified: docs/configManager/trunk/requirements/RuDev-group/Goalsmodel.pdf =================================================================== (Binary files differ) Modified: docs/configManager/trunk/requirements/RuDev-group/configmanager.pdf =================================================================== (Binary files differ) Modified: docs/configManager/trunk/requirements/RuDev-group/configmanager.tex =================================================================== --- docs/configManager/trunk/requirements/RuDev-group/configmanager.tex 2006-12-07 15:41:09 UTC (rev 264) +++ docs/configManager/trunk/requirements/RuDev-group/configmanager.tex 2006-12-07 23:29:00 UTC (rev 265) @@ -5,7 +5,7 @@ \begin{document} -\title{ABout Time Linux - Configuration Manager \\ (v0.4)} +\title{ABout Time Linux - Configuration Manager \\ (v0.6)} \author{ \begin{tabular}{cccc} Modified: docs/configManager/trunk/requirements/RuDev-group/domainmodel-usecase1.pdf =================================================================== (Binary files differ) Modified: docs/configManager/trunk/requirements/RuDev-group/domainmodel-usecase2.pdf =================================================================== (Binary files differ) Modified: docs/configManager/trunk/requirements/RuDev-group/domainmodel-usecase3.pdf =================================================================== (Binary files differ) Modified: docs/configManager/trunk/requirements/RuDev-group/domainmodel-usecase4.pdf =================================================================== (Binary files differ) Modified: docs/configManager/trunk/requirements/RuDev-group/domainmodel-usecase5.pdf =================================================================== (Binary files differ) Modified: docs/configManager/trunk/requirements/RuDev-group/domainmodel-usecase6.pdf =================================================================== (Binary files differ) Added: docs/configManager/trunk/requirements/RuDev-group/domainmodel-usecase7.pdf =================================================================== (Binary files differ) Property changes on: docs/configManager/trunk/requirements/RuDev-group/domainmodel-usecase7.pdf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: docs/configManager/trunk/requirements/RuDev-group/domainmodel-usecase8.pdf =================================================================== (Binary files differ) Property changes on: docs/configManager/trunk/requirements/RuDev-group/domainmodel-usecase8.pdf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: docs/configManager/trunk/requirements/RuDev-group/domainmodels.tex =================================================================== --- docs/configManager/trunk/requirements/RuDev-group/domainmodels.tex 2006-12-07 15:41:09 UTC (rev 264) +++ docs/configManager/trunk/requirements/RuDev-group/domainmodels.tex 2006-12-07 23:29:00 UTC (rev 265) @@ -5,7 +5,7 @@ \begin{figure}[htbp] \centering - \includegraphics[angle=90,width=15cm,height=15cm]{"domainmodel-usecase1"} + \includegraphics[angle=0,width=15cm,height=15cm]{"domainmodel-usecase1"} \caption{Use Case 1} \label{fig:usecase1} \end{figure} @@ -15,7 +15,7 @@ \begin{figure}[htbp] \centering - \includegraphics[angle=90,width=15cm,height=15cm]{"domainmodel-usecase2"} + \includegraphics[angle=0,width=15cm,height=15cm]{"domainmodel-usecase2"} \caption{Use Case 2} \label{fig:usecase2} \end{figure} @@ -25,7 +25,7 @@ \begin{figure}[htbp] \centering - \includegraphics[angle=90,width=15cm,height=15cm]{"domainmodel-usecase3"} + \includegraphics[angle=0,width=15cm,height=15cm]{"domainmodel-usecase3"} \caption{Use Case 3} \label{fig:usecase3} \end{figure} @@ -35,7 +35,7 @@ \begin{figure}[htbp] \centering - \includegraphics[angle=90,width=15cm,height=15cm]{"domainmodel-usecase4"} + \includegraphics[angle=0,width=15cm,height=15cm]{"domainmodel-usecase4"} \caption{Use Case 4} \label{fig:usecase4} \end{figure} @@ -45,7 +45,7 @@ \begin{figure}[htbp] \centering - \includegraphics[angle=90,width=15cm,height=15cm]{"domainmodel-usecase5"} + \includegraphics[angle=0,width=15cm,height=15cm]{"domainmodel-usecase5"} \caption{Use Case 5} \label{fig:usecase5} \end{figure} @@ -55,9 +55,29 @@ \begin{figure}[htbp] \centering - \includegraphics[angle=90,width=15cm,height=15cm]{"domainmodel-usecase6"} + \includegraphics[angle=0,width=15cm,height=15cm]{"domainmodel-usecase6"} \caption{Use Case 6} \label{fig:usecase6} \end{figure} +\newpage +\subsection{Domain Model: Use Case 7} +\begin{figure}[htbp] + \centering + \includegraphics[angle=0,width=15cm,height=15cm]{"domainmodel-usecase7"} + \caption{Use Case 7} + \label{fig:usecase7} +\end{figure} + +\newpage +\subsection{Domain Model: Use Case 8} + +\begin{figure}[htbp] + \centering + \includegraphics[angle=0,width=15cm,height=15cm]{"domainmodel-usecase8"} + \caption{Use Case 8} + \label{fig:usecase8} +\end{figure} + + Modified: docs/configManager/trunk/requirements/RuDev-group/nonfunctionalGoals.pdf =================================================================== (Binary files differ) Modified: docs/configManager/trunk/requirements/RuDev-group/scenario1.tex =================================================================== --- docs/configManager/trunk/requirements/RuDev-group/scenario1.tex 2006-12-07 15:41:09 UTC (rev 264) +++ docs/configManager/trunk/requirements/RuDev-group/scenario1.tex 2006-12-07 23:29:00 UTC (rev 265) @@ -9,9 +9,9 @@ \begin{enumerate} \item configManager retrieves a request for installing the configuration of foo1 v.3.2. \item configManager opens list of configurations - \item configManager searches the path path1 of previous version of foo1 v3.1 - \item configManager sends request to AbT to backup the old config file foo1 v.3.1 with the path path1 and then remove it from its current location. - \item configManager sends request to AbT to store the new config file foo1 v.3.2 at path path1 + \item configManager searches the path path1 of last version of foo1 v3.1 + \item configManager sends request to AbT to backup the old configuration foo1 v.3.1 with the path path1 + \item configManager sends request to AbT to store the new configuration foo1 v.3.2 at path path1 \end{enumerate} \vspace{0.05em} \end{minipage} @@ -23,8 +23,8 @@ \begin{enumerate} \item configManager retrieves a request for installing the configuration of foo1 v.3.2. \item configManager opens list of configurations - \item configManager can\x92t find previous version of foo1 v.3.2 - \item configManager sends request to AbT to store the new config file foo1 v.3.2 with path path1 determined by AbT + \item configManager can\x92t find last version of foo1 v.3.2 + \item configManager sends request to AbT to store the new configuration foo1 v.3.2 at path given from AbT \end{enumerate} \vspace{0.05em} \end{minipage} Modified: docs/configManager/trunk/requirements/RuDev-group/scenario2.tex =================================================================== --- docs/configManager/trunk/requirements/RuDev-group/scenario2.tex 2006-12-07 15:41:09 UTC (rev 264) +++ docs/configManager/trunk/requirements/RuDev-group/scenario2.tex 2006-12-07 23:29:00 UTC (rev 265) @@ -10,11 +10,10 @@ \item configManager retrieves a request for upgrading the current configuration of foo1 v.3.1 with a the new configuration foo1 v.3.2 \item configManager opens list of configurations \item configManager searches the path path1 of current version of foo1 v.3.1 - \item configManager opens config file foo1 v.3.1 at path path1 - \item configManager compares variables from current config file foo1 v.3.1 with the new config file foo1 v.3.2 - \item configManager makes backup of current config file foo1 v.3.1 with path path 1 - \item configManager sends request to AbT to add the variables var12, var13 from the linenumbers ln12, ln13 of the new config file foo1 v.3.2 to the current config file foo1 v.3.1 - \item configManager sends request to AbT to delete the linenumbers ln18, ln19 with the variables var18, var19 from the current config file foo1 v.3.1 + \item configManager opens configuration foo1 v.3.1 at path path1 + \item configManager compares variables from current configuration foo1 v.3.1 with the new configuration foo1 v.3.2 + \item configManager makes backup of current configuration foo1 v.3.1 with path path 1 + \item configManager sends request to AbT to add the variables var12, var13 of the new configuration foo1 v.3.2 to the current configuration foo1 v.3.1 and delete the variables var18, var19 from the current configuration foo1 v.3.1 \item configManager sends request to AbT to update the version number of foo1 v.3.1 to version number foo1 v.3.2 \end{enumerate} \vspace{0.05em} @@ -27,9 +26,9 @@ \begin{enumerate} \item configManager retrieves a request for upgrading the current configuration of foo1 v.3.1 with a the new configuration foo1 v.3.2 \item configManager opens list of configurations - \item configManager searches the path path1 of previous version of foo1 v.3.1 - \item configManager opens config file foo1 v.3.1 at path path1 - \item current config file foo1 v.3.1 is equal with the new config file foo1 v.3.2 + \item configManager searches the path path1 of current version of foo1 v.3.1 + \item configManager opens configuration foo1 v.3.1 at path path1 + \item current configuration foo1 v.3.1 is equal with the new configuration foo1 v.3.2 \end{enumerate} \vspace{0.05em} \end{minipage} Modified: docs/configManager/trunk/requirements/RuDev-group/scenario3.tex =================================================================== --- docs/configManager/trunk/requirements/RuDev-group/scenario3.tex 2006-12-07 15:41:09 UTC (rev 264) +++ docs/configManager/trunk/requirements/RuDev-group/scenario3.tex 2006-12-07 23:29:00 UTC (rev 265) @@ -7,10 +7,11 @@ \begin{minipage}{\linewidth} \vspace{0.05em} \begin{enumerate} - \item configManager retrieves a request for making backup of config file foo1 v.3.2. + \item configManager retrieves a request for making backup of configuration foo1 v.3.2. \item configManager opens list of configurations - \item configManager searches the path path1 of previous version of foo1 v3.2 - \item configManager sends request to AbT to backup the config file foo1 v.3.2 with the path path1 to the backup location + \item configManager searches the path path1 of foo1 v3.2. + \item configManager sends request to AbT to backup the configuration foo1 v.3.2 with the path path1 to the backup location + \item configManager sends request to AbT to add current timestamp to foo1 v.3.2 at backup location \end{enumerate} \vspace{0.05em} \end{minipage} @@ -19,6 +20,13 @@ \textbf{Alternative Path:} & \begin{minipage}{\linewidth} \vspace{0.05em} + \begin{enumerate} + \item configManager retrieves a request for making backup of configuration foo1 v.3.2 and foo2 v.1.2. + \item configManager opens list of configurations + \item configManager searches the path path1 of foo1 v3.2 and path path2 of foo2 v.1.2 + \item configManager sends request to AbT to backup the configuration foo1 v.3.2 with the path path1 and foo2 v.1.2 with path path2 to the backup location + \item configManager sends request to AbT to add current timestamp to foo1 v.3.2 and foo2 v.1.2 at backup location + \end{enumerate} \vspace{0.05em} \end{minipage} \\ Modified: docs/configManager/trunk/requirements/RuDev-group/scenario4.tex =================================================================== --- docs/configManager/trunk/requirements/RuDev-group/scenario4.tex 2006-12-07 15:41:09 UTC (rev 264) +++ docs/configManager/trunk/requirements/RuDev-group/scenario4.tex 2006-12-07 23:29:00 UTC (rev 265) @@ -7,11 +7,11 @@ \begin{minipage}{\linewidth} \vspace{0.05em} \begin{enumerate} - \item configManager retrieves a request for restoring the configuration of foo1 v3.2 + \item configManager retrieves a request for restoring the configuration of foo1 v3.2 before timestamp 1165543200 \item configManager opens list of configurations - \item configManager searches the path path1 of of foo1 v.3.2 - \item configManager checks if a newer version of configuration for foo1 v.3.2. already exists - \item configManager sends request to AbT to move config file foo1 v.3.2 with path path1 from the backup location to the new location + \item configManager searches the paths path1, path2, path3 of configuration foo1 + \item configManager retrieves path path3 of configuration foo1 based on latest version before timestamp 1165543200 + \item configManager sends request to AbT to move configuration foo1 with path path3 from the backup location to the current location \end{enumerate} \vspace{0.05em} \end{minipage} @@ -20,12 +20,6 @@ \textbf{Alternative Path:} & \begin{minipage}{\linewidth} \vspace{0.05em} - \begin{enumerate} - \item configManager retrieves a request for restoring the configuration of foo1 v3.2 - \item configManager opens list of configurations - \item configManager searches the path path1 of of foo1 v.3.2 - \item check by configManager if current configuration for foo1 exists positive - \end{enumerate} \vspace{0.05em} \end{minipage} \\ Modified: docs/configManager/trunk/requirements/RuDev-group/scenario5.tex =================================================================== --- docs/configManager/trunk/requirements/RuDev-group/scenario5.tex 2006-12-07 15:41:09 UTC (rev 264) +++ docs/configManager/trunk/requirements/RuDev-group/scenario5.tex 2006-12-07 23:29:00 UTC (rev 265) @@ -10,7 +10,7 @@ \item configManager retrieves a request for deleting the configuration of foo1 v3.2 \item configManager opens list of configurations \item configManager searches the path path1 of of foo1 v.3.2 - \item configManager sends request to AbT to remove config file foo1 v.3.2 with path path1 + \item configManager sends request to AbT to remove configuration foo1 v.3.2 from path path1 \end{enumerate} \vspace{0.05em} \end{minipage} @@ -18,8 +18,14 @@ \hline \textbf{Alternative Path:} & \begin{minipage}{\linewidth} + \vspace{0.05em} + \begin{enumerate} + \item configManager retrieves a request for deleting the configuration of foo1 v3.2 + \item configManager opens list of configurations + \item configManager searches the path path1 and path path2 of of foo1 v.3.2 + \item configManager sends request to AbT to remove configuration foo1 v.3.2 from path path1 and path path2 + \end{enumerate} \vspace{0.05em} - \vspace{0.05em} \end{minipage} \\ \hline Modified: docs/configManager/trunk/requirements/RuDev-group/scenario6.tex =================================================================== --- docs/configManager/trunk/requirements/RuDev-group/scenario6.tex 2006-12-07 15:41:09 UTC (rev 264) +++ docs/configManager/trunk/requirements/RuDev-group/scenario6.tex 2006-12-07 23:29:00 UTC (rev 265) @@ -9,11 +9,11 @@ \begin{enumerate} \item configManager retrieves a request for editing the variable var15 of the configuration foo1 v.3.2 \item configManager opens list of configurations - \item configManager searches the path path1 of config file of foo1 v.3.2 - \item configManager opens config file foo1 v.3.2 at path path1 - \item configManager retrieves linenumber ln15 for the key key15 of variable var15 - \item configManager sends request to AbT to edit variable var15 at linenumber ln15 for config file foo1 v.3.2 with path path1 - \item configManager sends request to AbT to store the config file foo1 v.3.2 + \item configManager searches the path path1 of configuration of foo1 v.3.2 + \item configManager opens configuration foo1 v.3.2 at path path1 + \item configManager searches for the key key15 of variable var15 + \item configManager sends request to AbT to edit variable var15 for configuration foo1 v.3.2 at path path1 + \item configManager sends request to AbT to store the configuration foo1 v.3.2 \end{enumerate} \vspace{0.05em} \end{minipage} @@ -21,8 +21,17 @@ \hline \textbf{Alternative Path:} & \begin{minipage}{\linewidth} + \vspace{0.05em} + \begin{enumerate} + \item configManager retrieves a request for editing the variable var15, variable var 18 and variable var 19 of the configuration foo1 v.3.2 + \item configManager opens list of configurations + \item configManager searches the path path1 of configuration of foo1 v.3.2 + \item configManager opens configuration foo1 v.3.2 at path path1 + \item configManager searches for the key key15 of variable var15, the key key18 of variable var18 and the key key19 of variable var19 + \item configManager sends request to AbT to edit variables var15, var18 and var19 for configuration foo1 v.3.2 at path path1 + \item configManager sends request to AbT to store the configuration foo1 v.3.2 + \end{enumerate} \vspace{0.05em} - \vspace{0.05em} \end{minipage} \\ \hline Modified: docs/configManager/trunk/requirements/RuDev-group/scenario7.tex =================================================================== --- docs/configManager/trunk/requirements/RuDev-group/scenario7.tex 2006-12-07 15:41:09 UTC (rev 264) +++ docs/configManager/trunk/requirements/RuDev-group/scenario7.tex 2006-12-07 23:29:00 UTC (rev 265) @@ -7,10 +7,10 @@ \begin{minipage}{\linewidth} \vspace{0.05em} \begin{enumerate} - \item configManager retrieves a request to generate list lst1 of all config files - \item configManager searche file system for config files - \item configManager adds name foo1, version v.3.1, path path1 and name foo1, version v.3.2, path path2 to list lst1 - \item configManager groups name foo1, version v.3.1, path path1 and name foo1, version v.3.2, path path2 in list lst1 + \item configManager retrieves a request to generate list lst1 of all configurations + \item configManager searches file system for configurations + \item configManager adds name foo1, timestamp t1, version v.3.1, path path1 and name foo1, timestamp t2, version v.3.2, path path2 to list lst1 + \item configManager groups name foo1, timestamp t1, version v.3.1, path path1 and name foo1, timestamp t2, version v.3.2, path path2 in list lst1 \item configManager returns list lst1 to AbT \end{enumerate} \vspace{0.05em} @@ -19,8 +19,15 @@ \hline \textbf{Alternative Path:} & \begin{minipage}{\linewidth} + \vspace{0.05em} + \begin{enumerate} + \item configManager retrieves a request to generate list lst1 of all configurations + \item configManager searches file system for configurations + \item configManager adds name foo1, timestamp t1, version v.3.1, path path1, name foo1, timestamp t2, version v.3.2, path path2, name foo2, timestamp t3, version v.1.2 and path path3 to list lst1 + \item configManager groups name foo1, timestamp t1, version v.3.1, path path1, name foo1, timestamp t2, version v.3.2, path path2, name foo2, timestamp t3, version v.1.2 and path path3 in list lst1 + \item configManager returns list lst1 to AbT + \end{enumerate} \vspace{0.05em} - \vspace{0.05em} \end{minipage} \\ \hline Modified: docs/configManager/trunk/requirements/RuDev-group/scenario8.tex =================================================================== --- docs/configManager/trunk/requirements/RuDev-group/scenario8.tex 2006-12-07 15:41:09 UTC (rev 264) +++ docs/configManager/trunk/requirements/RuDev-group/scenario8.tex 2006-12-07 23:29:00 UTC (rev 265) @@ -20,10 +20,10 @@ \begin{minipage}{\linewidth} \vspace{0.05em} \begin{enumerate} - \item configManager retrieves a request for searching configuration foo1 v.3.2 - \item configManager opens list lst1 of configurations - \item configManager searches for foo1 v.3.2 in list lst1 - \item configManager can\x92t find foo1 v.3.2 + \item configManager retrieves a request for searching configuration foo2 v.1.2 + \item configManager opens list lst2 of configurations + \item configManager searches for foo2 v.1.2 in list lst1 + \item configManager returns path path2 of foo2 v.1.2 \end{enumerate} \vspace{0.05em} \end{minipage} Modified: docs/configManager/trunk/requirements/RuDev-group/statement.tex =================================================================== --- docs/configManager/trunk/requirements/RuDev-group/statement.tex 2006-12-07 15:41:09 UTC (rev 264) +++ docs/configManager/trunk/requirements/RuDev-group/statement.tex 2006-12-07 23:29:00 UTC (rev 265) @@ -139,6 +139,10 @@ \end{itemize} All required documentation will be expected one week in advance of the deadline among the project team. +\newline\newline +A detailed worksheet of which member worked at which task can be found at: +\newline\newline +\url{http://wiki.abtlinux.org/wikka.php?wakka=RuDev} Modified: docs/configManager/trunk/requirements/RuDev-group/terminological.tex =================================================================== --- docs/configManager/trunk/requirements/RuDev-group/terminological.tex 2006-12-07 15:41:09 UTC (rev 264) +++ docs/configManager/trunk/requirements/RuDev-group/terminological.tex 2006-12-07 23:29:00 UTC (rev 265) @@ -14,8 +14,18 @@ \hline configManager & The configuration engine, part of the tool set used by \x92abt\x92 to control the configuration management. \\ \hline - Configuration & An arrangement of functional units according to their nature, number, and chief characteristics. \\ + Configuration & An arrangement of functional unit(s) containing information about their nature, number, and chief characteristics. \\ \hline + Variable & A key-value combination within a configuration defining the characteristics of the configuration. \\ + \hline + Timestamp & Is a unix timestamp, the number of seconds since 00:00:00 UTC on January 1, 1970. \\ + \hline + Configuration File & A single file, containing variables, which is part of a configuration . \\ + \hline + Package & A complete set of data used in the Software Package Management System (SPMS) to manage all aspects of using this single piece of software. \\ + \hline + Path & The fully specified name of a configuration, including the position of the configuration in the file system's directory structure. \\ + \hline \end{tabular*} \end{center} Modified: docs/configManager/trunk/requirements/RuDev-group/usecase1.tex =================================================================== --- docs/configManager/trunk/requirements/RuDev-group/usecase1.tex 2006-12-07 15:41:09 UTC (rev 264) +++ docs/configManager/trunk/requirements/RuDev-group/usecase1.tex 2006-12-07 23:29:00 UTC (rev 265) @@ -8,23 +8,23 @@ \hline \textbf{Iteration:} & Focused \\ \hline -\textbf{Description:} & A package containing a new configuration file will be installed. \\ +\textbf{Description:} & A package containing a new configuration will be installed. \\ \hline \textbf{Actors:} & AbT \\ \hline -\textbf{Preconditions:} & configManager has access to the package configuration file. \newline configManager has generated a list of all configuration files \\ +\textbf{Preconditions:} & configManager has access to the package configuration file(s). \newline configManager has generated a list of all configuration files \\ \hline -\textbf{Triggers:} & AbT submits a request for installing a configfile from a package. \\ +\textbf{Triggers:} & AbT submits a request for installing a configuration from a package. \\ \hline \textbf{Basic Course of Events:} & \begin{minipage}{\linewidth} \vspace{0.05em} \begin{enumerate} - \item AbT submits a request for installing a configfile from a package + \item AbT submits a request for installing a configuration from a package \item Open list of all configuration files - \item Search the list for the path of the last version of the configfile - \item Send request to AbT to backup and remove the old configfile at the path given at step 3 - \item Send request to AbT to store the new configfile at the path given at step 3 + \item Search the list for the path of the last version of the configuration. + \item Send request to AbT to backup and remove the old configuration at the path given at step 3 + \item Send request to AbT to store the new configuration at the path given at step 3 \end{enumerate} \vspace{0.05em} \end{minipage} @@ -32,19 +32,19 @@ \hline \textbf{Alternative Path:} & At Step 3: If no last version is found of the configfile \newline a. Continue with step 5 with a path given from AbT \\ \hline -\textbf{Exceptions:} & If configuration file could not be accesed in a package \newline a. Return ERROR \newline\newline List of Configuration could not be opened \newline b. Return ERROR \\ +\textbf{Exceptions:} & If configuration file(s) could not be accesed in a package \newline a. Return ERROR \newline\newline List of Configuration could not be opened \newline b. Return ERROR \\ \hline \textbf{Assumptions:} & \begin{enumerate} \item AbT logs every action. - \item The package to install contains a configfile + \item The package to install contains configuration file(s) \end{enumerate} \\ \hline \textbf{Postconditions:} & \begin{minipage}{\linewidth} \vspace{0.05em} \begin{enumerate} - \item Installed configuration file from the package - \item The old configuration file is backuped + \item Installed configuration from the package + \item The old configuration is backuped \end{enumerate} \vspace{0.05em} \end{minipage} Modified: docs/configManager/trunk/requirements/RuDev-group/usecase2.tex =================================================================== --- docs/configManager/trunk/requirements/RuDev-group/usecase2.tex 2006-12-07 15:41:09 UTC (rev 264) +++ docs/configManager/trunk/requirements/RuDev-group/usecase2.tex 2006-12-07 23:29:00 UTC (rev 265) @@ -12,31 +12,30 @@ \hline \textbf{Actors:} & AbT \\ \hline -\textbf{Preconditions:} & a. configManager has access to the package new configuration file. \newline b. configManager has generatad a list of all configuration files \\ +\textbf{Preconditions:} & a. configManager has access to the package new configuration file(s). \newline b. configManager has generatad a list of all configuration files \\ \hline -\textbf{Triggers:} & AbT submits a requests to upgrade the current configuration file with a new one from the package. \\ +\textbf{Triggers:} & AbT submits a requests to upgrade the current configuration with a new one from the package. \\ \hline \textbf{Basic Course of Events:} & \begin{minipage}{\linewidth} \vspace{0.05em} \begin{enumerate} - \item AbT submits a requests to upgrade the current configuration file with a new one from the package. + \item AbT submits a requests to upgrade the current configuration with a new one from the package. \item Open list of all configfiles. - \item Search in the list for the path of the current version of the configfile. - \item Open the current configuration file from the path given at step 3 + \item Search in the list for the path of the current version of the configuration. + \item Open the current configuration from the path given at step 3 \item Compare the configuration variables from the current file given at step 4 with the variables from the new configuration file \item Backup the current configuration - \item Return to AbT the linenumbers of the variables which needed to be added from the new configuration file to the current. - \item Return to AbT the linenumbers of the variables, which no longer exist in the new configuration file, to delete them. - \item Return to AbT a request for updating version number + \item Return to AbT a request for updating the configuration with the differences found at step 5 + \item Return to AbT a request for updating version number. \end{enumerate} \vspace{0.05em} \end{minipage} \\ \hline -\textbf{Alternative Path:} & At Step 5: The configuration files are equal \newline a. Skip steps 6,7,8,9 \\ +\textbf{Alternative Path:} & At Step 5: The configurations are equal \newline a. Skip steps 6,7,8 \\ \hline -\textbf{Exceptions:} & Current configuration file could not be found \newline a. Return ERROR \newline\newline List of Configuration could not be opened \newline b. Return ERROR\\ +\textbf{Exceptions:} & Current configuration could not be found \newline a. Return ERROR \newline\newline List of Configuration could not be opened \newline b. Return ERROR\\ \hline \end{tabularx} \newpage @@ -44,16 +43,16 @@ \hline \textbf{Assumptions:} & \begin{enumerate} \item AbT logs every action. - \item The package for the upgrade process contains a configfile - \item configManager has access to read configuration files + \item The package for the upgrade process contains configuration file(s) + \item configManager has access to read configuration file(s) \end{enumerate} \\ \hline \textbf{Postconditions:} & \begin{minipage}{\linewidth} \vspace{0.05em} \begin{enumerate} - \item Current configuration file is upgraded with the variables from the upgrade package. - \item The old configuration file is backuped + \item Current configuration is upgraded with the variables from the upgrade package. + \item The old configuration is backuped \end{enumerate} \vspace{0.05em} \end{minipage} Modified: docs/configManager/trunk/requirements/RuDev-group/usecase3.tex =================================================================== --- docs/configManager/trunk/requirements/RuDev-group/usecase3.tex 2006-12-07 15:41:09 UTC (rev 264) +++ docs/configManager/trunk/requirements/RuDev-group/usecase3.tex 2006-12-07 23:29:00 UTC (rev 265) @@ -8,22 +8,23 @@ \hline \textbf{Iteration:} & Focused \\ \hline -\textbf{Description:} & Backup the current config file to a safe location\\ +\textbf{Description:} & Backup the current configuration to a safe location\\ \hline \textbf{Actors:} & AbT \\ \hline -\textbf{Preconditions:} & Configuration file to backup exists \newline configManager has generated a list of all configuration files \\ +\textbf{Preconditions:} & Configuration to backup exists \newline configManager has generated a list of all configuration files \\ \hline -\textbf{Triggers:} & AbT submits a request for backup a configfile with given identifiers. \\ +\textbf{Triggers:} & AbT submits a request for backup a configuration with given identifiers. \\ \hline \textbf{Basic Course of Events:} & \begin{minipage}{\linewidth} \vspace{0.05em} \begin{enumerate} - \item AbT submits a request for backup a configfile with given identifiers. + \item AbT submits a request for backup a configuration with given identifiers. \item Open list of all configuration files - \item Search the path of the configuration file with given identifiers + \item Search the path of the configuration with given identifiers \item Send request to AbT to store the configuration file, from the path given at step 3, to the backup location + \item Send request to add the current timestamp to the backup. \end{enumerate} \vspace{0.05em} \end{minipage} Modified: docs/configManager/trunk/requirements/RuDev-group/usecase4.tex =================================================================== --- docs/configManager/trunk/requirements/RuDev-group/usecase4.tex 2006-12-07 15:41:09 UTC (rev 264) +++ docs/configManager/trunk/requirements/RuDev-group/usecase4.tex 2006-12-07 23:29:00 UTC (rev 265) @@ -8,31 +8,31 @@ \hline \textbf{Iteration:} & Focused \\ \hline -\textbf{Description:} & Restore a backup version of your configuration file. \\ +\textbf{Description:} & Restore a backup version of your configuration. \\ \hline \textbf{Actors:} & AbT \\ \hline -\textbf{Preconditions:} & Configuration file to restore exists and is specified by identifiers \\ +\textbf{Preconditions:} & Configuration to restore exists and is specified by identifiers and a timestamp \\ \hline -\textbf{Triggers:} & AbT submits a request for restore a configuration file with given identifiers \\ +\textbf{Triggers:} & AbT submits a request for restore a configuration with given identifiers and timestamp \\ \hline \textbf{Basic Course of Events:} & \begin{minipage}{\linewidth} \vspace{0.05em} \begin{enumerate} - \item AbT submits a request for restore a configuration file with given identifiers + \item AbT submits a request for restore a configuration with given identifiers and timestamp \item Open list of all configuration files - \item Search the list for path of the configuration file with the given identifiers - \item Check the list if there is a newer configuration file that already exists. - \item Send request to AbT to move the configuration file from the backup location to the new location. + \item Search the list for the backup paths of the configurations with the given identifiers + \item Determine path of the configuration with the newest timestamp before the given timestamp. + \item Send request to AbT to move the configuration specified at step 4 from the backup location to the current location. \end{enumerate} \vspace{0.05em} \end{minipage} \\ \hline -\textbf{Alternative Path:} & At Step 4: Configuration File already exists\newline a. Send request to AbT to backup and remove the existing configuration file and continue with the next steps. \\ +\textbf{Alternative Path:} & \\ \hline -\textbf{Exceptions:} & The backuped configuration file is not found \newline a. Return ERROR \newline\newline List of Configuration could not be opened \newline b. Return ERROR \\ +\textbf{Exceptions:} & The backuped configuration is not found \newline a. Return ERROR \newline\newline List of Configuration could not be opened \newline b. Return ERROR \\ \hline \textbf{Assumptions:} & \begin{enumerate} \item AbT logs every action. @@ -43,7 +43,7 @@ \begin{minipage}{\linewidth} \vspace{0.05em} \begin{enumerate} - \item Configuration file restored + \item Configuration is restored \end{enumerate} \vspace{0.05em} \end{minipage} Modified: docs/configManager/trunk/requirements/RuDev-group/usecase5.tex =================================================================== --- docs/configManager/trunk/requirements/RuDev-group/usecase5.tex 2006-12-07 15:41:09 UTC (rev 264) +++ docs/configManager/trunk/requirements/RuDev-group/usecase5.tex 2006-12-07 23:29:00 UTC (rev 265) @@ -14,16 +14,16 @@ \hline \textbf{Preconditions:} & configManager has generated a list of all configuration files \\ \hline -\textbf{Triggers:} & AbT submits a request for deleting a configuration file with the given identifiers \\ +\textbf{Triggers:} & AbT submits a request for deleting a configuration with the given identifiers \\ \hline \textbf{Basic Course of Events:} & \begin{minipage}{\linewidth} \vspace{0.05em} \begin{enumerate} - \item AbT submits a request for deleting a configuration file with the given identifiers + \item AbT submits a request for deleting a configuration with the given identifiers \item Open list of all configuration files - \item Search the list for the path of the configuration files containing the given identifiers. - \item Send request to AbT to delete the configuration file from the following path + \item Search the list for the path of the configuration containing the given identifiers. + \item Send request to AbT to delete the configuration from the path given at step 3 \end{enumerate} \vspace{0.05em} \end{minipage} @@ -31,18 +31,19 @@ \hline \textbf{Alternative Path:} & None \\ \hline -\textbf{Exceptions:} & Configuration File is not found \newline a. Return ERROR. \newline \newline List of Configuration could not be opened \newline b. Return ERROR \\ +\textbf{Exceptions:} & Configuration is not found \newline a. Return ERROR. \newline \newline List of Configuration could not be opened \newline b. Return ERROR \\ \hline \textbf{Assumptions:} & \begin{enumerate} \item AbT logs every action. \item The request from AbT contains valid identifiers. + \item AbT takes care of any backup processes if necessary \end{enumerate} \\ \hline \textbf{Postconditions:} & \begin{minipage}{\linewidth} \vspace{0.05em} \begin{enumerate} - \item Configuration file is removed + \item Configuration is removed \end{enumerate} \vspace{0.05em} \end{minipage} Modified: docs/configManager/trunk/requirements/RuDev-group/usecase6.tex =================================================================== --- docs/configManager/trunk/requirements/RuDev-group/usecase6.tex 2006-12-07 15:41:09 UTC (rev 264) +++ docs/configManager/trunk/requirements/RuDev-group/usecase6.tex 2006-12-07 23:29:00 UTC (rev 265) @@ -8,25 +8,25 @@ \hline \textbf{Iteration:} & Focused \\ \hline -\textbf{Description:} & Edit variables in a current configuration file\\ +\textbf{Description:} & Edit variables in a current configuration\\ \hline \textbf{Actors:} & AbT \\ \hline -\textbf{Preconditions:} & Configuration file to be edited is specified \newline Variables to be edited are specified \newline configManager has generated a list of all configuration files \\ +\textbf{Preconditions:} & Configuration to be edited is specified \newline Variables to be edited are specified \newline configManager has generated a list of all configuration files \\ \hline -\textbf{Triggers:} & AbT submits a request for editing a value within a specified configuration file \\ +\textbf{Triggers:} & AbT submits a request for editing a value within a specified configuration \\ \hline \textbf{Basic Course of Events:} & \begin{minipage}{\linewidth} \vspace{0.05em} \begin{enumerate} - \item AbT submits a request for editing a value within a specified configuration file + \item AbT submits a request for editing a value within a specified configuration \item Open list of all configuration files - \item Search the path of the configuration file with given identifiers - \item Open the configuration file from the path given at step 3 + \item Search the path of the configuration with given identifiers + \item Open the configuration from the path given at step 3 \item Search for the variables keys - \item Return request to AbT with the linenumbers from step 5 to edit the variables - \item Return request to Abt to store the configuration file + \item Return request to AbT with the information from step 5 to edit the variables + \item Return request to Abt to store the configuration. \end{enumerate} \vspace{0.05em} \end{minipage} @@ -34,19 +34,24 @@ \hline \textbf{Alternative Path:} & None \\ \hline -\textbf{Exceptions:} & Configuration File not found \newline a. Return ERROR \newline\newline Key of a variable in configuration file is not found. \newline b. Return ERROR \newline\newline List of Configuration could not be opened \newline c. Return ERROR \\ +\textbf{Exceptions:} & Configuration not found \newline a. Return ERROR \newline\newline Key of a variable in configuration is not found. \newline b. Return ERROR \newline\newline List of Configuration could not be opened \newline c. Return ERROR \\ \hline +\end{tabularx} +\newpage +\begin{tabularx}{\linewidth}{|l|X|} +\hline \textbf{Assumptions:} & \begin{enumerate} \item Keys and values are valid specified. \item AbT logs every action. - \item AbT has access to filesystem to read and write the configuration file + \item AbT has access to filesystem to read and write the configuration + \item AbT takes care of any backup processes if necessary \end{enumerate} \\ \hline \textbf{Postconditions:} & \begin{minipage}{\linewidth} \vspace{0.05em} \begin{enumerate} - \item Configuration file edited + \item Configuration edited \end{enumerate} \vspace{0.05em} \end{minipage} Modified: docs/configManager/trunk/requirements/RuDev-group/usecase7.tex =================================================================== --- docs/configManager/trunk/requirements/RuDev-group/usecase7.tex 2006-12-07 15:41:09 UTC (rev 264) +++ docs/configManager/trunk/requirements/RuDev-group/usecase7.tex 2006-12-07 23:29:00 UTC (rev 265) @@ -8,21 +8,21 @@ \hline \textbf{Iteration:} & Focused \\ \hline -\textbf{Description:} & Generate a list containing every configuration file from the system \\ +\textbf{Description:} & Generate a list containing every configuration from the system \\ \hline \textbf{Actors:} & AbT \\ \hline \textbf{Preconditions:} & configManager has access to read the entire file system \\ \hline -\textbf{Triggers:} & AbT submits a request to generate a list of all configuration files. \\ +\textbf{Triggers:} & AbT submits a request to generate a list of all configurations. \\ \hline \textbf{Basic Course of Events:} & \begin{minipage}{\linewidth} \vspace{0.05em} \begin{enumerate} - \item AbT submits a request to generate a list of all configuration files. + \item AbT submits a request to generate a list of all configurations. \item Search the entire file system for configuration files - \item Collect name, version and path information of every configuration file + \item Collect name, timestamp, version and path information of every configuration \item Group the information to a list \item Return the list to AbT \end{enumerate} @@ -32,12 +32,12 @@ \hline \textbf{Alternative Path:} & None \\ \hline -\textbf{Exceptions:} & Configuration Files not found \newline a. Return ERROR \newline \newline Configuration Files can not be opened \newline b. Return ERROR \\ +\textbf{Exceptions:} & Configurations not found \newline a. Return ERROR \newline \newline Configuration can not be opened \newline b. Return ERROR \\ \hline \textbf{Assumptions:} & \begin{enumerate} \item AbT logs every action. - \item The type configuration files can be found by a identifier - \item Name, version and path information can be accessed by configManager + \item The type: 'configuration files' can be found by a identifier + \item Name, timestamp, version and path information can be accessed by configManager \end{enumerate} \\ \hline \textbf{Postconditions:} & Modified: docs/configManager/trunk/requirements/RuDev-group/usecase8.tex =================================================================== --- docs/configManager/trunk/requirements/RuDev-group/usecase8.tex 2006-12-07 15:41:09 UTC (rev 264) +++ docs/configManager/trunk/requirements/RuDev-group/usecase8.tex 2006-12-07 23:29:00 UTC (rev 265) @@ -8,21 +8,21 @@ \hline \textbf{Iteration:} & Focused \\ \hline -\textbf{Description:} & Search the entire system for a configuration file identified by identifiers given by AbT \\ +\textbf{Description:} & Search the entire system for a configuration identified by identifiers given by AbT \\ \hline \textbf{Actors:} & AbT \\ \hline -\textbf{Preconditions:} & Configuration file to be generated specified \\ +\textbf{Preconditions:} & configManager has generatad a list of all configuration files \\ \hline -\textbf{Triggers:} & AbT submits a request for searching a configfile containing the given identifiers \\ +\textbf{Triggers:} & AbT submits a request for searching a configuration containing the given identifiers \\ \hline \textbf{Basic Course of Events:} & \begin{minipage}{\linewidth} \vspace{0.05em} \begin{enumerate} - \item AbT submits a request for searching a configuration file containing the given identifiers. + \item AbT submits a request for searching a configuration containing the given identifiers. \item Open list of all configuration files. - \item Search in the list for the configuration file with the given identifiers. + \item Search in the list for the configuration with the given identifiers. \item Return AbT the path of the configuration file. \end{enumerate} \vspace{0.05em} @@ -31,7 +31,7 @@ \hline \textbf{Alternative Path:} & None \\ \hline -\textbf{Exceptions:} & List of Configuration could not be opened \newline a. Return ERROR \newline\newline If configfile is not found \newline a. Return ERROR \\ +\textbf{Exceptions:} & List of Configuration could not be opened \newline a. Return ERROR \newline\newline Configuration is not found \newline a. Return ERROR \\ \hline \textbf{Assumptions:} & \begin{enumerate} \item AbT logs every action. @@ -42,7 +42,7 @@ \begin{minipage}{\linewidth} \vspace{0.05em} \begin{enumerate} - \item The path of the configuration file matching the identifiers is returned. + \item The path of the configuration matching the identifiers is returned. \end{enumerate} \vspace{0.05em} \end{minipage} Modified: docs/configManager/trunk/requirements/RuDev-group/usecasesurvey.tex =================================================================== --- docs/configManager/trunk/requirements/RuDev-group/usecasesurvey.tex 2006-12-07 15:41:09 UTC (rev 264) +++ docs/configManager/trunk/requirements/RuDev-group/usecasesurvey.tex 2006-12-07 23:29:00 UTC (rev 265) @@ -20,7 +20,7 @@ \hline \textbf{Initiating actor:} & AbT \\ \hline -\textbf{Description:} & A package containing a new configuration file will be installed. \\ +\textbf{Description:} & A package containing a new configuration will be installed. \\ \hline \textbf{Completeness:} & Complete for Focused Stage \\ \hline @@ -68,7 +68,7 @@ \hline \textbf{Initiating actor:} & AbT \\ \hline -\textbf{Description:} & Backup the current config file to a safe location \\ +\textbf{Description:} & Backup the current configuration to a safe location \\ \hline \textbf{Completeness:} & Complete for Focused Stage \\ \hline @@ -92,7 +92,7 @@ \hline \textbf{Initiating actor:} & AbT \\ \hline -\textbf{Description:} & Restore a backup version of your configuration file \\ +\textbf{Description:} & Restore a backup version of a configuration \\ \hline \textbf{Completeness:} & Complete for Focused Stage \\ \hline @@ -140,7 +140,7 @@ \hline \textbf{Initiating actor:} & AbT \\ \hline -\textbf{Description:} & Edit variables in a current configuration file \\ +\textbf{Description:} & Edit variables in a current configuration \\ \hline \textbf{Completeness:} & Complete for Focused Stage \\ \hline @@ -164,7 +164,7 @@ \hline \textbf{Initiating actor:} & AbT \\ \hline -\textbf{Description:} & Generate a list containing every configuration file from the system \\ +\textbf{Description:} & Generate a list containing every configuration from the system \\ \hline \textbf{Completeness:} & Complete for Focused Stage \\ \hline @@ -188,7 +188,7 @@ \hline \textbf{Initiating actor:} & AbT \\ \hline -\textbf{Description:} & Search the entire system for a configuration file identified by identifiers given by AbT \\ +\textbf{Description:} & Search the entire system for a configuration identified by identifiers given by AbT \\ \hline \textbf{Completeness:} & Complete for Focused Stage \\ \hline This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-12-07 15:41:14
|
Revision: 264 http://svn.sourceforge.net/abtlinux/?rev=264&view=rev Author: eschabell Date: 2006-12-07 07:41:09 -0800 (Thu, 07 Dec 2006) Log Message: ----------- Changed all tabs to spaces, enables all editors to view code the same way. I finally made this decision for AbTLinux coding standard. Modified Paths: -------------- src/trunk/AbtDepEngine.rb src/trunk/AbtDownloadManager.rb src/trunk/AbtLogManager.rb src/trunk/AbtPackage.rb src/trunk/AbtPackageManager.rb src/trunk/AbtQueueManager.rb src/trunk/AbtReportManager.rb src/trunk/AbtSystemManager.rb src/trunk/AbtUsage.rb src/trunk/abt.rb src/trunk/abtconfig.rb Modified: src/trunk/AbtDepEngine.rb =================================================================== --- src/trunk/AbtDepEngine.rb 2006-12-07 12:38:48 UTC (rev 263) +++ src/trunk/AbtDepEngine.rb 2006-12-07 15:41:09 UTC (rev 264) @@ -1,7 +1,7 @@ #!/usr/bin/ruby -w ## -# AbtDepEngine.rb +# AbtDepEngine.rb # # AbtDepEngine class handles all dependency aspects of the AbTLinux system. It is # part of a sub-project with it's own requirements document. @@ -20,7 +20,7 @@ # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. -# +# # You should have received a copy of the GNU General Public License along with # AbTLinux; if not, write to the Free Software Foundation, Inc., 51 Franklin # St, Fifth Floor, Boston, MA 02110-1301 USA @@ -28,17 +28,17 @@ class AbtDepEngine protected - + private - + public ## # Constructor for the AbtDepEngine class. # - # <b>RETURN</b> <i>AbtDepEngine</i> - an initialized AbtDepEngine object. + # <b>RETURN</b> <i>AbtDepEngine</i> - an initialized AbtDepEngine object. ## def initialize end - + end \ No newline at end of file Modified: src/trunk/AbtDownloadManager.rb =================================================================== --- src/trunk/AbtDownloadManager.rb 2006-12-07 12:38:48 UTC (rev 263) +++ src/trunk/AbtDownloadManager.rb 2006-12-07 15:41:09 UTC (rev 264) @@ -1,7 +1,7 @@ #!/usr/bin/ruby -w ## -# AbtDownloadManager.rb +# AbtDownloadManager.rb # # AbtDownloadManager class handles all downloading of components needed for # AbTLinux. @@ -20,7 +20,7 @@ # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. -# +# # You should have received a copy of the GNU General Public License along with # AbTLinux; if not, write to the Free Software Foundation, Inc., 51 Franklin # St, Fifth Floor, Boston, MA 02110-1301 USA @@ -28,22 +28,22 @@ class AbtDownloadManager protected - + private - + public ## # Constructor for the AbtDownloadManager class. # - # <b>RETURN</b> <i>AbtDownloadManager</i> - an initialized AbtDownloadManager object. + # <b>RETURN</b> <i>AbtDownloadManager</i> - an initialized AbtDownloadManager object. ## def initialize end - + ## # Downloads a given package source. If the file already exists, returns - # true as if download completed. + # true as if download completed. # # <b>PARAM</b> <i>String</i> - the name of the package for which the source # is to be downloaded. @@ -53,25 +53,25 @@ # downloaded, otherwise false. ## def retrievePackageSource( packageName, destination ) - require packageName - logger = AbtLogManager.new - systemMgr = AbtSystemManager.new - package = eval( packageName.capitalize + '.new' ) - - if ( File.exist?( destination + "/" + File.basename( package.srcUrl ) ) ) - logger.logToJournal( "Download not needed, existing source found for " + packageName ) - return true - end + require packageName + logger = AbtLogManager.new + systemMgr = AbtSystemManager.new + package = eval( packageName.capitalize + '.new' ) - Dir.chdir( destination ) - if ( systemMgr.runSystemCall( "wget #{package.srcUrl}" ) ) - logger.logToJournal( "Download completed for " + packageName ) - return true - end + if ( File.exist?( destination + "/" + File.basename( package.srcUrl ) ) ) + logger.logToJournal( "Download not needed, existing source found for " + packageName ) + return true + end - return false # download failed. + Dir.chdir( destination ) + if ( systemMgr.runSystemCall( "wget #{package.srcUrl}" ) ) + logger.logToJournal( "Download completed for " + packageName ) + return true + end + + return false # download failed. end - + ## # Downloads a given pacakge tree. # @@ -82,61 +82,61 @@ ## def retrievePackageTree( packageTreeName ) end - + ## # Retrieves the given feed and displays the news items. # - # <b>PARAM</b> <i>String</i> - the uri of the rss news feed to be retrieved. - # <b>PARAM</b> <i>String</i> - pass the value 'true' to empty the log file, - # otherwise it will be appended. + # <b>PARAM</b> <i>String</i> - the uri of the rss news feed to be retrieved. + # <b>PARAM</b> <i>String</i> - pass the value 'true' to empty the log file, + # otherwise it will be appended. # <b>RETURN</b> <i>boolean</i> - True if the AbTLinux news feed has been # retrieved, otherwise false. ## def retrieveNewsFeed( uri, cleanLog = "false" ) - require 'net/http' - require 'uri' - require 'rss/1.0' - require 'rss/2.0' - newsLog = "" + require 'net/http' + require 'uri' + require 'rss/1.0' + require 'rss/2.0' + newsLog = "" - # ensure we have our news logfile. - if ( cleanLog == "true" ) - newsLog = File.new( $ABTNEWS_LOG, File::WRONLY|File::TRUNC|File::CREAT, 644 ) - else - newsLog = File.new( $ABTNEWS_LOG, File::WRONLY|File::APPEND|File::CREAT, 644 ) - end - - # pick up the abtlinux.org news feed. - if ( !news = Net::HTTP.get( URI.parse( uri ) ) ) - logger.logToJournal( "Failed to retrieve news feed #{uri}." ) - return false - end + # ensure we have our news logfile. + if ( cleanLog == "true" ) + newsLog = File.new( $ABTNEWS_LOG, File::WRONLY|File::TRUNC|File::CREAT, 644 ) + else + newsLog = File.new( $ABTNEWS_LOG, File::WRONLY|File::APPEND|File::CREAT, 644 ) + end - # display the feeds. - rss = nil - begin - rss = RSS::Parser.parse(news, false) - rescue RSS::Error - end - - if ( rss.nil? ) - logger.logToJournal( "Failed to display news feed as feed #{uri} is not RSS 1.0/2.0." ) - return false - else - newsLog.puts "*** #{rss.channel.title} ***" - - rss.items.each_with_index do |item, itemCount| - itemCount += 1 - newsLog.puts "#{itemCount} #{item.link} #{item.title}" - end - end + # pick up the abtlinux.org news feed. + if ( !news = Net::HTTP.get( URI.parse( uri ) ) ) + logger.logToJournal( "Failed to retrieve news feed #{uri}." ) + return false + end - newsLog.puts "\n" - newsLog.close - return true + # display the feeds. + rss = nil + begin + rss = RSS::Parser.parse(news, false) + rescue RSS::Error + end + if ( rss.nil? ) + logger.logToJournal( "Failed to display news feed as feed #{uri} is not RSS 1.0/2.0." ) + return false + else + newsLog.puts "*** #{rss.channel.title} ***" + + rss.items.each_with_index do |item, itemCount| + itemCount += 1 + newsLog.puts "#{itemCount} #{item.link} #{item.title}" + end + end + + newsLog.puts "\n" + newsLog.close + return true + end - + ## # Updates a given package with available patches (version updates). # @@ -147,7 +147,7 @@ ## def updatePackage end - + ## # Updates the package tree. # @@ -156,5 +156,5 @@ ## def updatePackageTree end - + end Modified: src/trunk/AbtLogManager.rb =================================================================== --- src/trunk/AbtLogManager.rb 2006-12-07 12:38:48 UTC (rev 263) +++ src/trunk/AbtLogManager.rb 2006-12-07 15:41:09 UTC (rev 264) @@ -1,7 +1,7 @@ #!/usr/bin/ruby -w ## -# AbtLogManager.rb +# AbtLogManager.rb # # AbtLogManager class handles all aspects of logging and access to existing logs # within the AbTLinux system. @@ -20,7 +20,7 @@ # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. -# +# # You should have received a copy of the GNU General Public License along with # AbTLinux; if not, write to the Free Software Foundation, Inc., 51 Franklin # St, Fifth Floor, Boston, MA 02110-1301 USA @@ -28,49 +28,49 @@ class AbtLogManager protected - + ## # Provides logging of the integrity of all installed files for the given # package. Will be called as part of the logging done during the install # phase. - # + # # <b>PARAM</b> <i>String</i> - Package name. - # + # # <b>RETURN</b> <i>boolean</i> - True if integrity log created successfully, # otherwise false. ## def logPackageIntegrity( package ) end - - + + private public ## - # Constructor for the AbtLogManager. It ensures all needed logs paths are + # Constructor for the AbtLogManager. It ensures all needed logs paths are # initialized. - # # - # <b>RETURN</b> <i>AbtLogManager</i> - an initialized AbtLogManager object. + # + # <b>RETURN</b> <i>AbtLogManager</i> - an initialized AbtLogManager object. ## def initialize - [$ABT_LOGS, $ABT_CACHES, $BUILD_LOCATION, $PACKAGE_INSTALLED, - $SOURCES_REPOSITORY].each { |dir| - - if ( ! File.directory?( dir ) ) - FileUtils.mkdir_p( dir ) - self.logToJournal( "Created directory: #{dir}." ) - end - } - end - + [$ABT_LOGS, $ABT_CACHES, $BUILD_LOCATION, $PACKAGE_INSTALLED, + $SOURCES_REPOSITORY].each { |dir| + + if ( ! File.directory?( dir ) ) + FileUtils.mkdir_p( dir ) + self.logToJournal( "Created directory: #{dir}." ) + end + } + end + ## # Provides logging of all files installed by given package. Should be called # as part of the install phase of the build. - # + # # <b>PARAM</b> <i>String</i> - Package name. - # + # # <b>RETURN</b> <i>boolean</i> - True if install log created successfully, # otherwise false. ## @@ -80,9 +80,9 @@ ## # Provides logging of all output produced during the build phase of the # given package. Should be called as part of the install phase of the build. - # + # # <b>PARAM</b> <i>String</i> - Package name. - # + # # <b>RETURN</b> <i>boolean</i> - True if build log created successfully, # otherwise false. ## @@ -92,9 +92,9 @@ ## # Provides a complete log of the given packages build. Includes everything # needed to duplicate the build at a later date. - # + # # <b>PARAM</b> <i>String</i> - Package name. - # + # # <b>RETURN</b> <i>boolean</i> - True if package cache created successfully, # otherwise false. ## @@ -104,18 +104,18 @@ ## # Provides logging of given message to the AbTLinux journal. Message logged # with date timestamp. - # + # # <b>PARAM</b> <i>String</i> - Message to be added to the log. - # + # # <b>RETURN</b> <i>boolean</i> True if logged, otherwise false. ## def logToJournal( message ) - if ( log = File.new( $JOURNAL, File::WRONLY|File::APPEND|File::CREAT, 0644 ) ) - log.puts "#{$TIMESTAMP} : #{message}" - log.close - return true - end + if ( log = File.new( $JOURNAL, File::WRONLY|File::APPEND|File::CREAT, 0644 ) ) + log.puts "#{$TIMESTAMP} : #{message}" + log.close + return true + end - return false + return false end end Modified: src/trunk/AbtPackage.rb =================================================================== --- src/trunk/AbtPackage.rb 2006-12-07 12:38:48 UTC (rev 263) +++ src/trunk/AbtPackage.rb 2006-12-07 15:41:09 UTC (rev 264) @@ -1,7 +1,7 @@ #!/usr/bin/ruby -w ## -# AbtPackage.rb +# AbtPackage.rb # # AbtPackage class provides an interface to AbtPackage creation within AbTLinux. By # inheriting from this class (class Fortune < AbtPackage) one picks up all @@ -22,126 +22,126 @@ # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. -# +# # You should have received a copy of the GNU General Public License along with # AbTLinux; if not, write to the Free Software Foundation, Inc., 51 Franklin # St, Fifth Floor, Boston, MA 02110-1301 USA ## class AbtPackage - -protected - - ## - # Unpacks this packages source file into the standard build location. - # + + protected + + ## + # Unpacks this packages source file into the standard build location. + # # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, otherwise false. - ## - def unpackSources - systemMgr = AbtSystemManager.new - srcFile = File.basename( @srcUrl ) - sourcesToUnpack = "#{$SOURCES_REPOSITORY}/#{srcFile}" - unpackTool = "" + ## + def unpackSources + systemMgr = AbtSystemManager.new + srcFile = File.basename( @srcUrl ) + sourcesToUnpack = "#{$SOURCES_REPOSITORY}/#{srcFile}" + unpackTool = "" - # check for existing file in source repo. - if ( !File.exist?( sourcesToUnpack ) ) - return false - end + # check for existing file in source repo. + if ( !File.exist?( sourcesToUnpack ) ) + return false + end - # check if possible existing sources in build directory. - if ( File.directory?( "#{$BUILD_LOCATION}/#{@srcDir}" ) ) - return true - end + # check if possible existing sources in build directory. + if ( File.directory?( "#{$BUILD_LOCATION}/#{@srcDir}" ) ) + return true + end - # determine which supported compression used [gz, tar, tgz, bz2, zip]. - compressionType = srcFile.split( '.' ) + # determine which supported compression used [gz, tar, tgz, bz2, zip]. + compressionType = srcFile.split( '.' ) - case compressionType.last + case compressionType.last - when "gz" - unpackTool = "tar xzvf" + when "gz" + unpackTool = "tar xzvf" - when "tar" - unpackTool = "tar xvf" + when "tar" + unpackTool = "tar xvf" - when "bz2" - unpackTool = "tar xjvf" + when "bz2" + unpackTool = "tar xjvf" - when "tgz" - unpackTool = "tar xzvf" - - when "zip" - unpackTool = "unizp" + when "tgz" + unpackTool = "tar xzvf" - else - # unsupported format. - return false - end - - # DEBUG: - #logger = AbtLogManager.new - #logger.logToJournal( "DEBUG: unpack tool will be '#{unpackTool}'." ) + when "zip" + unpackTool = "unizp" - Dir.chdir( $BUILD_LOCATION ) - if ( !systemMgr.runSystemCall( "#{unpackTool} #{sourcesToUnpack}" ) ) - return false - end + else + # unsupported format. + return false + end - return true - end + # DEBUG: + #logger = AbtLogManager.new + #logger.logToJournal( "DEBUG: unpack tool will be '#{unpackTool}'." ) -private - -public - + Dir.chdir( $BUILD_LOCATION ) + if ( !systemMgr.runSystemCall( "#{unpackTool} #{sourcesToUnpack}" ) ) + return false + end + + return true + end + + private + + public + # the name of the package. attr_reader :name - + # the executable name for the package. attr_reader :execName - + # the package version number. attr_reader :version - + # the source directory for the package. attr_reader :srcDir - + # the packages homepage. attr_reader :homepage - + # the URL where this packages sources can be obtained. attr_reader :srcUrl - + # list of dependsOn (DO) related package dependencies. attr_reader :dependsOn - + # list of reliesOn (RO) related package dependencies. attr_reader :reliesOn - + # list of optional reliesOn (oRO) related package dependencies. attr_reader :optionalDO # list of optional dependsOn (oDO) related package dependencies. attr_reader :optionalRO - + # security hash value of package sources. attr_reader :hashCheck - + # list of available patches for this package. attr_reader :patches - + # security hash value of this packages patches. attr_reader :patchesHashCheck - + # available mirrors for this package. attr_reader :mirrorPath - + # type of license this package has. attr_reader :licence - + # the package description. attr_reader :description - - + + ## # Constructor for an AbtPackage, requires all the packge details. # @@ -149,118 +149,119 @@ # ## def initialize( data ) - @name = data['name'] - @execName = data['execName'] - @version = data['version'] - @srcDir = data['srcDir'] - @homepage = data['homepage'] - @srcUrl = data['srcUrl'] - @dependsOn = data['dependsOn'] - @reliesOn = data['reliesOn'] - @optionalDO = data['optionalDO'] - @optionalRO = data['optionalRO'] - @hashCheck = data['hashCheck'] - @patches = data['patches'] + @name = data['name'] + @execName = data['execName'] + @version = data['version'] + @srcDir = data['srcDir'] + @homepage = data['homepage'] + @srcUrl = data['srcUrl'] + @dependsOn = data['dependsOn'] + @reliesOn = data['reliesOn'] + @optionalDO = data['optionalDO'] + @optionalRO = data['optionalRO'] + @hashCheck = data['hashCheck'] + @patches = data['patches'] @patchesHashCheck = data['patchesHashCheck'] - @mirrorPath = data['mirrorPath'] - @license = data['license'] - @description = data['description'] + @mirrorPath = data['mirrorPath'] + @license = data['license'] + @description = data['description'] end - + ## # Provides all the data needed for this AbtPackage. # # <b>RETURNS:</b> <i>hash</i> - Contains all AbtPackage attributes (constants). ## def details - return { - "Package name" => @name, - "Executable" => @execName, - "Version" => @version, - "Source location" => @srcDir, - "Homepage" => @homepage, - "Source uri" => @srcUrl, - "Depends On" => @dependsOn, - "Relies On" => @reliesOn, - "Optional DO" => @optionalDO, - "Optional RO" => @optionalRO, - "Security hash" => @hashCheck, - "Patches" => @patches, - "Patches hash" => @patchesHashCheck, - "Mirror" => @mirrorPath, - "License" => @license, - "Description" => @description - } + return { + "Package name" => @name, + "Executable" => @execName, + "Version" => @version, + "Source location" => @srcDir, + "Homepage" => @homepage, + "Source uri" => @srcUrl, + "Depends On" => @dependsOn, + "Relies On" => @reliesOn, + "Optional DO" => @optionalDO, + "Optional RO" => @optionalRO, + "Security hash" => @hashCheck, + "Patches" => @patches, + "Patches hash" => @patchesHashCheck, + "Mirror" => @mirrorPath, + "License" => @license, + "Description" => @description + } end - + ## - # Preliminary work will happen here such as downloading the tarball, + # 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. ## def pre - downloader = AbtDownloadManager.new + downloader = AbtDownloadManager.new - # download sources. - if ( !downloader.retrievePackageSource( @name.downcase, $SOURCES_REPOSITORY ) ) - return false - end + # download sources. + if ( !downloader.retrievePackageSource( @name.downcase, $SOURCES_REPOSITORY ) ) + return false + end - # unpack sources. - if ( !self.unpackSources ) - return false - end + # unpack sources. + if ( !self.unpackSources ) + return false + end - # TODO: create_group? - # TODO: create_user? - # TODO: retrieve patches? - # TODO: apply patches? - - return true + # TODO: create_group? + # TODO: create_user? + # TODO: retrieve patches? + # TODO: 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 + # 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. ## def configure - systemMgr = AbtSystemManager.new - buildSite = "#{$BUILD_LOCATION}/#{@srcDir}" + systemMgr = AbtSystemManager.new + 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. - #command = "./configure --prefix=#{$DEFAULT_PREFIX} | tee #{$PACKAGE_INSTALLED}/{@srcDir}.configure" - command = "./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 = "./configure --prefix=#{$DEFAULT_PREFIX} | tee #{$PACKAGE_INSTALLED}/{@srcDir}.configure" + Dir.chdir( buildSite ) + stdin, stdout, stderr = + Open3.popen3( "./configure --prefix=#{$DEFAULT_PREFIX}" ) - Dir.chdir( buildSite ) - stdin, stdout, stderr = Open3.popen3( command ) + # check for errors. + if ( !stderr.eof ) + # TODO: put this in failure file. + puts "DEBUG: [AbtPackage.configure] - stderr:" + puts stderr.read + return false + else + puts "DEBUG: [AbtPackage.configure] - nothing in stderr." + end - # check for errors. - if ( !stderr.eof ) - puts "DEBUG: [AbtPackage.configure] - stderr:" - puts stderr.read - return false - else - puts "DEBUG: [AbtPackage.configure] - nothing in stderr." - end - - # check for output. - if ( !stdout.eof ) - puts "DEBUG: [AbtPackage.configure] - stdout:" - puts stdout.read - else - puts "DEBUG: [AbtPackage.configure] - nothing in stdout." - end - - return true + # check for output. + if ( !stdout.eof ) + # TODO: put this in #{$PACKAGE_INSTALLED}/{@srcDir}.configure. + puts "DEBUG: [AbtPackage.configure] - stdout:" + puts stdout.read + else + puts "DEBUG: [AbtPackage.configure] - nothing in stdout." + end + + return true end - + ## # Here is where the actual builing of the software starts, for example running 'make'. # @@ -268,7 +269,7 @@ ## def build end - + ## # Any actions needed before the installation can occur will happen here, such as creating # new user accounts, dealing with existing configuration files, etc. @@ -285,7 +286,7 @@ ## def install end - + ## # Last bits of installation. adding the service for automatic start in init.d for example. # @@ -294,24 +295,24 @@ def post end - ## - # Cleans up this packages source build directory. - # + ## + # Cleans up this packages source build directory. + # # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, otherwise false. - ## - def removeBuild - if ( $REMOVE_BUILD_SOURCES ) - buildSourcesLocation = "#{$BUILD_LOCATION}/#{srcDir}" + ## + def removeBuild + if ( $REMOVE_BUILD_SOURCES ) + buildSourcesLocation = "#{$BUILD_LOCATION}/#{srcDir}" - if ( !File.directory?( buildSourcesLocation ) ) - return true - end + if ( !File.directory?( buildSourcesLocation ) ) + return true + end - if ( !FileUtils.rm_rf buildSourcesLocation, :verbose => true ) - return false - end - end + if ( !FileUtils.rm_rf buildSourcesLocation, :verbose => true ) + return false + end + end - return true - end + return true + end end Modified: src/trunk/AbtPackageManager.rb =================================================================== --- src/trunk/AbtPackageManager.rb 2006-12-07 12:38:48 UTC (rev 263) +++ src/trunk/AbtPackageManager.rb 2006-12-07 15:41:09 UTC (rev 264) @@ -1,7 +1,7 @@ #!/usr/bin/ruby -w ## -# AbtPackageManager.rb +# AbtPackageManager.rb # # AbtPackageManager class will take care of the installation, removal, updating, # downgrading and freezing of AbTLinux software packages. @@ -20,7 +20,7 @@ # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. -# +# # You should have received a copy of the GNU General Public License along with # AbTLinux; if not, write to the Free Software Foundation, Inc., 51 Franklin # St, Fifth Floor, Boston, MA 02110-1301 USA @@ -36,7 +36,7 @@ ## # Constructor for AbtPackageManager. # - # <b>RETURN</b> <i>AbtPackageManager</i> - an initialized AbtPackageManager object. + # <b>RETURN</b> <i>AbtPackageManager</i> - an initialized AbtPackageManager object. ## def initialize end @@ -50,59 +50,59 @@ # false. ## def installPackage( package ) - require package - sw = eval( "#{package.capitalize}.new" ) - queuer = AbtQueueManager.new - logger = AbtLogManager.new + require package + sw = eval( "#{package.capitalize}.new" ) + queuer = AbtQueueManager.new + logger = AbtLogManager.new - # TODO: initialize pkg install directory ($PACKAGE_INSTALLED/@srcDir), - # should this fail we have to clean this dir up, move to failure - # location? - # On success, need to cache contents in cache dir. - - # get package details. - details = sw.details + # TODO: initialize pkg install directory ($PACKAGE_INSTALLED/@srcDir), + # should this fail we have to clean this dir up, move to failure + # location? + # On success, need to cache contents in cache dir. - # TODO: check deps - - # add to install queue. - if ( !queuer.addPackageToQueue( package, "install" ) ) - logger.logToJournal( "Failed to add #{package} to install queue." ) - return false - end + # get package details. + details = sw.details - # pre section. - if ( !sw.pre ) - logger.logToJournal( "Failed to process pre-section in the package description of #{package}." ) - return false - else - logger.logToJournal( "DEBUG: finished #{package} pre section." ) - end + # TODO: check deps - # configure section. - if ( !sw.configure ) - logger.logToJournal( "Failed to process configure section in the package description of #{package}." ) - return false - else - logger.logToJournal( "DEBUG: finished #{package} configure section." ) - end + # add to install queue. + if ( !queuer.addPackageToQueue( package, "install" ) ) + logger.logToJournal( "Failed to add #{package} to install queue." ) + return false + end + # pre section. + if ( !sw.pre ) + logger.logToJournal( "Failed to process pre-section in the package description of #{package}." ) + return false + else + logger.logToJournal( "DEBUG: finished #{package} pre section." ) + end + + # configure section. + if ( !sw.configure ) + logger.logToJournal( "Failed to process configure section in the package description of #{package}." ) + return false + else + logger.logToJournal( "DEBUG: finished #{package} configure section." ) + end + # TODO: finish up the following steps per install scenario: - # - # build section - # pre install section - # install section - # post section - # remove build sources. - # - if ( !sw.removeBuild ) - logger.logToJournal( "Failed to remove the build sources for #{package}." ) - #return false # commented out as this is not a reason to fail. - end + # + # build section + # pre install section + # install section + # post section + # remove build sources. + # + if ( !sw.removeBuild ) + logger.logToJournal( "Failed to remove the build sources for #{package}." ) + #return false # commented out as this is not a reason to fail. + end - return true + return true end - + ## # Reinstalls a given package. # @@ -113,7 +113,7 @@ ## def reinstallPackage( package ) end - + ## # Removes a given package. # @@ -124,7 +124,7 @@ ## def removePackage( package ) end - + ## # Downgrades a given package. # @@ -137,7 +137,7 @@ ## def downgradePackage( package, version ) end - + ## # Freezes a given package. If successful will add give package to the frozen # list. @@ -154,22 +154,22 @@ # Provides for a log through for root access using su. # # <b>PARAM</b> <i>Array</i> - the arguments passed to abt. - # + # # <b>RETURN</b> <i>void</i> ## def rootLogin( arguments ) - systemMgr = AbtSystemManager.new + systemMgr = AbtSystemManager.new - if ( Process.uid != 0 ) - args = "" - puts "\nEnter root password:" + if ( Process.uid != 0 ) + args = "" + puts "\nEnter root password:" - for i in 0...ARGV.length - args = args + " " + ARGV[i] - end + for i in 0...ARGV.length + args = args + " " + ARGV[i] + end - systemMgr.runSystemCall( 'su -c "./abt ' + args + '" root' ) - exit - end + systemMgr.runSystemCall( 'su -c "./abt ' + args + '" root' ) + exit + end end end Modified: src/trunk/AbtQueueManager.rb =================================================================== --- src/trunk/AbtQueueManager.rb 2006-12-07 12:38:48 UTC (rev 263) +++ src/trunk/AbtQueueManager.rb 2006-12-07 15:41:09 UTC (rev 264) @@ -1,7 +1,7 @@ #!/usr/bin/ruby -w ## -# AbtQueueManager.rb +# AbtQueueManager.rb # # AbtQueueManager class handles all AbTLinux queue interaction. # @@ -19,7 +19,7 @@ # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. -# +# # You should have received a copy of the GNU General Public License along with # AbTLinux; if not, write to the Free Software Foundation, Inc., 51 Franklin # St, Fifth Floor, Boston, MA 02110-1301 USA @@ -27,60 +27,60 @@ class AbtQueueManager protected - + private - + public ## # Constructor for the AbtQueueManager class. # - # <b>RETURN</b> <i>AbtQueueManager</i> - an initialized AbtQueueManager object. + # <b>RETURN</b> <i>AbtQueueManager</i> - an initialized AbtQueueManager object. ## def initialize end - - ## - # Add a given package to the given queue. If package already in - # the queue then it will not be added twice and return a positive - # answer. - # - # <b>PARAM</b> <i>String</i> - the package to be added to the queue. - # <b>PARAM</b> <i>String</i> - the queue to add the package to. - # - # <b>RETURN</b> <i>boolean</i> - true if package added/exists to/in install - # queue, otherwise false. - ## - def addPackageToQueue( package, queue ) - queueFile = "#{$ABT_LOGS}/#{queue}.log" - logger = AbtLogManager.new - if ( log = File.new( queueFile, File::WRONLY|File::APPEND|File::CREAT, 0644 ) ) - # pickup queue contents to ensure no duplicates. - checkingQueue = IO.readlines( queueFile ) + ## + # Add a given package to the given queue. If package already in + # the queue then it will not be added twice and return a positive + # answer. + # + # <b>PARAM</b> <i>String</i> - the package to be added to the queue. + # <b>PARAM</b> <i>String</i> - the queue to add the package to. + # + # <b>RETURN</b> <i>boolean</i> - true if package added/exists to/in install + # queue, otherwise false. + ## + def addPackageToQueue( package, queue ) + queueFile = "#{$ABT_LOGS}/#{queue}.log" + logger = AbtLogManager.new - # endsure no duplicates. - matched = false - checkingQueue.each do |entry| - entryName = entry.split( '|' ) - if ( entryName[0] == package ) - matched = true - end - end - - # check if package exists, otherwise add. - if ( !matched ) - log.puts "#{package}|#{$TIMESTAMP}" - logger.logToJournal( "Added #{package} to #{queue} queue." ) - else - logger.logToJournal( "Did not add #{package} to #{queue}, already exists." ) - end - - log.close - return true - end + if ( log = File.new( queueFile, File::WRONLY|File::APPEND|File::CREAT, 0644 ) ) + # pickup queue contents to ensure no duplicates. + checkingQueue = IO.readlines( queueFile ) - logger.logToJournal( "Failed to open #{queueFile}." ) - return false - end + # endsure no duplicates. + matched = false + checkingQueue.each do |entry| + entryName = entry.split( '|' ) + if ( entryName[0] == package ) + matched = true + end + end + + # check if package exists, otherwise add. + if ( !matched ) + log.puts "#{package}|#{$TIMESTAMP}" + logger.logToJournal( "Added #{package} to #{queue} queue." ) + else + logger.logToJournal( "Did not add #{package} to #{queue}, already exists." ) + end + + log.close + return true + end + + logger.logToJournal( "Failed to open #{queueFile}." ) + return false + end end Modified: src/trunk/AbtReportManager.rb =================================================================== --- src/trunk/AbtReportManager.rb 2006-12-07 12:38:48 UTC (rev 263) +++ src/trunk/AbtReportManager.rb 2006-12-07 15:41:09 UTC (rev 264) @@ -1,7 +1,7 @@ #!/usr/bin/ruby -w ## -# AbtReportManager.rb +# AbtReportManager.rb # # AbtReportManager class handles all sort of report and query generation within # the AbTLinux system. @@ -20,7 +20,7 @@ # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. -# +# # You should have received a copy of the GNU General Public License along with # AbTLinux; if not, write to the Free Software Foundation, Inc., 51 Franklin # St, Fifth Floor, Boston, MA 02110-1301 USA @@ -28,15 +28,15 @@ class AbtReportManager protected - + private - + public ## # Constructor for the AbtReportManager. # - # <b>RETURN</b> <i>AbtReportManager</i> - an initialized Report1Manager object. + # <b>RETURN</b> <i>AbtReportManager</i> - an initialized Report1Manager object. ## def initialize end @@ -50,43 +50,43 @@ # false. ## def showPackageDetails( package ) - require package + require package - if ( package = eval( "#{package.capitalize}.new" ) ) - details = package.details + if ( package = eval( "#{package.capitalize}.new" ) ) + details = package.details - puts "|=====================================" - puts "| Package name\t: #{details['Package name']}" - details.delete( "Package name" ) - puts "| Version\t: #{details['Version']}" - details.delete( "Version" ) - puts "| Homepage\t: #{details['Homepage']}" - details.delete( "Homepage" ) - puts "| Executable\t: #{details['Executable']}" - details.delete( "Executable" ) - puts "| Source uri\t: #{details['Source uri']}" - details.delete( "Source uri" ) - puts "| Description\t: #{details['Description']}" - details.delete( "Description" ) - puts "|=====================================" - puts "|=====================================" + puts "|=====================================" + puts "| Package name\t: #{details['Package name']}" + details.delete( "Package name" ) + puts "| Version\t: #{details['Version']}" + details.delete( "Version" ) + puts "| Homepage\t: #{details['Homepage']}" + details.delete( "Homepage" ) + puts "| Executable\t: #{details['Executable']}" + details.delete( "Executable" ) + puts "| Source uri\t: #{details['Source uri']}" + details.delete( "Source uri" ) + puts "| Description\t: #{details['Description']}" + details.delete( "Description" ) + puts "|=====================================" + puts "|=====================================" - details.each do |name, value| - print "| #{name}\t" - - if ( name.length < 14 ) - print "\t" - end + details.each do |name, value| + print "| #{name}\t" - puts ": #{value}" - end + if ( name.length < 14 ) + print "\t" + end - puts "|=====================================" - return true - end + puts ": #{value}" + end - logger.logToJournal( "[AbtReportManger::showPackageDetails] - failed to show details for ${package}." ) - return false + puts "|=====================================" + return true + end + + logger.logToJournal( "[AbtReportManger::showPackageDetails] - failed to show details for ${package}." ) + return false end ## @@ -108,9 +108,9 @@ # <b>RETURN</b> <i>void.</i> ## def showPackageLog( package, logType ) - # install log - # build log - # integrity log + # install log + # build log + # integrity log end ## @@ -131,7 +131,7 @@ # <b>RETURN</b> <i>hash</i> - Empty hash if no problems found, otherwise # hash of problem files and their encountered errors. ## - def showPackageDependencies( package ) + def showPackageDependencies( package ) end ## @@ -143,31 +143,31 @@ ## def showUntrackedFiles end - + ## # Display the AbTLinux journal file. # - # <b> PARAM</b> <i>string</i> The complete path of the file to display. - # + # <b> PARAM</b> <i>string</i> The complete path of the file to display. + # # <b>RETURN</b> <i>iboolean</i> True if journal shown, otherwise false. ## def showJournal( fileName ) - if ( File.exist?( fileName ) ) - puts "\n\n" - puts "AbTLinux log:" - puts "=============" - log = IO.readlines( fileName ) - log.each{ |entry| puts entry } - puts "\n\n" - else - puts "\n\n" - puts "AbtLinux log ( #{File.basename( fileName )} ) is empty at this time." - puts "\n\n" - end + if ( File.exist?( fileName ) ) + puts "\n\n" + puts "AbTLinux log:" + puts "=============" + log = IO.readlines( fileName ) + log.each{ |entry| puts entry } + puts "\n\n" + else + puts "\n\n" + puts "AbtLinux log ( #{File.basename( fileName )} ) is empty at this time." + puts "\n\n" + end - return true + return true end - + ## # Display the name of the package(s) that own the given file. # @@ -177,11 +177,11 @@ ## def showFileOwner( file ) end - + ## # Searches the installed package trees package descriptions for matching # occurrances of the given search text. - # + # # <b>PARAM</b> <i>String</i> - a search text. # # <b>RETURN</b> <i>hash</i> - a hash of the search results, keys are package @@ -192,39 +192,39 @@ ## # Displays the contents of the current queue based on the given queue. - # + # # <b>PARAM</b> <i>String</i> - the type of queue to display such as install # queue. # # <b>RETURN</b> <i>void.</i> ## def showQueue( queueType ) - queueFile = "#{$ABT_LOGS}/#{queueType}.log" - case queueType + queueFile = "#{$ABT_LOGS}/#{queueType}.log" + case queueType - when "install" - if ( File.exist?( queueFile ) ) - puts "\n\n" - puts "AbTLinux #{queueType} queue:" - puts "=======================" - queue = IO.readlines( queueFile ) - queue.each{ |entry| puts entry } - puts "\n\n" - else - puts "\n\n" - puts "AbtLinux #{queueType} is empty at this time." - puts "\n\n" - end + when "install" + if ( File.exist?( queueFile ) ) + puts "\n\n" + puts "AbTLinux #{queueType} queue:" + puts "=======================" + queue = IO.readlines( queueFile ) + queue.each{ |entry| puts entry } + puts "\n\n" + else + puts "\n\n" + puts "AbtLinux #{queueType} is empty at this time." + puts "\n\n" + end - else - puts "#{queueType.capitalize} is not an AbTLinux queue." - end + else + puts "#{queueType.capitalize} is not an AbTLinux queue." + end end ## # Reports available updates for a given package or package tree based on the # current system. - # + # # <b>PARAM</b> <i>String</i> - the target of the update check, either a # package name or a package tree name. # @@ -233,10 +233,10 @@ ## def showUpdates( target ) end - + ## # Generates an HTML page of installed packages from installed packages list. - # + # # <b>RETURN</b> <i>void.</i> ## def generateHTMLPackageListing Modified: src/trunk/AbtSystemManager.rb =================================================================== --- src/trunk/AbtSystemManager.rb 2006-12-07 12:38:48 UTC (rev 263) +++ src/trunk/AbtSystemManager.rb 2006-12-07 15:41:09 UTC (rev 264) @@ -1,7 +1,7 @@ #!/usr/bin/ruby -w ## -# AbtSystemManager.rb +# AbtSystemManager.rb # # AbtSystemManager class handles all aspects of the AbTLinux system. It takes # care of such tasks as cleanup, fixing, verification and management of @@ -21,7 +21,7 @@ # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. -# +# # You should have received a copy of the GNU General Public License along with # AbTLinux; if not, write to the Free Software Foundation, Inc., 51 Franklin # St, Fifth Floor, Boston, MA 02110-1301 USA @@ -29,15 +29,15 @@ class AbtSystemManager protected - + private - + public ## # Constructor for the System manager # - # <b>RETURN</b> <i>AbtSystemManager</i> - an initialized AbtSystemManager object. + # <b>RETURN</b> <i>AbtSystemManager</i> - an initialized AbtSystemManager object. ## def initialize end @@ -45,7 +45,7 @@ ## # Removes all sources for packages that are not currently installed. Makes # use of install listing to determine package sources to keep. - # + # # <b>RETURN</b> <i>boolean</i> - True if completes without error, otherwise # false. ## @@ -54,7 +54,7 @@ ## # All logs for packages not in install list are cleaned off the system. - # + # # <b>RETURN</b> <i>boolean</i> - True if completes without error, otherwise # false. ## @@ -63,9 +63,9 @@ ## # Checks if files from given package install list are actually installed. - # + # # <b>PARAM</b> <i>String</i> - Package name. - # + # # <b>RETURN</b> <i>boolean</i> - True if no installed files are missing, otherwise # false. ## @@ -74,9 +74,9 @@ ## # Checks if given packages installed symlinks are broken or missing. - # + # # <b>PARAM</b> <i>String</i> - Package name. - # + # # <b>RETURN</b> <i>boolean</i> - True if no symlinks found missing or broken, otherwise # false. ## @@ -85,9 +85,9 @@ ## # Checks the given packages dependencies for missing or broken dependencies. - # + # # <b>PARAM</b> <i>String</i> - Package name. - # + # # <b>RETURN</b> <i>boolean</i> - True if dependencies intact, otherwise # false. ## @@ -97,64 +97,64 @@ ## # Checks the given packages installed files against the integrity log for # changes to installed files. - # + # # <b>PARAM</b> <i>String</i> - Package name. - # + # # <b>RETURN</b> <i>hash</i> - Empty hash if no problems found, otherwise # hash of problem files and their encountered errors. ## - def verifyPackageIntegrity( package ) + def verifyPackageIntegrity( package ) end ## # Fixes the given package. - # + # # <b>PARAM</b> <i>String</i> - Package name. - # + # # <b>RETURN</b> <i>boolean</i> - True if completes without error, otherwise # false. ## def fixPackage( package ) end - + ## # Sets the URI of a central repository for pre-compiled packages. # # <b>PARAM</b> <i>String</i> - the URI where the central repository is # located. - # + # # <b>RETURN</b> <i>boolean</i> - True if the URI is set, otherwise false. ## def setCentralRepo( uri ) end - + ## # Sets the location where the package tree is to be downloaded from, can be # set to a local location. # # <b>PARAM</b> <i>String</i> - the location of the package tree. - # + # # <b>RETURN</b> <i>boolean</i> - True if the package tree location is set, - # otherwise false. + # otherwise false. ## def setPackageTreeLocation( location ) end - + ## # Our in house system call wrapper. Used to control any system calls made in - # abt. Need to sort out tracking of stderr, stdout, stdin with open3? + # abt. Need to sort out tracking of stderr, stdout, stdin with open3? # Eventually replace any need for system here. # # <b>PARAM</b> <i>String</i> - the call to pass to system. - # - # <b>RETURN</b> <i>boolean</i> - True if system call successful, otherwise + # + # <b>RETURN</b> <i>boolean</i> - True if system call successful, otherwise # false. ## def runSystemCall( command ) - if ( !system( command ) ) - return false - end + if ( !system( command ) ) + return false + end - return true + return true end end Modified: src/trunk/AbtUsage.rb =================================================================== --- src/trunk/AbtUsage.rb 2006-12-07 12:38:48 UTC (rev 263) +++ src/trunk/AbtUsage.rb 2006-12-07 15:41:09 UTC (rev 264) @@ -1,10 +1,10 @@ #!/usr/bin/ruby -I./packages ## -# AbtUsage.rb +# AbtUsage.rb # # The usage reporting class for AbTLinux. -# +# # Created by Eric D. Schabell <er...@ab...> # Copyright November 2006, GPL. # @@ -19,140 +19,140 @@ # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. -# +# # You should have received a copy of the GNU General Public License along with # AbTLinux; if not, write to the Free Software Foundation, Inc., 51 Franklin # St, Fifth Floor, Boston, MA 02110-1301 USA ## class AbtUsage - ## - # The main usage method, displays either a given section or all sections. - # - # <b>PARAM</b> <i>String</i> - the name of the help section to be shown. - # - # <b>RETURN</b> <i>void</i> - ## - def usage( section ) - puts "Usage: abt.rb [options]\n\n" + ## + # The main usage method, displays either a given section or all sections. + # + # <b>PARAM</b> <i>String</i> - the name of the help section to be shown. + # + # <b>RETURN</b> <i>void</i> + ## + def usage( section ) + puts "Usage: abt.rb [options]\n\n" - case section + case section - when "packages" - usagePackages - - when "queries" - usageQueries + when "packages" + usagePackages - when "generation" - usageGeneration + when "queries" + usageQueries - when "downloads" - usageDownloads + when "generation" + usageGeneration - when "fix" - usageFix + when "downloads" + usageDownloads - when "maintenance" - usageMaintenance - - else - usagePackages - usageQueries - usageGeneration - usageDownloads - usageFix - usageMaintenance - end - end + when "fix" + usageFix - ## - # The usage information for the packages commands. - # - # <b>RETURN</b> <i>void</i> - ## - def usagePackages - puts "\npackages:" - puts " -i, install [package]\t\tInstall given package." - puts " -ri, reinstall [package]\t\tReinstall given package." - puts " -r, remove [package]\t\tRemove given package." - puts " -dg, downgrade [version] [package]\tDowngrade given package to given version." - puts " -f, freeze [package]\t\tHolds given package at current version, prevents upgrades.\n" - end + when "maintenance" + usageMaintenance - ## - # The usage information for the query commands. - # - # <b>RETURN</b> <i>void</i> - ## - def usageQueries - puts "\nqueries:" - puts " -s, search [string | regexp ]\tSearch package descriptions for given input." - puts " -v, --version\t\t\tShow abt package manager version." - puts " show-details [package]\t\tShow give package details." - puts " show-build [package]\t\tShow build log of given package." - puts " show-depends [package]\t\tShow the dependency tree of given package." - puts " show-files [package]\t\tShow all installed files from given package." - puts " show-owner [file]\t\tShow the package owning given file." - puts " show-installed\t\t\tShow list of all installed packages." - puts " show-frozen\t\t\t\tShow list of all frozen packages." - puts " show-untracked\t\t\tShow all files on system not tracked by AbTLinux." - puts " show-journal\t\t\t\tShow the system journal." - puts " show-iqueue\t\t\t\tShow the contents of the install queue." - puts " show-patches\t\t\t\tShow the current available patches for installed package tree.\n" - end + else + usagePackages + usageQueries + usageGeneration + usageDownloads + usageFix + usageMaintenance + end + end - ## - # The usage information for the generation commands. - # - # <b>RETURN</b> <i>void</i> - ## - def usageGeneration - puts "\ngeneration:" - puts " show-updates\t\tShow a package listing with available update versions." - puts " html\t\t\tGenerate HTML page from installed packages:" - puts " \t\t\t\t(package name with hyperlink to package website and version installed)\n" - end + ## + # The usage information for the packages commands. + # + # <b>RETURN</b> <i>void</i> + ## + def usagePackages + puts "\npackages:" + puts " -i, install [package]\t\tInstall given package." + puts " -ri, reinstall [package]\t\tReinstall given package." + puts " -r, remove [package]\t\tRemove given package." + puts " -dg, downgrade [version] [package]\tDowngrade given package to given version." + puts " -f, freeze [package]\t\tHolds given package at current version, prevents upgrades.\n" + end - ## - # The usage information for the download commands. - # - # <b>RETURN</b> <i>void</i> - ## - def usageDownloads - puts "\ndownloads:" - puts " -d, download [package]\t\tRetrieve given package sources." - puts " -u, update [package]|[tree]\tUpdate given package or tree from AbTLinux repository." - puts " -n, news\t\t\t\tDisplays newsfeeds from AbTLinux website.\n" - end + ## + # The usage information for the query commands. + # + # <b>RETURN</b> <i>void</i> + ## + def usageQueries + puts "\nqueries:" + puts " -s, search [string | regexp ]\tSearch package descriptions for given input." + puts " -v, --version\t\t\tShow abt package manager version." + puts " show-details [package]\t\tShow give package details." + puts " show-build [package]\t\tShow build log of given package." + puts " show-depends [package]\t\tShow the dependency tree of given package." + puts " show-files [package]\t\tShow all installed files from given package." + puts " show-owner [file]\t\tShow the package owning given file." + puts " show-installed\t\t\tShow list of all installed packages." + puts " show-frozen\t\t\t\tShow list of all frozen packages." + puts " show-untracked\t\t\tShow all files on system not tracked by AbTLinux." + puts " show-journal\t\t\t\tShow the system journal." + puts " show-iqueue\t\t\t\tShow the contents of the install queue." + puts " show-patches\t\t\t\tShow the current available patches for installed package tree.\n" + end - ## - # The usage information for the fix commands. - # - # <b>RETURN</b> <i>void</i> - ## - def usageFix - puts "\nfix:" - puts " purge-src\t\t\t\tRemove source caches for packages no longer installed." - puts " purge-logs\t\t\t\tRemove log files for packages no longer installed." - puts " verify-files [package]\t\tInstalled files are verified for given package." - puts " verify-symlinks [package]\t\tSymlinks verified for given package." - puts " verify-deps [package]\t\tDependency tree is verified for given package." - puts " verify-integrity [package]\t\tVerify integrity of installed files for given package." - puts " fix [package]\t\tGiven package is verified and fixed if needed.\n" - end + ## + # The usage information for the generation commands. + # + # <b>RETURN</b> <i>void</i> + ## + def usageGeneration + puts "\ngeneration:" + puts " show-updates\t\tShow a package listing with available update versions." + puts " html\t\t\tGenerate HTML page from installed packages:" + puts " \t\t\t\t(package name with hyperlink to package website and version installed)\n" + end - ## - # The usage information for the maintenance commands. - # - # <b>RETURN</b> <i>void</i> - ## - def usageMaintenance - puts "\nmaintenance:" - puts " build-location [host]\t\tSets global location (default: localhost) for retrieving cached package builds." - puts " package-repo [add|remove|list] [URI]" - puts " add - add package repository to list." - puts " remove - remove a package repository from list." - puts " list - display current repository list.\n" - end + ## + # The usage information for the download commands. + # + # <b>RETURN</b> <i>void</i> + ## + def usageDownloads + puts "\ndownloads:" + puts " -d, download [package]\t\tRetrieve given package sources." + puts " -u, update [package]|[tree]\tUpdate given package or tree from AbTLinux repository." + puts " -n, news\t\t\t\tDisplays newsfeeds from AbTLinux website.\n" + end + + ## + # The usage information for the fix commands. + # + # <b>RETURN</b> <i>void</i> + ## + def usageFix + puts "\nfix:" + puts " purge-src\t\t\t\tRemove source caches for packages no longer installed." + puts " purge-logs\t\t\t\tRemove log files for packages no longer installed." + puts " verify-files [package]\t\tInstalled files are verified for given package." + puts " verify-symlinks [package]\t\tSymlinks verified for given package." + puts " verify-deps [package]\t\tDependency tree is verified for given package." + puts " verify-integrity [package]\t\tVerify integrity of installed files for given package." + puts " fix [package]\t\tGiven package is verified and fixed if needed.\n" + end + + ## + # The usage information for the maintenance commands. + # + # <b>RETURN</b> <i>void</i> + ## + def usageMaintenance + puts "\nmaintenance:" + puts " build-location [host]\t\tSets global location (default: localhost) for retrieving cached package builds." + puts " package-repo [add|remove|list] [URI]" + puts " add - add package repository to list." + puts " remove - remove a package repository from list." + puts " list - display current repository list.\n" + end end Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-12-07 12:38:48 UTC (rev 263) +++ src/trunk/abt.rb 2006-12-07 15:41:09 UTC (rev 264) @@ -1,10 +1,10 @@ #!/usr/bin/ruby -wI./packages ## -# abt.rb +# abt.rb # -# The central package manager script to run all ABout Time Linux tasks. -# +# The central package manager script to run all ABout Time Linux tasks. +# # Created by Eric D. Schabell <er...@ab...> # Copyright July 2006, GPL. # @@ -19,7 +19,7 @@ # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. -# +# # You should have received a copy of the GNU General Public License along with # AbTLinux; if not, write to the Free Software Foundation, Inc., 51 Franklin # St, Fifth Floor, Boston, MA 02110-1301 USA @@ -48,7 +48,7 @@ # deal with usage request. if ( ARGV.length == 0 ) - show.usage( "all" ) + show.usage( "all" ) end # login as root for the rest. @@ -57,331 +57,331 @@ # parse arguments. case ARGV[0] - # abt [ -i | install ] <package> - when "install", "-i" - if ( ARGV.length == 2 && File.exist?( "#{$PACKAGE_PATH}#{ARGV[1]}.rb" ) ) - options['package'] = ARGV[1] - logger.logToJournal( "Starting to install #{options['package']}" ) - - if ( manager.installPackage( options['package'] ) ) - puts "\n\n" - puts "Completed install of #{options['package']}." - puts "\n\n" - logger.logToJournal( "Completed install of #{options['package']}." ) - else - puts "#{options['package'].capitalize} install failed, see journal." - end + # abt [ -i | install ] <package> + when "install", "-i" + if ( ARGV.length == 2 && File.exist?( "#{$PACKAGE_PATH}#{ARGV[1]}.rb" ) ) + options['package'] = ARGV[1] + logger.logToJournal( "Starting to install #{options['package']}" ) - #reporter.showQueue( "install" ); # DEBUG. - else - show.usage( "packages" ) - exit - end - - when "reinstall", "-ri" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Reinstalling package : " + options['package'] - else - show.usage( "packages" ) - exit - end - - when "remove", "-r" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Removing package : " + options['package'] - else - show.usage( "packages" ) - exit - end - - when "downgrade", "-dg" - if ( ARGV.length == 3 ) - options['version'] = ARGV[1] - options['package'] = ARGV[2] - print "Downgradinging package : #{options['package']} " - puts "to version : #{options['version']}" - else - show.usage( "packages" ) - exit - end - - when "freeze", "-f" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Holdinging package : #{options['package']} at current version." - else - show.usage( "packages" ) - exit - end - - when "search", "-s" - if ( ARGV.length == 2 ) - options['searchString'] = ARGV[1] - puts "Searching package descriptions for : #{options['searchString']}" - else - show.usage( "queries" ) - exit - end - - # abt -v | --version - when "-v", "--version" - if ( ARGV.length == 1 ) - puts "Abt Package Manager version is : #{$ABT_VERSION}" - else - show.usage( "queries" ) - exit - end + if ( manager.installPackage( options['package'] ) ) + puts "\n\n" + puts "Completed install of #{options['package']}." + puts "\n\n" + logger.logToJournal( "Completed install of #{options['package']}." ) + else + puts "#{options['package'].capitalize} install failed, see journal." + end - # abt show-details <package> - when "show-details" - if ( ARGV.length == 2 && File.exist?( $PACKAGE_PATH + ARGV[1] + ".rb" ) ) - options['pkg'] = ARGV[1] - logger.logToJournal( "Starting show details for #{options['pkg']}" ) - - if ( reporter.showPackageDetails( options['pkg'] ) ) - logger.logToJournal( "Completed show details for #{options['pkg']}" ) - else - puts "Problems processing the details for #{options['pkg']}." - end - else - show.usage( "queries" ) - end - - when "show-build" - if ( ARGV.length == 2 ) - options['package'] = ARGV[1] - puts "Display build log for package : " + options['package'] - else - show.usage( "queries" ) - exit - end + #reporter.showQueue( "install" ); # DEBUG. + else + show.usage( "packages" ) + exit + end + when "reinst... [truncated message content] |
From: <esc...@us...> - 2006-12-06 20:30:27
|
Revision: 261 http://svn.sourceforge.net/abtlinux/?rev=261&view=rev Author: eschabell Date: 2006-12-06 12:14:38 -0800 (Wed, 06 Dec 2006) Log Message: ----------- Regenerated api docs. Modified Paths: -------------- src/trunk/doc/classes/AbtDownloadManager.html src/trunk/doc/classes/AbtPackage.html src/trunk/doc/created.rid src/trunk/doc/files/AbtDownloadManager_rb.html src/trunk/doc/files/AbtPackage_rb.html Modified: src/trunk/doc/classes/AbtDownloadManager.html =================================================================== --- src/trunk/doc/classes/AbtDownloadManager.html 2006-12-06 20:13:56 UTC (rev 260) +++ src/trunk/doc/classes/AbtDownloadManager.html 2006-12-06 20:14:38 UTC (rev 261) @@ -178,51 +178,51 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000015_source')" id="l_M000015_source">show source</a> ]</p> <div id="M000015_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtDownloadManager.rb, line 94</span> - 94: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieveNewsFeed</span>( <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">cleanLog</span> = <span class="ruby-value str">"false"</span> ) - 95: <span class="ruby-identifier">require</span> <span class="ruby-value str">'net/http'</span> - 96: <span class="ruby-identifier">require</span> <span class="ruby-value str">'uri'</span> - 97: <span class="ruby-identifier">require</span> <span class="ruby-value str">'rss/1.0'</span> - 98: <span class="ruby-identifier">require</span> <span class="ruby-value str">'rss/2.0'</span> - 99: <span class="ruby-identifier">newsLog</span> = <span class="ruby-value str">""</span> -100: -101: <span class="ruby-comment cmt"># ensure we have our news logfile.</span> -102: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">cleanLog</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"true"</span> ) -103: <span class="ruby-identifier">newsLog</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">$ABTNEWS_LOG</span>, <span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">WRONLY</span><span class="ruby-operator">|</span><span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">TRUNC</span><span class="ruby-operator">|</span><span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">CREAT</span>, <span class="ruby-value">644</span> ) -104: <span class="ruby-keyword kw">else</span> -105: <span class="ruby-identifier">newsLog</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">$ABTNEWS_LOG</span>, <span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">WRONLY</span><span class="ruby-operator">|</span><span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">APPEND</span><span class="ruby-operator">|</span><span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">CREAT</span>, <span class="ruby-value">644</span> ) -106: <span class="ruby-keyword kw">end</span> -107: -108: <span class="ruby-comment cmt"># pick up the abtlinux.org news feed.</span> -109: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">news</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">get</span>( <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>( <span class="ruby-identifier">uri</span> ) ) ) -110: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to retrieve news feed #{uri}."</span> ) -111: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -112: <span class="ruby-keyword kw">end</span> -113: -114: <span class="ruby-comment cmt"># display the feeds.</span> -115: <span class="ruby-identifier">rss</span> = <span class="ruby-keyword kw">nil</span> -116: <span class="ruby-keyword kw">begin</span> -117: <span class="ruby-identifier">rss</span> = <span class="ruby-constant">RSS</span><span class="ruby-operator">::</span><span class="ruby-constant">Parser</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">news</span>, <span class="ruby-keyword kw">false</span>) -118: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">RSS</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span> -119: <span class="ruby-keyword kw">end</span> -120: -121: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">rss</span>.<span class="ruby-identifier">nil?</span> ) -122: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to display news feed as feed #{uri} is not RSS 1.0/2.0."</span> ) -123: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -124: <span class="ruby-keyword kw">else</span> -125: <span class="ruby-identifier">newsLog</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"*** #{rss.channel.title} ***"</span> -126: -127: <span class="ruby-identifier">rss</span>.<span class="ruby-identifier">items</span>.<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">item</span>, <span class="ruby-identifier">itemCount</span><span class="ruby-operator">|</span> -128: <span class="ruby-identifier">itemCount</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> -129: <span class="ruby-identifier">newsLog</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"#{itemCount} #{item.link} #{item.title}"</span> -130: <span class="ruby-keyword kw">end</span> -131: <span class="ruby-keyword kw">end</span> -132: -133: <span class="ruby-identifier">newsLog</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n"</span> -134: <span class="ruby-identifier">newsLog</span>.<span class="ruby-identifier">close</span> -135: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -136: -137: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtDownloadManager.rb, line 95</span> + 95: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieveNewsFeed</span>( <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">cleanLog</span> = <span class="ruby-value str">"false"</span> ) + 96: <span class="ruby-identifier">require</span> <span class="ruby-value str">'net/http'</span> + 97: <span class="ruby-identifier">require</span> <span class="ruby-value str">'uri'</span> + 98: <span class="ruby-identifier">require</span> <span class="ruby-value str">'rss/1.0'</span> + 99: <span class="ruby-identifier">require</span> <span class="ruby-value str">'rss/2.0'</span> +100: <span class="ruby-identifier">newsLog</span> = <span class="ruby-value str">""</span> +101: +102: <span class="ruby-comment cmt"># ensure we have our news logfile.</span> +103: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">cleanLog</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"true"</span> ) +104: <span class="ruby-identifier">newsLog</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">$ABTNEWS_LOG</span>, <span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">WRONLY</span><span class="ruby-operator">|</span><span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">TRUNC</span><span class="ruby-operator">|</span><span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">CREAT</span>, <span class="ruby-value">644</span> ) +105: <span class="ruby-keyword kw">else</span> +106: <span class="ruby-identifier">newsLog</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">$ABTNEWS_LOG</span>, <span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">WRONLY</span><span class="ruby-operator">|</span><span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">APPEND</span><span class="ruby-operator">|</span><span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">CREAT</span>, <span class="ruby-value">644</span> ) +107: <span class="ruby-keyword kw">end</span> +108: +109: <span class="ruby-comment cmt"># pick up the abtlinux.org news feed.</span> +110: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">news</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">get</span>( <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>( <span class="ruby-identifier">uri</span> ) ) ) +111: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to retrieve news feed #{uri}."</span> ) +112: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +113: <span class="ruby-keyword kw">end</span> +114: +115: <span class="ruby-comment cmt"># display the feeds.</span> +116: <span class="ruby-identifier">rss</span> = <span class="ruby-keyword kw">nil</span> +117: <span class="ruby-keyword kw">begin</span> +118: <span class="ruby-identifier">rss</span> = <span class="ruby-constant">RSS</span><span class="ruby-operator">::</span><span class="ruby-constant">Parser</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">news</span>, <span class="ruby-keyword kw">false</span>) +119: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">RSS</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span> +120: <span class="ruby-keyword kw">end</span> +121: +122: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">rss</span>.<span class="ruby-identifier">nil?</span> ) +123: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to display news feed as feed #{uri} is not RSS 1.0/2.0."</span> ) +124: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +125: <span class="ruby-keyword kw">else</span> +126: <span class="ruby-identifier">newsLog</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"*** #{rss.channel.title} ***"</span> +127: +128: <span class="ruby-identifier">rss</span>.<span class="ruby-identifier">items</span>.<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">item</span>, <span class="ruby-identifier">itemCount</span><span class="ruby-operator">|</span> +129: <span class="ruby-identifier">itemCount</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> +130: <span class="ruby-identifier">newsLog</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"#{itemCount} #{item.link} #{item.title}"</span> +131: <span class="ruby-keyword kw">end</span> +132: <span class="ruby-keyword kw">end</span> +133: +134: <span class="ruby-identifier">newsLog</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n"</span> +135: <span class="ruby-identifier">newsLog</span>.<span class="ruby-identifier">close</span> +136: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +137: +138: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -262,13 +262,14 @@ 63: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> 64: <span class="ruby-keyword kw">end</span> 65: -66: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">systemMgr</span>.<span class="ruby-identifier">runSystemCall</span>( <span class="ruby-value str">"cd "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">destination</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"; wget "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">package</span>.<span class="ruby-identifier">srcUrl</span> ) ) -67: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-value str">"Download completed for "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">packageName</span> ) -68: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -69: <span class="ruby-keyword kw">end</span> -70: -71: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-comment cmt"># download failed.</span> -72: <span class="ruby-keyword kw">end</span> +66: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>( <span class="ruby-identifier">destination</span> ) +67: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">systemMgr</span>.<span class="ruby-identifier">runSystemCall</span>( <span class="ruby-node">"wget #{package.srcUrl}"</span> ) ) +68: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-value str">"Download completed for "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">packageName</span> ) +69: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +70: <span class="ruby-keyword kw">end</span> +71: +72: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-comment cmt"># download failed.</span> +73: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -294,9 +295,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000014_source')" id="l_M000014_source">show source</a> ]</p> <div id="M000014_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtDownloadManager.rb, line 82</span> -82: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrievePackageTree</span>( <span class="ruby-identifier">packageTreeName</span> ) -83: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtDownloadManager.rb, line 83</span> +83: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrievePackageTree</span>( <span class="ruby-identifier">packageTreeName</span> ) +84: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -321,9 +322,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000016_source')" id="l_M000016_source">show source</a> ]</p> <div id="M000016_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtDownloadManager.rb, line 147</span> -147: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">updatePackage</span> -148: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtDownloadManager.rb, line 148</span> +148: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">updatePackage</span> +149: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -345,9 +346,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000017_source')" id="l_M000017_source">show source</a> ]</p> <div id="M000017_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtDownloadManager.rb, line 156</span> -156: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">updatePackageTree</span> -157: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtDownloadManager.rb, line 157</span> +157: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">updatePackageTree</span> +158: <span class="ruby-keyword kw">end</span> </pre> </div> </div> Modified: src/trunk/doc/classes/AbtPackage.html =================================================================== --- src/trunk/doc/classes/AbtPackage.html 2006-12-06 20:13:56 UTC (rev 260) +++ src/trunk/doc/classes/AbtPackage.html 2006-12-06 20:14:38 UTC (rev 261) @@ -319,25 +319,25 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000025_source')" id="l_M000025_source">show source</a> ]</p> <div id="M000025_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackage.rb, line 150</span> -150: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>( <span class="ruby-identifier">data</span> ) -151: <span class="ruby-ivar">@name</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'name'</span>] -152: <span class="ruby-ivar">@execName</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'execName'</span>] -153: <span class="ruby-ivar">@version</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'version'</span>] -154: <span class="ruby-ivar">@srcDir</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'srcDir'</span>] -155: <span class="ruby-ivar">@homepage</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'homepage'</span>] -156: <span class="ruby-ivar">@srcUrl</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'srcUrl'</span>] -157: <span class="ruby-ivar">@dependsOn</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'dependsOn'</span>] -158: <span class="ruby-ivar">@reliesOn</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'reliesOn'</span>] -159: <span class="ruby-ivar">@optionalDO</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'optionalDO'</span>] -160: <span class="ruby-ivar">@optionalRO</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'optionalRO'</span>] -161: <span class="ruby-ivar">@hashCheck</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'hashCheck'</span>] -162: <span class="ruby-ivar">@patches</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'patches'</span>] -163: <span class="ruby-ivar">@patchesHashCheck</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'patchesHashCheck'</span>] -164: <span class="ruby-ivar">@mirrorPath</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'mirrorPath'</span>] -165: <span class="ruby-ivar">@license</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'license'</span>] -166: <span class="ruby-ivar">@description</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'description'</span>] -167: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 151</span> +151: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>( <span class="ruby-identifier">data</span> ) +152: <span class="ruby-ivar">@name</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'name'</span>] +153: <span class="ruby-ivar">@execName</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'execName'</span>] +154: <span class="ruby-ivar">@version</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'version'</span>] +155: <span class="ruby-ivar">@srcDir</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'srcDir'</span>] +156: <span class="ruby-ivar">@homepage</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'homepage'</span>] +157: <span class="ruby-ivar">@srcUrl</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'srcUrl'</span>] +158: <span class="ruby-ivar">@dependsOn</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'dependsOn'</span>] +159: <span class="ruby-ivar">@reliesOn</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'reliesOn'</span>] +160: <span class="ruby-ivar">@optionalDO</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'optionalDO'</span>] +161: <span class="ruby-ivar">@optionalRO</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'optionalRO'</span>] +162: <span class="ruby-ivar">@hashCheck</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'hashCheck'</span>] +163: <span class="ruby-ivar">@patches</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'patches'</span>] +164: <span class="ruby-ivar">@patchesHashCheck</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'patchesHashCheck'</span>] +165: <span class="ruby-ivar">@mirrorPath</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'mirrorPath'</span>] +166: <span class="ruby-ivar">@license</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'license'</span>] +167: <span class="ruby-ivar">@description</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value str">'description'</span>] +168: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -361,9 +361,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000029_source')" id="l_M000029_source">show source</a> ]</p> <div id="M000029_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackage.rb, line 251</span> -251: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build</span> -252: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 269</span> +269: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build</span> +270: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -390,21 +390,38 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000028_source')" id="l_M000028_source">show source</a> ]</p> <div id="M000028_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackage.rb, line 231</span> -231: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">configure</span> -232: <span class="ruby-identifier">systemMgr</span> = <span class="ruby-constant">AbtSystemManager</span>.<span class="ruby-identifier">new</span> -233: <span class="ruby-identifier">buildSite</span> = <span class="ruby-node">"#{$BUILD_LOCATION}/#{@srcDir}"</span> -234: -235: <span class="ruby-comment cmt"># TODO: this should not use tee, but in wrapper deal with stdout to file.</span> -236: <span class="ruby-comment cmt"># also need to expand directory with @srcDir/@srcDir.configure.</span> -237: <span class="ruby-identifier">command</span> = <span class="ruby-node">"cd #{buildSite}; ./configure --prefix=#{$DEFAULT_PREFIX} | tee #{$PACKAGE_INSTALLED}/{@srcDir}.configure"</span> -238: -239: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">systemMgr</span>.<span class="ruby-identifier">runSystemCall</span>( <span class="ruby-identifier">command</span> ) ) -240: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -241: <span class="ruby-keyword kw">end</span> -242: -243: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -244: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 232</span> +232: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">configure</span> +233: <span class="ruby-identifier">systemMgr</span> = <span class="ruby-constant">AbtSystemManager</span>.<span class="ruby-identifier">new</span> +234: <span class="ruby-identifier">buildSite</span> = <span class="ruby-node">"#{$BUILD_LOCATION}/#{@srcDir}"</span> +235: +236: <span class="ruby-comment cmt"># TODO: this should not use tee, but in wrapper deal with stdout to file.</span> +237: <span class="ruby-comment cmt"># also need to expand directory with @srcDir/@srcDir.configure.</span> +238: <span class="ruby-comment cmt">#command = "./configure --prefix=#{$DEFAULT_PREFIX} | tee #{$PACKAGE_INSTALLED}/{@srcDir}.configure"</span> +239: <span class="ruby-identifier">command</span> = <span class="ruby-node">"./configure --prefix=#{$DEFAULT_PREFIX}"</span> +240: +241: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>( <span class="ruby-identifier">buildSite</span> ) +242: <span class="ruby-identifier">stdin</span>, <span class="ruby-identifier">stdout</span>, <span class="ruby-identifier">stderr</span> = <span class="ruby-constant">Open3</span>.<span class="ruby-identifier">popen3</span>( <span class="ruby-identifier">command</span> ) +243: +244: <span class="ruby-comment cmt"># check for errors.</span> +245: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">stderr</span>.<span class="ruby-identifier">eof</span> ) +246: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"DEBUG: [AbtPackage.configure] - stderr:"</span> +247: <span class="ruby-identifier">puts</span> <span class="ruby-identifier">stderr</span>.<span class="ruby-identifier">read</span> +248: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +249: <span class="ruby-keyword kw">else</span> +250: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"DEBUG: [AbtPackage.configure] - nothing in stderr."</span> +251: <span class="ruby-keyword kw">end</span> +252: +253: <span class="ruby-comment cmt"># check for output.</span> +254: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">stdout</span>.<span class="ruby-identifier">eof</span> ) +255: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"DEBUG: [AbtPackage.configure] - stdout:"</span> +256: <span class="ruby-identifier">puts</span> <span class="ruby-identifier">stdout</span>.<span class="ruby-identifier">read</span> +257: <span class="ruby-keyword kw">else</span> +258: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"DEBUG: [AbtPackage.configure] - nothing in stdout."</span> +259: <span class="ruby-keyword kw">end</span> +260: +261: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +262: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -427,27 +444,27 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000026_source')" id="l_M000026_source">show source</a> ]</p> <div id="M000026_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackage.rb, line 174</span> -174: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">details</span> -175: <span class="ruby-keyword kw">return</span> { -176: <span class="ruby-value str">"Package name"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@name</span>, -177: <span class="ruby-value str">"Executable"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@execName</span>, -178: <span class="ruby-value str">"Version"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@version</span>, -179: <span class="ruby-value str">"Source location"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@srcDir</span>, -180: <span class="ruby-value str">"Homepage"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@homepage</span>, -181: <span class="ruby-value str">"Source uri"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@srcUrl</span>, -182: <span class="ruby-value str">"Depends On"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@dependsOn</span>, -183: <span class="ruby-value str">"Relies On"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@reliesOn</span>, -184: <span class="ruby-value str">"Optional DO"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@optionalDO</span>, -185: <span class="ruby-value str">"Optional RO"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@optionalRO</span>, -186: <span class="ruby-value str">"Security hash"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@hashCheck</span>, -187: <span class="ruby-value str">"Patches"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@patches</span>, -188: <span class="ruby-value str">"Patches hash"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@patchesHashCheck</span>, -189: <span class="ruby-value str">"Mirror"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@mirrorPath</span>, -190: <span class="ruby-value str">"License"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@license</span>, -191: <span class="ruby-value str">"Description"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@description</span> -192: } -193: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 175</span> +175: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">details</span> +176: <span class="ruby-keyword kw">return</span> { +177: <span class="ruby-value str">"Package name"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@name</span>, +178: <span class="ruby-value str">"Executable"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@execName</span>, +179: <span class="ruby-value str">"Version"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@version</span>, +180: <span class="ruby-value str">"Source location"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@srcDir</span>, +181: <span class="ruby-value str">"Homepage"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@homepage</span>, +182: <span class="ruby-value str">"Source uri"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@srcUrl</span>, +183: <span class="ruby-value str">"Depends On"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@dependsOn</span>, +184: <span class="ruby-value str">"Relies On"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@reliesOn</span>, +185: <span class="ruby-value str">"Optional DO"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@optionalDO</span>, +186: <span class="ruby-value str">"Optional RO"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@optionalRO</span>, +187: <span class="ruby-value str">"Security hash"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@hashCheck</span>, +188: <span class="ruby-value str">"Patches"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@patches</span>, +189: <span class="ruby-value str">"Patches hash"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@patchesHashCheck</span>, +190: <span class="ruby-value str">"Mirror"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@mirrorPath</span>, +191: <span class="ruby-value str">"License"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@license</span>, +192: <span class="ruby-value str">"Description"</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@description</span> +193: } +194: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -469,9 +486,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000031_source')" id="l_M000031_source">show source</a> ]</p> <div id="M000031_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackage.rb, line 268</span> -268: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">install</span> -269: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 286</span> +286: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">install</span> +287: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -494,9 +511,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000032_source')" id="l_M000032_source">show source</a> ]</p> <div id="M000032_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackage.rb, line 276</span> -276: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post</span> -277: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 294</span> +294: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post</span> +295: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -519,27 +536,27 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000027_source')" id="l_M000027_source">show source</a> ]</p> <div id="M000027_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackage.rb, line 201</span> -201: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pre</span> -202: <span class="ruby-identifier">downloader</span> = <span class="ruby-constant">AbtDownloadManager</span>.<span class="ruby-identifier">new</span> -203: -204: <span class="ruby-comment cmt"># download sources.</span> -205: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">downloader</span>.<span class="ruby-identifier">retrievePackageSource</span>( <span class="ruby-ivar">@name</span>.<span class="ruby-identifier">downcase</span>, <span class="ruby-identifier">$SOURCES_REPOSITORY</span> ) ) -206: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -207: <span class="ruby-keyword kw">end</span> -208: -209: <span class="ruby-comment cmt"># unpack sources.</span> -210: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">unpackSources</span> ) -211: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -212: <span class="ruby-keyword kw">end</span> -213: -214: <span class="ruby-comment cmt"># TODO: create_group?</span> -215: <span class="ruby-comment cmt"># TODO: create_user?</span> -216: <span class="ruby-comment cmt"># TODO: retrieve patches?</span> -217: <span class="ruby-comment cmt"># TODO: apply patches?</span> -218: -219: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -220: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 202</span> +202: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pre</span> +203: <span class="ruby-identifier">downloader</span> = <span class="ruby-constant">AbtDownloadManager</span>.<span class="ruby-identifier">new</span> +204: +205: <span class="ruby-comment cmt"># download sources.</span> +206: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">downloader</span>.<span class="ruby-identifier">retrievePackageSource</span>( <span class="ruby-ivar">@name</span>.<span class="ruby-identifier">downcase</span>, <span class="ruby-identifier">$SOURCES_REPOSITORY</span> ) ) +207: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +208: <span class="ruby-keyword kw">end</span> +209: +210: <span class="ruby-comment cmt"># unpack sources.</span> +211: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">unpackSources</span> ) +212: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +213: <span class="ruby-keyword kw">end</span> +214: +215: <span class="ruby-comment cmt"># TODO: create_group?</span> +216: <span class="ruby-comment cmt"># TODO: create_user?</span> +217: <span class="ruby-comment cmt"># TODO: retrieve patches?</span> +218: <span class="ruby-comment cmt"># TODO: apply patches?</span> +219: +220: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +221: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -563,9 +580,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000030_source')" id="l_M000030_source">show source</a> ]</p> <div id="M000030_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackage.rb, line 260</span> -260: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">preinstall</span> -261: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 278</span> +278: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">preinstall</span> +279: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -587,22 +604,22 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000033_source')" id="l_M000033_source">show source</a> ]</p> <div id="M000033_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackage.rb, line 284</span> -284: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">removeBuild</span> -285: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">$REMOVE_BUILD_SOURCES</span> ) -286: <span class="ruby-identifier">buildSourcesLocation</span> = <span class="ruby-node">"#{$BUILD_LOCATION}/#{srcDir}"</span> -287: -288: <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">buildSourcesLocation</span> ) ) -289: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -290: <span class="ruby-keyword kw">end</span> -291: -292: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span> <span class="ruby-identifier">buildSourcesLocation</span>, <span class="ruby-identifier">:verbose</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">true</span> ) -293: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -294: <span class="ruby-keyword kw">end</span> -295: <span class="ruby-keyword kw">end</span> -296: -297: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -298: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 302</span> +302: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">removeBuild</span> +303: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">$REMOVE_BUILD_SOURCES</span> ) +304: <span class="ruby-identifier">buildSourcesLocation</span> = <span class="ruby-node">"#{$BUILD_LOCATION}/#{srcDir}"</span> +305: +306: <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">buildSourcesLocation</span> ) ) +307: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +308: <span class="ruby-keyword kw">end</span> +309: +310: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span> <span class="ruby-identifier">buildSourcesLocation</span>, <span class="ruby-identifier">:verbose</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">true</span> ) +311: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +312: <span class="ruby-keyword kw">end</span> +313: <span class="ruby-keyword kw">end</span> +314: +315: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +316: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -671,12 +688,13 @@ 81: <span class="ruby-comment cmt">#logger = AbtLogManager.new</span> 82: <span class="ruby-comment cmt">#logger.logToJournal( "DEBUG: unpack tool will be '#{unpackTool}'." )</span> 83: -84: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">systemMgr</span>.<span class="ruby-identifier">runSystemCall</span>( <span class="ruby-node">"cd #{$BUILD_LOCATION}; #{unpackTool} #{sourcesToUnpack}"</span> ) ) -85: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -86: <span class="ruby-keyword kw">end</span> -87: -88: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -89: <span class="ruby-keyword kw">end</span> +84: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>( <span class="ruby-identifier">$BUILD_LOCATION</span> ) +85: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">systemMgr</span>.<span class="ruby-identifier">runSystemCall</span>( <span class="ruby-node">"#{unpackTool} #{sourcesToUnpack}"</span> ) ) +86: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +87: <span class="ruby-keyword kw">end</span> +88: +89: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +90: <span class="ruby-keyword kw">end</span> </pre> </div> </div> Modified: src/trunk/doc/created.rid =================================================================== --- src/trunk/doc/created.rid 2006-12-06 20:13:56 UTC (rev 260) +++ src/trunk/doc/created.rid 2006-12-06 20:14:38 UTC (rev 261) @@ -1 +1 @@ -Wed Dec 06 16:19:39 CET 2006 +Wed Dec 06 21:13:14 CET 2006 Modified: src/trunk/doc/files/AbtDownloadManager_rb.html =================================================================== --- src/trunk/doc/files/AbtDownloadManager_rb.html 2006-12-06 20:13:56 UTC (rev 260) +++ src/trunk/doc/files/AbtDownloadManager_rb.html 2006-12-06 20:14:38 UTC (rev 261) @@ -63,7 +63,7 @@ </tr> <tr> <td>Modified:</td> - <td>Sun Dec 03 12:16:35 CET 2006</td> + <td>Wed Dec 06 21:13:10 CET 2006</td> </tr> </table> </td></tr> Modified: src/trunk/doc/files/AbtPackage_rb.html =================================================================== --- src/trunk/doc/files/AbtPackage_rb.html 2006-12-06 20:13:56 UTC (rev 260) +++ src/trunk/doc/files/AbtPackage_rb.html 2006-12-06 20:14:38 UTC (rev 261) @@ -63,7 +63,7 @@ </tr> <tr> <td>Modified:</td> - <td>Sun Dec 03 14:00:29 CET 2006</td> + <td>Wed Dec 06 21:13:10 CET 2006</td> </tr> </table> </td></tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-12-06 20:30:24
|
Revision: 260 http://svn.sourceforge.net/abtlinux/?rev=260&view=rev Author: eschabell Date: 2006-12-06 12:13:56 -0800 (Wed, 06 Dec 2006) Log Message: ----------- First attempts at using open3, with thanks to Bas van Gils for some research into this. Some initial code, not yet finished has been added here. Modified Paths: -------------- src/trunk/AbtPackage.rb src/trunk/abt.rb Modified: src/trunk/AbtPackage.rb =================================================================== --- src/trunk/AbtPackage.rb 2006-12-06 19:52:18 UTC (rev 259) +++ src/trunk/AbtPackage.rb 2006-12-06 20:13:56 UTC (rev 260) @@ -235,13 +235,29 @@ # 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" + #command = "./configure --prefix=#{$DEFAULT_PREFIX} | tee #{$PACKAGE_INSTALLED}/{@srcDir}.configure" + command = "./configure --prefix=#{$DEFAULT_PREFIX}" Dir.chdir( buildSite ) - if ( !systemMgr.runSystemCall( command ) ) + stdin, stdout, stderr = Open3.popen3( command ) + + # check for errors. + if ( !stderr.eof ) + puts "DEBUG: [AbtPackage.configure] - stderr:" + puts stderr.read return false + else + puts "DEBUG: [AbtPackage.configure] - nothing in stderr." end - + + # check for output. + if ( !stdout.eof ) + puts "DEBUG: [AbtPackage.configure] - stdout:" + puts stdout.read + else + puts "DEBUG: [AbtPackage.configure] - nothing in stdout." + end + return true end Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-12-06 19:52:18 UTC (rev 259) +++ src/trunk/abt.rb 2006-12-06 20:13:56 UTC (rev 260) @@ -33,6 +33,7 @@ require 'AbtSystemManager' require 'AbtUsage' require 'fileutils' +require 'open3' ## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-12-06 19:52:18
|
Revision: 259 http://svn.sourceforge.net/abtlinux/?rev=259&view=rev Author: eschabell Date: 2006-12-06 11:52:18 -0800 (Wed, 06 Dec 2006) Log Message: ----------- Migrated 'cd' calls out of system calls. Modified Paths: -------------- src/trunk/AbtDownloadManager.rb src/trunk/AbtPackage.rb Modified: src/trunk/AbtDownloadManager.rb =================================================================== --- src/trunk/AbtDownloadManager.rb 2006-12-06 19:47:46 UTC (rev 258) +++ src/trunk/AbtDownloadManager.rb 2006-12-06 19:52:18 UTC (rev 259) @@ -63,7 +63,8 @@ return true end - if ( systemMgr.runSystemCall( "cd " + destination + "; wget " + package.srcUrl ) ) + Dir.chdir( destination ) + if ( systemMgr.runSystemCall( "wget #{package.srcUrl}" ) ) logger.logToJournal( "Download completed for " + packageName ) return true end Modified: src/trunk/AbtPackage.rb =================================================================== --- src/trunk/AbtPackage.rb 2006-12-06 19:47:46 UTC (rev 258) +++ src/trunk/AbtPackage.rb 2006-12-06 19:52:18 UTC (rev 259) @@ -81,7 +81,8 @@ #logger = AbtLogManager.new #logger.logToJournal( "DEBUG: unpack tool will be '#{unpackTool}'." ) - if ( !systemMgr.runSystemCall( "cd #{$BUILD_LOCATION}; #{unpackTool} #{sourcesToUnpack}" ) ) + Dir.chdir( $BUILD_LOCATION ) + if ( !systemMgr.runSystemCall( "#{unpackTool} #{sourcesToUnpack}" ) ) return false end @@ -234,8 +235,9 @@ # 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" + command = "./configure --prefix=#{$DEFAULT_PREFIX} | tee #{$PACKAGE_INSTALLED}/{@srcDir}.configure" + Dir.chdir( buildSite ) 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-06 19:47:54
|
Revision: 258 http://svn.sourceforge.net/abtlinux/?rev=258&view=rev Author: eschabell Date: 2006-12-06 11:47:46 -0800 (Wed, 06 Dec 2006) Log Message: ----------- Modified sourceforge default url to a working one for my test packages. Modified Paths: -------------- src/trunk/abtconfig.rb Modified: src/trunk/abtconfig.rb =================================================================== --- src/trunk/abtconfig.rb 2006-12-06 15:21:00 UTC (rev 257) +++ src/trunk/abtconfig.rb 2006-12-06 19:47:46 UTC (rev 258) @@ -60,4 +60,5 @@ $KDE_URL = "ftp://ftp.kde.org/pub/kde" $KERNEL_URL = "ftp://ftp.kernel.org" $SOURCEFORGE_URL = "http://osdn.dl.sourceforge.net/sourceforge" +$SOURCEFORGE_URL = "http://belnet.dl.sourceforge.net/sourceforge" $XFREE86_URL = "ftp://ftp.xfree86.org/pub/XFree86" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-12-06 15:21:01
|
Revision: 257 http://svn.sourceforge.net/abtlinux/?rev=257&view=rev Author: eschabell Date: 2006-12-06 07:21:00 -0800 (Wed, 06 Dec 2006) Log Message: ----------- Regenerated api docs. Modified Paths: -------------- src/trunk/doc/classes/AbtLogManager.html src/trunk/doc/created.rid src/trunk/doc/files/AbtLogManager_rb.html Modified: src/trunk/doc/classes/AbtLogManager.html =================================================================== --- src/trunk/doc/classes/AbtLogManager.html 2006-12-06 15:20:13 UTC (rev 256) +++ src/trunk/doc/classes/AbtLogManager.html 2006-12-06 15:21:00 UTC (rev 257) @@ -151,29 +151,15 @@ <pre> <span class="ruby-comment cmt"># File AbtLogManager.rb, line 57</span> 57: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> -58: <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">$ABT_LOGS</span> ) ) -59: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>( <span class="ruby-identifier">$ABT_LOGS</span> ) -60: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Created directory: #{$ABT_LOGS}."</span> ) -61: <span class="ruby-keyword kw">end</span> -62: -63: <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">$ABT_CACHES</span> ) ) -64: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>( <span class="ruby-identifier">$ABT_CACHES</span> ) -65: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Created directory: #{$ABT_CACHES}."</span> ) -66: <span class="ruby-keyword kw">end</span> -67: -68: <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">$BUILD_LOCATION</span> ) ) -69: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>( <span class="ruby-identifier">$BUILD_LOCATION</span> ) -70: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Created directory: #{$BUILD_LOCATION}."</span> ) -71: <span class="ruby-keyword kw">end</span> -72: <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">$PACKAGE_INSTALLED</span> ) ) -73: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>( <span class="ruby-identifier">$PACKAGE_INSTALLED</span> ) -74: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Created directory: #{$PACKAGE_INSTALLED}."</span> ) -75: <span class="ruby-keyword kw">end</span> -76: <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">$SOURCES_REPOSITORY</span> ) ) -77: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>( <span class="ruby-identifier">$SOURCES_REPOSITORY</span> ) -78: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Created directory: #{$SOURCES_REPOSITORY}."</span> ) -79: <span class="ruby-keyword kw">end</span> -80: <span class="ruby-keyword kw">end</span> +58: [<span class="ruby-identifier">$ABT_LOGS</span>, <span class="ruby-identifier">$ABT_CACHES</span>, <span class="ruby-identifier">$BUILD_LOCATION</span>, <span class="ruby-identifier">$PACKAGE_INSTALLED</span>, +59: <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> +60: +61: <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> ) ) +62: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>( <span class="ruby-identifier">dir</span> ) +63: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Created directory: #{dir}."</span> ) +64: <span class="ruby-keyword kw">end</span> +65: } +66: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -200,9 +186,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000065_source')" id="l_M000065_source">show source</a> ]</p> <div id="M000065_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtLogManager.rb, line 115</span> -115: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cachePackage</span>( <span class="ruby-identifier">package</span> ) -116: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtLogManager.rb, line 101</span> +101: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cachePackage</span>( <span class="ruby-identifier">package</span> ) +102: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -228,9 +214,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000064_source')" id="l_M000064_source">show source</a> ]</p> <div id="M000064_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtLogManager.rb, line 103</span> -103: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">logPackageBuild</span>( <span class="ruby-identifier">package</span> ) -104: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtLogManager.rb, line 89</span> +89: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">logPackageBuild</span>( <span class="ruby-identifier">package</span> ) +90: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -256,9 +242,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000063_source')" id="l_M000063_source">show source</a> ]</p> <div id="M000063_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtLogManager.rb, line 91</span> -91: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">logPackageInstall</span>( <span class="ruby-identifier">package</span> ) -92: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtLogManager.rb, line 77</span> +77: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">logPackageInstall</span>( <span class="ruby-identifier">package</span> ) +78: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -283,16 +269,16 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000066_source')" id="l_M000066_source">show source</a> ]</p> <div id="M000066_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtLogManager.rb, line 126</span> -126: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">logToJournal</span>( <span class="ruby-identifier">message</span> ) -127: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">log</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">$JOURNAL</span>, <span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">WRONLY</span><span class="ruby-operator">|</span><span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">APPEND</span><span class="ruby-operator">|</span><span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">CREAT</span>, <span class="ruby-value">0644</span> ) ) -128: <span class="ruby-identifier">log</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"#{$TIMESTAMP} : #{message}"</span> -129: <span class="ruby-identifier">log</span>.<span class="ruby-identifier">close</span> -130: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -131: <span class="ruby-keyword kw">end</span> -132: -133: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -134: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtLogManager.rb, line 112</span> +112: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">logToJournal</span>( <span class="ruby-identifier">message</span> ) +113: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">log</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">$JOURNAL</span>, <span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">WRONLY</span><span class="ruby-operator">|</span><span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">APPEND</span><span class="ruby-operator">|</span><span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">CREAT</span>, <span class="ruby-value">0644</span> ) ) +114: <span class="ruby-identifier">log</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"#{$TIMESTAMP} : #{message}"</span> +115: <span class="ruby-identifier">log</span>.<span class="ruby-identifier">close</span> +116: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +117: <span class="ruby-keyword kw">end</span> +118: +119: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +120: <span class="ruby-keyword kw">end</span> </pre> </div> </div> Modified: src/trunk/doc/created.rid =================================================================== --- src/trunk/doc/created.rid 2006-12-06 15:20:13 UTC (rev 256) +++ src/trunk/doc/created.rid 2006-12-06 15:21:00 UTC (rev 257) @@ -1 +1 @@ -Sun Dec 03 14:01:55 CET 2006 +Wed Dec 06 16:19:39 CET 2006 Modified: src/trunk/doc/files/AbtLogManager_rb.html =================================================================== --- src/trunk/doc/files/AbtLogManager_rb.html 2006-12-06 15:20:13 UTC (rev 256) +++ src/trunk/doc/files/AbtLogManager_rb.html 2006-12-06 15:21:00 UTC (rev 257) @@ -63,7 +63,7 @@ </tr> <tr> <td>Modified:</td> - <td>Sun Dec 03 14:00:29 CET 2006</td> + <td>Wed Dec 06 16:19:34 CET 2006</td> </tr> </table> </td></tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-12-06 15:20:13
|
Revision: 256 http://svn.sourceforge.net/abtlinux/?rev=256&view=rev Author: eschabell Date: 2006-12-06 07:20:13 -0800 (Wed, 06 Dec 2006) Log Message: ----------- Patched to shorten initialize to single loop from Bas van Gils. Modified Paths: -------------- src/trunk/AbtLogManager.rb Modified: src/trunk/AbtLogManager.rb =================================================================== --- src/trunk/AbtLogManager.rb 2006-12-03 13:03:21 UTC (rev 255) +++ src/trunk/AbtLogManager.rb 2006-12-06 15:20:13 UTC (rev 256) @@ -55,30 +55,16 @@ # <b>RETURN</b> <i>AbtLogManager</i> - an initialized AbtLogManager object. ## def initialize - if ( !File.directory?( $ABT_LOGS ) ) - FileUtils.mkdir_p( $ABT_LOGS ) - self.logToJournal( "Created directory: #{$ABT_LOGS}." ) - end - - if ( !File.directory?( $ABT_CACHES ) ) - FileUtils.mkdir_p( $ABT_CACHES ) - self.logToJournal( "Created directory: #{$ABT_CACHES}." ) - end - - if ( !File.directory?( $BUILD_LOCATION ) ) - FileUtils.mkdir_p( $BUILD_LOCATION ) - self.logToJournal( "Created directory: #{$BUILD_LOCATION}." ) - end - if ( !File.directory?( $PACKAGE_INSTALLED ) ) - FileUtils.mkdir_p( $PACKAGE_INSTALLED ) - self.logToJournal( "Created directory: #{$PACKAGE_INSTALLED}." ) - end - if ( !File.directory?( $SOURCES_REPOSITORY ) ) - FileUtils.mkdir_p( $SOURCES_REPOSITORY ) - self.logToJournal( "Created directory: #{$SOURCES_REPOSITORY}." ) - end - end - + [$ABT_LOGS, $ABT_CACHES, $BUILD_LOCATION, $PACKAGE_INSTALLED, + $SOURCES_REPOSITORY].each { |dir| + + if ( ! File.directory?( dir ) ) + FileUtils.mkdir_p( dir ) + self.logToJournal( "Created directory: #{dir}." ) + end + } + end + ## # Provides logging of all files installed by given package. Should be called # as part of the install phase of the build. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-12-03 13:03:21
|
Revision: 255 http://svn.sourceforge.net/abtlinux/?rev=255&view=rev Author: eschabell Date: 2006-12-03 05:03:21 -0800 (Sun, 03 Dec 2006) Log Message: ----------- Regenerated api docs. Modified Paths: -------------- 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/AbtSystemManager.html src/trunk/doc/created.rid src/trunk/doc/files/AbtLogManager_rb.html src/trunk/doc/files/AbtPackageManager_rb.html src/trunk/doc/files/AbtPackage_rb.html src/trunk/doc/files/AbtQueueManager_rb.html src/trunk/doc/files/AbtSystemManager_rb.html Modified: src/trunk/doc/classes/AbtLogManager.html =================================================================== --- src/trunk/doc/classes/AbtLogManager.html 2006-12-03 13:00:30 UTC (rev 254) +++ src/trunk/doc/classes/AbtLogManager.html 2006-12-03 13:03:21 UTC (rev 255) @@ -137,7 +137,8 @@ </div> <div class="description"> <p> -Constructor for the <a href="AbtLogManager.html">AbtLogManager</a>. +Constructor for the <a href="AbtLogManager.html">AbtLogManager</a>. It +ensures all needed logs paths are initialized. </p> <p> <b>RETURN</b> <em><a href="AbtLogManager.html">AbtLogManager</a></em> - an @@ -148,12 +149,31 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000062_source')" id="l_M000062_source">show source</a> ]</p> <div id="M000062_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtLogManager.rb, line 55</span> -55: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> -56: <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">$ABT_LOGS</span> ) ) -57: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>( <span class="ruby-identifier">$ABT_LOGS</span> ) <span class="ruby-comment cmt"># initialize logs.</span> -58: <span class="ruby-keyword kw">end</span> -59: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtLogManager.rb, line 57</span> +57: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> +58: <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">$ABT_LOGS</span> ) ) +59: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>( <span class="ruby-identifier">$ABT_LOGS</span> ) +60: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Created directory: #{$ABT_LOGS}."</span> ) +61: <span class="ruby-keyword kw">end</span> +62: +63: <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">$ABT_CACHES</span> ) ) +64: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>( <span class="ruby-identifier">$ABT_CACHES</span> ) +65: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Created directory: #{$ABT_CACHES}."</span> ) +66: <span class="ruby-keyword kw">end</span> +67: +68: <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">$BUILD_LOCATION</span> ) ) +69: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>( <span class="ruby-identifier">$BUILD_LOCATION</span> ) +70: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Created directory: #{$BUILD_LOCATION}."</span> ) +71: <span class="ruby-keyword kw">end</span> +72: <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">$PACKAGE_INSTALLED</span> ) ) +73: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>( <span class="ruby-identifier">$PACKAGE_INSTALLED</span> ) +74: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Created directory: #{$PACKAGE_INSTALLED}."</span> ) +75: <span class="ruby-keyword kw">end</span> +76: <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">$SOURCES_REPOSITORY</span> ) ) +77: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>( <span class="ruby-identifier">$SOURCES_REPOSITORY</span> ) +78: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Created directory: #{$SOURCES_REPOSITORY}."</span> ) +79: <span class="ruby-keyword kw">end</span> +80: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -180,9 +200,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000065_source')" id="l_M000065_source">show source</a> ]</p> <div id="M000065_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtLogManager.rb, line 94</span> -94: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cachePackage</span>( <span class="ruby-identifier">package</span> ) -95: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtLogManager.rb, line 115</span> +115: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cachePackage</span>( <span class="ruby-identifier">package</span> ) +116: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -208,9 +228,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000064_source')" id="l_M000064_source">show source</a> ]</p> <div id="M000064_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtLogManager.rb, line 82</span> -82: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">logPackageBuild</span>( <span class="ruby-identifier">package</span> ) -83: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtLogManager.rb, line 103</span> +103: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">logPackageBuild</span>( <span class="ruby-identifier">package</span> ) +104: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -236,9 +256,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000063_source')" id="l_M000063_source">show source</a> ]</p> <div id="M000063_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtLogManager.rb, line 70</span> -70: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">logPackageInstall</span>( <span class="ruby-identifier">package</span> ) -71: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtLogManager.rb, line 91</span> +91: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">logPackageInstall</span>( <span class="ruby-identifier">package</span> ) +92: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -263,16 +283,16 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000066_source')" id="l_M000066_source">show source</a> ]</p> <div id="M000066_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtLogManager.rb, line 105</span> -105: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">logToJournal</span>( <span class="ruby-identifier">message</span> ) -106: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">log</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">$JOURNAL</span>, <span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">WRONLY</span><span class="ruby-operator">|</span><span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">APPEND</span><span class="ruby-operator">|</span><span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">CREAT</span>, <span class="ruby-value">0644</span> ) ) -107: <span class="ruby-identifier">log</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"#{$TIMESTAMP} : #{message}"</span> -108: <span class="ruby-identifier">log</span>.<span class="ruby-identifier">close</span> -109: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -110: <span class="ruby-keyword kw">end</span> -111: -112: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -113: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtLogManager.rb, line 126</span> +126: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">logToJournal</span>( <span class="ruby-identifier">message</span> ) +127: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">log</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">$JOURNAL</span>, <span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">WRONLY</span><span class="ruby-operator">|</span><span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">APPEND</span><span class="ruby-operator">|</span><span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">CREAT</span>, <span class="ruby-value">0644</span> ) ) +128: <span class="ruby-identifier">log</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"#{$TIMESTAMP} : #{message}"</span> +129: <span class="ruby-identifier">log</span>.<span class="ruby-identifier">close</span> +130: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +131: <span class="ruby-keyword kw">end</span> +132: +133: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +134: <span class="ruby-keyword kw">end</span> </pre> </div> </div> Modified: src/trunk/doc/classes/AbtPackage.html =================================================================== --- src/trunk/doc/classes/AbtPackage.html 2006-12-03 13:00:30 UTC (rev 254) +++ src/trunk/doc/classes/AbtPackage.html 2006-12-03 13:03:21 UTC (rev 255) @@ -361,9 +361,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000029_source')" id="l_M000029_source">show source</a> ]</p> <div id="M000029_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackage.rb, line 249</span> -249: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build</span> -250: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 251</span> +251: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build</span> +252: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -392,17 +392,19 @@ <pre> <span class="ruby-comment cmt"># File AbtPackage.rb, line 231</span> 231: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">configure</span> -232: <span class="ruby-comment cmt">#logger = AbtLogManager.new</span> -233: <span class="ruby-identifier">buildSite</span> = <span class="ruby-node">"#{$BUILD_LOCATION}/#{@srcDir}"</span> -234: <span class="ruby-comment cmt">#logger.logToJournal( "DEBUG: calling system - cd #{buildSite}; ./configure --prefix=#{$DEFAULT_PREFIX}" )</span> -235: -236: <span class="ruby-comment cmt"># TODO: system call removal?</span> -237: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>( <span class="ruby-node">"cd #{buildSite}; ./configure --prefix=#{$DEFAULT_PREFIX}"</span> ) ) -238: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -239: <span class="ruby-keyword kw">end</span> -240: -241: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -242: <span class="ruby-keyword kw">end</span> +232: <span class="ruby-identifier">systemMgr</span> = <span class="ruby-constant">AbtSystemManager</span>.<span class="ruby-identifier">new</span> +233: <span class="ruby-identifier">buildSite</span> = <span class="ruby-node">"#{$BUILD_LOCATION}/#{@srcDir}"</span> +234: +235: <span class="ruby-comment cmt"># TODO: this should not use tee, but in wrapper deal with stdout to file.</span> +236: <span class="ruby-comment cmt"># also need to expand directory with @srcDir/@srcDir.configure.</span> +237: <span class="ruby-identifier">command</span> = <span class="ruby-node">"cd #{buildSite}; ./configure --prefix=#{$DEFAULT_PREFIX} | tee #{$PACKAGE_INSTALLED}/{@srcDir}.configure"</span> +238: +239: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">systemMgr</span>.<span class="ruby-identifier">runSystemCall</span>( <span class="ruby-identifier">command</span> ) ) +240: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +241: <span class="ruby-keyword kw">end</span> +242: +243: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +244: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -467,9 +469,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000031_source')" id="l_M000031_source">show source</a> ]</p> <div id="M000031_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackage.rb, line 266</span> -266: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">install</span> -267: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 268</span> +268: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">install</span> +269: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -492,9 +494,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000032_source')" id="l_M000032_source">show source</a> ]</p> <div id="M000032_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackage.rb, line 274</span> -274: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post</span> -275: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 276</span> +276: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post</span> +277: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -561,9 +563,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000030_source')" id="l_M000030_source">show source</a> ]</p> <div id="M000030_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackage.rb, line 258</span> -258: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">preinstall</span> -259: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 260</span> +260: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">preinstall</span> +261: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -585,22 +587,22 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000033_source')" id="l_M000033_source">show source</a> ]</p> <div id="M000033_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackage.rb, line 282</span> -282: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">removeBuild</span> -283: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">$REMOVE_BUILD_SOURCES</span> ) -284: <span class="ruby-identifier">buildSourcesLocation</span> = <span class="ruby-node">"#{$BUILD_LOCATION}/#{srcDir}"</span> -285: -286: <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">buildSourcesLocation</span> ) ) -287: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -288: <span class="ruby-keyword kw">end</span> -289: -290: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span> <span class="ruby-identifier">buildSourcesLocation</span>, <span class="ruby-identifier">:verbose</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">true</span> ) -291: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -292: <span class="ruby-keyword kw">end</span> -293: <span class="ruby-keyword kw">end</span> -294: -295: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -296: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackage.rb, line 284</span> +284: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">removeBuild</span> +285: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">$REMOVE_BUILD_SOURCES</span> ) +286: <span class="ruby-identifier">buildSourcesLocation</span> = <span class="ruby-node">"#{$BUILD_LOCATION}/#{srcDir}"</span> +287: +288: <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">buildSourcesLocation</span> ) ) +289: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +290: <span class="ruby-keyword kw">end</span> +291: +292: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span> <span class="ruby-identifier">buildSourcesLocation</span>, <span class="ruby-identifier">:verbose</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">true</span> ) +293: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +294: <span class="ruby-keyword kw">end</span> +295: <span class="ruby-keyword kw">end</span> +296: +297: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +298: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -626,7 +628,7 @@ <span class="ruby-comment cmt"># File AbtPackage.rb, line 39</span> 39: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unpackSources</span> 40: <span class="ruby-identifier">systemMgr</span> = <span class="ruby-constant">AbtSystemManager</span>.<span class="ruby-identifier">new</span> -41: <span class="ruby-identifier">srcFile</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>( <span class="ruby-identifier">srcUrl</span> ) +41: <span class="ruby-identifier">srcFile</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>( <span class="ruby-ivar">@srcUrl</span> ) 42: <span class="ruby-identifier">sourcesToUnpack</span> = <span class="ruby-node">"#{$SOURCES_REPOSITORY}/#{srcFile}"</span> 43: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">""</span> 44: Modified: src/trunk/doc/classes/AbtPackageManager.html =================================================================== --- src/trunk/doc/classes/AbtPackageManager.html 2006-12-03 13:00:30 UTC (rev 254) +++ src/trunk/doc/classes/AbtPackageManager.html 2006-12-03 13:03:21 UTC (rev 255) @@ -182,9 +182,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000045_source')" id="l_M000045_source">show source</a> ]</p> <div id="M000045_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 134</span> -134: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">downgradePackage</span>( <span class="ruby-identifier">package</span>, <span class="ruby-identifier">version</span> ) -135: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 138</span> +138: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">downgradePackage</span>( <span class="ruby-identifier">package</span>, <span class="ruby-identifier">version</span> ) +139: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -210,9 +210,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000046_source')" id="l_M000046_source">show source</a> ]</p> <div id="M000046_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 146</span> -146: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">freezePackage</span>( <span class="ruby-identifier">package</span> ) -147: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 150</span> +150: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">freezePackage</span>( <span class="ruby-identifier">package</span> ) +151: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -241,52 +241,56 @@ 52: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">installPackage</span>( <span class="ruby-identifier">package</span> ) 53: <span class="ruby-identifier">require</span> <span class="ruby-identifier">package</span> 54: <span class="ruby-identifier">sw</span> = <span class="ruby-identifier">eval</span>( <span class="ruby-node">"#{package.capitalize}.new"</span> ) - 55: - 56: <span class="ruby-identifier">queuer</span> = <span class="ruby-constant">AbtQueueManager</span>.<span class="ruby-identifier">new</span> - 57: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">AbtLogManager</span>.<span class="ruby-identifier">new</span> - 58: - 59: <span class="ruby-comment cmt"># get package details.</span> - 60: <span class="ruby-identifier">details</span> = <span class="ruby-identifier">sw</span>.<span class="ruby-identifier">details</span> - 61: - 62: <span class="ruby-comment cmt"># TODO: check deps</span> - 63: - 64: <span class="ruby-comment cmt"># add to install queue.</span> - 65: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">queuer</span>.<span class="ruby-identifier">addPackageToQueue</span>( <span class="ruby-identifier">package</span>, <span class="ruby-value str">"install"</span> ) ) - 66: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to add #{package} to install queue."</span> ) - 67: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> - 68: <span class="ruby-keyword kw">end</span> - 69: - 70: <span class="ruby-comment cmt"># pre section.</span> - 71: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">sw</span>.<span class="ruby-identifier">pre</span> ) - 72: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to process pre-section in the package description of #{package}."</span> ) - 73: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> - 74: <span class="ruby-keyword kw">else</span> - 75: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"DEBUG: finished #{package} pre section."</span> ) - 76: <span class="ruby-keyword kw">end</span> - 77: - 78: <span class="ruby-comment cmt"># configure section.</span> - 79: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">sw</span>.<span class="ruby-identifier">configure</span> ) - 80: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to process configure section in the package description of #{package}."</span> ) - 81: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> - 82: <span class="ruby-keyword kw">else</span> - 83: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"DEBUG: finished #{package} configure section."</span> ) - 84: <span class="ruby-keyword kw">end</span> - 85: - 86: <span class="ruby-comment cmt"># TODO: finish up the following steps per install scenario:</span> - 87: <span class="ruby-comment cmt">#</span> - 88: <span class="ruby-comment cmt"># build section</span> - 89: <span class="ruby-comment cmt"># pre install section</span> - 90: <span class="ruby-comment cmt"># install section</span> - 91: <span class="ruby-comment cmt"># post section</span> - 92: <span class="ruby-comment cmt"># remove build sources.</span> - 93: <span class="ruby-comment cmt">#</span> - 94: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">sw</span>.<span class="ruby-identifier">removeBuild</span> ) - 95: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to remove the build sources for #{package}."</span> ) - 96: <span class="ruby-comment cmt">#return false # commented out as this is not a reason to fail.</span> - 97: <span class="ruby-keyword kw">end</span> - 98: - 99: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -100: <span class="ruby-keyword kw">end</span> + 55: <span class="ruby-identifier">queuer</span> = <span class="ruby-constant">AbtQueueManager</span>.<span class="ruby-identifier">new</span> + 56: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">AbtLogManager</span>.<span class="ruby-identifier">new</span> + 57: + 58: <span class="ruby-comment cmt"># TODO: initialize pkg install directory ($PACKAGE_INSTALLED/@srcDir),</span> + 59: <span class="ruby-comment cmt"># should this fail we have to clean this dir up, move to failure</span> + 60: <span class="ruby-comment cmt"># location? </span> + 61: <span class="ruby-comment cmt"># On success, need to cache contents in cache dir.</span> + 62: + 63: <span class="ruby-comment cmt"># get package details.</span> + 64: <span class="ruby-identifier">details</span> = <span class="ruby-identifier">sw</span>.<span class="ruby-identifier">details</span> + 65: + 66: <span class="ruby-comment cmt"># TODO: check deps</span> + 67: + 68: <span class="ruby-comment cmt"># add to install queue.</span> + 69: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">queuer</span>.<span class="ruby-identifier">addPackageToQueue</span>( <span class="ruby-identifier">package</span>, <span class="ruby-value str">"install"</span> ) ) + 70: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to add #{package} to install queue."</span> ) + 71: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> + 72: <span class="ruby-keyword kw">end</span> + 73: + 74: <span class="ruby-comment cmt"># pre section.</span> + 75: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">sw</span>.<span class="ruby-identifier">pre</span> ) + 76: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to process pre-section in the package description of #{package}."</span> ) + 77: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> + 78: <span class="ruby-keyword kw">else</span> + 79: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"DEBUG: finished #{package} pre section."</span> ) + 80: <span class="ruby-keyword kw">end</span> + 81: + 82: <span class="ruby-comment cmt"># configure section.</span> + 83: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">sw</span>.<span class="ruby-identifier">configure</span> ) + 84: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to process configure section in the package description of #{package}."</span> ) + 85: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> + 86: <span class="ruby-keyword kw">else</span> + 87: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"DEBUG: finished #{package} configure section."</span> ) + 88: <span class="ruby-keyword kw">end</span> + 89: + 90: <span class="ruby-comment cmt"># TODO: finish up the following steps per install scenario:</span> + 91: <span class="ruby-comment cmt">#</span> + 92: <span class="ruby-comment cmt"># build section</span> + 93: <span class="ruby-comment cmt"># pre install section</span> + 94: <span class="ruby-comment cmt"># install section</span> + 95: <span class="ruby-comment cmt"># post section</span> + 96: <span class="ruby-comment cmt"># remove build sources.</span> + 97: <span class="ruby-comment cmt">#</span> + 98: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">sw</span>.<span class="ruby-identifier">removeBuild</span> ) + 99: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to remove the build sources for #{package}."</span> ) +100: <span class="ruby-comment cmt">#return false # commented out as this is not a reason to fail.</span> +101: <span class="ruby-keyword kw">end</span> +102: +103: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +104: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -311,9 +315,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000043_source')" id="l_M000043_source">show source</a> ]</p> <div id="M000043_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 110</span> -110: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reinstallPackage</span>( <span class="ruby-identifier">package</span> ) -111: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 114</span> +114: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reinstallPackage</span>( <span class="ruby-identifier">package</span> ) +115: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -338,9 +342,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000044_source')" id="l_M000044_source">show source</a> ]</p> <div id="M000044_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 121</span> -121: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">removePackage</span>( <span class="ruby-identifier">package</span> ) -122: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 125</span> +125: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">removePackage</span>( <span class="ruby-identifier">package</span> ) +126: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -364,22 +368,22 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000047_source')" id="l_M000047_source">show source</a> ]</p> <div id="M000047_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 156</span> -156: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rootLogin</span>( <span class="ruby-identifier">arguments</span> ) -157: <span class="ruby-identifier">systemMgr</span> = <span class="ruby-constant">AbtSystemManager</span>.<span class="ruby-identifier">new</span> -158: -159: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">Process</span>.<span class="ruby-identifier">uid</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span> ) -160: <span class="ruby-identifier">args</span> = <span class="ruby-value str">""</span> -161: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\nEnter root password:"</span> + <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 160</span> +160: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rootLogin</span>( <span class="ruby-identifier">arguments</span> ) +161: <span class="ruby-identifier">systemMgr</span> = <span class="ruby-constant">AbtSystemManager</span>.<span class="ruby-identifier">new</span> 162: -163: <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">i</span> <span class="ruby-keyword kw">in</span> <span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-constant">ARGV</span>.<span class="ruby-identifier">length</span> -164: <span class="ruby-identifier">args</span> = <span class="ruby-identifier">args</span> <span class="ruby-operator">+</span> <span class="ruby-value str">" "</span> <span class="ruby-operator">+</span> <span class="ruby-constant">ARGV</span>[<span class="ruby-identifier">i</span>] -165: <span class="ruby-keyword kw">end</span> +163: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">Process</span>.<span class="ruby-identifier">uid</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span> ) +164: <span class="ruby-identifier">args</span> = <span class="ruby-value str">""</span> +165: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\nEnter root password:"</span> 166: -167: <span class="ruby-identifier">systemMgr</span>.<span class="ruby-identifier">runSystemCall</span>( <span class="ruby-value str">'su -c "./abt '</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">args</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'" root'</span> ) -168: <span class="ruby-identifier">exit</span> -169: <span class="ruby-keyword kw">end</span> -170: <span class="ruby-keyword kw">end</span> +167: <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">i</span> <span class="ruby-keyword kw">in</span> <span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-constant">ARGV</span>.<span class="ruby-identifier">length</span> +168: <span class="ruby-identifier">args</span> = <span class="ruby-identifier">args</span> <span class="ruby-operator">+</span> <span class="ruby-value str">" "</span> <span class="ruby-operator">+</span> <span class="ruby-constant">ARGV</span>[<span class="ruby-identifier">i</span>] +169: <span class="ruby-keyword kw">end</span> +170: +171: <span class="ruby-identifier">systemMgr</span>.<span class="ruby-identifier">runSystemCall</span>( <span class="ruby-value str">'su -c "./abt '</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">args</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'" root'</span> ) +172: <span class="ruby-identifier">exit</span> +173: <span class="ruby-keyword kw">end</span> +174: <span class="ruby-keyword kw">end</span> </pre> </div> </div> Modified: src/trunk/doc/classes/AbtQueueManager.html =================================================================== --- src/trunk/doc/classes/AbtQueueManager.html 2006-12-03 13:00:30 UTC (rev 254) +++ src/trunk/doc/classes/AbtQueueManager.html 2006-12-03 13:03:21 UTC (rev 255) @@ -147,10 +147,7 @@ <pre> <span class="ruby-comment cmt"># File AbtQueueManager.rb, line 40</span> 40: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> -41: <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">$ABT_LOGS</span> ) ) -42: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>( <span class="ruby-identifier">$ABT_LOGS</span> ) <span class="ruby-comment cmt"># initialize logs.</span> -43: <span class="ruby-keyword kw">end</span> -44: <span class="ruby-keyword kw">end</span> +41: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -178,39 +175,39 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000086_source')" id="l_M000086_source">show source</a> ]</p> <div id="M000086_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtQueueManager.rb, line 57</span> -57: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">addPackageToQueue</span>( <span class="ruby-identifier">package</span>, <span class="ruby-identifier">queue</span> ) -58: <span class="ruby-identifier">queueFile</span> = <span class="ruby-node">"#{$ABT_LOGS}/#{queue}.log"</span> -59: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">AbtLogManager</span>.<span class="ruby-identifier">new</span> -60: -61: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">log</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">queueFile</span>, <span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">WRONLY</span><span class="ruby-operator">|</span><span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">APPEND</span><span class="ruby-operator">|</span><span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">CREAT</span>, <span class="ruby-value">0644</span> ) ) -62: <span class="ruby-comment cmt"># pickup queue contents to ensure no duplicates.</span> -63: <span class="ruby-identifier">checkingQueue</span> = <span class="ruby-constant">IO</span>.<span class="ruby-identifier">readlines</span>( <span class="ruby-identifier">queueFile</span> ) -64: -65: <span class="ruby-comment cmt"># endsure no duplicates.</span> -66: <span class="ruby-identifier">matched</span> = <span class="ruby-keyword kw">false</span> -67: <span class="ruby-identifier">checkingQueue</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">entry</span><span class="ruby-operator">|</span> -68: <span class="ruby-identifier">entryName</span> = <span class="ruby-identifier">entry</span>.<span class="ruby-identifier">split</span>( <span class="ruby-value str">'|'</span> ) -69: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">entryName</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">package</span> ) -70: <span class="ruby-identifier">matched</span> = <span class="ruby-keyword kw">true</span> -71: <span class="ruby-keyword kw">end</span> -72: <span class="ruby-keyword kw">end</span> -73: -74: <span class="ruby-comment cmt"># check if package exists, otherwise add.</span> -75: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">matched</span> ) -76: <span class="ruby-identifier">log</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"#{package}|#{$TIMESTAMP}"</span> -77: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Added #{package} to #{queue} queue."</span> ) -78: <span class="ruby-keyword kw">else</span> -79: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Did not add #{package} to #{queue}, already exists."</span> ) -80: <span class="ruby-keyword kw">end</span> -81: -82: <span class="ruby-identifier">log</span>.<span class="ruby-identifier">close</span> -83: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -84: <span class="ruby-keyword kw">end</span> -85: -86: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to open #{queueFile}."</span> ) -87: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -88: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtQueueManager.rb, line 54</span> +54: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">addPackageToQueue</span>( <span class="ruby-identifier">package</span>, <span class="ruby-identifier">queue</span> ) +55: <span class="ruby-identifier">queueFile</span> = <span class="ruby-node">"#{$ABT_LOGS}/#{queue}.log"</span> +56: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">AbtLogManager</span>.<span class="ruby-identifier">new</span> +57: +58: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">log</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">queueFile</span>, <span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">WRONLY</span><span class="ruby-operator">|</span><span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">APPEND</span><span class="ruby-operator">|</span><span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">CREAT</span>, <span class="ruby-value">0644</span> ) ) +59: <span class="ruby-comment cmt"># pickup queue contents to ensure no duplicates.</span> +60: <span class="ruby-identifier">checkingQueue</span> = <span class="ruby-constant">IO</span>.<span class="ruby-identifier">readlines</span>( <span class="ruby-identifier">queueFile</span> ) +61: +62: <span class="ruby-comment cmt"># endsure no duplicates.</span> +63: <span class="ruby-identifier">matched</span> = <span class="ruby-keyword kw">false</span> +64: <span class="ruby-identifier">checkingQueue</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">entry</span><span class="ruby-operator">|</span> +65: <span class="ruby-identifier">entryName</span> = <span class="ruby-identifier">entry</span>.<span class="ruby-identifier">split</span>( <span class="ruby-value str">'|'</span> ) +66: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">entryName</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">package</span> ) +67: <span class="ruby-identifier">matched</span> = <span class="ruby-keyword kw">true</span> +68: <span class="ruby-keyword kw">end</span> +69: <span class="ruby-keyword kw">end</span> +70: +71: <span class="ruby-comment cmt"># check if package exists, otherwise add.</span> +72: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">matched</span> ) +73: <span class="ruby-identifier">log</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"#{package}|#{$TIMESTAMP}"</span> +74: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Added #{package} to #{queue} queue."</span> ) +75: <span class="ruby-keyword kw">else</span> +76: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Did not add #{package} to #{queue}, already exists."</span> ) +77: <span class="ruby-keyword kw">end</span> +78: +79: <span class="ruby-identifier">log</span>.<span class="ruby-identifier">close</span> +80: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +81: <span class="ruby-keyword kw">end</span> +82: +83: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to open #{queueFile}."</span> ) +84: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +85: <span class="ruby-keyword kw">end</span> </pre> </div> </div> Modified: src/trunk/doc/classes/AbtSystemManager.html =================================================================== --- src/trunk/doc/classes/AbtSystemManager.html 2006-12-03 13:00:30 UTC (rev 254) +++ src/trunk/doc/classes/AbtSystemManager.html 2006-12-03 13:03:21 UTC (rev 255) @@ -263,11 +263,11 @@ <pre> <span class="ruby-comment cmt"># File AbtSystemManager.rb, line 153</span> 153: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">runSystemCall</span>( <span class="ruby-identifier">command</span> ) -154: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>( <span class="ruby-identifier">command</span> ) ) -155: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -156: <span class="ruby-keyword kw">end</span> -157: -158: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +154: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>( <span class="ruby-identifier">command</span> ) ) +155: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +156: <span class="ruby-keyword kw">end</span> +157: +158: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> 159: <span class="ruby-keyword kw">end</span> </pre> </div> Modified: src/trunk/doc/created.rid =================================================================== --- src/trunk/doc/created.rid 2006-12-03 13:00:30 UTC (rev 254) +++ src/trunk/doc/created.rid 2006-12-03 13:03:21 UTC (rev 255) @@ -1 +1 @@ -Sun Dec 03 12:16:40 CET 2006 +Sun Dec 03 14:01:55 CET 2006 Modified: src/trunk/doc/files/AbtLogManager_rb.html =================================================================== --- src/trunk/doc/files/AbtLogManager_rb.html 2006-12-03 13:00:30 UTC (rev 254) +++ src/trunk/doc/files/AbtLogManager_rb.html 2006-12-03 13:03:21 UTC (rev 255) @@ -63,7 +63,7 @@ </tr> <tr> <td>Modified:</td> - <td>Sat Nov 18 16:25:16 CET 2006</td> + <td>Sun Dec 03 14:00:29 CET 2006</td> </tr> </table> </td></tr> Modified: src/trunk/doc/files/AbtPackageManager_rb.html =================================================================== --- src/trunk/doc/files/AbtPackageManager_rb.html 2006-12-03 13:00:30 UTC (rev 254) +++ src/trunk/doc/files/AbtPackageManager_rb.html 2006-12-03 13:03:21 UTC (rev 255) @@ -63,7 +63,7 @@ </tr> <tr> <td>Modified:</td> - <td>Sun Dec 03 12:16:35 CET 2006</td> + <td>Sun Dec 03 14:00:29 CET 2006</td> </tr> </table> </td></tr> Modified: src/trunk/doc/files/AbtPackage_rb.html =================================================================== --- src/trunk/doc/files/AbtPackage_rb.html 2006-12-03 13:00:30 UTC (rev 254) +++ src/trunk/doc/files/AbtPackage_rb.html 2006-12-03 13:03:21 UTC (rev 255) @@ -63,7 +63,7 @@ </tr> <tr> <td>Modified:</td> - <td>Sun Dec 03 12:16:35 CET 2006</td> + <td>Sun Dec 03 14:00:29 CET 2006</td> </tr> </table> </td></tr> Modified: src/trunk/doc/files/AbtQueueManager_rb.html =================================================================== --- src/trunk/doc/files/AbtQueueManager_rb.html 2006-12-03 13:00:30 UTC (rev 254) +++ src/trunk/doc/files/AbtQueueManager_rb.html 2006-12-03 13:03:21 UTC (rev 255) @@ -63,7 +63,7 @@ </tr> <tr> <td>Modified:</td> - <td>Sat Nov 18 20:20:34 CET 2006</td> + <td>Sun Dec 03 14:00:29 CET 2006</td> </tr> </table> </td></tr> Modified: src/trunk/doc/files/AbtSystemManager_rb.html =================================================================== --- src/trunk/doc/files/AbtSystemManager_rb.html 2006-12-03 13:00:30 UTC (rev 254) +++ src/trunk/doc/files/AbtSystemManager_rb.html 2006-12-03 13:03:21 UTC (rev 255) @@ -63,7 +63,7 @@ </tr> <tr> <td>Modified:</td> - <td>Sun Dec 03 12:16:35 CET 2006</td> + <td>Sun Dec 03 14:00:29 CET 2006</td> </tr> </table> </td></tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-12-03 13:00:36
|
Revision: 254 http://svn.sourceforge.net/abtlinux/?rev=254&view=rev Author: eschabell Date: 2006-12-03 05:00:30 -0800 (Sun, 03 Dec 2006) Log Message: ----------- Removed some path checking and directory creation that is no longer needed, is in log manager constructor. Modified Paths: -------------- src/trunk/AbtQueueManager.rb src/trunk/AbtSystemManager.rb src/trunk/abt.rb Modified: src/trunk/AbtQueueManager.rb =================================================================== --- src/trunk/AbtQueueManager.rb 2006-12-03 12:52:04 UTC (rev 253) +++ src/trunk/AbtQueueManager.rb 2006-12-03 13:00:30 UTC (rev 254) @@ -38,9 +38,6 @@ # <b>RETURN</b> <i>AbtQueueManager</i> - an initialized AbtQueueManager object. ## def initialize - if ( !File.directory?( $ABT_LOGS ) ) - FileUtils.mkdir_p( $ABT_LOGS ) # initialize logs. - end end ## Modified: src/trunk/AbtSystemManager.rb =================================================================== --- src/trunk/AbtSystemManager.rb 2006-12-03 12:52:04 UTC (rev 253) +++ src/trunk/AbtSystemManager.rb 2006-12-03 13:00:30 UTC (rev 254) @@ -140,21 +140,21 @@ def setPackageTreeLocation( location ) end - ## + ## # Our in house system call wrapper. Used to control any system calls made in - # abt. Need to sort out tracking of stderr, stdout, stdin with open3? - # Eventually replace any need for system here. + # abt. Need to sort out tracking of stderr, stdout, stdin with open3? + # Eventually replace any need for system here. # # <b>PARAM</b> <i>String</i> - the call to pass to system. # # <b>RETURN</b> <i>boolean</i> - True if system call successful, otherwise - # false. + # false. ## def runSystemCall( command ) - if ( !system( command ) ) - return false - end - - return true + if ( !system( command ) ) + return false + end + + return true end end Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-12-03 12:52:04 UTC (rev 253) +++ src/trunk/abt.rb 2006-12-03 13:00:30 UTC (rev 254) @@ -39,7 +39,7 @@ # Setup needed classes and get ready to parse arguments. ## manager = AbtPackageManager.new -logger = AbtLogManager.new +logger = AbtLogManager.new # initialized all needed paths. reporter = AbtReportManager.new downloader = AbtDownloadManager.new options = Hash.new @@ -249,11 +249,6 @@ options['pkg'] = ARGV[1] logger.logToJournal( "Starting to download " + options['pkg'] ) - if ( !File.directory?( $SOURCES_REPOSITORY ) ) - FileUtils.mkdir_p( $SOURCES_REPOSITORY ) # initialize directory. - logger.logToJournal( "Created directory - " + $SOURCES_REPOSITORY ) - end - manager = AbtDownloadManager.new if ( manager.retrievePackageSource( options['pkg'], $SOURCES_REPOSITORY ) ) 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:52:05
|
Revision: 253 http://svn.sourceforge.net/abtlinux/?rev=253&view=rev Author: eschabell Date: 2006-12-03 04:52:04 -0800 (Sun, 03 Dec 2006) Log Message: ----------- Some cleanup in the tabs. Modified Paths: -------------- src/trunk/packages/ipc.rb Modified: src/trunk/packages/ipc.rb =================================================================== --- src/trunk/packages/ipc.rb 2006-12-03 12:51:24 UTC (rev 252) +++ src/trunk/packages/ipc.rb 2006-12-03 12:52:04 UTC (rev 253) @@ -33,26 +33,26 @@ private - $name = "Ipc" + $name = "Ipc" $version = "1.4" - $srcDir = "#{$name.downcase}-#{$version}" + $srcDir = "#{$name.downcase}-#{$version}" $packageData = { - 'name' => $name, - 'execName' => $name.downcase, - 'version' => $version, - 'srcDir' => $srcDir, - 'homepage' => "http://isotopatcalc.sourceforge.net/", - 'srcUrl' => "#{$SOURCEFORGE_URL}/isotopatcalc/#{$srcDir}.tar.gz", - 'dependsOn' => "", - 'reliesOn' => "", - 'optionalDO' => "", - 'optionalRO' => "", - 'hashCheck' => "sha512:d759b651e343beddc0b3bd06af85881486b72319c979a2e7f752d5a34edd8b7c1c19391c5c7a2e8f6685746cc7a046bf2c8e082b31458a1dd043ed90a4cebcd1", - 'patches' => "", + 'name' => $name, + 'execName' => $name.downcase, + 'version' => $version, + 'srcDir' => $srcDir, + 'homepage' => "http://isotopatcalc.sourceforge.net/", + 'srcUrl' => "#{$SOURCEFORGE_URL}/isotopatcalc/#{$srcDir}.tar.gz", + 'dependsOn' => "", + 'reliesOn' => "", + 'optionalDO' => "", + 'optionalRO' => "", + 'hashCheck' => "sha512:d759b651e343beddc0b3bd06af85881486b72319c979a2e7f752d5a34edd8b7c1c19391c5c7a2e8f6685746cc7a046bf2c8e082b31458a1dd043ed90a4cebcd1", + 'patches' => "", 'patchesHashCheck' => "", - 'mirrorPath' => "", - 'license' => "GPL", - 'description' => "IPC is a program that calculates the isotopic distribution of a given chemical formula." + 'mirrorPath' => "", + 'license' => "GPL", + 'description' => "IPC is a program that calculates the isotopic distribution of a given chemical formula." } 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:51:23
|
Revision: 252 http://svn.sourceforge.net/abtlinux/?rev=252&view=rev Author: eschabell Date: 2006-12-03 04:51:24 -0800 (Sun, 03 Dec 2006) Log Message: ----------- Expanded the constructor to ensure all required directories exist. Modified Paths: -------------- src/trunk/AbtLogManager.rb Modified: src/trunk/AbtLogManager.rb =================================================================== --- src/trunk/AbtLogManager.rb 2006-12-03 12:50:21 UTC (rev 251) +++ src/trunk/AbtLogManager.rb 2006-12-03 12:51:24 UTC (rev 252) @@ -48,14 +48,35 @@ public ## - # Constructor for the AbtLogManager. + # Constructor for the AbtLogManager. It ensures all needed logs paths are + # initialized. + # # # <b>RETURN</b> <i>AbtLogManager</i> - an initialized AbtLogManager object. ## def initialize if ( !File.directory?( $ABT_LOGS ) ) - FileUtils.mkdir_p( $ABT_LOGS ) # initialize logs. + FileUtils.mkdir_p( $ABT_LOGS ) + self.logToJournal( "Created directory: #{$ABT_LOGS}." ) end + + if ( !File.directory?( $ABT_CACHES ) ) + FileUtils.mkdir_p( $ABT_CACHES ) + self.logToJournal( "Created directory: #{$ABT_CACHES}." ) + end + + if ( !File.directory?( $BUILD_LOCATION ) ) + FileUtils.mkdir_p( $BUILD_LOCATION ) + self.logToJournal( "Created directory: #{$BUILD_LOCATION}." ) + end + if ( !File.directory?( $PACKAGE_INSTALLED ) ) + FileUtils.mkdir_p( $PACKAGE_INSTALLED ) + self.logToJournal( "Created directory: #{$PACKAGE_INSTALLED}." ) + end + if ( !File.directory?( $SOURCES_REPOSITORY ) ) + FileUtils.mkdir_p( $SOURCES_REPOSITORY ) + self.logToJournal( "Created directory: #{$SOURCES_REPOSITORY}." ) + end 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:50:20
|
Revision: 251 http://svn.sourceforge.net/abtlinux/?rev=251&view=rev Author: eschabell Date: 2006-12-03 04:50:21 -0800 (Sun, 03 Dec 2006) Log Message: ----------- Added package installed path variable and some beautification with tabs. Modified Paths: -------------- src/trunk/abtconfig.rb Modified: src/trunk/abtconfig.rb =================================================================== --- src/trunk/abtconfig.rb 2006-12-03 12:48:55 UTC (rev 250) +++ src/trunk/abtconfig.rb 2006-12-03 12:50:21 UTC (rev 251) @@ -26,12 +26,14 @@ ## # default paths / locations. -$ABT_LOGS = "/var/log/abt" -$ABTNEWS_LOG = "#{$ABT_LOGS}/news.log" -$BUILD_LOCATION = "/usr/src" -$JOURNAL = "#{$ABT_LOGS}/journal.log" -$PACKAGE_PATH = "./packages/" -$SOURCES_REPOSITORY = "/var/spool/abt/sources" +$ABT_LOGS = "/var/log/abt" +$ABT_CACHES = "/var/spool/abt" +$ABTNEWS_LOG = "#{$ABT_LOGS}/news.log" +$BUILD_LOCATION = "/usr/src" +$JOURNAL = "#{$ABT_LOGS}/journal.log" +$PACKAGE_INSTALLED = "#{$ABT_CACHES}/installed" +$PACKAGE_PATH = "./packages/" +$SOURCES_REPOSITORY = "#{$ABT_CACHES}/sources" # default config options. 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-03 12:46:29
|
Revision: 249 http://svn.sourceforge.net/abtlinux/?rev=249&view=rev Author: eschabell Date: 2006-12-03 04:46:29 -0800 (Sun, 03 Dec 2006) Log Message: ----------- Added TODO for arranging proper handling of package install, cache and failure reporting. Modified Paths: -------------- src/trunk/AbtPackageManager.rb Modified: src/trunk/AbtPackageManager.rb =================================================================== --- src/trunk/AbtPackageManager.rb 2006-12-03 11:18:18 UTC (rev 248) +++ src/trunk/AbtPackageManager.rb 2006-12-03 12:46:29 UTC (rev 249) @@ -52,9 +52,13 @@ def installPackage( package ) require package sw = eval( "#{package.capitalize}.new" ) - queuer = AbtQueueManager.new logger = AbtLogManager.new + + # TODO: initialize pkg install directory ($PACKAGE_INSTALLED/@srcDir), + # should this fail we have to clean this dir up, move to failure + # location? + # On success, need to cache contents in cache dir. # get package details. details = sw.details This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-12-03 11:18:18
|
Revision: 248 http://svn.sourceforge.net/abtlinux/?rev=248&view=rev Author: eschabell Date: 2006-12-03 03:18:18 -0800 (Sun, 03 Dec 2006) Log Message: ----------- Regenerated api docs. Modified Paths: -------------- src/trunk/doc/classes/AbtDepEngine.html src/trunk/doc/classes/AbtDownloadManager.html src/trunk/doc/classes/AbtLogManager.html src/trunk/doc/classes/AbtPackage.html src/trunk/doc/classes/AbtPackageManager.html src/trunk/doc/classes/AbtQueueManager.html src/trunk/doc/classes/AbtReportManager.html src/trunk/doc/classes/AbtSystemManager.html src/trunk/doc/classes/AbtUsage.html src/trunk/doc/classes/TestAbtDepEngine.html src/trunk/doc/classes/TestAbtDownloadManager.html src/trunk/doc/classes/TestAbtLogManager.html src/trunk/doc/classes/TestAbtPackage.html src/trunk/doc/classes/TestAbtPackageManager.html src/trunk/doc/classes/TestAbtQueueManager.html src/trunk/doc/classes/TestAbtReportManager.html src/trunk/doc/classes/TestAbtSystemManager.html src/trunk/doc/created.rid src/trunk/doc/files/AbtDownloadManager_rb.html src/trunk/doc/files/AbtPackageManager_rb.html src/trunk/doc/files/AbtPackage_rb.html src/trunk/doc/files/AbtReportManager_rb.html src/trunk/doc/files/AbtSystemManager_rb.html src/trunk/doc/files/TestAbtReportManager_rb.html src/trunk/doc/fr_method_index.html Modified: src/trunk/doc/classes/AbtDepEngine.html =================================================================== --- src/trunk/doc/classes/AbtDepEngine.html 2006-12-03 11:15:01 UTC (rev 247) +++ src/trunk/doc/classes/AbtDepEngine.html 2006-12-03 11:18:18 UTC (rev 248) @@ -118,7 +118,7 @@ <div class="sectiontitle">Methods</div> <ul> - <li><a href="#M000086">new</a></li> + <li><a href="#M000087">new</a></li> </ul> @@ -129,7 +129,7 @@ <div class="sectiontitle">Public Class methods</div> <div class="method"> <div class="title"> - <a name="M000086"></a><b>new</b>() + <a name="M000087"></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('M000086_source')" id="l_M000086_source">show source</a> ]</p> - <div id="M000086_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000087_source')" id="l_M000087_source">show source</a> ]</p> + <div id="M000087_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File 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 2006-12-03 11:15:01 UTC (rev 247) +++ src/trunk/doc/classes/AbtDownloadManager.html 2006-12-03 11:18:18 UTC (rev 248) @@ -117,12 +117,12 @@ <div class="sectiontitle">Methods</div> <ul> - <li><a href="#M000011">new</a></li> - <li><a href="#M000014">retrieveNewsFeed</a></li> - <li><a href="#M000012">retrievePackageSource</a></li> - <li><a href="#M000013">retrievePackageTree</a></li> - <li><a href="#M000015">updatePackage</a></li> - <li><a href="#M000016">updatePackageTree</a></li> + <li><a href="#M000012">new</a></li> + <li><a href="#M000015">retrieveNewsFeed</a></li> + <li><a href="#M000013">retrievePackageSource</a></li> + <li><a href="#M000014">retrievePackageTree</a></li> + <li><a href="#M000016">updatePackage</a></li> + <li><a href="#M000017">updatePackageTree</a></li> </ul> @@ -133,7 +133,7 @@ <div class="sectiontitle">Public Class methods</div> <div class="method"> <div class="title"> - <a name="M000011"></a><b>new</b>() + <a name="M000012"></a><b>new</b>() </div> <div class="description"> <p> @@ -147,8 +147,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000011_source')" id="l_M000011_source">show source</a> ]</p> - <div id="M000011_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000012_source')" id="l_M000012_source">show source</a> ]</p> + <div id="M000012_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File AbtDownloadManager.rb, line 41</span> 41: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> @@ -160,7 +160,7 @@ <div class="sectiontitle">Public Instance methods</div> <div class="method"> <div class="title"> - <a name="M000014"></a><b>retrieveNewsFeed</b>( uri, cleanLog = "false" ) + <a name="M000015"></a><b>retrieveNewsFeed</b>( uri, cleanLog = "false" ) </div> <div class="description"> <p> @@ -175,8 +175,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 AbtDownloadManager.rb, line 94</span> 94: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieveNewsFeed</span>( <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">cleanLog</span> = <span class="ruby-value str">"false"</span> ) @@ -229,7 +229,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000012"></a><b>retrievePackageSource</b>( packageName, destination ) + <a name="M000013"></a><b>retrievePackageSource</b>( packageName, destination ) </div> <div class="description"> <p> @@ -247,22 +247,22 @@ </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 AbtDownloadManager.rb, line 55</span> 55: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrievePackageSource</span>( <span class="ruby-identifier">packageName</span>, <span class="ruby-identifier">destination</span> ) -56: -57: <span class="ruby-identifier">require</span> <span class="ruby-identifier">packageName</span> -58: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">AbtLogManager</span>.<span class="ruby-identifier">new</span> -59: <span class="ruby-identifier">package</span> = <span class="ruby-identifier">eval</span>( <span class="ruby-identifier">packageName</span>.<span class="ruby-identifier">capitalize</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'.new'</span> ) +56: <span class="ruby-identifier">require</span> <span class="ruby-identifier">packageName</span> +57: <span class="ruby-identifier">logger</span> = <span class="ruby-constant">AbtLogManager</span>.<span class="ruby-identifier">new</span> +58: <span class="ruby-identifier">systemMgr</span> = <span class="ruby-constant">AbtSystemManager</span>.<span class="ruby-identifier">new</span> +59: <span class="ruby-identifier">package</span> = <span class="ruby-identifier">eval</span>( <span class="ruby-identifier">packageName</span>.<span class="ruby-identifier">capitalize</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'.new'</span> ) 60: 61: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>( <span class="ruby-identifier">destination</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"/"</span> <span class="ruby-operator">+</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>( <span class="ruby-identifier">package</span>.<span class="ruby-identifier">srcUrl</span> ) ) ) 62: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-value str">"Download not needed, existing source found for "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">packageName</span> ) 63: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> 64: <span class="ruby-keyword kw">end</span> 65: -66: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">system</span>( <span class="ruby-value str">"cd "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">destination</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"; wget "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">package</span>.<span class="ruby-identifier">srcUrl</span> ) ) <span class="ruby-comment cmt"># TODO: rm system call?</span> +66: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">systemMgr</span>.<span class="ruby-identifier">runSystemCall</span>( <span class="ruby-value str">"cd "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">destination</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"; wget "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">package</span>.<span class="ruby-identifier">srcUrl</span> ) ) 67: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-value str">"Download completed for "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">packageName</span> ) 68: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> 69: <span class="ruby-keyword kw">end</span> @@ -275,7 +275,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000013"></a><b>retrievePackageTree</b>( packageTreeName ) + <a name="M000014"></a><b>retrievePackageTree</b>( packageTreeName ) </div> <div class="description"> <p> @@ -291,8 +291,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 AbtDownloadManager.rb, line 82</span> 82: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrievePackageTree</span>( <span class="ruby-identifier">packageTreeName</span> ) @@ -303,7 +303,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000015"></a><b>updatePackage</b>() + <a name="M000016"></a><b>updatePackage</b>() </div> <div class="description"> <p> @@ -318,8 +318,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 AbtDownloadManager.rb, line 147</span> 147: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">updatePackage</span> @@ -330,7 +330,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000016"></a><b>updatePackageTree</b>() + <a name="M000017"></a><b>updatePackageTree</b>() </div> <div class="description"> <p> @@ -342,8 +342,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 AbtDownloadManager.rb, line 156</span> 156: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">updatePackageTree</span> Modified: src/trunk/doc/classes/AbtLogManager.html =================================================================== --- src/trunk/doc/classes/AbtLogManager.html 2006-12-03 11:15:01 UTC (rev 247) +++ src/trunk/doc/classes/AbtLogManager.html 2006-12-03 11:18:18 UTC (rev 248) @@ -117,12 +117,12 @@ <div class="sectiontitle">Methods</div> <ul> - <li><a href="#M000064">cachePackage</a></li> - <li><a href="#M000063">logPackageBuild</a></li> - <li><a href="#M000062">logPackageInstall</a></li> - <li><a href="#M000060">logPackageIntegrity</a></li> - <li><a href="#M000065">logToJournal</a></li> - <li><a href="#M000061">new</a></li> + <li><a href="#M000065">cachePackage</a></li> + <li><a href="#M000064">logPackageBuild</a></li> + <li><a href="#M000063">logPackageInstall</a></li> + <li><a href="#M000061">logPackageIntegrity</a></li> + <li><a href="#M000066">logToJournal</a></li> + <li><a href="#M000062">new</a></li> </ul> @@ -133,7 +133,7 @@ <div class="sectiontitle">Public Class methods</div> <div class="method"> <div class="title"> - <a name="M000061"></a><b>new</b>() + <a name="M000062"></a><b>new</b>() </div> <div class="description"> <p> @@ -145,8 +145,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000061_source')" id="l_M000061_source">show source</a> ]</p> - <div id="M000061_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000062_source')" id="l_M000062_source">show source</a> ]</p> + <div id="M000062_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File AbtLogManager.rb, line 55</span> 55: <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="M000064"></a><b>cachePackage</b>( package ) + <a name="M000065"></a><b>cachePackage</b>( package ) </div> <div class="description"> <p> @@ -177,8 +177,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000064_source')" id="l_M000064_source">show source</a> ]</p> - <div id="M000064_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000065_source')" id="l_M000065_source">show source</a> ]</p> + <div id="M000065_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File AbtLogManager.rb, line 94</span> 94: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cachePackage</span>( <span class="ruby-identifier">package</span> ) @@ -189,7 +189,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000063"></a><b>logPackageBuild</b>( package ) + <a name="M000064"></a><b>logPackageBuild</b>( package ) </div> <div class="description"> <p> @@ -205,8 +205,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000063_source')" id="l_M000063_source">show source</a> ]</p> - <div id="M000063_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000064_source')" id="l_M000064_source">show source</a> ]</p> + <div id="M000064_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File AbtLogManager.rb, line 82</span> 82: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">logPackageBuild</span>( <span class="ruby-identifier">package</span> ) @@ -217,7 +217,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000062"></a><b>logPackageInstall</b>( package ) + <a name="M000063"></a><b>logPackageInstall</b>( package ) </div> <div class="description"> <p> @@ -233,8 +233,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000062_source')" id="l_M000062_source">show source</a> ]</p> - <div id="M000062_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000063_source')" id="l_M000063_source">show source</a> ]</p> + <div id="M000063_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File AbtLogManager.rb, line 70</span> 70: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">logPackageInstall</span>( <span class="ruby-identifier">package</span> ) @@ -245,7 +245,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000065"></a><b>logToJournal</b>( message ) + <a name="M000066"></a><b>logToJournal</b>( message ) </div> <div class="description"> <p> @@ -260,8 +260,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000065_source')" id="l_M000065_source">show source</a> ]</p> - <div id="M000065_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000066_source')" id="l_M000066_source">show source</a> ]</p> + <div id="M000066_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File AbtLogManager.rb, line 105</span> 105: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">logToJournal</span>( <span class="ruby-identifier">message</span> ) @@ -280,7 +280,7 @@ <div class="sectiontitle">Protected Instance methods</div> <div class="method"> <div class="title"> - <a name="M000060"></a><b>logPackageIntegrity</b>( package ) + <a name="M000061"></a><b>logPackageIntegrity</b>( package ) </div> <div class="description"> <p> @@ -297,8 +297,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000060_source')" id="l_M000060_source">show source</a> ]</p> - <div id="M000060_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000061_source')" id="l_M000061_source">show source</a> ]</p> + <div id="M000061_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File AbtLogManager.rb, line 42</span> 42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">logPackageIntegrity</span>( <span class="ruby-identifier">package</span> ) Modified: src/trunk/doc/classes/AbtPackage.html =================================================================== --- src/trunk/doc/classes/AbtPackage.html 2006-12-03 11:15:01 UTC (rev 247) +++ src/trunk/doc/classes/AbtPackage.html 2006-12-03 11:18:18 UTC (rev 248) @@ -121,16 +121,16 @@ <div class="sectiontitle">Methods</div> <ul> - <li><a href="#M000028">build</a></li> - <li><a href="#M000027">configure</a></li> - <li><a href="#M000025">details</a></li> - <li><a href="#M000030">install</a></li> - <li><a href="#M000024">new</a></li> - <li><a href="#M000031">post</a></li> - <li><a href="#M000026">pre</a></li> - <li><a href="#M000029">preinstall</a></li> - <li><a href="#M000032">removeBuild</a></li> - <li><a href="#M000023">unpackSources</a></li> + <li><a href="#M000029">build</a></li> + <li><a href="#M000028">configure</a></li> + <li><a href="#M000026">details</a></li> + <li><a href="#M000031">install</a></li> + <li><a href="#M000025">new</a></li> + <li><a href="#M000032">post</a></li> + <li><a href="#M000027">pre</a></li> + <li><a href="#M000030">preinstall</a></li> + <li><a href="#M000033">removeBuild</a></li> + <li><a href="#M000024">unpackSources</a></li> </ul> @@ -304,7 +304,7 @@ <div class="sectiontitle">Public Class methods</div> <div class="method"> <div class="title"> - <a name="M000024"></a><b>new</b>( data ) + <a name="M000025"></a><b>new</b>( data ) </div> <div class="description"> <p> @@ -316,8 +316,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000024_source')" id="l_M000024_source">show source</a> ]</p> - <div id="M000024_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000025_source')" id="l_M000025_source">show source</a> ]</p> + <div id="M000025_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File AbtPackage.rb, line 150</span> 150: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>( <span class="ruby-identifier">data</span> ) @@ -345,7 +345,7 @@ <div class="sectiontitle">Public Instance methods</div> <div class="method"> <div class="title"> - <a name="M000028"></a><b>build</b>() + <a name="M000029"></a><b>build</b>() </div> <div class="description"> <p> @@ -358,8 +358,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000028_source')" id="l_M000028_source">show source</a> ]</p> - <div id="M000028_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000029_source')" id="l_M000029_source">show source</a> ]</p> + <div id="M000029_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File AbtPackage.rb, line 249</span> 249: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build</span> @@ -370,7 +370,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000027"></a><b>configure</b>() + <a name="M000028"></a><b>configure</b>() </div> <div class="description"> <p> @@ -387,8 +387,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000027_source')" id="l_M000027_source">show source</a> ]</p> - <div id="M000027_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000028_source')" id="l_M000028_source">show source</a> ]</p> + <div id="M000028_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File AbtPackage.rb, line 231</span> 231: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">configure</span> @@ -397,7 +397,7 @@ 234: <span class="ruby-comment cmt">#logger.logToJournal( "DEBUG: calling system - cd #{buildSite}; ./configure --prefix=#{$DEFAULT_PREFIX}" )</span> 235: 236: <span class="ruby-comment cmt"># TODO: system call removal?</span> -237: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>( <span class="ruby-node">"cd #{buildSite}; ./configure --prefix=#{$DEFAULT_PREFEX}"</span> ) ) +237: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>( <span class="ruby-node">"cd #{buildSite}; ./configure --prefix=#{$DEFAULT_PREFIX}"</span> ) ) 238: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> 239: <span class="ruby-keyword kw">end</span> 240: @@ -409,7 +409,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000025"></a><b>details</b>() + <a name="M000026"></a><b>details</b>() </div> <div class="description"> <p> @@ -422,8 +422,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000025_source')" id="l_M000025_source">show source</a> ]</p> - <div id="M000025_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000026_source')" id="l_M000026_source">show source</a> ]</p> + <div id="M000026_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File AbtPackage.rb, line 174</span> 174: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">details</span> @@ -452,7 +452,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000030"></a><b>install</b>() + <a name="M000031"></a><b>install</b>() </div> <div class="description"> <p> @@ -464,8 +464,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000030_source')" id="l_M000030_source">show source</a> ]</p> - <div id="M000030_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000031_source')" id="l_M000031_source">show source</a> ]</p> + <div id="M000031_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File AbtPackage.rb, line 266</span> 266: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">install</span> @@ -476,7 +476,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000031"></a><b>post</b>() + <a name="M000032"></a><b>post</b>() </div> <div class="description"> <p> @@ -489,8 +489,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000031_source')" id="l_M000031_source">show source</a> ]</p> - <div id="M000031_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000032_source')" id="l_M000032_source">show source</a> ]</p> + <div id="M000032_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File AbtPackage.rb, line 274</span> 274: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post</span> @@ -501,7 +501,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000026"></a><b>pre</b>() + <a name="M000027"></a><b>pre</b>() </div> <div class="description"> <p> @@ -514,8 +514,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000026_source')" id="l_M000026_source">show source</a> ]</p> - <div id="M000026_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000027_source')" id="l_M000027_source">show source</a> ]</p> + <div id="M000027_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File AbtPackage.rb, line 201</span> 201: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pre</span> @@ -544,7 +544,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000029"></a><b>preinstall</b>() + <a name="M000030"></a><b>preinstall</b>() </div> <div class="description"> <p> @@ -558,8 +558,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000029_source')" id="l_M000029_source">show source</a> ]</p> - <div id="M000029_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000030_source')" id="l_M000030_source">show source</a> ]</p> + <div id="M000030_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File AbtPackage.rb, line 258</span> 258: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">preinstall</span> @@ -570,7 +570,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000032"></a><b>removeBuild</b>() + <a name="M000033"></a><b>removeBuild</b>() </div> <div class="description"> <p> @@ -582,8 +582,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000032_source')" id="l_M000032_source">show source</a> ]</p> - <div id="M000032_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000033_source')" id="l_M000033_source">show source</a> ]</p> + <div id="M000033_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File AbtPackage.rb, line 282</span> 282: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">removeBuild</span> @@ -594,14 +594,13 @@ 287: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> 288: <span class="ruby-keyword kw">end</span> 289: -290: <span class="ruby-comment cmt"># TODO: system call removal?</span> -291: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span> <span class="ruby-identifier">buildSourcesLocation</span>, <span class="ruby-identifier">:verbose</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">true</span> ) -292: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -293: <span class="ruby-keyword kw">end</span> -294: <span class="ruby-keyword kw">end</span> -295: -296: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -297: <span class="ruby-keyword kw">end</span> +290: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span> <span class="ruby-identifier">buildSourcesLocation</span>, <span class="ruby-identifier">:verbose</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">true</span> ) +291: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +292: <span class="ruby-keyword kw">end</span> +293: <span class="ruby-keyword kw">end</span> +294: +295: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +296: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -609,7 +608,7 @@ <div class="sectiontitle">Protected Instance methods</div> <div class="method"> <div class="title"> - <a name="M000023"></a><b>unpackSources</b>() + <a name="M000024"></a><b>unpackSources</b>() </div> <div class="description"> <p> @@ -621,56 +620,56 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000023_source')" id="l_M000023_source">show source</a> ]</p> - <div id="M000023_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000024_source')" id="l_M000024_source">show source</a> ]</p> + <div id="M000024_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File AbtPackage.rb, line 39</span> 39: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unpackSources</span> -40: <span class="ruby-identifier">srcFile</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>( <span class="ruby-identifier">srcUrl</span> ) -41: <span class="ruby-identifier">sourcesToUnpack</span> = <span class="ruby-node">"#{$SOURCES_REPOSITORY}/#{srcFile}"</span> -42: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">""</span> -43: -44: <span class="ruby-comment cmt"># check for existing file in source repo.</span> -45: <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">sourcesToUnpack</span> ) ) -46: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -47: <span class="ruby-keyword kw">end</span> -48: -49: <span class="ruby-comment cmt"># check if possible existing sources in build directory.</span> -50: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>( <span class="ruby-node">"#{$BUILD_LOCATION}/#{@srcDir}"</span> ) ) -51: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -52: <span class="ruby-keyword kw">end</span> -53: -54: <span class="ruby-comment cmt"># determine which supported compression used [gz, tar, tgz, bz2, zip].</span> -55: <span class="ruby-identifier">compressionType</span> = <span class="ruby-identifier">srcFile</span>.<span class="ruby-identifier">split</span>( <span class="ruby-value str">'.'</span> ) -56: -57: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">compressionType</span>.<span class="ruby-identifier">last</span> -58: -59: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"gz"</span> -60: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">"tar xzvf"</span> -61: -62: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"tar"</span> -63: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">"tar xvf"</span> -64: -65: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"bz2"</span> -66: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">"tar xjvf"</span> -67: -68: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"tgz"</span> -69: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">"tar xzvf"</span> -70: -71: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"zip"</span> -72: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">"unizp"</span> -73: -74: <span class="ruby-keyword kw">else</span> -75: <span class="ruby-comment cmt"># unsupported format.</span> -76: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -77: <span class="ruby-keyword kw">end</span> -78: -79: <span class="ruby-comment cmt"># DEBUG:</span> -80: <span class="ruby-comment cmt">#logger = AbtLogManager.new</span> -81: <span class="ruby-comment cmt">#logger.logToJournal( "DEBUG: unpack tool will be '#{unpackTool}'." )</span> -82: -83: <span class="ruby-comment cmt"># TODO: system call removal?</span> -84: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>( <span class="ruby-node">"cd #{$BUILD_LOCATION}; #{unpackTool} #{sourcesToUnpack}"</span> ) ) +40: <span class="ruby-identifier">systemMgr</span> = <span class="ruby-constant">AbtSystemManager</span>.<span class="ruby-identifier">new</span> +41: <span class="ruby-identifier">srcFile</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>( <span class="ruby-identifier">srcUrl</span> ) +42: <span class="ruby-identifier">sourcesToUnpack</span> = <span class="ruby-node">"#{$SOURCES_REPOSITORY}/#{srcFile}"</span> +43: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">""</span> +44: +45: <span class="ruby-comment cmt"># check for existing file in source repo.</span> +46: <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">sourcesToUnpack</span> ) ) +47: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +48: <span class="ruby-keyword kw">end</span> +49: +50: <span class="ruby-comment cmt"># check if possible existing sources in build directory.</span> +51: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>( <span class="ruby-node">"#{$BUILD_LOCATION}/#{@srcDir}"</span> ) ) +52: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +53: <span class="ruby-keyword kw">end</span> +54: +55: <span class="ruby-comment cmt"># determine which supported compression used [gz, tar, tgz, bz2, zip].</span> +56: <span class="ruby-identifier">compressionType</span> = <span class="ruby-identifier">srcFile</span>.<span class="ruby-identifier">split</span>( <span class="ruby-value str">'.'</span> ) +57: +58: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">compressionType</span>.<span class="ruby-identifier">last</span> +59: +60: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"gz"</span> +61: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">"tar xzvf"</span> +62: +63: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"tar"</span> +64: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">"tar xvf"</span> +65: +66: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"bz2"</span> +67: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">"tar xjvf"</span> +68: +69: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"tgz"</span> +70: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">"tar xzvf"</span> +71: +72: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"zip"</span> +73: <span class="ruby-identifier">unpackTool</span> = <span class="ruby-value str">"unizp"</span> +74: +75: <span class="ruby-keyword kw">else</span> +76: <span class="ruby-comment cmt"># unsupported format.</span> +77: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +78: <span class="ruby-keyword kw">end</span> +79: +80: <span class="ruby-comment cmt"># DEBUG:</span> +81: <span class="ruby-comment cmt">#logger = AbtLogManager.new</span> +82: <span class="ruby-comment cmt">#logger.logToJournal( "DEBUG: unpack tool will be '#{unpackTool}'." )</span> +83: +84: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">systemMgr</span>.<span class="ruby-identifier">runSystemCall</span>( <span class="ruby-node">"cd #{$BUILD_LOCATION}; #{unpackTool} #{sourcesToUnpack}"</span> ) ) 85: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> 86: <span class="ruby-keyword kw">end</span> 87: Modified: src/trunk/doc/classes/AbtPackageManager.html =================================================================== --- src/trunk/doc/classes/AbtPackageManager.html 2006-12-03 11:15:01 UTC (rev 247) +++ src/trunk/doc/classes/AbtPackageManager.html 2006-12-03 11:18:18 UTC (rev 248) @@ -118,13 +118,13 @@ <div class="sectiontitle">Methods</div> <ul> - <li><a href="#M000044">downgradePackage</a></li> - <li><a href="#M000045">freezePackage</a></li> - <li><a href="#M000041">installPackage</a></li> - <li><a href="#M000040">new</a></li> - <li><a href="#M000042">reinstallPackage</a></li> - <li><a href="#M000043">removePackage</a></li> - <li><a href="#M000046">rootLogin</a></li> + <li><a href="#M000045">downgradePackage</a></li> + <li><a href="#M000046">freezePackage</a></li> + <li><a href="#M000042">installPackage</a></li> + <li><a href="#M000041">new</a></li> + <li><a href="#M000043">reinstallPackage</a></li> + <li><a href="#M000044">removePackage</a></li> + <li><a href="#M000047">rootLogin</a></li> </ul> @@ -135,7 +135,7 @@ <div class="sectiontitle">Public Class methods</div> <div class="method"> <div class="title"> - <a name="M000040"></a><b>new</b>() + <a name="M000041"></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('M000040_source')" id="l_M000040_source">show source</a> ]</p> - <div id="M000040_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000041_source')" id="l_M000041_source">show source</a> ]</p> + <div id="M000041_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 41</span> 41: <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="M000044"></a><b>downgradePackage</b>( package, version ) + <a name="M000045"></a><b>downgradePackage</b>( package, version ) </div> <div class="description"> <p> @@ -179,8 +179,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000044_source')" id="l_M000044_source">show source</a> ]</p> - <div id="M000044_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000045_source')" id="l_M000045_source">show source</a> ]</p> + <div id="M000045_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 134</span> 134: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">downgradePackage</span>( <span class="ruby-identifier">package</span>, <span class="ruby-identifier">version</span> ) @@ -191,7 +191,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000045"></a><b>freezePackage</b>( package ) + <a name="M000046"></a><b>freezePackage</b>( package ) </div> <div class="description"> <p> @@ -207,8 +207,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000045_source')" id="l_M000045_source">show source</a> ]</p> - <div id="M000045_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000046_source')" id="l_M000046_source">show source</a> ]</p> + <div id="M000046_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 146</span> 146: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">freezePackage</span>( <span class="ruby-identifier">package</span> ) @@ -219,7 +219,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000041"></a><b>installPackage</b>( package ) + <a name="M000042"></a><b>installPackage</b>( package ) </div> <div class="description"> <p> @@ -234,8 +234,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000041_source')" id="l_M000041_source">show source</a> ]</p> - <div id="M000041_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000042_source')" id="l_M000042_source">show source</a> ]</p> + <div id="M000042_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 52</span> 52: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">installPackage</span>( <span class="ruby-identifier">package</span> ) @@ -293,7 +293,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000042"></a><b>reinstallPackage</b>( package ) + <a name="M000043"></a><b>reinstallPackage</b>( package ) </div> <div class="description"> <p> @@ -308,8 +308,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000042_source')" id="l_M000042_source">show source</a> ]</p> - <div id="M000042_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000043_source')" id="l_M000043_source">show source</a> ]</p> + <div id="M000043_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 110</span> 110: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reinstallPackage</span>( <span class="ruby-identifier">package</span> ) @@ -320,7 +320,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000043"></a><b>removePackage</b>( package ) + <a name="M000044"></a><b>removePackage</b>( package ) </div> <div class="description"> <p> @@ -335,8 +335,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000043_source')" id="l_M000043_source">show source</a> ]</p> - <div id="M000043_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000044_source')" id="l_M000044_source">show source</a> ]</p> + <div id="M000044_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 121</span> 121: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">removePackage</span>( <span class="ruby-identifier">package</span> ) @@ -347,7 +347,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000046"></a><b>rootLogin</b>( arguments ) + <a name="M000047"></a><b>rootLogin</b>( arguments ) </div> <div class="description"> <p> @@ -361,23 +361,25 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000046_source')" id="l_M000046_source">show source</a> ]</p> - <div id="M000046_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000047_source')" id="l_M000047_source">show source</a> ]</p> + <div id="M000047_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File AbtPackageManager.rb, line 156</span> 156: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rootLogin</span>( <span class="ruby-identifier">arguments</span> ) -157: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">Process</span>.<span class="ruby-identifier">uid</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span> ) -158: <span class="ruby-identifier">args</span> = <span class="ruby-value str">""</span> -159: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\nEnter root password:"</span> -160: -161: <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">i</span> <span class="ruby-keyword kw">in</span> <span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-constant">ARGV</span>.<span class="ruby-identifier">length</span> -162: <span class="ruby-identifier">args</span> = <span class="ruby-identifier">args</span> <span class="ruby-operator">+</span> <span class="ruby-value str">" "</span> <span class="ruby-operator">+</span> <span class="ruby-constant">ARGV</span>[<span class="ruby-identifier">i</span>] -163: <span class="ruby-keyword kw">end</span> -164: -165: <span class="ruby-identifier">system</span>( <span class="ruby-value str">'su -c "./abt '</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">args</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'" root'</span> ) <span class="ruby-comment cmt"># TODO: replace system call?</span> -166: <span class="ruby-identifier">exit</span> -167: <span class="ruby-keyword kw">end</span> -168: <span class="ruby-keyword kw">end</span> +157: <span class="ruby-identifier">systemMgr</span> = <span class="ruby-constant">AbtSystemManager</span>.<span class="ruby-identifier">new</span> +158: +159: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">Process</span>.<span class="ruby-identifier">uid</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span> ) +160: <span class="ruby-identifier">args</span> = <span class="ruby-value str">""</span> +161: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\nEnter root password:"</span> +162: +163: <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">i</span> <span class="ruby-keyword kw">in</span> <span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-constant">ARGV</span>.<span class="ruby-identifier">length</span> +164: <span class="ruby-identifier">args</span> = <span class="ruby-identifier">args</span> <span class="ruby-operator">+</span> <span class="ruby-value str">" "</span> <span class="ruby-operator">+</span> <span class="ruby-constant">ARGV</span>[<span class="ruby-identifier">i</span>] +165: <span class="ruby-keyword kw">end</span> +166: +167: <span class="ruby-identifier">systemMgr</span>.<span class="ruby-identifier">runSystemCall</span>( <span class="ruby-value str">'su -c "./abt '</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">args</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'" root'</span> ) +168: <span class="ruby-identifier">exit</span> +169: <span class="ruby-keyword kw">end</span> +170: <span class="ruby-keyword kw">end</span> </pre> </div> </div> Modified: src/trunk/doc/classes/AbtQueueManager.html =================================================================== --- src/trunk/doc/classes/AbtQueueManager.html 2006-12-03 11:15:01 UTC (rev 247) +++ src/trunk/doc/classes/AbtQueueManager.html 2006-12-03 11:18:18 UTC (rev 248) @@ -117,8 +117,8 @@ <div class="sectiontitle">Methods</div> <ul> - <li><a href="#M000085">addPackageToQueue</a></li> - <li><a href="#M000084">new</a></li> + <li><a href="#M000086">addPackageToQueue</a></li> + <li><a href="#M000085">new</a></li> </ul> @@ -129,7 +129,7 @@ <div class="sectiontitle">Public Class methods</div> <div class="method"> <div class="title"> - <a name="M000084"></a><b>new</b>() + <a name="M000085"></a><b>new</b>() </div> <div class="description"> <p> @@ -142,8 +142,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000084_source')" id="l_M000084_source">show source</a> ]</p> - <div id="M000084_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000085_source')" id="l_M000085_source">show source</a> ]</p> + <div id="M000085_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File AbtQueueManager.rb, line 40</span> 40: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> @@ -158,7 +158,7 @@ <div class="sectiontitle">Public Instance methods</div> <div class="method"> <div class="title"> - <a name="M000085"></a><b>addPackageToQueue</b>( package, queue ) + <a name="M000086"></a><b>addPackageToQueue</b>( package, queue ) </div> <div class="description"> <p> @@ -175,8 +175,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000085_source')" id="l_M000085_source">show source</a> ]</p> - <div id="M000085_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000086_source')" id="l_M000086_source">show source</a> ]</p> + <div id="M000086_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File AbtQueueManager.rb, line 57</span> 57: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">addPackageToQueue</span>( <span class="ruby-identifier">package</span>, <span class="ruby-identifier">queue</span> ) Modified: src/trunk/doc/classes/AbtReportManager.html =================================================================== --- src/trunk/doc/classes/AbtReportManager.html 2006-12-03 11:15:01 UTC (rev 247) +++ src/trunk/doc/classes/AbtReportManager.html 2006-12-03 11:18:18 UTC (rev 248) @@ -117,19 +117,19 @@ <div class="sectiontitle">Methods</div> <ul> - <li><a href="#M000115">generateHTMLPackageListing</a></li> - <li><a href="#M000103">new</a></li> - <li><a href="#M000112">searchPackageDescriptions</a></li> - <li><a href="#M000111">showFileOwner</a></li> - <li><a href="#M000107">showFrozenPackages</a></li> - <li><a href="#M000105">showInstalledPackages</a></li> - <li><a href="#M000110">showJournal</a></li> - <li><a href="#M000108">showPackageDependencies</a></li> - <li><a href="#M000104">showPackageDetails</a></li> - <li><a href="#M000106">showPackageLog</a></li> - <li><a href="#M000113">showQueue</a></li> - <li><a href="#M000109">showUntrackedFiles</a></li> - <li><a href="#M000114">showUpdates</a></li> + <li><a href="#M000116">generateHTMLPackageListing</a></li> + <li><a href="#M000104">new</a></li> + <li><a href="#M000113">searchPackageDescriptions</a></li> + <li><a href="#M000112">showFileOwner</a></li> + <li><a href="#M000108">showFrozenPackages</a></li> + <li><a href="#M000106">showInstalledPackages</a></li> + <li><a href="#M000111">showJournal</a></li> + <li><a href="#M000109">showPackageDependencies</a></li> + <li><a href="#M000105">showPackageDetails</a></li> + <li><a href="#M000107">showPackageLog</a></li> + <li><a href="#M000114">showQueue</a></li> + <li><a href="#M000110">showUntrackedFiles</a></li> + <li><a href="#M000115">showUpdates</a></li> </ul> @@ -140,7 +140,7 @@ <div class="sectiontitle">Public Class methods</div> <div class="method"> <div class="title"> - <a name="M000103"></a><b>new</b>() + <a name="M000104"></a><b>new</b>() </div> <div class="description"> <p> @@ -152,8 +152,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000103_source')" id="l_M000103_source">show source</a> ]</p> - <div id="M000103_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000104_source')" id="l_M000104_source">show source</a> ]</p> + <div id="M000104_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File AbtReportManager.rb, line 41</span> 41: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> @@ -165,7 +165,7 @@ <div class="sectiontitle">Public Instance methods</div> <div class="method"> <div class="title"> - <a name="M000115"></a><b>generateHTMLPackageListing</b>() + <a name="M000116"></a><b>generateHTMLPackageListing</b>() </div> <div class="description"> <p> @@ -176,19 +176,19 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000115_source')" id="l_M000115_source">show source</a> ]</p> - <div id="M000115_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000116_source')" id="l_M000116_source">show source</a> ]</p> + <div id="M000116_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtReportManager.rb, line 240</span> -240: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generateHTMLPackageListing</span> -241: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtReportManager.rb, line 242</span> +242: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generateHTMLPackageListing</span> +243: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000112"></a><b>searchPackageDescriptions</b>( searchText ) + <a name="M000113"></a><b>searchPackageDescriptions</b>( searchText ) </div> <div class="description"> <p> @@ -204,19 +204,19 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000112_source')" id="l_M000112_source">show source</a> ]</p> - <div id="M000112_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000113_source')" id="l_M000113_source">show source</a> ]</p> + <div id="M000113_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtReportManager.rb, line 188</span> -188: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">searchPackageDescriptions</span>( <span class="ruby-identifier">searchText</span> ) -189: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtReportManager.rb, line 190</span> +190: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">searchPackageDescriptions</span>( <span class="ruby-identifier">searchText</span> ) +191: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000111"></a><b>showFileOwner</b>( file ) + <a name="M000112"></a><b>showFileOwner</b>( file ) </div> <div class="description"> <p> @@ -230,19 +230,19 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000111_source')" id="l_M000111_source">show source</a> ]</p> - <div id="M000111_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000112_source')" id="l_M000112_source">show source</a> ]</p> + <div id="M000112_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtReportManager.rb, line 176</span> -176: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">showFileOwner</span>( <span class="ruby-identifier">file</span> ) -177: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtReportManager.rb, line 178</span> +178: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">showFileOwner</span>( <span class="ruby-identifier">file</span> ) +179: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000107"></a><b>showFrozenPackages</b>() + <a name="M000108"></a><b>showFrozenPackages</b>() </div> <div class="description"> <p> @@ -253,8 +253,8 @@ </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000107_source')" id="l_M000107_source">show source</a> ]</p> - <div id="M000107_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000108_source')" id="l_M000108_source... [truncated message content] |
From: <esc...@us...> - 2006-12-03 11:15:02
|
Revision: 247 http://svn.sourceforge.net/abtlinux/?rev=247&view=rev Author: eschabell Date: 2006-12-03 03:15:01 -0800 (Sun, 03 Dec 2006) Log Message: ----------- Adjusted abt framework to make use of wrapped system call. Also fixed bug in test call for showJournal (missing file name). Modified Paths: -------------- src/trunk/AbtDownloadManager.rb src/trunk/AbtPackage.rb src/trunk/AbtPackageManager.rb src/trunk/AbtReportManager.rb src/trunk/TestAbtReportManager.rb src/trunk/abt.rb Modified: src/trunk/AbtDownloadManager.rb =================================================================== --- src/trunk/AbtDownloadManager.rb 2006-12-03 11:04:41 UTC (rev 246) +++ src/trunk/AbtDownloadManager.rb 2006-12-03 11:15:01 UTC (rev 247) @@ -53,17 +53,17 @@ # downloaded, otherwise false. ## def retrievePackageSource( packageName, destination ) - require packageName - logger = AbtLogManager.new - package = eval( packageName.capitalize + '.new' ) + logger = AbtLogManager.new + systemMgr = AbtSystemManager.new + package = eval( packageName.capitalize + '.new' ) if ( File.exist?( destination + "/" + File.basename( package.srcUrl ) ) ) logger.logToJournal( "Download not needed, existing source found for " + packageName ) return true end - if ( system( "cd " + destination + "; wget " + package.srcUrl ) ) # TODO: rm system call? + if ( systemMgr.runSystemCall( "cd " + destination + "; wget " + package.srcUrl ) ) logger.logToJournal( "Download completed for " + packageName ) return true end Modified: src/trunk/AbtPackage.rb =================================================================== --- src/trunk/AbtPackage.rb 2006-12-03 11:04:41 UTC (rev 246) +++ src/trunk/AbtPackage.rb 2006-12-03 11:15:01 UTC (rev 247) @@ -37,9 +37,10 @@ # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, otherwise false. ## def unpackSources - srcFile = File.basename( srcUrl ) + systemMgr = AbtSystemManager.new + srcFile = File.basename( srcUrl ) sourcesToUnpack = "#{$SOURCES_REPOSITORY}/#{srcFile}" - unpackTool = "" + unpackTool = "" # check for existing file in source repo. if ( !File.exist?( sourcesToUnpack ) ) @@ -80,8 +81,7 @@ #logger = AbtLogManager.new #logger.logToJournal( "DEBUG: unpack tool will be '#{unpackTool}'." ) - # TODO: system call removal? - if ( !system( "cd #{$BUILD_LOCATION}; #{unpackTool} #{sourcesToUnpack}" ) ) + if ( !systemMgr.runSystemCall( "cd #{$BUILD_LOCATION}; #{unpackTool} #{sourcesToUnpack}" ) ) return false end @@ -287,7 +287,6 @@ return true end - # TODO: system call removal? if ( !FileUtils.rm_rf buildSourcesLocation, :verbose => true ) return false end Modified: src/trunk/AbtPackageManager.rb =================================================================== --- src/trunk/AbtPackageManager.rb 2006-12-03 11:04:41 UTC (rev 246) +++ src/trunk/AbtPackageManager.rb 2006-12-03 11:15:01 UTC (rev 247) @@ -154,6 +154,8 @@ # <b>RETURN</b> <i>void</i> ## def rootLogin( arguments ) + systemMgr = AbtSystemManager.new + if ( Process.uid != 0 ) args = "" puts "\nEnter root password:" @@ -162,7 +164,7 @@ args = args + " " + ARGV[i] end - system( 'su -c "./abt ' + args + '" root' ) # TODO: replace system call? + systemMgr.runSystemCall( 'su -c "./abt ' + args + '" root' ) exit end end Modified: src/trunk/AbtReportManager.rb =================================================================== --- src/trunk/AbtReportManager.rb 2006-12-03 11:04:41 UTC (rev 246) +++ src/trunk/AbtReportManager.rb 2006-12-03 11:15:01 UTC (rev 247) @@ -149,7 +149,7 @@ # # <b> PARAM</b> <i>string</i> The complete path of the file to display. # - # <b>RETURN</b> <i>void.</i> + # <b>RETURN</b> <i>iboolean</i> True if journal shown, otherwise false. ## def showJournal( fileName ) if ( File.exist?( fileName ) ) @@ -164,6 +164,8 @@ puts "AbtLinux log ( #{File.basename( fileName )} ) is empty at this time." puts "\n\n" end + + return true end ## Modified: src/trunk/TestAbtReportManager.rb =================================================================== --- src/trunk/TestAbtReportManager.rb 2006-12-03 11:04:41 UTC (rev 246) +++ src/trunk/TestAbtReportManager.rb 2006-12-03 11:15:01 UTC (rev 247) @@ -86,7 +86,7 @@ # Test method for 'AbtReportManager.testShowJournal()' ## def testShowJournal - assert( @report.showJournal(), "testShowJournal()" ) + assert( @report.showJournal( $JOURNAL ), "testShowJournal()" ) end ## Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-12-03 11:04:41 UTC (rev 246) +++ src/trunk/abt.rb 2006-12-03 11:15:01 UTC (rev 247) @@ -25,11 +25,12 @@ # St, Fifth Floor, Boston, MA 02110-1301 USA ## require 'abtconfig' +require 'AbtDownloadManager' +require 'AbtLogManager' require 'AbtPackageManager' -require 'AbtLogManager' +require 'AbtQueueManager' require 'AbtReportManager' -require 'AbtDownloadManager' -require 'AbtQueueManager' +require 'AbtSystemManager' require 'AbtUsage' require 'fileutils' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-12-03 11:04:41
|
Revision: 246 http://svn.sourceforge.net/abtlinux/?rev=246&view=rev Author: eschabell Date: 2006-12-03 03:04:41 -0800 (Sun, 03 Dec 2006) Log Message: ----------- Added system call wrapping method, centralized future migration away from system. Modified Paths: -------------- src/trunk/AbtSystemManager.rb Modified: src/trunk/AbtSystemManager.rb =================================================================== --- src/trunk/AbtSystemManager.rb 2006-12-03 10:58:25 UTC (rev 245) +++ src/trunk/AbtSystemManager.rb 2006-12-03 11:04:41 UTC (rev 246) @@ -134,10 +134,27 @@ # # <b>PARAM</b> <i>String</i> - the location of the package tree. # - # <b>RETURN</b> <i>boolean</i> - True if the package tree location is set, otherwise - # false. + # <b>RETURN</b> <i>boolean</i> - True if the package tree location is set, + # otherwise false. ## def setPackageTreeLocation( location ) end -end \ No newline at end of file + ## + # Our in house system call wrapper. Used to control any system calls made in + # abt. Need to sort out tracking of stderr, stdout, stdin with open3? + # Eventually replace any need for system here. + # + # <b>PARAM</b> <i>String</i> - the call to pass to system. + # + # <b>RETURN</b> <i>boolean</i> - True if system call successful, otherwise + # false. + ## + def runSystemCall( command ) + if ( !system( command ) ) + return false + end + + return true + end +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 10:54:37
|
Revision: 244 http://svn.sourceforge.net/abtlinux/?rev=244&view=rev Author: eschabell Date: 2006-12-03 02:54:36 -0800 (Sun, 03 Dec 2006) Log Message: ----------- Fix to get the basename of the journal correctly. Modified Paths: -------------- src/trunk/AbtReportManager.rb Modified: src/trunk/AbtReportManager.rb =================================================================== --- src/trunk/AbtReportManager.rb 2006-11-25 16:15:51 UTC (rev 243) +++ src/trunk/AbtReportManager.rb 2006-12-03 10:54:36 UTC (rev 244) @@ -161,7 +161,7 @@ puts "\n\n" else puts "\n\n" - puts "AbtLinux log ( #{fileName.basename} ) is empty at this time." + puts "AbtLinux log ( #{File.basename( fileName )} ) is empty at this time." puts "\n\n" 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-25 16:15:51
|
Revision: 243 http://svn.sourceforge.net/abtlinux/?rev=243&view=rev Author: eschabell Date: 2006-11-25 08:15:51 -0800 (Sat, 25 Nov 2006) Log Message: ----------- Regenerated api docs. Modified Paths: -------------- src/trunk/doc/classes/AbtDownloadManager.html src/trunk/doc/classes/AbtPackage.html src/trunk/doc/classes/AbtPackageManager.html src/trunk/doc/classes/AbtReportManager.html src/trunk/doc/classes/AbtUsage.html src/trunk/doc/created.rid src/trunk/doc/files/AbtDownloadManager_rb.html src/trunk/doc/files/AbtPackageManager_rb.html src/trunk/doc/files/AbtPackage_rb.html src/trunk/doc/files/AbtReportManager_rb.html src/trunk/doc/files/AbtUsage_rb.html src/trunk/doc/fr_method_index.html Modified: src/trunk/doc/classes/AbtDownloadManager.html =================================================================== --- src/trunk/doc/classes/AbtDownloadManager.html 2006-11-25 16:14:07 UTC (rev 242) +++ src/trunk/doc/classes/AbtDownloadManager.html 2006-11-25 16:15:51 UTC (rev 243) @@ -160,7 +160,7 @@ <div class="sectiontitle">Public Instance methods</div> <div class="method"> <div class="title"> - <a name="M000014"></a><b>retrieveNewsFeed</b>( uri ) + <a name="M000014"></a><b>retrieveNewsFeed</b>( uri, cleanLog = "false" ) </div> <div class="description"> <p> @@ -168,48 +168,61 @@ </p> <p> <b>PARAM</b> <em>String</em> - the uri of the rss news feed to be -retrieved. <b>RETURN</b> <em>boolean</em> - True if the AbTLinux news feed -has been retrieved, otherwise false. +retrieved. <b>PARAM</b> <em>String</em> - pass the value ‘true’ +to empty the log file, otherwise it will be appended. <b>RETURN</b> +<em>boolean</em> - True if the AbTLinux news feed has been retrieved, +otherwise false. </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"> <pre> - <span class="ruby-comment cmt"># File AbtDownloadManager.rb, line 92</span> - 92: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieveNewsFeed</span>( <span class="ruby-identifier">uri</span> ) - 93: <span class="ruby-identifier">require</span> <span class="ruby-value str">'net/http'</span> - 94: <span class="ruby-identifier">require</span> <span class="ruby-value str">'uri'</span> - 95: <span class="ruby-identifier">require</span> <span class="ruby-value str">'rss/1.0'</span> - 96: <span class="ruby-identifier">require</span> <span class="ruby-value str">'rss/2.0'</span> - 97: - 98: <span class="ruby-comment cmt"># pick up the abtlinux.org news feed.</span> - 99: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">news</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">get</span>( <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>( <span class="ruby-identifier">uri</span> ) ) ) -100: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to retrieve news feed #{uri}."</span> ) -101: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -102: <span class="ruby-keyword kw">end</span> -103: -104: <span class="ruby-comment cmt"># display the feeds.</span> -105: <span class="ruby-identifier">rss</span> = <span class="ruby-keyword kw">nil</span> -106: <span class="ruby-keyword kw">begin</span> -107: <span class="ruby-identifier">rss</span> = <span class="ruby-constant">RSS</span><span class="ruby-operator">::</span><span class="ruby-constant">Parser</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">news</span>, <span class="ruby-keyword kw">false</span>) -108: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">RSS</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span> -109: <span class="ruby-keyword kw">end</span> -110: -111: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">rss</span>.<span class="ruby-identifier">nil?</span> ) -112: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to display news feed as feed #{uri} is not RSS 1.0/2.0."</span> ) -113: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -114: <span class="ruby-keyword kw">else</span> -115: <span class="ruby-identifier">puts</span> <span class="ruby-node">"*** #{rss.channel.title} ***"</span> -116: -117: <span class="ruby-identifier">rss</span>.<span class="ruby-identifier">items</span>.<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">item</span>, <span class="ruby-identifier">itemCount</span><span class="ruby-operator">|</span> -118: <span class="ruby-identifier">itemCount</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> -119: <span class="ruby-identifier">puts</span> <span class="ruby-node">"#{itemCount} #{item.link} #{item.title}"</span> -120: <span class="ruby-keyword kw">end</span> -121: <span class="ruby-keyword kw">end</span> -122: -123: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> -124: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtDownloadManager.rb, line 94</span> + 94: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retrieveNewsFeed</span>( <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">cleanLog</span> = <span class="ruby-value str">"false"</span> ) + 95: <span class="ruby-identifier">require</span> <span class="ruby-value str">'net/http'</span> + 96: <span class="ruby-identifier">require</span> <span class="ruby-value str">'uri'</span> + 97: <span class="ruby-identifier">require</span> <span class="ruby-value str">'rss/1.0'</span> + 98: <span class="ruby-identifier">require</span> <span class="ruby-value str">'rss/2.0'</span> + 99: <span class="ruby-identifier">newsLog</span> = <span class="ruby-value str">""</span> +100: +101: <span class="ruby-comment cmt"># ensure we have our news logfile.</span> +102: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">cleanLog</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"true"</span> ) +103: <span class="ruby-identifier">newsLog</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">$ABTNEWS_LOG</span>, <span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">WRONLY</span><span class="ruby-operator">|</span><span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">TRUNC</span><span class="ruby-operator">|</span><span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">CREAT</span>, <span class="ruby-value">644</span> ) +104: <span class="ruby-keyword kw">else</span> +105: <span class="ruby-identifier">newsLog</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">$ABTNEWS_LOG</span>, <span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">WRONLY</span><span class="ruby-operator">|</span><span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">APPEND</span><span class="ruby-operator">|</span><span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">CREAT</span>, <span class="ruby-value">644</span> ) +106: <span class="ruby-keyword kw">end</span> +107: +108: <span class="ruby-comment cmt"># pick up the abtlinux.org news feed.</span> +109: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">news</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">get</span>( <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>( <span class="ruby-identifier">uri</span> ) ) ) +110: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to retrieve news feed #{uri}."</span> ) +111: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +112: <span class="ruby-keyword kw">end</span> +113: +114: <span class="ruby-comment cmt"># display the feeds.</span> +115: <span class="ruby-identifier">rss</span> = <span class="ruby-keyword kw">nil</span> +116: <span class="ruby-keyword kw">begin</span> +117: <span class="ruby-identifier">rss</span> = <span class="ruby-constant">RSS</span><span class="ruby-operator">::</span><span class="ruby-constant">Parser</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">news</span>, <span class="ruby-keyword kw">false</span>) +118: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">RSS</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span> +119: <span class="ruby-keyword kw">end</span> +120: +121: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">rss</span>.<span class="ruby-identifier">nil?</span> ) +122: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to display news feed as feed #{uri} is not RSS 1.0/2.0."</span> ) +123: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +124: <span class="ruby-keyword kw">else</span> +125: <span class="ruby-identifier">newsLog</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"*** #{rss.channel.title} ***"</span> +126: +127: <span class="ruby-identifier">rss</span>.<span class="ruby-identifier">items</span>.<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">item</span>, <span class="ruby-identifier">itemCount</span><span class="ruby-operator">|</span> +128: <span class="ruby-identifier">itemCount</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> +129: <span class="ruby-identifier">newsLog</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"#{itemCount} #{item.link} #{item.title}"</span> +130: <span class="ruby-keyword kw">end</span> +131: <span class="ruby-keyword kw">end</span> +132: +133: <span class="ruby-identifier">newsLog</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n"</span> +134: <span class="ruby-identifier">newsLog</span>.<span class="ruby-identifier">close</span> +135: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> +136: +137: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -308,9 +321,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000015_source')" id="l_M000015_source">show source</a> ]</p> <div id="M000015_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtDownloadManager.rb, line 134</span> -134: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">updatePackage</span> -135: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtDownloadManager.rb, line 147</span> +147: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">updatePackage</span> +148: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -332,9 +345,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000016_source')" id="l_M000016_source">show source</a> ]</p> <div id="M000016_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtDownloadManager.rb, line 143</span> -143: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">updatePackageTree</span> -144: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtDownloadManager.rb, line 156</span> +156: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">updatePackageTree</span> +157: <span class="ruby-keyword kw">end</span> </pre> </div> </div> Modified: src/trunk/doc/classes/AbtPackage.html =================================================================== --- src/trunk/doc/classes/AbtPackage.html 2006-11-25 16:14:07 UTC (rev 242) +++ src/trunk/doc/classes/AbtPackage.html 2006-11-25 16:15:51 UTC (rev 243) @@ -129,7 +129,7 @@ <li><a href="#M000031">post</a></li> <li><a href="#M000026">pre</a></li> <li><a href="#M000029">preinstall</a></li> - <li><a href="#M000032">removeBuildSources</a></li> + <li><a href="#M000032">removeBuild</a></li> <li><a href="#M000023">unpackSources</a></li> </ul> @@ -394,10 +394,10 @@ 231: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">configure</span> 232: <span class="ruby-comment cmt">#logger = AbtLogManager.new</span> 233: <span class="ruby-identifier">buildSite</span> = <span class="ruby-node">"#{$BUILD_LOCATION}/#{@srcDir}"</span> -234: <span class="ruby-comment cmt">#logger.logToJournal( "DEBUG: calling system - cd #{buildSite}; ./configure --prefix=#{$defaultPrefix}" )</span> +234: <span class="ruby-comment cmt">#logger.logToJournal( "DEBUG: calling system - cd #{buildSite}; ./configure --prefix=#{$DEFAULT_PREFIX}" )</span> 235: 236: <span class="ruby-comment cmt"># TODO: system call removal?</span> -237: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>( <span class="ruby-node">"cd #{buildSite}; ./configure --prefix=#{$defaultPrefix}"</span> ) ) +237: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>( <span class="ruby-node">"cd #{buildSite}; ./configure --prefix=#{$DEFAULT_PREFEX}"</span> ) ) 238: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> 239: <span class="ruby-keyword kw">end</span> 240: @@ -570,7 +570,7 @@ </div> <div class="method"> <div class="title"> - <a name="M000032"></a><b>removeBuildSources</b>() + <a name="M000032"></a><b>removeBuild</b>() </div> <div class="description"> <p> @@ -586,8 +586,8 @@ <div id="M000032_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File AbtPackage.rb, line 282</span> -282: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">removeBuildSources</span> -283: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">$removeBuildSources</span> ) +282: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">removeBuild</span> +283: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">$REMOVE_BUILD_SOURCES</span> ) 284: <span class="ruby-identifier">buildSourcesLocation</span> = <span class="ruby-node">"#{$BUILD_LOCATION}/#{srcDir}"</span> 285: 286: <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">buildSourcesLocation</span> ) ) Modified: src/trunk/doc/classes/AbtPackageManager.html =================================================================== --- src/trunk/doc/classes/AbtPackageManager.html 2006-11-25 16:14:07 UTC (rev 242) +++ src/trunk/doc/classes/AbtPackageManager.html 2006-11-25 16:15:51 UTC (rev 243) @@ -280,7 +280,7 @@ 91: <span class="ruby-comment cmt"># post section</span> 92: <span class="ruby-comment cmt"># remove build sources.</span> 93: <span class="ruby-comment cmt">#</span> - 94: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">sw</span>.<span class="ruby-identifier">removeBuildSources</span> ) + 94: <span class="ruby-keyword kw">if</span> ( <span class="ruby-operator">!</span><span class="ruby-identifier">sw</span>.<span class="ruby-identifier">removeBuild</span> ) 95: <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">logToJournal</span>( <span class="ruby-node">"Failed to remove the build sources for #{package}."</span> ) 96: <span class="ruby-comment cmt">#return false # commented out as this is not a reason to fail.</span> 97: <span class="ruby-keyword kw">end</span> Modified: src/trunk/doc/classes/AbtReportManager.html =================================================================== --- src/trunk/doc/classes/AbtReportManager.html 2006-11-25 16:14:07 UTC (rev 242) +++ src/trunk/doc/classes/AbtReportManager.html 2006-11-25 16:15:51 UTC (rev 243) @@ -179,9 +179,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000115_source')" id="l_M000115_source">show source</a> ]</p> <div id="M000115_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtReportManager.rb, line 238</span> -238: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generateHTMLPackageListing</span> -239: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtReportManager.rb, line 240</span> +240: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generateHTMLPackageListing</span> +241: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -207,9 +207,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000112_source')" id="l_M000112_source">show source</a> ]</p> <div id="M000112_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtReportManager.rb, line 186</span> -186: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">searchPackageDescriptions</span>( <span class="ruby-identifier">searchText</span> ) -187: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtReportManager.rb, line 188</span> +188: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">searchPackageDescriptions</span>( <span class="ruby-identifier">searchText</span> ) +189: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -233,9 +233,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000111_source')" id="l_M000111_source">show source</a> ]</p> <div id="M000111_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtReportManager.rb, line 174</span> -174: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">showFileOwner</span>( <span class="ruby-identifier">file</span> ) -175: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtReportManager.rb, line 176</span> +176: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">showFileOwner</span>( <span class="ruby-identifier">file</span> ) +177: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -288,13 +288,16 @@ </div> <div class="method"> <div class="title"> - <a name="M000110"></a><b>showJournal</b>() + <a name="M000110"></a><b>showJournal</b>( fileName ) </div> <div class="description"> <p> Display the AbTLinux journal file. </p> <p> +<b> PARAM</b> <em>string</em> The complete path of the file to display. +</p> +<p> <b>RETURN</b> <em>void.</em> </p> </div> @@ -302,21 +305,21 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000110_source')" id="l_M000110_source">show source</a> ]</p> <div id="M000110_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtReportManager.rb, line 152</span> -152: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">showJournal</span> -153: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>( <span class="ruby-identifier">$JOURNAL</span> ) ) -154: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> -155: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"AbTLinux journal:"</span> -156: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"================="</span> -157: <span class="ruby-identifier">log</span> = <span class="ruby-constant">IO</span>.<span class="ruby-identifier">readlines</span>( <span class="ruby-identifier">$JOURNAL</span> ) -158: <span class="ruby-identifier">log</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">entry</span><span class="ruby-operator">|</span> <span class="ruby-identifier">puts</span> <span class="ruby-identifier">entry</span> } -159: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> -160: <span class="ruby-keyword kw">else</span> + <span class="ruby-comment cmt"># File AbtReportManager.rb, line 154</span> +154: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">showJournal</span>( <span class="ruby-identifier">fileName</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">fileName</span> ) ) +156: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> +157: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"AbTLinux log:"</span> +158: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"============="</span> +159: <span class="ruby-identifier">log</span> = <span class="ruby-constant">IO</span>.<span class="ruby-identifier">readlines</span>( <span class="ruby-identifier">fileName</span> ) +160: <span class="ruby-identifier">log</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">entry</span><span class="ruby-operator">|</span> <span class="ruby-identifier">puts</span> <span class="ruby-identifier">entry</span> } 161: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> -162: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"AbtLinux journal is empty at this time."</span> +162: <span class="ruby-keyword kw">else</span> 163: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> -164: <span class="ruby-keyword kw">end</span> -165: <span class="ruby-keyword kw">end</span> +164: <span class="ruby-identifier">puts</span> <span class="ruby-node">"AbtLinux log ( #{fileName.basename} ) is empty at this time."</span> +165: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> +166: <span class="ruby-keyword kw">end</span> +167: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -467,29 +470,29 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000113_source')" id="l_M000113_source">show source</a> ]</p> <div id="M000113_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtReportManager.rb, line 197</span> -197: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">showQueue</span>( <span class="ruby-identifier">queueType</span> ) -198: <span class="ruby-identifier">queueFile</span> = <span class="ruby-node">"#{$ABT_LOGS}/#{queueType}.log"</span> -199: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">queueType</span> -200: -201: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"install"</span> -202: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>( <span class="ruby-identifier">queueFile</span> ) ) -203: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> -204: <span class="ruby-identifier">puts</span> <span class="ruby-node">"AbTLinux #{queueType} queue:"</span> -205: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"======================="</span> -206: <span class="ruby-identifier">queue</span> = <span class="ruby-constant">IO</span>.<span class="ruby-identifier">readlines</span>( <span class="ruby-identifier">queueFile</span> ) -207: <span class="ruby-identifier">queue</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">entry</span><span class="ruby-operator">|</span> <span class="ruby-identifier">puts</span> <span class="ruby-identifier">entry</span> } -208: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> -209: <span class="ruby-keyword kw">else</span> + <span class="ruby-comment cmt"># File AbtReportManager.rb, line 199</span> +199: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">showQueue</span>( <span class="ruby-identifier">queueType</span> ) +200: <span class="ruby-identifier">queueFile</span> = <span class="ruby-node">"#{$ABT_LOGS}/#{queueType}.log"</span> +201: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">queueType</span> +202: +203: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"install"</span> +204: <span class="ruby-keyword kw">if</span> ( <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>( <span class="ruby-identifier">queueFile</span> ) ) +205: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> +206: <span class="ruby-identifier">puts</span> <span class="ruby-node">"AbTLinux #{queueType} queue:"</span> +207: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"======================="</span> +208: <span class="ruby-identifier">queue</span> = <span class="ruby-constant">IO</span>.<span class="ruby-identifier">readlines</span>( <span class="ruby-identifier">queueFile</span> ) +209: <span class="ruby-identifier">queue</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">entry</span><span class="ruby-operator">|</span> <span class="ruby-identifier">puts</span> <span class="ruby-identifier">entry</span> } 210: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> -211: <span class="ruby-identifier">puts</span> <span class="ruby-node">"AbtLinux #{queueType} is empty at this time."</span> +211: <span class="ruby-keyword kw">else</span> 212: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> -213: <span class="ruby-keyword kw">end</span> -214: -215: <span class="ruby-keyword kw">else</span> -216: <span class="ruby-identifier">puts</span> <span class="ruby-node">"#{queueType.capitalize} is not an AbTLinux queue."</span> -217: <span class="ruby-keyword kw">end</span> -218: <span class="ruby-keyword kw">end</span> +213: <span class="ruby-identifier">puts</span> <span class="ruby-node">"AbtLinux #{queueType} is empty at this time."</span> +214: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\n\n"</span> +215: <span class="ruby-keyword kw">end</span> +216: +217: <span class="ruby-keyword kw">else</span> +218: <span class="ruby-identifier">puts</span> <span class="ruby-node">"#{queueType.capitalize} is not an AbTLinux queue."</span> +219: <span class="ruby-keyword kw">end</span> +220: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -540,9 +543,9 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000114_source')" id="l_M000114_source">show source</a> ]</p> <div id="M000114_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtReportManager.rb, line 230</span> -230: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">showUpdates</span>( <span class="ruby-identifier">target</span> ) -231: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtReportManager.rb, line 232</span> +232: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">showUpdates</span>( <span class="ruby-identifier">target</span> ) +233: <span class="ruby-keyword kw">end</span> </pre> </div> </div> Modified: src/trunk/doc/classes/AbtUsage.html =================================================================== --- src/trunk/doc/classes/AbtUsage.html 2006-11-25 16:14:07 UTC (rev 242) +++ src/trunk/doc/classes/AbtUsage.html 2006-11-25 16:15:51 UTC (rev 243) @@ -204,13 +204,13 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000037_source')" id="l_M000037_source">show source</a> ]</p> <div id="M000037_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtUsage.rb, line 121</span> -121: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usageDownloads</span> -122: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\ndownloads:"</span> -123: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" -d, download [package]\t\tRetrieve given package sources."</span> -124: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" -u, update [package]|[tree]\tUpdate given package or tree from AbTLinux repository."</span> -125: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" -n, news\t\t\t\tDisplays newsfeeds from AbTLinux website.\n"</span> -126: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtUsage.rb, line 122</span> +122: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usageDownloads</span> +123: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\ndownloads:"</span> +124: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" -d, download [package]\t\tRetrieve given package sources."</span> +125: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" -u, update [package]|[tree]\tUpdate given package or tree from AbTLinux repository."</span> +126: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" -n, news\t\t\t\tDisplays newsfeeds from AbTLinux website.\n"</span> +127: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -231,17 +231,17 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000038_source')" id="l_M000038_source">show source</a> ]</p> <div id="M000038_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtUsage.rb, line 133</span> -133: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usageFix</span> -134: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\nfix:"</span> -135: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" purge-src\t\t\t\tRemove source caches for packages no longer installed."</span> -136: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" purge-logs\t\t\t\tRemove log files for packages no longer installed."</span> -137: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" verify-files [package]\t\tInstalled files are verified for given package."</span> -138: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" verify-symlinks [package]\t\tSymlinks verified for given package."</span> -139: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" verify-deps [package]\t\tDependency tree is verified for given package."</span> -140: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" verify-integrity [package]\t\tVerify integrity of installed files for given package."</span> -141: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" fix [package]\t\tGiven package is verified and fixed if needed.\n"</span> -142: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtUsage.rb, line 134</span> +134: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usageFix</span> +135: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\nfix:"</span> +136: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" purge-src\t\t\t\tRemove source caches for packages no longer installed."</span> +137: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" purge-logs\t\t\t\tRemove log files for packages no longer installed."</span> +138: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" verify-files [package]\t\tInstalled files are verified for given package."</span> +139: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" verify-symlinks [package]\t\tSymlinks verified for given package."</span> +140: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" verify-deps [package]\t\tDependency tree is verified for given package."</span> +141: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" verify-integrity [package]\t\tVerify integrity of installed files for given package."</span> +142: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" fix [package]\t\tGiven package is verified and fixed if needed.\n"</span> +143: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -262,13 +262,13 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000036_source')" id="l_M000036_source">show source</a> ]</p> <div id="M000036_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtUsage.rb, line 109</span> -109: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usageGeneration</span> -110: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\ngeneration:"</span> -111: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-updates\t\tShow a package listing with available update versions."</span> -112: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" html\t\t\tGenerate HTML page from installed packages:"</span> -113: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" \t\t\t\t(package name with hyperlink to package website and version installed)\n"</span> -114: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtUsage.rb, line 110</span> +110: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usageGeneration</span> +111: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\ngeneration:"</span> +112: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-updates\t\tShow a package listing with available update versions."</span> +113: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" html\t\t\tGenerate HTML page from installed packages:"</span> +114: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" \t\t\t\t(package name with hyperlink to package website and version installed)\n"</span> +115: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -289,15 +289,15 @@ <p class="source-link">[ <a href="javascript:toggleSource('M000039_source')" id="l_M000039_source">show source</a> ]</p> <div id="M000039_source" class="dyn-source"> <pre> - <span class="ruby-comment cmt"># File AbtUsage.rb, line 149</span> -149: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usageMaintenance</span> -150: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\nmaintenance:"</span> -151: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" build-location [host]\t\tSets global location (default: localhost) for retrieving cached package builds."</span> -152: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" package-repo [add|remove|list] [URI]"</span> -153: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" add - add package repository to list."</span> -154: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" remove - remove a package repository from list."</span> -155: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" list - display current repository list.\n"</span> -156: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File AbtUsage.rb, line 150</span> +150: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usageMaintenance</span> +151: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\nmaintenance:"</span> +152: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" build-location [host]\t\tSets global location (default: localhost) for retrieving cached package builds."</span> +153: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" package-repo [add|remove|list] [URI]"</span> +154: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" add - add package repository to list."</span> +155: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" remove - remove a package repository from list."</span> +156: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" list - display current repository list.\n"</span> +157: <span class="ruby-keyword kw">end</span> </pre> </div> </div> @@ -351,18 +351,19 @@ 88: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">usageQueries</span> 89: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\nqueries:"</span> 90: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" -s, search [string | regexp ]\tSearch package descriptions for given input."</span> - 91: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-details [package]\t\tShow give package details."</span> - 92: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-build [package]\t\tShow build log of given package."</span> - 93: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-depends [package]\t\tShow the dependency tree of given package."</span> - 94: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-files [package]\t\tShow all installed files from given package."</span> - 95: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-owner [file]\t\tShow the package owning given file."</span> - 96: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-installed\t\t\tShow list of all installed packages."</span> - 97: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-frozen\t\t\t\tShow list of all frozen packages."</span> - 98: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-untracked\t\t\tShow all files on system not tracked by AbTLinux."</span> - 99: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-journal\t\t\t\tShow the system journal."</span> -100: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-iqueue\t\t\t\tShow the contents of the install queue."</span> -101: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-patches\t\t\t\tShow the current available patches for installed package tree.\n"</span> -102: <span class="ruby-keyword kw">end</span> + 91: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" -v, --version\t\t\tShow abt package manager version."</span> + 92: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-details [package]\t\tShow give package details."</span> + 93: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-build [package]\t\tShow build log of given package."</span> + 94: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-depends [package]\t\tShow the dependency tree of given package."</span> + 95: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-files [package]\t\tShow all installed files from given package."</span> + 96: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-owner [file]\t\tShow the package owning given file."</span> + 97: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-installed\t\t\tShow list of all installed packages."</span> + 98: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-frozen\t\t\t\tShow list of all frozen packages."</span> + 99: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-untracked\t\t\tShow all files on system not tracked by AbTLinux."</span> +100: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-journal\t\t\t\tShow the system journal."</span> +101: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-iqueue\t\t\t\tShow the contents of the install queue."</span> +102: <span class="ruby-identifier">puts</span> <span class="ruby-value str">" show-patches\t\t\t\tShow the current available patches for installed package tree.\n"</span> +103: <span class="ruby-keyword kw">end</span> </pre> </div> </div> Modified: src/trunk/doc/created.rid =================================================================== --- src/trunk/doc/created.rid 2006-11-25 16:14:07 UTC (rev 242) +++ src/trunk/doc/created.rid 2006-11-25 16:15:51 UTC (rev 243) @@ -1 +1 @@ -Wed Nov 22 21:07:37 CET 2006 +Sat Nov 25 17:14:28 CET 2006 Modified: src/trunk/doc/files/AbtDownloadManager_rb.html =================================================================== --- src/trunk/doc/files/AbtDownloadManager_rb.html 2006-11-25 16:14:07 UTC (rev 242) +++ src/trunk/doc/files/AbtDownloadManager_rb.html 2006-11-25 16:15:51 UTC (rev 243) @@ -63,7 +63,7 @@ </tr> <tr> <td>Modified:</td> - <td>Sun Nov 19 11:56:11 CET 2006</td> + <td>Sat Nov 25 17:14:05 CET 2006</td> </tr> </table> </td></tr> Modified: src/trunk/doc/files/AbtPackageManager_rb.html =================================================================== --- src/trunk/doc/files/AbtPackageManager_rb.html 2006-11-25 16:14:07 UTC (rev 242) +++ src/trunk/doc/files/AbtPackageManager_rb.html 2006-11-25 16:15:51 UTC (rev 243) @@ -63,7 +63,7 @@ </tr> <tr> <td>Modified:</td> - <td>Wed Nov 22 21:02:42 CET 2006</td> + <td>Sat Nov 25 17:14:05 CET 2006</td> </tr> </table> </td></tr> Modified: src/trunk/doc/files/AbtPackage_rb.html =================================================================== --- src/trunk/doc/files/AbtPackage_rb.html 2006-11-25 16:14:07 UTC (rev 242) +++ src/trunk/doc/files/AbtPackage_rb.html 2006-11-25 16:15:51 UTC (rev 243) @@ -63,7 +63,7 @@ </tr> <tr> <td>Modified:</td> - <td>Wed Nov 22 21:02:42 CET 2006</td> + <td>Sat Nov 25 17:14:05 CET 2006</td> </tr> </table> </td></tr> Modified: src/trunk/doc/files/AbtReportManager_rb.html =================================================================== --- src/trunk/doc/files/AbtReportManager_rb.html 2006-11-25 16:14:07 UTC (rev 242) +++ src/trunk/doc/files/AbtReportManager_rb.html 2006-11-25 16:15:51 UTC (rev 243) @@ -63,7 +63,7 @@ </tr> <tr> <td>Modified:</td> - <td>Sat Nov 18 16:25:16 CET 2006</td> + <td>Sat Nov 25 17:14:05 CET 2006</td> </tr> </table> </td></tr> Modified: src/trunk/doc/files/AbtUsage_rb.html =================================================================== --- src/trunk/doc/files/AbtUsage_rb.html 2006-11-25 16:14:07 UTC (rev 242) +++ src/trunk/doc/files/AbtUsage_rb.html 2006-11-25 16:15:51 UTC (rev 243) @@ -63,7 +63,7 @@ </tr> <tr> <td>Modified:</td> - <td>Sat Nov 18 12:58:14 CET 2006</td> + <td>Sat Nov 25 17:14:05 CET 2006</td> </tr> </table> </td></tr> Modified: src/trunk/doc/fr_method_index.html =================================================================== --- src/trunk/doc/fr_method_index.html 2006-11-25 16:14:07 UTC (rev 242) +++ src/trunk/doc/fr_method_index.html 2006-11-25 16:15:51 UTC (rev 243) @@ -70,7 +70,7 @@ <a href="classes/AbtPackage.html#M000026">pre (AbtPackage)</a><br> <a href="classes/AbtPackage.html#M000029">preinstall (AbtPackage)</a><br> <a href="classes/AbtPackageManager.html#M000042">reinstallPackage (AbtPackageManager)</a><br> -<a href="classes/AbtPackage.html#M000032">removeBuildSources (AbtPackage)</a><br> +<a href="classes/AbtPackage.html#M000032">removeBuild (AbtPackage)</a><br> <a href="classes/AbtPackageManager.html#M000043">removePackage (AbtPackageManager)</a><br> <a href="classes/AbtDownloadManager.html#M000014">retrieveNewsFeed (AbtDownloadManager)</a><br> <a href="classes/AbtDownloadManager.html#M000012">retrievePackageSource (AbtDownloadManager)</a><br> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-25 16:14:07
|
Revision: 242 http://svn.sourceforge.net/abtlinux/?rev=242&view=rev Author: eschabell Date: 2006-11-25 08:14:07 -0800 (Sat, 25 Nov 2006) Log Message: ----------- Updated to work with the new log display method. Modified Paths: -------------- src/trunk/abt.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2006-11-25 16:13:17 UTC (rev 241) +++ src/trunk/abt.rb 2006-11-25 16:14:07 UTC (rev 242) @@ -198,7 +198,7 @@ # abt show-journal when "show-journal" - reporter.showJournal + reporter.showJournal( $JOURNAL ) when "show-iqueue" puts "Display contents of install queue." @@ -223,7 +223,7 @@ # abtlinux.org news feeds. puts "\n" - if ( !downloader.retrieveNewsFeed( $ABTNEWS ) ) + if ( !downloader.retrieveNewsFeed( $ABTNEWS , "true" ) ) puts "Failed to retrieve the AbTLinux news feed." end @@ -236,6 +236,9 @@ if ( !downloader.retrieveNewsFeed( $ABTNEWS_POSTS ) ) puts "Failed to retrieve the AbTLinux new posts news feed." end + + # display the file contents. + reporter.showJournal( $ABTNEWS_LOG ) logger.logToJournal( "Completed the retrieval of AbTLinux news." ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2006-11-25 16:13:17
|
Revision: 241 http://svn.sourceforge.net/abtlinux/?rev=241&view=rev Author: eschabell Date: 2006-11-25 08:13:17 -0800 (Sat, 25 Nov 2006) Log Message: ----------- Parameterized the showJournal method to allow for any log file to be displayed. Modified Paths: -------------- src/trunk/AbtReportManager.rb Modified: src/trunk/AbtReportManager.rb =================================================================== --- src/trunk/AbtReportManager.rb 2006-11-25 16:11:11 UTC (rev 240) +++ src/trunk/AbtReportManager.rb 2006-11-25 16:13:17 UTC (rev 241) @@ -147,19 +147,21 @@ ## # Display the AbTLinux journal file. # + # <b> PARAM</b> <i>string</i> The complete path of the file to display. + # # <b>RETURN</b> <i>void.</i> ## - def showJournal - if ( File.exist?( $JOURNAL ) ) + def showJournal( fileName ) + if ( File.exist?( fileName ) ) puts "\n\n" - puts "AbTLinux journal:" - puts "=================" - log = IO.readlines( $JOURNAL ) + puts "AbTLinux log:" + puts "=============" + log = IO.readlines( fileName ) log.each{ |entry| puts entry } puts "\n\n" else puts "\n\n" - puts "AbtLinux journal is empty at this time." + puts "AbtLinux log ( #{fileName.basename} ) is empty at this time." puts "\n\n" 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-25 16:11:11
|
Revision: 240 http://svn.sourceforge.net/abtlinux/?rev=240&view=rev Author: eschabell Date: 2006-11-25 08:11:11 -0800 (Sat, 25 Nov 2006) Log Message: ----------- Sorted the globals. Modified Paths: -------------- src/trunk/abtconfig.rb Modified: src/trunk/abtconfig.rb =================================================================== --- src/trunk/abtconfig.rb 2006-11-25 16:09:51 UTC (rev 239) +++ src/trunk/abtconfig.rb 2006-11-25 16:11:11 UTC (rev 240) @@ -26,11 +26,12 @@ ## # default paths / locations. +$ABT_LOGS = "/var/log/abt" +$ABTNEWS_LOG = "#{$ABT_LOGS}/news.log" +$BUILD_LOCATION = "/usr/src" +$JOURNAL = "#{$ABT_LOGS}/journal.log" $PACKAGE_PATH = "./packages/" $SOURCES_REPOSITORY = "/var/spool/abt/sources" -$BUILD_LOCATION = "/usr/src" -$ABT_LOGS = "/var/log/abt" -$JOURNAL = "#{$ABT_LOGS}/journal.log" # default config options. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |