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

Just a thought, and a few questions



Hi all,

So I was looking over the code base last night and wondering about
exercises to get myself a little more up to speed on it.  One thing that
I noticed going through was that there seems to be quite a lot of
duplicate code spread through the shell scripts, and it seems like a
useful idea to start implementing a shell library.

I can't promise I'm actually going to get to doing this (my plate is
actually kind of full), but I wanted to ask for feedback before even
starting.  I can see some obvious plusses (reduced disk usage, code
reuse, etc), but also at least two obvious issues (neither of which may
be showstoppers in practice).

Most scripts that source bits from a shell library will end up loading
code that they don't use, and as far as I know, shell isn't as clever as
the linker in getting rid of unused functions.  I don't imagine this is
a giant memory issue (I would imagine it might add a few K of runtime
useage to a lot of scripts, but I don't honestly know).

The second problem is just a practical one: where to put it?
libdebian-installer seems like the obvious place at first glance, but
maybe something else is set up earlier?  It would only need to be
unpacked on disk relatively early to be useful.

Thoughts, comments, flames?  I may also of course be completely missing
a similar thing already in the code base, but I didn't see it in my run
through last night.
-- 
 -----------------------------------------------------------------
|   ,''`.                                            Stephen Gran |
|  : :' :                                        sgran@debian.org |
|  `. `'                        Debian user, admin, and developer |
|    `-                                     http://www.debian.org |
 -----------------------------------------------------------------

Attachment: signature.asc
Description: Digital signature


Reply to: