Method for Installing a Plurality of Dependent Software in a Machine
| |
|
|
Described is a method for installing a plurality of dependent software in a machine, the method comprising the following steps: generating a data structure (1) comprising a plurality of data items (10), each data item (10) of the data structure (1) comprising identification data (SW0, SS1, SW2, SW3, SW4, SW5) and version data (V0, V1, V2, V3, V3', V4, V5) relative to a software of the plurality of dependent software, the version data (V0, V1, V2, V3, V4; V3', V5) indicating a single version or a range of versions which the software may have; identifying, in the data structure (1), the data items (10) comprising version data (V3', V5) indicating a range of versions, and the data items (10) comprising equal identification data (SW3) and different version data (V3, V3'); modifying, in the data structure (1), the version data (V3, V3', V5) included in the data items (10) identified in the previous step, in such a way that all the data items (10) comprising equal identification data (SW3) also comprise equal version data (V3), and that all the data items (10) comprise version data (V0, V1, V2, VC3, V4, V5') indicating a single version; and if the step of modifying the version data (V0, V1, V2, V3, V3', V4, V5) is successful, installing the plurality of dependent software in the machine according to the version data (V0, V1, V2, VC3, V4, V5') present in the data structure. The invention also relates to a relative program for installing a plurality of dependent software in a machine.
- A method for installing a plurality of dependent software in a machine, the method comprising the following steps:
- - generating a data structure (1) comprising a plurality of data items (10), each data item (10) of the data structure (1) comprising identification data (SW0, SS1, SW2, SW3, SW4, SW5) and version data (V0, V1, V2, V3, V3', V4, V5) relating to a software of the plurality of dependent software, the version data (V0, V1, V2, V3, V4; V3', V5) indicating a single version or a range of versions which the software may have;
- - identifying, in the data structure (1),
- - the data items (10) comprising version data (V3', V5) indicating a range of versions, and
- - the data items (10) comprising equal identification data (SW3) and different version data (V3, V3');
- - modifying, in the data structure (1), the version data (V3, V3', V5) included in the data items (10) identified in the previous step, in such a way that all the data items (10) comprising equal identification data (SW3) also comprise equal version data (VC3), and in that all the data items (10) comprise version data (V0, V1, V2, VC3, V4, V5') indicating a single version; and
- - if the step of modifying the version data (V0, V1, V2, V3, V3', V4, V5) is successful, installing the plurality of dependent software in the machine according to the version data (V0, V1, V2, VC3, V4, V5') present in the data structure.
- The method according to claim 1, wherein the step of modifying, in the data structure (1), the version data (V0, V1, V2, V3, V3', V4, V5) comprises the following sub-steps:
- - for the data items (10) comprising equal identification data (SW3), adding to each data item also the version data (V3; V3') included in the other data items (10) comprising the same identification data (SW3);
- - identifying, in the data structure (1), the data item (10) comprising two or more version data (V3, V3');
- - for each data item (10) identified in the previous step, generating a common version data (VC3) and replacing the version data (V3, V3') included in the data item (10) identified with the common version data (VC3) generated;
- - if the step of generating a common version data (VC3) is unsuccessful, interrupting the step of modifying the version data (V0, V1, V2, V3, V3', V4, V5);
- - if the step of generating a common version data (VC3) is successful, identifying, in the data structure (1), the data items (10) comprising a version data (V5) indicating a range of versions; and
- - for each data item (10) identified in the previous step, transform the version data (V5) indicating a range of versions in a version data (V5') indicating a single version.
- The method according to claim 1, wherein the step of modifying, in the data structure (1), the version data (V0, V1, V2, V3, V3', V4, V5) comprises the following sub-steps:
- - generating a temporary data structure (2) configured for comprising a plurality of temporary data (20);
- - reading a data item (10) of the data structure (1);
- - if the identification data (SW0, SW1, SW2, SW3, SW4, SW5) included in the data item (10) read is not present in any temporary data (20) of the temporary data structure (2), creating a temporary data (20) equal to the data item (10) read;
- - if the identification data (SW0, SW1, SW2, SW3, SW4, SW5) included in the data item (10) is present in a temporary data item (20) of the temporary data structure (2), adding to the temporary data (20) the version data (V0, V1, V2, V3, V3', V4, V5) included in the data item (10) read;
- - repeating the previous steps for all the data items (10) of the data structure (1);
- - identifying, in the temporary data structure (2), the temporary data (20) comprising two or more version data (V3, V3');
- - for each temporary data (20) identified in the previous step, generating a common version data (VC3) and replacing the version data (V3, V3') included in the temporary data (20) identified with the common version data (VC3) generated;
- - if the step of generating a common version data is unsuccessful, interrupting the step of modifying the version data (V0, V1, V2, V3, V3', V4, V5);
- - if the step of generating a common version data (VC3) is successful, identifying, in the temporary data structure (2), the temporary data (20) comprising version data (V5) indicating a range of versions;
- - for each temporary data (20) identified in the previous step, transforming the version data (V5) indicating a range of versions in a version data (V5') indicating a single version; and
- - replacing the data items (10) of the data structure (1) with the temporary data (20) of the temporary data structure (2) comprising the same identification data (SW0, SW1, SW2, SW3, SW4, SW5).
- The method according to claim 2 or 3, wherein the step of generating a common version data (VC3) comprises the following sub-steps:
- - identifying common information in the two or more version data (V3, V3'), the common information indicating an intersection between the versions included in the two or more version data (V3, V3') which the software may have; and
- - generating a common version data (VC3) comprising the common information.
- The method according to claim 4, wherein the version data (V3', V5) also comprises incompatibility information on one or more versions which the software cannot have, and wherein the step of identifying common information is performed as a function of the incompatibility information, in such a way as to exclude the versions which the software cannot have from the common information.
- The method according to any one of claims 2 to 5, wherein the step of transforming the version data (V5) comprises the following sub-steps:
- - selecting a single version in a range of versions indicated by the version data (V5); and
- - transforming the version data (V5) indicating a range of versions in a version data (V5') indicating the selected single version.
- The method according to claim 6, wherein the version data (V3', V5) also comprises preference information on one or more versions which the software may preferably have, and wherein the step of selecting a single version is performed as a function of the preference information in such a way that the selected single version is a version which the software may preferably have.
- The method according to any one of the preceding claims, comprising the following steps:
- - if the step of modifying the version data (V0, V1, V2, V3, V3', V4, V5) is unsuccessful, not installing the plurality of dependent software in the machine; and
- - generating an alarm.
- The method according to any one of the preceding claims, wherein the step of installing the plurality of dependent software in the machine also comprises the following sub-steps:
- - installing the plurality of dependent software, as a function of the version data (V0, V1, V2, VC3, V4, V5') present in the data structure, in a test environment;
- - checking the correct operation of the plurality of dependent software in the test environment;
- - if the check gives a positive result, installing the plurality of dependent software in the machine as a function of the version data (V0, V1, V2, VC3, V4, V5') present in the data structure; and
- - if the check gives a negative result, not installing the plurality of dependent software in the machine and generating an alarm.
- The method according to claim 9, wherein the machine comprises a production environment and a test environment, wherein the step of installing the plurality of dependent software in a test environment occurs in the test environment of the machine and wherein the step of installing the plurality of dependent software in the machine occurs in the production environment.
- The method according to any one of the preceding claims, comprising the following steps:
- - after the step of installing the plurality of dependent software in the machine, checking the correct operation of the machine;
- - if the check of the previous step gives a negative result, uninstalling the plurality of dependent software, in such a way as to return the machine to an operating configuration, and/or indicating the version data (V0, V1, V2, VC3, V4, V5') present in the data structure as not operational.
- The method according to any one of the preceding claims, wherein the step of installing the plurality of dependent software comprises the following sub-steps:
- - for each software of the plurality of software to be installed, checking whether a version of the software already installed is present in the machine;
- - if a version of the software already installed is present in the machine, checking whether there is any difference between the version already installed and the relative version data (V0, V1, V2, VC3, V4, V5') present in the data structure; and
- - installing or not installing each software of the plurality of software to be installed as a function of the outcome of the check of the previous step, and/or of a command provided by an operator and/or of an installation parameter.
- A computer program including instructions for performing the steps of the method according to any one of claims 1 to 12.