From mboxrd@z Thu Jan 1 00:00:00 1970 From: iyzsong@member.fsf.org (=?utf-8?B?5a6L5paH5q2m?=) Subject: Re: bug#22693: `guix refresh -u` updates other packages with same version Date: Mon, 04 Apr 2016 18:20:45 +0800 Message-ID: <87pou5oete.fsf@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]:51270) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1an1eH-00016Y-C2 for guix-devel@gnu.org; Mon, 04 Apr 2016 06:22:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1an1eC-00018D-CY for guix-devel@gnu.org; Mon, 04 Apr 2016 06:22:21 -0400 Received: from smtp26.openmailbox.org ([62.4.1.60]:36816) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1an1eC-000189-6l for guix-devel@gnu.org; Mon, 04 Apr 2016 06:22:16 -0400 In-Reply-To: <20160216092724.GA10422@jasmine> (Leo Famulari's message of "Tue, 16 Feb 2016 04:27:24 -0500") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=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.