raptget 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Changelog +12 -0
- data/lib/raptget/version.rb +1 -1
- data/lib/raptget.rb +92 -55
- metadata +3 -3
data/Changelog
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
commit dc9430c54968dd5c0d9ec665f7d12c4fa0be142a
|
2
|
+
Author: Joel Bryan Juliano <jjuliano@clinic-it.com>
|
3
|
+
Date: Tue Dec 28 15:11:50 2010 +0800
|
4
|
+
|
5
|
+
Fix comments and documentations
|
6
|
+
|
7
|
+
commit 8e2c880131ea108695d6f8dd9e59cca0973c58ec
|
8
|
+
Author: Joel Bryan Juliano <jjuliano@clinic-it.com>
|
9
|
+
Date: Tue Dec 28 13:09:10 2010 +0800
|
10
|
+
|
11
|
+
Removed the yardoc documentations
|
12
|
+
|
1
13
|
commit 447bf1cb796f3601ba1809e09045f443d724dbee
|
2
14
|
Author: Joel Bryan Juliano <jjuliano@clinic-it.com>
|
3
15
|
Date: Tue Dec 28 12:29:02 2010 +0800
|
data/lib/raptget/version.rb
CHANGED
data/lib/raptget.rb
CHANGED
@@ -27,25 +27,31 @@
|
|
27
27
|
# can omit any packages to permit APT to deduce a likely solution.
|
28
28
|
# Any Package that are specified must completely correct the problem.
|
29
29
|
# The option is sometimes necessary when running APT for the first time;
|
30
|
-
# APT itself does not allow broken package dependencies to exist
|
31
|
-
# It is possible that a system's dependency structure can be
|
32
|
-
# require manual intervention (which usually means using
|
33
|
-
#
|
30
|
+
# APT itself does not allow broken package dependencies to exist
|
31
|
+
# on a system. It is possible that a system's dependency structure can be
|
32
|
+
# so corrupt as to require manual intervention (which usually means using
|
33
|
+
# dselect or 'remove' to eliminate some of the offending packages).
|
34
34
|
# Use of this option together with 'fix_missing' may produce
|
35
|
-
# an error in some situations.
|
35
|
+
# an error in some situations.
|
36
|
+
# Configuration Item: APT::Get::Fix-Broken.
|
36
37
|
#
|
37
38
|
attr_accessor :fix_broken
|
38
39
|
|
39
40
|
#
|
40
|
-
# Ignore missing packages; If packages cannot be retrieved or fail the
|
41
|
-
# after retrieval (corrupted package files), hold back
|
42
|
-
# the result. Use of this option together
|
41
|
+
# Ignore missing packages; If packages cannot be retrieved or fail the
|
42
|
+
# integrity check after retrieval (corrupted package files), hold back
|
43
|
+
# those packages and handle the result. Use of this option together
|
44
|
+
# with 'fix_broken' may produce an error in some
|
43
45
|
# situations. If a package is selected for installation
|
44
46
|
# (particularly if it is mentioned on the command line) and it could not be
|
45
47
|
# downloaded then it will be silently held back.
|
46
48
|
# Configuration Item: APT::Get::Fix-Missing.
|
47
49
|
#
|
48
50
|
attr_accessor :fix_missing
|
51
|
+
|
52
|
+
#
|
53
|
+
# Alias to fix_missing
|
54
|
+
#
|
49
55
|
attr_accessor :ignore_missing
|
50
56
|
|
51
57
|
#
|
@@ -58,11 +64,12 @@
|
|
58
64
|
|
59
65
|
#
|
60
66
|
# Quiet; produces output suitable for logging, omitting progress
|
61
|
-
# indicators.
|
62
|
-
#
|
63
|
-
#
|
64
|
-
#
|
65
|
-
# do something you did not expect.
|
67
|
+
# indicators. You can also use 'quiet=#' to set the quiet level,
|
68
|
+
# overriding the configuration file. Note that quiet level 2 implies 'yes',
|
69
|
+
# you should never use 'quiet=2' without a no-action modifier
|
70
|
+
# such as 'download_only', 'print_uris' or 'simulate' as APT may decided to
|
71
|
+
# do something you did not expect.
|
72
|
+
# Configuration Item: quiet.
|
66
73
|
#
|
67
74
|
attr_accessor :quiet
|
68
75
|
|
@@ -76,9 +83,25 @@
|
|
76
83
|
# brackets meaning breaks that are of no consequence (rare).
|
77
84
|
#
|
78
85
|
attr_accessor :simulate
|
86
|
+
|
87
|
+
#
|
88
|
+
# Alias to simulate
|
89
|
+
#
|
79
90
|
attr_accessor :just_print
|
91
|
+
|
92
|
+
#
|
93
|
+
# Alias to simulate
|
94
|
+
#
|
80
95
|
attr_accessor :dry_run
|
96
|
+
|
97
|
+
#
|
98
|
+
# Alias to simulate
|
99
|
+
#
|
81
100
|
attr_accessor :recon
|
101
|
+
|
102
|
+
#
|
103
|
+
# Alias to simulate
|
104
|
+
#
|
82
105
|
attr_accessor :no_act
|
83
106
|
|
84
107
|
#
|
@@ -89,6 +112,10 @@
|
|
89
112
|
# Configuration Item: APT::Get::Assume-Yes.
|
90
113
|
#
|
91
114
|
attr_accessor :assume_yes
|
115
|
+
|
116
|
+
#
|
117
|
+
# Alias to assume_yes
|
118
|
+
#
|
92
119
|
attr_accessor :yes
|
93
120
|
|
94
121
|
#
|
@@ -109,6 +136,10 @@
|
|
109
136
|
# Configuration Item: APT::Get::Compile.
|
110
137
|
#
|
111
138
|
attr_accessor :build
|
139
|
+
|
140
|
+
#
|
141
|
+
# Alias to build
|
142
|
+
#
|
112
143
|
attr_accessor :compile
|
113
144
|
|
114
145
|
#
|
@@ -142,7 +173,7 @@
|
|
142
173
|
# Force yes; This is a dangerous option that will cause
|
143
174
|
# apt to continue without prompting if it is doing something
|
144
175
|
# potentially harmful. It should not be used except in very special
|
145
|
-
# situations. Using
|
176
|
+
# situations. Using 'force_yes' can potentially destroy your system!
|
146
177
|
# Configuration Item: APT::Get::force-yes.
|
147
178
|
#
|
148
179
|
attr_accessor :force_yes
|
@@ -175,30 +206,36 @@
|
|
175
206
|
attr_accessor :reinstall
|
176
207
|
|
177
208
|
#
|
178
|
-
# This option defaults to on, use
|
179
|
-
# When on apt-get will automatically manage the contents of
|
180
|
-
# to ensure that obsolete files are erased.
|
181
|
-
# The only reason to turn it off is if you frequently change your
|
209
|
+
# This option defaults to on, use 'no_list_cleanup' to turn it off.
|
210
|
+
# When on apt-get will automatically manage the contents of
|
211
|
+
# /var/lib/apt/lists to ensure that obsolete files are erased.
|
212
|
+
# The only reason to turn it off is if you frequently change your
|
213
|
+
# source list.
|
182
214
|
# Configuration Item: APT::Get::List-Cleanup.
|
183
215
|
#
|
184
216
|
attr_accessor :list_cleanup
|
185
217
|
|
186
218
|
#
|
187
219
|
# This option controls the default input to the policy engine,
|
188
|
-
# it creates a default pin at priority 990 using the specified
|
189
|
-
# The preferences file may further override this setting.
|
190
|
-
# In short, this option lets you have simple control over which
|
191
|
-
# packages will be retrieved from.
|
192
|
-
#
|
220
|
+
# it creates a default pin at priority 990 using the specified
|
221
|
+
# release string. The preferences file may further override this setting.
|
222
|
+
# In short, this option lets you have simple control over which
|
223
|
+
# distribution packages will be retrieved from.
|
224
|
+
# Some common examples might be 'default_release = 2.1*' or
|
225
|
+
# 'default_release = unstable'.
|
193
226
|
# Configuration Item: APT::Default-Release;
|
194
227
|
#
|
195
228
|
attr_accessor :default_release
|
229
|
+
|
230
|
+
#
|
231
|
+
# Alias to default_release
|
232
|
+
#
|
196
233
|
attr_accessor :target_release
|
197
234
|
|
198
235
|
#
|
199
236
|
# Only perform operations that are 'trivial'. Logically this can
|
200
|
-
# be considered related to
|
201
|
-
# answer yes to any prompt,
|
237
|
+
# be considered related to 'assume_yes', where 'assume_yes' will
|
238
|
+
# answer yes to any prompt, 'trivial_only' will answer no.
|
202
239
|
# Configuration Item: APT::Get::Trivial-Only.
|
203
240
|
#
|
204
241
|
attr_accessor :trivial_only
|
@@ -230,11 +267,21 @@
|
|
230
267
|
attr_accessor :only_source
|
231
268
|
|
232
269
|
#
|
233
|
-
# Download only the
|
234
|
-
# Configuration Item: APT::Get::
|
270
|
+
# Download only the tar file of a source archive.
|
271
|
+
# Configuration Item: APT::Get::Tar-Only
|
235
272
|
#
|
236
273
|
attr_accessor :tar_only
|
274
|
+
|
275
|
+
#
|
276
|
+
# Download only the dsc file of a source archive.
|
277
|
+
# Configuration Item: APT::Get::Dsc-Only
|
278
|
+
#
|
237
279
|
attr_accessor :dsc_only
|
280
|
+
|
281
|
+
#
|
282
|
+
# Download only the diff file of a source archive.
|
283
|
+
# Configuration Item: APT::Get::Diff-Only
|
284
|
+
#
|
238
285
|
attr_accessor :diff_only
|
239
286
|
|
240
287
|
#
|
@@ -267,12 +314,15 @@
|
|
267
314
|
#
|
268
315
|
# Disable sudo. If this is not set, sudo
|
269
316
|
# is used.
|
317
|
+
#
|
270
318
|
attr_accessor :disable_sudo
|
271
319
|
|
320
|
+
#
|
272
321
|
# Returns a new Raptget Object
|
273
|
-
|
322
|
+
#
|
274
323
|
def initialize()
|
275
324
|
end
|
325
|
+
|
276
326
|
#
|
277
327
|
# install is followed by one or more packages desired for
|
278
328
|
# installation or upgrading. Each package is a package name, not a
|
@@ -307,7 +357,7 @@
|
|
307
357
|
# newer version is available, it (and its dependencies, as described
|
308
358
|
# above) will be downloaded and installed.
|
309
359
|
#
|
310
|
-
# Finally, the apt_preferences
|
360
|
+
# Finally, the apt_preferences mechanism allows you to create an
|
311
361
|
# alternative installation policy for individual packages.
|
312
362
|
#
|
313
363
|
# If no package matches the given expression and the expression
|
@@ -318,9 +368,7 @@
|
|
318
368
|
# 'lowest'. If this is undesired, anchor the regular expression with
|
319
369
|
# a '^' or '$' character, or create a more specific regular
|
320
370
|
# expression.
|
321
|
-
|
322
|
-
# Returns the package names
|
323
|
-
|
371
|
+
#
|
324
372
|
def install(packages)
|
325
373
|
|
326
374
|
tmp = Tempfile.new('raptget_install')
|
@@ -353,7 +401,6 @@
|
|
353
401
|
# an upgrade or dist-upgrade. Please be aware that the overall
|
354
402
|
# progress meter will be incorrect as the size of the package files
|
355
403
|
# cannot be known in advance.
|
356
|
-
|
357
404
|
def update
|
358
405
|
|
359
406
|
tmp = Tempfile.new('raptget_update')
|
@@ -386,7 +433,6 @@
|
|
386
433
|
# changing the install status of another package will be left at
|
387
434
|
# their current version. An update must be performed first so that
|
388
435
|
# apt-get knows that new versions of packages are available.
|
389
|
-
|
390
436
|
def upgrade
|
391
437
|
|
392
438
|
tmp = Tempfile.new('raptget_upgrade')
|
@@ -410,12 +456,11 @@
|
|
410
456
|
end
|
411
457
|
|
412
458
|
# dselect_upgrade is used in conjunction with the traditional Debian
|
413
|
-
# packaging front-end, dselect
|
414
|
-
# changes made by dselect
|
459
|
+
# packaging front-end, dselect. 'dselect_upgrade' follows the
|
460
|
+
# changes made by dselect to the Status field of available
|
415
461
|
# packages, and performs the actions necessary to realize that state
|
416
462
|
# (for instance, the removal of old and the installation of new
|
417
463
|
# packages).
|
418
|
-
|
419
464
|
def dselect_upgrade
|
420
465
|
|
421
466
|
tmp = Tempfile.new('raptget_dselect_upgrade')
|
@@ -442,12 +487,11 @@
|
|
442
487
|
# also intelligently handles changing dependencies with new versions
|
443
488
|
# of packages; apt-get has a "smart" conflict resolution system, and
|
444
489
|
# it will attempt to upgrade the most important packages at the
|
445
|
-
# expense of less important ones if necessary. So,
|
490
|
+
# expense of less important ones if necessary. So, 'dist_upgrade'
|
446
491
|
# command may remove some packages. The /etc/apt/sources.list file
|
447
492
|
# contains a list of locations from which to retrieve desired package
|
448
|
-
# files. See also apt_preferences
|
493
|
+
# files. See also apt_preferences for a mechanism for overriding
|
449
494
|
# the general settings for individual packages.
|
450
|
-
|
451
495
|
def dist_upgrade
|
452
496
|
|
453
497
|
tmp = Tempfile.new('raptget_dist_upgrade')
|
@@ -475,7 +519,6 @@
|
|
475
519
|
# configuration files in system. If a plus sign is appended to the
|
476
520
|
# package name (with no intervening space), the identified package
|
477
521
|
# will be installed instead of removed.
|
478
|
-
|
479
522
|
def remove(packages)
|
480
523
|
|
481
524
|
tmp = Tempfile.new('raptget_remove')
|
@@ -501,7 +544,6 @@
|
|
501
544
|
|
502
545
|
# purge is identical to remove except that packages are removed and
|
503
546
|
# purged (any configuration files are deleted too).
|
504
|
-
|
505
547
|
def purge(packages)
|
506
548
|
|
507
549
|
tmp = Tempfile.new('raptget_purge')
|
@@ -529,19 +571,19 @@
|
|
529
571
|
# the available packages to decide which source package to fetch. It
|
530
572
|
# will then find and download into the current directory the newest
|
531
573
|
# available version of that source package while respect the default
|
532
|
-
# release, set with the option APT::Default-Release, the
|
533
|
-
# per package with the pkg/release syntax, if possible
|
574
|
+
# release, set with the option APT::Default-Release, the 'target_release'
|
575
|
+
# option or per package with the pkg/release syntax, if possible.
|
534
576
|
#
|
535
577
|
# Source packages are tracked separately from binary packages via
|
536
|
-
# deb-src type lines in the sources.list
|
578
|
+
# deb-src type lines in the sources.list file. This means that you
|
537
579
|
# will need to add such a line for each repository you want to get
|
538
580
|
# sources from. If you don't do this you will properly get another
|
539
581
|
# (newer, older or none) source version than the one you have
|
540
582
|
# installed or could install.
|
541
583
|
#
|
542
|
-
# If the
|
584
|
+
# If the 'compile' option is specified then the package will be
|
543
585
|
# compiled to a binary .deb using dpkg-buildpackage, if
|
544
|
-
#
|
586
|
+
# 'download_only' is specified then the source package will not be
|
545
587
|
# unpacked.
|
546
588
|
#
|
547
589
|
# A specific source version can be retrieved by postfixing the source
|
@@ -553,7 +595,6 @@
|
|
553
595
|
# Note that source packages are not tracked like binary packages,
|
554
596
|
# they exist only in the current directory and are similar to
|
555
597
|
# downloading source tar balls.
|
556
|
-
|
557
598
|
def source(packages)
|
558
599
|
|
559
600
|
tmp = Tempfile.new('raptget_source')
|
@@ -577,9 +618,8 @@
|
|
577
618
|
|
578
619
|
end
|
579
620
|
|
580
|
-
#
|
621
|
+
# 'build_dep' causes apt-get to install/remove packages in an attempt
|
581
622
|
# to satisfy the build dependencies for a source package.
|
582
|
-
|
583
623
|
def build_dep(packages)
|
584
624
|
|
585
625
|
tmp = Tempfile.new('raptget_build_dep')
|
@@ -606,10 +646,9 @@
|
|
606
646
|
# clean clears out the local repository of retrieved package files.
|
607
647
|
# It removes everything but the lock file from
|
608
648
|
# /var/cache/apt/archives/ and /var/cache/apt/archives/partial/. When
|
609
|
-
# APT is used as a dselect
|
649
|
+
# APT is used as a dselect method, clean is run automatically.
|
610
650
|
# Those who do not use dselect will likely want to run apt-get clean
|
611
651
|
# from time to time to free up disk space.
|
612
|
-
|
613
652
|
def clean
|
614
653
|
|
615
654
|
command = option_string() + "clean "
|
@@ -620,7 +659,6 @@
|
|
620
659
|
|
621
660
|
# check is a diagnostic tool; it updates the package cache and checks
|
622
661
|
# for broken dependencies.
|
623
|
-
|
624
662
|
def check
|
625
663
|
|
626
664
|
tmp = Tempfile.new('raptget_check')
|
@@ -650,7 +688,6 @@
|
|
650
688
|
# growing out of control. The configuration option
|
651
689
|
# APT::Clean-Installed will prevent installed packages from being
|
652
690
|
# erased if it is set to off.
|
653
|
-
|
654
691
|
def autoclean
|
655
692
|
|
656
693
|
tmp = Tempfile.new('raptget_autoclean')
|
@@ -676,7 +713,6 @@
|
|
676
713
|
# autoremove is used to remove packages that were automatically
|
677
714
|
# installed to satisfy dependencies for some package and that are no
|
678
715
|
# more needed.
|
679
|
-
|
680
716
|
def autoremove
|
681
717
|
|
682
718
|
tmp = Tempfile.new('raptget_autoremove')
|
@@ -875,3 +911,4 @@
|
|
875
911
|
|
876
912
|
|
877
913
|
#Dir[File.join(File.dirname(__FILE__), 'raptget/**/*.rb')].sort.each { |lib| require lib }
|
914
|
+
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: raptget
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Joel Bryan Juliano
|