Re: [Rpm-maint] [rpm-software-management/rpm] Add deprecated %apply_patch, provide an alternative (#1668)

2021-05-06 Thread Panu Matilainen
> Sorry, I've meant that ranges/slices include start but not the end. I.e. 1:3 
> is 1, 2. Unlike %autopatch -m 1 -M 3 which is 1, 2, 3.

Oh, *that*. Yeah I ran into it in Python, caused some head-scratching before 
realizing that's how it's supposed to work. So we'd confuse somebody no matter 
which behavior was used...

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1668#issuecomment-833509068___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add deprecated %apply_patch, provide an alternative (#1668)

2021-05-06 Thread Miro Hrončok
Sorry, I've meant that ranges/slices include start but not the end. I.e. `1:3` 
is 1, 2. Unlike `%autopatch -m 1 -M 3` which is 1, 2, 3.

> Hmm, but then we can nowadays have macros opt out of option processing.

Yes, but that way, no backports would be possible.



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1668#issuecomment-833498039___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add deprecated %apply_patch, provide an alternative (#1668)

2021-05-06 Thread Panu Matilainen
Hmm, but then we *can* nowadays have macros opt out of option processing. 
Already forgotten that... (f9516434dd70cf0d5125e9e997b2c278b4fb4bf2)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1668#issuecomment-833493781___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add deprecated %apply_patch, provide an alternative (#1668)

2021-05-06 Thread Panu Matilainen
Um? Maybe "range" in Python has some special meaning I'm not aware of, I guess 
in Python lingo what I meant is slice syntax.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1668#issuecomment-833490206___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add deprecated %apply_patch, provide an alternative (#1668)

2021-05-06 Thread Miro Hrončok
Note that Python ranges don't include the ending number. If you use them please 
keep the semantics to avoid confusion for Pythonistas.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1668#issuecomment-833488732___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add deprecated %apply_patch, provide an alternative (#1668)

2021-05-06 Thread Panu Matilainen
That's a good point, it'd require "escaping" with `--` and that gets ugly. 
Python-style `:5` as a range syntax wouldn't have that problem, but I wonder if 
that clashes with something else in turn...

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1668#issuecomment-833484823___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add deprecated %apply_patch, provide an alternative (#1668)

2021-05-06 Thread Miro Hrončok
I wonder if `-5` would not be recognized as an option

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1668#issuecomment-833454305___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add deprecated %apply_patch, provide an alternative (#1668)

2021-05-06 Thread Panu Matilainen
So... it all ends up being rather cumbersome because -m and -M are a cumbersome 
way of specifying ranges, but now we're kinda stuck with them. Me thinks it'd 
make a whole lot more sense to have ranges expressable in `-5`, `50-70` `100-` 
style (multiple) arguments, in addition to individual patch numbers. Then the 
-m/-M thing can be handled as a special case of that and deprecated.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1668#issuecomment-833446982___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add deprecated %apply_patch, provide an alternative (#1668)

2021-05-05 Thread Panu Matilainen
As usual, a bit of AFK gave some helpful perspective: -n is actually a rather 
strange corner-case to be considering. What makes more sense is have %autopatch 
accept arguments, that way it's not limited to one-at-a-time special fubar and 
can be made to handle both paths and numbers. I'll try to supply a PR 
implementing that tomorrow.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1668#issuecomment-832656984___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add deprecated %apply_patch, provide an alternative (#1668)

2021-05-05 Thread Zbigniew Jędrzejewski-Szmek
FWIW, I think that deprecation+eventual removal is the way to go in this case. 
If the macro was exposed, but not *actually used*, it'd be OK to quickly yank 
it out. But clearly it is in use, and we know that the removal breaks packages 
that are out there. I appreciate the desire to make a clean break, but rpm is a 
foundational package that needs to preserve backwards compatibility.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1668#issuecomment-832570517___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add deprecated %apply_patch, provide an alternative (#1668)

2021-05-05 Thread Miro Hrončok
https://github.com/rpm-software-management/rpm/pull/1673

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1668#issuecomment-832554477___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add deprecated %apply_patch, provide an alternative (#1668)

2021-05-05 Thread Miro Hrončok
I am just trying to make my life easier here, nothing more. Removals have 
negative impact on others :(

I'll open a PR with just `%autopatch -n`

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1668#issuecomment-832552531___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add deprecated %apply_patch, provide an alternative (#1668)

2021-05-05 Thread Panu Matilainen
Sorry but I'm finding the level of noise and bargaining quite excessive for the 
case. For an immediately backwards compatible version (for rpm >= 4.15), use 
`%autopatch -m  -M ` and wrap it up in a one-line local helper macro 
for convenience. -n is certainly subject for inclusion in a future 4.16 
enhancement release.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1668#issuecomment-832549335___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add deprecated %apply_patch, provide an alternative (#1668)

2021-05-05 Thread Miro Hrončok
What about this: I'll finally shut up about `%apply_patch` if you'll take a 
backport of `%autopatch -n` for RPM 4.16.x and we document it as a replacement 
for the removal. That way, we can update our Python spec files on Fedora 33 and 
further and hopefully also in CentOS Stream 9. (I'd also gladly prepare 
downstream-only backports.)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1668#issuecomment-832526482___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add deprecated %apply_patch, provide an alternative (#1668)

2021-05-05 Thread Panu Matilainen
Adding -n is fine (funny how such obvious things don't get noticed), but I 
don't want %apply_patch back, and testing for the error seems over the top, 
just document -n to override -m and -M.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1668#issuecomment-832519338___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add deprecated %apply_patch, provide an alternative (#1668)

2021-04-30 Thread Miro Hrončok
@hroncok pushed 1 commit.

ae82e016c8ea67048ebc6db4922768eabed10a0f  Add deprecated %apply_patch, provide 
an alternative


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1668/files/d3bde71ecdd083f19ede6199d2e7ec1a25707eb5..ae82e016c8ea67048ebc6db4922768eabed10a0f
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add deprecated %apply_patch, provide an alternative (#1668)

2021-04-30 Thread Miro Hrončok
@hroncok pushed 1 commit.

d3bde71ecdd083f19ede6199d2e7ec1a25707eb5  Add deprecated %apply_patch, provide 
an alternative


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1668/files/31a317c32b0e7b74a54b16ffe35540623db2a5cc..d3bde71ecdd083f19ede6199d2e7ec1a25707eb5
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add deprecated %apply_patch, provide an alternative (#1668)

2021-04-30 Thread Miro Hrončok
@hroncok pushed 1 commit.

08a1d90e15e724d671847b3b661aa62311a38d1b  Add deprecated %apply_patch, provide 
an alternative


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1668/files/948cbc19808693de3231a4083445d2642811cc1e..08a1d90e15e724d671847b3b661aa62311a38d1b
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add deprecated %apply_patch, provide an alternative (#1668)

2021-04-30 Thread Miro Hrončok
@hroncok pushed 1 commit.

948cbc19808693de3231a4083445d2642811cc1e  Add deprecated %apply_patch, provide 
an alternative


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1668/files/75c9985ecc2a13e8a62cd27cf9d2826e282762d2..948cbc19808693de3231a4083445d2642811cc1e
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add deprecated %apply_patch, provide an alternative (#1668)

2021-04-30 Thread Miro Hrončok
@hroncok pushed 1 commit.

75c9985ecc2a13e8a62cd27cf9d2826e282762d2  Add deprecated %apply_patch, provide 
an alternative


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1668/files/65be867de4dd62f5215f12ddd5eda5809a6e57cb..75c9985ecc2a13e8a62cd27cf9d2826e282762d2
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add deprecated %apply_patch, provide an alternative (#1668)

2021-04-30 Thread Miro Hrončok
@hroncok pushed 1 commit.

65be867de4dd62f5215f12ddd5eda5809a6e57cb  Add deprecated %apply_patch, provide 
an alternative


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1668/files/3935ad6c6c0309ce3295a42b7054f49c4272443e..65be867de4dd62f5215f12ddd5eda5809a6e57cb
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint