[backend] simplify path2buildinfopath a bit