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

adding a macrofile to macrofiles list



Hi,

i am trying to *add* another macrofile to the list of sourced
macrofiles. But i cannot find a way to do so. The --macros
option to rpmbuild and rpm say that this file list is used
instead of the original list. So i ask is there a simple
way to do this. The only solution i can think of is:

 1.  Parse the output of --showrc
 2.  Extract the macrofiles setting
 3.  Append my files to it
 4.  Pass this to rpm/rpmbuild via --macros

Is this really the way to go?

Strange, i tried that with

   rpm --macros=<my_file> --eval "%{_topdir}"

Which returned /usr/src/redhat, though _topdir is redefined in
<my_file>!?

When i use

   rpm --rcfile=bla --eval "%{_topdir}"

and the rcfile contains macrofiles: <my_file>
the eval returns the correct _topdir.

The reason for all this is, that i do the builds in some
subdirectories of various repository branches (mercurial).
Depending on the branch, this is in mercurial just another
directory, some macro definitions have to be changed i.e.
_topdir etc. and some branches do even define their own
macros depending on the release branch (stable, devel ...).
The release branch is parsed from the repository/directory name.
With a wrapper script this is all good and fine. On the first
run the necessary macros are generated and stored in a repo_rpm_macros
file. Now i tried to rerun a build from the commandline
passing the generated macros file via --macros to rpmbuild,
but this, according to the docs, would not allow me to source all
the default macro files.

Any hints?

thanks
   --lars


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