diff --git a/python/LbRPMTools/LHCbRPMSpecBuilder.py b/python/LbRPMTools/LHCbRPMSpecBuilder.py index 787db305a6c7af83755a1f1da0d44564a3379b02..73129753416e443108cea41ecec1a6a0dc79123c 100644 --- a/python/LbRPMTools/LHCbRPMSpecBuilder.py +++ b/python/LbRPMTools/LHCbRPMSpecBuilder.py @@ -873,7 +873,7 @@ class LHCbDatapkgRpmSpec(LHCbBaseRpmSpec): def __init__(self, project, fulldatapkg, version, sharedTar, buildarea, release = 0): """ Constructor """ super(LHCbDatapkgRpmSpec, self).__init__(project, version) - __log__.debug("Creating Shared RPM for %s/%s" % (project, version)) + __log__.debug("Creating Data Pkg RPM for %s/%s" % (project, version)) self._project = project self._fulldatapkg = fulldatapkg if "/" in fulldatapkg: @@ -882,6 +882,8 @@ class LHCbDatapkgRpmSpec(LHCbBaseRpmSpec): self._package = fulldatapkg self._normfulldatapkg = fulldatapkg.replace("/", "_") self._fullname = "_".join([self._project.upper(), self._normfulldatapkg]) + self._fullnameWithVer = "_".join([self._project.upper(), + self._normfulldatapkg, self._version]) self._versiondir = os.path.join(self._project.upper(), self._fulldatapkg) self._version = version self._sharedTar = sharedTar @@ -896,10 +898,9 @@ class LHCbDatapkgRpmSpec(LHCbBaseRpmSpec): def getRPMName(self, norelease=False): ''' Return the architecture, always noarch for our packages''' - projname = "_".join([self._project.upper(), self._normfulldatapkg]) - projver = ".".join([str(n) for n in [ self._lhcb_maj_version, - self._lhcb_min_version, - self._lhcb_patch_version]]) + projname = "_".join([self._project.upper(), self._normfulldatapkg, self._version]) + # We keep this package to 1.0.0, but the requirements map the vXrY + projver = ".".join([str(n) for n in [ 1, 0, 0 ]]) if norelease: return "-".join([projname, projver]) full = "-".join([projname, projver, str(self._lhcb_release_version)]) @@ -921,6 +922,7 @@ class LHCbDatapkgRpmSpec(LHCbBaseRpmSpec): %define normfulldatapkg ${normfulldatapkg} %define fulldatapkg ${fulldatapkg} %define fullname ${fullname} +%define fullnameWithVer ${fullnameWithVer} %define package ${package} %define lbversion ${version} %define _postshell /bin/bash @@ -933,8 +935,8 @@ class LHCbDatapkgRpmSpec(LHCbBaseRpmSpec): %define tmpdir %{buildarea}/tmpbuild %define _tmppath %{buildarea}/tmp -Name: %{fullname} -Version: %{lhcb_maj_version}.%{lhcb_min_version}.%{lhcb_patch_version} +Name: %{fullnameWithVer} +Version: 1.0.0 Release: %{lhcb_release_version} Vendor: LHCb Summary: %{project} @@ -953,7 +955,6 @@ Provides: %{package}_v%{lhcb_maj_version} = %{lhcb_maj_version}.%{lhcb_min_versi Provides: %{fullname}_v%{lhcb_maj_version} = %{lhcb_maj_version}.%{lhcb_min_version}.%{lhcb_patch_version} Requires: %{projectUp}_common Requires(post): LBSCRIPTS -Requires(post): COMPAT \n""").substitute(buildarea = self._buildarea, project = self._project, projectUp = self._project.upper(), @@ -965,6 +966,7 @@ Requires(post): COMPAT lhcb_patch_version = self._lhcb_patch_version, lhcb_release_version = self._lhcb_release_version, fullname = self._fullname, + fullnameWithVer = self._fullnameWithVer, versiondir = self._versiondir, package = self._package, prefix = PREFIX @@ -1157,9 +1159,6 @@ Provides: /bin/bash ''' return """ -Requires: CMT -Requires: COMPAT - """ def _createDescription(self):