GNU bug report logs - #22693
`guix refresh -u` updates other packages with same version

Previous Next

Package: guix;

Reported by: Leo Famulari <leo <at> famulari.name>

Date: Tue, 16 Feb 2016 09:28:02 UTC

Severity: normal

Done: iyzsong <at> member.fsf.org (宋文武)

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: iyzsong <at> member.fsf.org (宋文武)
To: guix-devel <at> gnu.org
Cc: 22693 <at> debbugs.gnu.org
Subject: bug#22693: `guix refresh -u` updates other packages with same version
Date: Mon, 04 Apr 2016 18:20:45 +0800
Leo Famulari <leo <at> famulari.name> 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 ‘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.
 - use ‘string-match’, but I have no idea how to match the whole
   package sexp.




This bug report was last modified 9 years and 101 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.