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

Bug#573252: partman-target: stray /cdrom link useless these days

On Friday 12 March 2010, Joey Hess wrote:
> I installed the alpha from usb stick, onto a system with no cdrom drive,
> and a /cdrom directory (not symlink) was left behind. I have not worked
> out which component is responsible.

Duh. I looked at the code earlier today. It's base-installer of course
which bind mounts the CD into target. From library.sh configure_apt():

                # Let apt inside the chroot see the cdrom
                umount /target/media$DIRECTORY 2>/dev/null || true
                if [ ! -e /target/media$DIRECTORY ]; then
-->                     mkdir -p /target/media$DIRECTORY

                # The bind mount is left mounted, for future apt-install
                # calls to use.
                if ! mount -o bind $DIRECTORY /target/media$DIRECTORY; then
                        warning "failed to bind mount /target/media$DIRECTORY"

So after today's changes it will leave /media/cdrom instead of /cdrom.

Guess we should remove that dir again in finish_install.d for hd_media
installs? We'd need to keep an indicator that the dir was created by
base-installer and not by partman.

Reply to: