update fails - error code1

update fails - error code1

Postby windowlicker » 21.05.2018, 09:59

Hi,

I want to download updates for office2016 64bit. But it fails:
Code: Select all
Summary
-------
The interactive setup is complete. The command to download the updates is:
./download-updates.bash o2k16-x64 deu -includesp

Do you wish to execute is now?
[Y/n]: y
Info: Starting download-updates.bash 1.3 (2018-04-19)
Info: Command line: /var/cache/win/20180521_wsusoffline_office2016/wsusoffline/sh/download-updates.bash
o2k16-x64 deu -includesp
Info: Running on WSUS Offline Update version 11.3

Info: Checking needed applications...
Info: Checking recommended applications...
Info: Please install a trash handler, to move files into the trash:
- gvfs-trash from package gvfs-bin for GNOME and LXDE
- trash-put from package trash-cli for other desktop environments and window managers

Info: Wget version: 1.16
Info: Wget uses dot display
Info: Setting download options for GNU Wget...
Info: Wake up sleeping DSL modems and routers...
PING cs12.wpc.v0cdn.net (68.232.34.240) 56(84) bytes of data.

--- cs12.wpc.v0cdn.net ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 10.468/10.560/10.711/0.137 ms

Info: Testing the Internet connection...
Info: Connection test succeeded

Info: Skipped searching for new versions of WSUS Offline Update, because it has already been done less
than one day ago

Info: Skipped update of configuration files for WSUS Offline Update, because it has already been done
less than one day ago

Info: Parsing command-line...
Info: Parsing first parameter...
Info: Adding "o2k16-x64" to the list of updates...

Info: Parsing preliminary list of updates...
Info: Found update: o2k16-x64, Office 2016, 32-bit and 64-bit

Info: Adding common updates for all Windows and Office versions...
Info: Adding "ofc" to the list of updates...

Info: Building a list of needed architectures for the included downloads. This depends on Windows
updates only...

Info: Parsing second parameter...
Info: Found language: deu, de, German

Info: Parsing remaining parameters...

./download-updates-tasks/10-parse-command-line.bash: line 331: architectures_list[*]: unbound variable
Exiting with error code 1  (temporary files are kept for debugging)...
Version: wsusoffline113.zip
OS: Debian-Jessie 64bit (fresh & updates)



Before a different update-run for win7-64bit were downloaded successfully.
Any idea what this error is or how to go on?


Regards
windowlicker
 
Posts: 4
Joined: 19.09.2016, 17:43

Re: update fails - error code1

Postby hbuhrmester » 22.05.2018, 01:39

This is an old bug in bash up to version 4.3: An empty array is treated as unset, even if the array variable was properly declared and initialized. This is fixed in bash 4.4, as of Debian 9 Stretch.


As a simple workaround, combine both downloads into one command, using a comma-separated list for the updates:

Code: Select all
./download-updates.bash w61-x64,o2k16-x64 deu -includesp


This will populate the list of architectures with x64. This list is derived from the specified Windows updates only, because it is used for the download of virus definition updates and .NET Frameworks. These downloads must match the Windows versions, not the Office versions (if specified).


Otherwise, simply comment out line 256 in the file download-updates.bash:

Code: Select all
set -o nounset



As a fix, the length of the array must be checked. This is already done in most places, but I must have forgotten it in this place.

Replace the function print_command_line_summary in file 10-parse-command-line.bash:

Code: Select all
function print_command_line_summary ()
{
    log_info_message "Final lists after processing command-line arguments. dotnet, if selected, appears twice to handle both installers and dynamic updates.
- Updates:       ${updates_list[*]}
- Architectures: ${architectures_list[*]} (depends on Windows updates only)
- Languages:     ${languages_list[*]}
- Downloads:     ${downloads_list[*]}
"
    return 0
}


with:

Code: Select all
function print_command_line_summary ()
{
    local architectures_list_serialized="-"

    # The list of architectures may be empty, if only Office update
    # are downloaded. Bash up to version 4.3 will treat empty arrays as
    # "unset", even if the array variables were properly declared and
    # initialized. This is fixed in bash version 4.4.
    if (( ${#architectures_list[@]} > 0 ))
    then
        architectures_list_serialized="${architectures_list[*]}"
    fi
    # This test is not necessary for the other lists, because they should
    # never be empty. One update and language must be specified on the
    # command line, and the list of included updates is initialized with
    # "wsus".

    log_info_message "Final lists after processing command-line arguments. dotnet, if selected, appears twice to handle both installers and dynamic updates.
- Updates:       ${updates_list[*]}
- Architectures: ${architectures_list_serialized} (depends on Windows updates only)
- Languages:     ${languages_list[*]}
- Downloads:     ${downloads_list[*]}
"
    return 0
}


Regards
hbuhrmester
 
Posts: 525
Joined: 11.10.2013, 20:59

Re: update fails - error code1

Postby windowlicker » 22.05.2018, 20:50

The combined download works.
I know I should upgrade the debian-server, even more so now.

Thanks for the quick solution and in-depth answer.
Really great support here...

Best regards
windowlicker
 
Posts: 4
Joined: 19.09.2016, 17:43


Return to Linux

Who is online

Users browsing this forum: No registered users and 38 guests