Commit cbd38ed4 authored by Florent Revest's avatar Florent Revest

abootimg, mkbootimg, mkboot, statefs, timed: Use the new pkg_postinst_ontarget...

abootimg, mkbootimg, mkboot, statefs, timed: Use the new pkg_postinst_ontarget syntax of OE sumo instead of the previously used failing pkg_postinst
parent f0b2189d
...@@ -34,30 +34,26 @@ do_install_append() { ...@@ -34,30 +34,26 @@ do_install_append() {
install -m 0644 ${B}/boot.img ${D}/${KERNEL_IMAGEDEST} install -m 0644 ${B}/boot.img ${D}/${KERNEL_IMAGEDEST}
} }
pkg_postinst_kernel-image_append () { pkg_postinst_ontarget_${KERNEL_PACKAGE_NAME}-image_append () {
if [ x"$D" = "x" ] ; then if [ ! -e /boot/boot.img ] ; then
if [ ! -e /boot/boot.img ] ; then # if the boot image is not available here something went wrong and we don't
# if the boot image is not available here something went wrong and we don't # continue with anything that can be dangerous
# continue with anything that can be dangerous
exit 1
fi
BOOT_PARTITION_NAMES="LNX boot KERNEL"
for i in $BOOT_PARTITION_NAMES; do
path=$(find /dev -name "*$i*"|grep disk| head -n 1)
[ -n "$path" ] && break
done
if [ -z "$path" ] ; then
echo "Boot partition does not exist!"
exit 1
fi
echo "Flashing the new kernel /boot/boot.img to $path"
dd if=/boot/boot.img of=$path
else
exit 1 exit 1
fi fi
BOOT_PARTITION_NAMES="LNX boot KERNEL"
for i in $BOOT_PARTITION_NAMES; do
path=$(find /dev -name "*$i*"|grep disk| head -n 1)
[ -n "$path" ] && break
done
if [ -z "$path" ] ; then
echo "Boot partition does not exist!"
exit 1
fi
echo "Flashing the new kernel /boot/boot.img to $path"
dd if=/boot/boot.img of=$path
} }
FILES_${KERNEL_PACKAGE_NAME}-image += "/${KERNEL_IMAGEDEST}/boot.img" FILES_${KERNEL_PACKAGE_NAME}-image += "/${KERNEL_IMAGEDEST}/boot.img"
...@@ -35,30 +35,26 @@ do_install_append() { ...@@ -35,30 +35,26 @@ do_install_append() {
install -m 0644 ${B}/boot.img ${D}/${KERNEL_IMAGEDEST} install -m 0644 ${B}/boot.img ${D}/${KERNEL_IMAGEDEST}
} }
pkg_postinst_kernel-image_append () { pkg_postinst_ontarget_${KERNEL_PACKAGE_NAME}-image_append () {
if [ x"$D" = "x" ] ; then if [ ! -e /boot/boot.img ] ; then
if [ ! -e /boot/boot.img ] ; then # if the boot image is not available here something went wrong and we don't
# if the boot image is not available here something went wrong and we don't # continue with anything that can be dangerous
# continue with anything that can be dangerous exit 1
exit 1 fi
fi
BOOT_PARTITION_NAMES="LNX boot KERNEL"
for i in $BOOT_PARTITION_NAMES; do
path=$(find /dev -name "*$i*"|grep disk| head -n 1)
[ -n "$path" ] && break
done
if [ -z "$path" ] ; then BOOT_PARTITION_NAMES="LNX boot KERNEL"
echo "Boot partition does not exist!" for i in $BOOT_PARTITION_NAMES; do
exit 1 path=$(find /dev -name "*$i*"|grep disk| head -n 1)
fi [ -n "$path" ] && break
done
echo "Flashing the new kernel /boot/boot.img to $path" if [ -z "$path" ] ; then
dd if=/boot/boot.img of=$path echo "Boot partition does not exist!"
else
exit 1 exit 1
fi fi
echo "Flashing the new kernel /boot/boot.img to $path"
dd if=/boot/boot.img of=$path
} }
FILES_${KERNEL_PACKAGE_NAME}-image += "/${KERNEL_IMAGEDEST}/boot.img" FILES_${KERNEL_PACKAGE_NAME}-image += "/${KERNEL_IMAGEDEST}/boot.img"
...@@ -33,30 +33,26 @@ do_install_append() { ...@@ -33,30 +33,26 @@ do_install_append() {
install -m 0644 ${B}/boot.img ${D}/${KERNEL_IMAGEDEST} install -m 0644 ${B}/boot.img ${D}/${KERNEL_IMAGEDEST}
} }
pkg_postinst_kernel-image_append () { pkg_postinst_ontarget_${KERNEL_PACKAGE_NAME}-image_append () {
if [ x"$D" = "x" ] ; then if [ ! -e /boot/boot.img ] ; then
if [ ! -e /boot/boot.img ] ; then # if the boot image is not available here something went wrong and we don't
# if the boot image is not available here something went wrong and we don't # continue with anything that can be dangerous
# continue with anything that can be dangerous
exit 1
fi
BOOT_PARTITION_NAMES="LNX boot KERNEL"
for i in $BOOT_PARTITION_NAMES; do
path=$(find /dev -name "*$i*"|grep disk| head -n 1)
[ -n "$path" ] && break
done
if [ -z "$path" ] ; then
echo "Boot partition does not exist!"
exit 1
fi
echo "Flashing the new kernel /boot/boot.img to $path"
dd if=/boot/boot.img of=$path
else
exit 1 exit 1
fi fi
BOOT_PARTITION_NAMES="LNX boot KERNEL"
for i in $BOOT_PARTITION_NAMES; do
path=$(find /dev -name "*$i*"|grep disk| head -n 1)
[ -n "$path" ] && break
done
if [ -z "$path" ] ; then
echo "Boot partition does not exist!"
exit 1
fi
echo "Flashing the new kernel /boot/boot.img to $path"
dd if=/boot/boot.img of=$path
} }
FILES_${KERNEL_PACKAGE_NAME}-image += "/${KERNEL_IMAGEDEST}/boot.img" FILES_${KERNEL_PACKAGE_NAME}-image += "/${KERNEL_IMAGEDEST}/boot.img"
...@@ -42,9 +42,7 @@ do_install_append() { ...@@ -42,9 +42,7 @@ do_install_append() {
fi fi
} }
pkg_postinst_${PN}() { pkg_postinst_ontarget_${PN}() {
#!/bin/sh -e
if [ x"$D" = "x" ]; then
setcap CAP_SYS_ADMIN=ep /usr/bin/statefs setcap CAP_SYS_ADMIN=ep /usr/bin/statefs
/usr/lib/statefs/loader-action register /usr/lib/statefs/libloader-default.so /usr/lib/statefs/loader-action register /usr/lib/statefs/libloader-default.so
...@@ -57,9 +55,6 @@ if [ x"$D" = "x" ]; then ...@@ -57,9 +55,6 @@ if [ x"$D" = "x" ]; then
/usr/lib/statefs/provider-action register /usr/lib/statefs/libprovider-mce.so qt5 --system /usr/lib/statefs/provider-action register /usr/lib/statefs/libprovider-mce.so qt5 --system
/usr/lib/statefs/provider-action register /usr/lib/statefs/libprovider-profile.so qt5 /usr/lib/statefs/provider-action register /usr/lib/statefs/libprovider-profile.so qt5
/usr/lib/statefs/provider-action register /etc/timed-statefs.conf inout /usr/lib/statefs/provider-action register /etc/timed-statefs.conf inout
else
exit 1
fi
} }
FILES_${PN} += "/lib/systemd/ /usr/lib/systemd /var/lib/statefs/ /etc/sysconfig/statefs/ /home/ceres/.config/systemd/user/default.target.wants/" FILES_${PN} += "/lib/systemd/ /usr/lib/systemd /var/lib/statefs/ /etc/sysconfig/statefs/ /home/ceres/.config/systemd/user/default.target.wants/"
......
...@@ -31,13 +31,8 @@ do_install_append() { ...@@ -31,13 +31,8 @@ do_install_append() {
cp ${WORKDIR}/timed-qt5.conf ${D}/etc/dbus-1/system.d/ cp ${WORKDIR}/timed-qt5.conf ${D}/etc/dbus-1/system.d/
} }
pkg_postinst_${PN}() { pkg_postinst_ontarget_${PN}() {
#!/bin/sh -e
if [ x"$D" = "x" ]; then
setcap cap_sys_time+ep /usr/bin/timed-qt5 setcap cap_sys_time+ep /usr/bin/timed-qt5
else
exit 1
fi
} }
DEPENDS += "pcre systemd tzdata libiodata-native libiodata statefs-qt qtbase tzdata-timed" DEPENDS += "pcre systemd tzdata libiodata-native libiodata statefs-qt qtbase tzdata-timed"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment