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

Reinstall "intel-compilers-devel" cannot update modulefiles as RPMs were first installed then cleaned #1601

Open
aflyhorse opened this issue Nov 2, 2022 · 9 comments
Milestone

Comments

@aflyhorse
Copy link
Contributor

aflyhorse commented Nov 2, 2022

According to the spec file, it generates the modulefiles after installation in %post, and remove the generated files when uninstalling in %preun.

The problem is that, reinstall / update the rpm, always do installation before uninstallation, eg.

Running transaction
  Preparing        :                                                                                                1/1
  Running scriptlet: intel-compilers-devel-ohpc-2021-15.1.ohpc.2.4.x86_64                                           1/2
  Reinstalling     : intel-compilers-devel-ohpc-2021-15.1.ohpc.2.4.x86_64                                           1/2
  Running scriptlet: intel-compilers-devel-ohpc-2021-15.1.ohpc.2.4.x86_64                                           1/2
Generating new oneAPI modulefiles
Creating OpenHPC-style modulefiles for local oneAPI compiler installation(s).
--> Installing modulefile for version=2022.0.2
--> Installing modulefile for version=2022.1.0
--> Installing modulefile for version=2022.2.0

  Running scriptlet: intel-compilers-devel-ohpc-2021-15.1.ohpc.2.4.x86_64                                           2/2
  Cleanup          : intel-compilers-devel-ohpc-2021-15.1.ohpc.2.4.x86_64                                           2/2
  Verifying        : intel-compilers-devel-ohpc-2021-15.1.ohpc.2.4.x86_64                                           1/2
  Verifying        : intel-compilers-devel-ohpc-2021-15.1.ohpc.2.4.x86_64                                           2/2

Reinstalled:
  intel-compilers-devel-ohpc-2021-15.1.ohpc.2.4.x86_64

Complete!

Which left a very weird folder, contains nothing but a manifest showing that the modulefiles were once there.

[root@sirius intel]# ls -lah
drwxr-xr-x  2 root root   68 Nov  2 22:08 .
drwxr-xr-x 14 root root  198 Nov  2 22:43 ..
-rw-r--r--  1 root root  726 Nov  2 22:08 .rpm-manifest
[root@sirius intel.bak]# cat .rpm-manifest
2215d360a271ba440a60926f7610d55d  /opt/ohpc/pub/modulefiles/intel/2022.0.2
0596d48b4528a680033db5f58f898835  /opt/ohpc/pub/modulefiles/intel/.version.2022.0.2
bc04d554f208ad3c264fcf52aa0b2a8a  /opt/ohpc/pub/moduledeps/gnu/mkl/2022.0.2
bd37743e11d7f39396157e236b1a608e  /opt/ohpc/pub/modulefiles/intel/2022.1.0
ed8c2d1716c180abddb36b09671ea818  /opt/ohpc/pub/modulefiles/intel/.version.2022.1.0
6c1498dc6e99feeacff89c91e3e07966  /opt/ohpc/pub/moduledeps/gnu/mkl/2022.1.0
43c20d4221878ec19921327d187ec7ab  /opt/ohpc/pub/modulefiles/intel/2022.2.0
670d776690c4c1ffee31ad4870bacab9  /opt/ohpc/pub/modulefiles/intel/.version.2022.2.0
3148f9239aa59917ad5c9911bf389a5c  /opt/ohpc/pub/moduledeps/gnu/mkl/2022.2.0

A current walkaround is to yumdownloader the rpm, then rpm -e --nodeps follows a rpm -i.

@opoplawski
Copy link
Contributor

The %preun script needs to be conditionalized with:

if [ $1 -eq 0 ]
then
...
fi

per https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/

It would also be good if the module update code got moved to a separate script that could be easily called when needed.

Also, .rpmnew files really should only be generated if the new file differs from the old.

@adrianreber
Copy link
Member

@jcsiadal does your PR #1595 handle this better?

I also like the idea of having a the script as a separate file to run it manually outside of the RPM if needed.

@jcsiadal
Copy link
Contributor

jcsiadal commented Dec 5, 2022

That's one of the main points for my PR. I would like module updates to be independent of RPMs.
Give me a few days to update it. Right now, there's too much code devoted to the manifest and I've thought of a cleaner method to track created files.
Also, I need to test my colleague's code that organizes multiple oneAPI toolkit installs by version.

@opoplawski
Copy link
Contributor

@jcsiadal Any update on this? Thanks.

@aflyhorse
Copy link
Contributor Author

Do you mind hotfix it before figuring out a better long-term improvement?

@opoplawski
Copy link
Contributor

Are there any plans to address this?

opoplawski added a commit to opoplawski/ohpc that referenced this issue May 25, 2024
opoplawski added a commit to opoplawski/ohpc that referenced this issue May 25, 2024
opoplawski added a commit to opoplawski/ohpc that referenced this issue May 25, 2024
opoplawski added a commit to opoplawski/ohpc that referenced this issue May 25, 2024
opoplawski added a commit to opoplawski/ohpc that referenced this issue May 25, 2024
Copy link

github-actions bot commented Aug 1, 2024

A friendly reminder that this issue had no activity for 30 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 31, 2024
@aflyhorse
Copy link
Contributor Author

Still not fixed as of now

@adrianreber
Copy link
Member

I will try to include @opoplawski PR for the 3.3 release.

@adrianreber adrianreber added this to the 3.3 milestone Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants