diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-03-14 11:05:44 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-03-14 11:05:44 -0700 |
commit | d4579addae1dafa6b9e39b286995b97dac450aa2 (patch) | |
tree | 31aa3b95b252acc947df1e3307ab1b987a696ebe /lib/chef/provider/package/yum.rb | |
parent | 6705acbd7f301d1b04388043a3dfa0308655f120 (diff) | |
download | chef-d4579addae1dafa6b9e39b286995b97dac450aa2.tar.gz |
This commit is why AndOr needs to be banned
I can barely understand what these intend. I'm pretty certain that
the logic in the encrypted data bag item code was wrong (fixed now
to match the comment) and I'm believe I converted the yum code to
preserve the logic. But holy fuck its hard to read the yum code
that I'm replacing.
Diffstat (limited to 'lib/chef/provider/package/yum.rb')
-rw-r--r-- | lib/chef/provider/package/yum.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/provider/package/yum.rb b/lib/chef/provider/package/yum.rb index 73507ec5ab..dfd32fde55 100644 --- a/lib/chef/provider/package/yum.rb +++ b/lib/chef/provider/package/yum.rb @@ -478,9 +478,9 @@ class Chef sense = x.version.partial_compare(y.version) # Thanks to rpmdsCompare() rpmds.c - if sense < 0 and (x.flag == :> || x.flag == :>=) || (y.flag == :<= || y.flag == :<) + if (sense < 0) && ((x.flag == :> || x.flag == :>=) || (y.flag == :<= || y.flag == :<)) return true - elsif sense > 0 and (x.flag == :< || x.flag == :<=) || (y.flag == :>= || y.flag == :>) + elsif (sense > 0) && ((x.flag == :< || x.flag == :<=) || (y.flag == :>= || y.flag == :>)) return true elsif sense == 0 && ( ((x.flag == :== || x.flag == :<= || x.flag == :>=) && (y.flag == :== || y.flag == :<= || y.flag == :>=)) || |