Commit 80c62b3f authored by Vitaly Lipatov's avatar Vitaly Lipatov

reformat pipe signs

parent 4b9f396c
...@@ -34,7 +34,9 @@ case $PMTYPE in ...@@ -34,7 +34,9 @@ case $PMTYPE in
assure_exists /etc/buildreqs/files/ignore.d/apt-scripts apt-scripts assure_exists /etc/buildreqs/files/ignore.d/apt-scripts apt-scripts
echo "We will try remove all installed packages which are missed in repositories" echo "We will try remove all installed packages which are missed in repositories"
warning "Use with caution!" warning "Use with caution!"
local PKGLIST=$(__epm_orphan_altrpm | sed -e "s/\.32bit//g" | grep -v -- "^kernel") local PKGLIST=$(__epm_orphan_altrpm \
| sed -e "s/\.32bit//g" \
| grep -v -- "^kernel")
docmd epm remove $PKGLIST docmd epm remove $PKGLIST
;; ;;
apt-dpkg|aptitude-dpkg) apt-dpkg|aptitude-dpkg)
......
...@@ -32,11 +32,11 @@ __epm_autoremove_altrpm() ...@@ -32,11 +32,11 @@ __epm_autoremove_altrpm()
# https://www.altlinux.org/APT_в_ALT_Linux/Советы_по_использованию#apt-cache_list-nodeps # https://www.altlinux.org/APT_в_ALT_Linux/Советы_по_использованию#apt-cache_list-nodeps
showcmd "apt-cache list-nodeps | grep -- \"$libexclude\"" showcmd "apt-cache list-nodeps | grep -- \"$libexclude\""
pkgs=$(apt-cache list-nodeps | grep -- "$libexclude" | \ pkgs=$(apt-cache list-nodeps | grep -- "$libexclude" \
grep -E -v -- "-(devel|debuginfo)$" | \ | grep -E -v -- "-(devel|debuginfo)$" \
grep -E -v -- "-(util|tool|plugin|daemon)" | \ | grep -E -v -- "-(util|tool|plugin|daemon)" \
sed -e "s/\.32bit$//g" | \ | sed -e "s/\.32bit$//g" \
grep -E -v -- "^(libsystemd|libreoffice|libnss)" ) | grep -E -v -- "^(libsystemd|libreoffice|libnss)" )
[ -n "$pkgs" ] && sudocmd rpm -v -e $pkgs && flag=1 [ -n "$pkgs" ] && sudocmd rpm -v -e $pkgs && flag=1
info "Removing unused python/perl modules..." info "Removing unused python/perl modules..."
......
...@@ -39,7 +39,9 @@ print_binpkgfilelist() ...@@ -39,7 +39,9 @@ print_binpkgfilelist()
local PKGNAME=$(basename $2) local PKGNAME=$(basename $2)
find "$PKGDIR" ! -name '*\.src\.rpm' -name '*\.rpm' -execdir \ find "$PKGDIR" ! -name '*\.src\.rpm' -name '*\.rpm' -execdir \
rpmquery -p --qf='%{sourcerpm}\t%{name}-%{version}-%{release}.%{arch}.rpm\n' "{}" \; \ rpmquery -p --qf='%{sourcerpm}\t%{name}-%{version}-%{release}.%{arch}.rpm\n' "{}" \; \
| grep "^$PKGNAME[[:space:]].*" | cut -f2 | xargs -n1 -I "{}" echo -n "$PKGDIR/{} " | grep "^$PKGNAME[[:space:]].*" \
| cut -f2 \
| xargs -n1 -I "{}" echo -n "$PKGDIR/{} "
} }
# TODO: need try detect more strict # TODO: need try detect more strict
......
...@@ -35,15 +35,21 @@ __wcount() ...@@ -35,15 +35,21 @@ __wcount()
__detect_alt_release_by_repo() __detect_alt_release_by_repo()
{ {
local BRD=$(cat /etc/apt/sources.list /etc/apt/sources.list.d/*.list | \ local BRD=$(cat /etc/apt/sources.list /etc/apt/sources.list.d/*.list \
grep -v "^#" | grep "p[5-9]/branch/" | sed -e "s|.*\(p[5-9]\)/branch.*|\1|g" | sort -u ) | grep -v "^#" \
| grep "p[5-9]/branch/" \
| sed -e "s|.*\(p[5-9]\)/branch.*|\1|g" \
| sort -u )
if [ $(__wcount $BRD) = "1" ] ; then if [ $(__wcount $BRD) = "1" ] ; then
echo "$BRD" echo "$BRD"
return return
fi fi
local BRD=$(cat /etc/apt/sources.list /etc/apt/sources.list.d/*.list | \ local BRD=$(cat /etc/apt/sources.list /etc/apt/sources.list.d/*.list \
grep -v "^#" | grep "Sisyphus/" | sed -e "s|.*\(Sisyphus\).*|\1|g" | sort -u ) | grep -v "^#" \
| grep "Sisyphus/" \
| sed -e "s|.*\(Sisyphus\).*|\1|g" \
| sort -u )
if [ $(__wcount $BRD) = "1" ] ; then if [ $(__wcount $BRD) = "1" ] ; then
echo "$BRD" echo "$BRD"
return return
......
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