Skip to content

Commit

Permalink
- change "time fix on broken systems" to a better and generic version…
Browse files Browse the repository at this point in the history
… (from Alexander)
  • Loading branch information
adrianschroeter committed Feb 2, 2013
1 parent b06d385 commit cf108f1
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -707,8 +707,10 @@ detect_vm_2nd_stage()
background_monitor_process &
fi

# set date to now on broken systems (ARM without RTC)
[ -e /.build/.date ] && date -s `cat /.build/.date`
# set date to build start on broken systems (now < build start)
if [ $(date '+%s') -lt $(date -r /.build/build '+%s') ]; then
date -s $(date -r /.build/build '+@%s')
fi

return 0
}
Expand Down Expand Up @@ -1691,11 +1693,6 @@ for SPECFILE in "${SPECFILES[@]}" ; do
umount -n $BUILD_ROOT/dev/pts 2> /dev/null || true
umount -n $BUILD_ROOT/mnt 2> /dev/null || true

if [ "$HOST_ARCH" = armv7l ]; then
# work around missing RTC on ARM KVM VM
date '+@%s' > $BUILD_ROOT/.build/.date
fi

if [ -n "$VM_IMAGE" ]; then
check_exit
# needs to work otherwise we have a corrupted file system
Expand Down

0 comments on commit cf108f1

Please sign in to comment.