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
31646def
You need to sign in or sign up before continuing.
Commit
31646def
authored
May 15, 2012
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add trans_rpmdeps_to_pkgname function for print out real package requires
parent
4781ff42
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
7 deletions
+42
-7
aptU
bin/aptU
+1
-5
alt
share/eterbuild/functions/alt
+32
-1
config
share/eterbuild/functions/config
+1
-1
test_cget_depends.sh
tests/test_cget_depends.sh
+8
-0
No files found.
bin/aptU
View file @
31646def
...
@@ -31,10 +31,6 @@ fi
...
@@ -31,10 +31,6 @@ fi
export
LC_ALL
=
C
export
LC_ALL
=
C
get_requires
()
{
rpm
--requires
$@
|
cut
-f1
-d
" "
|
sed
-e
"s|([A-Z].*||g"
|
sort
-u
}
# Translate rpm requires to package names
# Translate rpm requires to package names
rpmreqs_to_apt
()
rpmreqs_to_apt
()
...
@@ -74,7 +70,7 @@ install_packages()
...
@@ -74,7 +70,7 @@ install_packages()
docmd
$SUDO
apt-get
install
$LIST
docmd
$SUDO
apt-get
install
$LIST
ALREADYHANDLEDAPT
=
"
$ALREADYHANDLEDAPT
$LIST
"
ALREADYHANDLEDAPT
=
"
$ALREADYHANDLEDAPT
$LIST
"
REQLIST
=
"
$(
get_requires
$LIST
)
"
REQLIST
=
"
$(
get_r
pmpkg_r
equires
$LIST
)
"
REQLIST
=
$(
regexp_exclude_list
"
$ALREADYHANDLEDRPM
"
"
$REQLIST
"
)
REQLIST
=
$(
regexp_exclude_list
"
$ALREADYHANDLEDRPM
"
"
$REQLIST
"
)
test
-n
"
$REQLIST
"
||
{
echog
"There is no more req packages to install"
;
return
;
}
test
-n
"
$REQLIST
"
||
{
echog
"There is no more req packages to install"
;
return
;
}
...
...
share/eterbuild/functions/alt
View file @
31646def
#!/bin/bash
#!/bin/bash
# 2003-2008 Etersoft www.etersoft.ru
# 2003-2008
, 2012
Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
# Public domain
...
@@ -105,3 +105,34 @@ pkg_release_check()
...
@@ -105,3 +105,34 @@ pkg_release_check()
fi
fi
done
done
}
}
# copied from aptU
get_rpmpkg_requires
()
{
rpmquery
--requires
$@
|
cut
-f1
-d
" "
|
sed
-e
"s|([A-Z].*||g"
|
sort
-u
}
# Translate requires from local rpm package to package names (on local ALT Linux Sisyphus)
# FIXME: do not support x86_64 issues, use only with 32 bit packages
# Use test from tests/test_cget_depends.sh
trans_rpmdeps_to_pkgname
()
{
# partially copied from aptU
local
ALREADYHANDLEDAPT
=
"bash sh apt rpm filesystem alt-gpgkeys glibc-core glibc-locales"
local
ALREADYHANDLEDRPM
=
"rpmlib.* rtld libgcc_s
\.
.* libstdc
\+\+
.* libc
\.
so.* ld-linux
\.
so.* libpthread
\.
so.* librt
\.
so.*"
local
REQLIST
REQLIST
=
$(
get_rpmpkg_requires
-p
"
$1
"
)
REQLIST
=
$(
regexp_exclude_list
"
$ALREADYHANDLEDRPM
"
"
$REQLIST
"
)
# partially copied from aptU
VIRTREQ
=
$(
LANG
=
C apt-get
install
--print-uris
$REQLIST
2>&1 |
grep
"is a virtual package provided by"
|
cut
-f2
-d
" "
|
sort
-u
)
TRREALREQ
=
$(
LANG
=
C apt-get
install
--print-uris
$REQLIST
2>&1 |
grep
"^Selecting"
|
cut
-f2
-d
" "
|
sort
-u
)
for
ni
in
$REQLIST
$VIRTREQ
$TRREALREQ
;
do
# drop internal reqs (already converted via apt)
echo
$ni
|
grep
-q
"/"
&&
continue
echo
$ni
|
grep
-q
"
\.
so
\.
"
&&
continue
# extra words when run on x86_64
echo
$ni
|
sed
-e
"s/^i586-//g"
|
sed
-e
"s/
\.
32bit
$/
/g"
done
}
share/eterbuild/functions/config
View file @
31646def
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
# Public domain
ETERBUILDVERSION
=
196
ETERBUILDVERSION
=
2011
SUDO
=
"sudo"
SUDO
=
"sudo"
...
...
tests/test_cget_depends.sh
0 → 100755
View file @
31646def
#!/bin/sh
# load common functions, compatible with local and installed script
.
`
dirname
$0
`
/../share/eterbuild/functions/common
load_mod alt
testfile
=
$(
echo
/var/ftp/pub/Etersoft/RX@Etersoft/testing/CentOS/6/nxclient-
*
.i586.rpm
)
trans_rpmdeps_to_pkgname
$testfile
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