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

Bug#366107: Installing tex-common gets stuck after giving invalid group



Frank Küster wrote:

Hi everybody,

Helge Hafting <helgehaf@aitel.hist.no> wrote:
[...]
A nice fix for tex-common, would be to do minimal validation
of the group name entered.  For example, see if
"getent groupname" works.  Shellscript test:

if getent group $GROUPNAME ; then echo ok ; else echo bad ; fi

This works for me, of course you want to do better than "echo",
i.e. bring up the group dialog box again on failure.
That sounds like a very good way to do it; many thanks.

I've been writing some code, but now I'm unsure about one thing: What
will happen if somebody installs Debian newly on a clean system,
e.g. with a CD, and chooses to install a TeX system at the very first
moment?  Does this happen before local users (and hence groups) are
created?
If this situation might arise, we cannot check for valid groups in the
config script (which is run immediately after doing the choices and
downloading, and prior to any unpacking or installation).
Does anybody know, or do we need to ask the installer people?

Regards, Frank
I don't know what will happen.  But there is a solution,
instead of forcing the user to select a valid group, just
pop up a warning that the group does not exist yet, and
so the installation will halt in post-install unless some other
package being installed will add the group in the meantime,
as part of its own configuration.  Then they can select to
go back and change the group name (root should alsways be safe)
or proceed and hope the best.


Thinking of it, if other packages that add groups does so in the
post-install step, then it might not help very much. tex-common
post-install could very well be first.
So forcing people to select a group valid at install time might not
be so bad - because otherwise they can be pretty sure they'll hang
the install a little later anyway.

Someone forced to select a group he don't want can always
dpkg-reconfigure the successfully installed text-common later,
which definitely is better than having to purge tex-common,
fix the broken install, and then reinstall tex-common.


Also, I think you won't be installing tex as the very first here.
First you install the base system, only then do you get to choose
the rest.  So I believe that standard groups like "root" and "bin"
and so on will be available.

I am not sure, but I think the adduser package usually is installed
with the base system too, so you could offer to run "addgroup"
for nonexisting groups.


Helge Hafting











Reply to: