Re: Relax port lint rule for patchfile naming

2018-03-19 Thread Ryan Schmidt

On Mar 18, 2018, at 04:04, Jan Stary wrote:

> While we're here:
> 
 How will you distinguish patchfiles from others
> 
>> The lint check in question doesn't look at the contents of files/, it
>> looks at the patchfiles option.
> 
> what e.g. OpenBSD does is it has a patches/ subdirectory in the port dir.
> Anything in there is a patch to be applied. No extra keyword/option for it.
> (files/ is extra files to be added to WRKSRC; no keyword for it).
> 
> I believe it is simpler to what MP has now:
> patchfiles need to be declared such with 'patchfiles',
> and extra files need to be created _in_ the Portfile
> (as e.g. textproc/mandoc does for configure.local).

I don't see any reason to change how MacPorts base handles patchfiles and other 
extra files. What we have now is very flexible and works fine.

Let's keep this thread on the topic of port lint rules for patchfile names.



Re: Relax port lint rule for patchfile naming

2018-03-18 Thread Jan Stary
While we're here:

> >> How will you distinguish patchfiles from others

> The lint check in question doesn't look at the contents of files/, it
> looks at the patchfiles option.

what e.g. OpenBSD does is it has a patches/ subdirectory in the port dir.
Anything in there is a patch to be applied. No extra keyword/option for it.
(files/ is extra files to be added to WRKSRC; no keyword for it).

I believe it is simpler to what MP has now:
patchfiles need to be declared such with 'patchfiles',
and extra files need to be created _in_ the Portfile
(as e.g. textproc/mandoc does for configure.local).

Jan




Re: Relax port lint rule for patchfile naming

2018-03-16 Thread Joshua Root
On 2018-3-17 09:05 , Mojca Miklavec wrote:
> On 16 March 2018 at 15:02, Ryan Schmidt wrote:
>>
>> On Mar 16, 2018, at 08:40, Mojca Miklavec wrote:
>>
>>> How will you distinguish patchfiles from others, like select lists, ed 
>>> files, Makefiles etc?
>>
>> I wouldn't. If the author of the portfile finds that distinction important, 
>> they could continue to maintain it. port lint wouldn't care.
>>
>>> I support relaxing rules, but you cannot even rely on all files matching 
>>> the relaxed version form.
>>
>> What do you mean? Do you have an example in mind?
> 
> I may be just confused. I didn't even know that lint would check the
> filenames under files/ folder. All I wanted to say is that if it does
> or if it will check, relaxing this condition would still result in
> warnings/errors unless lint would be able to distinguish patches from
> other types of files.
> 
> Relaxing the rule sounds totally reasonable. It just wasn't clear to
> me how you would distinguish patchfiles from other types of files.

The lint check in question doesn't look at the contents of files/, it
looks at the patchfiles option.

- Josh


Re: Relax port lint rule for patchfile naming

2018-03-16 Thread Mojca Miklavec
On 16 March 2018 at 15:02, Ryan Schmidt wrote:
>
> On Mar 16, 2018, at 08:40, Mojca Miklavec wrote:
>
>> How will you distinguish patchfiles from others, like select lists, ed 
>> files, Makefiles etc?
>
> I wouldn't. If the author of the portfile finds that distinction important, 
> they could continue to maintain it. port lint wouldn't care.
>
>> I support relaxing rules, but you cannot even rely on all files matching the 
>> relaxed version form.
>
> What do you mean? Do you have an example in mind?

I may be just confused. I didn't even know that lint would check the
filenames under files/ folder. All I wanted to say is that if it does
or if it will check, relaxing this condition would still result in
warnings/errors unless lint would be able to distinguish patches from
other types of files.

Relaxing the rule sounds totally reasonable. It just wasn't clear to
me how you would distinguish patchfiles from other types of files.

Mojca


Re: Relax port lint rule for patchfile naming

2018-03-16 Thread Joshua Root
On 2018-3-16 22:39 , Ryan Schmidt wrote:
> I would be happy if lint were changed to just check that patchfile names end 
> with .diff or .patch. Would anyone object to that?

I could've sworn we had this conversation years ago and this was the
conclusion. :)

So yes, please do make this change.

- Josh


Re: Relax port lint rule for patchfile naming

2018-03-16 Thread Ryan Schmidt

On Mar 16, 2018, at 08:40, Mojca Miklavec wrote:

> How will you distinguish patchfiles from others, like select lists, ed files, 
> Makefiles etc?

I wouldn't. If the author of the portfile finds that distinction important, 
they could continue to maintain it. port lint wouldn't care.

> I support relaxing rules, but you cannot even rely on all files matching the 
> relaxed version form.

What do you mean? Do you have an example in mind?




Re: Relax port lint rule for patchfile naming

2018-03-16 Thread Ryan Schmidt

On Mar 16, 2018, at 08:03, Arno Hautala wrote:

> The only reason I can think of for keeping the prefix is that all
> patches would be sorted together in a file listing. Not a very strong
> reason.

Nothing would prevent a port author from continuing to do that, if they wish to.



Re: Relax port lint rule for patchfile naming

2018-03-16 Thread Mojca Miklavec
How will you distinguish patchfiles from others, like select lists, ed
files, Makefiles etc? I support relaxing rules, but you cannot even rely on
all files matching the relaxed version form.

See also recent discussion about whether lint should return nonzero value
on warnings.

Mojca