unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: John Soo <jsoo1@asu.edu>
Cc: 41604@debbugs.gnu.org
Subject: bug#41604: guix pull impossible after rebasing a local repository
Date: Wed, 03 Jun 2020 11:28:51 +0200	[thread overview]
Message-ID: <87a71kqyzw.fsf@gnu.org> (raw)
In-Reply-To: <87zh9qofw7.fsf@asu.edu> (John Soo's message of "Fri, 29 May 2020 09:38:32 -0700")

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’.




  parent reply	other threads:[~2020-06-03  9:29 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-29 16:38 bug#41604: guix pull impossible after rebasing a local repository John Soo
     [not found] ` <handler.41604.B.159077032116756.ack@debbugs.gnu.org>
2020-05-29 16:41   ` bug#41604: Acknowledgement (guix pull impossible after rebasing a local repository) John Soo
2020-05-29 16:52 ` bug#41604: guix pull impossible after rebasing a local repository zimoun
2020-05-29 17:10   ` John Soo
2020-05-29 17:44     ` zimoun
2020-05-29 18:22       ` John Soo
2020-05-29 18:39         ` zimoun
2020-05-30  2:26           ` John Soo
2020-05-30 10:45             ` zimoun
2020-05-30 16:18             ` Arne Babenhauserheide
2020-05-31  5:04               ` John Soo
2020-06-01 16:48                 ` zimoun
2020-06-01 17:28                   ` John Soo
2020-06-01 16:35               ` zimoun
2020-06-03  9:28 ` Ludovic Courtès [this message]
2020-06-03 13:44   ` John Soo
2020-06-03 15:13     ` Ludovic Courtès
2020-06-04 14:11       ` John Soo
2020-06-05  1:44         ` zimoun
2020-06-05 16:13         ` Ludovic Courtès
2020-06-05  1:23       ` zimoun
2020-06-05 16:17         ` Ludovic Courtès
2020-06-05 17:51           ` zimoun
2020-06-07 21:16             ` Ludovic Courtès
2020-06-07 22:25               ` zimoun
2020-06-07 23:52                 ` John Soo
2020-06-10 14:51                 ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a71kqyzw.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=41604@debbugs.gnu.org \
    --cc=jsoo1@asu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).