[yast-commit] r66493 - /trunk/yast2/library/network/src/refresh-srv-def-by-pkgs-trans.sh
Author: locilka Date: Thu Oct 20 11:32:47 2011 New Revision: 66493 URL: http://svn.opensuse.org/viewcvs/yast?rev=66493&view=rev Log: Hotfix: fixing script for generating translations for services defined by packages Modified: trunk/yast2/library/network/src/refresh-srv-def-by-pkgs-trans.sh Modified: trunk/yast2/library/network/src/refresh-srv-def-by-pkgs-trans.sh URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/network/src/refresh-srv-def-by-pkgs-trans.sh?rev=66493&r1=66492&r2=66493&view=diff ============================================================================== --- trunk/yast2/library/network/src/refresh-srv-def-by-pkgs-trans.sh (original) +++ trunk/yast2/library/network/src/refresh-srv-def-by-pkgs-trans.sh Thu Oct 20 11:32:47 2011 @@ -12,11 +12,7 @@ # configuration # DISTRO: distribution for `pdb` command DISTRO="stable-i386" -# DISTRODIR: distribution directory in /work -DISTRODIR="full-i386" -# definition of used directories -RPMDIRECTORY="/work/CDs/all/"$DISTRODIR"/suse" # must NOT begin with slash, needs to be relative! SUSEFWFILES="etc/sysconfig/SuSEfirewall2.d/*" # where new translations are stored @@ -58,8 +54,28 @@ exit 5 fi +# definition of used directories +RPMDIRECTORY=$1 + +if [ "$RPMDIRECTORY" == "" ]; then + echo "Please use $0 /path/to/a/mounted/installation/DVD/with/related/product" + echo + exit 6 +fi + +if [ ! -d $RPMDIRECTORY ]; then + echo "Directory $RPMDIRECTORY does not exist" + exit 6 +fi + +if [ ! -d $RPMDIRECTORY/suse ]; then + echo "Directory $RPMDIRECTORY does not contain SUSE distribution" + exit 6 +fi + # checks PDB for packages containing such files -AFFECTED=`pdb query --release stable-i386 --filter "rpmfile:/$SUSEFWFILES" --attribs packname | grep -v '^SuSEfirewall2[\t ]*$'` +# PDB certificate is invalid, PERL_LWP_SSL_VERIFY_HOSTNAME must be set to 0 +AFFECTED=`PERL_LWP_SSL_VERIFY_HOSTNAME=0 pdb query --release stable-i386 --filter "rpmfile:/$SUSEFWFILES" --attribs packname | grep -v '^SuSEfirewall2[\t ]*$'` # create temporary directory TMPDIR=`mktemp -d` @@ -77,7 +93,7 @@ # installs these files into a temporary directory for ONEPACKAGE in $AFFECTED; do echo "Package: "$ONEPACKAGE - rpm2cpio $RPMDIRECTORY/*/$ONEPACKAGE.rpm | cpio -idm --no-absolute-filenames "./$SUSEFWFILES" "$SUSEFWFILES" 2> /dev/null + rpm2cpio $RPMDIRECTORY/suse/*/$ONEPACKAGE-*.rpm | cpio -idm --no-absolute-filenames "./$SUSEFWFILES" "$SUSEFWFILES" 2> /dev/null ls -1 $TMPDIR/$SUSEFWFILES > $TMPDIR/now for CPIOEDFILE in `diff -u $TMPDIR/last $TMPDIR/now | grep "^\+[^\+]" | sed 's/\+//'`; do -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
locilka@svn2.opensuse.org