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
9acafb57
Commit
9acafb57
authored
Apr 10, 2010
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aptU: small refactoring
parent
15fe619b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
aptU
bin/aptU
+11
-6
No files found.
bin/aptU
View file @
9acafb57
...
...
@@ -33,6 +33,13 @@ get_requires()
rpm
--requires
$@
|
grep
-v
rpmlib |
cut
-f1
-d
" "
|
sort
-u
}
# Translate rpm requires to package names
rpmreqs_to_apt
()
{
local
REQLIST
=
"
$@
"
local
PACKAGES
=
`
$SUDO
apt-get
install
--print-uris
$REQLIST
|
grep
"is already the newest version"
|
cut
-f1
-d
" "
|
sort
-u
`
do_exclude_list
"
$ALREADYHANDLEDAPT
"
"
$PACKAGES
"
}
install_by_requires
()
{
...
...
@@ -51,7 +58,7 @@ install_by_requires()
RLIST
=
$(
do_exclude_list
"
$SKIPPACKAGES
"
"
$RLIST
"
)
install_by_requires
"
$RLIST
"
fi
}
}
ALREADYHANDLEDAPT
=
"bash sh apt rpm glibc-core glibc-locales glibc-preinstall filesystem alt-gpgkeys"
ALREADYHANDLEDRPM
=
""
...
...
@@ -60,21 +67,19 @@ install_packages()
local
ERROR
=
local
LIST
=
"
$@
"
test
-n
"
$LIST
"
||
{
echog
"There is no more packages to install"
;
return
;
}
echo
"Install
$LIST
"
$SUDO
apt-get
install
$LIST
ALREADYHANDLEDAPT
=
"
$ALREADYHANDLEDAPT
$LIST
"
REQLIST
=
"
$(
get_requires
$LIST
)
"
REQLIST
=
$(
do_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
;
}
install_by_requires
$REQLIST
ALREADYHANDLEDRPM
=
"
$ALREADYHANDLEDRPM
$REQLIST
"
echog
"Translate rpm requires to package names..."
PACKAGES
=
`
$SUDO
apt-get
install
--print-uris
$REQLIST
|
grep
"is already the newest version"
|
cut
-f1
-d
" "
|
sort
-u
`
PACKAGES
=
$(
do_exclude_list
"
$ALREADYHANDLEDAPT
"
"
$PACKAGES
"
)
install_packages
$PACKAGES
install_packages
$(
rpmreqs_to_apt
$REQLIST
)
}
install_packages
$@
...
...
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