You are not logged in.
Hi,
I would like to just use arch's PKGBUILD for kernel26 and just modify "config" to my liking and recompile (mainly to tune little things which I hope don't need to touch anything on the PKGBUILD). I don't want to use that complex PKGBUILD intended for custom compilations. I actually want to replace the installed kernel (not add a -custom one).
The thing is, I need to recompile all pkgs that depend on kernel26, right? (modules, that is)
Also, is there an automatic way of dealing with this? A script that checks the pkgs that uses kernel26 and rebuilds those?
I'm trying to do something like that but the output of pacman is not truly script-friendly.
Thanks
Offline
If you are keeping all the current file and package naming intact, you MAY be able to use the existing external module packages without rebuilding. It will depend entirely on the extent of your config changes.
pacman -Qi kernel26 shows you the installed packages that depend on the kernel package - just parse the "Required By" line.
Offline
If you are keeping all the current file and package naming intact, you MAY be able to use the existing external module packages without rebuilding. It will depend entirely on the extent of your config changes.
Yeah, but I don't want to risk hard to find problems or something like that.
pacman -Qi kernel26 shows you the installed packages that depend on the kernel package - just parse the "Required By" line.
Yes, the problem is that pacman outputs multiple lines according to terminal size, which made it difficult to parse. For what is worth, the results of my scripting yesterday are as follows:
#!/bin/sh
die() {
echo $*
exit 1
}
trap_term() {
die "Aborting..."
}
trap trap_term TERM
getdeps() {
pacman -Qi kernel26 | grep -A 10 'Required By' | sed 's/Required By\s*://' | grep -v ':' | tr '\n' ' ' | tr -s ' '
}
echo "Looking for kernel26 dependencies..."
deps=$(getdeps)
echo "Dependencies are: [$deps]"
case "$1" in
'clean')
for dep in $deps; do
if [ -d $dep ]; then
echo "=> Removing $dep"
rm -r $dep
fi
done
;;
'copy')
for dep in $deps; do
if ! [ -d $dep ]; then
echo -n "=> Trying to copy $dep: "
depdir=$(find $ABSROOT/{core,extra,community} -name $dep 2> /dev/null | head -n 1)
cp -r "$depdir" . || die "Couldn't copy directory"
echo "OK"
fi
done
;;
'build')
for dep in $deps; do
if [ -d $dep ]; then
echo "=> Making $dep"
echo $dep/$dep-*.pkg.tar.gz
if [ -e $dep/$dep-*.pkg.tar.gz ]; then echo "PKG already built"
else (cd $dep; makepkg -c) || die "makepkg failed"; fi
fi
done
;;
esac
The code may not be the best, but I think the idea is clear.
Offline