remove old gcc/g++ binaries at update time; covers the most common case
authorsthen <sthen@openbsd.org>
Mon, 3 May 2021 11:34:55 +0000 (11:34 +0000)
committersthen <sthen@openbsd.org>
Mon, 3 May 2021 11:34:55 +0000 (11:34 +0000)
where people will run into problems on amd64 now we don't build gcc.
(the gcc-lib files are already removed by bsd.rd upgrades, and gcc/g++
don't work without them).

distrib/miniroot/install.sub

index 36741fa..b9f0b40 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/ksh
-#      $OpenBSD: install.sub,v 1.1163 2021/03/19 23:52:55 kn Exp $
+#      $OpenBSD: install.sub,v 1.1164 2021/05/03 11:34:55 sthen Exp $
 #
 # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback
 # Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org>
@@ -1682,6 +1682,7 @@ install_files() {
                fi
                if isin comp$VERSION.tgz $_get_sets; then
                        rm -rf /mnt/usr/lib/{gcc-lib,clang}
+                       rm -rf /mnt/usr/bin/{gcc,g++}
                        rm -rf /mnt/usr/include/g++
                fi
                rm -rf /mnt/var/syspatch/*