summaryrefslogtreecommitdiffstats
path: root/make-perl-exclude-list.sh
blob: 490d747506a7ae68509091d0abe513f1d893cc94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/bash

if [ $# -ne 1 ] ; then
  >&2 echo "Usage: make-perl-exclude-list <use-distrib>"
  exit 1
fi

echo "# This is a list of the perl modules provided by the perl and perl-base"
echo "# packages. Many of these modules are also provided by standalone packages."
echo "# This list allows us to avoid including both on the installer media."
echo "#"
echo "# This file is automatically generated by the make-perl-exclude-list.sh script."
echo "# It may need to be manually edited if the perl or perl-base package does not"
echo "# provide a suitable version of a particular module (e.g. if another package"
echo "# requires a different version, and that version is available as a standalone"
echo "# package)."
echo "#"

urpmq --use-distrib $1 --provides perl perl-base \
| sed -E -e 's/^perl.*: //' -e 's/\((.*)\)/-\1/' -e 's/::/-/g' -e 's/\[.*\]$//' \
| grep -v '^perl-base' \
| grep '^perl-' \
| sort -u \
| perl -ne "my \$bn = \$_; chomp(\$bn); print \"\$_\" if my @files = grep { \$_ =~ \"$1/media/core/release/\$bn-[0-9].*rpm\" } glob(\"$1/media/core/release/\$bn-*.rpm\")"