Commit 35e2e84b authored by Vitaly Lipatov's avatar Vitaly Lipatov

distro_info related fixes

parent c510f940
......@@ -57,7 +57,7 @@ Just run under root user:
```
## How to add new distro support
1. Fix detection with `distr_info`
1. Fix detection with `distro_info`
2. Add distro support in `set_pm_type` function
3. Implement every command in epm-* files
4. Ensure that `epm packages` and `epm --short packages` works correctly
......
......@@ -55,8 +55,6 @@ https://archlinux.fr/man/yaourt.8.html
/etc/eepm.conf конфиг
implement distr_info as inside tool and do access via epm command
[18:21:12] <danil> Вот так можно:
RED='\033[0;31m' ; NC='\033[0m' b="b" ; echo -e "aba" | sed -e "s|${b}|\\${RED}${b}\\${NC}|g" | xargs -0 printf
[18:23:40] <danil> > Ты знаешь способы?
......
......@@ -467,7 +467,7 @@ set_pm_type()
# use external distro_info if internal one is missed
DISTRVENDOR=$PROGDIR/distr_info
[ -x $DISTRVENDOR ] || DISTRVENDOR=distro_info
export DISTRVENDOR
# Fill for use: PMTYPE, DISTRNAME, DISTRVERSION, PKGFORMAT, PKGVENDOR, RPMVENDOR
[ -n "$DISTRNAME" ] || DISTRNAME=$($DISTRVENDOR -d) || fatal "Can't get distro name."
[ -n "$DISTRVERSION" ] || DISTRVERSION=$($DISTRVENDOR -v)
......
......@@ -20,4 +20,4 @@ checkbashisms -f bin/*
checkbashisms -f Makefile
shellcheck $EXCL \
bin/epm bin/distr_info bin/epm-* bin/serv-* bin/tools_*
bin/epm bin/distro_info bin/epm-* bin/serv-* bin/tools_*
......@@ -52,6 +52,7 @@ 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"
}
......
......@@ -459,8 +459,8 @@ set_pm_type()
# use external distro_info if internal one is missed
DISTRVENDOR=internal_distr_info
[ -x $DISTRVENDOR ] || DISTRVENDOR=distro_info
[ -x $DISTRVENDOR ] || DISTRVENDOR=internal_distr_info
export DISTRVENDOR
# Fill for use: PMTYPE, DISTRNAME, DISTRVERSION, PKGFORMAT, PKGVENDOR, RPMVENDOR
[ -n "$DISTRNAME" ] || DISTRNAME=$($DISTRVENDOR -d) || fatal "Can't get distro name."
[ -n "$DISTRVERSION" ] || DISTRVERSION=$($DISTRVENDOR -v)
......
......@@ -450,8 +450,8 @@ set_pm_type()
# use external distro_info if internal one is missed
DISTRVENDOR=internal_distr_info
[ -x $DISTRVENDOR ] || DISTRVENDOR=distro_info
[ -x $DISTRVENDOR ] || DISTRVENDOR=internal_distr_info
export DISTRVENDOR
# Fill for use: PMTYPE, DISTRNAME, DISTRVERSION, PKGFORMAT, PKGVENDOR, RPMVENDOR
[ -n "$DISTRNAME" ] || DISTRNAME=$($DISTRVENDOR -d) || fatal "Can't get distro name."
[ -n "$DISTRVERSION" ] || DISTRVERSION=$($DISTRVENDOR -v)
......@@ -2238,7 +2238,7 @@ set_service_type()
# use external distro_info if internal one is missed
DISTRVENDOR=internal_distr_info
[ -x $DISTRVENDOR ] || DISTRVENDOR=distro_info
[ -x $DISTRVENDOR ] || DISTRVENDOR=internal_distr_info
# Fill for use: PMTYPE, DISTRNAME, DISTRVERSION, PKGFORMAT, PKGVENDOR, RPMVENDOR
[ -n "$DISTRNAME" ] || DISTRNAME=$($DISTRVENDOR -d) || fatal "Can't get distro name from $DISTRVENDOR."
......
......@@ -4,7 +4,7 @@
BUILDROOT="$1"
SPEC="$2"
if [ "$(distr_info -a)" = "x86_64" ] ; then
if [ "$($DISTRVENDOR -a)" = "x86_64" ] ; then
# 32 bit
rm -rfv $BUILDROOT/opt/Citrix/VDA/lib32
subst "s|.*/libctxXrandrhook.so.||" $SPEC
......
......@@ -4,7 +4,7 @@
BUILDROOT="$1"
SPEC="$2"
if [ "$(distr_info -a)" = "x86_64" ] ; then
if [ "$($DISTRVENDOR -a)" = "x86_64" ] ; then
# 32 bit
rm -fv $BUILDROOT/opt/teamviewer/tv_bin/script/libdepend
subst "s|.*script/libdepend.*||" $SPEC
......
......@@ -14,7 +14,7 @@ chmod a+x $BUILDROOT/opt/trueconf/trueconf-client
rm -rvf $BUILDROOT/usr/local/
[ "$(distr_info -b)" = 64 ] && LIBUDEV=/lib64/libudev.so.0 || LIBUDEV=/lib/libudev.so.0
[ "$($DISTRVENDOR -b)" = 64 ] && LIBUDEV=/lib64/libudev.so.0 || LIBUDEV=/lib/libudev.so.0
ln -s $LIBUDEV $BUILDROOT/opt/trueconf/lib/libudev.so.0
REQUIRES="libudev1 pulseaudio alsa-utils libv4l sqlite gtk2 libpng openssl udev libxslt xdg-utils"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment