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
c4ee6403
Commit
c4ee6403
authored
Mar 25, 2014
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Plain Diff
backported to p7 as 1.5.2-alt0.M70P.1 (with rpmbph script)
parents
a1107eb8
b6bed3c3
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
66 additions
and
43 deletions
+66
-43
TODO
TODO
+1
-8
epm
bin/epm
+1
-1
epm-filelist
bin/epm-filelist
+8
-12
epm-provides
bin/epm-provides
+3
-1
epm-reinstall
bin/epm-reinstall
+2
-1
epm-requires
bin/epm-requires
+1
-1
epm-search_file
bin/epm-search_file
+7
-16
epm-sh-altlinux
bin/epm-sh-altlinux
+35
-0
check_code.sh
check_code.sh
+1
-1
eepm.spec
eepm.spec
+7
-2
No files found.
TODO
View file @
c4ee6403
Загрузку конфига
Проверить всё с кавычками
Неверно передаёт кавычки:
__separate_sudocmd()
А другие?
readlink -f — что делать и нужен ли
Нужен realfullpath
Установку пакета по URL
Использование | less теряет код возврата команды. Нужно сделать nobash решение, которое сохранит статус
Команда
...
...
bin/epm
View file @
c4ee6403
...
...
@@ -238,7 +238,7 @@ check_command()
simulate
)
# HELPCMD: simulate install with check requires
epm_cmd
=
simulate
;;
checkpkg|integrity
)
# HELPCMD: check package file integrity (checksum)
-V
|
checkpkg|integrity
)
# HELPCMD: check package file integrity (checksum)
epm_cmd
=
checkpkg
;;
...
...
bin/epm-filelist
View file @
c4ee6403
...
...
@@ -22,24 +22,20 @@ load_helper epm-query
# TODO: port or rewrite apt-file
# https://bugzilla.altlinux.org/show_bug.cgi?id=14449
# see also epm-search-file
local_content_filelist
()
__alt_
local_content_filelist
()
{
local
SYSARCH
SYSARCH
=
$(
uname
-m
)
[
"
$SYSARCH
"
=
"x86_64"
]
||
SYSARCH
=
i586
load_helper epm-sh-altlinux
local
REPODIR
=
/var/ftp/pub/ALTLinux/Sisyphus
local
CI
=
$REPODIR
/
$SYSARCH
/base/contents_index
local
CINOA
=
$REPODIR
/noarch/base/contents_index
local
CI
=
"
$(
get_local_alt_contents_index
)
"
# TODO: safe way to use less
#local OUTCMD="less"
#[ -n "$USETTY" ] || OUTCMD="cat"
OUTCMD
=
"cat"
test
-r
$CI
&&
test
-r
$CINOA
||
fatal
"Can't locate
$CI
or
$CINOA
"
{
[
-n
"
$USETTY
"
]
&&
echo
"Search in
$CI
and
$CINOA
for
$1
..."
grep
-h
--
".*
$1
$"
$CI
$CINOA
|
sed
-e
"s|
\(
.*
\)\t\(
.*
\)
|
\1
|g"
[
-n
"
$USETTY
"
]
&&
echo
"Search in
$CI
for
$1
..."
grep
-h
--
".*
$1
$"
$CI
|
sed
-e
"s|
\(
.*
\)\t\(
.*
\)
|
\1
|g"
}
|
$OUTCMD
}
...
...
@@ -51,7 +47,7 @@ __epm_filelist_remote()
case
$PMTYPE
in
apt-rpm
)
# TODO: use RESTful interface to prometeus? See ALT bug #29496
docmd_foreach local_content_filelist
$@
docmd_foreach
__alt_
local_content_filelist
$@
;;
*
)
fatal
"Query filelist for non installed packages does not realized"
...
...
bin/epm-provides
View file @
c4ee6403
...
...
@@ -23,7 +23,9 @@ epm_provides_files()
{
[
-n
"
$pkg_files
"
]
||
return
case
$(
get_package_type
$pkg_files
)
in
local
PKGTYPE
=
"
$(
get_package_type
$pkg_files
)
"
case
$PKGTYPE
in
rpm
)
docmd rpm
-q
--provides
-p
$pkg_files
;;
...
...
bin/epm-reinstall
View file @
c4ee6403
...
...
@@ -25,7 +25,8 @@ epm_reinstall_names()
[
-n
"
$1
"
]
||
return
case
$PMTYPE
in
apt-rpm|apt-dpkg
)
sudocmd apt-get
--reinstall
install
$@
local
APTOPTIONS
=
"
$(
subst_option non_interactive
-y
)
"
sudocmd apt-get
--reinstall
$APTOPTIONS
install
$@
return
;;
aptitude-dpkg
)
sudocmd aptitude reinstall
$@
...
...
bin/epm-requires
View file @
c4ee6403
...
...
@@ -23,7 +23,7 @@ epm_requires_files()
{
[
-n
"
$pkg_files
"
]
||
return
local
PKGTYPE
=
"
$(
case
$(
get_package_type
$pkg_files
)
)
"
local
PKGTYPE
=
"
$(
get_package_type
$pkg_files
)
"
case
"
$PKGTYPE
"
in
rpm
)
...
...
bin/epm-search_file
View file @
c4ee6403
...
...
@@ -17,28 +17,19 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# TODO: port or rewrite apt-file
# https://bugzilla.altlinux.org/show_bug.cgi?id=14449
local_content_search
()
__alt_local_content_search
()
{
# TODO: use global get_sysarch function
local
SYSARCH
SYSARCH
=
$(
uname
-m
)
[
"
$SYSARCH
"
=
"x86_64"
]
||
SYSARCH
=
i586
load_helper epm-sh-altlinux
local
CI
=
"
$(
get_local_alt_contents_index
)
"
# FIXME: use config or/and web url
local
REPODIR
=
/var/ftp/pub/ALTLinux/Sisyphus
local
CI
=
$REPODIR
/
$SYSARCH
/base/contents_index
local
CINOA
=
$REPODIR
/noarch/base/contents_index
#local OUTCMD="less"
#[ -n "$USETTY" ] || OUTCMD="cat"
OUTCMD
=
"cat"
test
-r
$CI
&&
test
-r
$CINOA
||
fatal
"Can't locate
$CI
or
$CINOA
"
{
[
-n
"
$USETTY
"
]
&&
echo
"Search in
$CI
and
$CINOA
for
$1
..."
grep
-h
--
".*
$1
.*
\t
"
$CI
$CINOA
|
sed
-e
"s|
\(
.*
\)\t\(
.*
\)
|
\2
:
\1
|g"
[
-n
"
$USETTY
"
]
&&
echo
"Search in
$CI
for
$1
..."
grep
-h
--
".*
$1
.*
\t
"
$CI
|
sed
-e
"s|
\(
.*
\)\t\(
.*
\)
|
\2
:
\1
|g"
}
|
$OUTCMD
}
...
...
@@ -49,7 +40,7 @@ epm_search_file()
case
$PMTYPE
in
apt-rpm
)
local_content_search
$pkg_filenames
__alt_
local_content_search
$pkg_filenames
return
;;
apt-dpkg|aptitude-dpkg
)
assure_exists apt-file
...
...
bin/epm-sh-altlinux
0 → 100644
View file @
c4ee6403
#!/bin/sh
#
# Copyright (C) 2014 Etersoft
# Copyright (C) 2014 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# TODO: port or rewrite apt-file
# https://bugzilla.altlinux.org/show_bug.cgi?id=14449
get_local_alt_contents_index
()
{
load_helper epm-repolist
epm_repolist |
grep
"rpm file:/"
|
sed
-e
"s|^rpm file:||g"
|
while
read
URL ARCH other
;
do
test
-d
"
$URL
/
$ARCH
"
||
continue
# fatal "Local mirror is not accessible via $URL/$ARCH"
FILE
=
"
$URL
/
$ARCH
/base/contents_index"
if
[
-r
"
$FILE
"
]
;
then
echo
"
$FILE
"
else
info
"TODO for girar server: There is no
$(
basename
$FILE
)
file in
$(
dirname
$FILE
)
"
fi
done
}
check_code.sh
View file @
c4ee6403
...
...
@@ -4,4 +4,4 @@
# https://wiki.ubuntu.com/DashAsBinSh
checkbashisms
-f
bin/
*
checkbashisms
-f
Makefile
eepm.spec
checkbashisms
-f
Makefile
eepm.spec
View file @
c4ee6403
# This spec is backported to ALTLinux p7 automatically by rpmbph script. Do not edit it.
#
Name: eepm
Version: 1.5.
1
Version: 1.5.
2
Release: alt0.M70P.1
Summary: Etersoft EPM package manager
...
...
@@ -66,9 +66,14 @@ chmod a+x %buildroot%_datadir/%name/{serv-,epm-}*
%_sysconfdir/bash_completion.d/cerv
%changelog
*
Wed Mar 05 2014 Vitaly Lipatov <lav@altlinux.ru> 1.5.1
-alt0.M70P.1
*
Tue Mar 25 2014 Vitaly Lipatov <lav@altlinux.ru> 1.5.2
-alt0.M70P.1
- backport to ALTLinux p7 (by rpmbph script)
* Tue Mar 25 2014 Vitaly Lipatov <lav@altlinux.ru> 1.5.2-alt1
- use repolist for get local repo path
- support --auto for reinstall
- epm-requires: fix typo
* Wed Mar 05 2014 Vitaly Lipatov <lav@altlinux.ru> 1.5.1-alt1
- epm: check real file detection
- checkpkg: use assure for erc
...
...
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