2009-02-27 12:45:33 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
reqs=$(pdb query --filter \
|
|
|
|
'yast2-trans-?? yast2-trans-??\_??,status:production' \
|
|
|
|
| awk '{printf ("%s ", $1) }')
|
|
|
|
# echo $reqs
|
|
|
|
|
|
|
|
# for f in $(sed -n 's/^Conflicts: *\(.*\)/\1/gp' *.spec); do
|
|
|
|
# [ -z "$f" ] && break
|
|
|
|
# reqs=$(echo $reqs | sed "s/$f//")
|
|
|
|
# done
|
|
|
|
# # echo $reqs
|
|
|
|
|
|
|
|
# check whether all wanted packages are available in stable (noarch)
|
2009-03-02 16:01:18 +01:00
|
|
|
dist_dir=/mounts/dist/next-head-i586/suse/noarch
|
|
|
|
if [ -d $dist_dir ]; then
|
2009-02-27 12:45:33 +01:00
|
|
|
for f in $reqs; do
|
2009-03-02 16:01:18 +01:00
|
|
|
[ -f $dist_dir/$f.rpm ] || missing="$missing $f.rpm"
|
2009-02-27 12:45:33 +01:00
|
|
|
done
|
|
|
|
else
|
2009-03-02 16:01:18 +01:00
|
|
|
echo "warning: $dist_dir does not exist; skipping package check"
|
2009-02-27 12:45:33 +01:00
|
|
|
fi
|
|
|
|
# report result
|
|
|
|
if [ -n "$missing" ]; then
|
2009-03-02 16:01:18 +01:00
|
|
|
echo "missing package in $dist_dir :"
|
2009-02-27 12:45:33 +01:00
|
|
|
echo " \"$missing\""
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
sed -i.old "s/^Requires.*/Requires: $reqs/" yast2-trans-allpacks.spec
|
|
|
|
diff -u yast2-trans-allpacks.spec.old yast2-trans-allpacks.spec
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
|