[
https://issues.apache.org/jira/browse/YETUS-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15203391#comment-15203391
]
Allen Wittenauer commented on YETUS-338:
----------------------------------------
The problematic code path is in patchfiles.sh:
{code}
echo "Processing: ${PATCH_OR_ISSUE}"
# it's a declarely provided file
if [[ -f ${PATCH_OR_ISSUE} ]]; then
patchfile="${PATCH_OR_ISSUE}"
PATCH_SYSTEM=generic
else
# run through the bug systems. maybe they know?
for bugsys in ${BUGSYSTEMS}; do
if declare -f ${bugsys}_locate_patch >/dev/null 2>&1; then
"${bugsys}_locate_patch" "${PATCH_OR_ISSUE}" "${PATCH_DIR}/patch"
if [[ $? == 0 ]]; then
gotit=true
PATCH_SYSTEM=${bugsys}
fi
fi
done
# ok, none of the bug systems know. let's see how smart we are
if [[ ${gotit} == false ]]; then
generic_locate_patch "${PATCH_OR_ISSUE}" "${PATCH_DIR}/patch"
if [[ $? != 0 ]]; then
yetus_error "ERROR: Unsure how to process ${PATCH_OR_ISSUE}."
cleanup_and_exit 1
fi
PATCH_SYSTEM=generic
fi
fi
yetus_debug "Determined patch system to be ${PATCH_SYSTEM}"
if [[ ! -f "${PATCH_DIR}/patch"
&& -f "${patchfile}" ]]; then
cp "${patchfile}" "${PATCH_DIR}/patch"
if [[ $? == 0 ]] ; then
{code}
Basically, if the file already exists in patchdir, then we are making the
assumption that something else already put it in place.
> test-patch may not update patchfile in patchdir
> -----------------------------------------------
>
> Key: YETUS-338
> URL: https://issues.apache.org/jira/browse/YETUS-338
> Project: Yetus
> Issue Type: Bug
> Components: Test Patch
> Affects Versions: 0.2.0
> Reporter: Allen Wittenauer
> Assignee: Allen Wittenauer
> Priority: Blocker
>
> It's effectively an edge-case, but probably a common one:
> * --patch-dir is used
> * --patch-dir is never cleared between runs
> * --docker mode is not used (maybe?)
> * patch file is given
> See comments.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)