Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 19661 Details for
Bug 26460
emerging linux-headers-2.4.19-r1 does not unmerge old package
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
files/clean-headers.sh
clean-headers.sh (text/plain), 1.44 KB, created by
TGL
on 2003-10-23 03:42:17 UTC
(
hide
)
Description:
files/clean-headers.sh
Filename:
MIME Type:
Creator:
TGL
Created:
2003-10-23 03:42:17 UTC
Size:
1.44 KB
patch
obsolete
>#!/bin/bash ># small script to remove wrongly slotted linux-headers packages > > ># Set debug to "-p" for debugging mode >debug="-p" > ># Imports and checks >source /sbin/functions.sh >if [ ! `whoami` = "root" ]; then > eerror "You should be root to run this script." > exit 1 >fi > ># First, we "emerge clean" in case some linux-headers packages were ># installed with "ebuild ... qmerge" instead of "emerge". >einfo "Cleaning up your linux-headers packages" >emerge $debug clean sys-kernel/linux-headers > ># Then, we look for slot!=0 versions. >cd /var/db/pkg >good="" >bad="" >for p in sys-kernel/linux-headers* ; do > if grep -q "^0" $p/SLOT ; then > good="${p}" > else > bad="${bad} =${p}" > fi >done >[ -n "$debug" ] && echo Well slotted packages: $good >[ -n "$debug" ] && echo Wrongly slotted packages: $bad > ># If no slot=0 version was found, then it means that no >=2.4.21 ># version is installed. >if [ -z "$good" ]; then > ewarn "No installed linux-headers version was found in slot 0." > ewarn "It means that you should update linux-headers: \"emerge linux-headers\"." > exit 0 >fi > ># Now that we know there is a slot=0 version installed, it is safe ># to unmerge slot!=0 versions, if any: >if [ -n "$bad" ] ; then > einfo "Unmerging old linux-headers installed versions." > einfo "Only \"$good\" will remain." > emerge $debug unmerge $bad >fi > ># All done. >einfo "Now your sytem is clean. Note that there won't be any need for you" >einfo "to re-run this script on future linux-headers updates."
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 26460
: 19661