control: tag -1 + upstream patch pending

Hello Fred,

Thanks for reporting this.

On Sat, Aug 20, 2016 at 02:40:03PM +0200, picca wrote:
> When I try to use propellor, I get this error message now...
>
> picca@mordor:~/.propellor$ LANG=C PROPELLOR_DEBUG=1 propellor
> fatal: refusing to merge unrelated histories
> propellor: Failed to run git 
> ["merge","82be944938cfe926ef754cfde9a6951c6082f547","-s","recursive","-Xtheirs","--quiet","-m","merging
>  upstream version"]
>
> this error is quite strange...

The git bundle that propellor is trying to merge is indeed an unrelated
history (it gets generated from scratch when I build the propellor
package).  So the error makes sense.

It seems the git 2.9.x series refuses to merge unrelated history by
default (apparently this is because of an accident in linux.git, which
now has three root commits).

Patch attached, which I'm forwarding upstream and will apply to Debian
in the meantime.

-- 
Sean Whitton
From 702ccd034ac4520484ec902a643136e60026123d Mon Sep 17 00:00:00 2001
From: Sean Whitton <[email protected]>
Date: Sat, 20 Aug 2016 07:27:04 -0700
Subject: [PATCH] pass --allow-unrelated-histories to git merge

Fixes merging the /usr/src/propellor git bundle with git 2.9.
---
 debian/changelog        | 6 ++++++
 debian/control          | 2 +-
 src/Propellor/DotDir.hs | 2 +-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 74045c7..9268d51 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,16 @@
 propellor (3.1.2) UNRELEASED; urgency=medium
 
+  [ Joey Hess ]
   * Ssh.knownHost: Bug fix: Only fix up the owner of the known_hosts
     file after it exists.
   * Sbuild.keypairInsecurelyGenerated: Improved to be more robust.
     Thanks, Sean Whitton.
 
+  [ Sean Whitton ]
+  * Pass --allow-unrelated-histories to git merge.
+    This fixes the /usr/bin/propellor wrapper for git 2.9.x.
+    - Propellor now requires git to be at least version 2.9.
+
  -- Joey Hess <[email protected]>  Sun, 24 Jul 2016 13:34:37 -0400
 
 propellor (3.1.1) unstable; urgency=medium
diff --git a/debian/control b/debian/control
index 9194b6c..21a524d 100644
--- a/debian/control
+++ b/debian/control
@@ -43,7 +43,7 @@ Depends: ${misc:Depends}, ${shlibs:Depends},
 	libghc-stm-dev,
 	libghc-text-dev,
 	libghc-concurrent-output-dev,
-	git,
+	git (>= 1:2.9),
 	make,
 Description: property-based host configuration management in haskell
  Propellor ensures that the system it's run in satisfies a list of
diff --git a/src/Propellor/DotDir.hs b/src/Propellor/DotDir.hs
index c73420b..cd079bc 100644
--- a/src/Propellor/DotDir.hs
+++ b/src/Propellor/DotDir.hs
@@ -401,7 +401,7 @@ setupUpstreamMaster newref = do
 		changeWorkingDirectory tmprepo
 		git ["fetch", distrepo, "--quiet"]
 		git ["reset", "--hard", oldref, "--quiet"]
-		git ["merge", newref, "-s", "recursive", "-Xtheirs", "--quiet", "-m", "merging upstream version"]
+		git ["merge", newref, "-s", "recursive", "-Xtheirs", "--quiet", "--allow-unrelated-histories", "-m", "merging upstream version"]
 
 		void $ fetchUpstreamBranch tmprepo
 		cleantmprepo
-- 
2.9.3

Attachment: signature.asc
Description: PGP signature

Reply via email to