Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
korinf
etersoft-build-utils
Commits
e1f9ccad
Commit
e1f9ccad
authored
Feb 07, 2026
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmgp: use substring search in Repology API
parent
ed7637d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
rpmgp
bin/rpmgp
+5
-5
No files found.
bin/rpmgp
View file @
e1f9ccad
...
...
@@ -54,12 +54,12 @@ list_filter()
sed
-e
"s|.src.rpm
$|
|g"
}
# Search package in Repology API
# Search package in Repology API
(substring search)
# Usage: search_repology PKGNAME
search_repology
()
{
local
SPKGNAME
=
"
$1
"
local
REPOLOGY_URL
=
"https://repology.org/api/v1/project
/
$SPKGNAME
"
local
REPOLOGY_URL
=
"https://repology.org/api/v1/project
s/?search=
$SPKGNAME
"
local
TMPJSON
=
"
$OURTMPDIR
/etersoft-build-utils/repology.json"
mkdir
-p
"
$OURTMPDIR
/etersoft-build-utils/"
eget
-q
-O
"
$TMPJSON
"
"
$REPOLOGY_URL
"
2>/dev/null
||
return
1
...
...
@@ -68,13 +68,13 @@ search_repology()
jq empty
"
$TMPJSON
"
2>/dev/null
||
{
rm
-f
"
$TMPJSON
"
;
return
1
;
}
local
RESULTS
# filter to rpm-based and major distros only
RESULTS
=
$(
jq
-r
'
.[] | select(.repo | test("^(alt|fedora|epel|elrepo|rosa|mageia|openmandriva|opensuse|suse|pld|centos|rhel|scientific|oracle|rocky|alma|amazon|pclinuxos)")) |
.repo + "\t" + (.srcname // .binname // .name) + "\t" + (.origversion // .version) + "\t" + .status'
"
$TMPJSON
"
|
sort
-u
)
RESULTS
=
$(
jq
-r
'
to_entries[] | .key as $proj | .value[] | select(.repo | test("^(alt|fedora|epel|elrepo|rosa|mageia|openmandriva|opensuse|suse|pld|centos|rhel|scientific|oracle|rocky|alma|amazon|pclinuxos)")) | $proj + "\t" +
.repo + "\t" + (.srcname // .binname // .name) + "\t" + (.origversion // .version) + "\t" + .status'
"
$TMPJSON
"
|
sort
-u
)
rm
-f
"
$TMPJSON
"
[
-n
"
$RESULTS
"
]
||
return
1
echo
echo
"Repology results for '
$SPKGNAME
':"
echo
"
$RESULTS
"
|
while
IFS
=
' '
read
-r
repo srcname version status
;
do
printf
" %-
30s %-30s %s (%s)
\n
"
"
$repo
"
"
$srcname
-
$version
"
"
$version
"
"
$status
"
echo
"
$RESULTS
"
|
while
IFS
=
' '
read
-r
proj
repo srcname version status
;
do
printf
" %-
25s %-25s %-25s %s (%s)
\n
"
"
$proj
"
"
$repo
"
"
$srcname
-
$version
"
"
$version
"
"
$status
"
done
return
0
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment