make upgrade: Remove a file that was existing with a dir name for a while.
authorSascha Wildner <saw@online.de>
Sun, 13 Sep 2009 22:28:12 +0000 (00:28 +0200)
committerSascha Wildner <saw@online.de>
Sun, 13 Sep 2009 22:31:56 +0000 (00:31 +0200)
mtree couldn't create the directory because of that.

This can't be fixed with Makefile_upgrade.inc so we need a bit of
additional code for such cases.

etc/Makefile

index ef34053..98fe49d 100644 (file)
@@ -137,6 +137,10 @@ preupgrade:
                pw -V ${DESTDIR}/etc groupadd _dhcp -g 77
 
 upgrade_etc:   preupgrade remove-obsolete-files
+       # files that should be dirs (not possible with Makefile_upgrade.inc)
+.for f in usr/include/dev/misc/ppi
+       [ -d ${DESTDIR}/${f} ] || rm -f ${DESTDIR}/${f}
+.endfor
 .if !defined(BINARY_UPGRADE) # binary upgrade just copies these files
        cd ${UPGRADE_SRCDIR}/../share/mk; ${MAKE} install
 .endif