On Mon, 2012-02-06 at 09:21 -0200, Otavio Salvador wrote:
> On Mon, Feb 6, 2012 at 09:13, Phil Blundell <ph...@gnu.org> wrote:
>         On Mon, 2012-02-06 at 11:03 +0000, Otavio Salvador wrote:
>         > +pkg_postrm_dhcp-server() {
>         > +    rm -f $D/${localstatedir}/lib/dhcp/dhcpd.leases
>         > +    rm -f $D/${localstatedir}/lib/dhcp/dhcpd6.leases
>         > +    rmdir $D/${localstatedir}/lib/dhcp
>         > +}
>         > +
>         > +pkg_postrm_dhcp-client() {
>         > +    rm -f $D/${localstatedir}/lib/dhcp/dhclient.leases
>         > +    rm -f $D/${localstatedir}/lib/dhcp/dhclient6.leases
>         > +    rmdir $D/${localstatedir}/lib/dhcp
>         
>         
>         Are those rmdirs not going to fail if you try to remove one
>         package with
>         the other one still installed?
> 
> 
> I think they will. I'll add an || true on it.

If you do that then you'd also need to redirect stderr to avoid getting
error messages on the console.  Might be better to wrap the rmdir calls
in a check to see if the directory is empty.

p.




_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Reply via email to