Bug#875909: user-setup: Please drop set_special_users hack added for "the convenience of heavy testers"

2017-09-15 Thread Christian PERRIER
Quoting Chris Lamb (la...@debian.org):
> Source: user-setup
> Version: 1.69
> Severity: normal
> Tags: patch
> 
> Hey!
> 
> Please drop the set_special_users hack added for "the convenience
> of heavy testers".

Doh. Some history is vanishing out. Admitedly, I could have tried
some negotiation and propose to add "kibi" and "lamby" to this list
but let's face it: I'm no longer a heavy tester of D-I and I also
think that tbm will not whine either. I didn't even remember about
this hack...:-)

IIRC, there are a few other Eater Eggs here or there in D-I, but I
won't help finding them (mostly because I don't remember about them).

Patch applied. I'm rebuilding user-setup (it had to be done for i18n
pruposes anyway) and will upload it ASAP.




signature.asc
Description: PGP signature


Bug#875909: user-setup: Please drop set_special_users hack added for "the convenience of heavy testers"

2017-09-15 Thread Chris Lamb
Source: user-setup
Version: 1.69
Severity: normal
Tags: patch

Hey!

Please drop the set_special_users hack added for "the convenience
of heavy testers".

Patch attached.


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-
diff --git a/user-setup-ask b/user-setup-ask
index 6176930..3609723 100755
--- a/user-setup-ask
+++ b/user-setup-ask
@@ -13,20 +13,6 @@ export ROOT
 
 . /usr/lib/user-setup/functions.sh
 
-# For the convenience of heavy testers
-set_special_users() {
-   local realname
-   case "$fullname" in
-   bubulle)realname="Christian PERRIER" ;;
-   tbm)realname="Martin Michlmayr" ;;
-   *)  return 1 ;;
-   esac
-   db_set passwd/user-fullname "$realname"
-   userdefault=$fullname
-   db_fset passwd/username seen true
-   return 0
-}
-
 # Main loop starts here. Use a state machine to allow jumping back to
 # previous questions.
 STATE=0
@@ -116,10 +102,8 @@ while :; do
if [ -z "$RET" ]; then
db_get passwd/user-fullname
fullname=$RET
-   if ! set_special_users; then
-   userdefault=$(echo "$fullname" | \
-   sed 's/ .*//' | LC_ALL=C tr A-Z 
a-z)
-   fi
+   userdefault=$(echo "$fullname" | \
+   sed 's/ .*//' | LC_ALL=C tr A-Z a-z)
if test -n "$userdefault" && \
LC_ALL=C expr "$userdefault" : 
'[a-z][-a-z0-9]*$' >/dev/null; then
db_set passwd/username "$userdefault"