Permalink
Browse files

Adding unmask_package, example as follows,

unmask_package "x11-libs/qt-webkit" do
  version "4.7.3"
  unmaskfile "webkit"
end

unmask_package "x11-libs/qt-core" do
  version "4.7.3"
  unmaskfile "webkit"
end

unmask_package "x11-libs/qt-phonon" do
  version "4.7.3"
  unmaskfile "webkit"
end

unmask_package "x11-libs/qt-gui" do
  version "4.7.3"
  unmaskfile "webkit"
end

unmask_package "x11-libs/qt-xmlpatterns" do
  version "4.7.3"
  unmaskfile "webkit"
end

unmask_package "x11-libs/qt-script" do
  version "4.7.3"
  unmaskfile "webkit"
end

enable_package "x11-libs/qt-webkit" do
  version "4.7.3"
end

enable_package "x11-libs/qt-core" do
  version "4.7.3"
end

enable_package "x11-libs/qt-phonon" do
  version "4.7.3"
end

enable_package "x11-libs/qt-gui" do
  version "4.7.3"
end

enable_package "x11-libs/qt-xmlpatterns" do
  version "4.7.3"
end

enable_package "x11-libs/qt-script" do
  version "4.7.3"
end

package "x11-libs/qt-webkit" do
  version "4.7.3"
  action :install
end

Note this is an example to install 1 package,

Signed-off-by: Scott M. Likens <slikens@engineyard.com>
  • Loading branch information...
Scott M. Likens
Scott M. Likens committed Jun 30, 2011
1 parent 7cf97f7 commit 3f9fbd4beb0ac1bc9d9d137420dc40a673f50456
Showing with 27 additions and 0 deletions.
  1. +27 −0 emerge/definitions/unmask_package.rb
@@ -0,0 +1,27 @@
+define :unmask_package, :unmaskfile => nil, :version => nil do
+ name = params[:name]
+ version = params[:version]
+ unmaskfile = params[:unmaskfile]
+ full_name = "=" + name + '-' + version
+
+ file "/etc/portage/package.unmask" do
+ action :delete
+
+ not_if "file -d /etc/portage/package.unmask"
+ end
+
+ directory "/etc/portage/package.unmask" do
+ action :create
+ end
+
+ execute "touch /etc/portage/package.unmask/#{unmaskfile}" do
+ action :run
+ not_if { FileTest.exists?("/etc/portage/package.unmask/#{unmaskfile}") }
+ end
+
+ update_file "local portage package.use" do
+ path "/etc/portage/package.unmask/#{unmaskfile}"
+ body full_name
+ not_if "grep '#{full_name}' /etc/portage/package.unmask/#{unmaskfile}"
+ end
+end

0 comments on commit 3f9fbd4

Please sign in to comment.