unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Chris Marusich <cmmarusich@gmail.com>
To: "Gábor Boskovits" <boskovits@gmail.com>
Cc: 30062@debbugs.gnu.org
Subject: [bug#30062] Help wanted
Date: Mon, 29 Jan 2018 01:22:01 -0800	[thread overview]
Message-ID: <87607lnhom.fsf@gmail.com> (raw)
In-Reply-To: <CAE4v=piz87_1+LD6zxkmP4O2o--bvaZSt1HzUyaVC3DGGyjtLg@mail.gmail.com> ("Gábor Boskovits"'s message of "Mon, 29 Jan 2018 10:05:21 +0100")

[-- Attachment #1: Type: text/plain, Size: 1870 bytes --]

Gábor Boskovits <boskovits@gmail.com> writes:

> Hello Chris!
>
> Could you help me out on this?
>
> It seems that I should somehow extract the version string from the input to
> use in substitute*, to fix the version string in tests. What would be the
> proper way of doing this?

It looks like the existing code is already substituting the version
string (by hard-coding it):

--8<---------------cut here---------------start------------->8---
(arguments
     `(#:jar-name "java-ops4j-pax-tinybundles.jar"
       #:source-dir "src/main/java"
       #:test-exclude
       ;; Abstract base classes for other tests
       (list "**/BndTest.java" "**/CoreTest.java")
       #:phases
       (modify-phases %standard-phases
         (add-before 'check 'fix-version
           (lambda _
             ;; This test has a reference to an old version of bndlib we are not
             ;; packaging.  It uses the version referenced in pom.xml.  We replace
             ;; it with our own version.
             (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
               (("2.4.0.201411031534") "3.4.0")))))))
--8<---------------cut here---------------end--------------->8---

I think we could probably just make a change like the following (I
haven't tested this, though):

--8<---------------cut here---------------start------------->8---
             (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
-               (("2.4.0.201411031534") "3.4.0")))))))
+               (("2.4.0.201411031534") ,(package-version java-aqute-bndlib))))))))
--8<---------------cut here---------------end--------------->8---

The comma is 'unquote' (see: (guile) Expression Syntax), which should
insert the package version of java-aqute-bndlib into the quasi-quoted
list.

Does that help?

-- 
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2018-01-29  9:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-10  9:33 [bug#30062] [PATCH core-updates] gnu: java-ops4j-pax-tinybundles: Disable failing test Gábor Boskovits
2018-01-10 10:33 ` julien lepiller
2018-01-20 22:10 ` [bug#30062] Replace the version in the test Gábor Boskovits
2018-01-29  9:05 ` [bug#30062] Help wanted Gábor Boskovits
2018-01-29  9:22   ` Chris Marusich [this message]
2018-01-29  9:55     ` Gábor Boskovits
2018-01-29 10:08       ` Danny Milosavljevic
2018-03-03 21:59 ` [bug#30062] [PATCH] gnu: java-ops4j-pax-tinybundles: Use distribution bndlib version Gábor Boskovits
2018-03-03 22:13 ` [bug#30062] Unblocks #29893 Gábor Boskovits
2018-03-04  9:02 ` [bug#30062] Please push this to master Gábor Boskovits

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87607lnhom.fsf@gmail.com \
    --to=cmmarusich@gmail.com \
    --cc=30062@debbugs.gnu.org \
    --cc=boskovits@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).