Improved fix-broken
This commit is contained in:
parent
99e77677ab
commit
5add63fd22
1 changed files with 36 additions and 19 deletions
|
@ -1,21 +1,38 @@
|
|||
#!/bin/sh
|
||||
echo "Checking Frameworks"
|
||||
for i in `osc pr KDE:Unstable:Frameworks -s B -q -V -a x86_64 -r openSUSE_Factory | grep -v x86_64 | grep B | sed 's/B //g' | sed 's/ //g'`
|
||||
do
|
||||
echo $i
|
||||
osc service rr KDE:Unstable:Frameworks $i
|
||||
done
|
||||
#!/bin/bash
|
||||
|
||||
echo "Checking Applications"
|
||||
for i in `osc pr KDE:Unstable:Applications -s B -q -V -a x86_64 -r KDE_Unstable_Frameworks_openSUSE_Factory | grep -v x86_64 | grep B | sed 's/B //g' | sed 's/ //g'`
|
||||
do
|
||||
echo $i
|
||||
osc service rr KDE:Unstable:Applications $i
|
||||
done
|
||||
function rebuild_broken() {
|
||||
local packages=$1
|
||||
local repo=$2
|
||||
echo "Checking broken packages in ${repo}"
|
||||
for pkg in $packages
|
||||
do
|
||||
echo $pkg
|
||||
osc service rr $repo $pkg
|
||||
done
|
||||
}
|
||||
|
||||
function check_broken() {
|
||||
local repo=$1
|
||||
local target=$2
|
||||
osc pr "${repo}" -q -V -a x86_64 -s B -r "${target}" --csv | cut -d\; -f1 | sed '1d'
|
||||
}
|
||||
|
||||
status_frameworks=$(check_broken "KDE:Unstable:Frameworks" openSUSE_Factory)
|
||||
status_applications=$(check_broken "KDE:Unstable:Applications" KDE_Unstable_Frameworks_openSUSE_Factory)
|
||||
status_extra=$(check_broken "KDE:Unstable:Extra" KDE_Unstable_Frameworks_openSUSE_Factory)
|
||||
|
||||
if [ ! -z $status_frameworks ];
|
||||
then
|
||||
rebuild_broken $status_frameworks KDE:Unstable:Frameworks
|
||||
fi
|
||||
|
||||
if [ ! -z $status_applications ];
|
||||
then
|
||||
rebuild_broken $status_applications KDE:Unstable:Applications
|
||||
fi
|
||||
|
||||
if [ ! -z $status_extra ];
|
||||
then
|
||||
rebuild_broken $status_extra KDE:Unstable:Extra
|
||||
fi
|
||||
|
||||
echo "Checking Extra"
|
||||
for i in `osc pr KDE:Unstable:Extra -s B -q -V -a x86_64 -r KDE_Unstable_Frameworks_openSUSE_Factory | grep -v x86_64 | grep B | sed 's/B //g' | sed 's/ //g'`
|
||||
do
|
||||
echo $i
|
||||
osc service rr KDE:Unstable:Extra $i
|
||||
done
|
||||
|
|
Loading…
Add table
Reference in a new issue