SHA256
1
0
forked from pool/suse-hpc

Accepting request 672258 from home:eeich:branches:science:HPC

- macros.hpc: Fix default moduleversion link generation and deletion  
  * Generation: convert to a posttrans script to make sure the link
    target exists.
  * Deletion: Fix paths and line endings.
  (bsc#1124509)
- macros.hpc: Improve documentation for -L option in %%hpc_master macro.

OBS-URL: https://build.opensuse.org/request/show/672258
OBS-URL: https://build.opensuse.org/package/show/science:HPC/suse-hpc?expand=0&rev=43
This commit is contained in:
Egbert Eich 2019-02-06 17:56:26 +00:00 committed by Git OBS Bridge
parent e94e68033a
commit 3a4b960ea7
4 changed files with 23 additions and 10 deletions

View File

@ -6,7 +6,7 @@
<param name="exclude">.git</param>
<param name="filename">suse-hpc</param>
<param name="versionformat">0.4.%h</param>
<param name="revision">87f3f2c336d9dc5f9e8874e7639459371cfae3b0</param>
<param name="revision">e7d6197ce848ef77b7cb7565f199e9c5d7cf11a8</param>
<param name="extract">general/dlinfo.c</param>
<param name="extract">general/macros.hpc</param>
<param name="extract">general/hpc_elf.pl</param>

View File

@ -56,7 +56,7 @@ includedir=%{hpc_includedir} \
sysconfdir=%{hpc_sysconfdir} \
\
Name: %pname \
Description: %{summary:0} \
Description: %{SUMMARY} \
Version: %version \
Libs: -L${libdir} %{?-l:-l%{-l*}} \
Cflags: -I${includedir} \
@ -223,9 +223,10 @@ EOF\
# delete default in %postun
%hpc_module_delete_if_default \
_tmp=$(readlink -e %{hpc_module_dep_base}/version) && \
test "$_tmp" = "$(readlink -f %{hpc_module_dep_base}/.version.%{version})" && \
rm -f %{hpc_module_dep_base}/version || exit 0
_tmp=$(readlink -f %{hpc_module_dep_base}.version) && \\\
test "$_tmp" = "$(readlink -f %{hpc_module_dep_base}.version.%{version})" \\\
-o "x" = "x$(readlink -e %{hpc_module_dep_base}.version)" && \\\
rm -f %{hpc_module_dep_base}.version || exit 0
#
%hpc_write_modules_version_file \
@ -362,7 +363,8 @@ cat << EOF > %{buildroot}%{hpc_module_dep_base}%{version}
# -l: mark a library package, prepend the package name with a `lib` (like -s
# but without an explicite so version. Do not use -l and -s together.
# -L: Create a link from the .version.<version_no> file to the .version file
# to mark the default version.
# to mark the default version. To undo, add %hpc_module_delete_if_default
# to the package the master is created for.
# -a: Use native arch even if no library package.
# -N <pname>: Specify if a sub-package has different basename (pname)
# -q: For internal use only!
@ -418,11 +420,12 @@ Requires: %{s_name} = %version \
%description -n %_lname \
The package %{_lname} provides the dependency to get binary package %{s_name} \
When this package gets updated it installs the latest version of %name. \
%{-L:%post -n %_lname \
ln -sf %{hpc_module_dep_base}.version.%{version} %{hpc_module_dep_base}.version} \
%{-L:%posttrans -n %_lname \
[ -e %{hpc_module_dep_base}.version.%{version} ] && \\\
ln -sf .version.%{version} %{hpc_module_dep_base}.version} \
%files -n %{_lname} \
%defattr(-,root,root)\
%define _msg '%{summary:0}: Provide the dependency to get binary package %{s_name\\\\nWhen this package gets updated it installs the latest version of %name.}' \
%define _msg '%{summary}: Provide the dependency to get binary package %{s_name\\\\nWhen this package gets updated it installs the latest version of %name.}' \
%define _readme README.%{_mylib}%{_name}%{_p_ext} \
%define _tmpexec %(tmp=$(mktemp /tmp/scr-XXXXXX); \
readme=%{_readme} \

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Wed Feb 6 07:08:30 UTC 2019 - eich@suse.com
- macros.hpc: Fix default moduleversion link generation and deletion
* Generation: convert to a posttrans script to make sure the link
target exists.
* Deletion: Fix paths and line endings.
(bsc#1124509)
- macros.hpc: Improve documentation for -L option in %%hpc_master macro.
-------------------------------------------------------------------
Mon Jan 7 15:44:07 UTC 2019 - eich@suse.com

View File

@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#