Skip to contentSkip to conversation

php: stop removing directories that do not exist

PATCH In review Stephano Cetola 1 participant 2 messages Jul 15, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 php: stop removing directories that do not exist

The directory ${D}/${TMPDIR} does not exist. This patch removes code that was calling rm and rmdir on that location.

---
 meta-oe/recipes-devtools/php/php.inc |    6 ------
 1 file changed, 6 deletions(-)
meta-oe/recipes-devtools/php/php.inc +0 -6
index b1bf79c..011eea7 100644
@@ -74,7 +74,6 @@ do_install_append_pn-php() {
     if [ -d ${D}/${STAGING_DIR_NATIVE}/${sysconfdir} ];then
          mv ${D}/${STAGING_DIR_NATIVE}/${sysconfdir}/* ${D}/${sysconfdir}/
     fi
-    rm -rf ${D}/${TMPDIR}
     rm -rf ${D}/.registry
     rm -rf ${D}/.channels
     rm -rf ${D}/.[a-z]*
@@ -89,11 +88,6 @@ do_install_append_pn-php() {
     sed -i 's:=/etc:=${sysconfdir}:g' ${B}/sapi/fpm/init.d.php-fpm
     sed -i 's:=/var:=${localstatedir}:g' ${B}/sapi/fpm/init.d.php-fpm
     install -m 0755 ${B}/sapi/fpm/init.d.php-fpm ${D}${sysconfdir}/init.d/php-fpm
-    TMP=`dirname ${D}/${TMPDIR}`
-    while test ${TMP} != ${D}; do
-        rmdir ${TMP}
-        TMP=`dirname ${TMP}`;
-    done
 }
 
 PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-cgi ${PN}-fpm ${PN}-fpm-apache2 ${PN}-pear ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}"
Signature · 1 line
1.7.10.4
#1 lore raw

meta-oe/recipes-

Quoted 10 lines · Stephano Cetola <stephanoc <at> gmail.com> writes:

The directory ${D}/${TMPDIR} does not exist. This patch removes code that was calling rm and rmdir on that location.

Signed-off-by Stephano Cetola <stephanoc <at> gmail.com>
---
 meta-oe/recipes-devtools/php/php.inc |    6 ------
 1 file changed, 6 deletions(-)
meta-oe/recipes- renamed from meta-oe/recipes-devtools/php/php.inc +0 -0

devtools/php/php.inc

meta-oe/recipes-devtools/php/php.inc

Quoted 6 lines

index b1bf79c..011eea7 100644

meta-oe/recipes-devtools/php/php.inc +0 -0
 <at>  <at>  -74,7 +74,6  <at>  <at>  do_install_append_pn-php() {
     if [ -d ${D}/${STAGING_DIR_NATIVE}/${sysconfdir} ];then
          mv ${D}/${STAGING_DIR_NATIVE}/${sysconfdir}/* 

${D}/${sysconfdir}/

Quoted 9 lines

fi
- rm -rf ${D}/${TMPDIR}

     rm -rf ${D}/.registry
     rm -rf ${D}/.channels
     rm -rf ${D}/.[a-z]*
 <at>  <at>  -89,11 +88,6  <at>  <at>  do_install_append_pn-php() {
     sed -i 's:=/etc:=${sysconfdir}:g' ${B}/sapi/fpm/init.d.php-fpm
     sed -i 's:=/var:=${localstatedir}:g' ${B}/sapi/fpm/init.d.php-fpm
     install -m 0755 ${B}/sapi/fpm/init.d.php-fpm 

${D}${sysconfdir}/init.d/php-fpm

meta-oe/recipes-devtools/php/php.inc do_install_append_pn-php() {

Quoted 8 lines
meta-oe/recipes-devtools/php/php.inc +0 -5
-    TMP=`dirname ${D}/${TMPDIR}`
-    while test ${TMP} != ${D}; do
-        rmdir ${TMP}
-        TMP=`dirname ${TMP}`;
-    done
 }
 
 PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-cgi ${PN}-fpm ${PN}-fpm-apache2 

${PN}-pear ${PN}-dev

Quoted 1 line

${PN}-staticdev ${PN}-doc ${PN}"

Please disregard this patch. It is only a partial fix.

I think I am beginning to understand the comment at the beginning of do_install_append_pn-php. I will dig into this further.

Kind Regards,
Stephano