[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#872577: debootstrap: Handle existing /dev



On Fri, Aug 25, 2017 at 4:07 PM, Dan Nicholson <nicholson@endlessm.com> wrote:
On Tue, Aug 22, 2017 at 10:23 AM, Dan Nicholson <nicholson@endlessm.com> wrote:
>
> That certainly helps, but it doesn't cover everything since the
> mkdir's and ln's could fail. Those are easier to handle by adding -p
> and -f, respectively, but that's a subtle change in behavior for ln
> relative to the mknod change. In the mknod case, an existing device is
> left as is. In the ln case, it would be forcefully overwritten.

Attached is a patch to handle all the potentially failing cases. I
tested this by running debootstrap once, wiping everything the target
except /dev, and running debootstrap again. It succeeded. As mentioned
above, an existing device is skipped while the symlinks are forcefully
overwritten. That seems inconsistent, but I'm not sure it matters. I
could easily change the mknod function to forcefully remove, too.

Ping? Patch is pretty straightforward, but I'd be happy to adjust any direction people like.

Reply to: