Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into proposal_cleaning
Browse files Browse the repository at this point in the history
Conflicts:
	src/clients/inst_proposal.rb
  • Loading branch information
jreidinger committed Jan 13, 2015
2 parents 80450af + 919dcc0 commit 40b637b
Show file tree
Hide file tree
Showing 103 changed files with 1,485 additions and 1,556 deletions.
62 changes: 62 additions & 0 deletions .rubocop.yml
@@ -0,0 +1,62 @@
# use the shared Yast defaults
inherit_from:
/usr/share/YaST2/data/devtools/data/rubocop_yast_style.yml

# Offense count: 153
Metrics/AbcSize:
Max: 304

# Offense count: 32
Metrics/BlockNesting:
Max: 8

# Offense count: 29
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 1051

# Offense count: 88
Metrics/CyclomaticComplexity:
Max: 57

# Offense count: 432
# Configuration parameters: AllowURI, URISchemes.
Metrics/LineLength:
Max: 204

# Offense count: 201
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 431

# Offense count: 89
Metrics/PerceivedComplexity:
Max: 63

# Offense count: 6
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/AccessModifierIndentation:
Enabled: false

# Offense count: 85
Style/Documentation:
Enabled: false

# Offense count: 6
# Configuration parameters: Exclude.
Style/FileName:
Include:
- src/lib/**/*.rb

# Offense count: 179
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/MethodName:
Include:
- src/lib/**/*.rb

# Offense count: 22
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/VariableName:
Include:
- src/lib/**/*.rb
3 changes: 2 additions & 1 deletion .travis.yml
Expand Up @@ -5,10 +5,11 @@ before_install:
# disable rvm, use system Ruby
- rvm reset
- wget https://raw.githubusercontent.com/yast/yast-devtools/master/travis-tools/travis_setup.sh
- sh ./travis_setup.sh -p "rake yast2-devtools yast2-testsuite yast2-core-dev yast2 yast2-network" -g "rspec:2.14.1 yast-rake gettext"
- sh ./travis_setup.sh -p "rake yast2-devtools yast2-testsuite yast2-core-dev yast2 yast2-network" -g "rspec:2.14.1 yast-rake gettext rubocop:0.28.0"
script:
- rake check:syntax
- rake check:pot
- rubocop
- make -f Makefile.cvs
- make
- sudo make install
Expand Down
5 changes: 2 additions & 3 deletions Rakefile
@@ -1,7 +1,7 @@
require "yast/rake"

Yast::Tasks.configuration do |conf|
#lets ignore license check for now
# lets ignore license check for now
conf.skip_license_check << /.*/
end

Expand All @@ -17,5 +17,4 @@ task :check_rng_status do
end
end

task :tarball => :check_rng_status

task tarball: :check_rng_status
1 change: 0 additions & 1 deletion autoyast_desktop/deploy_image.desktop
Expand Up @@ -4,7 +4,6 @@ Categories=Settings;System;Qt;X-SuSE-YaST;X-SuSE-YaST-Misc;

X-KDE-ModuleType=Library
X-KDE-HasReadOnlyMode=false
X-KDE-Library=yast2
X-SuSE-YaST-Call=deploy_image

X-SuSE-YaST-Group=Software
Expand Down
4 changes: 1 addition & 3 deletions control/complete_workflow.rb
Expand Up @@ -37,15 +37,13 @@ def main
return :abort
end


Wizard.OpenNextBackStepsDialog
@stage_mode = [{ "stage" => "normal", "mode" => Mode.mode }]
#stage_mode = add(stage_mode, $["stage": "continue", "mode": Mode::mode () ] );
# stage_mode = add(stage_mode, $["stage": "continue", "mode": Mode::mode () ] );
ProductControl.AddWizardSteps(@stage_mode)

@ret = ProductControl.Run


UI.CloseDialog
@ret
end
Expand Down
2 changes: 1 addition & 1 deletion control/inst_test_workflow.rb
Expand Up @@ -29,7 +29,7 @@ def main
Label(Ops.add("id: ", Ops.get_string(@args, "step_id", "none")))
)

#Wizard::SetContents (caption, contents, help, GetInstArgs::enable_back(), GetInstArgs::enable_next());
# Wizard::SetContents (caption, contents, help, GetInstArgs::enable_back(), GetInstArgs::enable_next());
Wizard.SetContents(@caption, @contents, @help, true, true)

@button = Convert.to_symbol(UI.UserInput)
Expand Down
24 changes: 24 additions & 0 deletions package/yast2-installation.changes
@@ -1,3 +1,27 @@
-------------------------------------------------------------------
Wed Jan 7 14:27:28 UTC 2015 - jreidinger@suse.com

- do not stuck during copy of logs files (bnc#897091)
- 3.1.126

-------------------------------------------------------------------
Thu Dec 18 20:12:47 UTC 2014 - lslezak@suse.cz

- Fix bashisms and shebangs in scripts (by "Ledest")
- 3.1.125

-------------------------------------------------------------------
Wed Dec 10 15:57:59 CET 2014 - aschnell@suse.de

- drop check for Gtk since Gtk UI of YaST is no longer supported
(bsc#908607)
- 3.1.124

-------------------------------------------------------------------
Thu Dec 4 09:50:16 UTC 2014 - jreidinger@suse.com

- remove X-KDE-Library from desktop file (bnc#899104)

-------------------------------------------------------------------
Wed Nov 26 16:53:17 UTC 2014 - ancor@suse.com

Expand Down
6 changes: 3 additions & 3 deletions package/yast2-installation.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-installation
Version: 3.1.122
Version: 3.1.126
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand All @@ -37,8 +37,8 @@ BuildRequires: docbook-xsl-stylesheets libxslt update-desktop-files yast2-core-
BuildRequires: yast2-devtools >= 3.1.10
BuildRequires: rubygem(rspec)

# Linuxrc.keys
BuildRequires: yast2 >= 3.1.41
# Base clients for inst clients
BuildRequires: yast2 >= 3.1.112

# Yast::Remote
BuildRequires: yast2-network
Expand Down
1 change: 1 addition & 0 deletions src/Makefile.am
Expand Up @@ -107,6 +107,7 @@ ylibdir = "${yast2dir}/lib/installation"
ylib_DATA = \
lib/installation/cio_ignore.rb \
lib/installation/clone_settings.rb \
lib/installation/copy_logs_finish.rb \
lib/installation/minimal_installation.rb \
lib/installation/prep_shrink.rb \
lib/installation/remote_finish_client.rb
Expand Down
12 changes: 4 additions & 8 deletions src/clients/clone_finish.rb
Expand Up @@ -19,22 +19,18 @@
# current contact information at www.novell.com.
# ------------------------------------------------------------------------------


module Yast
import "Installation"

class CloneFinishClient < Client
def main

textdomain "installation"

func = ""

# Check arguments
args = WFM.Args
if args.size > 0 && args[0].is_a?(::String)
func = args[0]
end
func = args[0] if args.size > 0 && args[0].is_a?(::String)

Builtins.y2milestone("starting clone_finish")
Builtins.y2debug("func=%1", func)
Expand All @@ -53,16 +49,16 @@ def main
WFM.call("clone_proposal", ["Write"])

# copy from insts_sys to target system
if File.exists? "/root/autoinst.xml"
if File.exist? "/root/autoinst.xml"
WFM.Execute(path(".local.bash"), "cp /root/autoinst.xml #{Installation.destdir}/root/autoinst.xml")
end

Builtins.y2milestone("clone_finish Write finished")
else
raise ("unknown function: #{func}")
raise "unknown function: #{func}"
end

return nil
nil
end
end
end
Expand Down
12 changes: 6 additions & 6 deletions src/clients/clone_proposal.rb
Expand Up @@ -37,9 +37,9 @@ def main
"links" => [CLONE_ENABLE_LINK, CLONE_DISABLE_LINK],
# TRANSLATORS: help text
"help" => _(
"<p>Use <b>Clone System Settings</b> if you want to create an AutoYaST profile.\n" +
"AutoYaST is a way to do a complete SUSE Linux installation without user interaction. AutoYaST\n" +
"needs a profile to know what the installed system should look like. If this option is\n" +
"<p>Use <b>Clone System Settings</b> if you want to create an AutoYaST profile.\n" \
"AutoYaST is a way to do a complete SUSE Linux installation without user interaction. AutoYaST\n" \
"needs a profile to know what the installed system should look like. If this option is\n" \
"selected, a profile of the current system is stored in <tt>/root/autoinst.xml</tt>.</p>"
)
}
Expand Down Expand Up @@ -80,15 +80,15 @@ def main
options = {}
options["target_path"] = param["target_path"] if param["target_path"]
mode = Mode.mode
WFM.call("clone_system",[options])
WFM.call("clone_system", [options])
Mode.SetMode(mode)
end
ret = true
else
raise "Unsuported action #{func}"
end

return ret
ret
end

def proposal_text
Expand Down Expand Up @@ -116,7 +116,7 @@ def proposal_text

ret << "</li></ul>\n"
end
end unless defined? (CloneProposalClient) #avoid class redefinition if reevaluated
end unless defined? (CloneProposalClient) # avoid class redefinition if reevaluated
end

Yast::CloneProposalClient.new.main
14 changes: 6 additions & 8 deletions src/clients/copy_files_finish.rb
Expand Up @@ -148,7 +148,7 @@ def main
1,
"/media.1/build"
)
if @build_file != nil
if !@build_file.nil?
Builtins.y2milestone("Copying /media.1/build file")
WFM.Execute(
path(".local.bash"),
Expand Down Expand Up @@ -210,7 +210,7 @@ def main
"globals",
"base_product_license_directory"
)
if @license_dir == nil || @license_dir == ""
if @license_dir.nil? || @license_dir == ""
@license_dir = Builtins.sformat(
"%1%2/licenses/base/",
Installation.destdir,
Expand Down Expand Up @@ -386,7 +386,7 @@ def CopyAllWorkflowFiles
def CopyHardwareUdevRules
udev_rules_destdir = File.join(Installation.destdir, UDEV_RULES_DIR)

if ! FileUtils.Exists(udev_rules_destdir)
if !FileUtils.Exists(udev_rules_destdir)
log.info "Directory #{udev_rules_destdir} does not exist yet, creating it"
WFM.Execute(path(".local.bash"), "mkdir -p #{udev_rules_destdir}")
end
Expand All @@ -398,15 +398,13 @@ def CopyHardwareUdevRules
log.info "Copying all udev rules from #{UDEV_RULES_DIR} to #{udev_rules_destdir}"
cmd_out = WFM.Execute(path(".local.bash_output"), cmd)

if cmd_out["exit"] != 0
log.error "Error copying udev rules"
end
log.error "Error copying udev rules" if cmd_out["exit"] != 0

nil
end

# Prevent from re-defining client class
# Re-defining would produce warnings that constants were already initialized
# Prevent from re-defining client class
# Re-defining would produce warnings that constants were already initialized
end unless defined? CopyFilesFinishClient
end

Expand Down

0 comments on commit 40b637b

Please sign in to comment.