Discussion:
Needs enhancement: "is my guix current?"
(too old to reply)
Hartmut Goebel
2017-12-11 12:20:43 UTC
Permalink
Raw Message
Hi,

on my effort to solve the problems when updating to guix 0.14.0, I
stepped over this simple question:

Is the installed guix the current one, resp. the current one my guix
knows of? Is there anyway to find out whether 20170924.19 or
0.13.0-6.a9468b4 is newer?

guix installed:

    # guix --version
    guix (GNU Guix) 20170924.19

guix knows to my guix:

    # guix package -A guix
    guix    0.13.0-6.a9468b4


From the usability point of view, this information needs to be ovbiously
available. Users should easily be able to to determine which version is
the newer one.

Since I do not know how these different version numbers are generated, I
can't make any suggestions, though. Sorry.

--
Regards
Hartmut Goebel

| Hartmut Goebel | ***@crazy-compilers.com |
| www.crazy-compilers.com | compilers which you thought are impossible |
Ludovic Courtès
2017-12-11 13:23:20 UTC
Permalink
Raw Message
Hi,

Hartmut Goebel <***@crazy-compilers.com> skribis:

> Is the installed guix the current one, resp. the current one my guix
> knows of? Is there anyway to find out whether 20170924.19 or
> 0.13.0-6.a9468b4 is newer?
>
> guix installed:
>
>     # guix --version
>     guix (GNU Guix) 20170924.19

Nowadays a Git commit is recorded, not a date.

Currently ‘guix package’ et al. simply warn you if you haven’t run ‘guix
pull’ in seven days. It could also check the upstream Git repo for the
latest commit, though that wouldn’t provide much more information, I
think.

Ludo’.
Alex Vong
2017-12-12 10:56:53 UTC
Permalink
Raw Message
Hello,

I think if you never run 'guix refresh', then the guix installed should
always be newer than the guix known to guix.

The argument is as followed:
When you install guix, the guix known to guix is at least 1 commit older
than the installed guix. When you run 'guix pull', the installed guix is
updated to its latest version in master and the guix known to guix is
also always at least 1 commit older than that latest version.
(The reason for the >= 1 commit lag is because it takes 1 commit to
update the hash for the guix known to guix.)

To sum up, if you never run 'guix refresh', then the guix installed
should always be newer than the guix known to guix. If you have run
'guix refresh', then we know nothing since 'guix refresh' only updates
the guix known to guix (whch mess up the invariant).

Hope this make sense!

Hartmut Goebel <***@crazy-compilers.com> writes:

> Hi,
>
> on my effort to solve the problems when updating to guix 0.14.0, I
> stepped over this simple question:
>
> Is the installed guix the current one, resp. the current one my guix
> knows of? Is there anyway to find out whether 20170924.19 or
> 0.13.0-6.a9468b4 is newer?
>
> guix installed:
>
>     # guix --version
>     guix (GNU Guix) 20170924.19
>
> guix knows to my guix:
>
>     # guix package -A guix
>     guix    0.13.0-6.a9468b4
>
>
> From the usability point of view, this information needs to be ovbiously
> available. Users should easily be able to to determine which version is
> the newer one.
>
> Since I do not know how these different version numbers are generated, I
> can't make any suggestions, though. Sorry.
Ludovic Courtès
2017-12-12 12:54:17 UTC
Permalink
Raw Message
Hi,

Alex Vong <***@gmail.com> skribis:

> I think if you never run 'guix refresh', then the guix installed should
> always be newer than the guix known to guix.

I think you mean ‘guix pull’, in which case I agree.

(‘guix refresh’ is more of a developer tool: it simplifies updating
package definitions.)

Ludo’.
Alex Vong
2017-12-12 15:55:07 UTC
Permalink
Raw Message
Hello,

I think I've confused things a bit. Well, 'guix refresh' updates package
definitions to match the latest upstream version, but we are the
upstream, so it is not useful here.

I think even if 'guix pull' is being run, the guix installed should
always be newer than the guix known to guix, right?

It is due to how release is done and how 'guix pull' works.

When releasing, a commit X is declared as a release. The release tarball
then contains commit X. The next commit Y changes the snapshot of the
guix known to guix from some old value to X. But the release tarball
still contains the old value since it uses commit X! So if you installed
from a release tarball and have not run 'guix pull' yet, the guix
installed should be newer than the guix known to guix.

Similarly, when running 'guix pull', say master is at commit X, and the
snapshot of the guix known to guix inside that commit X is at commit
Y. Then the guix installed is updated to commit X and the guix known to
guix is updated to commit Y.

Now we observe that commit X is always newer than commit Y. It is
because when you update snapshot, you change the snapshot to the current
commit and then commit. After that, the commit of the snapshot is
already 1 commit behind that of the new current commit! So after you run
'guix pull', the guix installed should be newer than the guix known to
guix.

As a result, the guix installed should always be newer than the guix
known to guix. Is my reasoning valid?

***@gnu.org (Ludovic CourtÚs) writes:

> Hi,
>
> Alex Vong <***@gmail.com> skribis:
>
>> I think if you never run 'guix refresh', then the guix installed should
>> always be newer than the guix known to guix.
>
> I think you mean ‘guix pull’, in which case I agree.
>
> (‘guix refresh’ is more of a developer tool: it simplifies updating
> package definitions.)
>
> Ludo’.
Loading...