[Olsr-dev] Patches for OpenBSD
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
>> 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
> 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
> * 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
> 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
Diplom-Informatiker Henning Rogge , Fraunhofer-Institut für
Kommunikation, Informationsverarbeitung und Ergonomie FKIE
Fraunhofer Straße 20, 53343 Wachtberg, Germany
Telefon +49 228 9435-961, Fax +49 228 9435 685
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 6169 bytes
Desc: S/MIME Cryptographic Signature
More information about the Olsr-dev