[opensuse-packaging] error: %post(yum-3.2.8-11.2.x86_64) scriptlet failed
![](https://seccdn.libravatar.org/avatar/164a625f3a558d1dac0727ce6a3ba850.jpg?s=120&d=mm&r=g)
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 -- Werner Flamme, Abt. WKDV Helmholtz-Zentrum für Umweltforschung GmbH - UFZ Permoserstr. 15 - 04318 Leipzig Tel.: (0341) 235-1921 - Fax (0341) 235-451921 http://www.ufz.de - eMail: werner.flamme@ufz.de --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/1dfd44208f79ea277c718b3f78367486.jpg?s=120&d=mm&r=g)
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, Tech. Project Management, Research & Development SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/e59fceda04e2c8d8c993a975a5657d9e.jpg?s=120&d=mm&r=g)
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
![](https://seccdn.libravatar.org/avatar/1dfd44208f79ea277c718b3f78367486.jpg?s=120&d=mm&r=g)
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
-- Christoph Thiel, Tech. Project Management, Research & Development SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (3)
-
Christoph Thiel
-
Pavol Rusnak
-
Werner Flamme