Commit 972e9692 authored by Vitaly Lipatov's avatar Vitaly Lipatov

backported to p8 as 2.4.4-alt0.M80P.1 (with rpmbph script)

parents cf9310bf 6d4e4977
...@@ -420,6 +420,7 @@ esac ...@@ -420,6 +420,7 @@ esac
echo "$DIST_BIT" echo "$DIST_BIT"
} }
# TODO: check before calc
get_memory_size() { get_memory_size() {
local detected=0 local detected=0
local DIST_OS=$(get_base_os_name) local DIST_OS=$(get_base_os_name)
...@@ -431,7 +432,7 @@ get_memory_size() { ...@@ -431,7 +432,7 @@ get_memory_size() {
detected=$((`sysctl hw.physmem | sed s/"hw.physmem: "//`/1024/1024)) detected=$((`sysctl hw.physmem | sed s/"hw.physmem: "//`/1024/1024))
elif [ $DIST_OS = "linux" ] elif [ $DIST_OS = "linux" ]
then then
detected=$((`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`/1024)) [ -r /proc/meminfo ] && detected=$((`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`/1024))
fi fi
# Exit codes only support values between 0 and 255. So use stdout. # Exit codes only support values between 0 and 255. So use stdout.
echo $detected echo $detected
......
...@@ -41,7 +41,7 @@ filter_out_installed_packages() ...@@ -41,7 +41,7 @@ filter_out_installed_packages()
for i in $(cat) ; do for i in $(cat) ; do
is_installed "$(__print_with_arch_suffix $i .x86_64)" && continue is_installed "$(__print_with_arch_suffix $i .x86_64)" && continue
is_installed "$(__print_with_arch_suffix $i .noarch)" && continue is_installed "$(__print_with_arch_suffix $i .noarch)" && continue
is_installed $i || echo $i echo $i
done done
else else
__fast_hack_for_filter_out_installed_rpm __fast_hack_for_filter_out_installed_rpm
...@@ -144,10 +144,10 @@ epm_install_names() ...@@ -144,10 +144,10 @@ epm_install_names()
sudocmd aura -A $force $nodeps $@ sudocmd aura -A $force $nodeps $@
return ;; return ;;
yum-rpm) yum-rpm)
sudocmd yum $YUMOPTIONS install $@ sudocmd yum $YUMOPTIONS install $(echo "$*" | exp_with_arch_suffix)
return ;; return ;;
dnf-rpm) dnf-rpm)
sudocmd dnf install $@ sudocmd dnf install $(echo "$*" | exp_with_arch_suffix)
return ;; return ;;
snappy) snappy)
sudocmd snappy install $@ sudocmd snappy install $@
...@@ -217,10 +217,10 @@ epm_ni_install_names() ...@@ -217,10 +217,10 @@ epm_ni_install_names()
sudocmd aptitude -y install $@ sudocmd aptitude -y install $@
return ;; return ;;
yum-rpm) yum-rpm)
sudocmd yum -y $YUMOPTIONS install $@ sudocmd yum -y $YUMOPTIONS install $(echo "$*" | exp_with_arch_suffix)
return ;; return ;;
dnf-rpm) dnf-rpm)
sudocmd dnf -y $YUMOPTIONS install $@ sudocmd dnf -y $YUMOPTIONS install $(echo "$*" | exp_with_arch_suffix)
return ;; return ;;
urpm-rpm) urpm-rpm)
sudocmd urpmi --auto $URPMOPTIONS $@ sudocmd urpmi --auto $URPMOPTIONS $@
......
...@@ -26,10 +26,10 @@ __print_with_arch_suffix() ...@@ -26,10 +26,10 @@ __print_with_arch_suffix()
local pkg="$1" local pkg="$1"
local suffix="$2" local suffix="$2"
# do not change if some suffix already exists # do not change if some suffix already exists
echo "$pkg" | grep -q "(x86-32)$" && echo "$pkg" | sed -e "s|(x86-32)$|.i686|" && return echo "$pkg" | grep -q "(x86-32)$" && echo "$pkg" | sed -e "s|(x86-32)$|.i686|" && return 1
echo "$pkg" | grep "\.x86_64$" && return echo "$pkg" | grep "\.x86_64$" && return 1
echo "$pkg" | grep "\.noarch$" && return echo "$pkg" | grep "\.noarch$" && return 1
echo "$pkg" | grep "\.i[56]86$" && return echo "$pkg" | grep "\.i[56]86$" && return 1
echo "$pkg$suffix" echo "$pkg$suffix"
} }
...@@ -54,7 +54,11 @@ exp_with_arch_suffix() ...@@ -54,7 +54,11 @@ exp_with_arch_suffix()
# TODO: use estrlist or some function to do it # TODO: use estrlist or some function to do it
local pkg local pkg
for pkg in $(cat) ; do for pkg in $(cat) ; do
__print_with_arch_suffix $pkg $suffix # check only packages without arch
local p="$(__print_with_arch_suffix "$pkg" .i686)" || { echo "$pkg" ; continue ; }
# add arch suffix only if arch package already installed (otherwise we don't know package arch)
is_installed "$p" || { echo "$pkg" ; continue ; }
echo "$pkg.x86_64"
done done
} }
...@@ -90,6 +94,7 @@ _shortquery_via_packages_list() ...@@ -90,6 +94,7 @@ _shortquery_via_packages_list()
short=1 pkg_filenames=$pkg epm_packages 2>/dev/null | grep -- "$grepexp" || res=1 short=1 pkg_filenames=$pkg epm_packages 2>/dev/null | grep -- "$grepexp" || res=1
done done
# TODO: print in query (for user): 'warning: package $pkg is not installed'
return $res return $res
} }
......
...@@ -256,8 +256,8 @@ epm_remove() ...@@ -256,8 +256,8 @@ epm_remove()
pkg_files='' pkg_files=''
[ -n "$pkg_names" ] || fatal "Remove: missing package(s) name." [ -n "$pkg_names" ] || fatal "Remove: missing package(s) name."
# TODO: remove only according current arch (if x86_64) # remove according current arch (if x86_64) by default
#pkg_names="$(echo $pkg_names | exp_with_arch_suffix)" pkg_names="$(echo $pkg_names | exp_with_arch_suffix)"
if [ -n "$dryrun" ] ; then if [ -n "$dryrun" ] ; then
info "Packages for removing:" info "Packages for removing:"
......
...@@ -84,7 +84,12 @@ case $PMTYPE in ...@@ -84,7 +84,12 @@ case $PMTYPE in
slackpkg) slackpkg)
# FIXME # FIXME
echo "Note: case sensitive search" echo "Note: case sensitive search"
CMD="/usr/sbin/slackpkg search" if [ -n "$verbose" ] ; then
CMD="/usr/sbin/slackpkg search"
else
LANG=C docmd /usr/sbin/slackpkg search $string | grep " - " | sed -e 's|.* - ||g'
return
fi
;; ;;
homebrew) homebrew)
CMD="brew search" CMD="brew search"
...@@ -167,6 +172,18 @@ __epm_search_make_grep() ...@@ -167,6 +172,18 @@ __epm_search_make_grep()
fi fi
} }
__epm_search_internal()
{
[ -n "$pkg_filenames" ] || fatal "Search: missing search argument(s)"
# it is useful for first time running
update_repo_if_needed soft
warmup_bases
__epm_search_output $(get_firstarg $pkg_filenames) | grep "$pkg_filenames"
}
# copied from korinf/tools/run-script/scripts/search # copied from korinf/tools/run-script/scripts/search
epm_search() epm_search()
......
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
is_warmup_allowed() is_warmup_allowed()
{ {
local MEM local MEM
MEM=$($DISTRVENDOR -m) MEM="$($DISTRVENDOR -m)"
# disable warm if have no enough memory # disable warm if have no enough memory
[ $MEM -le 1024 ] && return 1 [ "$MEM" -le 1024 ] && return 1
return 0 return 0
} }
......
...@@ -120,8 +120,11 @@ EOF ...@@ -120,8 +120,11 @@ EOF
for pkg in $filenames ; do for pkg in $filenames ; do
# FIXME: -[0-0] does not work in search! # FIXME: -[0-0] does not work in search!
# FIXME: we need strict search here (not find gst-plugins-base if search for gst-plugins # FIXME: we need strict search here (not find gst-plugins-base if search for gst-plugins
pkg_filenames="$pkg-[0-9]" epm_search | grep -E "(installed|upgrade)" && continue # TODO: use short?
pkg_filenames="$pkg" epm_search | grep -E "(installed|upgrade)" && continue # use verbose for get package status
#pkg_filenames="$pkg-[0-9]" verbose=--verbose __epm_search_internal | egrep "(installed|upgrade)" && continue
#pkg_filenames="$pkg" verbose=--verbose __epm_search_internal | egrep "(installed|upgrade)" && continue
pkg_filenames="$pkg" __epm_search_internal | grep -q "^$pkg-[0-9]" && continue
res=1 res=1
info "Package '$pkg' does not found in repository." info "Package '$pkg' does not found in repository."
done done
......
# This spec is backported to ALTLinux p8 automatically by rpmbph script from etersoft-build-utils. # This spec is backported to ALTLinux p8 automatically by rpmbph script from etersoft-build-utils.
# #
Name: eepm Name: eepm
Version: 2.4.1 Version: 2.4.4
Release: alt0.M80P.1 Release: alt0.M80P.1
Summary: Etersoft EPM package manager Summary: Etersoft EPM package manager
...@@ -90,9 +90,22 @@ rm -f %buildroot%_datadir/%name/tools_eget ...@@ -90,9 +90,22 @@ rm -f %buildroot%_datadir/%name/tools_eget
%_sysconfdir/bash_completion.d/cerv %_sysconfdir/bash_completion.d/cerv
%changelog %changelog
* Tue Dec 12 2017 Vitaly Lipatov <lav@altlinux.ru> 2.4.1-alt0.M80P.1 * Fri Dec 22 2017 Vitaly Lipatov <lav@altlinux.ru> 2.4.4-alt0.M80P.1
- backport to ALTLinux p8 (by rpmbph script) - backport to ALTLinux p8 (by rpmbph script)
* Fri Dec 22 2017 Vitaly Lipatov <lav@altlinux.ru> 2.4.4-alt1
- distr_info: check if proc exists before use
- repack: add duplicati support
* Thu Dec 14 2017 Vitaly Lipatov <lav@altlinux.ru> 2.4.3-alt1
- implement __epm_search_internal
- full search output for Slackware only with --verbose
- fix simulate for Slackware
* Tue Dec 12 2017 Vitaly Lipatov <lav@altlinux.ru> 2.4.2-alt1
- epm-install: fix --skip-install with dnf/yum
- dnf/yum: fix install/remove current arch packages (https://bugzilla.redhat.com/show_bug.cgi?id=1525164)
* Tue Dec 12 2017 Vitaly Lipatov <lav@altlinux.ru> 2.4.1-alt1 * Tue Dec 12 2017 Vitaly Lipatov <lav@altlinux.ru> 2.4.1-alt1
- add teamviewer.sh for repack (ALT bug 34318) - add teamviewer.sh for repack (ALT bug 34318)
......
#!/bin/sh -x
# It will run with two args: buildroot spec
BUILDROOT="$1"
SPEC="$2"
REQUIRES="mono-full,libgtk-sharp2"
subst "s|^\(Name: .*\)$|# Converted from original package requires\nRequires:$REQUIRES\n\1|g" $SPEC
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