Skip to content

Commit

Permalink
instserver/dialogs.rb cleanup - removed unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Oct 14, 2014
1 parent 5cd4bb7 commit 976cd45
Showing 1 changed file with 1 addition and 30 deletions.
31 changes: 1 addition & 30 deletions src/include/instserver/dialogs.rb
Expand Up @@ -192,8 +192,7 @@ def CopyCDs(dir, stype, iso, promptmore, cddrive)
SCR.Execute(path(".target.umount"), Installation.sourcedir)

default_device = cddrive
mount_options = ""
result = nil
mount_options = iso ? "-oloop,ro " : ""

# CD is mounted. Check contents.
cdpath = Installation.sourcedir
Expand All @@ -206,10 +205,7 @@ def CopyCDs(dir, stype, iso, promptmore, cddrive)
base = ""
basever = ""
prompt_string = ""
prompt_version = ""
prompt_totalcds = 0
medianame = ""
doublesided = false
medianames = []
failed = false
cds_copied = false
Expand All @@ -224,13 +220,6 @@ def CopyCDs(dir, stype, iso, promptmore, cddrive)
# content file at first CD must be preserved (#171157)
content_first_CD = ""

# Fix for mounting ISO images over NFS
if iso
mount_options = "-oloop,ro "
else
mount_options = ""
end

# Loop for all CDs
while true
msg = ""
Expand Down Expand Up @@ -435,18 +424,7 @@ def CopyCDs(dir, stype, iso, promptmore, cddrive)
end

Builtins.foreach(media) do |m|
doublesided = true if m == "doublesided"
if Builtins.substring(m, 0, 5) == "MEDIA"
if doublesided
medianame = Builtins.regexpsub(
m,
"(.*)SIDE A(.*)",
"\\1SIDE %1\\2"
)
else
medianame = Builtins.regexpsub(m, "(.*)CD.", "\\1CD%1")
end

m = Builtins.substring(m, 7)

if !Builtins.contains(medianames, m)
Expand Down Expand Up @@ -615,9 +593,6 @@ def CopyCDs(dir, stype, iso, promptmore, cddrive)
# No media names, so we have to create the string for media request
if Builtins.size(medianames) == 0
prompt_string = Ops.get_string(content, "LABEL", "")
prompt_version = Ops.get_string(content, "VERSION", "")
else
prompt_version = ""
end

prompt_totalcds = total_cds
Expand Down Expand Up @@ -674,9 +649,6 @@ def CopyCDs(dir, stype, iso, promptmore, cddrive)
baseproduct = true
if Builtins.size(medianames) == 0
prompt_string = Ops.get_string(content, "LABEL", "")
prompt_version = Ops.get_string(content, "VERSION", "")
else
prompt_version = ""
end
# else, we create CD1, CD2, etc. (for code10 always)
if stype == :onedir && !code10_source
Expand Down Expand Up @@ -876,7 +848,6 @@ def CopyCDs(dir, stype, iso, promptmore, cddrive)
medianames = []

prompt_string = base
prompt_version = basever
elsif total_cds == current_cd && (standalone || baseproduct)
break
elsif total_cds == current_cd && promptmore
Expand Down

0 comments on commit 976cd45

Please sign in to comment.