spkrepo icon indicating copy to clipboard operation
spkrepo copied to clipboard

Deliver latest package revision available for requested architecture

Open ymartin59 opened this issue 6 years ago • 8 comments

Code seems to search for latest package version without matching architecture first. As a result, a recent package revision for an architecture X (without publishing for Y) may hide previous revision for architecture Y. It sounds relevant spkrepo should deliver latest revision available

ymartin59 avatar Apr 26 '18 16:04 ymartin59

A long time ago, DSM refused to consider a package as an upgrade if the version was inferior by string comparison. I think this is to avoid having stable packages show as an upgrade of a beta package after switching back channel from stable to beta.

It seems this could have changed with a more clever version parsing inside newer DSM versions. Needs to be checked.

Version-based sorting is not easy for databases as they don't have the functions to deal with that. Add the filters (channel, architecture, DSM minimum version, active, etc.) and you have horrible code logic mixed with SQL.

The best would be to find a cleaner solution to this issue, then I think the latest package for architecture issue would be easier to solve.

Diaoul avatar Jun 27 '18 21:06 Diaoul

A proposal: at publish, parse package version and create an integer from it (similar to firmware build sequence)... spkrepo may only keep "revision" alone, or implement a more complex numbering like major.10⁹+minor.10⁶+patch.10³+revision, expecting applications follow semantic versioning and do not dare to go over 999... (and support also dates based package version)

ymartin59 avatar Jun 29 '18 04:06 ymartin59

With packages published for DSM 7 with a duplicate of same version for DSM 6, it looks like packages are "hidden"... My evansport DSM 6.2 Package Center currently shows no community nor beta packages....

ymartin59 avatar Oct 02 '21 18:10 ymartin59

With packages published for DSM 7 with a duplicate of same version for DSM 6, it looks like packages are "hidden"... My evansport DSM 6.2 Package Center currently shows no community nor beta packages....

In fact my "hidden" packages issue was related to expired SSL certificate.

ymartin59 avatar Oct 03 '21 06:10 ymartin59

Hi @ymartin59, I've been addressing server improvements as part of task #112 to resolve several outstanding issues. @hgy59 highlighted this particular issue for further investigation, but I'm struggling to grasp its intricacies. Could you please share additional details to assist me in validating whether the current platform adequately addresses this concern? Thanks!

mreid-tt avatar Jan 12 '24 18:01 mreid-tt

Hi @ymartin59, I've been addressing server improvements as part of task #112 to resolve several outstanding issues. @hgy59 highlighted this particular issue for further investigation, but I'm struggling to grasp its intricacies. Could you please share additional details to assist me in validating whether the current platform adequately addresses this concern? Thanks!

Testing the original issue succeeds in #112 (instead of "not publishing for Y" I deactivated the recent revision for Y, and got the previous revision)

Code seems to search for latest package version without matching architecture first. As a result, a recent package revision for an architecture X (without publishing for Y) may hide previous revision for architecture Y. It sounds relevant spkrepo should deliver latest revision available

hgy59 avatar Jan 12 '24 19:01 hgy59

Hello. Here the question is about API which delivers latest package to DSM Package Manager according to its architecture. It was a concern when an architecture is deprecated or no longer supported, even if package receives updates for others.

ymartin59 avatar Feb 11 '24 07:02 ymartin59

Hello. Here the question is about API which delivers latest package to DSM Package Manager according to its architecture. It was a concern when an architecture is deprecated or no longer supported, even if package receives updates for others.

As far as I can observe this is how the API already worked. For example within the last several months there was an issue with SABnzbd causing crashes with the latest package versions on qoriq architectures. As a result version 4.0.2-62 was the last working version. All versions published after that had the 6.2 qoriq build disabled and/or removed. For these users newer versions did not show up in their Package Center and the latest they saw was v4.0.2-62. When the issue was resolved and version 4.2.2-68 with the qoriq architecture published, they were then able to get a new update.

Am I misinterpreting the concern you were articulating?

mreid-tt avatar Feb 11 '24 11:02 mreid-tt