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
d9cee91a
Commit
d9cee91a
authored
May 14, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set_distro_info: split to TMPDIR, BIGTMPDIR and export DISTR* vars only once
parent
3028467d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
18 deletions
+31
-18
epm-sh-functions
bin/epm-sh-functions
+31
-17
pack_in_onefile.sh
pack_in_onefile.sh
+0
-1
No files found.
bin/epm-sh-functions
View file @
d9cee91a
...
...
@@ -753,29 +753,43 @@ get_help()
done
}
# TODO: get all info by one request (too slow)
set_distro_info
()
set_bigtmpdir
()
{
# use external distro_info if internal one is missed
DISTRVENDOR
=
$PROGDIR
/distr_info
[
-x
$DISTRVENDOR
]
||
DISTRVENDOR
=
distro_info
export
DISTRVENDOR
# export pack of variables:
# BASEDISTRNAME
# DISTRNAME
# DISTRVERSION
# DISTRARCH
# DISTRCONTROL
# PMTYPE
eval
$(
$DISTRVENDOR
--print-eepm-env
)
[
-n
"
$TMPDIR
"
]
||
TMPDIR
=
"/tmp"
# TODO: improve BIGTMPDIR conception
# https://bugzilla.mozilla.org/show_bug.cgi?id=69938
# https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch05s15.html
# https://geekpeach.net/ru/%D0%BA%D0%B0%D0%BA-systemd-tmpfiles-%D0%BE%D1%87%D0%B8%D1%89%D0%B0%D0%B5%D1%82-tmp-%D0%B8%D0%BB%D0%B8-var-tmp-%D0%B7%D0%B0%D0%BC%D0%B5%D0%BD%D0%B0-tmpwatch-%D0%B2-centos-rhel-7
[
-n
"
$BIGTMPDIR
"
]
||
[
-d
"/var/tmp"
]
&&
BIGTMPDIR
=
"/var/tmp"
||
BIGTMPDIR
=
"
$TMPDIR
"
export
BIGTMPDIR
}
assure_tmpdir
()
{
if
[
-z
"
$TMPDIR
"
]
;
then
export
TMPDIR
=
"/tmp"
warning
"Your have no TMPDIR defined. Use
$TMPDIR
as fallback."
fi
if
[
!
-w
"
$TMPDIR
"
]
;
then
fatal
"TMPDIR
$TMPDIR
is not writable."
fi
}
set_distro_info
()
{
assure_tmpdir
set_bigtmpdir
# don't run again in subprocesses
[
-n
"
$DISTRVENDOR
"
]
&&
return
0
DISTRVENDOR
=
$PROGDIR
/distr_info
export
DISTRVENDOR
# export pack of variables, see epm print info --print-eepm-env
[
-n
"
$verbose
"
]
&&
$DISTRVENDOR
--print-eepm-env
eval
$(
$DISTRVENDOR
--print-eepm-env
|
grep
-v
'^ *#'
)
}
# FIXME: detect if not recognized
...
...
pack_in_onefile.sh
View file @
d9cee91a
...
...
@@ -56,7 +56,6 @@ filter_out()
sed
-e
's|^onefile_estrlist()|estrlist()|g'
|
\
sed
-e
's|$SHAREDIR/tools_json|internal_tools_json|g'
|
\
sed
-e
's|DISTRVENDOR=$PROGDIR/distr_info|DISTRVENDOR=internal_distr_info|g'
|
\
sed
-e
's|DISTRVENDOR=distro_info|DISTRVENDOR=internal_distr_info|g'
|
\
sed
-e
"s|@VERSION@|
$(
get_version
)
|g"
}
...
...
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