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

sap_install_media_detect: Fix wrong sap_export_solman_java detection #913

Conversation

berndfinger
Copy link
Member

@berndfinger berndfinger commented Dec 11, 2024

Fixes issue #912.

The SAP Solution Manager JAVA Export file (e.g. 51054655_4.zip) contains files with the search pattern for 'sap_export_nwas_java' before files with the search pattern for 'sap_export_solman_java'. So we do no longer exit for the search pattern of the SAP Netweaver Java files (e.g. 51055106.zip). This will work as long as such files do not have content which are matched by any other search pattern.

Tested with:

  • 51050829_3 (NW 7.5 Installation Export)
  • 51054655_1 (SAP Solution Manager 7.2 SR2 Installation Export I)
  • 51054655_2 (SAP Solution Manager 7.2 SR2 Installation Export II)
  • 51054655_4 (SAP Solution Manager 7.2 SR2 - Java)
  • 51055106 (SAP Netweaver 7.5 SP22 Java)
$ sapfile *.zip
51050829_3.zip:                          sap_export_nwas_abap
51054655_1.zip:                          sap_export_solman_abap
51054655_2.zip:                          sap_export_solman_abap
51054655_4.zip:                          sap_export_solman_java
51055106.zip:                            sap_export_nwas_java

Fixes #921.

The SAP Solution Manager JAVA Export file (e.g. 51054655_4.zip) contains files with the search pattern
for 'sap_export_nwas_java' before files with the search pattern for 'sap_export_solman_java'. So we
fall through (= do no longer exit) for the search pattern of the SAP Netweaver Java files (e.g. 51055106.zip).
This will work as long as such files do not have content which are matched by any other search pattern.

Tested with:
51050829_3 (NW 7.5 Installation Export)
51054655_1 (SAP Solution Manager 7.2 SR2 Installation Export I)
51054655_2 (SAP Solution Manager 7.2 SR2 Installation Export II)
51054655_4 (SAP Solution Manager 7.2 SR2 - Java)
51055106   (SAP Netweaver 7.5 SP22 Java)

$ sapfile *.zip
51050829_3.zip:                          sap_export_nwas_abap
51054655_1.zip:                          sap_export_solman_abap
51054655_2.zip:                          sap_export_solman_abap
51054655_4.zip:                          sap_export_solman_java
51055106.zip:                            sap_export_nwas_java

Signed-off-by: Bernd Finger <[email protected]>
Copy link
Contributor

@ja9fuchs ja9fuchs left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@marcelmamula marcelmamula left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@sean-freeman sean-freeman left a comment

Choose a reason for hiding this comment

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

lgtm 👍

@berndfinger berndfinger merged commit ce6c499 into sap-linuxlab:dev Dec 11, 2024
3 of 4 checks passed
@berndfinger berndfinger deleted the issue-912-fix-solman-java-export-detection branch December 11, 2024 12:54
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.

4 participants