freebsd/pkg — pull request #690 by AMDmi3 (2013-12-19 16:23:42+00:00)
Title: Make duplicate-related warning fatal in developer mode

Fixes #605

I've thought of another variant using macro - it has less copypasta, but hides a return which is not really good. But if you find it more applicable, I can modify the request.

Macro:
```
#define DUPLICATE_WARNING(format, ...) do { \
bool developer; \
pkg_config_bool(PKG_CONFIG_DEVELOPER_MODE, &developer); \
if (developer) { \
pkg_emit_error(format", fatal (developer mode)", __VA_ARGS__); \
return (EPKG_FATAL); \
} else { \
pkg_emit_error(format", ignoring", __VA_ARGS__); \
} \
} while(0)
```
Usage:
```
if (l != NULL) {
DUPLICATE_WARNING("duplicate license listing: %s", name);
return (EPKG_OK);
}
```