I would wrap those lines differently - e.g.:

    "Package (% ros-* ), " +
    "Architecture (== " + arch + " ), " +
    "( Depends (% *" + package + "[, ]* ) " +
    "| Depends (% *"+package+" ) )"