mirror of
https://github.com/pentoo/pentoo-overlay
synced 2025-12-06 16:33:09 +01:00
scripts: speed up bug script
This commit is contained in:
parent
fc70711ef2
commit
573c280cb3
1 changed files with 8 additions and 6 deletions
|
|
@ -1,14 +1,16 @@
|
||||||
|
#!/bin/bash
|
||||||
#work around for detecting and fixing bug #461824
|
#work around for detecting and fixing bug #461824
|
||||||
grep -r _portage_reinstall_ /etc {/usr,}/{*bin,lib*} | grep -v doebuild > /tmp/urfuct.txt
|
|
||||||
|
local CORES="$(grep -c ^proc /proc/cpuinfo)"
|
||||||
|
if [[ "${CORES}" -eq "0" ]] ; then CORES="1" ; fi
|
||||||
|
|
||||||
|
find /etc {/usr,}/{*bin,lib*} -type f | xargs -P ${CORES} fgrep '_portage_rebuild_' | fgrep -v doebuild > /tmp/urfuct.txt
|
||||||
if [ -n "$(cat /tmp/urfuct.txt)" ]; then
|
if [ -n "$(cat /tmp/urfuct.txt)" ]; then
|
||||||
for badhit in "$(cat /tmp/urfuct.txt)" ; do
|
for badhit in $(cat /tmp/urfuct.txt) ; do
|
||||||
echo ${badhit} | cut -d":" -f1 >> /tmp/badfiles.txt
|
echo ${badhit} | cut -d":" -f1 >> /tmp/badfiles.txt
|
||||||
done
|
done
|
||||||
for badfile in $(cat /tmp/badfiles.txt); do
|
qfile -C -f /tmp/badfiles.txt | cut -d' ' -f1 >> /tmp/badpkg_us.txt
|
||||||
qfile -C ${badfile} | cut -d' ' -f1 >> /tmp/badpkg_us.txt
|
|
||||||
done
|
|
||||||
cat /tmp/badpkg_us.txt | sort -u > /tmp/badpkg.txt
|
cat /tmp/badpkg_us.txt | sort -u > /tmp/badpkg.txt
|
||||||
cat /tmp/badpkg.txt
|
|
||||||
emerge -1 --buildpkg=y --nodeps $(cat /tmp/badpkg.txt) || /bin/bash
|
emerge -1 --buildpkg=y --nodeps $(cat /tmp/badpkg.txt) || /bin/bash
|
||||||
rm -f /tmp/urfuct.txt /tmp/badfiles.txt /tmp/badpkg_us.txt /tmp/badpkg.txt
|
rm -f /tmp/urfuct.txt /tmp/badfiles.txt /tmp/badpkg_us.txt /tmp/badpkg.txt
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue