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

Re: Updated maint-guide contents, question on style



Osamu Aoki wrote:
>>  -$ grep -nr -e 'usr/local/lib' --include='*.[c|h]' .
>>  +$ grep -nr --include='*.[c|h]' usr/local/lib .
> 
> I go for following manpage order:
> 
>  $ grep -nr --include='*.[c|h]' -e 'usr/local/lib' .

Fair enough.  Strictly speaking, quotes around the pattern are
unnecessary unless it contains shell special characters, and -e is
unnecessary unless you're using multiple or optionlike patterns, but
I suppose novices should be habitually using them.

>> and
>> 
>>  -$ vim '+argdo %s/usr\/local\/lib/usr\/lib/gce|update' +q \
>>  +$ sed -i s#usr/local/lib#usr/lib#g \
>>         $(find . -type f -name '*.[c|h]')
> 
> This is usually the same result but it does not prompt you before
> modification.  I think all these global change are better off if we
> approve each substitution.  As I look back, it is a bit cryptic for
> novice vim user.  I will present both.

I should mention that I'm a seasoned vim non-user:
"http://www.xibalba.demon.co.uk/jbr/linux/ymmv.html#f";
 
>> 3.4 (and footnote): given that readers have no reason to expect
>> "-lcurses" to cause any particular kind of problem, and given that as
>> a matter of fact it doesn't, wouldn't it be simplest to say "-lfoo"
>> and then explicitly state that the problem is that on Debian libfoo is
>> known as libfoobar?
> 
> ??? This is continuation of gentoo package as example.  gentoo requires
> curses library.   curses/ncurses is good an example people can relate
> to.

I really don't think so - we see gentoo's build-depends in chapter 4,
and they include the nonexistent xlibs-dev but not *curses.  Footnote
21 admits that this isn't even a real problem with Debian libncurses;
this is an outdated hypothetical example that confusingly resembles a
real-world example, so replacing it with an obvious placeholder name
like libfoo would be an improvement.

We should replace:

  So, if there is a line in your program's Makefile (or Makefile.in)
  that says something like this (and your program doesn't compile) [21]:

   LIBS = -lcurses -lsomething -lsomethingelse

with something like:

  So, if there is a line in your program's Makefile (or Makefile.in)
  that says something like this:

  LIBS = -lfoo -lquux

  ...and your program fails to compile, complaining that libfoo is
  missing, this may be because libfoo on Debian is known as libfoobar.

And so on, changing the patch name and sed line to match.
-- 
JBR	with qualifications in linguistics, experience as a Debian
	sysadmin, and probably no clue about this particular package


Reply to: