Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 1 | LICENSE = "MIT" |
| 2 | ALLOW_EMPTY_${PN}-at-rootfs = "1" |
| 3 | ALLOW_EMPTY_${PN}-delayed-a = "1" |
| 4 | ALLOW_EMPTY_${PN}-delayed-b = "1" |
| 5 | ALLOW_EMPTY_${PN}-delayed-d = "1" |
| 6 | ALLOW_EMPTY_${PN}-delayed-p = "1" |
| 7 | ALLOW_EMPTY_${PN}-delayed-t = "1" |
| 8 | |
| 9 | PACKAGES += "${PN}-at-rootfs ${PN}-delayed-a ${PN}-delayed-b ${PN}-delayed-d ${PN}-delayed-p ${PN}-delayed-t" |
| 10 | PROVIDES += "${PN}-at-rootfs ${PN}-delayed-a ${PN}-delayed-b ${PN}-delayed-d ${PN}-delayed-p ${PN}-delayed-t" |
| 11 | FILES_${PN}-delayed-a = "" |
| 12 | FILES_${PN}-delayed-b = "" |
| 13 | FILES_${PN}-delayed-d = "" |
| 14 | FILES_${PN}-delayed-p = "" |
| 15 | FILES_${PN}-delayed-t = "" |
| 16 | |
| 17 | # Runtime dependencies |
| 18 | RDEPENDS_${PN}-delayed-a = "${PN}-at-rootfs" |
| 19 | RDEPENDS_${PN}-delayed-b = "${PN}-delayed-a" |
| 20 | RDEPENDS_${PN}-delayed-d = "${PN}-delayed-b" |
| 21 | RDEPENDS_${PN}-delayed-p = "${PN}-delayed-d" |
| 22 | RDEPENDS_${PN}-delayed-t = "${PN}-delayed-p" |
| 23 | |
| 24 | # Main recipe post-install |
| 25 | pkg_postinst_${PN}-at-rootfs () { |
| 26 | tfile="/etc/postinsta-test" |
| 27 | touch "$D"/this-was-created-at-rootfstime |
| 28 | if test "x$D" != "x" then |
| 29 | # Need to run on first boot |
| 30 | exit 1 |
| 31 | else |
| 32 | echo "lets write postinst" > $tfile |
| 33 | fi |
| 34 | } |
| 35 | |
| 36 | # Dependency recipes post-installs |
| 37 | pkg_postinst_${PN}-delayed-a () { |
| 38 | efile="/etc/postinst-test" |
| 39 | tfile="/etc/postinsta-test" |
| 40 | rdeps="postinst" |
| 41 | |
| 42 | if test "x$D" != "x"; then |
| 43 | # Need to run on first boot |
| 44 | exit 1 |
| 45 | else |
| 46 | touch /etc/this-was-created-at-first-boot |
| 47 | if test -e $efile ; then |
| 48 | echo 'success' > $tfile |
| 49 | else |
| 50 | echo 'fail to install $rdeps first!' >&2 |
| 51 | exit 1 |
| 52 | fi |
| 53 | fi |
| 54 | } |
| 55 | |
| 56 | pkg_postinst_${PN}-delayed-b () { |
| 57 | efile="/etc/postinsta-test" |
| 58 | tfile="/etc/postinstb-test" |
| 59 | rdeps="postinsta" |
| 60 | |
| 61 | if test "x$D" != "x"; then |
| 62 | # Need to run on first boot |
| 63 | exit 1 |
| 64 | else |
| 65 | if test -e $efile ; then |
| 66 | echo 'success' > $tfile |
| 67 | else |
| 68 | echo 'fail to install $rdeps first!' >&2 |
| 69 | exit 1 |
| 70 | fi |
| 71 | fi |
| 72 | } |
| 73 | |
| 74 | pkg_postinst_${PN}-delayed-d () { |
| 75 | efile="/etc/postinstb-test" |
| 76 | tfile="/etc/postinstd-test" |
| 77 | rdeps="postinstb" |
| 78 | |
| 79 | if test "x$D" != "x"; then |
| 80 | # Need to run on first boot |
| 81 | exit 1 |
| 82 | else |
| 83 | if test -e $efile ; then |
| 84 | echo 'success' > $tfile |
| 85 | else |
| 86 | echo 'fail to install $rdeps first!' >&2 |
| 87 | exit 1 |
| 88 | fi |
| 89 | fi |
| 90 | } |
| 91 | |
| 92 | pkg_postinst_${PN}-delayed-p () { |
| 93 | efile="/etc/postinstd-test" |
| 94 | tfile="/etc/postinstp-test" |
| 95 | rdeps="postinstd" |
| 96 | |
| 97 | if test "x$D" != "x"; then |
| 98 | # Need to run on first boot |
| 99 | exit 1 |
| 100 | else |
| 101 | if test -e $efile ; then |
| 102 | echo 'success' > $tfile |
| 103 | else |
| 104 | echo 'fail to install $rdeps first!' >&2 |
| 105 | exit 1 |
| 106 | fi |
| 107 | fi |
| 108 | } |
| 109 | |
| 110 | pkg_postinst_${PN}-delayed-t () { |
| 111 | efile="/etc/postinstp-test" |
| 112 | tfile="/etc/postinstt-test" |
| 113 | rdeps="postinstp" |
| 114 | |
| 115 | if test "x$D" != "x"; then |
| 116 | # Need to run on first boot |
| 117 | exit 1 |
| 118 | else |
| 119 | if test -e $efile ; then |
| 120 | echo 'success' > $tfile |
| 121 | else |
| 122 | echo 'fail to install $rdeps first!' >&2 |
| 123 | exit 1 |
| 124 | fi |
| 125 | fi |
| 126 | } |