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
df821445
Commit
df821445
authored
May 23, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm filelist/search-file: move content index update to epm update
parent
94f1e3bd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
20 deletions
+52
-20
epm-filelist
bin/epm-filelist
+2
-1
epm-search_file
bin/epm-search_file
+9
-3
epm-sh-altlinux-contents-index
bin/epm-sh-altlinux-contents-index
+17
-13
epm-update
bin/epm-update
+24
-3
No files found.
bin/epm-filelist
View file @
df821445
...
...
@@ -29,7 +29,8 @@ __alt_local_content_filelist()
load_helper epm-sh-altlinux
load_helper epm-sh-altlinux-contents-index
update_alt_contents_index
check_alt_contents_index
||
init_alt_contents_index
update_repo_if_needed
local
CI
=
"
$(
cat
$ALT_CONTENTS_INDEX_LIST
)
"
# TODO: safe way to use less or bat
...
...
bin/epm-search_file
View file @
df821445
...
...
@@ -32,7 +32,9 @@ __alt_local_content_search()
load_helper epm-sh-altlinux-contents-index
load_helper epm-search
update_alt_contents_index
check_alt_contents_index
||
init_alt_contents_index
update_repo_if_needed
local
CI
=
"
$(
cat
$ALT_CONTENTS_INDEX_LIST
)
"
info
"Searching for
$1
... "
...
...
@@ -49,11 +51,15 @@ epm_search_file()
local
CMD
[
-n
"
$pkg_filenames
"
]
||
fatal
"Search file: file name is missed"
case
$
PMTYP
E
in
apt-rpm
)
case
$
BASEDISTRNAM
E
in
"alt"
)
__alt_local_content_search
$pkg_filenames
return
;;
esac
case
$PMTYPE
in
apt-dpkg|aptitude-dpkg
)
# move to update?
assure_exists apt-file
sudocmd apt-file update
docmd apt-file search
$pkg_filenames
...
...
bin/epm-sh-altlinux-contents-index
View file @
df821445
...
...
@@ -38,14 +38,10 @@ get_alt_repo_path()
# convert "http://download.etersoft.ru/pub/ALTLinux/p8/branch x86_64" to /tmp/epm/ALTLinux/p8/branch/x86_64
get_local_alt_mirror_path
()
{
# FIXME: by some reason missed in ALT docker image (no login?)
[
-n
"
$TMPDIR
"
]
||
TMPDIR
=
/tmp
# TODO: /var/cache/eepm
echo
"
$TMPDIR
/eepm/
$(
get_alt_repo_path
"
$1
"
)
"
echo
"
$epm_cachedir
/contents_index/
$(
get_alt_repo_path
"
$1
"
)
"
}
ALT_CONTENTS_INDEX_LIST
=
$
TMPDIR
/eepm
/contents_index_list
ALT_CONTENTS_INDEX_LIST
=
$
epm_cachedir
/contents_index
/contents_index_list
# URL TARGETDIR OPTIONS
rsync_alt_contents_index
()
...
...
@@ -71,12 +67,6 @@ get_url_to_etersoft_mirror()
echo
"
$ETERSOFT_MIRROR
/
$(
get_alt_repo_path
"
$1
"
|
sed
-e
"s|^ALTLinux/|ALTLinux/contents_index/|"
)
"
}
__init_contents_index_list
()
{
mkdir
-p
"
$(
dirname
$ALT_CONTENTS_INDEX_LIST
)
"
truncate
-s0
$ALT_CONTENTS_INDEX_LIST
}
# "comment" "file"
__add_to_contents_index_list
()
{
...
...
@@ -96,11 +86,25 @@ __add_better_to_contents_index_list()
}
check_alt_contents_index
()
{
[
-f
"
$ALT_CONTENTS_INDEX_LIST
"
]
}
init_alt_contents_index
()
{
sudocmd
mkdir
-p
"
$(
dirname
$ALT_CONTENTS_INDEX_LIST
)
"
sudocmd
chmod
a+rw
"
$(
dirname
$ALT_CONTENTS_INDEX_LIST
)
"
sudocmd
truncate
-s0
$ALT_CONTENTS_INDEX_LIST
sudocmd
chmod
a+rw
$ALT_CONTENTS_INDEX_LIST
update_alt_contents_index
}
# fills ALT_CONTENTS_INDEX_LIST
update_alt_contents_index
()
{
load_helper epm-repolist
__init_contents_index_list
check_alt_contents_index
||
return
# TODO: fix for Etersoft/LINUX@Etersoft
# TODO: fix for rsync
info
"Retrieving contents_index ..."
...
...
bin/epm-update
View file @
df821445
...
...
@@ -47,7 +47,7 @@ __save_available_packages()
{
[
-d
"
$epm_vardir
"
]
||
return
0
info
"Retriev
e
all available packages (for autocompletion) ..."
info
"Retriev
ing list of
all available packages (for autocompletion) ..."
load_helper epm-list_available
short
=
--short
epm_list_available |
sort
| sudorun
tee
$epm_vardir
/available-packages
>
/dev/null
}
...
...
@@ -61,8 +61,8 @@ epm_update()
local
ret
=
0
warmup_hibase
case
$
PMTYP
E
in
apt-rpm
)
case
$
BASEDISTRNAM
E
in
"alt"
)
# TODO: hack against cd to cwd in apt-get on ALT
cd
/
sudocmd apt-get update
...
...
@@ -71,6 +71,27 @@ case $PMTYPE in
[
"
$ret
"
=
"0"
]
||
return
__check_for_epm_version
#sudocmd apt-get -f install || exit
__epm_touch_pkg
__save_available_packages
load_helper epm-sh-altlinux-contents-index
init_alt_contents_index
return
$ret
;;
esac
case
$PMTYPE
in
apt-rpm
)
# TODO: hack against cd to cwd in apt-get on ALT
cd
/
sudocmd apt-get update
ret
=
"
$?
"
cd
-
>
/dev/null
[
"
$ret
"
=
"0"
]
||
return
;;
apt-dpkg
)
sudocmd apt-get update
||
return
...
...
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