anchor.diff:      end,
       ets:delete(State#state.unpack_state, Reference),
       {noreply, State#state{queued=Preparing}};
  -handle_info(schedule, State) ->
  +handle_info(schedule, State#state{master_state=false}) ->
  +    case catch caterpillar_event:register_worker(caterpillar_builder, State#state.work_id) of
  +        {ok, _} ->
  +            {noreply, State#state{master_state=true}};
  +        Other ->
  +            error_logger:error_msg("couldn't register self: ~p~n", [Other])
  +            {noreply, State};
  +    end;
  +handle_info(schedule, State#state{master_state=true}) ->
       {ok, ScheduledState} = schedule_build(State),
       case State#state.prebuild of
           [{Archive, WorkId}|Rest] ->
  
positive.code: -define(UNPACK_RETRY_LIMIT, 15).
  
  -record(state, {
          deps,
          main_queue,
          wait_queue,
  
negative.code:     BuildPath = ?GV(build_path, Settings, ?DEFAULT_BUILD_PATH),
      WorkIdFile = ?GV(work_id, Settings, ?DEFAULT_WORK_ID_FILE),
      WorkId = get_work_id(WorkIdFile),
      Ident = ?GV(ident, Settings, "unknown"),
      schedule_poller(PollTime),
      {ok, #state{
  