lib/getch/gentoo/use_flag.rb in getch-0.1.5 vs lib/getch/gentoo/use_flag.rb in getch-0.1.6
- old
+ new
@@ -1,12 +1,11 @@
# lib/use_flag.rb
module Getch::Gentoo
class UseFlag
- def initialize(options)
+ def initialize
@efi = Helpers::efi?
- @o = options
end
def apply
systemd
kmod
@@ -34,30 +33,30 @@
def grub
return if @efi
flags = []
use = Getch::Gentoo::Use.new('sys-boot/grub')
flags << '-grub_platforms_efi-64'
- flags << 'libzfs' if @o.fs == 'zfs'
- flags << 'device-mapper' if @o.fs == 'lvm'
+ flags << 'libzfs' if Getch::OPTIONS[:fs] == 'zfs'
+ flags << 'device-mapper' if Getch::OPTIONS[:fs] == 'lvm'
use.add(flags)
end
def zfs
- return unless @o.fs == 'zfs'
+ return unless Getch::OPTIONS[:fs] == 'zfs'
use = Getch::Gentoo::Use.new('sys-fs/zfs-kmod')
use.add('rootfs')
use = Getch::Gentoo::Use.new('sys-fs/zfs')
use.add('rootfs')
end
def lvm
- return unless @o.fs == 'lvm'
+ return unless Getch::OPTIONS[:fs] == 'lvm'
use = Getch::Gentoo::Use.new
use.add_global('lvm', 'device-mapper')
end
def cryptsetup
- return unless @o.encrypt
+ return unless Getch::OPTIONS[:encrypt]
use = Getch::Gentoo::Use.new
use.add_global('cryptsetup')
end
end
end