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
9366b879
Commit
9366b879
authored
Apr 02, 2024
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm play.d/common.sh: allow a few packages in PKGNAME (assume they with the same version)
parent
3417b2d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
10 deletions
+26
-10
common.sh
play.d/common.sh
+26
-10
No files found.
play.d/common.sh
View file @
9366b879
...
...
@@ -140,6 +140,7 @@ snap_get_pkgurl()
eget
-O-
-H
Snap-Device-Series:16 https://api.snapcraft.io/v2/snaps/info/
$SNAPNAME
| epm
--inscript
tool json
-b
|
grep
'\["channel-map",0,"download","url"\]'
|
head
-n1
|
sed
-e
's|.*"\(.*\)"$|\1|'
}
# return version only for the first package
get_latest_version
()
{
local
ver
...
...
@@ -288,6 +289,17 @@ is_repacked_package()
return
0
}
is_repacked_packages
()
{
local
pkg
local
pkgs
=
"
$1
"
[
-n
"
$pkgs
"
]
||
pkgs
=
"
$PKGNAME
"
[
-n
"
$pkgs
"
]
||
return
0
#fatal "is_repacked_package() is called without package name"
for
pkg
in
$pkgs
;
do
is_repacked_package
$pkg
||
return
done
}
case
"
$1
"
in
"--description"
)
...
...
@@ -306,13 +318,16 @@ esac
check_tty
pkgtext
=
"package"
pkgistext
=
"package is"
epm tool estrlist has_space
"
$PKGNAME
"
2>/dev/null
&&
pkgtext
=
"packages"
&&
pkgistext
=
"packages are"
# set PKGNAME to $BASEPKGNAME-$VERSION if $VERSION is found in PRODUCTALT
[
-n
"
$PRODUCTALT
"
]
&&
check_alternative_pkgname
case
"
$1
"
in
"--remove"
)
#is_repacked_package || exit 0
#is_repacked_package
s
|| exit 0
epm remove
$PKGNAME
exit
;;
...
...
@@ -332,25 +347,26 @@ case "$1" in
;;
"--installed"
)
#epm installed $PKGNAME
is_repacked_package
$PKGNAME
is_repacked_package
s
$PKGNAME
exit
;;
"--installed-version"
)
epm print version
for
package
$PKGNAME
epm print version
for
package
$PKGNAME
|
head
-n1
exit
;;
"--update"
)
if
!
epm installed
$PKGNAME
;
then
echo
"Skipping update of
$PKGNAME
(
package is
not installed)"
echo
"Skipping update of
$PKGNAME
(
$pkgistext
not installed)"
exit
fi
if
epm mark checkhold
"
$PKGNAME
"
;
then
echo
"Skipping update of
$PKGNAME
(
package is
on hold, see '# epm mark showhold')"
if
epm mark checkhold
$PKGNAME
;
then
echo
"Skipping update of
$PKGNAME
(
$pkgistext
on hold, see '# epm mark showhold')"
exit
fi
pkgver
=
"
$(
epm print version
for
package
$PKGNAME
)
"
# HACK: check version only by first package (we assume all packages have the same version)
pkgver
=
"
$(
epm print version
for
package
$PKGNAME
|
head
-n1
)
"
latestpkgver
=
"
$(
get_latest_version
$PKGNAME
)
"
# ignore update if have no latest package version or the latest package version no more than installed one
if
[
-n
"
$pkgver
"
]
;
then
...
...
@@ -390,10 +406,10 @@ esac
is_supported_arch
"
$(
epm print info
-a
)
"
||
fatal
"Only '
$SUPPORTEDARCHES
' architectures is supported"
epm tool estrlist has_space
"
$PKGNAME
"
&&
fatal
"play.d/common does not support a new packages in PKGNAME at all!"
#
epm tool estrlist has_space "$PKGNAME" && fatal "play.d/common does not support a new packages in PKGNAME at all!"
# skip install if there is package installed not via epm play
is_repacked_package
$REPOPKGNAME
||
exit
0
is_repacked_package
s
$REPOPKGNAME
||
exit
0
if
[
-z
"
$VERSION
"
]
&&
[
-z
"
$force
"
]
&&
[
-n
"
$EGET_IPFS_DB
"
]
;
then
# IPFS is using, use known version
...
...
@@ -409,6 +425,6 @@ fi
[
-n
"
$VERSION
"
]
||
VERSION
=
"*"
echo
echo
"Installing
$DESCRIPTION
as
$PKGNAME
package
..."
echo
"Installing
$DESCRIPTION
as
$PKGNAME
$pkgtext
..."
export
EEPM_INTERNAL_PKGNAME
=
"
$PKGNAME
"
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