anchor.diff:      make_packages(Packages, [], State).
   
   
  -make_packages([], Accum, _State) ->
  -    {ok, Accum};
  +make_packages([], Accum, _State) ->  {ok, Accum};
   make_packages([ #build_package{name=Name, branch=Branch}=Package|T ], Accum, #state{next_work_id=WorkId}=State) ->
       UnArchivePath = caterpillar_utils:filename_join([State#state.repository_root, Name, Branch]),
       ControlFile = caterpillar_utils:filename_join(UnArchivePath, "control"),
  
positive.code:     caterpillar_utils:del_dir(DistDir),
      NewPackage = case filelib:is_dir(UnArchivePath) of
          true ->
              EnvHardCode = lists:flatten(io_lib:format(
                  "PATH_MK=../../devel-tools/trunk/Makefile.mk "
                  "PATH_PY_MK=../../smprc.setup/trunk/Makefile.mk "
                  "PATH_MOD=../../*/~s",
                  [Branch]
              )),
              Commands = lists:map(
                  fun(Command) -> lists:flatten(io_lib:format(Command, [EnvHardCode, Branch, UnArchivePath])) end,
                  [
                      "make ~s BRANCH=~s -C ~s clean &>/dev/null | exit 0 ", %exit status always 0
                      "make ~s BRANCH=~s -C ~s DIST_DIR=dist test",
                      "make ~s BRANCH=~s -C ~s DIST_DIR=dist package"
                  ]
              ),
              case catch make(Package, DistDir, Commands, State) of
                  {ok, PackageResult} ->
                      Package#build_package{build_status=ok, package=PackageResult};
                  {error, Log} ->
                      Package#build_package{build_status=error, log=Log};
                  Error ->
                      error_logger:error_msg("make unknown error: ~p~n", [Error]),
                      {error, make_packages}
              end;
          _ ->
              error_logger:error_msg("not dir ~p~n", [UnArchivePath]),
  
negative.code:                     error_logger:error_msg("cant find deb package, ~p~n", [Other]),
                      {error, <<"no package build">>}
              end;
          {ok, _, Log} ->
              error_logger:info_msg("failed ~p at ~s/~s~n", [Cmd, Name, Branch]),
              {error, Log};
  