[Olsr-dev] Patches for OpenBSD

Henning Rogge (spam-protected)
Wed Aug 20 10:52:10 CEST 2014


On 08/20/2014 10:20 AM, Dahlberg, David wrote:
> Am Dienstag, den 19.08.2014, 15:32 +0200 schrieb Henning Rogge:
> 
>> The only patch we have to look at is
>> http://olsr.org/git/?p=olsrd.git;a=commitdiff;h=3da7cc10efae1e81c023fdfd6d4cae4dbe76c104
>> the rest is in OpenBSD-only files.
> 
>> Maybe instead of removing this flag, we could introduce a
>> "RMDIR_OPTIONS" variable, so the makefiles can add options like
>> "--ignore-fail-on-non-empty".
> 
> Well, I am not convinced, this would make any sense.
> 
> There is only one reason for this flag anyway: 
> * "rmdir -p /etc/olsrd/foo" removes every directory down to the 
>   first non-empty one (i.e. "/etc")
> * rmdir will return "1", as "/etc" could not be removed.
> * gmake will stop as a command returned non-zero.
> 
> One possibility to fix this on GNU is "--ignore-fail-on-non-empty",
> which lets rmdir return zero.
> 
> Other ways to solve this would be:
> * Clean: Do not use "rmdir -p", make "uninstall" remove just the
>   (directly) targeted directories -> this won't remove
>   "/usr/local/lib", just because it is empty after uninstalling
>   olsrd!
> * Quick fix: Which has more or less the same behaviour as it is 
>   now: Just ignore the return value of rmdir.
>   I just saw that one may prefix a gmake Recipe with "-" to 
>   ignore the return value. This is probably nicer than "|| true"

I think the "|| true" thing is the easiest to read. Less cryptic
Makefile syntax...

> Anyway, you opt for removing the "-p/kill-them-all" switch alltogether, 
> then there ain't no need for RMDIR_OPTIONS any more.
> If you use the "-" prefix, this will make the only possible 
> RMDIR_OPTION redundant, too.

Yes, that would be the "clean" solution... if there is one.

I could see that the original reason behind the "-p" stuff was a problem
like "what if /usr/share/man does not exist".

Then came the question "does this mean the uninstall leaves the
directory in place" ?

But most likely its much better to leave the generic directory in place
than to accidentally remove it just because its empty.


I would vote for the "|| true" quick fix, then run it through Ferrys
testing suit again, then merge the patches.

And then we can think about if we can forget about the "-p" argument
during uninstall.

Henning

-- 
Diplom-Informatiker Henning Rogge , Fraunhofer-Institut für
Kommunikation, Informationsverarbeitung und Ergonomie FKIE
Kommunikationssysteme (KOM)
Fraunhofer Straße 20, 53343 Wachtberg, Germany
Telefon +49 228 9435-961,   Fax +49 228 9435 685
mailto:(spam-protected) http://www.fkie.fraunhofer.de

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6169 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20140820/eb03e41c/attachment.bin>


More information about the Olsr-dev mailing list