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
c05cacee
Commit
c05cacee
authored
2 years ago
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm repack: fix error code
parent
8bf0f2d4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
epm-install
bin/epm-install
+5
-5
epm-repack
bin/epm-repack
+6
-5
No files found.
bin/epm-install
View file @
c05cacee
...
@@ -309,11 +309,11 @@ epm_install_files()
...
@@ -309,11 +309,11 @@ epm_install_files()
ALTLinux|ALTServer
)
ALTLinux|ALTServer
)
# TODO: replace with name changed function
# TODO: replace with name changed function
__epm_check_if_try_install_pkgtype deb
$@
&&
return
__epm_check_if_try_install_pkgtype deb
$@
&&
return
$RES
__epm_check_if_try_install_pkgtype AppImage
$@
&&
return
__epm_check_if_try_install_pkgtype AppImage
$@
&&
return
$RES
__epm_check_if_src_rpm
$@
__epm_check_if_src_rpm
$@
# do not us
ing
low-level for install by file path (FIXME: reasons?)
# do not us
e
low-level for install by file path (FIXME: reasons?)
if
!
is_dirpath
"
$@
"
||
[
"
$(
get_package_type
"
$@
"
)
"
=
"rpm"
]
;
then
if
!
is_dirpath
"
$@
"
||
[
"
$(
get_package_type
"
$@
"
)
"
=
"rpm"
]
;
then
__epm_check_vendor
$@
__epm_check_vendor
$@
__epm_check_if_needed_repack
$@
__epm_check_if_needed_repack
$@
...
@@ -356,8 +356,8 @@ epm_install_files()
...
@@ -356,8 +356,8 @@ epm_install_files()
;;
;;
*
-rpm
)
*
-rpm
)
__epm_check_if_try_install_pkgtype deb
$@
&&
return
__epm_check_if_try_install_pkgtype deb
$@
&&
return
$RES
__epm_check_if_try_install_pkgtype AppImage
$@
&&
return
__epm_check_if_try_install_pkgtype AppImage
$@
&&
return
$RES
__epm_check_if_src_rpm
$@
__epm_check_if_src_rpm
$@
sudocmd rpm
-Uvh
$force
$noscripts
$nodeps
$@
&&
return
sudocmd rpm
-Uvh
$force
$noscripts
$nodeps
$@
&&
return
local
RES
=
$?
local
RES
=
$?
...
...
This diff is collapsed.
Click to expand it.
bin/epm-repack
View file @
c05cacee
...
@@ -247,8 +247,7 @@ __epm_repack_to_rpm()
...
@@ -247,8 +247,7 @@ __epm_repack_to_rpm()
./
$alpkg
--appimage-extract
||
fatal
./
$alpkg
--appimage-extract
||
fatal
alpkg
=
$PKGNAME
-
$VERSION
.tar
alpkg
=
$PKGNAME
-
$VERSION
.tar
erc a
$alpkg
squashfs-root
erc a
$alpkg
squashfs-root
fi
else
VERSION
=
"
$(
echo
"
$alpkg
"
|
grep
-o
-P
"[-_.]([0-9])([0-9])*(
\.
[0-9])*"
|
head
-n1
|
sed
-e
's|^[-_.]||'
)
"
#"
VERSION
=
"
$(
echo
"
$alpkg
"
|
grep
-o
-P
"[-_.]([0-9])([0-9])*(
\.
[0-9])*"
|
head
-n1
|
sed
-e
's|^[-_.]||'
)
"
#"
if
[
-n
"
$VERSION
"
]
;
then
if
[
-n
"
$VERSION
"
]
;
then
PKGNAME
=
"
$(
echo
"
$alpkg
"
|
sed
-e
"s|[-_.]
$VERSION
.*||"
)
"
PKGNAME
=
"
$(
echo
"
$alpkg
"
|
sed
-e
"s|[-_.]
$VERSION
.*||"
)
"
...
@@ -264,6 +263,7 @@ __epm_repack_to_rpm()
...
@@ -264,6 +263,7 @@ __epm_repack_to_rpm()
alpkg
=
$newalpkg
alpkg
=
$newalpkg
fi
fi
fi
fi
fi
cd
$tmpbuilddir
/
||
fatal
cd
$tmpbuilddir
/
||
fatal
...
@@ -320,16 +320,17 @@ __epm_repack_to_rpm()
...
@@ -320,16 +320,17 @@ __epm_repack_to_rpm()
true
true
}
}
# FIXME: Нужно как-то обеспечить непродолжение выполнения.
__epm_check_if_try_install_pkgtype
()
__epm_check_if_try_install_pkgtype
()
{
{
local
PKG
=
"
$1
"
local
PKG
=
"
$1
"
shift
shift
__epm_split_by_pkg_type
$PKG
"
$@
"
||
return
1
__epm_split_by_pkg_type
$PKG
"
$@
"
||
return
1
__epm_repack_to_rpm
$split_replaced_pkgs
||
fatal
__epm_repack_to_rpm
$split_replaced_pkgs
||
{
RES
=
$?
;
return
0
;
}
# TODO: move to install
# TODO: move to install
docmd epm
install
$repacked_rpms
docmd epm
install
$repacked_rpms
local
RES
=
$?
RES
=
$?
# TODO: move it to exit handler
# TODO: move it to exit handler
if
[
-z
"
$DEBUG
"
]
;
then
if
[
-z
"
$DEBUG
"
]
;
then
# TODO: reinvent
# TODO: reinvent
...
@@ -338,7 +339,7 @@ __epm_check_if_try_install_pkgtype()
...
@@ -338,7 +339,7 @@ __epm_check_if_try_install_pkgtype()
[
-n
"
$to_remove_pkg_dirs
"
]
&&
rmdir
$to_remove_pkg_dirs
2>/dev/null
[
-n
"
$to_remove_pkg_dirs
"
]
&&
rmdir
$to_remove_pkg_dirs
2>/dev/null
fi
fi
return
$RES
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