[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Run ./nix/sync-with-upstream after pull!
From: |
Andreas Enge |
Subject: |
Re: Run ./nix/sync-with-upstream after pull! |
Date: |
Thu, 19 Dec 2013 00:31:59 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Dec 19, 2013 at 12:06:49AM +0100, Ludovic Courtès wrote:
> Make sure to run ./nix/sync-with-upstream to fix that (this script has
> an additional patch rule to fix that.)
When doing this, I get:
sync-with-upstream: `..' is not the valid top-level source directory
When I do "cd nix; ./sync-with-upstream", I get:
(lots of messages)
`./libstore/pathlocks.hh' -> `../../nix/./libstore/pathlocks.hh'
removed `../nix/libstore/schema.sql.hh'
`../nix-upstream/COPYING' -> `../nix/COPYING'
`../nix-upstream/AUTHORS' -> `../nix/AUTHORS'
sed: can't read ../nix/libutil/hash.{cc,hh}: No such file or directory
The files ../nix/libutil/hash.cc and ../nix/libutil/hash.hh exist, but
apparently the command looks for a single file with { and } in its name.
The following modification solves the problem:
diff --git a/nix/sync-with-upstream b/nix/sync-with-upstream
index bb3a68b..dc7a7e3 100755
--- a/nix/sync-with-upstream
+++ b/nix/sync-with-upstream
@@ -76,5 +76,7 @@ sed -i "$top_srcdir/nix/libstore/gc.cc"
# context is expected to truly copy the underlying hash context. The copy
# constructor cannot be used in 'Ctx' if that's a union, so turn it into a
# structure (we can afford to two wasted words.)
-sed -i "$top_srcdir/nix/libutil/hash".{cc,hh} \
+sed -i "$top_srcdir/nix/libutil/hash".cc \
+ -e 's|union Ctx|struct Ctx|g'
+sed -i "$top_srcdir/nix/libutil/hash".hh \
-e 's|union Ctx|struct Ctx|g'
Andreas