RuPac 0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. data/doc/classes/RuPacRemove.html +127 -0
  2. data/doc/classes/RuPacRemove/PacRemove.html +473 -0
  3. data/doc/classes/RuPacRemove/PacRemove.src/M000008.html +18 -0
  4. data/doc/classes/RuPacRemove/PacRemove.src/M000009.html +24 -0
  5. data/doc/classes/RuPacRemove/PacRemove.src/M000010.html +24 -0
  6. data/doc/classes/RuPacRemove/PacRemove.src/M000011.html +24 -0
  7. data/doc/classes/RuPacRemove/PacRemove.src/M000012.html +24 -0
  8. data/doc/classes/RuPacRemove/PacRemove.src/M000013.html +24 -0
  9. data/doc/classes/RuPacRemove/PacRemove.src/M000014.html +24 -0
  10. data/doc/classes/RuPacRemove/PacRemove.src/M000015.html +24 -0
  11. data/doc/classes/RuPacRemove/PacRemove.src/M000016.html +24 -0
  12. data/doc/classes/RuPacRemove/PacRemove.src/M000017.html +24 -0
  13. data/doc/classes/RuPacRemove/PacRemove.src/M000018.html +24 -0
  14. data/doc/classes/RuPacRemove/PacRemove.src/M000019.html +24 -0
  15. data/doc/classes/RuPacRemove/PacRemove.src/M000020.html +24 -0
  16. data/doc/classes/RuPacRemove/PacRemove.src/M000021.html +24 -0
  17. data/doc/classes/RuPacRemove/PacRemove.src/M000022.html +24 -0
  18. data/doc/classes/RuPacRemove/PacRemove.src/M000023.html +24 -0
  19. data/doc/classes/RuPacSync.html +119 -0
  20. data/doc/classes/RuPacSync/PacSync.html +280 -0
  21. data/doc/classes/RuPacSync/PacSync.src/M000024.html +19 -0
  22. data/doc/classes/RuPacSync/PacSync.src/M000025.html +24 -0
  23. data/doc/classes/RuPacSync/PacSync.src/M000026.html +24 -0
  24. data/doc/classes/RuPacSync/PacSync.src/M000027.html +24 -0
  25. data/doc/classes/RuPacSync/PacSync.src/M000028.html +24 -0
  26. data/doc/classes/RuPacSync/PacSync.src/M000029.html +24 -0
  27. data/doc/classes/RuPacSync/PacSync.src/M000030.html +24 -0
  28. data/doc/classes/Rupac.html +124 -0
  29. data/doc/classes/Rupac/Pacman.html +283 -0
  30. data/doc/classes/Rupac/Pacman.src/M000001.html +19 -0
  31. data/doc/classes/Rupac/Pacman.src/M000002.html +22 -0
  32. data/doc/classes/Rupac/Pacman.src/M000003.html +22 -0
  33. data/doc/classes/Rupac/Pacman.src/M000004.html +21 -0
  34. data/doc/classes/Rupac/Pacman.src/M000005.html +21 -0
  35. data/doc/classes/Rupac/Pacman.src/M000006.html +18 -0
  36. data/doc/classes/Rupac/Pacman.src/M000007.html +45 -0
  37. data/doc/classes/Rupac/Pacman/PacSync.html +254 -0
  38. data/doc/classes/Rupac/Pacman/PacSync.src/M000003.html +18 -0
  39. data/doc/classes/Rupac/Pacman/PacSync.src/M000004.html +25 -0
  40. data/doc/classes/Rupac/Pacman/PacSync.src/M000005.html +24 -0
  41. data/doc/classes/Rupac/Pacman/PacSync.src/M000006.html +25 -0
  42. data/doc/classes/Rupac/Pacman/PacSync.src/M000007.html +24 -0
  43. data/doc/classes/Rupac/Pacman/PacSync.src/M000008.html +24 -0
  44. data/doc/classes/Rupac/Pacman/PacSync.src/M000009.html +24 -0
  45. data/doc/created.rid +1 -0
  46. data/doc/dot/f_0.dot +48 -0
  47. data/doc/dot/f_0.png +0 -0
  48. data/doc/dot/f_1.dot +58 -0
  49. data/doc/dot/f_1.png +0 -0
  50. data/doc/dot/f_2.dot +39 -0
  51. data/doc/dot/f_2.png +0 -0
  52. data/doc/dot/m_0_0.dot +48 -0
  53. data/doc/dot/m_0_0.png +0 -0
  54. data/doc/dot/m_1_0.dot +58 -0
  55. data/doc/dot/m_1_0.png +0 -0
  56. data/doc/dot/m_2_0.dot +39 -0
  57. data/doc/dot/m_2_0.png +0 -0
  58. data/doc/files/rupac_rb.html +119 -0
  59. data/doc/files/rupacremove_rb.html +117 -0
  60. data/doc/files/rupacsync_rb.html +123 -0
  61. data/doc/fr_class_index.html +32 -0
  62. data/doc/fr_file_index.html +29 -0
  63. data/doc/fr_method_index.html +56 -0
  64. data/doc/index.html +24 -0
  65. data/lib/rupac.rb +116 -0
  66. data/lib/rupacremove.rb +206 -0
  67. data/lib/rupacsync.rb +95 -0
  68. metadata +123 -0
@@ -0,0 +1,117 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>File: rupacremove.rb</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="fileHeader">
50
+ <h1>rupacremove.rb</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>rupacremove.rb
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Tue Oct 17 19:11:36 EDT 2006</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+ <div id="diagram">
71
+ <map id="map" name="map">
72
+ <area shape="RECT" coords="19,5,91,53" href="../classes/Pacman.html" alt="Pacman">
73
+ <area shape="RECT" coords="27,124,112,172" href="../classes/RuPacRemove/PacRemove.html" alt="PacRemove">
74
+ <area shape="RECT" coords="115,5,187,53" href="../classes/RuPac.html" alt="RuPac">
75
+ <area shape="RECT" coords="16,91,149,183" href="../classes/RuPacRemove.html" alt="RuPacRemove">
76
+ </map>
77
+ <img src="../dot/f_1.png" usemap="#map" border=0 alt="TopLevel">
78
+ </div>
79
+
80
+
81
+ <div id="requires-list">
82
+ <h3 class="section-bar">Required files</h3>
83
+
84
+ <div class="name-list">
85
+ rupac.rb&nbsp;&nbsp;
86
+ </div>
87
+ </div>
88
+
89
+ </div>
90
+
91
+
92
+ </div>
93
+
94
+
95
+ <!-- if includes -->
96
+
97
+ <div id="section">
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+ <!-- if method_list -->
107
+
108
+
109
+ </div>
110
+
111
+
112
+ <div id="validator-badges">
113
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
114
+ </div>
115
+
116
+ </body>
117
+ </html>
@@ -0,0 +1,123 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>File: rupacsync.rb</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="fileHeader">
50
+ <h1>rupacsync.rb</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>rupacsync.rb
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Tue Oct 17 19:11:33 EDT 2006</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+ <div id="diagram">
71
+ <map id="map" name="map">
72
+ <area shape="RECT" coords="53,5,125,53" href="../classes/Pacman.html" alt="Pacman">
73
+ <area shape="RECT" coords="53,124,125,172" href="../classes/RuPacSync/PacSync.html" alt="PacSync">
74
+ <area shape="RECT" coords="16,91,136,183" href="../classes/RuPacSync.html" alt="RuPacSync">
75
+ </map>
76
+ <img src="../dot/f_0.png" usemap="#map" border=0 alt="TopLevel">
77
+ </div>
78
+
79
+
80
+ <div id="requires-list">
81
+ <h3 class="section-bar">Required files</h3>
82
+
83
+ <div class="name-list">
84
+ rupac.rb&nbsp;&nbsp;
85
+ </div>
86
+ </div>
87
+
88
+ </div>
89
+
90
+
91
+ </div>
92
+
93
+
94
+ <!-- if includes -->
95
+ <div id="includes">
96
+ <h3 class="section-bar">Included Modules</h3>
97
+
98
+ <div id="includes-list">
99
+ <span class="include-name"><a href="../classes/RuPac.html">RuPac</a></span>
100
+ </div>
101
+ </div>
102
+
103
+ <div id="section">
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+ <!-- if method_list -->
113
+
114
+
115
+ </div>
116
+
117
+
118
+ <div id="validator-badges">
119
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
120
+ </div>
121
+
122
+ </body>
123
+ </html>
@@ -0,0 +1,32 @@
1
+
2
+ <?xml version="1.0" encoding="iso-8859-1"?>
3
+ <!DOCTYPE html
4
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
5
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
6
+
7
+ <!--
8
+
9
+ Classes
10
+
11
+ -->
12
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
13
+ <head>
14
+ <title>Classes</title>
15
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
16
+ <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
17
+ <base target="docwin" />
18
+ </head>
19
+ <body>
20
+ <div id="index">
21
+ <h1 class="section-bar">Classes</h1>
22
+ <div id="index-entries">
23
+ <a href="classes/RuPac.html">RuPac</a><br />
24
+ <a href="classes/RuPac/Pacman.html">RuPac::Pacman</a><br />
25
+ <a href="classes/RuPacRemove.html">RuPacRemove</a><br />
26
+ <a href="classes/RuPacRemove/PacRemove.html">RuPacRemove::PacRemove</a><br />
27
+ <a href="classes/RuPacSync.html">RuPacSync</a><br />
28
+ <a href="classes/RuPacSync/PacSync.html">RuPacSync::PacSync</a><br />
29
+ </div>
30
+ </div>
31
+ </body>
32
+ </html>
@@ -0,0 +1,29 @@
1
+
2
+ <?xml version="1.0" encoding="iso-8859-1"?>
3
+ <!DOCTYPE html
4
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
5
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
6
+
7
+ <!--
8
+
9
+ Files
10
+
11
+ -->
12
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
13
+ <head>
14
+ <title>Files</title>
15
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
16
+ <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
17
+ <base target="docwin" />
18
+ </head>
19
+ <body>
20
+ <div id="index">
21
+ <h1 class="section-bar">Files</h1>
22
+ <div id="index-entries">
23
+ <a href="files/rupac_rb.html">rupac.rb</a><br />
24
+ <a href="files/rupacremove_rb.html">rupacremove.rb</a><br />
25
+ <a href="files/rupacsync_rb.html">rupacsync.rb</a><br />
26
+ </div>
27
+ </div>
28
+ </body>
29
+ </html>
@@ -0,0 +1,56 @@
1
+
2
+ <?xml version="1.0" encoding="iso-8859-1"?>
3
+ <!DOCTYPE html
4
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
5
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
6
+
7
+ <!--
8
+
9
+ Methods
10
+
11
+ -->
12
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
13
+ <head>
14
+ <title>Methods</title>
15
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
16
+ <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
17
+ <base target="docwin" />
18
+ </head>
19
+ <body>
20
+ <div id="index">
21
+ <h1 class="section-bar">Methods</h1>
22
+ <div id="index-entries">
23
+ <a href="classes/RuPacSync/PacSync.html#M000029">allClean (RuPacSync::PacSync)</a><br />
24
+ <a href="classes/RuPacRemove/PacRemove.html#M000023">allOpts (RuPacRemove::PacRemove)</a><br />
25
+ <a href="classes/RuPacRemove/PacRemove.html#M000019">casKeepNoSave (RuPacRemove::PacRemove)</a><br />
26
+ <a href="classes/RuPacRemove/PacRemove.html#M000022">casKeepRecursive (RuPacRemove::PacRemove)</a><br />
27
+ <a href="classes/RuPacRemove/PacRemove.html#M000021">casNoSaveRecursive (RuPacRemove::PacRemove)</a><br />
28
+ <a href="classes/RuPacRemove/PacRemove.html#M000009">cascade (RuPacRemove::PacRemove)</a><br />
29
+ <a href="classes/RuPacSync/PacSync.html#M000030">downOnly (RuPacSync::PacSync)</a><br />
30
+ <a href="classes/RuPac/Pacman.html#M000007">exec (RuPac::Pacman)</a><br />
31
+ <a href="classes/RuPac/Pacman.html#M000004">force! (RuPac::Pacman)</a><br />
32
+ <a href="classes/RuPac/Pacman.html#M000002">force? (RuPac::Pacman)</a><br />
33
+ <a href="classes/RuPacSync/PacSync.html#M000027">install (RuPacSync::PacSync)</a><br />
34
+ <a href="classes/RuPacRemove/PacRemove.html#M000010">keep (RuPacRemove::PacRemove)</a><br />
35
+ <a href="classes/RuPacRemove/PacRemove.html#M000014">keepCas (RuPacRemove::PacRemove)</a><br />
36
+ <a href="classes/RuPacRemove/PacRemove.html#M000016">keepNoSave (RuPacRemove::PacRemove)</a><br />
37
+ <a href="classes/RuPacRemove/PacRemove.html#M000020">keepNoSaveRecursive (RuPacRemove::PacRemove)</a><br />
38
+ <a href="classes/RuPacRemove/PacRemove.html#M000017">keepRecursive (RuPacRemove::PacRemove)</a><br />
39
+ <a href="classes/RuPacSync/PacSync.html#M000024">new (RuPacSync::PacSync)</a><br />
40
+ <a href="classes/RuPacRemove/PacRemove.html#M000008">new (RuPacRemove::PacRemove)</a><br />
41
+ <a href="classes/RuPac/Pacman.html#M000001">new (RuPac::Pacman)</a><br />
42
+ <a href="classes/RuPacRemove/PacRemove.html#M000011">noSave (RuPacRemove::PacRemove)</a><br />
43
+ <a href="classes/RuPacRemove/PacRemove.html#M000015">noSaveCas (RuPacRemove::PacRemove)</a><br />
44
+ <a href="classes/RuPacRemove/PacRemove.html#M000018">noSaveRecursive (RuPacRemove::PacRemove)</a><br />
45
+ <a href="classes/RuPacSync/PacSync.html#M000028">oldClean (RuPacSync::PacSync)</a><br />
46
+ <a href="classes/RuPacRemove/PacRemove.html#M000013">reCas (RuPacRemove::PacRemove)</a><br />
47
+ <a href="classes/RuPacRemove/PacRemove.html#M000012">recursive (RuPacRemove::PacRemove)</a><br />
48
+ <a href="classes/RuPacSync/PacSync.html#M000025">sync (RuPacSync::PacSync)</a><br />
49
+ <a href="classes/RuPacSync/PacSync.html#M000026">sysUpgrade (RuPacSync::PacSync)</a><br />
50
+ <a href="classes/RuPac/Pacman.html#M000006">to_s (RuPac::Pacman)</a><br />
51
+ <a href="classes/RuPac/Pacman.html#M000005">verbose! (RuPac::Pacman)</a><br />
52
+ <a href="classes/RuPac/Pacman.html#M000003">verbose? (RuPac::Pacman)</a><br />
53
+ </div>
54
+ </div>
55
+ </body>
56
+ </html>
@@ -0,0 +1,24 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
5
+
6
+ <!--
7
+
8
+ RDoc Documentation
9
+
10
+ -->
11
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
12
+ <head>
13
+ <title>RDoc Documentation</title>
14
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
15
+ </head>
16
+ <frameset rows="20%, 80%">
17
+ <frameset cols="25%,35%,45%">
18
+ <frame src="fr_file_index.html" title="Files" name="Files" />
19
+ <frame src="fr_class_index.html" name="Classes" />
20
+ <frame src="fr_method_index.html" name="Methods" />
21
+ </frameset>
22
+ <frame src="files/rupacsync_rb.html" name="docwin" />
23
+ </frameset>
24
+ </html>
@@ -0,0 +1,116 @@
1
+ #!/usr/bin/env ruby
2
+ # RuPac
3
+ # A Ruby library for interfacing with ArchLinux's pacman
4
+ # Copyright 2006 Chris Peterman <kyral@azuredreams.us>
5
+ # Licensed under the GPLv2 or later
6
+
7
+ module RuPac
8
+
9
+ # Base class from which any class that calls pacman directly decends
10
+ # from
11
+ class Pacman
12
+
13
+ @@force = "no"
14
+ @@nodeps = "no"
15
+ @@verbose = "no"
16
+ @@lock = "no"
17
+
18
+ @@lockerror = "There is already another instance of pacman
19
+ running"
20
+
21
+ # Constructor. Needs rootneeded passed (yes or no)
22
+ def initialize( rootneeded )
23
+ @rootneeded = rootneeded
24
+ @command = "pacman -"
25
+ end
26
+
27
+ # force? method
28
+ # Asks if the Force option is set
29
+ def force?
30
+ if @@force == "yes"
31
+ return true
32
+ else
33
+ return false
34
+ end
35
+ end
36
+
37
+
38
+ # verbose? method
39
+ # Asks if the Verbose option is set
40
+ def verbose?
41
+ if @@verbose == "yes"
42
+ return true
43
+ else
44
+ return false
45
+ end
46
+ end
47
+
48
+
49
+ # force! method
50
+ # Tacks on the -f option to the command
51
+ def force!
52
+ if @@force == "no"
53
+ @@force = "yes"
54
+ @command = "#{@command}f"
55
+ end
56
+ end
57
+
58
+
59
+
60
+ # verbose! method
61
+ # Tacks on the -v option
62
+ def verbose!
63
+ if @@verbose == "no"
64
+ @command = "#{@command}v"
65
+ @@verbose = "yes"
66
+ end
67
+ end
68
+
69
+ # Override the to_s method
70
+ def to_s
71
+ "Command: #@command, Lock: #@@lock, Verbose: #@@verbose, Nodeps #@@nodeps, RootNeeded #@rootneeded"
72
+ end
73
+
74
+ # exec Method
75
+ # Runs the final pacman command assembled by the subclasses
76
+ # Returns True if it fired off successfully
77
+ # Raises an exception if the command needed root and the UID
78
+ # isn't root's
79
+ # Raises SystemCallError if the command won't execute
80
+ # Raises an exception if the command didn't exit cleanly
81
+ def exec( finalCommand )
82
+ if @rootneeded == "yes"
83
+ ## Check for root's UID
84
+ if Process.uid == 0
85
+
86
+ @output = `#{finalCommand}`
87
+
88
+ if $? == 0
89
+ return true
90
+ else
91
+ raise "#{finalCommand} failed
92
+ with error code #{$?}"
93
+ end
94
+ else
95
+ raise "Must be root!"
96
+ end
97
+ elsif @rootneeded == "no"
98
+
99
+ @output = `#{finalCommand}`
100
+
101
+ if $? == 0
102
+ return true
103
+ else
104
+ raise "#{finalCommand} failed with error
105
+ code #{$?}"
106
+ end
107
+ end
108
+
109
+
110
+ end ## End exec method
111
+
112
+
113
+ end ## End Pacman Class
114
+ end ## End RuPac module
115
+
116
+