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

Package versions missing in search output #770

Open
brettsheffield opened this issue May 11, 2024 · 1 comment
Open

Package versions missing in search output #770

brettsheffield opened this issue May 11, 2024 · 1 comment

Comments

@brettsheffield
Copy link

Package version is displaying blank for packages librecast, lcrq and lcsync which prevents these packages from displaying in repology.

See https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=librecast

See also repology ticket repology/repology-updater#1402

I know little about either repology or nixpgs, but looking at the API output, I think the problem may be with "package_pversion": ""

{
	"took": 93,
	"timed_out": false,
	"_shards": {
		"total": 1,
		"successful": 1,
		"skipped": 0,
		"failed": 0
	},
	"hits": {
		"total": {
			"value": 3,
			"relation": "eq"
		},
		"max_score": null,
		"hits": [
			{
				"_index": "nixos-42-unstable-f1010e0469db743d14519a1efd37e23f8513d714",
				"_type": "_doc",
				"_id": "aVWeYY8BMU8RZ4DXCpuu",
				"_score": 94.32698,
				"_source": {
					"type": "package",
					"package_attr_name": "librecast",
					"package_attr_set": "No package set",
					"package_pname": "librecast",
					"package_pversion": "",
					"package_platforms": [
						"riscv32-linux",
						"s390-linux",
						"microblazeel-linux",
						"mips64el-linux",
						"mipsel-linux",
						"s390x-linux",
						"m68k-linux",
						"x86_64-linux",
						"armv6l-linux",
						"mips64-linux",
						"armv5tel-linux",
						"mips-linux",
						"riscv64-linux",
						"aarch64-linux",
						"loongarch64-linux",
						"powerpc64-linux",
						"armv7l-linux",
						"microblaze-linux",
						"powerpc64le-linux",
						"armv7a-linux",
						"i686-linux"
					],
					"package_outputs": [
						"out"
					],
					"package_default_output": "out",
					"package_programs": [],
					"package_license": [
						{
							"url": "https://spdx.org/licenses/GPL-2.0.html",
							"fullName": "GNU General Public License v2.0"
						},
						{
							"url": "https://spdx.org/licenses/GPL-3.0.html",
							"fullName": "GNU General Public License v3.0"
						}
					],
					"package_license_set": [
						"GNU General Public License v2.0",
						"GNU General Public License v3.0"
					],
					"package_maintainers": [
						{
							"name": "Albert Chae",
							"github": "albertchae",
							"email": null
						},
						{
							"name": "Anish Lakhwara",
							"github": "Chickensoupwithrice",
							"email": null
						},
						{
							"name": "Dominic Mills",
							"github": "DMills27",
							"email": null
						},
						{
							"name": "Jason Odoom",
							"github": "jasonodoom",
							"email": "[email protected]"
						},
						{
							"name": "Jack Leightcap",
							"github": "jleightcap",
							"email": "[email protected]"
						}
					],
					"package_maintainers_set": [
						"Albert Chae",
						"Anish Lakhwara",
						"Dominic Mills",
						"Jason Odoom",
						"Jack Leightcap"
					],
					"package_description": "IPv6 multicast library",
					"package_longDescription": null,
					"package_hydra": null,
					"package_system": "x86_64-linux",
					"package_homepage": [
						"https://librecast.net/librecast.html"
					],
					"package_position": "pkgs/development/libraries/librecast/default.nix:24"
				},
				"sort": [
					94.32698,
					"librecast",
					""
				],
				"matched_queries": [
					"multi_match_librecast",
					"filter_packages"
				]
			},
			{
				"_index": "nixos-42-unstable-f1010e0469db743d14519a1efd37e23f8513d714",
				"_type": "_doc",
				"_id": "dM-dYY8BzICT7E5l9OfT",
				"_score": 16.595491,
				"_source": {
					"type": "package",
					"package_attr_name": "lcrq",
					"package_attr_set": "No package set",
					"package_pname": "lcrq",
					"package_pversion": "",
					"package_platforms": [
						"x86_64-netbsd",
						"m68k-netbsd",
						"armv6l-netbsd",
						"armv6l-linux",
						"riscv32-netbsd",
						"armv7a-darwin",
						"aarch64-netbsd",
						"microblazeel-linux",
						"i686-netbsd",
						"s390-linux",
						"i686-openbsd",
						"powerpc64le-linux",
						"loongarch64-linux",
						"mips64el-linux",
						"x86_64-darwin",
						"powerpc-netbsd",
						"x86_64-openbsd",
						"m68k-linux",
						"x86_64-linux",
						"riscv64-linux",
						"i686-linux",
						"armv7l-linux",
						"armv7l-netbsd",
						"armv7a-linux",
						"mips-linux",
						"aarch64-darwin",
						"mips64-linux",
						"mipsel-linux",
						"powerpc64-linux",
						"s390x-linux",
						"x86_64-solaris",
						"i686-freebsd",
						"x86_64-freebsd",
						"armv5tel-linux",
						"riscv32-linux",
						"riscv64-netbsd",
						"aarch64-linux",
						"i686-cygwin",
						"armv7a-netbsd",
						"mipsel-netbsd",
						"x86_64-cygwin",
						"x86_64-redox",
						"i686-darwin",
						"microblaze-linux"
					],
					"package_outputs": [
						"out"
					],
					"package_default_output": "out",
					"package_programs": [],
					"package_license": [
						{
							"url": "https://spdx.org/licenses/GPL-2.0.html",
							"fullName": "GNU General Public License v2.0"
						},
						{
							"url": "https://spdx.org/licenses/GPL-3.0.html",
							"fullName": "GNU General Public License v3.0"
						}
					],
					"package_license_set": [
						"GNU General Public License v2.0",
						"GNU General Public License v3.0"
					],
					"package_maintainers": [
						{
							"name": "Albert Chae",
							"github": "albertchae",
							"email": null
						},
						{
							"name": "Anish Lakhwara",
							"github": "Chickensoupwithrice",
							"email": null
						},
						{
							"name": "Dominic Mills",
							"github": "DMills27",
							"email": null
						},
						{
							"name": "Jason Odoom",
							"github": "jasonodoom",
							"email": "[email protected]"
						},
						{
							"name": "Jack Leightcap",
							"github": "jleightcap",
							"email": "[email protected]"
						}
					],
					"package_maintainers_set": [
						"Albert Chae",
						"Anish Lakhwara",
						"Dominic Mills",
						"Jason Odoom",
						"Jack Leightcap"
					],
					"package_description": "Librecast RaptorQ library.",
					"package_longDescription": null,
					"package_hydra": null,
					"package_system": "x86_64-linux",
					"package_homepage": [
						"https://librecast.net/lcrq.html"
					],
					"package_position": "pkgs/development/libraries/lcrq/default.nix:22"
				},
				"sort": [
					16.595491,
					"lcrq",
					""
				],
				"matched_queries": [
					"multi_match_librecast",
					"filter_packages"
				]
			},
			{
				"_index": "nixos-42-unstable-f1010e0469db743d14519a1efd37e23f8513d714",
				"_type": "_doc",
				"_id": "LdCeYY8BzICT7E5lNglJ",
				"_score": 15.243757,
				"_source": {
					"type": "package",
					"package_attr_name": "lcsync",
					"package_attr_set": "No package set",
					"package_pname": "lcsync",
					"package_pversion": "",
					"package_platforms": [
						"powerpc64-linux",
						"armv6l-linux",
						"mips64-linux",
						"x86_64-linux",
						"aarch64-linux",
						"armv7l-linux",
						"armv5tel-linux",
						"mips64el-linux",
						"s390x-linux",
						"mips-linux",
						"loongarch64-linux",
						"microblaze-linux",
						"riscv32-linux",
						"i686-linux",
						"m68k-linux",
						"armv7a-linux",
						"powerpc64le-linux",
						"s390-linux",
						"microblazeel-linux",
						"mipsel-linux",
						"riscv64-linux"
					],
					"package_outputs": [
						"out"
					],
					"package_default_output": "out",
					"package_programs": [
						"lcsync"
					],
					"package_license": [
						{
							"url": "https://spdx.org/licenses/GPL-2.0.html",
							"fullName": "GNU General Public License v2.0"
						},
						{
							"url": "https://spdx.org/licenses/GPL-3.0.html",
							"fullName": "GNU General Public License v3.0"
						}
					],
					"package_license_set": [
						"GNU General Public License v2.0",
						"GNU General Public License v3.0"
					],
					"package_maintainers": [
						{
							"name": "Albert Chae",
							"github": "albertchae",
							"email": null
						},
						{
							"name": "Anish Lakhwara",
							"github": "Chickensoupwithrice",
							"email": null
						},
						{
							"name": "Dominic Mills",
							"github": "DMills27",
							"email": null
						},
						{
							"name": "Jason Odoom",
							"github": "jasonodoom",
							"email": "[email protected]"
						},
						{
							"name": "Jack Leightcap",
							"github": "jleightcap",
							"email": "[email protected]"
						}
					],
					"package_maintainers_set": [
						"Albert Chae",
						"Anish Lakhwara",
						"Dominic Mills",
						"Jason Odoom",
						"Jack Leightcap"
					],
					"package_description": "Librecast File and Syncing Tool",
					"package_longDescription": null,
					"package_hydra": null,
					"package_system": "x86_64-linux",
					"package_homepage": [
						"https://librecast.net/lcsync.html"
					],
					"package_position": "pkgs/applications/networking/sync/lcsync/default.nix:27"
				},
				"sort": [
					15.243757,
					"lcsync",
					""
				],
				"matched_queries": [
					"multi_match_librecast",
					"filter_packages"
				]
			}
		]
	},
	"aggregations": {
		"all": {
			"doc_count": 133949,
			"package_attr_set": {
				"doc_count_error_upper_bound": 0,
				"sum_other_doc_count": 6520,
				"buckets": [
					{
						"key": "rPackages",
						"doc_count": 27369
					},
					{
						"key": "No package set",
						"doc_count": 18809
					},
					{
						"key": "haskellPackages",
						"doc_count": 17962
					},
					{
						"key": "python311Packages",
						"doc_count": 8247
					},
					{
						"key": "python312Packages",
						"doc_count": 8247
					},
					{
						"key": "emacsPackages",
						"doc_count": 6104
					},
					{
						"key": "sbclPackages",
						"doc_count": 4626
					},
					{
						"key": "texlivePackages",
						"doc_count": 4388
					},
					{
						"key": "linuxKernel",
						"doc_count": 2688
					},
					{
						"key": "perl536Packages",
						"doc_count": 1902
					},
					{
						"key": "perl538Packages",
						"doc_count": 1897
					},
					{
						"key": "vimPlugins",
						"doc_count": 1783
					},
					{
						"key": "ocamlPackages",
						"doc_count": 960
					},
					{
						"key": "home-assistant-component-tests",
						"doc_count": 822
					},
					{
						"key": "gnomeExtensions",
						"doc_count": 704
					},
					{
						"key": "chickenPackages_5",
						"doc_count": 571
					},
					{
						"key": "libsForQt5",
						"doc_count": 508
					},
					{
						"key": "kdePackages",
						"doc_count": 482
					},
					{
						"key": "rubyPackages_3_2",
						"doc_count": 382
					},
					{
						"key": "rubyPackages_3_3",
						"doc_count": 382
					}
				]
			},
			"package_maintainers_set": {
				"doc_count_error_upper_bound": 0,
				"sum_other_doc_count": 42549,
				"buckets": [
					{
						"key": "Michael Raskin",
						"doc_count": 5159
					},
					{
						"key": "Fabian Affolter",
						"doc_count": 4840
					},
					{
						"key": "Daniel Nagy",
						"doc_count": 4643
					},
					{
						"key": "Luke Gorrie",
						"doc_count": 4638
					},
					{
						"key": "Hraban Luyat",
						"doc_count": 4637
					},
					{
						"key": "Kasper Gałkowski",
						"doc_count": 4637
					},
					{
						"key": "Maksym Balatsko",
						"doc_count": 1498
					},
					{
						"key": "Martin Weinelt",
						"doc_count": 1270
					},
					{
						"key": "Jörg Thalheim",
						"doc_count": 1109
					},
					{
						"key": "Robert Schütz",
						"doc_count": 735
					},
					{
						"key": "Thomas Tuegel",
						"doc_count": 735
					},
					{
						"key": "Sandro Jäckel",
						"doc_count": 636
					},
					{
						"key": "Nick Cao",
						"doc_count": 634
					},
					{
						"key": "Aaron Andersen",
						"doc_count": 567
					},
					{
						"key": "Jonathan Ringer",
						"doc_count": 541
					},
					{
						"key": "Bobby Rong",
						"doc_count": 534
					},
					{
						"key": "Anderson Torres",
						"doc_count": 512
					},
					{
						"key": "Maximilian Bosch",
						"doc_count": 475
					},
					{
						"key": "figsoda",
						"doc_count": 455
					},
					{
						"key": "Lukas Epple",
						"doc_count": 433
					}
				]
			},
			"package_platforms": {
				"doc_count_error_upper_bound": 0,
				"sum_other_doc_count": 3775584,
				"buckets": [
					{
						"key": "x86_64-linux",
						"doc_count": 103367
					},
					{
						"key": "i686-linux",
						"doc_count": 101534
					},
					{
						"key": "aarch64-linux",
						"doc_count": 101449
					},
					{
						"key": "armv7l-linux",
						"doc_count": 100784
					},
					{
						"key": "armv6l-linux",
						"doc_count": 100708
					},
					{
						"key": "powerpc64le-linux",
						"doc_count": 100700
					},
					{
						"key": "riscv64-linux",
						"doc_count": 100624
					},
					{
						"key": "armv7a-linux",
						"doc_count": 100607
					},
					{
						"key": "armv5tel-linux",
						"doc_count": 100606
					},
					{
						"key": "powerpc64-linux",
						"doc_count": 100593
					},
					{
						"key": "mipsel-linux",
						"doc_count": 100560
					},
					{
						"key": "mips64el-linux",
						"doc_count": 100558
					},
					{
						"key": "riscv32-linux",
						"doc_count": 100558
					},
					{
						"key": "s390x-linux",
						"doc_count": 100555
					},
					{
						"key": "m68k-linux",
						"doc_count": 100511
					},
					{
						"key": "loongarch64-linux",
						"doc_count": 100406
					},
					{
						"key": "mips64-linux",
						"doc_count": 99334
					},
					{
						"key": "mips-linux",
						"doc_count": 99333
					},
					{
						"key": "microblazeel-linux",
						"doc_count": 99186
					},
					{
						"key": "s390-linux",
						"doc_count": 99184
					}
				]
			},
			"package_license_set": {
				"doc_count_error_upper_bound": 0,
				"sum_other_doc_count": 11225,
				"buckets": [
					{
						"key": "MIT License",
						"doc_count": 18254
					},
					{
						"key": "BSD 3-clause \"New\" or \"Revised\" License",
						"doc_count": 14404
					},
					{
						"key": "Apache License 2.0",
						"doc_count": 6887
					},
					{
						"key": "GNU General Public License v2.0 or later",
						"doc_count": 3973
					},
					{
						"key": "Artistic License 1.0",
						"doc_count": 3184
					},
					{
						"key": "GNU General Public License v1.0 or later",
						"doc_count": 3115
					},
					{
						"key": "LaTeX Project Public License v1.3c",
						"doc_count": 2978
					},
					{
						"key": "GNU General Public License v3.0 or later",
						"doc_count": 2757
					},
					{
						"key": "GNU General Public License v3.0 only",
						"doc_count": 2295
					},
					{
						"key": "GNU General Public License v2.0 only",
						"doc_count": 2247
					},
					{
						"key": "GNU General Public License v2.0",
						"doc_count": 1992
					},
					{
						"key": "BSD 2-clause \"Simplified\" License",
						"doc_count": 1723
					},
					{
						"key": "GNU General Public License v3.0",
						"doc_count": 1155
					},
					{
						"key": "Mozilla Public License 2.0",
						"doc_count": 1075
					},
					{
						"key": "GNU Lesser General Public License v2.1 or later",
						"doc_count": 1049
					},
					{
						"key": "Unfree",
						"doc_count": 851
					},
					{
						"key": "Public Domain",
						"doc_count": 788
					},
					{
						"key": "GNU Lesser General Public License v3.0 or later",
						"doc_count": 764
					},
					{
						"key": "MIT",
						"doc_count": 740
					},
					{
						"key": "Unspecified free software license",
						"doc_count": 736
					}
				]
			}
		},
		"package_attr_set": {
			"doc_count_error_upper_bound": 0,
			"sum_other_doc_count": 0,
			"buckets": [
				{
					"key": "No package set",
					"doc_count": 3
				}
			]
		},
		"package_maintainers_set": {
			"doc_count_error_upper_bound": 0,
			"sum_other_doc_count": 0,
			"buckets": [
				{
					"key": "Albert Chae",
					"doc_count": 3
				},
				{
					"key": "Anish Lakhwara",
					"doc_count": 3
				},
				{
					"key": "Dominic Mills",
					"doc_count": 3
				},
				{
					"key": "Jack Leightcap",
					"doc_count": 3
				},
				{
					"key": "Jason Odoom",
					"doc_count": 3
				}
			]
		},
		"package_platforms": {
			"doc_count_error_upper_bound": 0,
			"sum_other_doc_count": 26,
			"buckets": [
				{
					"key": "aarch64-linux",
					"doc_count": 3
				},
				{
					"key": "armv5tel-linux",
					"doc_count": 3
				},
				{
					"key": "armv6l-linux",
					"doc_count": 3
				},
				{
					"key": "armv7a-linux",
					"doc_count": 3
				},
				{
					"key": "armv7l-linux",
					"doc_count": 3
				},
				{
					"key": "i686-linux",
					"doc_count": 3
				},
				{
					"key": "loongarch64-linux",
					"doc_count": 3
				},
				{
					"key": "m68k-linux",
					"doc_count": 3
				},
				{
					"key": "microblaze-linux",
					"doc_count": 3
				},
				{
					"key": "microblazeel-linux",
					"doc_count": 3
				},
				{
					"key": "mips-linux",
					"doc_count": 3
				},
				{
					"key": "mips64-linux",
					"doc_count": 3
				},
				{
					"key": "mips64el-linux",
					"doc_count": 3
				},
				{
					"key": "mipsel-linux",
					"doc_count": 3
				},
				{
					"key": "powerpc64-linux",
					"doc_count": 3
				},
				{
					"key": "powerpc64le-linux",
					"doc_count": 3
				},
				{
					"key": "riscv32-linux",
					"doc_count": 3
				},
				{
					"key": "riscv64-linux",
					"doc_count": 3
				},
				{
					"key": "s390-linux",
					"doc_count": 3
				},
				{
					"key": "s390x-linux",
					"doc_count": 3
				}
			]
		},
		"package_license_set": {
			"doc_count_error_upper_bound": 0,
			"sum_other_doc_count": 0,
			"buckets": [
				{
					"key": "GNU General Public License v2.0",
					"doc_count": 3
				},
				{
					"key": "GNU General Public License v3.0",
					"doc_count": 3
				}
			]
		}
	}
}
@jopejoe1
Copy link
Member

jopejoe1 commented May 26, 2024

Those 3 packages can be fixed by replacing name with pname in the packaging file.

But that would not fix the root cause of the issue which is that derivations are not storing pname and version, but only name which is a string made from pname and version by default, and the data source that search and repology are using is trying to extract the version and pname from this string which does not always work cleanly.

See for example SP800-90B_EntropyAssessment where part of its pname gets mistaken as part of the version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants