Package: googleearth-package Version: 0.6.1 Severity: important Tags: patch
Hi! I have a serious problem here. $ make-googleearth-package -> download GoogleEarthLinux.bin but... doesn't create a debian package and ERASES the downloaded file afterwhile! $ wget http://dl.google.com/earth/client/current/GoogleEarthLinux.bin $ make-googleearth-package -> still doesn't create a debian package but still ERASES my precious file! Patch attached, that prevents the script to delete the file without an explicit --cleanup option. -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (800, 'testing'), (750, 'stable'), (500, 'oldstable'), (50, 'experimental'), (50, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 3.0.0-1-amd64 (SMP w/2 CPU cores) Locale: LANG=fr_FR.utf-8, LC_CTYPE=fr_FR.utf-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages googleearth-package depends on: ii bzip2 1.0.5-7 ii curl 7.21.7-3 ii dpkg-dev 1.16.1.1 ii fakeroot 1.18.1-1 ii file 5.09-1 ii wget 1.13.4-custom ii x11-common 1:7.6+9 ii x11-utils 7.6+3 googleearth-package recommends no packages. googleearth-package suggests no packages. -- no debconf information
--- a/make-googleearth-package +++ b/make-googleearth-package @@ -447,14 +447,15 @@ cd .. find "$instdir" -type d -print0 | xargs -0 chmod 755 - fakeroot dpkg-deb -b "$instdir" . >&2 - - if [ "$?" == "0" ] && [ "$OPT_CLEANUP" == "1" ]; then - rm -f "$OPT_FILE" + if ( fakeroot dpkg-deb -b "$instdir" . >&2 ; ) ; then + rm -rf "$instdir" "$tmpdir" + return 0 + else + rm -rf "$instdir" "$tmpdir" + [ "$OPT_CLEANUP" == "1" ] && rm -f "$OPT_FILE" + echo "Failure! No package was built." + exit 1 fi - - rm -rf "$instdir" "$tmpdir" - } parse_args "$@" || usage || exit $? @@ -466,6 +467,6 @@ verify_architecture check_version || exit $? build_package || exit $? -rm -f GoogleEarthLinux.bin +[ "$OPT_CLEANUP" == "1" ] && rm -f "$OPT_FILE" echo 'Success!' echo 'You can now install the package with e.g. sudo dpkg -i <package>.deb'

