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
ce3d23e4
Commit
ce3d23e4
authored
May 21, 2012
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
repl: fix replacement list order
parent
3da62cf5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
13 deletions
+22
-13
repl
share/eterbuild/functions/repl
+5
-3
test_repl_find.sh
tests/test_repl_find.sh
+17
-10
No files found.
share/eterbuild/functions/repl
View file @
ce3d23e4
...
...
@@ -80,6 +80,8 @@ print_grpreq()
eval_spec
${
1
}
|
grep
"^Group"
|
sed
-e
"s|^.*:||g"
|
sort
-u
| filter_strip_spaces
}
# FIXME: need improvement
# use tests/test_repl_find.sh for test it
# PKGVENDOR, PKGFORMAT, DISTRVERSION is already defined in detect_target_env() func
internal_repl_list
()
{
...
...
@@ -91,7 +93,7 @@ internal_repl_list()
# Hack for sort by last numbers: sort -n -t . -k 3
(
ls
-1
$PKGREPLBASE
/pkgrepl.
$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
sort
-u
|
sort
-n
-t
.
-k
3 |
grep
"^
$FINDPKG
\$
"
-B1000
|
sort
-r
-n
-t
.
-k
3
echo
$REPLBASE
.
$PKGVENDOR$ARCHEXT
[
"
$PKGVENDOR
"
=
"alt"
]
||
echo
"
$REPLBASE
.
$PKGFORMAT$ARCHEXT
"
}
...
...
@@ -101,11 +103,11 @@ print_replbased_list()
{
local
REPLBASE
=
"
$1
"
if
[
"
$BUILDARCH
"
=
"x86_64"
]
;
then
internal_repl_list
$REPLBASE
.x86_64
internal_repl_list
$REPLBASE
.x86_64
|
uniq
fi
# general rules listing
internal_repl_list
$REPLBASE
""
internal_repl_list
$REPLBASE
""
|
uniq
}
# TODO: list in alph. order and use if <= then our version
...
...
tests/test_repl_find.sh
View file @
ce3d23e4
...
...
@@ -31,8 +31,8 @@ for i in `print_grprepl_list` ; do
done
}
VENDOR
=
fedora
TARGE
T
=
rpm
PKG
VENDOR
=
fedora
PKGFORMA
T
=
rpm
DISTRVERSION
=
10
echo
"PkgRepl:"
...
...
@@ -49,24 +49,31 @@ check_repl()
check
$1
"
`
print_replace
$1
`
"
$2
}
echo
"Correct replacement checking for
$
VENDOR
/
$DISTRVERSION
(target
$TARGE
T
):"
echo
"Correct replacement checking for
$
PKGVENDOR
/
$DISTRVERSION
(target
$PKGFORMA
T
):"
check_repl rpm-build-compat rpm-build-altlinux-compat
check_repl libusb-devel libusb-devel
VENDOR
=
ubuntu
TARGET
=
deb
DISTRVERSION
=
9.04
PKGVENDOR
=
ubuntu
PKGFORMAT
=
deb
DISTRVERSION
=
11.04
echo
"Correct replacement checking for
$PKGVENDOR
/
$DISTRVERSION
(target
$PKGFORMAT
):"
print_pkgrepl_list
echo
"Correct replacement checking for
$VENDOR
/
$DISTRVERSION
(target
$TARGET
):"
check_repl rpm-build-compat rpm-build-altlinux-compat
check_repl libusb-devel libusb-dev
VENDOR
=
mdv
PKGVENDOR
=
mdv
DISTRVERSION
=
2010.1
DEFAULT
ARCH
=
x86_64
TARGE
T
=
rpm
BUILD
ARCH
=
x86_64
PKGFORMA
T
=
rpm
#FINDPKG=$PKGREPLBASE.pkgrepl.$VENDOR.$DISTRVERSION
#( ls -1 $PKGREPLBASE/pkgrepl.$VENDOR* | grep -v x86_64 ; echo $FINDPKG ) | sort -u | grep "^$FINDPKG\$" -B1000 | sort -r
echo
echo
"Correct replacement checking for
$PKGVENDOR
/
$DISTRVERSION
(target
$PKGFORMAT
):"
print_pkgrepl_list
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