From mboxrd@z Thu Jan 1 00:00:00 1970 From: iyzsong@member.fsf.org (=?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?=) Subject: bug#22693: `guix refresh -u` updates other packages with same version Date: Mon, 04 Apr 2016 18:20:45 +0800 Message-ID: <87pou5oete.fsf__7662.14660038731$1459765404$gmane$org@member.fsf.org> References: <20160216092724.GA10422@jasmine> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51438) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1an1f1-0001pX-0o for bug-guix@gnu.org; Mon, 04 Apr 2016 06:23:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1an1ev-0001E3-W3 for bug-guix@gnu.org; Mon, 04 Apr 2016 06:23:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:53474) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1an1ev-0001Dz-Tp for bug-guix@gnu.org; Mon, 04 Apr 2016 06:23:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1an1ev-0003Gg-PV for bug-guix@gnu.org; Mon, 04 Apr 2016 06:23:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20160216092724.GA10422@jasmine> (Leo Famulari's message of "Tue, 16 Feb 2016 04:27:24 -0500") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: guix-devel@gnu.org Cc: 22693@debbugs.gnu.org Leo Famulari writes: > I've noticed that `guix refresh -u` will update extraneous packages if > they happen to have the same version and be in the same module. > > For example, from commit d694230ab, you can reproduce the bug: > > $ ./pre-inst-env guix environment guix -- ./pre-inst-env guix refresh -u = python-pytest > $ git diff > diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm > index 3dd3862..ae14404 100644 > --- a/gnu/packages/python.scm > +++ b/gnu/packages/python.scm > @@ -796,7 +796,7 @@ Python 3 support.") > (define-public python-pycrypto > (package > (name "python-pycrypto") > - (version "2.6.1") > + (version "2.8.7") > (source > (origin > (method url-fetch) > @@ -1565,7 +1565,7 @@ code introspection, and logging.") > (define-public python-pytest > (package > (name "python-pytest") > - (version "2.6.1") > + (version "2.8.7") > (source > (origin > (method url-fetch) > @@ -1574,7 +1574,7 @@ code introspection, and logging.") > version ".tar.gz")) > (sha256 > (base32 > - "0g2w4p0n42wvz8rq4k6gnzpkakgz3g8sfanxk8jrsra9675snkcr")) > + "1bwb06g64x2gky8x5hcrfpg6r351xwvafimnhm5qxq7wajz8ck7w")) > (modules '((guix build utils))) > (snippet > ;; One of the tests involves the /usr directory, so it fails. How to fix this? The procedure is =E2=80=98update-package-source=E2=80=99 in (guix upstream). it find the file, then use =E2=80=98substitute=E2=80=99 to replace the vers= ion and hash. =E2=80=98substitute=E2=80=99 works line-by-line, it can=E2=80=99t ma= tch mutiple lines. I try: - use =E2=80=98package-location=E2=80=99 and =E2=80=98read=E2=80=99 to get= the package object, but it lost all format and comments. - use =E2=80=98string-match=E2=80=99, but I have no idea how to match the = whole package sexp.