Hi,
I updated yum via apt :-) and got:
warning: /etc/yum.repos.d/* moved to /etc/yum/repos.d/* mv: cannot stat `/etc/yum.repos.d/*': No such file or directory error: %post(yum-3.2.8-11.2.x86_64) scriptlet failed, exit status 1
Maybe a construct like NOFFILES=$(LANG=C ls -lR /etc/yum.repos.d/ | tail -n 1 | cut -d' ' -f2) if [ "$NOFFILES" -ne 0 ]; then ... will avoid the error? ;-)
Regards, Werner
On Wed, Jan 23, 2008 at 03:58:24PM +0100, Werner Flamme wrote:
I updated yum via apt :-) and got:
warning: /etc/yum.repos.d/* moved to /etc/yum/repos.d/* mv: cannot stat `/etc/yum.repos.d/*': No such file or directory error: %post(yum-3.2.8-11.2.x86_64) scriptlet failed, exit status 1
Maybe a construct like NOFFILES=$(LANG=C ls -lR /etc/yum.repos.d/ | tail -n 1 | cut -d' ' -f2) if [ "$NOFFILES" -ne 0 ]; then ... will avoid the error? ;-)
Any patch to the specfile will be greatly appreciated ;)
Best, Christoph
Christoph Thiel wrote:
Any patch to the specfile will be greatly appreciated ;)
Problems is that expression /etc/yum.repos.d/* will expand to /etc/yum.repos.d/* when there are no files in /etc/yum.repos.d directory. Short hack is attached (not tested though :))
Thank you very much. Applied.
Best, Christoph
On Wed, Jan 23, 2008 at 04:29:40PM +0100, Pavol Rusnak wrote:
Christoph Thiel wrote:
Any patch to the specfile will be greatly appreciated ;)
Problems is that expression /etc/yum.repos.d/* will expand to /etc/yum.repos.d/* when there are no files in /etc/yum.repos.d directory. Short hack is attached (not tested though :))
-- Best Regards / S pozdravom,
Pavol RUSNAK SUSE LINUX, s.r.o Package Maintainer Lihovarska 1060/12 PGP 0xA6917144 19000 Praha 9, CR prusnak[at]suse.cz http://www.suse.cz
--- yum.spec +++ yum.spec @@ -136,10 +136,11 @@ if [ -e "$OCONF" ] ; then mv "$OCONF" "$NCONF" fi # migrate /etc/yum.repos.d to /etc/yum/repos.d/ -if [ -e "/etc/yum.repos.d" ] ; then +if [ -d "/etc/yum.repos.d" ] ; then if [ ! -d "/etc/yum/repos.d" ] ; then mkdir "/etc/yum/repos.d" fi
- if [ "/etc/yum.repos.d/*" != '/etc/yum.repos.d/*']; then for i in /etc/yum.repos.d/*; do NCONF="/etc/yum/repos.d/`basename $i`"
@@ -152,6 +153,7 @@ if [ -e "/etc/yum.repos.d" ] ; then echo "warning: $OCONF moved to $NCONF" >&2 mv "$OCONF" "$NCONF" done
- fi
fi
%clean