update.sh script broken since at least bzr8903[trunk]

Bug #1800814 reported by Klaus Halfmann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Undecided
Unassigned

Bug Description

After some recent changes (I assume some of the CMake fixes) the update.sh script
fails.

* Found this on OSX only (no timw to test this on Ubuntu for now)
* compile.sh works as expected
* happens with make and ninja
. update.sh fails like this (Using ninja)
 ./update.sh

Gespeichertes übergeordnetes Verzeichnis wird verwendet: bzr+ssh://bazaar.launchpad.net/+branch/widelands/
Enter passphrase for key ...:
 M src/logic/map_objects/tribes/carrier.cc
Alle Änderungen erfolgreich angewendet.
Now on revision 8904.
[71/71] cd /Users/klaus/develop/widelands-repo/trunk/build && /opt/local/bin/ctest --output-on-failure
Test project /Users/klaus/develop/widelands-repo/trunk/build
...
100% tests passed, 0 tests failed out of 4
Total Test time (real) = 3.04 sec
mv: rename VERSION to ../VERSION: No such file or directory

just fetched a frech copy from trunk, still the same.

I assume some step to create that VERSION file is missing int he Update script?

Can anybody confirm?

Tags: buildsystem

Related branches

Revision history for this message
GunChleoc (gunchleoc) wrote :

I have 2 VERSION files, one in "build" (source for the mv command) and one in the base directory (target for the mv command).

tags: added: buildsystem
Revision history for this message
kaputtnik (franku) wrote :

I can confirm this, at least if 'bzr pull' didn't find any updates. But Klaus output says it has found an update...

GunChleoc, if the file get moved (not copied) it will disappear in the build directory. So i wonder why you have two files?

I never used the update script... In my opinion it just reduces the needed commands from two to one. Can't the update script just call the two commands instead of the other stuff?

Klaus, can you exchange the lines in update.sh and test again?

Replace:

bzr pull
cd build
make
rm ../VERSION || true
rm ../widelands || true
mv VERSION ../VERSION
mv src/widelands ../widelands
cd ..

with:

bzr pull
./compile.sh

Revision history for this message
kaputtnik (franku) wrote :

Doing it like shown in #2 will not use previously defined compile options. But this can be solved when creating the update.sh script.

Revision history for this message
kaputtnik (franku) wrote :

Klaus, can you test if this compile script works correct?

I am not at my usual machine and compiling widelands takes around 1,5 hrs here...

Revision history for this message
Klaus Halfmann (klaus-halfmann) wrote :

Oops, your fix failes as of missing nproc (on OSX)

> ./compile.sh: line 204: nproc: command not found
> ninja: fatal: invalid -j parameter

better check if nproc is actually available.
For OSX:
> sysctl -n hw.ncpu
would do the trick

I replaced it with som harcoded -j 4

update.sh now works, problem is that some extra checks are excuted every time now.

In fact you change is what I used as workaround.

Lets fix both Issues with a new branch.

(As of of some typewriter's cramp / tenosynovitis I should not touch keybord or mouse by now, sorry)

Revision history for this message
GunChleoc (gunchleoc) wrote :

I get it too when running update.sh twice in a row. How about replacing mv with cp?

Klaus, take care of that hand!

GunChleoc (gunchleoc)
Changed in widelands:
milestone: none → build20-rc1
GunChleoc (gunchleoc)
Changed in widelands:
status: New → In Progress
assignee: nobody → GunChleoc (gunchleoc)
GunChleoc (gunchleoc)
Changed in widelands:
status: In Progress → Fix Committed
assignee: GunChleoc (gunchleoc) → nobody
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build20-rc1

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.