[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: version in package and subpackage



Circa 2000-Oct-20 12:07:00 -0500 dixit Andy Worthington:

: I am editing an rpm and inserting a subpackage.  The subpackage
: needs to have a different release and version than the main package.
: Serveral places in the spec file %{version} is used for the main
: package version but I assume because the version of the subpackage
: is defined later it is the one used.  Is there any way around this
: besides defining like %{mainversion} to the right thing and changing
: all the %{version} to that?

This is obviously symptomatic of a flaw in the design of RPM's macro
facility.  You may be able to work around it using something like the
following example:

  %define MainName      blah
  %define MainVersion   1.1
  %define SubName       haha
  %define SubVersion    4.0.6
  ...
  Name: %{MainName}
  Version: %{MainVersion}
  ...
  %package -n %{SubName}
  Version: %{SubVersion}
  ...
  %prep
  %setup -n %{MainName}-%{MainVersion}

That is, define macros at or near the top of the specfile that contain
the relevant versions, then refer to them via your user-defined macros,
and not via %{version}.

-- 
jim knoble | jmknoble@jmknoble.cx | http://www.jmknoble.cx/





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []