portscout icon indicating copy to clipboard operation
portscout copied to clipboard

Ports with DISTVERSIONPREFIX have certain issues

Open alexdupre opened this issue 6 years ago • 9 comments
trafficstars

Ports with DISTVERSIONPREFIX have certain issues with Portscout detection:

  • [ ] A new version (with prefix is detected even if it's the same one (without prefix)

screenshot_20181217_164135

  • [ ] Other issues ...

alexdupre avatar Dec 17 '18 15:12 alexdupre

Some issues are somewhat expected, as explained in FreeBSD Ports r405250 in a past update

...
Additionally it turns out, portscout currently only uses/stores a
normalized version ('ver') in its database, in its general design
attempt to be a generic version comparison tool

In particular, portscout does not reference or store PORTVERSION
or DISTVERSION{FULL}, so we have nothing 'canonical' to compare
the responses from Github (tags) against.

This change special-cases Github in the FindNewestFile subroutine, which
was obtained via Portroach [2] (OpenBSD's portscout fork).

Extending this, we also now only match version-esque looking strings
from the tag, in an attempt to normalise, because they come in many
forms, including {foo-}X.Y.Z{-bar}, foo_X_Y_Z, among others.

We may be able to tweak certain cases

koobs avatar Apr 19 '20 04:04 koobs

@alexdupre @yurivict If you have noticed other examples where prefixes/suffixed/other version formats have caused different classes of issues, please add them here.

koobs avatar Apr 19 '20 04:04 koobs

misc/dynomite: 0.6.21-rc2 vs. v0.6.21-rc2 - listed as having a new version.

yurivict avatar Apr 19 '20 04:04 yurivict

misc/dynomite: 0.6.21-rc2 vs. v0.6.21-rc2 - listed as having a new version.

Yep that's covered in the first class (i edited the original issue summary with a checkbox)

If there are any other categories id be keen to know what they are

koobs avatar Apr 19 '20 04:04 koobs

When it comes to DISTVERSIONPREFIX this is the only kind that I saw.

yurivict avatar Apr 19 '20 05:04 yurivict

Apparently it's still unfixed as of 2022, e.g. for several of my ports I see this: screenshot №1

Possibly related bug is that skipv keyword is being ignored: screenshot №2 The port has PORTSCOUT=skipv:2.1.0 specified.

danfe avatar Mar 31 '22 08:03 danfe

It seems that this issue affects my port, too:

20221204_19h07m58s_grim 20221204_19h09m44s_grim 20221204_19h19m30s_grim

I see no possible simple workaround using the PORTSCOUT Makefile variable which does not disable update notifications at all. So I guess one just needs to ignore portscout in such cases?

elgithubo avatar Dec 04 '22 18:12 elgithubo

I see no possible simple workaround using the PORTSCOUT variable

There's nothing to work around here. It's a bug in portscout which must be hunt down and fixed.

So I guess one just needs to ignore portscout in such cases?

I prefer to not, as I want to see if/when something would change in this regard.

danfe avatar Dec 13 '22 06:12 danfe

It seems that the following explanation meant that this behavior was meant.

  • Any regexes or limitations below apply to just the version, not the whole distfile name.

At least USE_GITHUB ports seem to have been stripped down here with something like blenderbim- other than numbers and dots. It looks like we'll need to pick it up as follows and implement a new key to match it. ($prematchver, $postmatchver) = ($``, $');`

tatsuki-makino avatar Jul 12 '24 20:07 tatsuki-makino