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
Иван Мажукин
eepm
Commits
0f23697b
Commit
0f23697b
authored
Feb 16, 2026
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm install/upgrade/download/downgrade: use temporary APT directory for tasks
parent
74638769
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
47 deletions
+43
-47
epm-downgrade
bin/epm-downgrade
+5
-7
epm-download
bin/epm-download
+10
-12
epm-install-alt
bin/epm-install-alt
+16
-17
epm-sh-backend
bin/epm-sh-backend
+2
-1
epm-upgrade
bin/epm-upgrade
+10
-10
No files found.
bin/epm-downgrade
View file @
0f23697b
...
...
@@ -89,16 +89,14 @@ __epm_downgrade_to_alt_archive()
{
local date
=
"
$(
echo
"
$1
"
|
cut
-d
/
-f2
)
"
shift
# normalize date: 2023-01-15 -> 2023/01/15
local
datestr
=
"
$(
echo
"
$date
"
|
sed
-e
's|-|/|g'
)
"
echo
"
$datestr
"
|
grep
-qE
"^20[0-3][0-9]/[01][0-9]/[0-3][0-9]$"
||
fatal
"use follow date format: 2017/01/31 or 2017-01-31"
__epm_add_alt_apt_downgrade_preferences
||
return
load_helper epm-reposave
try_change_alt_repo
docmd epm repo
set
archive
"
$date
"
||
return
load_helper epm-update
load_helper epm-sh-backend
load_helper epm-upgrade
__
epm_update
__
use_tmp_apt_for_branch archive
"
$(
echo
"
$DISTRVERSION
"
|
tr
'[:upper:]'
'[:lower:]'
)
"
"
$datestr
"
||
return
1
epm_upgrade
"
$@
"
docmd epm repo restore
end_change_alt_repo
__epm_remove_apt_downgrade_preferences
return
}
...
...
bin/epm-download
View file @
0f23697b
...
...
@@ -243,23 +243,21 @@ __epm_download_alt()
# TODO: enable if install --download-only will works
if
is_taskarg
"
$@
"
;
then
load_helper epm-addrepo
load_helper epm-reposave
load_helper epm-removerepo
load_helper epm-update
load_helper epm-install
load_helper epm-sh-backend
local
task_numbers
=
""
local
arg
for
arg
in
"
$@
"
;
do
local
tn
=
"
$(
get_tasknumber_from_arg
"
$arg
"
)
"
[
-n
"
$tn
"
]
&&
task_numbers
=
"
$task_numbers
$tn
"
done
local
installlist
=
"
$(
get_task_packages
$*
)
"
installlist
=
"
$(
estrlist reg_exclude
".*-devel .*-devel-static .*-checkinstall .*-debuginfo"
"
$installlist
"
)
"
[
-n
"
$verbose
"
]
&&
info
'Packages from task(s): $installlist'
try_change_alt_repo
epm_addrepo
"
$@
"
epm update
[
-n
"
$verbose
"
]
&&
epm repo list
docmd epm download
$print_url
$installlist
epm_removerepo
"
$@
"
end_change_alt_repo
__use_tmp_apt_for_tasks
$task_numbers
||
return
1
[
-n
"
$verbose
"
]
&&
cat
"
$__EPM_APT_TMPDIR
/sources.list"
epm_download
$installlist
return
fi
...
...
bin/epm-install-alt
View file @
0f23697b
...
...
@@ -272,6 +272,14 @@ epm_install_alt_kernel_module()
epm_install_alt_names
()
{
[
-z
"
$1
"
]
&&
return
# check repo/package syntax (p10/pkg, sisyphus/pkg)
if
__has_repo_syntax
"
$@
"
;
then
__process_repo_arguments epm_install_alt_names
"
$@
"
return
fi
local
kmlist
=
''
local
kilist
=
''
local
installnames
=
''
...
...
@@ -305,10 +313,13 @@ epm_install_alt_names()
epm_install_alt_kernel_module
$kmlist
||
return
# install kernel images via update-kernel (handles modules automatically)
local
flavour
for
flavour
in
$kilist
;
do
docmd epm update-kernel
-t
"
$flavour
"
||
return
done
if
[
-n
"
$kilist
"
]
;
then
load_helper epm-kernel_update
local
flavour
for
flavour
in
$kilist
;
do
epm_kernel_update
-t
"
$flavour
"
||
return
done
fi
}
# Unused hack for apt-repo
...
...
@@ -368,10 +379,6 @@ prepare_task_packages()
# copied from epm_upgrade_alt_tasks()
epm_install_alt_tasks
()
{
load_helper epm-addrepo
load_helper epm-reposave
load_helper epm-removerepo
load_helper epm-update
load_helper epm-install
prepare_task_packages
"
$@
"
...
...
@@ -399,16 +406,8 @@ epm_install_alt_tasks()
fi
local
res
try_change_alt_repo
epm_addrepo
$unique_tasks
__epm_update
__use_tmp_apt_for_tasks
$unique_tasks
||
return
1
(
pkg_names
=
"
$installlist
"
epm_install
)
res
=
$?
# remove repos one by one (epm_removerepo doesn't handle lists)
local
task
for
task
in
$unique_tasks
;
do
epm_removerepo
$task
done
end_change_alt_repo
return
$res
}
bin/epm-sh-backend
View file @
0f23697b
...
...
@@ -203,7 +203,8 @@ __use_tmp_apt_for_tasks()
load_helper epm-update
__setup_tmp_apt_dir
{
__get_system_sourceslist
;
__generate_task_sourceslist
"
$@
"
;
}
>
"
$__EPM_APT_TMPDIR
/sources.list"
__epm_update
||
{
warning
"Failed to update package index for tasks"
;
return
1
;
}
# tolerate partial failures (some system repos may have broken GPG keys etc.)
__epm_update
||
warning
"Some repos failed to update, but continuing anyway"
}
# call: __process_repo_arguments <function> args...
...
...
bin/epm-upgrade
View file @
0f23697b
...
...
@@ -39,10 +39,7 @@ __check_upgrade_conditions()
epm_upgrade_alt_tasks
()
{
load_helper epm-addrepo
load_helper epm-reposave
load_helper epm-removerepo
load_helper epm-update
load_helper epm-sh-backend
load_helper epm-install
local
installlist
=
"
$(
get_task_packages
"
$@
"
)
"
...
...
@@ -64,14 +61,17 @@ epm_upgrade_alt_tasks()
return
22
fi
local
task_numbers
=
""
local
arg
for
arg
in
"
$@
"
;
do
local
tn
=
"
$(
get_tasknumber_from_arg
"
$arg
"
)
"
[
-n
"
$tn
"
]
&&
task_numbers
=
"
$task_numbers
$tn
"
done
local
res
try_change_alt_repo
epm_addrepo
"
$@
"
__epm_update
__use_tmp_apt_for_tasks
$task_numbers
||
return
1
(
pkg_names
=
"
$installlist
"
epm_install
)
res
=
$?
epm_removerepo
"
$@
"
end_change_alt_repo
return
$res
}
...
...
@@ -163,7 +163,7 @@ __epm_upgrade_do()
__epm_alt_download_to_cache
$APTOPTIONS
dist-upgrade
fi
CMD
=
"apt-get
$APTOPTIONS
$noremove
$force_yes
dist-upgrade"
CMD
=
"apt-get
$
__EPM_APT_REPO_OPTIONS
$
APTOPTIONS
$noremove
$force_yes
dist-upgrade"
;;
apm-rpm
)
CMD
=
"apm system upgrade"
...
...
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