Commit 6e2b73b3 authored by Vitaly Lipatov's avatar Vitaly Lipatov

backported to M60P as 1.2.6-alt0.M60P.1 (with rpmbph script)

parents d64573ba 21989052
......@@ -104,7 +104,9 @@ if distro altlinux-release ; then
elif distro gentoo-release ; then
DISTRIB_ID="Gentoo"
DISTRIB_RELEASE=`basename $(readlink $ROOTDIR/etc/make.profile)`
MAKEPROFILE=$(readlink $ROOTDIR/etc/portage/make.profile 2>/dev/null) || MAKEPROFILE=$(readlink $ROOTDIR/etc/make.profile)
DISTRIB_RELEASE=`basename $MAKEPROFILE`
echo $DISTRIB_RELEASE | grep -q "[0-9]" || DISTRIB_RELEASE=`basename $(dirname $MAKEPROFILE)`
# Slackware based
elif distro mopslinux-version ; then
......
......@@ -145,6 +145,9 @@ check_command()
reinstall) # HELPCMD: reinstall package(s) from remote repositories or from local file
epm_cmd=reinstall
;;
Install) # HELPCMD: perform update package repo info and install package(s) via install command
epm_cmd=Install
;;
-q|installed) # HELPCMD: check presence of package(s)
epm_cmd=query
;;
......
#!/bin/sh
#
# Copyright (C) 2013 Etersoft
# Copyright (C) 2013 Vitaly Lipatov <lav@etersoft.ru>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
load_helper epm-update
load_helper epm-install
epm_Install()
{
# copied from epm_install
local names="$(echo $pkg_names | filter_out_installed_packages)"
local files="$(echo $pkg_files | filter_out_installed_packages)"
[ -z "$files$names" ] && echo "Skip empty install list" && return 22
# do update only if really need install something
case $PMTYPE in
yum-rpm)
;;
*)
epm_update || return
;;
esac
epm_install_names $names || return
epm_install_files $files
}
......@@ -30,5 +30,5 @@ epm_Upgrade()
;;
esac
epm_upgrade $pkg_filenames
epm_upgrade
}
......@@ -50,7 +50,7 @@ case $PMTYPE in
echo "You need manually add repo to /etc/slackpkg/mirrors"
;;
*)
fatal "Do not known command for $PMTYPE"
fatal "Have no suitable command for $PMTYPE"
;;
esac
......
......@@ -58,7 +58,7 @@ case $PMTYPE in
# sudocmd zypper clean
# ;;
*)
fatal "Do not known command for $PMTYPE"
fatal "Have no suitable command for $PMTYPE"
;;
esac
......
......@@ -31,7 +31,7 @@ __epm_changelog_files()
#
# ;;
*)
fatal "Do not known command for $PMTYPE"
fatal "Have no suitable command for $PMTYPE"
;;
esac
......@@ -57,7 +57,7 @@ __epm_changelog_local_names()
docmd pacman -Qc $1 | less
;;
*)
fatal "Do not known command for $PMTYPE"
fatal "Have no suitable command for $PMTYPE"
;;
esac
}
......@@ -84,7 +84,7 @@ __epm_changelog_unlocal_names()
# sudocmd zypper clean
# ;;
*)
fatal "Do not known command for $PMTYPE"
fatal "Have no suitable command for $PMTYPE"
;;
esac
......
......@@ -50,7 +50,7 @@ case $PMTYPE in
sudocmd zypper verify || exit
;;
*)
fatal "Do not known command for $PMTYPE"
fatal "Have no suitable command for $PMTYPE"
;;
esac
......
......@@ -88,20 +88,19 @@ check_pkg_integrity()
# TODO: Попробовать здесь оставить возможность перегрузки функций
case $EXT in
rpm)
docmd rpm --checksig $@
docmd rpm --checksig $1
;;
deb)
# FIXME: debsums -ca package ?
docmd dpkg --contents $@
docmd dpkg --contents $1 >/dev/null && echo "Package $1 is correct."
;;
bz2)
docmd bunzip -t $1
;;
#*)
# fatal "Unknown package extension '$EXT' in $PKG package"
# ;;
*)
check_${EXT}_integrity "$PKG" || fatal "Unknown package extension '$EXT' in $PKG package"
;;
esac
check_${EXT}_integrity "$PKG" || fatal "Unknown package extension '$EXT' in $PKG package"
}
__epm_check_installed_pkg()
......@@ -114,7 +113,7 @@ case $PMTYPE in
docmd debsums $@
;;
*)
fatal "Do not known command for $PMTYPE"
fatal "Have no suitable command for $PMTYPE"
;;
esac
......
......@@ -45,7 +45,7 @@ case $PMTYPE in
slackpkg)
;;
*)
fatal "Do not known command for $PMTYPE"
fatal "Have no suitable command for $PMTYPE"
;;
esac
echo "It is recommend to run 'epm autoremove' also"
......
......@@ -33,7 +33,7 @@ __epm_filelist_file()
CMD="dpkg --contents"
;;
*)
fatal "Do not known query command for $PMTYPE"
fatal "Have no suitable query command for $PMTYPE"
;;
esac
......@@ -72,7 +72,7 @@ __epm_filelist_name()
return
;;
*)
fatal "Do not known query command for $PMTYPE"
fatal "Have no suitable query command for $PMTYPE"
;;
esac
......
......@@ -74,7 +74,7 @@ case $PMTYPE in
docmd ipkg info $pkg_names
;;
*)
fatal "Do not known command for $PMTYPE"
fatal "Have no suitable command for $PMTYPE"
;;
esac
......
#!/bin/sh
#
# Copyright (C) 2012-13 Etersoft
# Copyright (C) 2012-13 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012-2013 Etersoft
# Copyright (C) 2012-2013 Vitaly Lipatov <lav@etersoft.ru>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
......@@ -29,10 +29,11 @@ filter_out_installed_packages()
LANG=C LC_ALL=C xargs -n1 rpm -q 2>&1 | grep 'is not installed' |
sed -e 's|^.*package \(.*\) is not installed.*|\1|g'
;;
"deb")
LANG=C LC_ALL=C xargs -n1 dpkg -l 2>&1 | grep -i 'no packages found matching' |
sed -e 's|\.\+$||g' -e 's|^.*[Nn]o packages found matching \(.*\)|\1|g'
;;
# dpkg -l lists some non ii status (un, etc)
#"deb")
# LANG=C LC_ALL=C xargs -n1 dpkg -l 2>&1 | grep -i 'no packages found matching' |
# sed -e 's|\.\+$||g' -e 's|^.*[Nn]o packages found matching \(.*\)|\1|g'
# ;;
*)
for i in $(cat) ; do
is_installed $i || echo $i
......@@ -41,71 +42,10 @@ filter_out_installed_packages()
esac | sed -e "s|rpm-build-altlinux-compat[^ ]*||g" | filter_strip_spaces
}
# http://ru.gentoo-wiki.com/wiki/Portage_Overlay
# http://kb.etersoft.ru/Gentoo:_Установка_продуктов_Etersoft
# http://linuxreviews.org/gentoo/ebuilds/
#
# install one ebuild
__emerge_install_ebuild()
{
local EBUILD="$1"
[ -s "$EBUILD" ] || fatal ".ebuild file '$EBUILD' is missing"
# load ebuild and get vars
. $EBUILD
[ -n "$SRC_URI" ] || fatal "Can't load SRC_URI from $EBUILD"
# try to detect tarballs
local TARBALLS=
local BASEDIR=$(dirname $EBUILD)
for i in $SRC_URI ; do
[ -s "$BASEDIR/$(basename $i)" ] || continue
TARBALLS="$TARBALLS $BASEDIR/$(basename $i)"
done
local PORTAGENAME=epm
local LP=/usr/local/portage/$PORTAGENAME
sudocmd mkdir -p $LP/
if ! grep -v "^#" /etc/make.conf | grep -q $LP ; then
sudocmd echo 'PORTDIR_OVERLAY="$LP \${PORTDIR_OVERLAY}"' >>/etc/make.conf
# Overlay name
sudocmd mkdir -p $LP/profiles/
sudocmd echo "$PORTAGENAME" > $LP/profiles/repo_name
fi
# copy tarballs
local DDIR=/usr/portage/distfiles
[ -d /var/calculate/remote/distfiles ] && DDIR=/var/calculate/remote/distfiles
sudocmd cp -f $TARBALLS $DDIR/ || return
# copy ebuild
sudocmd cp -f $EBUILD $LP/ || return
cd $LP
sudocmd ebuild $(basename $EBUILD) digest
cd -
# FIXME: more correcty get name
local PKGNAME=$(echo $EBUILD | sed -e "s|-[0-9].*||g")
sudocmd emerge -av $PKGNAME || return
}
# install ebuild list
__emerge_install()
# for zypper before SUSE/11.0
__use_zypper_no_gpg_checks()
{
local EBUILD=
#local TARBALLS=
local i
# search ebuild in the args
for i in $* ; do
if echo $i | grep -q ebuild ; then
[ -s "$EBUILD" ] || fatal "Can't find .ebuild file in $*"
__emerge_install_ebuild $i
continue
# else
# TARBALLS="$TARBALLS $i"
fi
done
a= zypper install --help 2>&1 | grep -q -- "--no-gpg-checks" && echo "--no-gpg-checks"
}
# copied from etersoft-build-utils/share/eterbuild/functions/rpmpkg
......@@ -179,7 +119,7 @@ epm_install_names()
[ -n "$pkg_installed" ] && sudocmd nix-env --upgrade $pkg_installed
return ;;
*)
fatal "Do not known install command for $PMTYPE"
fatal "Have no suitable install command for $PMTYPE"
;;
esac
}
......@@ -234,7 +174,7 @@ epm_ni_install_names()
[ -n "$pkg_installed" ] && sudocmd /usr/sbin/slackpkg -batch=on -default_answer=yes upgrade $pkg_installed
return ;;
*)
fatal "Do not known appropriate install command for $PMTYPE"
fatal "Have no suitable appropriate install command for $PMTYPE"
;;
esac
}
......@@ -279,7 +219,7 @@ epm_install_files()
# if run with --nodeps, do not fallback on hi level
[ -n "$nodeps" ] && return
ZYPPEROPTIONS=--no-gpg-checks
ZYPPEROPTIONS=$(__use_zypper_no_gpg_checks)
# use install_names
;;
urpm-rpm)
......@@ -294,7 +234,8 @@ epm_install_files()
sudocmd pkg_add $@
return ;;
emerge)
__emerge_install $@
load_helper epm-install-emerge
sudocmd epm_install_emerge $@
return ;;
pacman)
sudocmd pacman -U --noconfirm $force $nodeps $@ && return
......@@ -322,10 +263,10 @@ epm_print_install_command()
pkgsrc)
echo "pkg_add $@"
;;
#emerge)
# # it is better to use epm
# echo "tar xvfj $@ -C /"
# ;;
emerge)
# need be placed in /usr/portage/packages/somewhere
echo "emerge --usepkg $@"
;;
pacman)
echo "pacman -U --noconfirm --force $nodeps $@"
;;
......@@ -339,7 +280,7 @@ epm_print_install_command()
echo "ipkg install $@"
;;
*)
fatal "Do not known appropriate install command for $PMTYPE"
fatal "Have no suitable appropriate install command for $PMTYPE"
;;
esac
}
......
#!/bin/sh
#
# Copyright (C) 2012-2013 Etersoft
# Copyright (C) 2012-2013 Vitaly Lipatov <lav@etersoft.ru>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# This functions already run as root
# http://ru.gentoo-wiki.com/wiki/Portage_Overlay
# http://kb.etersoft.ru/Gentoo:_Установка_продуктов_Etersoft
# http://linuxreviews.org/gentoo/ebuilds/
# install one ebuild
__emerge_install_ebuild()
{
local EBUILD="$1"
[ -s "$EBUILD" ] || fatal ".ebuild file '$EBUILD' is missing"
# load ebuild and get vars
. $(pwd)/$EBUILD
[ -n "$SRC_URI" ] || fatal "Can't load SRC_URI from $EBUILD"
# try to detect tarballs
local TARBALLS=
local BASEDIR=$(dirname $EBUILD)
for i in $SRC_URI ; do
[ -s "$BASEDIR/$(basename $i)" ] || continue
TARBALLS="$TARBALLS $BASEDIR/$(basename $i)"
done
local PORTAGENAME=epm
local LP=/usr/local/portage/$PORTAGENAME
docmd mkdir -p $LP/
MAKECONF=/etc/portage/make.conf
[ -r "$MAKECONF" ] || MAKECONF=/etc/make.conf
if ! grep -v "^#" $MAKECONF | grep -q $LP ; then
echo "PORTDIR_OVERLAY=\"$LP \${PORTDIR_OVERLAY}\"" >>$MAKECONF
# Overlay name
mkdir -p $LP/profiles/
echo "$PORTAGENAME" > $LP/profiles/repo_name
fi
# copy tarballs
local DDIR=/usr/portage/distfiles
[ -d /var/calculate/remote/distfiles ] && DDIR=/var/calculate/remote/distfiles
docmd cp -f $TARBALLS $DDIR/ || return
# copy ebuild
docmd cp -f $EBUILD $LP/ || return
cd $LP
docmd ebuild $(basename $EBUILD) digest
cd -
# FIXME: more correcty get name
local PKGNAME=$(echo $EBUILD | sed -e "s|-[0-9].*||g")
docmd emerge -av $PKGNAME || return
}
# install one ebuild
__emerge_install_tbgz2()
{
local TGDIR=/usr/portage/packages/app-arch
mkdir -p $TGDIR
cp $i $TGDIR || return
docmd emerge --usepkg $TGDIR/$(basename $i) || return
}
# install ebuild list
epm_install_emerge()
{
local EBUILD=
#local TARBALLS=
local i
# search ebuild in the args
for i in $* ; do
if echo $i | grep -q ebuild ; then
__emerge_install_ebuild $i || return
elif echo $i | grep -q "\.tbz2$" ; then
__emerge_install_tbz2 $i || return
# else
# TARBALLS="$TARBALLS $i"
fi
done
}
......@@ -29,7 +29,7 @@ epm_kernel_update()
case $PMTYPE in
*)
fatal "Do not known command for $PMTYPE"
fatal "Have no suitable command for $PMTYPE"
;;
esac
}
......@@ -69,7 +69,7 @@ case $PMTYPE in
CMD="ipkg list"
;;
*)
fatal "Do not known query command for $PMTYPE"
fatal "Have no suitable query command for $PMTYPE"
;;
esac
......
......@@ -33,7 +33,7 @@ case $PMTYPE in
# return
# ;;
*)
fatal "Do not known command for $PMTYPE"
fatal "Have no suitable command for $PMTYPE"
;;
esac
......@@ -52,7 +52,7 @@ case $PMTYPE in
if is_installed $pkg_names ; then
CMD="rpm -q --provides"
else
# FIXME: use hi level commands
fatal "FIXME: use hi level commands"
fi
;;
emerge)
......@@ -65,7 +65,7 @@ case $PMTYPE in
# CMD="apt-cache depends"
# ;;
*)
fatal "Do not known command for $PMTYPE"
fatal "Have no suitable command for $PMTYPE"
;;
esac
......
......@@ -93,7 +93,7 @@ __do_query()
CMD="ipkg files"
;;
*)
fatal "Do not known query command for $PMTYPE"
fatal "Have no suitable query command for $PMTYPE"
;;
esac
......@@ -124,7 +124,7 @@ __do_short_query()
return
;;
*)
fatal "Do not known query command for $PMTYPE"
fatal "Have no suitable query command for $PMTYPE"
;;
esac
......
......@@ -60,7 +60,7 @@ epm_release_upgrade()
epm Upgrade
;;
*)
fatal "Do not known command for $PMTYPE"
fatal "Have no suitable command for $PMTYPE"
;;
esac
......
......@@ -101,7 +101,7 @@ epm_remove_names()
sudocmd ipkg $force remove $@
return ;;
*)
fatal "Do not known command for $PMTYPE"
fatal "Have no suitable command for $PMTYPE"
;;
esac
}
......@@ -160,7 +160,7 @@ epm_print_remove_command()
echo "ipkg remove $@"
;;
*)
fatal "Do not known appropriate remove command for $PMTYPE"
fatal "Have no suitable appropriate remove command for $PMTYPE"
;;
esac
}
......
......@@ -48,7 +48,7 @@ case $PMTYPE in
echo "You need remove repo from /etc/slackpkg/mirrors"
;;
*)
fatal "Do not known command for $PMTYPE"
fatal "Have no suitable command for $PMTYPE"
;;
esac
......
......@@ -63,7 +63,7 @@ case $PMTYPE in
docmd grep -v -- "^#\|^$" /etc/slackpkg/mirrors
;;
*)
fatal "Do not known command for $PMTYPE"
fatal "Have no suitable command for $PMTYPE"
;;
esac
......
......@@ -33,7 +33,7 @@ case $PMTYPE in
return
;;
*)
fatal "Do not known command for $PMTYPE"
fatal "Have no suitable command for $PMTYPE"
;;
esac
......@@ -55,7 +55,7 @@ case $PMTYPE in
CMD="apt-cache depends"
;;
*)
fatal "Do not known command for $PMTYPE"
fatal "Have no suitable command for $PMTYPE"
;;
esac
......
......@@ -72,7 +72,7 @@ case $PMTYPE in
CMD="brew search"
;;
*)
fatal "Do not known search command for $PMTYPE"
fatal "Have no suitable search command for $PMTYPE"
;;
esac
......
......@@ -75,7 +75,7 @@ case $PMTYPE in
CMD="ipkg search"
;;
*)
fatal "Do not known search file command for $PMTYPE"
fatal "Have no suitable search file command for $PMTYPE"
;;
esac
......
......@@ -232,7 +232,7 @@ case $DISTRNAME in
CMD="ipkg"
;;
*)
fatal "Do not known DISTRNAME $DISTRNAME"
fatal "Have no suitable DISTRNAME $DISTRNAME"
;;
esac
PMTYPE=$CMD
......
......@@ -93,7 +93,7 @@ _epm_do_simulate()
done
return $res ;;
*)
fatal "Do not known simulate command for $PMTYPE"
fatal "Have no suitable simulate command for $PMTYPE"
;;
esac
......
......@@ -67,7 +67,7 @@ case $PMTYPE in
sudocmd ipkg update
;;
*)
fatal "Do not known update command for $PMTYPE"
fatal "Have no suitable update command for $PMTYPE"
;;
esac
......
......@@ -66,7 +66,7 @@ epm_upgrade()
CMD="/usr/sbin/slackpkg upgrade-all"
;;
*)
fatal "Do not known command for $PMTYPE"
fatal "Have no suitable command for $PMTYPE"
;;
esac
......
......@@ -34,7 +34,7 @@ case $PMTYPE in
CMD="equery depends -a"
;;
*)
fatal "Do not known command for $PMTYPE"
fatal "Have no suitable command for $PMTYPE"
;;
esac
......
......@@ -91,7 +91,7 @@ case $DISTRNAME in
# CMD="chocolatey"
# ;;
*)
fatal "Do not known DISTRNAME $DISTRNAME yet"
fatal "Have no suitable DISTRNAME $DISTRNAME yet"
;;
esac
......
......@@ -33,7 +33,7 @@ serv_common()
sudocmd systemctl "$@" $SERVICE
;;
*)
fatal "Do not known command for $SERVICETYPE"
fatal "Have no suitable command for $SERVICETYPE"
;;
esac
......
......@@ -37,7 +37,7 @@ serv_disable()
sudocmd systemctl disable $1
;;
*)
fatal "Do not known command for $SERVICETYPE"
fatal "Have no suitable command for $SERVICETYPE"
;;
esac
}
......@@ -37,7 +37,7 @@ serv_enable()
sudocmd systemctl enable $1
;;
*)
fatal "Do not known command for $SERVICETYPE"
fatal "Have no suitable command for $SERVICETYPE"
;;
esac
......
......@@ -32,7 +32,7 @@ serv_list_all()
sudocmd systemctl list-unit-files
;;
*)
fatal "Do not known command for $SERVICETYPE"
fatal "Have no suitable command for $SERVICETYPE"
;;
esac
}
......@@ -31,7 +31,7 @@ serv_list_startup()
# sudocmd systemctl list-unit-files
# ;;
*)
fatal "Do not known command for $SERVICETYPE"
fatal "Have no suitable command for $SERVICETYPE"
;;
esac
}
......@@ -34,7 +34,7 @@ serv_start()
sudocmd systemctl start "$SERVICE" "$@"
;;
*)
fatal "Do not known command for $SERVICETYPE"
fatal "Have no suitable command for $SERVICETYPE"
;;
esac
}
......@@ -32,7 +32,7 @@ is_service_running()
fatal "FIXME: don't know how detect current startup state"
;;
*)
fatal "Do not known command for $SERVICETYPE"
fatal "Have no suitable command for $SERVICETYPE"
;;
esac
}
......@@ -51,7 +51,7 @@ is_service_autostart()
sudocmd systemctl is-enabled $1.service
;;
*)
fatal "Do not known command for $SERVICETYPE"
fatal "Have no suitable command for $SERVICETYPE"
;;
esac
}
......@@ -74,7 +74,7 @@ serv_status()
sudocmd systemctl status $SERVICE.service "$@"
;;
*)
fatal "Do not known command for $SERVICETYPE"
fatal "Have no suitable command for $SERVICETYPE"
;;
esac
}
......@@ -34,7 +34,7 @@ serv_stop()
sudocmd systemctl stop $SERVICE "$@"
;;
*)
fatal "Do not known command for $SERVICETYPE"
fatal "Have no suitable command for $SERVICETYPE"
;;
esac
}
......@@ -38,7 +38,7 @@ serv_try_restart()
sudocmd systemctl try-restart $SERVICE "$@"
;;
*)
fatal "Do not known command for $SERVICETYPE"
fatal "Have no suitable command for $SERVICETYPE"
;;
esac
}
......@@ -41,7 +41,7 @@ serv_usage()
sudocmd systemctl $SERVICE 2>&1
;;
*)
fatal "Do not known command for $SERVICETYPE"
fatal "Have no suitable command for $SERVICETYPE"
;;
esac
......
# This spec is backported to ALTLinux p6 automatically by rpmbph script. Do not edit it.
#
Name: eepm
Version: 1.2.4
Version: 1.2.6
Release: alt0.M60P.1
Summary: Etersoft EPM package manager
......@@ -59,9 +59,18 @@ install -m 0644 bash_completion/serv %buildroot%_sysconfdir/bash_completion.d/se
%_sysconfdir/bash_completion.d/serv
%changelog
* Mon Mar 04 2013 Vitaly Lipatov <lav@altlinux.ru> 1.2.4-alt0.M60P.1
* Tue Apr 30 2013 Vitaly Lipatov <lav@altlinux.ru> 1.2.6-alt0.M60P.1
- backport to ALTLinux p6 (by rpmbph script)
* Tue Apr 30 2013 Vitaly Lipatov <lav@altlinux.ru> 1.2.6-alt1
- epm Install: do package base update only if really need install something
* Thu Mar 21 2013 Vitaly Lipatov <lav@altlinux.ru> 1.2.5-alt1
- distr_info: add more correct support for Gentoo
- epm-install: add check for zypper's --no-gpg-checks
- epm-install: more strong installed status
- add Install command (update packages repo info and install package)
* Mon Mar 04 2013 Vitaly Lipatov <lav@altlinux.ru> 1.2.4-alt1
- epm-install: add support for direct install ebuild
- realize epm simulate for emerge
......
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