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
dc3e919f
Commit
dc3e919f
authored
1 year ago
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm update: refactoring
parent
72b9f228
master
devel
tt1
Tags unavailable
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
28 deletions
+37
-28
epm-update
bin/epm-update
+37
-28
No files found.
bin/epm-update
View file @
dc3e919f
#!/bin/sh
#
# Copyright (C) 2012, 2014, 2016-2017 Etersoft
# Copyright (C) 2012, 2014, 2016-2017 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012, 2014, 2016-2017
, 2023
Etersoft
# Copyright (C) 2012, 2014, 2016-2017
, 2023
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
...
...
@@ -52,11 +52,26 @@ __save_available_packages()
short
=
--short
epm_list_available |
sort
| sudorun
tee
$epm_vardir
/available-packages
>
/dev/null
}
__epm_update_content_index
()
{
case
$BASEDISTRNAME
in
"alt"
)
load_helper epm-sh-altlinux-contents-index
update_alt_contents_index
return
;;
esac
epm_update
()
case
$PMTYPE
in
apt-dpkg
)
sudocmd apt-file update
;;
esac
}
__epm_update
()
{
local
content_index
[
"
$1
"
=
"--content-index"
]
&&
content_index
=
1
&&
shift
[
-z
"
$*
"
]
||
fatal
"No arguments are allowed here"
...
...
@@ -67,26 +82,11 @@ warmup_hibase
case
$BASEDISTRNAME
in
"alt"
)
if
[
-n
"
$content_index
"
]
;
then
load_helper epm-sh-altlinux-contents-index
update_alt_contents_index
return
fi
# TODO: hack against cd to cwd in apt-get on ALT
cd
/
sudocmd apt-get update
ret
=
"
$?
"
cd
-
>
/dev/null
[
"
$ret
"
=
"0"
]
||
return
__check_for_epm_version
__epm_touch_pkg
__save_available_packages
load_helper epm-sh-altlinux-contents-index
update_alt_contents_index
return
$ret
;;
esac
...
...
@@ -99,13 +99,9 @@ case $PMTYPE in
sudocmd apt-get update
ret
=
"
$?
"
cd
-
>
/dev/null
[
"
$ret
"
=
"0"
]
||
return
return
$ret
;;
apt-dpkg
)
if
[
-n
"
$content_index
"
]
;
then
sudocmd apt-file update
return
fi
sudocmd apt-get update
||
return
# apt-get update retrieve Contents file too
#sudocmd apt-file update
...
...
@@ -183,10 +179,23 @@ case $PMTYPE in
fatal
"Have no suitable update command for
$PMTYPE
"
;;
esac
}
epm_update
()
{
if
[
"
$1
"
=
"--content-index"
]
;
then
__epm_update_content_index
return
fi
__epm_update
"
$@
"
||
return
__epm_touch_pkg
__epm_touch_pkg
__save_available_packages
__save_available_packages
return
0
__epm_update_content_index
return
0
}
This diff is collapsed.
Click to expand it.
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