[Buildroot] [PATCH 2/2] package/tzdata: new package

Richard Braun rbraun at sceen.net
Tue Feb 26 07:43:32 UTC 2013

On Mon, Feb 25, 2013 at 09:02:50PM -0500, Danomi Manchego wrote:
> +       mkdir -p $(TARGET_DIR)/usr/share/zoneinfo
> +       cp -a $(@D)/_output/* $(TARGET_DIR)/usr/share/zoneinfo
> +       cd $(TARGET_DIR)/usr/share/zoneinfo;    \
> +       for zone in posix/*; do                 \
> +           ln -s "$${zone}" "$${zone##*/}";    \
> +       done
> +endef
> Yann,
> Today, a co-worker applied these patches, and ran into a small problem
> during the install phase.  He had made a mistake while applying the
> companion zic patch, which caused the tzdata package to stop.  Then,
> after he fixed his mistake, the tzdata failed to install, because the
> 'ln -s' failed to overwrite symlinks that already exist.  So I think
> that it might be good to add an 'rm -f "$${zone##*/}";' before the 'ln
> -s'.  (Or at least make it an 'ln -sf', though I personally am
> distrustful of 'ln -sf' due to sometimes unexpected behavior when the
> target of the symlink is a directory.)

This is best fixed with ln -sfn. Sorry for not doing it in the first

Richard Braun

More information about the buildroot mailing list