Gentoo Archives: gentoo-user

From: m4110c <disquz@×××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Updating Gentoo
Date: Sun, 21 Jul 2019 17:55:26
Message-Id: 20190721175518.ftrrxqadxfx3fozd@mm-no.de
In Reply to: [gentoo-user] Updating Gentoo by Consus
1 Hi there,
2
3 I'm using Sakaki's Genup Script exclusively for quite a long time now.
4
5 No problems there and it updates everything (i.e. portage, overlays if
6 you have some installed, etc.)
7
8 Have a look at it:
9 https://github.com/sakaki-/genup
10
11 greetz
12 m4110c
13
14 Thus spoke Consus (consus@××××.net):
15 > Hi,
16 >
17 > For quite a bit I'm using this script to update my stable Gentoo system:
18 >
19 > $ cat $(which sysupdate)
20 > #!/bin/sh
21 > # Update the whole system
22 >
23 > set -e
24 >
25 > echo "==> Syncing Portage tree..."
26 > emerge --sync --quiet
27 >
28 > echo "==> Updating world..."
29 > emerge -auDU --with-bdeps=y @world
30 >
31 > echo "==> Removing old dependencies..."
32 > emerge -qc
33 >
34 > echo "==> Upgrading Perl packages (if needed)..."
35 > perl-cleaner --quiet --modules --ph-clean --delete-leftovers
36 >
37 > # TODO: Check errors
38 > cur_kver=$(readlink /usr/src/linux | sed 's/linux-//')
39 > new_kver=$(cd /usr/src && ls -1d linux-* | sort -Vr | head -1 | sed 's/linux-//')
40 >
41 > if [ "${cur_kver}" != "${new_kver}" ]; then
42 > echo "==> Switching to kernel ${new_kver}..."
43 > eselect kernel set linux-${new_kver}
44 > if [ ! -e "/boot/vmlinuz-${new_kver}" ]; then
45 > echo "==> Building kernel ${new_kver}..."
46 > genkernel kernel
47 > fi
48 > else
49 > # Rebuild initramfs if third-party modules were updated
50 > if [ -n $(find /lib/modules/${cur_kver} \
51 > -newer /boot/initramfs-${cur_kver}.img) ]; then
52 > dracut -f
53 > fi
54 > fi
55 >
56 > Still, it won't catch some issues with Go or Haskell (as there are
57 > separate app-admin/go-updater and app-admin/haskell-updater ebuilds
58 > still around in the Tree) + there is a separate genkernel post-install
59 > script that cleans up old kernels during the kernel update.
60 >
61 > So, I was wondering -- maybe there is a
62 > fool-proof-one-command-that-do-it-all solution wondering somewhere?
63 >
64
65 --
66 m4110c
67
68 mailto: disquz@×××××.de