diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-04-21 11:13:13 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-04-21 11:13:13 +0300 |
commit | 4fc06030b80f3b7c2f6d5dd80d65091c19b70b22 (patch) | |
tree | 8bf7f093e01ed797ab617f8ff2edb79518c69a7f /build | |
parent | b80340761ff064469fa099a541e2f2128ca482c6 (diff) | |
download | rpm-4fc06030b80f3b7c2f6d5dd80d65091c19b70b22.tar.gz rpm-4fc06030b80f3b7c2f6d5dd80d65091c19b70b22.tar.bz2 rpm-4fc06030b80f3b7c2f6d5dd80d65091c19b70b22.zip |
Avoid %patch0 getting applied twice
Diffstat (limited to 'build')
-rw-r--r-- | build/parsePrep.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/build/parsePrep.c b/build/parsePrep.c index c68632157..ff51ff5e2 100644 --- a/build/parsePrep.c +++ b/build/parsePrep.c @@ -428,7 +428,8 @@ static rpmRC doPatchMacro(rpmSpec spec, const char *line) }; poptContext optCon; - opt_P = opt_p = opt_R = opt_E = 0; + opt_p = opt_R = opt_E = 0; + opt_P = -1; /* no explicit -P <N> was found */ opt_F = -1; /* fuzz<0 indicates no explicit -F x was set */ opt_b = NULL; @@ -468,7 +469,7 @@ static rpmRC doPatchMacro(rpmSpec spec, const char *line) } /* %patch without -P<N> is treated as %patch0, urgh */ - if (!opt_P) { + if (opt_P < 0) { argvAdd(&patchnums, "0"); } /* Any trailing arguments are treated as patch numbers */ |