[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#30710: guix graph gives duplicate nodes
From: |
Ludovic Courtès |
Subject: |
bug#30710: guix graph gives duplicate nodes |
Date: |
Fri, 09 Mar 2018 23:59:26 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Björn Höfling <address@hidden> skribis:
> If you look into gnu/packages/autotools.scm, you see that
> autoconf-wrapper is not a package, but a package-factory:
>
> (define* (autoconf-wrapper #:optional (autoconf autoconf))
>
> Now the package definitions of "automake" and "libtool" each use the
> same fragment of code in their native-inputs, but a different "package"
> in the eq?-sense, although they basically want the same thing:
>
> `(("autoconf" ,(autoconf-wrapper))
>
> As ludo stated above: "Most of the time, there’s exactly one package
> object for each derivation; if not, that’s usually a bug."
>
> This looks to me like a bug.
>
> Correction:
>
> (define autoconf-wrapper-default (autoconf-wrapper))
>
> And then use this singular package as native-inputs to libtool and automake.
>
> Furthermore, when I search:
>
> find . -name "*.scm" -exec grep -H "autoconf-wrapper" "{}" ";" | less
>
> I find about 10 packages that use the fabrik, but all in the default way.
>
> So instead of:
>
> #:export (autoconf-wrapper))
>
>
> We could just
>
> (define-public autoconf-wrapper-default (autoconf-wrapper))
>
> and use that.
>
> Or, if noone is using this fabrik, just drop that and make a normal package
> out of it.
>
> WDYT? Reopen this one?
Good catch! I implemented what you suggest above in commit
464f5447396fcec9b43f7eab71d5d42b522a157f.
Thank you!
Ludo’.