Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Review] Request from 'schubi2' @ 'yast/yast-packager/review_170928_disable_remote_installation' #287

Merged
merged 11 commits into from
Oct 6, 2017

Conversation

schubi2
Copy link
Member

@schubi2 schubi2 commented Sep 28, 2017

Please review the following changes:

  • 957f2c3 disabling vnc, shh,.... if it is not supported

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 22.502% when pulling 17a9433 on review_170928_disable_remote_installation into 673ee41 on master.

Copy link
Member

@lslezak lslezak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just small improvements...

missing = remote_x11_packages.reject { |tag| pkg_will_be_installed(tag) }
unless missing.empty?
@missing_remote_packages << missing
@missing_remote_kind << "display-ip"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NP: the call is Linuxrc.display_ip, the install.inf setting is DISPLAY_IP so I'd stick with display_ip (with an underscore) here.

@missing_remote_kind.join(", "), @missing_remote_packages.join(", "))
if Mode.auto
error_string << " \n"
error_string << _("But the AutoYaST installation will be finished offline.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NP: the offline term is a bit confusing and not clear here, I'd rather say But the AutoYaST installation will be still finished automatically without any user interaction.

packages.concat(remote_x11_packages) if Linuxrc.display_ip
missing_remote_packages.flatten!
unless missing_remote_packages.empty?
error_string = format(_("Cannot support %s due missing packages %s. It will be disabled."),
Copy link
Member

@lslezak lslezak Oct 5, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put the packages list on a separate line (add \n), it can be quite long...

And maybe use something like Cannot support %s remote access in the installed system due....

error_string << " \n"
error_string << _("But the AutoYaST installation will be finished offline.")
end
log.warn error_string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NP: The error string is translated which might be a bit tricky to read (esp. in non-Latin languages). I'd rather prefer logging just the original @missing_remote_kind and @missing_remote_packages values with some untranslated message.

# e.g.: [["kernel-bigsmp", :CAND, :NONE], ["kernel-default", :CAND, :CAND],
# ["kernel-default", `BOTH, :INST]]
log.info("provides: #{provides}")
if provides.any? { |p| p[2] != :NONE }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd avoid hardcoding the result values and use directly the any? result:

ret = provides.any? { |p| p[2] != :NONE }
log.info("#{tag} will #{ret ? "" : "not "}be installed")
return ret

let(:ssh_packages) { %w(openssh iproute2) }
let(:braille_packages) { %w(sbl) }

context "on a boring local regular installation" do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do a lot of boring installations during testing... 😝

missing = ssh_packages.reject { |tag| pkg_will_be_installed(tag) }
unless missing.empty?
@missing_remote_packages << missing
@missing_remote_kind << "ssh"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this is also displayed in the UI, using the upper case variant is better: SSH, VNC,...

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 22.486% when pulling 2613ac2 on review_170928_disable_remote_installation into 673ee41 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 22.486% when pulling 523a5d4 on review_170928_disable_remote_installation into 673ee41 on master.

@coveralls
Copy link

coveralls commented Oct 6, 2017

Coverage Status

Coverage increased (+0.2%) to 22.492% when pulling db42fd0 on review_170928_disable_remote_installation into 673ee41 on master.

Copy link
Member

@lslezak lslezak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@schubi2 schubi2 merged commit dfeb9c6 into master Oct 6, 2017
@imobachgs imobachgs deleted the review_170928_disable_remote_installation branch April 26, 2018 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants