Hi.
I guess what bothers me about this is the "specification" more than
the implementation.
Looking at the original report, I read this:
> It will point to the installation root with the trailing slash
> stripped. That means under normal conditions, it is empty.
So, if I understood correctly:
- if installation root is / then DPKG_ROOT is ""
- but if it's /mnt then DPKG_ROOT is "/mnt"
I guess this is unlikely to change at this point, however: Would not
have been cleaner to specify it as the installation root (without the
"trailing slash stripped" part).
Another question: Can you explain the usage of ":" command at the beginning?
: "${DPKG_ROOT:=}"
This is to define DPKG_ROOT as the empty string in case it's undefined,
right? Is this really needed in a POSIX shell? I believed ${DPKG_ROOT}
would expand to empty string when it's not defined.
Or maybe you meant this? : "${DPKG_ROOT:=/}"
Also: just to be sure: Am I right to think that the sed command in
change_owner function is there to be able to bootstrap a Debian system
from a non-Debian system?
And finally: Do we really need to consider DPKG_ROOT in
update_to_current_default function? (It should only used on upgrades).
Thanks.