# File lib/puppet/provider/package/apt.rb, line 25
25:   def checkforcdrom
26:     unless defined?(@@checkedforcdrom)
27:       if FileTest.exists? "/etc/apt/sources.list"
28:         @@checkedforcdrom = !!(File.read("/etc/apt/sources.list") =~ /^[^#]*cdrom:/)
29:       else
30:         # This is basically a pathalogical case, but we'll just
31:         # ignore it
32:         @@checkedforcdrom = false
33:       end
34:     end
35: 
36:     if @@checkedforcdrom and @resource[:allowcdrom] != :true
37:       raise Puppet::Error,
38:         "/etc/apt/sources.list contains a cdrom source; not installing.  Use 'allowcdrom' to override this failure."
39:     end
40:   end