diff options
author | Kyle De'Vir | 2018-12-02 10:46:49 +1000 |
---|---|---|
committer | Kyle De'Vir | 2018-12-02 10:46:49 +1000 |
commit | 3c5b50f270663b9d216f83f4e0760a1451d59214 (patch) | |
tree | 54291c6475c88194120726f003b64dcfec5d1f07 /PKGBUILD | |
parent | e58ce3822d1bc68bb76520f3c87d27f236ce3680 (diff) | |
download | aur-3c5b50f270663b9d216f83f4e0760a1451d59214.tar.gz |
localmodconfig changes
Diffstat (limited to 'PKGBUILD')
-rwxr-xr-x | PKGBUILD | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -14,9 +14,7 @@ _makenconfig= # that you currently have probed in your system VASTLY reducing the number of # modules built and the build time to do it. # -# WARNING - ALL modules must be probed or loaded via a config file BEFORE you -# begin making the pkg unless you're running modprobed-db (AUR) and building -# this with makepkg as the user who is keeping the database. +# WARNING - ALL modules must be probed BEFORE you begin making the pkg! # # To keep track of which modules are needed for your specific system/hardware, # give module_db script a try: https://aur.archlinux.org/packages/modprobed-db @@ -88,17 +86,19 @@ prepare() { ### Optionally load needed modules for the make localmodconfig # See https://aur.archlinux.org/packages/modprobed-db - if [ -n "$_localmodcfg" ]; then - if [ -f $HOME/.config/modprobed.db ]; then - msg "Found a modprobed-db database for Steven Rostedt's make localmodconfig" - make LSMOD=$HOME/.config/modprobed.db localmodconfig - else - msg "Running Steven Rostedt's make localmodconfig now" - make localmodconfig + if [ -n "$_localmodcfg" ]; then + msg "If you have modprobed-db installed, running it in recall mode now" + if [ -e /usr/bin/modprobed-db ]; then + [[ -x /usr/bin/sudo ]] || { + echo "Cannot call modprobe with sudo. Install sudo and configure it to work with this user." + exit 1; } + sudo /usr/bin/modprobed-db recall + make localmodconfig + fi fi - fi - make olddefconfig + # do not run `make olddefconfig` as it sets default options + yes "" | make config >/dev/null make -s kernelrelease > ../version msg2 "Prepared %s version %s" "$pkgbase" "$(<../version)" |