* [PATCH] opkg-utils: Do not use --ignore-fail-on-non-empty with rmdir
@ 2016-12-21 17:34 Khem Raj
0 siblings, 0 replies; only message in thread
From: Khem Raj @ 2016-12-21 17:34 UTC (permalink / raw)
To: openembedded-core; +Cc: adraszik
--ignore-fail-on-non-empty is coreutils specific, and you
are not always going to have coreutils on target systems
especially small ones. They will use the busybox applet which
does not support --ignore-fail-on-non-empty, use pipe and true
to ignore the errorcode from rmdir instead
Fixes upgrade errors on target e.g.
rmdir: unrecognized option '--ignore-fail-on-non-empty'
BusyBox v1.24.1 (2016-12-20 10:41:39 PST) multi-call binary.
Usage: rmdir [OPTIONS] DIRECTORY...
To remove package debris, try `opkg remove update-alternatives-opkg`.
To re-attempt the install, try `opkg install update-alternatives-opkg`.
Collected errors:
* pkg_run_script: package "update-alternatives-opkg" postrm script returned status 1.
* postrm_upgrade_old_pkg: postrm script for package "update-alternatives-opkg" failed
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/recipes-devtools/opkg-utils/opkg-utils_git.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
index 19a852ec62..a881bbb5d4 100644
--- a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
@@ -45,7 +45,7 @@ RCONFLICTS_update-alternatives-opkg = "update-alternatives-cworth"
pkg_postrm_update-alternatives-opkg() {
rm -rf $OPKG_OFFLINE_ROOT${nonarch_libdir}/opkg/alternatives
- rmdir --ignore-fail-on-non-empty $OPKG_OFFLINE_ROOT${nonarch_libdir}/opkg
+ rmdir $OPKG_OFFLINE_ROOT${nonarch_libdir}/opkg || true
}
BBCLASSEXTEND = "native nativesdk"
--
2.11.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-12-21 17:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-21 17:34 [PATCH] opkg-utils: Do not use --ignore-fail-on-non-empty with rmdir Khem Raj
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox