(#11966) Change apt update to apt_update.
authorNan Liu <nan@puppetlabs.com>
Thu, 3 May 2012 22:44:17 +0000 (15:44 -0700)
committerNan Liu <nan@puppetlabs.com>
Fri, 4 May 2012 20:35:25 +0000 (13:35 -0700)
Based on code review change exec from apt update to apt_update.

manifests/builddep.pp
manifests/init.pp
manifests/ppa.pp
manifests/source.pp
manifests/update.pp
spec/classes/apt_spec.rb
spec/defines/builddep_spec.rb
spec/defines/ppa_spec.rb
spec/defines/source_spec.rb

index 35d8d3074b3df09a532f3c50906279e988a2b2bc..f7537fbb251dc0ab6cf5d0c605b0509ea9880953 100644 (file)
@@ -7,6 +7,6 @@ define apt::builddep() {
 
   exec { "apt-builddep-${name}":
     command => "/usr/bin/apt-get -y --force-yes build-dep ${name}",
-    notify  => Exec['apt update'],
+    notify  => Exec['apt_update'],
   }
 }
index ce88c3bd83814f575399972fa573463179ad1a77..53e25dca0ec26363a300aca2ef9bf9d10467cded 100644 (file)
@@ -43,7 +43,7 @@ class apt(
   }
 
   if $always_apt_update == true {
-    Exec <| title=='apt update' |> {
+    Exec <| title=='apt_update' |> {
       refreshonly => false,
     }
   }
@@ -60,7 +60,7 @@ class apt(
     group   => root,
     mode    => '0644',
     content => $sources_list_content,
-    notify  => Exec['apt update'],
+    notify  => Exec['apt_update'],
   }
 
   file { 'sources.list.d':
@@ -70,7 +70,7 @@ class apt(
     group   => root,
     purge   => $purge_sources_list_d,
     recurse => $purge_sources_list_d,
-    notify  => Exec['apt update'],
+    notify  => Exec['apt_update'],
   }
 
   case $disable_keys {
@@ -95,7 +95,7 @@ class apt(
     file { 'configure-apt-proxy':
       path    => "${apt_conf_d}/proxy",
       content => "Acquire::http::Proxy \"http://${proxy_host}:${proxy_port}\";",
-      notify  => Exec['apt update'],
+      notify  => Exec['apt_update'],
     }
   }
 }
index ca7f620956f0adeacc0a84ed3dd4d986d436845d..c0dfaa0f8212b78f46720540cdebe4240c9d5423 100644 (file)
@@ -23,7 +23,7 @@ define apt::ppa(
   exec { "add-apt-repository-${name}":
     command => "/usr/bin/add-apt-repository ${name}",
     creates => "${sources_list_d}/${sources_list_d_filename}",
-    notify  => Exec['apt update'],
+    notify  => Exec['apt_update'],
   }
 
   file { "${sources_list_d}/${sources_list_d_filename}":
index e9eb654cb81552c24cbe6f1187ba7d36e321fc49..cbf2fd4566ae43bf9312156ef14a88161a7f7eb1 100644 (file)
@@ -32,7 +32,7 @@ define apt::source(
     group   => root,
     mode    => '0644',
     content => template("${module_name}/source.list.erb"),
-    notify  => Exec['apt update'],
+    notify  => Exec['apt_update'],
   }
 
   if ($pin != false) and ($ensure == 'present') {
index b079c1fcc3f565971f0a1bc9826a7013ae9432ad..016df7d6af8032dfd32fc7ac85eb40efec9ccbdb 100644 (file)
@@ -1,7 +1,7 @@
 class apt::update {
   include apt::params
 
-  exec { 'apt update':
+  exec { 'apt_update':
     command     => "${apt::params::provider} update",
     refreshonly => true,
   }
index 4d44bcc78c726f528c324921882e5362e186de4e..ac626d291ef2d27f746a577268410086bebaec32 100644 (file)
@@ -73,7 +73,7 @@ describe 'apt', :type => :class do
             'group'   => "root",
             'purge'   => true,
             'recurse' => true,
-            'notify'  => 'Exec[apt update]'
+            'notify'  => 'Exec[apt_update]'
           })
         else
           should create_file("sources.list.d").with({
@@ -83,13 +83,13 @@ describe 'apt', :type => :class do
             'group'   => "root",
             'purge'   => false,
             'recurse' => false,
-            'notify'  => 'Exec[apt update]'
+            'notify'  => 'Exec[apt_update]'
           })
         end
       }
 
       it {
-        should contain_exec("apt update").with({
+        should contain_exec("apt_update").with({
           'command'     => "/usr/bin/apt-get update",
           'refreshonly' => refresh_only_apt_update
         })
@@ -119,7 +119,7 @@ describe 'apt', :type => :class do
             should contain_file('configure-apt-proxy').with(
               'path'    => '/etc/apt/apt.conf.d/proxy',
               'content' => "Acquire::http::Proxy \"http://#{param_hash[:proxy_host]}:#{param_hash[:proxy_port]}\";",
-              'notify'  => "Exec[apt update]"
+              'notify'  => "Exec[apt_update]"
             )
           else
             should_not contain_file('configure_apt_proxy')
index 39ee988b6aa6f3e6354b6f0c00e179f388e7576e..940c60c97b99ac6e5400e5f7bbe36c5760079910 100644 (file)
@@ -6,7 +6,7 @@ describe 'apt::builddep', :type => :define do
   describe "should succeed with a Class['apt']" do
     let(:pre_condition) { 'class {"apt": } ' }
 
-    it { should contain_exec("apt update").with({
+    it { should contain_exec("apt_update").with({
         'command' => "/usr/bin/apt-get update",
         'refreshonly' => true
       })
index e3534895aa6a74b41e3784a803aed26e0b512545..18c1a4f91e8c87411c20c98ba00e348c229aa8f1 100644 (file)
@@ -18,7 +18,7 @@ describe 'apt::ppa', :type => :define do
         t.sub(/^ppa:/,'').gsub('/','-') << "-" << "#{release}.list"
       end
 
-      it { should contain_exec("apt update").with(
+      it { should contain_exec("apt_update").with(
         'command'     => '/usr/bin/apt-get update',
         'refreshonly' => true
         )
@@ -26,7 +26,7 @@ describe 'apt::ppa', :type => :define do
 
       it { should contain_exec("add-apt-repository-#{t}").with(
         'command' => "/usr/bin/add-apt-repository #{t}",
-        'notify'  => "Exec[apt update]",
+        'notify'  => "Exec[apt_update]",
         'creates' => "/etc/apt/sources.list.d/#{filename}"
         )
       }
index a6c5e5f3a0a3649011ed35031ef787bf9064f591..110e8c21b6b5dad446fdb00d4829dea47e4df63e 100644 (file)
@@ -97,7 +97,7 @@ describe 'apt::source', :type => :define do
       }
 
       it {
-        should contain_exec("apt update").with({
+        should contain_exec("apt_update").with({
           "command"     => "/usr/bin/apt-get update",
           "refreshonly" => true
         })