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
d2a4cc73
Commit
d2a4cc73
authored
Jan 22, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm-mark: add support for hold/unhold
parent
65c6458e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
3 deletions
+45
-3
epm-mark
bin/epm-mark
+45
-3
No files found.
bin/epm-mark
View file @
d2a4cc73
#!/bin/sh
#
# Copyright (C) 2020 Etersoft
# Copyright (C) 2020 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2020
, 2022
Etersoft
# Copyright (C) 2020
, 2022
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
...
...
@@ -17,11 +17,53 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
__alt_mark_hold
()
{
# TODO: do more long checking via apt
local
pkg
local
i
for
i
in
"
$@
"
;
do
pkg
=
"
$(
epm query
--short
"
$i
"
)
"
||
continue
showcmd
"echo
\"
RPM::Hold {
\"
^
$pkg
\"
;};
\"
> /etc/apt/apt.conf.d/hold-
$pkg
.conf"
echo
"RPM::Hold {
\"
^
$pkg
\"
;};"
| sudorun
tee
"/etc/apt/apt.conf.d/hold-
$pkg
.conf"
>
/dev/null
done
}
__alt_mark_unhold
()
{
# TODO: do more long checking via apt
local
pkg
local
i
for
i
in
"
$@
"
;
do
pkg
=
"
$(
epm query
--short
"
$i
"
)
"
||
pkg
=
"
$i
"
sudocmd
rm
-fv
/etc/apt/apt.conf.d/hold-
$pkg
.conf
done
}
epm_mark
()
{
case
$PMTYPE
in
apt-rpm|apt-dpkg
)
apt-rpm
)
if
[
"
$1
"
=
"hold"
]
;
then
shift
__alt_mark_hold
"
$@
"
exit
fi
if
[
"
$1
"
=
"unhold"
]
;
then
shift
__alt_mark_unhold
"
$@
"
exit
fi
sudocmd apt-mark
"
$@
"
if
[
"
$1
"
=
""
]
||
[
"
$1
"
=
"--help"
]
||
[
"
$1
"
=
"-h"
]
;
then
echo
echo
"EPM additionals: "
echo
" hold pkg1 [pkg2 ...] - hold the given package(s)"
echo
" unhold pkg1 [pkg2 ...] - unhold the given package(s)"
fi
;;
apt-dpkg
)
sudocmd apt-mark
"
$@
"
;;
*
)
...
...
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