unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Z572 via Guix-patches via <guix-patches@gnu.org>
To: zimoun <zimon.toutoune@gmail.com>
Cc: 47754@debbugs.gnu.org
Subject: [bug#47754] [PATCH] gnu: transformations: fix with-latest option for git source package.
Date: Wed, 03 Nov 2021 22:54:40 +0800	[thread overview]
Message-ID: <tencent_3C87B11CAA04B856667334552A6BE88F4405@qq.com> (raw)
Message-ID: <87wnlp45k3.fsf@qq.com> (raw)
In-Reply-To: <87y265sfsr.fsf@gmail.com>


Hi,

zimoun <zimon.toutoune@gmail.com> writes:

> Hi,
>
> Thanks for the patch.
>
> On Wed, 14 Apr 2021 at 00:28, Z572 <873216071@qq.com> wrote:
>
>>>From 52bd30a6ac967375aa9a178345f1bdea8388457a Mon Sep 17 00:00:00 2001
>> From: Zheng Junjie <873216071@qq.com>
>> Date: Tue, 13 Apr 2021 23:00:10 +0800
>> Subject: [PATCH] gnu: transformations: fix with-latest option for git source
>>  package.
>>
>> gnu/transformations.scm: (transform-package-latest): (package-with-latest-upstream):
>> use git-checkout if p is a git source package.
>> ---
>>  guix/transformations.scm | 8 +++++++-
>>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> [...]
>
>>    #:autoload   (guix upstream) (package-latest-release*
>> +                                upstream-source-urls
>>                                  upstream-source-version
>>                                  upstream-source-signature-urls)
>>    #:use-module (guix utils)
>> @@ -537,7 +539,11 @@ are replaced by their latest upstream version."
>>               (package
>>                 (inherit p)
>>                 (version (upstream-source-version source))
>> -               (source source))))))
>> +               (source (cond ((false-if-exception (package-git-url p))
>> +                              (git-checkout
>> +                               (url (car (upstream-source-urls source)))
>> +                               (recursive? #t)))
>> +                             (else source))))))))
>
> Could you provide an example for an use-case?

Just try this:

``` bash
$ file `guix build fbreader --with-latest=fbreader -S`
/gnu/store/rdqkmjpiig9gddzsxj4mdyw8lvn944xg-FBReader: HTML document, UTF-8 Unicode text, with very long lines

```

If a package is a git source package, after use "with-latest" option, it's url
will become to it's source. and build will fail.

This patch just fix this.

But i think this patch not good, maybe need a new patch(use latest version
not latest commit).  But i'm not familiar with this part.


>
> Cheers,
> simon


-- 
over




  reply	other threads:[~2021-11-03 15:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87a6q2i1x2.fsf@qq.com>
2021-04-13 16:28 ` [bug#47754] [PATCH] gnu: transformations: fix with-latest option for git source package Z572
2021-11-03 10:18   ` zimoun
     [not found]     ` <87wnlp45k3.fsf@qq.com>
2021-11-03 14:54       ` Z572 via Guix-patches via [this message]
2021-11-03 16:18         ` zimoun
     [not found]           ` <87v918ceyc.fsf@qq.com>
2021-11-04 11:17             ` Z572 via Guix-patches via
2021-11-06 18:17               ` zimoun

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=tencent_3C87B11CAA04B856667334552A6BE88F4405@qq.com \
    --to=guix-patches@gnu.org \
    --cc=47754@debbugs.gnu.org \
    --cc=873216071@qq.com \
    --cc=zimon.toutoune@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).