Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
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
etersoft
eepm
Commits
b266ad97
Commit
b266ad97
authored
Oct 18, 2017
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add support for ALT girar task number to install/remove, improve addrepo/removerepo
parent
c197323d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
48 additions
and
14 deletions
+48
-14
TODO
TODO
+0
-4
epm-addrepo
bin/epm-addrepo
+12
-4
epm-install
bin/epm-install
+9
-2
epm-remove
bin/epm-remove
+11
-2
epm-removerepo
bin/epm-removerepo
+4
-2
epm-sh-altlinux
bin/epm-sh-altlinux
+6
-0
epm-sh-functions
bin/epm-sh-functions
+6
-0
No files found.
TODO
View file @
b266ad97
epm install таск
epm remove таск (и reporepo)
packages list таск
аналог epm purge: запоминаем список файлов, удаляем пакеты и по возможности всё, от чего зависит (рекурсивно).
--interactive
...
...
bin/epm-addrepo
View file @
b266ad97
...
...
@@ -17,6 +17,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
load_helper epm-sh-altlinux
epm_addrepo
()
{
local
repo
=
"
$(
eval echo
"
$quoted_args
"
)
"
...
...
@@ -25,7 +27,7 @@ case $DISTRNAME in
ALTLinux
)
case
"
$repo
"
in
etersoft
)
info
"add
etersoft
repo"
info
"add
Etersoft's addon
repo"
load_helper epm-query
epm
install
--skip-installed
apt-conf-etersoft-common apt-conf-etersoft-hold
||
fatal
local
branch
=
"
$DISTRVERSION
/branch"
...
...
@@ -34,6 +36,7 @@ case $DISTRNAME in
[
-n
"
$DISTRVERSION
"
]
||
fatal
"Empty DISTRVERSION"
local arch
=
$(
uname
-m
)
[
"
$arch
"
=
"i686"
]
&&
arch
=
"i586"
# TODO: use apt-repo add ?
echo
""
| sudocmd
tee
-a
/etc/apt/sources.list
echo
"# added with eepm addrepo etersoft"
| sudocmd
tee
-a
/etc/apt/sources.list
echo
"rpm [etersoft] http://download.etersoft.ru/pub/Etersoft LINUX@Etersoft/
$branch
/
$arch
addon"
| sudocmd
tee
-a
/etc/apt/sources.list
...
...
@@ -50,13 +53,18 @@ case $DISTRNAME in
esac
assure_exists apt-repo
if
tasknumber
"
$repo
"
>
/dev/null
;
then
sudocmd apt-repo add
$(
tasknumber
"
$repo
"
)
return
fi
if
[
-z
"
$repo
"
]
;
then
info
"Add branch repo. TODO?"
docmd apt-repo add branch
echo
"etersoft"
return
fi
# note: drop #
sudocmd apt-repo add
"
${
repo
/\#/
}
"
return
;;
esac
...
...
bin/epm-install
View file @
b266ad97
#!/bin/sh
#
# Copyright (C) 2012-201
6
Etersoft
# Copyright (C) 2012-201
6
Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012-201
7
Etersoft
# Copyright (C) 2012-201
7
Vitaly Lipatov <lav@etersoft.ru>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
...
...
@@ -17,6 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
load_helper epm-sh-altlinux
load_helper epm-query
load_helper epm-assure
load_helper epm-check_updated_repo
...
...
@@ -565,6 +566,12 @@ epm_print_install_names_command()
epm_install
()
{
if
tasknumber
"
$pkg_names
"
>
/dev/null
;
then
assure_exists apt-repo
sudocmd apt-repo
test
$(
tasknumber
"
$pkg_names
"
)
return
fi
if
[
-n
"
$show_command_only
"
]
;
then
epm_print_install_command
$pkg_files
epm_print_install_names_command
$pkg_names
...
...
bin/epm-remove
View file @
b266ad97
#!/bin/sh
#
# Copyright (C) 2012-2014, 2016 Etersoft
# Copyright (C) 2012-2014, 2016 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012-2014, 2016
, 2017
Etersoft
# Copyright (C) 2012-2014, 2016
, 2017
Vitaly Lipatov <lav@etersoft.ru>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
...
...
@@ -17,6 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
load_helper epm-sh-altlinux
load_helper epm-query
load_helper epm-print
...
...
@@ -230,6 +231,14 @@ epm_remove()
return
fi
local
tn
=
$(
tasknumber
"
$pkg_names
"
)
if
[
-n
"
$tn
"
]
;
then
assure_exists apt-repo
pkg_names
=
$(
showcmd apt-repo list
$tn
)
#docmd epm remove $dryrun
return
fi
# get full package name(s) from the package file(s)
[
-n
"
$pkg_files
"
]
&&
pkg_names
=
"
$pkg_names
$(
epm query
$pkg_files
)
"
...
...
bin/epm-removerepo
View file @
b266ad97
...
...
@@ -17,6 +17,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
load_helper epm-sh-altlinux
epm_removerepo
()
{
local
repo
=
"
$(
eval echo
$quoted_args
)
"
...
...
@@ -31,8 +33,8 @@ case $DISTRNAME in
;;
esac
if
!
echo
"
$repo
"
|
grep
-q
-v
"[0-9]*"
;
then
repo
=
"
$(
epm repolist |
grep
"repo/
$
repo
"
| line
)
"
if
tasknumber
"
$repo
"
>
/dev/null
;
then
repo
=
"
$(
epm repolist |
grep
"repo/
$
(
tasknumber
$repo
)
"
| line
)
"
fi
assure_exists apt-repo
...
...
bin/epm-sh-altlinux
View file @
b266ad97
...
...
@@ -115,3 +115,9 @@ get_local_alt_contents_index()
done
}
tasknumber
()
{
local
num
=
"
${
*/\#/
}
"
isnumber
"
$num
"
&&
echo
"
$num
"
}
bin/epm-sh-functions
View file @
b266ad97
...
...
@@ -174,6 +174,12 @@ get_lastarg()
echon
"
$lastarg
"
}
# TODO: see etersoft-build-utils/tests/test_isnumber.sh
isnumber
()
{
echo
"
$*
"
| filter_strip_spaces |
grep
-q
"^[0-9]
\+
$"
}
filter_strip_spaces
()
{
# possible use just
...
...
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