diff options
Diffstat (limited to 'zarb-ml/mageia-dev/attachments/20120711/3b0f3073/attachment-0001.bin')
-rw-r--r-- | zarb-ml/mageia-dev/attachments/20120711/3b0f3073/attachment-0001.bin | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/zarb-ml/mageia-dev/attachments/20120711/3b0f3073/attachment-0001.bin b/zarb-ml/mageia-dev/attachments/20120711/3b0f3073/attachment-0001.bin new file mode 100644 index 000000000..a28699d26 --- /dev/null +++ b/zarb-ml/mageia-dev/attachments/20120711/3b0f3073/attachment-0001.bin @@ -0,0 +1,35 @@ +#!/bin/bash + +LIST=slash-bin.txt +if [ -n "$1" -a -e "$1" ]; then + LIST="$1" +fi + +echo "Using file: $LIST" >&2 + +IFS=' +' + +OP="" +for pkg in $(cat $LIST | cut -d':' -f1 | sort -u); do + regexp="^/usr($(cat $LIST | grep "^$pkg:" | cut -d':' -f2 | xargs | sed 's/ /|/g'))\$" + file=$(echo $line | cut -d':' -f2) + + echo -n "Checking for conflicts for package $pkg..." >&2 + conflicts="$(urpmf "$regexp")" + if [ -n "$conflicts" ]; then + otherconflicts="$(echo "$conflicts" | grep -v "^$pkg:")" + if [ -z "$otherconflicts" ]; then + echo " self" >&2 + OP="${OP}$pkg:self\n" + else + otherpkgs=$(echo "$otherconflicts" | cut -d':' -f1 | sort -u | xargs) + echo " $otherpkgs" >&2 + OP="${OP}$pkg:$otherpkgs\n" + fi + else + echo " none" >&2 + fi +done + +echo -e "$OP"
\ No newline at end of file |