raptget 0.1.2 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README +2 -1
- data/lib/raptget/version.rb +2 -2
- data/lib/raptget.rb +805 -804
- metadata +20 -44
data/lib/raptget.rb
CHANGED
@@ -8,907 +8,908 @@
|
|
8
8
|
# class Raptget::Package.new( array, str, array)
|
9
9
|
|
10
10
|
require 'tempfile'
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
11
|
+
require_relative 'raptget/version'
|
12
|
+
|
13
|
+
module Raptget
|
14
|
+
class Aptget
|
15
|
+
VERSION = Raptget::VERSION::STRING
|
16
|
+
|
17
|
+
#
|
18
|
+
# All accessors are boolean unless otherwise noted.
|
19
|
+
#
|
20
|
+
|
21
|
+
#
|
22
|
+
# Download only; package files are only retrieved,
|
23
|
+
# not unpacked or installed.
|
24
|
+
# Configuration Item: APT::Get::Download-Only.
|
25
|
+
#
|
26
|
+
attr_accessor :download_only
|
27
|
+
|
28
|
+
#
|
29
|
+
# Fix; attempt to correct a system with broken dependencies
|
30
|
+
# in place. This option, when used with install/remove,
|
31
|
+
# can omit any packages to permit APT to deduce a likely solution.
|
32
|
+
# Any Package that are specified must completely correct the problem.
|
33
|
+
# The option is sometimes necessary when running APT for the first time;
|
34
|
+
# APT itself does not allow broken package dependencies to exist
|
35
|
+
# on a system. It is possible that a system's dependency structure can be
|
36
|
+
# so corrupt as to require manual intervention (which usually means using
|
37
|
+
# dselect or 'remove' to eliminate some of the offending packages).
|
38
|
+
# Use of this option together with 'fix_missing' may produce
|
39
|
+
# an error in some situations.
|
40
|
+
# Configuration Item: APT::Get::Fix-Broken.
|
41
|
+
#
|
42
|
+
attr_accessor :fix_broken
|
43
|
+
|
44
|
+
#
|
45
|
+
# Ignore missing packages; If packages cannot be retrieved or fail the
|
46
|
+
# integrity check after retrieval (corrupted package files), hold back
|
47
|
+
# those packages and handle the result. Use of this option together
|
48
|
+
# with 'fix_broken' may produce an error in some
|
49
|
+
# situations. If a package is selected for installation
|
50
|
+
# (particularly if it is mentioned on the command line) and it could not be
|
51
|
+
# downloaded then it will be silently held back.
|
52
|
+
# Configuration Item: APT::Get::Fix-Missing.
|
53
|
+
#
|
54
|
+
attr_accessor :fix_missing
|
55
|
+
|
56
|
+
#
|
57
|
+
# Alias to fix_missing
|
58
|
+
#
|
59
|
+
attr_accessor :ignore_missing
|
60
|
+
|
61
|
+
#
|
62
|
+
# Disables downloading of packages.
|
63
|
+
# This is best used with ignore_missing to force APT
|
64
|
+
# to use only the .debs it has already downloaded.
|
65
|
+
# Configuration Item: APT::Get::Download.
|
66
|
+
#
|
67
|
+
attr_accessor :no_download
|
68
|
+
|
69
|
+
#
|
70
|
+
# Quiet; produces output suitable for logging, omitting progress
|
71
|
+
# indicators. You can also use 'quiet=#' to set the quiet level,
|
72
|
+
# overriding the configuration file. Note that quiet level 2 implies 'yes',
|
73
|
+
# you should never use 'quiet=2' without a no-action modifier
|
74
|
+
# such as 'download_only', 'print_uris' or 'simulate' as APT may decided to
|
75
|
+
# do something you did not expect.
|
76
|
+
# Configuration Item: quiet.
|
77
|
+
#
|
78
|
+
attr_accessor :quiet
|
79
|
+
|
80
|
+
#
|
81
|
+
# No action; perform a simulation of events that would occur
|
82
|
+
# but do not actually change the system.
|
83
|
+
# Configuration Item: APT::Get::Simulate.
|
84
|
+
# Simulate prints out a series of lines each one representing a
|
85
|
+
# dpkg operation, Configure (Conf), Remove (Remv), Unpack (Inst).
|
86
|
+
# Square brackets indicate broken packages with and empty set of square
|
87
|
+
# brackets meaning breaks that are of no consequence (rare).
|
88
|
+
#
|
89
|
+
attr_accessor :simulate
|
90
|
+
|
91
|
+
#
|
92
|
+
# Alias to simulate
|
93
|
+
#
|
94
|
+
attr_accessor :just_print
|
95
|
+
|
96
|
+
#
|
97
|
+
# Alias to simulate
|
98
|
+
#
|
99
|
+
attr_accessor :dry_run
|
100
|
+
|
101
|
+
#
|
102
|
+
# Alias to simulate
|
103
|
+
#
|
104
|
+
attr_accessor :recon
|
105
|
+
|
106
|
+
#
|
107
|
+
# Alias to simulate
|
108
|
+
#
|
109
|
+
attr_accessor :no_act
|
110
|
+
|
111
|
+
#
|
112
|
+
# Automatic yes to prompts; assume "yes" as answer to all
|
113
|
+
# prompts and run non-interactively. If an undesirable situation,
|
114
|
+
# such as changing a held package or removing an essential package
|
115
|
+
# occurs then apt-get will abort.
|
116
|
+
# Configuration Item: APT::Get::Assume-Yes.
|
117
|
+
#
|
118
|
+
attr_accessor :assume_yes
|
119
|
+
|
120
|
+
#
|
121
|
+
# Alias to assume_yes
|
122
|
+
#
|
123
|
+
attr_accessor :yes
|
124
|
+
|
125
|
+
#
|
126
|
+
# Show upgraded packages; Print out a list of all packages
|
127
|
+
# that are to be upgraded.
|
128
|
+
# Configuration Item: APT::Get::Show-Upgraded.
|
129
|
+
#
|
130
|
+
attr_accessor :show_upgraded
|
131
|
+
|
132
|
+
#
|
133
|
+
# Show full versions for upgraded and installed packages.
|
134
|
+
# Configuration Item: APT::Get::Show-Versions.
|
135
|
+
#
|
136
|
+
attr_accessor :verbose_version
|
137
|
+
|
138
|
+
#
|
139
|
+
# Compile source packages after downloading them.
|
140
|
+
# Configuration Item: APT::Get::Compile.
|
141
|
+
#
|
142
|
+
attr_accessor :build
|
143
|
+
|
144
|
+
#
|
145
|
+
# Alias to build
|
146
|
+
#
|
147
|
+
attr_accessor :compile
|
148
|
+
|
149
|
+
#
|
150
|
+
# Also install recommended packages.
|
151
|
+
#
|
152
|
+
attr_accessor :install_recommends
|
153
|
+
|
154
|
+
#
|
155
|
+
# Do not install recommended packages.
|
156
|
+
#
|
157
|
+
attr_accessor :no_install_recommends
|
158
|
+
|
159
|
+
#
|
160
|
+
# Ignore package Holds; This causes apt-get to ignore a
|
161
|
+
# hold placed on a package.
|
162
|
+
# This may be useful in conjunction with dist-upgrade
|
163
|
+
# to override a large number of undesired holds.
|
164
|
+
# Configuration Item: APT::Ignore-Hold.
|
165
|
+
#
|
166
|
+
attr_accessor :ignore_hold
|
167
|
+
|
168
|
+
#
|
169
|
+
# Do not upgrade packages; When used in conjunction with
|
170
|
+
# install no-upgrade will prevent packages listed from being
|
171
|
+
# upgraded if they are already installed.
|
172
|
+
# Configuration Item: APT::Get::Upgrade.
|
173
|
+
#
|
174
|
+
attr_accessor :no_upgrade
|
175
|
+
|
176
|
+
#
|
177
|
+
# Force yes; This is a dangerous option that will cause
|
178
|
+
# apt to continue without prompting if it is doing something
|
179
|
+
# potentially harmful. It should not be used except in very special
|
180
|
+
# situations. Using 'force_yes' can potentially destroy your system!
|
181
|
+
# Configuration Item: APT::Get::force-yes.
|
182
|
+
#
|
183
|
+
attr_accessor :force_yes
|
184
|
+
|
185
|
+
#
|
186
|
+
# Instead of fetching the files to install their URIs are printed.
|
187
|
+
# Each URI will have the path, the destination file name, the size
|
188
|
+
# and the expected md5 hash. Note that the file name to write to will
|
189
|
+
# not always match the file name on the remote site!
|
190
|
+
# This also works with the source and update commands.
|
191
|
+
# When used with the update command the MD5 and size are not included,
|
192
|
+
# and it is up to the user to decompress any compressed files.
|
193
|
+
# Configuration Item: APT::Get::Print-URIs.
|
194
|
+
#
|
195
|
+
attr_accessor :print_uris
|
196
|
+
|
197
|
+
#
|
198
|
+
# Use purge instead of remove for anything that would be removed.
|
199
|
+
# An asterisk ("*") will be displayed next to packages which are
|
200
|
+
# scheduled to be purged.
|
201
|
+
# Configuration Item: APT::Get::Purge.
|
202
|
+
#
|
203
|
+
attr_accessor :purge
|
204
|
+
|
205
|
+
#
|
206
|
+
# Re-Install packages that are already installed and at the
|
207
|
+
# newest version.
|
208
|
+
# Configuration Item: APT::Get::ReInstall.
|
209
|
+
#
|
210
|
+
attr_accessor :reinstall
|
211
|
+
|
212
|
+
#
|
213
|
+
# This option defaults to on, use 'no_list_cleanup' to turn it off.
|
214
|
+
# When on apt-get will automatically manage the contents of
|
215
|
+
# /var/lib/apt/lists to ensure that obsolete files are erased.
|
216
|
+
# The only reason to turn it off is if you frequently change your
|
217
|
+
# source list.
|
218
|
+
# Configuration Item: APT::Get::List-Cleanup.
|
219
|
+
#
|
220
|
+
attr_accessor :list_cleanup
|
221
|
+
|
222
|
+
#
|
223
|
+
# This option controls the default input to the policy engine,
|
224
|
+
# it creates a default pin at priority 990 using the specified
|
225
|
+
# release string. The preferences file may further override this setting.
|
226
|
+
# In short, this option lets you have simple control over which
|
227
|
+
# distribution packages will be retrieved from.
|
228
|
+
# Some common examples might be 'default_release = 2.1*' or
|
229
|
+
# 'default_release = unstable'.
|
230
|
+
# Configuration Item: APT::Default-Release;
|
231
|
+
#
|
232
|
+
attr_accessor :default_release
|
233
|
+
|
234
|
+
#
|
235
|
+
# Alias to default_release
|
236
|
+
#
|
237
|
+
attr_accessor :target_release
|
238
|
+
|
239
|
+
#
|
240
|
+
# Only perform operations that are 'trivial'. Logically this can
|
241
|
+
# be considered related to 'assume_yes', where 'assume_yes' will
|
242
|
+
# answer yes to any prompt, 'trivial_only' will answer no.
|
243
|
+
# Configuration Item: APT::Get::Trivial-Only.
|
244
|
+
#
|
245
|
+
attr_accessor :trivial_only
|
246
|
+
|
247
|
+
#
|
248
|
+
# If any packages are to be removed apt-get immediately aborts
|
249
|
+
# without prompting.
|
250
|
+
# Configuration Item: APT::Get::Remove
|
251
|
+
#
|
252
|
+
attr_accessor :no_remove
|
253
|
+
|
254
|
+
#
|
255
|
+
# If the command is either install or remove, then this option acts
|
256
|
+
# like running autoremove command, removing the unused dependency
|
257
|
+
# packages.
|
258
|
+
# Configuration Item: APT::Get::AutomaticRemove.
|
259
|
+
#
|
260
|
+
attr_accessor :auto_remove
|
261
|
+
|
262
|
+
#
|
263
|
+
# Only has meaning for the source command.
|
264
|
+
# Indicates that the given source names are not to be mapped
|
265
|
+
# through the binary table. This means that if this option is specified,
|
266
|
+
# the source command will only accept source package names as arguments,
|
267
|
+
# rather than accepting binary package names and looking up the
|
268
|
+
# corresponding source package.
|
269
|
+
# Configuration Item: APT::Get::Only-Source
|
270
|
+
#
|
271
|
+
attr_accessor :only_source
|
272
|
+
|
273
|
+
#
|
274
|
+
# Download only the tar file of a source archive.
|
275
|
+
# Configuration Item: APT::Get::Tar-Only
|
276
|
+
#
|
277
|
+
attr_accessor :tar_only
|
278
|
+
|
279
|
+
#
|
280
|
+
# Download only the dsc file of a source archive.
|
281
|
+
# Configuration Item: APT::Get::Dsc-Only
|
282
|
+
#
|
283
|
+
attr_accessor :dsc_only
|
284
|
+
|
285
|
+
#
|
286
|
+
# Download only the diff file of a source archive.
|
287
|
+
# Configuration Item: APT::Get::Diff-Only
|
288
|
+
#
|
289
|
+
attr_accessor :diff_only
|
290
|
+
|
291
|
+
#
|
292
|
+
# Ignore if packages can't be authenticated and don't prompt about
|
293
|
+
# it. This is useful for tools like pbuilder.
|
294
|
+
# Configuration Item: APT::Get::AllowUnauthenticated.
|
295
|
+
#
|
296
|
+
attr_accessor :allow_unauthenticated
|
297
|
+
|
298
|
+
#
|
299
|
+
# Only process architecture-dependent build-dependencies.
|
300
|
+
# Configuration Item: APT::Get::Arch-Only
|
301
|
+
#
|
302
|
+
attr_accessor :arch_only
|
303
|
+
|
304
|
+
#
|
305
|
+
# Configuration File; Specify a configuration file to use.
|
306
|
+
# The program will read the default configuration file and
|
307
|
+
# then this configuration file.
|
308
|
+
#
|
309
|
+
attr_accessor :config_file
|
310
|
+
|
311
|
+
#
|
312
|
+
# Set a Configuration Option; This will set an arbitrary
|
313
|
+
# configuration option.
|
314
|
+
# The syntax is raptget.option = "Foo::Bar=bar"
|
315
|
+
#
|
316
|
+
attr_accessor :option
|
317
|
+
|
318
|
+
#
|
319
|
+
# Disable sudo. If this is not set, sudo
|
320
|
+
# is used.
|
321
|
+
#
|
322
|
+
attr_accessor :disable_sudo
|
323
|
+
|
324
|
+
#
|
325
|
+
# Returns a new Raptget Object
|
326
|
+
#
|
327
|
+
def initialize()
|
328
|
+
end
|
329
|
+
|
330
|
+
#
|
331
|
+
# install is followed by one or more packages desired for
|
332
|
+
# installation or upgrading. Each package is a package name, not a
|
333
|
+
# fully qualified filename (for instance, in a Debian GNU/Linux
|
334
|
+
# system, libc6 would be the argument provided, not
|
335
|
+
# libc6_1.9.6-2.deb). All packages required by the package(s)
|
336
|
+
# specified for installation will also be retrieved and installed.
|
337
|
+
# The /etc/apt/sources.list file is used to locate the desired
|
338
|
+
# packages. If a hyphen is appended to the package name (with no
|
339
|
+
# intervening space), the identified package will be removed if it is
|
340
|
+
# installed. Similarly a plus sign can be used to designate a package
|
341
|
+
# to install. These latter features may be used to override decisions
|
342
|
+
# made by apt-get's conflict resolution system.
|
343
|
+
#
|
344
|
+
# A specific version of a package can be selected for installation by
|
345
|
+
# following the package name with an equals and the version of the
|
346
|
+
# package to select. This will cause that version to be located and
|
347
|
+
# selected for install. Alternatively a specific distribution can be
|
348
|
+
# selected by following the package name with a slash and the version
|
349
|
+
# of the distribution or the Archive name (stable, testing,
|
350
|
+
# unstable).
|
351
|
+
#
|
352
|
+
# Both of the version selection mechanisms can downgrade packages and
|
353
|
+
# must be used with care.
|
354
|
+
#
|
355
|
+
# This is also the target to use if you want to upgrade one or more
|
356
|
+
# already-installed packages without upgrading every package you have
|
357
|
+
# on your system. Unlike the "upgrade" target, which installs the
|
358
|
+
# newest version of all currently installed packages, "install" will
|
359
|
+
# install the newest version of only the package(s) specified. Simply
|
360
|
+
# provide the name of the package(s) you wish to upgrade, and if a
|
361
|
+
# newer version is available, it (and its dependencies, as described
|
362
|
+
# above) will be downloaded and installed.
|
363
|
+
#
|
364
|
+
# Finally, the apt_preferences mechanism allows you to create an
|
365
|
+
# alternative installation policy for individual packages.
|
366
|
+
#
|
367
|
+
# If no package matches the given expression and the expression
|
368
|
+
# contains one of '.', '?' or '*' then it is assumed to be a POSIX
|
369
|
+
# regular expression, and it is applied to all package names in the
|
370
|
+
# database. Any matches are then installed (or removed). Note that
|
371
|
+
# matching is done by substring so 'lo.*' matches 'how-lo' and
|
372
|
+
# 'lowest'. If this is undesired, anchor the regular expression with
|
373
|
+
# a '^' or '$' character, or create a more specific regular
|
374
|
+
# expression.
|
375
|
+
#
|
376
|
+
def install(packages)
|
377
|
+
|
378
|
+
tmp = Tempfile.new('raptget_install')
|
379
|
+
packages.collect! { |i| i + " " }
|
380
|
+
command = option_string() + "install " + packages.to_s + " 2> " + tmp.path
|
381
|
+
success = system(command)
|
382
|
+
if success
|
383
|
+
begin
|
384
|
+
while (line = tmp.readline)
|
385
|
+
line.chomp
|
386
|
+
selected_string = line if line =~ /Setting up/
|
387
|
+
end
|
388
|
+
rescue EOFError
|
389
|
+
tmp.close
|
383
390
|
end
|
384
|
-
|
385
|
-
|
391
|
+
return selected_string
|
392
|
+
else
|
393
|
+
tmp.close!
|
394
|
+
return success
|
386
395
|
end
|
387
|
-
return selected_string
|
388
|
-
else
|
389
|
-
tmp.close!
|
390
|
-
return success
|
391
|
-
end
|
392
396
|
|
393
|
-
|
397
|
+
end
|
394
398
|
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
399
|
+
# update is used to resynchronize the package index files from their
|
400
|
+
# sources. The indexes of available packages are fetched from the
|
401
|
+
# location(s) specified in /etc/apt/sources.list. For example, when
|
402
|
+
# using a Debian archive, this command retrieves and scans the
|
403
|
+
# Packages.gz files, so that information about new and updated
|
404
|
+
# packages is available. An update should always be performed before
|
405
|
+
# an upgrade or dist-upgrade. Please be aware that the overall
|
406
|
+
# progress meter will be incorrect as the size of the package files
|
407
|
+
# cannot be known in advance.
|
408
|
+
def update
|
409
|
+
|
410
|
+
tmp = Tempfile.new('raptget_update')
|
411
|
+
command = option_string() + "update " + " 2> " + tmp.path
|
412
|
+
success = system(command)
|
413
|
+
if success
|
414
|
+
begin
|
415
|
+
while (line = tmp.readline)
|
416
|
+
line.chomp
|
417
|
+
selected_string = line if line =~ /Hit/
|
418
|
+
end
|
419
|
+
rescue EOFError
|
420
|
+
tmp.close
|
414
421
|
end
|
415
|
-
|
416
|
-
|
422
|
+
return selected_string
|
423
|
+
else
|
424
|
+
tmp.close!
|
425
|
+
return success
|
417
426
|
end
|
418
|
-
return selected_string
|
419
|
-
else
|
420
|
-
tmp.close!
|
421
|
-
return success
|
422
|
-
end
|
423
427
|
|
424
|
-
|
428
|
+
end
|
425
429
|
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
430
|
+
# upgrade is used to install the newest versions of all packages
|
431
|
+
# currently installed on the system from the sources enumerated in
|
432
|
+
# /etc/apt/sources.list. Packages currently installed with new
|
433
|
+
# versions available are retrieved and upgraded; under no
|
434
|
+
# circumstances are currently installed packages removed, or packages
|
435
|
+
# not already installed retrieved and installed. New versions of
|
436
|
+
# currently installed packages that cannot be upgraded without
|
437
|
+
# changing the install status of another package will be left at
|
438
|
+
# their current version. An update must be performed first so that
|
439
|
+
# apt-get knows that new versions of packages are available.
|
440
|
+
def upgrade
|
441
|
+
|
442
|
+
tmp = Tempfile.new('raptget_upgrade')
|
443
|
+
command = option_string() + "upgrade " + " 2> " + tmp.path
|
444
|
+
success = system(command)
|
445
|
+
if success
|
446
|
+
begin
|
447
|
+
while (line = tmp.readline)
|
448
|
+
line.chomp
|
449
|
+
selected_string = line if line =~ /^Setting up/
|
450
|
+
end
|
451
|
+
rescue EOFError
|
452
|
+
tmp.close
|
446
453
|
end
|
447
|
-
|
448
|
-
|
454
|
+
return selected_string
|
455
|
+
else
|
456
|
+
tmp.close!
|
457
|
+
return success
|
449
458
|
end
|
450
|
-
return selected_string
|
451
|
-
else
|
452
|
-
tmp.close!
|
453
|
-
return success
|
454
|
-
end
|
455
459
|
|
456
|
-
|
460
|
+
end
|
457
461
|
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
462
|
+
# dselect_upgrade is used in conjunction with the traditional Debian
|
463
|
+
# packaging front-end, dselect. 'dselect_upgrade' follows the
|
464
|
+
# changes made by dselect to the Status field of available
|
465
|
+
# packages, and performs the actions necessary to realize that state
|
466
|
+
# (for instance, the removal of old and the installation of new
|
467
|
+
# packages).
|
468
|
+
def dselect_upgrade
|
469
|
+
|
470
|
+
tmp = Tempfile.new('raptget_dselect_upgrade')
|
471
|
+
command = option_string() + "dselect-upgrade " + " 2> " + tmp.path
|
472
|
+
success = system(command)
|
473
|
+
if success
|
474
|
+
begin
|
475
|
+
while (line = tmp.readline)
|
476
|
+
line.chomp
|
477
|
+
selected_string = line if line =~ /^Setting up/
|
478
|
+
end
|
479
|
+
rescue EOFError
|
480
|
+
tmp.close
|
474
481
|
end
|
475
|
-
|
476
|
-
|
482
|
+
return selected_string
|
483
|
+
else
|
484
|
+
tmp.close!
|
485
|
+
return success
|
477
486
|
end
|
478
|
-
return selected_string
|
479
|
-
else
|
480
|
-
tmp.close!
|
481
|
-
return success
|
482
|
-
end
|
483
487
|
|
484
|
-
|
488
|
+
end
|
485
489
|
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
490
|
+
# dist_upgrade in addition to performing the function of upgrade,
|
491
|
+
# also intelligently handles changing dependencies with new versions
|
492
|
+
# of packages; apt-get has a "smart" conflict resolution system, and
|
493
|
+
# it will attempt to upgrade the most important packages at the
|
494
|
+
# expense of less important ones if necessary. So, 'dist_upgrade'
|
495
|
+
# command may remove some packages. The /etc/apt/sources.list file
|
496
|
+
# contains a list of locations from which to retrieve desired package
|
497
|
+
# files. See also apt_preferences for a mechanism for overriding
|
498
|
+
# the general settings for individual packages.
|
499
|
+
def dist_upgrade
|
500
|
+
|
501
|
+
tmp = Tempfile.new('raptget_dist_upgrade')
|
502
|
+
command = option_string() + "dist-upgrade " + " 2> " + tmp.path
|
503
|
+
success = system(command)
|
504
|
+
if success
|
505
|
+
begin
|
506
|
+
while (line = tmp.readline)
|
507
|
+
line.chomp
|
508
|
+
selected_string = line if line =~ /^Setting up/
|
509
|
+
end
|
510
|
+
rescue EOFError
|
511
|
+
tmp.close
|
505
512
|
end
|
506
|
-
|
507
|
-
|
513
|
+
return selected_string
|
514
|
+
else
|
515
|
+
tmp.close!
|
516
|
+
return success
|
508
517
|
end
|
509
|
-
return selected_string
|
510
|
-
else
|
511
|
-
tmp.close!
|
512
|
-
return success
|
513
|
-
end
|
514
518
|
|
515
|
-
|
519
|
+
end
|
516
520
|
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
521
|
+
# remove is identical to install except that packages are removed
|
522
|
+
# instead of installed. Note the removing a package leaves its
|
523
|
+
# configuration files in system. If a plus sign is appended to the
|
524
|
+
# package name (with no intervening space), the identified package
|
525
|
+
# will be installed instead of removed.
|
526
|
+
def remove(packages)
|
527
|
+
|
528
|
+
tmp = Tempfile.new('raptget_remove')
|
529
|
+
packages.collect! { |i| i + " " }
|
530
|
+
command = option_string() + "remove " + packages.to_s + " 2> " + tmp.path
|
531
|
+
success = system(command)
|
532
|
+
if success
|
533
|
+
begin
|
534
|
+
while (line = tmp.readline)
|
535
|
+
line.chomp
|
536
|
+
selected_string = line if line =~ /Removing/
|
537
|
+
end
|
538
|
+
rescue EOFError
|
539
|
+
tmp.close
|
533
540
|
end
|
534
|
-
|
535
|
-
|
541
|
+
return selected_string
|
542
|
+
else
|
543
|
+
tmp.close!
|
544
|
+
return success
|
536
545
|
end
|
537
|
-
|
538
|
-
else
|
539
|
-
tmp.close!
|
540
|
-
return success
|
546
|
+
|
541
547
|
end
|
542
548
|
|
543
|
-
|
549
|
+
# purge is identical to remove except that packages are removed and
|
550
|
+
# purged (any configuration files are deleted too).
|
551
|
+
def purge(packages)
|
544
552
|
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
selected_string = line if line =~ /Removing/
|
553
|
+
tmp = Tempfile.new('raptget_purge')
|
554
|
+
packages.collect! { |i| i + " " }
|
555
|
+
command = option_string() + "purge " + packages.to_s + " 2> " + tmp.path
|
556
|
+
success = system(command)
|
557
|
+
if success
|
558
|
+
begin
|
559
|
+
while (line = tmp.readline)
|
560
|
+
line.chomp
|
561
|
+
selected_string = line if line =~ /Removing/
|
562
|
+
end
|
563
|
+
rescue EOFError
|
564
|
+
tmp.close
|
558
565
|
end
|
559
|
-
|
560
|
-
|
566
|
+
return selected_string
|
567
|
+
else
|
568
|
+
tmp.close!
|
569
|
+
return success
|
561
570
|
end
|
562
|
-
return selected_string
|
563
|
-
else
|
564
|
-
tmp.close!
|
565
|
-
return success
|
566
|
-
end
|
567
571
|
|
568
|
-
|
572
|
+
end
|
569
573
|
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
574
|
+
# source causes apt-get to fetch source packages. APT will examine
|
575
|
+
# the available packages to decide which source package to fetch. It
|
576
|
+
# will then find and download into the current directory the newest
|
577
|
+
# available version of that source package while respect the default
|
578
|
+
# release, set with the option APT::Default-Release, the 'target_release'
|
579
|
+
# option or per package with the pkg/release syntax, if possible.
|
580
|
+
#
|
581
|
+
# Source packages are tracked separately from binary packages via
|
582
|
+
# deb-src type lines in the sources.list file. This means that you
|
583
|
+
# will need to add such a line for each repository you want to get
|
584
|
+
# sources from. If you don't do this you will properly get another
|
585
|
+
# (newer, older or none) source version than the one you have
|
586
|
+
# installed or could install.
|
587
|
+
#
|
588
|
+
# If the 'compile' option is specified then the package will be
|
589
|
+
# compiled to a binary .deb using dpkg-buildpackage, if
|
590
|
+
# 'download_only' is specified then the source package will not be
|
591
|
+
# unpacked.
|
592
|
+
#
|
593
|
+
# A specific source version can be retrieved by postfixing the source
|
594
|
+
# name with an equals and then the version to fetch, similar to the
|
595
|
+
# mechanism used for the package files. This enables exact matching
|
596
|
+
# of the source package name and version, implicitly enabling the
|
597
|
+
# APT::Get::Only-Source option.
|
598
|
+
#
|
599
|
+
# Note that source packages are not tracked like binary packages,
|
600
|
+
# they exist only in the current directory and are similar to
|
601
|
+
# downloading source tar balls.
|
602
|
+
def source(packages)
|
603
|
+
|
604
|
+
tmp = Tempfile.new('raptget_source')
|
605
|
+
packages.collect! { |i| i + " " }
|
606
|
+
command = option_string() + "source " + packages.to_s + " 2> " + tmp.path
|
607
|
+
success = system(command)
|
608
|
+
if success
|
609
|
+
begin
|
610
|
+
while (line = tmp.readline)
|
611
|
+
line.chomp
|
612
|
+
selected_string = line
|
613
|
+
end
|
614
|
+
rescue EOFError
|
615
|
+
tmp.close
|
609
616
|
end
|
610
|
-
|
611
|
-
|
617
|
+
return selected_string
|
618
|
+
else
|
619
|
+
tmp.close!
|
620
|
+
return success
|
612
621
|
end
|
613
|
-
|
614
|
-
else
|
615
|
-
tmp.close!
|
616
|
-
return success
|
622
|
+
|
617
623
|
end
|
618
624
|
|
619
|
-
|
625
|
+
# 'build_dep' causes apt-get to install/remove packages in an attempt
|
626
|
+
# to satisfy the build dependencies for a source package.
|
627
|
+
def build_dep(packages)
|
620
628
|
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
selected_string = line
|
629
|
+
tmp = Tempfile.new('raptget_build_dep')
|
630
|
+
packages.collect! { |i| i + " " }
|
631
|
+
command = option_string() + "build-dep " + packages.to_s + " 2> " + tmp.path
|
632
|
+
success = system(command)
|
633
|
+
if success
|
634
|
+
begin
|
635
|
+
while (line = tmp.readline)
|
636
|
+
line.chomp
|
637
|
+
selected_string = line
|
638
|
+
end
|
639
|
+
rescue EOFError
|
640
|
+
tmp.close
|
634
641
|
end
|
635
|
-
|
636
|
-
|
642
|
+
return selected_string
|
643
|
+
else
|
644
|
+
tmp.close!
|
645
|
+
return success
|
637
646
|
end
|
638
|
-
|
639
|
-
else
|
640
|
-
tmp.close!
|
641
|
-
return success
|
647
|
+
|
642
648
|
end
|
643
649
|
|
644
|
-
|
650
|
+
# clean clears out the local repository of retrieved package files.
|
651
|
+
# It removes everything but the lock file from
|
652
|
+
# /var/cache/apt/archives/ and /var/cache/apt/archives/partial/. When
|
653
|
+
# APT is used as a dselect method, clean is run automatically.
|
654
|
+
# Those who do not use dselect will likely want to run apt-get clean
|
655
|
+
# from time to time to free up disk space.
|
656
|
+
def clean
|
645
657
|
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
# APT is used as a dselect method, clean is run automatically.
|
650
|
-
# Those who do not use dselect will likely want to run apt-get clean
|
651
|
-
# from time to time to free up disk space.
|
652
|
-
def clean
|
658
|
+
command = option_string() + "clean "
|
659
|
+
success = system(command)
|
660
|
+
return success
|
653
661
|
|
654
|
-
|
655
|
-
success = system(command)
|
656
|
-
return success
|
662
|
+
end
|
657
663
|
|
658
|
-
|
664
|
+
# check is a diagnostic tool; it updates the package cache and checks
|
665
|
+
# for broken dependencies.
|
666
|
+
def check
|
659
667
|
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
selected_string = line
|
668
|
+
tmp = Tempfile.new('raptget_check')
|
669
|
+
command = option_string() + "check " + " 2> " + tmp.path
|
670
|
+
success = system(command)
|
671
|
+
if success
|
672
|
+
begin
|
673
|
+
while (line = tmp.readline)
|
674
|
+
line.chomp
|
675
|
+
selected_string = line
|
676
|
+
end
|
677
|
+
rescue EOFError
|
678
|
+
tmp.close
|
672
679
|
end
|
673
|
-
|
674
|
-
|
680
|
+
return selected_string
|
681
|
+
else
|
682
|
+
tmp.close!
|
683
|
+
return success
|
675
684
|
end
|
676
|
-
return selected_string
|
677
|
-
else
|
678
|
-
tmp.close!
|
679
|
-
return success
|
680
|
-
end
|
681
685
|
|
682
|
-
|
686
|
+
end
|
683
687
|
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
688
|
+
# Like clean, autoclean clears out the local repository of retrieved
|
689
|
+
# package files. The difference is that it only removes package files
|
690
|
+
# that can no longer be downloaded, and are largely useless. This
|
691
|
+
# allows a cache to be maintained over a long period without it
|
692
|
+
# growing out of control. The configuration option
|
693
|
+
# APT::Clean-Installed will prevent installed packages from being
|
694
|
+
# erased if it is set to off.
|
695
|
+
def autoclean
|
696
|
+
|
697
|
+
tmp = Tempfile.new('raptget_autoclean')
|
698
|
+
command = option_string() + "autoclean " + " 2> " + tmp.path
|
699
|
+
success = system(command)
|
700
|
+
if success
|
701
|
+
begin
|
702
|
+
while (line = tmp.readline)
|
703
|
+
line.chomp
|
704
|
+
selected_string = line
|
705
|
+
end
|
706
|
+
rescue EOFError
|
707
|
+
tmp.close
|
701
708
|
end
|
702
|
-
|
703
|
-
|
709
|
+
return selected_string
|
710
|
+
else
|
711
|
+
tmp.close!
|
712
|
+
return success
|
704
713
|
end
|
705
|
-
|
706
|
-
else
|
707
|
-
tmp.close!
|
708
|
-
return success
|
714
|
+
|
709
715
|
end
|
710
716
|
|
711
|
-
|
717
|
+
# autoremove is used to remove packages that were automatically
|
718
|
+
# installed to satisfy dependencies for some package and that are no
|
719
|
+
# more needed.
|
720
|
+
def autoremove
|
712
721
|
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
line.chomp
|
725
|
-
selected_string = line if line =~ /Removing/
|
722
|
+
tmp = Tempfile.new('raptget_autoremove')
|
723
|
+
command = option_string() + "autoremove " + " 2> " + tmp.path
|
724
|
+
success = system(command)
|
725
|
+
if success
|
726
|
+
begin
|
727
|
+
while (line = tmp.readline)
|
728
|
+
line.chomp
|
729
|
+
selected_string = line if line =~ /Removing/
|
730
|
+
end
|
731
|
+
rescue EOFError
|
732
|
+
tmp.close
|
726
733
|
end
|
727
|
-
|
728
|
-
|
734
|
+
return selected_string
|
735
|
+
else
|
736
|
+
tmp.close!
|
737
|
+
return success
|
729
738
|
end
|
730
|
-
return selected_string
|
731
|
-
else
|
732
|
-
tmp.close!
|
733
|
-
return success
|
734
|
-
end
|
735
739
|
|
736
|
-
|
740
|
+
end
|
737
741
|
|
738
|
-
|
742
|
+
private
|
739
743
|
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
744
|
+
def option_string()
|
745
|
+
unless @disable_sudo
|
746
|
+
ostring = "sudo apt-get "
|
747
|
+
else
|
748
|
+
ostring = "apt-get "
|
749
|
+
end
|
746
750
|
|
747
|
-
|
748
|
-
|
749
|
-
|
751
|
+
if @option
|
752
|
+
ostring += "--option " + @option
|
753
|
+
end
|
750
754
|
|
751
|
-
|
752
|
-
|
753
|
-
|
755
|
+
if @config_file
|
756
|
+
ostring += "--config-file " + @config_file
|
757
|
+
end
|
754
758
|
|
755
|
-
|
756
|
-
|
757
|
-
|
759
|
+
if @arch_only
|
760
|
+
ostring += "--arch-only "
|
761
|
+
end
|
758
762
|
|
759
|
-
|
760
|
-
|
761
|
-
|
763
|
+
if @allow_unauthenticated
|
764
|
+
ostring += "--allow-unauthenticated "
|
765
|
+
end
|
762
766
|
|
763
|
-
|
764
|
-
|
765
|
-
|
767
|
+
if @diff_only
|
768
|
+
ostring += "--diff-only "
|
769
|
+
end
|
766
770
|
|
767
|
-
|
768
|
-
|
769
|
-
|
771
|
+
if @dsc_only
|
772
|
+
ostring += "--dsc-only "
|
773
|
+
end
|
770
774
|
|
771
|
-
|
772
|
-
|
773
|
-
|
775
|
+
if @tar_only
|
776
|
+
ostring += "--tar-only "
|
777
|
+
end
|
774
778
|
|
775
|
-
|
776
|
-
|
777
|
-
|
779
|
+
if @only_source
|
780
|
+
ostring += "--only-source "
|
781
|
+
end
|
778
782
|
|
779
|
-
|
780
|
-
|
781
|
-
|
783
|
+
if @auto_remove
|
784
|
+
ostring += "--auto-remove "
|
785
|
+
end
|
782
786
|
|
783
|
-
|
784
|
-
|
785
|
-
|
787
|
+
if @no_remove
|
788
|
+
ostring += "--no-remove "
|
789
|
+
end
|
786
790
|
|
787
|
-
|
788
|
-
|
789
|
-
|
791
|
+
if @trivial_only
|
792
|
+
ostring += "--trivial-only "
|
793
|
+
end
|
790
794
|
|
791
|
-
|
792
|
-
|
793
|
-
|
795
|
+
if @target_release
|
796
|
+
ostring += "--target-release " + @target_release
|
797
|
+
end
|
794
798
|
|
795
|
-
|
796
|
-
|
797
|
-
|
799
|
+
if @default_release
|
800
|
+
ostring += "--default-release " + @default_release
|
801
|
+
end
|
798
802
|
|
799
|
-
|
800
|
-
|
801
|
-
|
803
|
+
if @list_cleanup
|
804
|
+
ostring += "--list-cleanup "
|
805
|
+
end
|
802
806
|
|
803
|
-
|
804
|
-
|
805
|
-
|
807
|
+
if @reinstall
|
808
|
+
ostring += "--reinstall "
|
809
|
+
end
|
806
810
|
|
807
|
-
|
808
|
-
|
809
|
-
|
811
|
+
if @purge
|
812
|
+
ostring += "--purge "
|
813
|
+
end
|
810
814
|
|
811
|
-
|
812
|
-
|
813
|
-
|
815
|
+
if @print_uris
|
816
|
+
ostring += "--print-uris "
|
817
|
+
end
|
814
818
|
|
815
|
-
|
816
|
-
|
817
|
-
|
819
|
+
if @force_yes
|
820
|
+
ostring += "--force-yes "
|
821
|
+
end
|
818
822
|
|
819
|
-
|
820
|
-
|
821
|
-
|
823
|
+
if @only_upgrade
|
824
|
+
ostring += "--only-upgrade "
|
825
|
+
end
|
822
826
|
|
823
|
-
|
824
|
-
|
825
|
-
|
827
|
+
if @no_upgrade
|
828
|
+
ostring += "--no-upgrade "
|
829
|
+
end
|
826
830
|
|
827
|
-
|
828
|
-
|
829
|
-
|
831
|
+
if @ignore_hold
|
832
|
+
ostring += "--ignore-hold "
|
833
|
+
end
|
830
834
|
|
831
|
-
|
832
|
-
|
833
|
-
|
835
|
+
if @no_install_recommends
|
836
|
+
ostring += "--no-install-recommends "
|
837
|
+
end
|
834
838
|
|
835
|
-
|
836
|
-
|
837
|
-
|
839
|
+
if @install_recommends
|
840
|
+
ostring += "--install-recommends "
|
841
|
+
end
|
838
842
|
|
839
|
-
|
840
|
-
|
841
|
-
|
843
|
+
if @compile
|
844
|
+
ostring += "--compile "
|
845
|
+
end
|
842
846
|
|
843
|
-
|
844
|
-
|
845
|
-
|
847
|
+
if @build
|
848
|
+
ostring += "--build "
|
849
|
+
end
|
846
850
|
|
847
|
-
|
848
|
-
|
849
|
-
|
851
|
+
if @verbose_versions
|
852
|
+
ostring += "--verbose-versions "
|
853
|
+
end
|
850
854
|
|
851
|
-
|
852
|
-
|
853
|
-
|
855
|
+
if @show_upgraded
|
856
|
+
ostring += "--show-upgraded "
|
857
|
+
end
|
854
858
|
|
855
|
-
|
856
|
-
|
857
|
-
|
859
|
+
if @yes
|
860
|
+
ostring += "--yes "
|
861
|
+
end
|
858
862
|
|
859
|
-
|
860
|
-
|
861
|
-
|
863
|
+
if @assume_yes
|
864
|
+
ostring += "--assume-yes "
|
865
|
+
end
|
862
866
|
|
863
|
-
|
864
|
-
|
865
|
-
|
867
|
+
if @simulate
|
868
|
+
ostring += "--simulate "
|
869
|
+
end
|
866
870
|
|
867
|
-
|
868
|
-
|
869
|
-
|
871
|
+
if @just_print
|
872
|
+
ostring += "--just-print "
|
873
|
+
end
|
870
874
|
|
871
|
-
|
872
|
-
|
873
|
-
|
875
|
+
if @dry_run
|
876
|
+
ostring += "--dry-run "
|
877
|
+
end
|
874
878
|
|
875
|
-
|
876
|
-
|
877
|
-
|
879
|
+
if @recon
|
880
|
+
ostring += "--recon "
|
881
|
+
end
|
878
882
|
|
879
|
-
|
880
|
-
|
881
|
-
|
883
|
+
if @no_act
|
884
|
+
ostring += "--no-act "
|
885
|
+
end
|
882
886
|
|
883
|
-
|
884
|
-
|
885
|
-
|
887
|
+
if @quiet
|
888
|
+
ostring += "--quiet " + @quiet
|
889
|
+
end
|
886
890
|
|
887
|
-
|
888
|
-
|
889
|
-
|
891
|
+
if @no_download
|
892
|
+
ostring += "--no-download "
|
893
|
+
end
|
890
894
|
|
891
|
-
|
892
|
-
|
893
|
-
|
895
|
+
if @ignore_missing
|
896
|
+
ostring += "--ignore-missing "
|
897
|
+
end
|
894
898
|
|
895
|
-
|
896
|
-
|
897
|
-
|
899
|
+
if @fix_missing
|
900
|
+
ostring += "--fix-missing "
|
901
|
+
end
|
898
902
|
|
899
|
-
|
900
|
-
|
901
|
-
|
903
|
+
if @fix_broken
|
904
|
+
ostring += "--fix-broken "
|
905
|
+
end
|
902
906
|
|
903
|
-
|
904
|
-
|
905
|
-
|
907
|
+
if @download_only
|
908
|
+
ostring += "--download-only "
|
909
|
+
end
|
906
910
|
|
907
|
-
|
911
|
+
return ostring
|
908
912
|
|
913
|
+
end
|
909
914
|
end
|
910
915
|
end
|
911
|
-
|
912
|
-
|
913
|
-
#Dir[File.join(File.dirname(__FILE__), 'raptget/**/*.rb')].sort.each { |lib| require lib }
|
914
|
-
|