2

Can I produce an RPM package where several dependencies are listed in a choose-one-from-those manner? Reason why I'm asking, my app needs a scalable Mincho-style Japanese font, and it looks like different flavors of RPM-based Linux provide different ones, with no common denominator. I don't want to create different RPMs for different distros.

Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281
  • The font may already be installed outside of RPM (such as MS Mincho may be in some installations), so you are generally out of luck here. Fear not however, you can use the "serif" font in your program, and fontconfig (has a list of default fonts to try) will pick a Mincho font when CJK is to be printed. – user502515 Dec 09 '10 at 21:15
  • Looks like the native font matching does not take size into account. When I tried that on fresh Debian, the Japanese characters were there, but the sizes were all off. – Seva Alekseyev Dec 09 '10 at 21:23
  • Yes, that can happen if you only have a bitmap font available. – user502515 Dec 10 '10 at 00:58

1 Answers1

2

That is what virtual provides are for. For example, the sendmail package has a "Provides: smtp-daemon", as does the postfix package. The cron package in turn only needs a "Requires: smtp-daemon". And that's how OR is implemented.

user502515
  • 4,346
  • 24
  • 20
  • Thought so. Now, how do I see "provides" for a package? Yum info does not return that... – Seva Alekseyev Dec 09 '10 at 21:16
  • Tx. Unfortunately, the packages with the IPM Mincho font in Fedora and SuSE don't have a single common provide... And that's just from two distros off the top of my head. – Seva Alekseyev Dec 10 '10 at 02:44
  • 1
    Made a fake package for SuSE that requires the one I need and provides the one that the app wants. Like a package alias. If installed before the app, it satisfies the dependency resolution process. – Seva Alekseyev Dec 27 '10 at 16:07
  • Does anyone know if this is supported on CentOS? – Enye Aaron Shi Oct 23 '19 at 15:35