On Sun, 23 Jul 2023, 12:34 David Bremner, wrote:
> Richard Lewis writes:
>
> > I suspect a plain chroot isnt 'enough', i had success with
> systemd-nspawn:
> >
> > ln -s /tmp/bullseye/ /var/lib/machines
> >
> > # im sure there is a better way than these two lines
> > cp /etc/passwd bullseye/etc/passwd
> > cp /etc/shadow bullseye/etc/shadow
> >
> > systemd-nspawn --ephemeral --boot --machine bullseye
> > # (you dont really need --ephemeral of course)
> >
> > log into the container as root:
> > # apt install emacs-gtk
> >
> > (and say yes to allow the installation to finish)
> >
> > # ls /usr/share/emacs/site-lisp/elpa
> > dash-2.17.0 dash-functional-1.2.0 elisp-refs-1.4 helpful-0.18
> loop-1.3
> > dash-2.19.1 elisp-refs-1.3 f-0.20.0helpful-0.19
> s-1.12.0
> >
> > Shows the 'duplicate' dirs for the old versions of elpa-dash and
> elpa-helpful
> >
>
> Did you start from a clean debootstrap here? Because I don't see where
> in your second reproducer the addon packages get installed.
>
no, i reused the chroot from the "first attempt" reproducer
A clean recipe, not requiring any 'login' is:
mkdir -p /tmp/bullseye
cd /tmp/bullseye
debootstrap bullseye . https://deb.debian.org/debian
ln -s /tmp/bullseye /var/lib/machines/bullseye
systemd-nspawn --machine bullseye apt install emacs elpa-helpful
# at this stage we have:
# $ ls /tmp/bullseye/usr/share/emacs/site-lisp/elpa/
# dash-2.17.0 dash-functional-1.2.0 elisp-refs-1.3 f-0.20.0
helpful-0.18 loop-1.3 s-1.12.0
sed -i /bullseye/bookworm/ tmp/bullseye/apt/sources.list
#
systemd-nspawn --machine bullseye apt update
systemd-nspawn --machine bullseye apt upgrade
# this all works, including upgrading emacs :)
# but, old directories for elpa-dash and elpa-helpful and elpa-elisp-refs
have not been removed:
# $ ls /tmp/bullseye/usr/share/em$ ls
/tmp/bullseye/usr/share/emacs/site-lisp/elpa{,-src}
/tmp/bullseye/usr/share/emacs/site-lisp/elpa:
dash-2.17.0 dash-functional-1.2.0 elisp-refs-1.4 helpful-0.18 loop-1.3
dash-2.19.1 elisp-refs-1.3 f-0.20.0helpful-0.19 s-1.12.0
/tmp/bullseye/usr/share/emacs/site-lisp/elpa-src:
dash-2.19.1 dash-functional-1.2.0 elisp-refs-1.4 f-0.20.0 helpful-0.19
loop-1.3 s-1.12.0
# nb: on the host /tmp/bullseye and the symlink /var/lib/machine/bullseye
should be removed once finished!
>