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
3b615787
Commit
3b615787
authored
Nov 10, 2025
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm-repack: move copy creating to __epm_repack_copy() and use it
parent
1f7ddd0f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
2 deletions
+28
-2
epm-repack
bin/epm-repack
+26
-0
epm-repack-deb
bin/epm-repack-deb
+1
-1
epm-repack-rpm
bin/epm-repack-rpm
+1
-1
No files found.
bin/epm-repack
View file @
3b615787
...
@@ -53,6 +53,32 @@ __epm_check_if_needed_repack()
...
@@ -53,6 +53,32 @@ __epm_check_if_needed_repack()
warning
'There is repack rule for $pkgname package. It is better install this package via epm install --repack or epm play.'
warning
'There is repack rule for $pkgname package. It is better install this package via epm install --repack or epm play.'
}
}
# make light and independent copy to target
# note: target file can be read only
# args: abs_source target
__epm_repack_copy
()
{
local
abspkg
=
"
$1
"
local
target
=
"
$2
"
# if source file is not writable, try CoW or fallback to ordinal copy
#if [ ! -w "$abspkg" ] ; then
# cp --reflink=auto $verbose $abspkg $target 2>/dev/null && return
# return
#fi
# firstly try CoW
cp
--reflink
=
always
$verbose
$abspkg
$target
2>/dev/null
&&
return
# next try create hardlink
cp
-l
$verbose
$abspkg
$target
2>/dev/null
&&
return
# next try create symlink
cp
-s
$verbose
$abspkg
$target
2>/dev/null
&&
return
# just make copy as fallback
cp
$verbose
$abspkg
$target
&&
return
fatal
"Can't copy
$abspkg
to
$target
"
}
# arg: rpm or deb
# arg: rpm or deb
# fills split_replaced_pkgs with packages of that type
# fills split_replaced_pkgs with packages of that type
__epm_split_by_pkg_type
()
__epm_split_by_pkg_type
()
...
...
bin/epm-repack-deb
View file @
3b615787
...
@@ -44,7 +44,7 @@ __epm_repack_to_deb()
...
@@ -44,7 +44,7 @@ __epm_repack_to_deb()
alpkg
=
$(
basename
$pkg
)
alpkg
=
$(
basename
$pkg
)
# don't use abs package path: copy package to temp dir and use there
# don't use abs package path: copy package to temp dir and use there
cp
-l
$verbose
$abspkg
$TDIR
/
$alpkg
2>/dev/null
||
cp
-s
$verbose
$abspkg
$TDIR
/
$alpkg
2>/dev/null
||
cp
$verbose
$abspkg
$TDIR
/
$alpkg
||
fatal
__epm_repack_copy
$abspkg
$TDIR
/
$alpkg
cd
$TDIR
||
fatal
cd
$TDIR
||
fatal
__prepare_source_package
"
$(
pwd
)
/
$alpkg
"
__prepare_source_package
"
$(
pwd
)
/
$alpkg
"
...
...
bin/epm-repack-rpm
View file @
3b615787
...
@@ -137,7 +137,7 @@ __epm_repack_to_rpm()
...
@@ -137,7 +137,7 @@ __epm_repack_to_rpm()
alpkg
=
$(
basename
$pkg
)
alpkg
=
$(
basename
$pkg
)
# don't use abs package path: copy package to temp dir and use there
# don't use abs package path: copy package to temp dir and use there
cp
-l
$verbose
$abspkg
$tmpbuilddir
/../
$alpkg
2>/dev/null
||
cp
-s
$verbose
$abspkg
$tmpbuilddir
/../
$alpkg
2>/dev/null
||
cp
$verbose
$abspkg
$tmpbuilddir
/../
$alpkg
||
fatal
__epm_repack_copy
$abspkg
$tmpbuilddir
/../
$alpkg
[
-r
"
$pkg
.eepm.yaml"
]
&&
cp
$verbose
$pkg
.eepm.yaml
$tmpbuilddir
/../
$alpkg
.eepm.yaml
[
-r
"
$pkg
.eepm.yaml"
]
&&
cp
$verbose
$pkg
.eepm.yaml
$tmpbuilddir
/../
$alpkg
.eepm.yaml
cd
$tmpbuilddir
/../
||
fatal
cd
$tmpbuilddir
/../
||
fatal
...
...
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