[PATCH] repoman: remove check for addpredict

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] repoman: remove check for addpredict

Mike Gilbert-2
This function has not been deprecated, and developers generally have a
good reason for using it. A repoman warning for this is just noise.

No reason was given when this check was added in 2010, and it was requested
by a developer who has since retired.

Signed-off-by: Mike Gilbert <[hidden email]>
---
 repoman/cnf/linechecks/linechecks.yaml                     | 1 -
 repoman/cnf/repository/repository.yaml                     | 1 -
 .../lib/repoman/modules/linechecks/workaround/__init__.py  | 6 ------
 .../repoman/modules/linechecks/workaround/workarounds.py   | 7 -------
 4 files changed, 15 deletions(-)

diff --git a/repoman/cnf/linechecks/linechecks.yaml b/repoman/cnf/linechecks/linechecks.yaml
index 410bcd9c5..2182b467a 100644
--- a/repoman/cnf/linechecks/linechecks.yaml
+++ b/repoman/cnf/linechecks/linechecks.yaml
@@ -28,7 +28,6 @@ errors:
     PRESERVE_OLD_LIB: 'Ebuild calls deprecated preserve_old_lib'
     BUILT_WITH_USE: 'built_with_use'
     NO_OFFSET_WITH_HELPERS: 'Helper function is used with D, ROOT, ED, EROOT or EPREFIX'
-    SANDBOX_ADDPREDICT: 'Ebuild calls addpredict'
     USEQ_ERROR: 'Ebuild calls deprecated useq function'
     HASQ_ERROR: 'Ebuild calls deprecated hasq function'
     URI_HTTPS: 'Ebuild uses http:// but should use https://'
diff --git a/repoman/cnf/repository/repository.yaml b/repoman/cnf/repository/repository.yaml
index 935260424..ad00d18c1 100644
--- a/repoman/cnf/repository/repository.yaml
+++ b/repoman/cnf/repository/repository.yaml
@@ -71,6 +71,5 @@ linechecks_modules:
     uselessdodoc
     whitespace
     blankline
-    addpredict
     noasneeded
 
diff --git a/repoman/lib/repoman/modules/linechecks/workaround/__init__.py b/repoman/lib/repoman/modules/linechecks/workaround/__init__.py
index 425085a5c..694695015 100644
--- a/repoman/lib/repoman/modules/linechecks/workaround/__init__.py
+++ b/repoman/lib/repoman/modules/linechecks/workaround/__init__.py
@@ -10,12 +10,6 @@ module_spec = {
  'name': 'do',
  'description': doc,
  'provides':{
- 'addpredict-check': {
- 'name': "addpredict",
- 'sourcefile': "workarounds",
- 'class': "SandboxAddpredict",
- 'description': doc,
- },
  'noasneeded-check': {
  'name': "noasneeded",
  'sourcefile': "workarounds",
diff --git a/repoman/lib/repoman/modules/linechecks/workaround/workarounds.py b/repoman/lib/repoman/modules/linechecks/workaround/workarounds.py
index 37cb54314..768a47e8e 100644
--- a/repoman/lib/repoman/modules/linechecks/workaround/workarounds.py
+++ b/repoman/lib/repoman/modules/linechecks/workaround/workarounds.py
@@ -9,10 +9,3 @@ class NoAsNeeded(LineCheck):
  repoman_check_name = 'upstream.workaround'
  re = re.compile(r'.*\$\(no-as-needed\)')
  error = 'NO_AS_NEEDED'
-
-
-class SandboxAddpredict(LineCheck):
- """Check for calls to the addpredict function."""
- repoman_check_name = 'upstream.workaround'
- re = re.compile(r'(^|\s)addpredict\b')
- error = 'SANDBOX_ADDPREDICT'
--
2.25.1


Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] repoman: remove check for addpredict

Michał Górny-5
On Thu, 2020-03-05 at 15:30 -0500, Mike Gilbert wrote:
> This function has not been deprecated, and developers generally have a
> good reason for using it. A repoman warning for this is just noise.
>
> No reason was given when this check was added in 2010, and it was requested
> by a developer who has since retired.
>

If you want to remove this class of warnings, I'd suggest removing
the one for -j1 as well.  Same argument.

--
Best regards,
Michał Górny


signature.asc (631 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] repoman: remove check for addpredict

Mike Gilbert-2
On Thu, Mar 5, 2020 at 3:59 PM Michał Górny <[hidden email]> wrote:

>
> On Thu, 2020-03-05 at 15:30 -0500, Mike Gilbert wrote:
> > This function has not been deprecated, and developers generally have a
> > good reason for using it. A repoman warning for this is just noise.
> >
> > No reason was given when this check was added in 2010, and it was requested
> > by a developer who has since retired.
> >
>
> If you want to remove this class of warnings, I'd suggest removing
> the one for -j1 as well.  Same argument.

Makes sense to me.

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] repoman: remove check for addpredict

Zac Medico-2
In reply to this post by Mike Gilbert-2
On 3/5/20 12:30 PM, Mike Gilbert wrote:

> This function has not been deprecated, and developers generally have a
> good reason for using it. A repoman warning for this is just noise.
>
> No reason was given when this check was added in 2010, and it was requested
> by a developer who has since retired.
>
> Signed-off-by: Mike Gilbert <[hidden email]>
> ---
>  repoman/cnf/linechecks/linechecks.yaml                     | 1 -
>  repoman/cnf/repository/repository.yaml                     | 1 -
>  .../lib/repoman/modules/linechecks/workaround/__init__.py  | 6 ------
>  .../repoman/modules/linechecks/workaround/workarounds.py   | 7 -------
>  4 files changed, 15 deletions(-)
Looks good. Please merge.
--
Thanks,
Zac


signature.asc (1000 bytes) Download Attachment