* Miro Hrončok:

> On 14. 04. 23 9:31, Florian Weimer wrote:
>> What's the -p default for %autosetup?  Without any -p argument, the
>> patch command has peculiar behavior.  I assumed that without -p, %patch
>> would not inherit that behavior, and so would %autosetup without -p.
>> Is this accurate?  Or does %autosetup (or %patch) have an actual default
>> for -p?
>
> Hi.
>
> %autosetup calls %autopatch and passes -p only if used
>
> https://github.com/rpm-software-management/rpm/blob/rpm-4.18.1-release/macros.in#L1279
>
> %autopatch calls %__apply_patch and passes -p only if used
>
> https://github.com/rpm-software-management/rpm/blob/rpm-4.18.1-release/macros.in#L1262
>
> %__apply_patch calls %__scm_apply_%{__scm} and passes options as given
>
> https://github.com/rpm-software-management/rpm/blob/rpm-4.18.1-release/macros.in#L1230
>
> Default value for %{__scm} is patch
>
> https://github.com/rpm-software-management/rpm/blob/rpm-4.18.1-release/macros.in#L1159
>
> %__scm_apply_patch calls the %{__patch} program and passes -p only if used
>
> Default for %{__patch} is ... probably /usr/bin/patch
>
> https://github.com/rpm-software-management/rpm/blob/rpm-4.18.1-release/macros.in#L47
>
> ---------------
>
> Conclusion: No default. %autosetup without -p calls patch without
> -p. Assuming you don't use %autosetup with non-default -S.

Thank you, that was my tentative conclusion as well.  Given the weird
-p-less behavior, shouldn't we encourage to use -p1 (to match git) or
-p0 (to match Subversion/CVS/RCS)?

Florian
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to