Subject: Re: [bug#27915] libnl additions

From: Dave Love <[email-masked]>
Date: Wed, 23 Aug 2017 11:15:40 +0100

Marius Bakke <[email-masked]> writes:

> Sorry for the delay, these fell through the cracks a bit.

No worries; thanks.  I don't mean to argue below, just explain.
Apologies if this re-opens the issue -- I can't remember what debbugs does.

>> * gnu/packages/linux.scm (libnl)[native-inputs, outputs]: Add doc source.
>> [arguments]: New field.
>
> I ended up rewriting the install-doc phase so that it extracts directly
> to the "doc" output, and adjusted the commit message slightly.  

I wondered about that, but just did it as in rpm.  For info, are there
policy or technical reasons for it?

> Please mention all changed inputs here (e.g. for grepping purposes).
>
>> [outputs]: Add python2, python3.
>> [install-python]: New phase.
>>      (native-inputs
>> -     `(("flex" ,flex) ("bison" ,bison)
>> +     `(("flex" ,flex)
>> +       ("bison" ,bison)
>> +       ("python-2" ,python-2)
>> +       ("python-3" ,python-3)
>
> The Pythons here need to be regular inputs since they are referenced.

I think the documentation could do with clarification in this area; I'll
make a bug report about what's unclear to me.  (For what it's worth, I
thought regular inputs would propagate to "out", and it wouldn't be
important to depend on Python for the Python outputs.)

>> +           (add-after 'install 'install-python
>> +             (lambda* (#:key outputs #:allow-other-keys)
>> +               (define (python-inst python)
>> +                 (let ((ldflags (format #f "LDFLAGS=-Wl,-rpath=~a/lib"
>> +                                        (assoc-ref %outputs "out")))
>> +                       (pyout (assoc-ref %outputs python)))
>> +                   (and
>> +                    ;; The rpm spec quoth "build twice, otherwise capi.py is
>> +                    ;; not copied to the build directory"
>
> I went ahead and removed this comment since we are not an RPM derived
> distro, and always run "setup.py build" before "install" anyway.

[I just meant to note an apparent deficiency documented elsewhere that
might be relevant before the install step, e.g. in tests; I do the same
for rpm if I'm looking at an existing dpkg.]  It's probably worth
specifying using build before install in the manual if that's required.