[paludis-commits] r4067 - scratch/scripts
dleverton at svn.pioto.org
dleverton at svn.pioto.org
Wed Dec 12 17:00:00 UTC 2007
Author: dleverton
Date: 2007-12-12 16:59:59 +0000 (Wed, 12 Dec 2007)
New Revision: 4067
Modified:
scratch/scripts/config-decruft-trunk
Log:
Fix package_mask.conf checking when used with latest trunk.
Modified: scratch/scripts/config-decruft-trunk
===================================================================
--- scratch/scripts/config-decruft-trunk 2007-12-12 16:06:59 UTC (rev 4066)
+++ scratch/scripts/config-decruft-trunk 2007-12-12 16:59:59 UTC (rev 4067)
@@ -1,9 +1,5 @@
#! /usr/bin/ruby -w
-# TODO:
-# * update to trunk
-# + env.mask_reasons -> pkg.masks
-
require 'Paludis'
################ output formatting ################
@@ -12,6 +8,7 @@
def colour(col, text) "[#{col}m#{text}[0m" end
def einfo(msg) puts " #{colour("1;32", "*")} #{msg}" end
+def ewarn(msg) puts " #{colour("1;33", "*")} #{msg}" end
def fmt_spec(spec) colour("1;33", spec) end
def fmt_fn(fn) colour(35, fn) end
@@ -463,6 +460,8 @@
################ package_mask.conf ################
+if Paludis.const_defined?(:Mask) then
+
# Store these so we can check package_unmask.conf entries against
# them.
masked_specs = {}
@@ -504,19 +503,16 @@
unmask_conf = true
unmasked = uninst.reject do | pkg |
masked = false
- # XXX
- ## Seems more useful not to consider keyword masks here, because
- ## they often get unmasked eventually.
- #mro = Paludis::MaskReasonsOptions.new
- #mro.add Paludis::MaskReasonsOption::OverrideUnkeyworded
- #mro.add Paludis::MaskReasonsOption::OverrideTildeKeywords
- #$env.mask_reasons(pkg, mro).each do | reason |
- # if reason == Paludis::MaskReason::UserMask then
- # unmask_conf = false
- # else
- # masked = true
- # end
- #end
+ # Seems more useful not to consider keyword masks here, because
+ # they often get unmasked eventually.
+ pkg.masks.each do | mask |
+ if mask.kind_of?(Paludis::UserMask) then
+ unmask_conf = false
+ elsif !(mask.kind_of?(Paludis::UnacceptedMask) && pkg.keywords_key &&
+ mask.unaccepted_key.raw_name == pkg.keywords_key.raw_name)
+ masked = true
+ end
+ end
masked
end
@@ -559,6 +555,10 @@
end
+else
+ ewarn "Can't check #{fmt_fn "package_mask.conf"} with this version of Paludis"
+end
+
################ package_unmask.conf ################
# Much the same as keywords.conf....
More information about the paludis-commits
mailing list