# File lib/chef/provider/package/macports.rb, line 71
        def upgrade_package(name, version)
          # Saving this to a variable -- weird rSpec behavior
          # happens otherwise...
          current_version = @current_resource.version

          if current_version.nil? or current_version.empty?
            # Macports doesn't like when you upgrade a package
            # that hasn't been installed.
            install_package(name, version)
          elsif current_version != version
            run_command_with_systems_locale(
              :command => "port upgrade #{name} @#{version}"
            )
          end
        end