formula: add keg_only_reason to formula hash
This commit is contained in:
parent
3373a82d22
commit
00b588068f
@ -1942,6 +1942,7 @@ class Formula
|
|||||||
"version_scheme" => version_scheme,
|
"version_scheme" => version_scheme,
|
||||||
"bottle" => {},
|
"bottle" => {},
|
||||||
"keg_only" => keg_only?,
|
"keg_only" => keg_only?,
|
||||||
|
"keg_only_reason" => keg_only_reason&.to_hash,
|
||||||
"bottle_disabled" => bottle_disabled?,
|
"bottle_disabled" => bottle_disabled?,
|
||||||
"options" => [],
|
"options" => [],
|
||||||
"build_dependencies" => dependencies.select(&:build?)
|
"build_dependencies" => dependencies.select(&:build?)
|
||||||
|
@ -60,6 +60,19 @@ class KegOnlyReason
|
|||||||
@reason
|
@reason
|
||||||
end.strip
|
end.strip
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def to_hash
|
||||||
|
reason_string = if @reason.is_a?(Symbol)
|
||||||
|
@reason.inspect
|
||||||
|
else
|
||||||
|
@reason.to_s
|
||||||
|
end
|
||||||
|
|
||||||
|
{
|
||||||
|
"reason" => reason_string,
|
||||||
|
"explanation" => @explanation,
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Used to annotate formulae that don't require compiling or cannot build a bottle.
|
# Used to annotate formulae that don't require compiling or cannot build a bottle.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user