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
1
Merge Requests
1
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
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()
...
@@ -89,16 +89,14 @@ __epm_downgrade_to_alt_archive()
{
{
local date
=
"
$(
echo
"
$1
"
|
cut
-d
/
-f2
)
"
local date
=
"
$(
echo
"
$1
"
|
cut
-d
/
-f2
)
"
shift
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
__epm_add_alt_apt_downgrade_preferences
||
return
load_helper epm-reposave
load_helper epm-sh-backend
try_change_alt_repo
docmd epm repo
set
archive
"
$date
"
||
return
load_helper epm-update
load_helper epm-upgrade
load_helper epm-upgrade
__
epm_update
__
use_tmp_apt_for_branch archive
"
$(
echo
"
$DISTRVERSION
"
|
tr
'[:upper:]'
'[:lower:]'
)
"
"
$datestr
"
||
return
1
epm_upgrade
"
$@
"
epm_upgrade
"
$@
"
docmd epm repo restore
end_change_alt_repo
__epm_remove_apt_downgrade_preferences
__epm_remove_apt_downgrade_preferences
return
return
}
}
...
...
bin/epm-download
View file @
0f23697b
...
@@ -243,23 +243,21 @@ __epm_download_alt()
...
@@ -243,23 +243,21 @@ __epm_download_alt()
# TODO: enable if install --download-only will works
# TODO: enable if install --download-only will works
if
is_taskarg
"
$@
"
;
then
if
is_taskarg
"
$@
"
;
then
load_helper epm-addrepo
load_helper epm-sh-backend
load_helper epm-reposave
local
task_numbers
=
""
load_helper epm-removerepo
local
arg
load_helper epm-update
for
arg
in
"
$@
"
;
do
load_helper epm-install
local
tn
=
"
$(
get_tasknumber_from_arg
"
$arg
"
)
"
[
-n
"
$tn
"
]
&&
task_numbers
=
"
$task_numbers
$tn
"
done
local
installlist
=
"
$(
get_task_packages
$*
)
"
local
installlist
=
"
$(
get_task_packages
$*
)
"
installlist
=
"
$(
estrlist reg_exclude
".*-devel .*-devel-static .*-checkinstall .*-debuginfo"
"
$installlist
"
)
"
installlist
=
"
$(
estrlist reg_exclude
".*-devel .*-devel-static .*-checkinstall .*-debuginfo"
"
$installlist
"
)
"
[
-n
"
$verbose
"
]
&&
info
'Packages from task(s): $installlist'
[
-n
"
$verbose
"
]
&&
info
'Packages from task(s): $installlist'
try_change_alt_repo
__use_tmp_apt_for_tasks
$task_numbers
||
return
1
epm_addrepo
"
$@
"
[
-n
"
$verbose
"
]
&&
cat
"
$__EPM_APT_TMPDIR
/sources.list"
epm update
epm_download
$installlist
[
-n
"
$verbose
"
]
&&
epm repo list
docmd epm download
$print_url
$installlist
epm_removerepo
"
$@
"
end_change_alt_repo
return
return
fi
fi
...
...
bin/epm-install-alt
View file @
0f23697b
...
@@ -272,6 +272,14 @@ epm_install_alt_kernel_module()
...
@@ -272,6 +272,14 @@ epm_install_alt_kernel_module()
epm_install_alt_names
()
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
kmlist
=
''
local
kilist
=
''
local
kilist
=
''
local
installnames
=
''
local
installnames
=
''
...
@@ -305,10 +313,13 @@ epm_install_alt_names()
...
@@ -305,10 +313,13 @@ epm_install_alt_names()
epm_install_alt_kernel_module
$kmlist
||
return
epm_install_alt_kernel_module
$kmlist
||
return
# install kernel images via update-kernel (handles modules automatically)
# install kernel images via update-kernel (handles modules automatically)
local
flavour
if
[
-n
"
$kilist
"
]
;
then
for
flavour
in
$kilist
;
do
load_helper epm-kernel_update
docmd epm update-kernel
-t
"
$flavour
"
||
return
local
flavour
done
for
flavour
in
$kilist
;
do
epm_kernel_update
-t
"
$flavour
"
||
return
done
fi
}
}
# Unused hack for apt-repo
# Unused hack for apt-repo
...
@@ -368,10 +379,6 @@ prepare_task_packages()
...
@@ -368,10 +379,6 @@ prepare_task_packages()
# copied from epm_upgrade_alt_tasks()
# copied from epm_upgrade_alt_tasks()
epm_install_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
load_helper epm-install
prepare_task_packages
"
$@
"
prepare_task_packages
"
$@
"
...
@@ -399,16 +406,8 @@ epm_install_alt_tasks()
...
@@ -399,16 +406,8 @@ epm_install_alt_tasks()
fi
fi
local
res
local
res
try_change_alt_repo
__use_tmp_apt_for_tasks
$unique_tasks
||
return
1
epm_addrepo
$unique_tasks
__epm_update
(
pkg_names
=
"
$installlist
"
epm_install
)
(
pkg_names
=
"
$installlist
"
epm_install
)
res
=
$?
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
return
$res
}
}
bin/epm-sh-backend
View file @
0f23697b
...
@@ -203,7 +203,8 @@ __use_tmp_apt_for_tasks()
...
@@ -203,7 +203,8 @@ __use_tmp_apt_for_tasks()
load_helper epm-update
load_helper epm-update
__setup_tmp_apt_dir
__setup_tmp_apt_dir
{
__get_system_sourceslist
;
__generate_task_sourceslist
"
$@
"
;
}
>
"
$__EPM_APT_TMPDIR
/sources.list"
{
__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...
# call: __process_repo_arguments <function> args...
...
...
bin/epm-upgrade
View file @
0f23697b
...
@@ -39,10 +39,7 @@ __check_upgrade_conditions()
...
@@ -39,10 +39,7 @@ __check_upgrade_conditions()
epm_upgrade_alt_tasks
()
epm_upgrade_alt_tasks
()
{
{
load_helper epm-addrepo
load_helper epm-sh-backend
load_helper epm-reposave
load_helper epm-removerepo
load_helper epm-update
load_helper epm-install
load_helper epm-install
local
installlist
=
"
$(
get_task_packages
"
$@
"
)
"
local
installlist
=
"
$(
get_task_packages
"
$@
"
)
"
...
@@ -64,14 +61,17 @@ epm_upgrade_alt_tasks()
...
@@ -64,14 +61,17 @@ epm_upgrade_alt_tasks()
return
22
return
22
fi
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
local
res
try_change_alt_repo
__use_tmp_apt_for_tasks
$task_numbers
||
return
1
epm_addrepo
"
$@
"
__epm_update
(
pkg_names
=
"
$installlist
"
epm_install
)
(
pkg_names
=
"
$installlist
"
epm_install
)
res
=
$?
res
=
$?
epm_removerepo
"
$@
"
end_change_alt_repo
return
$res
return
$res
}
}
...
@@ -163,7 +163,7 @@ __epm_upgrade_do()
...
@@ -163,7 +163,7 @@ __epm_upgrade_do()
__epm_alt_download_to_cache
$APTOPTIONS
dist-upgrade
__epm_alt_download_to_cache
$APTOPTIONS
dist-upgrade
fi
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
)
apm-rpm
)
CMD
=
"apm system upgrade"
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