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
korinf
etersoft-build-utils
Commits
b9fdd51d
Commit
b9fdd51d
authored
Feb 04, 2022
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
repl: rewrite internal_repl_list to support major only versions and fix sorted order
parent
074afbf7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
8 deletions
+50
-8
repl
share/eterbuild/functions/repl
+27
-6
test_repl_find.sh
tests/test_repl_find.sh
+23
-2
No files found.
share/eterbuild/functions/repl
View file @
b9fdd51d
...
...
@@ -190,12 +190,33 @@ internal_repl_list()
local
REPLBASE
=
"
$1
"
local
ARCHEXT
=
"
$2
"
local
FINDPKG
=
$REPLBASE
.
$PKGVENDOR
.
$DISTRVERSION$ARCHEXT
# sure we use our version firstly
echo
$FINDPKG
# Hack for sort by last numbers: sort -n -t . -k 3
(
ls
-1
$REPLBASE
.
$PKGVENDOR
*
$ARCHEXT
2>/dev/null |
\
(
test
-n
"
$ARCHEXT
"
&&
grep
-v
"
$PKGVENDOR$ARCHEXT
\$
"
||
grep
-v
"x86_64"
)
;
echo
$FINDPKG
)
|
\
sort
-u
|
sort
-n
-t
.
-k
3 |
grep
"^
$FINDPKG
\$
"
-B1000
|
sort
-r
-n
-t
.
-k
3
local
FINDPKGVERS
=
''
local
FINDPKGGREP
=
$FINDPKG
# 7.3 -> 7, 20.04 -> 20
local
BASEDISTRVERSION
=
${
DISTRVERSION
/\.*/
}
if
[
"
$DISTRVERSION
"
!=
"
$BASEDISTRVERSION
"
]
;
then
FINDPKGVERS
=
"
$REPLBASE
.
$PKGVENDOR
.
$BASEDISTRVERSION$ARCHEXT
"
FINDPKGGREP
=
"
$FINDPKGVERS
"
fi
if
[
-n
"
$ARCHEXT
"
]
;
then
(
# sure we use our version firstly
echo
$FINDPKG
echo
$FINDPKGVERS
ls
-1
$REPLBASE
.
$PKGVENDOR
*
$ARCHEXT
2>/dev/null |
grep
-v
"
$PKGVENDOR$ARCHEXT
\$
"
)
|
grep
-v
"^
\$
"
|
sed
-e
"s|
$ARCHEXT
\$
||"
|
\
sort
-u
|
sort
-r
-t
.
-k
3 |
sed
-e
"s|
$|$ARCHEXT
|"
else
(
# sure we use our version firstly
echo
$FINDPKG
echo
$FINDPKGVERS
# skip all arches
ls
-1
$REPLBASE
.
$PKGVENDOR
*
2>/dev/null |
grep
-v
"
\.
x86_64
\$
"
|
grep
-v
"
\.
aarch64
\$
"
|
grep
-v
"
\.
x86_64-i586
\$
"
)
|
grep
-v
"^
\$
"
|
\
sort
-u
|
sort
-r
-t
.
-k
3
fi
echo
$REPLBASE
.
$PKGVENDOR$ARCHEXT
[
"
$PKGVENDOR
"
=
"alt"
]
||
echo
"
$REPLBASE
.
$PKGFORMAT$ARCHEXT
"
}
...
...
tests/test_repl_find.sh
View file @
b9fdd51d
...
...
@@ -36,7 +36,26 @@ check_repl()
check
"
$1
"
"
`
print_replace
$1
`
"
"
$2
"
}
# global
############################# RedOS ##########################
BUILDNAME
=
nx-libs
DISTRNAME
=
RedOS
PKGVENDOR
=
redos
DISTRVERSION
=
7.3
BUILDARCH
=
x86_64
#BUILDARCH=i586
PKGFORMAT
=
rpm
echo
echo
"Replacement files for
$PKGVENDOR
/
$DISTRVERSION
(target
$PKGFORMAT
):"
print_pkgrepl_list
check_repl libpixman-devel
"pixman-devel"
############################ Ubuntu ###########################
BUILDNAME
=
wine
...
...
@@ -55,6 +74,7 @@ check_repl libusb-devel libusb-1.0-0-dev
check_repl libstdc++ libstdc++
check_repl perl-podlators perl
# Mandriva
DISTRNAME
=
Mandriva
PKGVENDOR
=
mdv
...
...
@@ -213,7 +233,7 @@ check_repl pkg-config "pkgconfig"
############################# ROSA ##########################
BUILDNAME
=
wine
DISTRNAME
=
r
osa
DISTRNAME
=
R
osa
PKGVENDOR
=
rosa
DISTRVERSION
=
2014
BUILDARCH
=
x86_64
...
...
@@ -225,3 +245,4 @@ echo "Replacement files for $PKGVENDOR/$DISTRVERSION (target $PKGFORMAT):"
print_pkgrepl_list
check_repl libicu-devel
"lib64icu-devel"
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