0.5
app-cordova
debian/bullseye
debian/jessie
|
Last change
on this file since b5208ff was 1c22429, checked in by Joachim Langenbach <joachim.langenbach@…>, 10 years ago |
- gnuboat_epd adds the apt repository from gnuboat to install epd-fuse package
|
-
Property mode
set to
100644
|
|
File size:
1.0 KB
|
| Line | |
|---|
| 1 | apt_package_updates = nil
|
|---|
| 2 | Facter.add("apt_has_updates") do
|
|---|
| 3 | confine :osfamily => 'Debian'
|
|---|
| 4 | if File.executable?("/usr/lib/update-notifier/apt-check")
|
|---|
| 5 | apt_check_result = Facter::Util::Resolution.exec('/usr/lib/update-notifier/apt-check 2>&1')
|
|---|
| 6 | if not apt_check_result.nil? and apt_check_result =~ /^\d+;\d+$/
|
|---|
| 7 | apt_package_updates = apt_check_result.split(';')
|
|---|
| 8 | end
|
|---|
| 9 | end
|
|---|
| 10 |
|
|---|
| 11 | setcode do
|
|---|
| 12 | if not apt_package_updates.nil? and apt_package_updates.length == 2
|
|---|
| 13 | apt_package_updates != ['0', '0']
|
|---|
| 14 | end
|
|---|
| 15 | end
|
|---|
| 16 | end
|
|---|
| 17 |
|
|---|
| 18 | Facter.add("apt_package_updates") do
|
|---|
| 19 | confine :apt_has_updates => true
|
|---|
| 20 | setcode do
|
|---|
| 21 | packages = Facter::Util::Resolution.exec('/usr/lib/update-notifier/apt-check -p 2>&1').split("\n")
|
|---|
| 22 | if Facter.version < '2.0.0'
|
|---|
| 23 | packages.join(',')
|
|---|
| 24 | else
|
|---|
| 25 | packages
|
|---|
| 26 | end
|
|---|
| 27 | end
|
|---|
| 28 | end
|
|---|
| 29 |
|
|---|
| 30 | Facter.add("apt_updates") do
|
|---|
| 31 | confine :apt_has_updates => true
|
|---|
| 32 | setcode do
|
|---|
| 33 | Integer(apt_package_updates[0])
|
|---|
| 34 | end
|
|---|
| 35 | end
|
|---|
| 36 |
|
|---|
| 37 | Facter.add("apt_security_updates") do
|
|---|
| 38 | confine :apt_has_updates => true
|
|---|
| 39 | setcode do
|
|---|
| 40 | Integer(apt_package_updates[1])
|
|---|
| 41 | end
|
|---|
| 42 | end
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.