Subject: bug#41796: closed (Re: bug#41796: Grafts don't handle outputs other than out)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 11 Jun 2020 17:13:01 +0000

Your bug report

#41796: Grafts don't handle outputs other than out

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
41796: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=41796
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#41796: Grafts don't handle outputs other than out
From: Ludovic Courtès <[email-masked]>
To: Jakub Kądziołka <[email-masked]>
Cc: [email-masked]
Date: Thu, 11 Jun 2020 19:12:11 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Jakub,

Thanks a lot for the reduced test case, much appreciated!

This is fixed with 03a70e4c190420e87c0b535285caf8f77260d4ff, which
includes a test inspired by yours.

ecf92194a55188a9c217d76617378749db063453 adds an nghttp2 replacement, as
you suggested on IRC, which is what prompted you to report this bug.
Apparently it works as expected.  Same for 389-ds-base.

Thanks,
Ludo’.

Subject: Grafts don't handle outputs other than out
From: Jakub Kądziołka <[email-masked]>
To: [email-masked]
Date: Thu, 11 Jun 2020 00:32:20 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

$ cat test.scm
(use-modules
  (guix packages)
  (guix build-system trivial))

(define-public core-pkg
  (package
    (name "core-pkg")
    (version "1.0")
    (replacement core-pkg/fixed)
    (source #f)
    (outputs '("out" "lib"))
    (build-system trivial-build-system)
    (arguments
     `(#:modules ((guix build utils))
       #:builder
       (begin
         (use-modules (guix build utils))
         (let ((outdir (assoc-ref %outputs "out"))
               (libdir (assoc-ref %outputs "lib")))
           (mkdir-p outdir)
           (mkdir-p libdir)
           #t))))
    (synopsis #f)
    (description #f)
    (home-page #f)
    (license #f)))

(define-public core-pkg/fixed
  (package
    (inherit core-pkg)
    (version "1.1")))

(package
  (name "other-pkg")
  (version "4.2")
  (source #f)
  (build-system trivial-build-system)
  (inputs
  `(("core-pkg" ,core-pkg)
    ("core-pkg:lib" ,core-pkg "lib")))
  (arguments
  `(#:modules ((guix build utils))
    #:builder
    (begin
      (use-modules (guix build utils))
      (let ((outdir (assoc-ref %outputs "out")))
        (mkdir-p outdir)
        (with-output-to-file (string-append outdir "/hello")
          (lambda ()
            (display (assoc-ref %build-inputs "core-pkg"))
            (newline)
            (display (assoc-ref %build-inputs "core-pkg:lib"))
            (newline)))
        #t))))
  (synopsis #f)
  (description #f)
  (home-page #f)
  (license #f))
~$ cat `guix build --no-offload -f test.scm`/hello
/gnu/store/pmz07rzm63z02lkyyldsw3srf98h01y2-core-pkg-1.1
/gnu/store/pivsji8qfpln4i4v0f5v5cjmzakmcmvg-core-pkg-1.0-lib

Expected output: the second line contains -core-pkg-1.1-lib.

Regards,
Jakub Kądziołka