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
0
Merge Requests
0
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
Roman Alifanov
etersoft-build-utils
Commits
6b9b492b
Commit
6b9b492b
authored
Feb 07, 2026
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmgp: fix -a -d to download only once from first match
parent
527aceca
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
22 deletions
+15
-22
rpmgp
bin/rpmgp
+15
-22
No files found.
bin/rpmgp
View file @
6b9b492b
...
...
@@ -83,26 +83,6 @@ search_repology()
return
0
}
# Try to download src.rpm found via Repology by searching in local cached lists
# Usage: download_repology_pkg PKGNAME
download_repology_pkg
()
{
local
SPKGNAME
=
"
$1
"
local
found
=
for
((
i
=
0
;
i <
${#
SYSNAME
[*]
}
;
i++
))
;
do
local
SYS
=
${
SYSNAME
[
$i
]
}
local
URL
=
${
SYSURL
[
$i
]
}
local
CLIST
=
"
$OURTMPDIR
/etersoft-build-utils/rpmgpall-
$SYS
"
[
-f
"
$CLIST
"
]
||
continue
local
MATCH
=
$(
grep
-i
"
$SPKGNAME
"
"
$CLIST
"
|
head
-1
)
[
-n
"
$MATCH
"
]
||
continue
echo
"Downloading
$MATCH
from
$SYS
..."
download_url
"
$URL
/
$MATCH
"
found
=
1
break
done
[
-n
"
$found
"
]
||
echo
"No cached list has a matching src.rpm for download. Run rpmgp -r first."
}
get_git_list
()
{
...
...
@@ -555,6 +535,11 @@ fi
if
[
-n
"
$ALLSYSTEM
"
]
;
then
#info "Note: you can use whohas also"
NFLAG
=
FIRST_DOWNLOAD_URL
=
FIRST_DOWNLOAD_FILE
=
# disable download inside check_system, we download once at the end
SAVEDDOWNLOADALL
=
"
$DOWNLOADALL
"
DOWNLOADALL
=
load_systems_list
# search through all cached systems
for
((
i
=
0
;
i <
${#
SYSNAME
[*]
}
;
i++
))
;
do
...
...
@@ -563,8 +548,14 @@ if [ -n "$ALLSYSTEM" ] ; then
echo
echo
"List for
${
SYSNAME
[
$i
]
}
:"
print_list
$NLIST
# remember first match for download
if
[
-n
"
$SAVEDDOWNLOADALL
"
]
&&
[
-z
"
$FIRST_DOWNLOAD_URL
"
]
;
then
FIRST_DOWNLOAD_URL
=
"
${
SYSURL
[
$i
]
}
"
FIRST_DOWNLOAD_FILE
=
"
$(
echo
"
$NLIST
"
|
head
-1
)
"
fi
NFLAG
=
1
done
DOWNLOADALL
=
"
$SAVEDDOWNLOADALL
"
# search via Repology API (broader coverage)
if
search_repology
"
$PKGNAME
"
;
then
NFLAG
=
1
...
...
@@ -572,8 +563,10 @@ if [ -n "$ALLSYSTEM" ] ; then
if
[
-z
"
$NFLAG
"
]
;
then
echo
"No search result for
$PKGNAME
. Check rpmgp -s for list of all systems."
fi
if
[
-n
"
$DOWNLOADALL
"
]
&&
[
-n
"
$NFLAG
"
]
;
then
download_repology_pkg
"
$PKGNAME
"
if
[
-n
"
$DOWNLOADALL
"
]
&&
[
-n
"
$FIRST_DOWNLOAD_URL
"
]
;
then
echo
echo
"Downloading
$FIRST_DOWNLOAD_FILE
..."
download_url
"
$FIRST_DOWNLOAD_URL
/
$FIRST_DOWNLOAD_FILE
"
fi
exit
0
fi
...
...
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