doc, make, scripts: Add support for [pkg.conflicts.xxx]

Since the packaging machinery is pretty complicated, the information about
conflicting packages had to be passed through many APIs. The last commit
contained a patch which is left in the tree to have it in one file, it actually
is identical to this commit's diff, though. Git would save me that quirk.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2017-06-26 10:34:22 +00:00
commit c42e386c76
7 changed files with 100 additions and 54 deletions

View file

@ -410,6 +410,8 @@ build_pkg()
local distribution=`os`
local RPM_REQUIRES_RUN=`echo $RPM_REQUIRES_RUN | sed "s/__NEXT_VERSION__/$version/g; s/VERSION-REVISION/$version/g; s/VERSION/$version/g"`
local RPM_REQUIRES_DEVEL=`echo $RPM_REQUIRES_DEVEL | sed "s/__NEXT_VERSION__/$version/g; s/VERSION-REVISION/$version/g; s/VERSION/$version/g"`
local RPM_CONFLICTS_RUN=`echo $RPM_CONFLICTS_RUN | sed "s/__NEXT_VERSION__/$version/g; s/VERSION-REVISION/$version/g; s/VERSION/$version/g"`
local RPM_CONFLICTS_DEVEL=`echo $RPM_CONFLICTS_DEVEL | sed "s/__NEXT_VERSION__/$version/g; s/VERSION-REVISION/$version/g; s/VERSION/$version/g"`
# --- create source directory tree
create_empty_dir $src_tree "Source files compilation directory"
@ -464,7 +466,9 @@ build_pkg()
-S $tar_archive \
-N $RPM_PROJECT \
-R "$RPM_REQUIRES_RUN" \
-X "$RPM_CONFLICTS_RUN" \
-D "$RPM_REQUIRES_DEVEL" \
-Y "$RPM_CONFLICTS_DEVEL" \
-P $PROJECT \
-d $distribution \
> $RPM_PROJECT.$deffmt
@ -909,7 +913,7 @@ SCM=cvs
[ -d .git ] && SCM=git
opts='ht:p:m:N:R:D:P:a:F:B:A:'
opts='ht:p:m:N:R:D:X:Y:P:a:F:B:A:'
args=("$@")
global_args=()
while [ "$1" ]; do
@ -949,10 +953,18 @@ while [ "$1" != -- -a "$1" != "$cmd" ] ; do
eval RPM_REQUIRES_RUN=\"$2\"
shift
;;
-X)
eval RPM_CONFLICTS_RUN=\"$2\"
shift
;;
-D)
eval RPM_REQUIRES_DEVEL=\"$2\"
shift
;;
-Y)
eval RPM_CONFLICTS_DEVEL=\"$2\"
shift
;;
-P)
eval PROJECT=\"$2\"
shift