bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#41604: guix pull impossible after rebasing a local repository


From: Ludovic Courtès
Subject: bug#41604: guix pull impossible after rebasing a local repository
Date: Wed, 03 Jun 2020 11:28:51 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hi John,

John Soo <jsoo1@asu.edu> skribis:

> I use a local git repo with branch that I specify in channels.scm.
> My usual workflow is:
>
> 1. rebase on origin
> 2. guix pull
>
> This stopped working with the following error:
>
> Updating channel 'guix' from Git repository at 
> 'file:///home/john/projects/guix/.git'...
> guix pull: error: aborting update of channel 'guix' to commit 
> 1444040933ac35b967720288dc30ed70e5481ed3, which is not a descendant of 
> 57518fc7bf1efc899c0dabaa76685a319661f8e4
> hint: This could indicate that the channel has been tampered with and is 
> trying to
> force a roll-back, preventing you from getting the latest updates.  If you 
> think
> this is not the case, explicitly allow non-forward updates.

What happens is that ‘guix pull’ ensures that it only ever makes
“fast-forward” updates by default, in Git parlance.  The goal is to
detect obvious “downgrade attacks”:

  https://issues.guix.gnu.org/41425

(This can be overridden this by passing ‘--allow-downgrades’.)

The rebase workflow you describe unavoidably triggers the error because
every time you pull, you do a non-fast-forward pull (because the commit
you were previously using, as shown in ‘guix describe’, has been
rewritten and no longer exists in the new commit graph.)  So at least,
it shows that the machinery works as advertised.  :-)

What I would recommend is for your channel to be a regular “fork”: you
create a branch containing your patches and regularly merge upstream
master back into your branch.  That way, you don’t need to rewrite
history and ‘guix pull’ is happy.

Alternately, if you like to have linear history (for example because you
intend to eventually submit your patches upstream), you could use
TopGit, which roughly allows you to version-control your rebases.

HTH!

>From a pure Guix perspective, it’s “not-a-bug”.  If one of the above
suggestions works for you, I think we can close this issue.

Thanks for your feedback!

Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]