diff options
author | Nicolas Vigier <boklm@mageia.org> | 2013-04-14 13:46:12 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2013-04-14 13:46:12 +0000 |
commit | 1be510f9529cb082f802408b472a77d074b394c0 (patch) | |
tree | b175f9d5fcb107576dabc768e7bd04d4a3e491a0 /zarb-ml/mageia-dev/attachments/20120711/3b0f3073 | |
parent | fa5098cf210b23ab4f419913e28af7b1b07dafb2 (diff) | |
download | archives-master.tar archives-master.tar.gz archives-master.tar.bz2 archives-master.tar.xz archives-master.zip |
Diffstat (limited to 'zarb-ml/mageia-dev/attachments/20120711/3b0f3073')
-rw-r--r-- | zarb-ml/mageia-dev/attachments/20120711/3b0f3073/attachment-0001.bin | 35 | ||||
-rw-r--r-- | zarb-ml/mageia-dev/attachments/20120711/3b0f3073/attachment.bin | 35 |
2 files changed, 70 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 diff --git a/zarb-ml/mageia-dev/attachments/20120711/3b0f3073/attachment.bin b/zarb-ml/mageia-dev/attachments/20120711/3b0f3073/attachment.bin new file mode 100644 index 000000000..a28699d26 --- /dev/null +++ b/zarb-ml/mageia-dev/attachments/20120711/3b0f3073/attachment.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 |