Bug#872577: debootstrap: Handle existing /dev
On Fri, 18 Aug 2017, Dan Nicholson wrote:
> When devices.tar.gz was being used, the devices would be written into
> place with tar. This has the effect that the devices would be merged
> into an existing /dev in the target. setup_devices_simple() does not
> handle this case and fails when /dev already exists.
> Normally, the target would be empty and this wouldn't be an issue.
> However, some tools that use debootstrap to initialize a target depended
> on the old behavior. In particular, the obs-build package used for OBS
> sets up a minimal /dev in the generic prep code before using debootstrap
> to install packages needed for building debian packages.
> The attached patch fixes this by using tar to emulate the old
> behavior. It would be really helpful if this could be applied.
Wouldn't it be more straigthforward to "test -e || mknod" ?