mirror of
https://github.com/pentoo/pentoo-overlay
synced 2025-12-09 09:56:00 +01:00
scripts: improve threading of bug script
This commit is contained in:
parent
2f4586a817
commit
1a8c01d4a9
1 changed files with 13 additions and 4 deletions
|
|
@ -1,10 +1,19 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#work around for detecting and fixing bug #461824
|
#work around for detecting and fixing bug #461824
|
||||||
|
|
||||||
CORES="$(grep -c ^proc /proc/cpuinfo)"
|
#CORES="$(grep -c ^proc /proc/cpuinfo)"
|
||||||
if [[ "${CORES}" -eq "0" ]] ; then CORES="1" ; fi
|
#if [[ "${CORES}" -eq "0" ]] ; then CORES="1" ; fi
|
||||||
|
|
||||||
fgrep -r _portage_reinstall_ /etc {/usr,}/{*bin,lib*} | fgrep -v doebuild > /tmp/urfuct.txt
|
rm -f /tmp/urfuct.txt /tmp/badpkg_us.txt /tmp/badpkg.txt
|
||||||
|
|
||||||
|
for dir in /etc {/usr,}/{*bin,lib*};
|
||||||
|
do
|
||||||
|
fgrep -r _portage_reinstall_ $dir | fgrep -v doebuild >> /tmp/urfuct.txt &
|
||||||
|
WAITPIDS="$WAITPIDS "$!
|
||||||
|
done
|
||||||
|
wait $WAITPIDS
|
||||||
|
|
||||||
|
#fgrep -r _portage_reinstall_ /etc {/usr,}/{*bin,lib*} | fgrep -v doebuild > /tmp/urfuct.txt
|
||||||
#find /etc {/usr,}/{*bin,lib*} -type f | xargs -P ${CORES} fgrep '_portage_rebuild_' | fgrep -v doebuild > /tmp/urfuct.txt
|
#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
|
||||||
|
|
@ -12,6 +21,6 @@ if [ -n "$(cat /tmp/urfuct.txt)" ]; then
|
||||||
done
|
done
|
||||||
qfile -C -f /tmp/badfiles.txt | cut -d' ' -f1 >> /tmp/badpkg_us.txt
|
qfile -C -f /tmp/badfiles.txt | cut -d' ' -f1 >> /tmp/badpkg_us.txt
|
||||||
cat /tmp/badpkg_us.txt | sort -u > /tmp/badpkg.txt
|
cat /tmp/badpkg_us.txt | sort -u > /tmp/badpkg.txt
|
||||||
emerge -1 --buildpkg=y --nodeps $(cat /tmp/badpkg.txt) || /bin/bash
|
emerge -1 --buildpkg=y --nodeps $(cat /tmp/badpkg.txt)
|
||||||
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