86 lines
3.8 KiB
Plaintext
86 lines
3.8 KiB
Plaintext
# Server side packages.server.dep_rewrite file (this has to stay in /etc/entropy/packages)
|
|
# Using this file, you can apply arbitrary transformations to
|
|
# package dependencies via regular expressions.
|
|
# It can be used in case of Source Package Managers not properly
|
|
# splitting packages (and thus, dependencies), making possible to
|
|
# rewrite dependency strings without forking packages.
|
|
#
|
|
# PLEASE PRETTY PLEASE NOTE: in Entropy world, there are also conditional
|
|
# dependencies, composed by multiple dep strings connected together with logical
|
|
# AND or OR operators: ( app-foo/bar & foo-app/rab ) | app-nice/woot
|
|
# Please take this into consideration when writing dep rewrites.
|
|
|
|
# 1. Regex-based dependency rewrite syntax.
|
|
|
|
# LINE CONSTRUCTION:
|
|
# <::pkg::> <::dep_pattern::> <::dep_replace_1::> [<::dep_replace_2::> ...]
|
|
# ::pkg:: = package containing dependency to match, or * for catch-all
|
|
# ::dep_pattern:: = regexp of dependency to match
|
|
# ::dep_replace_1:: = replacement regexp
|
|
# ::dep_replace_n:: = additional replacement regexps (producing more deps out
|
|
# of one initially available)
|
|
# This is the function used for dependency rewrite:
|
|
# http://docs.python.org/library/re.html#re.sub
|
|
# See examples below
|
|
|
|
# EXAMPLES:
|
|
|
|
# replace media-sound/bar with media-sound/baz:
|
|
# media-gfx/foo media-sound/bar media-sound/baz
|
|
|
|
# Some more complex substitutions, change app-text/poppler dependency into
|
|
# app-text/poppler-glib maintaining the operator and version parts:
|
|
# media-gfx/pdf2svg (.*)app-text/poppler-(.*)(\[.*\]) \1app-text/poppler-glib-\2
|
|
# kde-base/okular (.*)app-text/poppler-(.*)(\[.*\]) \1app-text/poppler-qt4-\2
|
|
# media-gfx/inkscape (.*)app-text/poppler-(.*)(\[.*\]) \1app-text/poppler-glib-\2
|
|
|
|
# Some removal examples:
|
|
# remove media-sound/bar from media-gfx/foo dependencies:
|
|
# media-gfx/foo media-sound/bar
|
|
#
|
|
# Note 1: the removal dependency pattern can take advantage of regular
|
|
# expressions, of course.
|
|
# Note 2: providing no replaces, makes Entropy remove the whole matched dependency
|
|
# at <::dep_pattern::> (media-sound/bar) position, if found in media-gfx/foo
|
|
# dependencies.
|
|
|
|
# add a new dependency to media-gfx/foo, called media-sound/bar.
|
|
# Moreover, you can specify what kind of dependency you're adding appending
|
|
# an id between < and > at the end of the string.
|
|
# 1: build dependency
|
|
# 2: runtime dependency
|
|
# 3: post-dependency
|
|
# 4: manual dependency (dependency added by hand, this is the default)
|
|
# This is optional.
|
|
# If you want to add a conflict, just write something like:
|
|
# media-gfx/foo ++!media-sound/bar
|
|
# Generic example:
|
|
# media-gfx/foo ++media-sound/bar<3>
|
|
|
|
# Secial case, catch-all keyword.
|
|
# Apply a dep_rewrite rule to any package being added:
|
|
# * <::dep_pattern::> <::dep_replace_1::> [<::dep_replace_2::> ...]
|
|
# In other words, set <::pkg::> to *
|
|
|
|
|
|
# 2. Token-based dependency rewrite syntax.
|
|
|
|
# This syntax supports only modification to dependencies, not addition nor removal.
|
|
# rewrite <::pkg::> <::rule::>
|
|
# where <::pkg::> is matched the same was as explained above,
|
|
# and <::rule::> is:
|
|
# <from-dep=::dep_atom::> <to-dep=::new_dep_atom::>
|
|
# [<if-dep-has-use=::use_to_match::>] [<drop-use=::use_to_remove::>]
|
|
# (order does not matter).
|
|
#
|
|
# To a dependency to be rewritten, ::dep_atom:: must match and ::use_to_match:: if present.
|
|
# Dependency will be rewritten as ::new_dep_atom::.
|
|
# If present in rule, ::use_to_remove:: will be removed if dependency contains it.
|
|
#
|
|
# ::dep_atom:: and ::new_dep_atom:: are category/package names, without version, slot etc.
|
|
# ::use_to_remove:: can be an asterisk (*) which means to remove all USE flags.
|
|
#
|
|
# EXAMPLE
|
|
# rewrite foo/bar from-dep=app-crypt/pinentry to-dep=app-crypt/pinentry-gtk2 if-dep-has-use=gtk drop-use=gtk
|
|
# will change foo/bar's dependency "app-crypt/pinentry[gtk,qt5]" to "app-crypt/pinentry-gtk2[qt5]".
|