Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small changes to Npackd #863

Closed
tim-lebedkov opened this issue Jun 14, 2019 · 9 comments
Closed

Small changes to Npackd #863

tim-lebedkov opened this issue Jun 14, 2019 · 9 comments

Comments

@tim-lebedkov
Copy link

First of all, thank you for adding Npackd.

  1. If I understand it correctly, this is the file where Npackd repository is defined: https://github.com/repology/repology/blob/master/repos.d/windows/npackd.yaml

Please change all references from https://npackd.appspot.com to https://www.npackd.org

  1. In https://github.com/repology/repology/blob/master/repology/parsers/parsers/npackd.py the comment says about different naming schemes and mentions quazip source packages. Please handle all package names as possibly prefixed with a domain name and just ignore the exceptions (these are just wrongly named).

  2. If there is anything I can change in Npackd to make it better/easier for you, let me know.

@AMDmi3
Copy link
Member

AMDmi3 commented Jun 14, 2019

Hey, thanks for the interest!

If I understand it correctly, this is the file where Npackd repository is defined: https://github.com/repology/repology/blob/master/repos.d/windows/npackd.yaml

Yes, plus the parser code.

Please change all references from https://npackd.appspot.com to https://www.npackd.org

Done.

Please handle all package names as possibly prefixed with a domain name and just ignore the exceptions (these are just wrongly named).

That's the problem as it can't be done reliably. I could cut everything before the last ., but there are cases like quazip-dev-x86_64-w64_seh_posix_7.2-qt_5.9.2-static which would be corrupted, and if some more clever algorithm is used, like cutting off ^[a-z.]+\\., there are still cases which this would break: f.lux, roadkil-disk.image, battle.net_kor.

If there is anything I can change in Npackd to make it better/easier for you, let me know.

Well the main problems are package naming and versioning. Regarding the latter, the problem is that npackd doesn't seem to handle prerelease and letter versions - several cases I've seen use incompatible version mangling (firefox 67.0b9 as 67.0.9, fritzing 0.9.3b as 0.9.3.2 etc.).

AMDmi3 added a commit that referenced this issue Jun 14, 2019
@tim-lebedkov
Copy link
Author

I renamed the packages as follows:

battle.net_kor => battle-net
f.lux => f-lux
roadkil-disk.image => roadkil-disk-image
savegamebackup.net => savegamebackup-net

Could you please remove https://www.npackd.org/rep/xml?tag=libs from Repology (it's kind of experimental) and use the last part before dot in package names?

@tim-lebedkov
Copy link
Author

Added a link to Repology to check the package name

screenshot

@AMDmi3
Copy link
Member

AMDmi3 commented Jun 17, 2019

Normalization enabled, and unique packages are no longer hidden. After couple of hours, you'll see npackd packages which have not matched to other repositories here. These which could be matched to other repos (but weren't because of different naming; see the ∗ hint which suggests possible matches) could be renamed in npackd, or matched through adding Repology rule.

Possible improvements

  • I suggest software with uncommon naming (such as open-ttdopenttd, definityle tortorbrowser) to be renamed in npackd, if that's possible.

  • In other cases (where you think npackd name is more clear; possible example is open-broadcaster-software vs. obs-studio), please don't hesitate to request rules (via github issue or Report section in project view).

  • There are a few not so evident cases (multi-commander/multicommander, light-alloy/lightalloy, linux-reader/linuxreader) - I usually prefer the spelling either used by more existing packages, or one used in the distfile name.

  • Another kind of thing is common patterns throughout the repository, which can usually be normalized with a single rule, as long as they are used consistently in the repository. I see 32/64 suffix as a candidate for such rule, but it could be used more consistently (bluegriffon64, graphicsmagickq16-64, mysqlodbcconnector32bits). Could either add a more complex regexp rule to cut away -?(32|64)(bits?)?$, but if you're willing to introduce uniform naming pattern in npackd it would benefit both repology and npackd users.

  • Finally, the versioning is still the problem. Is using e.g. firefox version 67.0b9 as-is technically possible in npackd?

@tim-lebedkov
Copy link
Author

  • renaming that many packages is not something I would consider. I hope to have more compatible names with the rest of the world in the future thanks to Repology.
  • mapping rules seem to be the best option. I will create a mapping table for this.
  • "64" suffix is used pretty consistently, but is not even documented. I think it is pretty safe to strip "64" or "32" at the end of a package name. Please make this change, if possible.
  • version numbers cannot contain letters in Npackd. Only digits are allowed. Version numbers are also normalized: 1.02.003 => 1.2.3. How do other package managers compare 67.0b9 and 67.0a8? Which version is newer?

@AMDmi3
Copy link
Member

AMDmi3 commented Jun 19, 2019

mapping rules seem to be the best option. I will create a mapping table for this.

Ok. Note that though rules for different spelling are generally fine (e.g. open-ttd), I don't think I'll accept rules to fix plainly incorrect naming (e.g. torbrowser named as tor or gpg4win named as gnupg).

version numbers cannot contain letters in Npackd. Only digits are allowed. Version numbers are also normalized: 1.02.003 => 1.2.3

This is not a problem, as numerical components are compared numerically, and leading zeroes do not affect the result.

Not handling letters is a problem though, and while it's there npack cannot be allowed to generate newest versions (a lot of people get upset if fake newest versions are generated). The effect of this is that Repology can miss some actual new releases it could get from npackd (which is as far as I can see pretty good maintained), and npack statistics and list of newest/outdated packages may be incomplete.

See the complete list of affected npackd packages.

How do other package managers compare 67.0b9 and 67.0a8? Which version is newer?

67.0a8 < 67.0b9 as numeric components match and a < b. Thankfully, lexicographical comparison matches prerelease suffix order, e.g. alpha < beta < prerelease < rc the same way as a < b < p < r, so plain lexicographical comparison of alphabetic parts works for most cases.

For the concrete comparison algorithms you can check out a library used in Repology itself or Debian version comparison explanation.

Also, many repositories use a notion of epochs, an additional version component which takes higher precedence than upstream version, which you may use to force right comparison even if your comparison algorithm doesn't cope. It's also used to force version downgrade or to handle incompatible upstream version schema changes.

@tim-lebedkov
Copy link
Author

Well, in this case there are probably only a few packages that can be matched using mapping rules. Maybe even removing all "-" characters will show them.

I still like the Npackd scheme for version numbers better and do not plan to add letters, especially as I see version numbers like 2.9.0.r367.fc370bbebf on Repology.

It would be beneficial if you could link to the versioning rules (what is valid and how to determine which one is newer) and package naming rules used by Repology from the home page.

I guess, this issue can be closed and I will file other, if necessary.

Thank you.

@AMDmi3
Copy link
Member

AMDmi3 commented Jun 23, 2019

I still like the Npackd scheme for version numbers better and do not plan to add letters

Then the newest versions from npackd will have to remain ignored, unfortunately. Repology does not tolerate fake versions and cannot bother all e.g. Firefox maintainers with notifications on a non-existing new Firefox release.

especially as I see version numbers like 2.9.0.r367.fc370bbebf on Repology.

This is the very same fake version which has nothing to do with upstream, which is (or should be) ignored. Unlike version corruption though, snapshot versions are inevitable (though more commonly used format of them is e.g. X.Y.Z.YYYYMMDD) and in theory it's possible to make them comparable, see #345.

It would be beneficial if you could link to the versioning rules (what is valid and how to determine which one is newer) and package naming rules used by Repology from the home page.

This is planned, se #852, already partially implemented in the Docs section on the site.

@AMDmi3
Copy link
Member

AMDmi3 commented Jun 23, 2019

I guess, this issue can be closed and I will file other, if necessary.

Thank you.

You're welcome 👍

@AMDmi3 AMDmi3 closed this as completed Jun 23, 2019
AMDmi3 added a commit to repology/repology-rules that referenced this issue Jul 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants