Mandrake Linux Archives: cooker@mandrivalinux.org

Mandrake Linux: cooker@mandrivalinux.org


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

  • From: Olivier Thauvin
  • Subject: [Cooker] rpm and macros.* files
  • Date: 8 May 2005 00:08:48 -0000

rpm 4.4 is able to find macros file using a glob (* joker).

By default rpm use '/etc/rpm/macros.*' and currently in rpm-mandriva-setup I 
keep this setting. But this method is bad because it will take into account 
*.rpm{new,save}, which we don't want. So I plan to remove this behaviour and 
only keep /etc/rpm/macros and /etc/rpm/macros.cdb.

rpm-mandriva-setup is currently having '/etc/rpm/macros.d/*.macros'.
I provide 2 macros to easilly produce macros filename:

%_sys_macros_dir /etc/rpm/macros.d
%build_sysmacrospath() %{_sys_macros_dir}/%{?1:%{1}}%{?!1:%{name}}.macros

The first one is only the path, the second produce the full filename unsing 
%name if no argument is given.

[olivier@andromede ~]$ rpm --eval "%build_sysmacrospath foo"
/etc/rpm/macros.d/foo.macros


Do you have comment about this ?
Does /etc/rpm/*.macros prefered ?
Do you have better name for these macros ?

I plan to create another macros to dump a macros an its content, something 
like:
%dump %%_bindir
to produce:
%_bindir /usr/bin

This is intent to genrate macros file from spec.

Attachment: pgp00047.pgp
Description: PGP signature



Date Index | Thread Index

Search the archive:



To (un)subscribe from/to the lists:

Sympa mailing lists server.





Fund the Mandriva Linux project

Looking for a job?