Bug 6176 (int-147091)

Summary: bashism in bash uninstall script causes busybox error
Product: [Maemo Official Platform] Core Reporter: AB <andrea>
Component: BusyboxAssignee: Turo Janka <ext-turo.1.janka>
Status: RESOLVED FIXED QA Contact: busybox-bugs
Severity: normal    
Priority: Low CC: andre_klapper, maemo
Version: 5.0/(3.2010.02-8)   
Target Milestone: 5.0/(10.2010.19-1)   
Hardware: N900   
OS: Maemo   
Bug Depends on: 3958    
Bug Blocks:    

Description AB (reporter) 2009-11-14 19:27:41 UTC
SOFTWARE VERSION:
1.2009.41-10

STEPS TO REPRODUCE THE PROBLEM:
1. ensure only standard repositories are active (Nokia Apps and SSU)
2. apt-get install bash
3. dpkg --purge bash

EXPECTED OUTCOME:
package is removed, no errors

ACTUAL OUTCOME:
Purging configuration files for bash ...
rmdir: unrecognized option `--ignore-fail-on-non-empty'
BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso26+0m5) multi-call binary

Usage: rmdir [OPTION]... DIRECTORY...

dpkg: error processing bash (--purge):
 subprocess post-removal script returned error exit status 1
Errors were encountered while processing:
 bash

REPRODUCIBILITY:
always

EXTRA SOFTWARE INSTALLED:

OTHER COMMENTS:
Probably not a busybox bug (see 3958), but bash doesn't have a bugzilla entry.

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; it; rv:1.9.1.5)
Gecko/20091109 Ubuntu/9.10 (karmic) Firefox/3.5.5
Comment 1 Lucas Maneos 2009-11-14 20:56:45 UTC
(In reply to comment #0)
> Probably not a busybox bug (see 3958), but bash doesn't have a bugzilla entry.

This is /exactly/ the kind of bug that could be avoided by fixing bug 4248
(more specifically: FEATURE_RMDIR_LONG_OPTIONS in this case).  In fact the code
comments explicitly mention dpkg purge:

#if ENABLE_FEATURE_RMDIR_LONG_OPTIONS
        static const char rmdir_longopts[] ALIGN1 =
                "parents\0"                  No_argument "p"
                /* Debian etch: many packages fail to be purged or installed
                 * because they desperately want this option: */
                "ignore-fail-on-non-empty\0" No_argument "\xff"
                ;
        applet_long_options = rmdir_longopts;
#endif
Comment 2 Andre Klapper maemo.org 2010-01-23 20:13:48 UTC
Fix for this is included in 2.05b-26osso8+0m5 - willing to check again?
Comment 3 AB (reporter) 2010-01-24 11:57:41 UTC
(In reply to comment #2)

> Fix for this is included in 2.05b-26osso8+0m5 - willing to check again?

Willing, I am... able, not so much: where do I get that package? Repository
still has 2.05b-26osso7+0m5
Comment 4 Lucas Maneos 2010-01-24 12:19:30 UTC
(In reply to comment #3)
> Repository still has 2.05b-26osso7+0m5

Same goes for <http://maemo.org/packages/view/bash/> and
<http://repository.maemo.org/pool/maemo5.0/free/b/bash/>, but that's beside the
point.  This is just a workaround for a specific instance, the real fix IMHO
would be to enable FEATURE_RMDIR_LONG_OPTIONS in busybox.
Comment 5 Andre Klapper maemo.org 2010-03-16 15:55:43 UTC
This has been fixed in package
bash 2.05b-2-26osso8+0m5
which will be part of the next public update

To answer popular followup questions:
 * Nokia does not announce release dates of public updates in advance.
 * There is currently no access to these internal, non-public build versions.
   A Brainstorm proposal to change this exists at
http://maemo.org/community/brainstorm/view/undelayed_bugfix_releases_for_nokia_open_source_packages-002/