all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andy Wingo <wingo@igalia.com>
To: 宋文武 <iyzsong@member.fsf.org>
Cc: guix-devel@gnu.org, 22693@debbugs.gnu.org
Subject: Re: bug#22693: `guix refresh -u` updates other packages with same version
Date: Mon, 04 Apr 2016 13:53:38 +0200	[thread overview]
Message-ID: <87r3elh9od.fsf@igalia.com> (raw)
In-Reply-To: <87pou5oete.fsf@member.fsf.org> ("宋文武"'s message of "Mon, 04 Apr 2016 18:20:45 +0800")

On Mon 04 Apr 2016 12:20, iyzsong@member.fsf.org (宋文武) writes:

> How to fix this?
>
> The procedure is ‘update-package-source’ in (guix upstream).
> it find the file, then use ‘substitute’ to replace the version and
> hash.  ‘substitute’ works line-by-line, it can’t match mutiple lines.
>
> I try:
>  - use ‘package-location’ and ‘read’ to get the package object,
>    but it lost all format and comments.

One option:

  1. open the source file for the package
  2. Call (read) until port-line / port-column are beyond the
     package-location of the package
  3. At that point you have the ending location of the package.

Then limit your substitute* to work within those lines.

Another option would be to extend substitute* to start on a certain
line, and to limit the number of substitutions.  That way if you start
on package-location and limit to one substitution you are likely to
update the correct version.

Andy

  reply	other threads:[~2016-04-04 11:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-16  9:27 bug#22693: `guix refresh -u` updates other packages with same version Leo Famulari
2016-02-22 21:33 ` Andreas Enge
2016-02-22 22:37   ` Leo Famulari
2016-04-04 10:20 ` 宋文武
2016-04-13  1:29   ` bug#22693: close 宋文武
2016-04-04 10:20 ` bug#22693: `guix refresh -u` updates other packages with same version 宋文武
2016-04-04 11:53   ` Andy Wingo [this message]
2016-04-04 20:57     ` Ludovic Courtès
2016-04-04 20:57     ` Ludovic Courtès
2016-04-04 11:53   ` Andy Wingo

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

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

  git send-email \
    --in-reply-to=87r3elh9od.fsf@igalia.com \
    --to=wingo@igalia.com \
    --cc=22693@debbugs.gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=iyzsong@member.fsf.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.