summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog3
-rw-r--r--src/wrapper.hs8
2 files changed, 10 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index a217329d..8b02e942 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,9 @@ propellor (2.8.0) UNRELEASED; urgency=medium
info of any type that is Typeable and a Monoid, including data types
private to a module. (API change)
Thanks to Joachim Breitner for the idea.
+ * Improve propellor wrapper to better handle installation cloning
+ the public propellor repo, by setting that repo to be upstream,
+ so propellor doesnt try to push to a read-only repo.
-- Joey Hess <id@joeyh.name> Fri, 04 Sep 2015 10:36:40 -0700
diff --git a/src/wrapper.hs b/src/wrapper.hs
index a73ed969..e367fe69 100644
--- a/src/wrapper.hs
+++ b/src/wrapper.hs
@@ -74,7 +74,13 @@ wrapper args propellordir propellorbin = do
fetchUpstreamBranch propellordir distrepo
changeWorkingDirectory propellordir
void $ boolSystem "git" [Param "remote", Param "rm", Param "origin"]
- , void $ boolSystem "git" [Param "clone", Param netrepo, File propellordir]
+ , do
+ void $ boolSystem "git" [Param "clone", Param netrepo, File propellordir]
+ changeWorkingDirectory propellordir
+ -- Rename origin to upstream and avoid
+ -- git push to that read-only repo.
+ void $ boolSystem "git" [Param "remote", Param "rename", Param "origin", Param "upstream"]
+ void $ boolSystem "git" [Param "config", Param "--unset", Param "branch.master.remote", Param "upstream"]
)
checkRepo = whenM (doesFileExist disthead <&&> doesFileExist (propellordir </> "propellor.cabal")) $ do