Hello community, here is the log from the commit of package yast2-backup checked in at Mon Jul 31 16:45:40 CEST 2006. -------- --- yast2-backup/yast2-backup.changes 2006-05-09 15:21:24.000000000 +0200 +++ yast2-backup/yast2-backup.changes 2006-07-31 11:27:00.000000000 +0200 @@ -1,0 +2,8 @@ +Mon Jul 31 11:09:11 CEST 2006 - locilka@suse.cz + +- Do not add the suffix .tar to a backup destination if the file is + a block device or lies under the /dev/ path (#185042). +- Adjusted testsuite. +- 2.13.3 + +------------------------------------------------------------------- Old: ---- yast2-backup-2.13.2.tar.bz2 New: ---- yast2-backup-2.13.3.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-backup.spec ++++++ --- /var/tmp/diff_new_pack.Mwtr5i/_old 2006-07-31 16:45:24.000000000 +0200 +++ /var/tmp/diff_new_pack.Mwtr5i/_new 2006-07-31 16:45:24.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package yast2-backup (Version 2.13.2) +# spec file for package yast2-backup (Version 2.13.3) # # Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -11,12 +11,12 @@ # norootforbuild Name: yast2-backup -Version: 2.13.2 -Release: 2 +Version: 2.13.3 +Release: 1 License: GPL Group: System/YaST BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-backup-2.13.2.tar.bz2 +Source0: yast2-backup-2.13.3.tar.bz2 prefix: /usr BuildRequires: autoyast2-installation perl-XML-Writer update-desktop-files yast2 yast2-bootloader yast2-devtools yast2-network yast2-nfs-client yast2-testsuite yast2-tune yast2-update Summary: YaST2 - System Backup @@ -38,7 +38,7 @@ Ladislav Slezak <lslezak@suse.cz> %prep -%setup -n yast2-backup-2.13.2 +%setup -n yast2-backup-2.13.3 %build %{prefix}/bin/y2tool y2autoconf @@ -78,6 +78,11 @@ %doc %{prefix}/share/doc/packages/yast2-backup %changelog -n yast2-backup +* Mon Jul 31 2006 - locilka@suse.cz +- Do not add the suffix .tar to a backup destination if the file is + a block device or lies under the /dev/ path (#185042). +- Adjusted testsuite. +- 2.13.3 * Tue May 09 2006 - locilka@suse.cz - Fixing UI behavior when searching for modified files. Now it does not cut filenames off and a seach progress is bigger (#172406). ++++++ yast2-backup-2.13.2.tar.bz2 -> yast2-backup-2.13.3.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-backup-2.13.2/VERSION new/yast2-backup-2.13.3/VERSION --- old/yast2-backup-2.13.2/VERSION 2006-05-09 15:14:18.000000000 +0200 +++ new/yast2-backup-2.13.3/VERSION 2006-07-31 11:08:58.000000000 +0200 @@ -1 +1 @@ -2.13.2 +2.13.3 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-backup-2.13.2/configure new/yast2-backup-2.13.3/configure --- old/yast2-backup-2.13.2/configure 2006-05-09 15:22:23.000000000 +0200 +++ new/yast2-backup-2.13.3/configure 2006-07-31 11:27:57.000000000 +0200 @@ -1,8 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for yast2-backup 2.13.2. +# Generated by GNU Autoconf 2.59 for yast2-backup 2.13.3. # -# Report bugs to <http://www.suse.de/feedback>. +# Report bugs to <http://bugs.opensuse.org/>. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation @@ -269,9 +269,9 @@ # Identity of this package. PACKAGE_NAME='yast2-backup' PACKAGE_TARNAME='yast2-backup' -PACKAGE_VERSION='2.13.2' -PACKAGE_STRING='yast2-backup 2.13.2' -PACKAGE_BUGREPORT='http://www.suse.de/feedback' +PACKAGE_VERSION='2.13.3' +PACKAGE_STRING='yast2-backup 2.13.3' +PACKAGE_BUGREPORT='http://bugs.opensuse.org/' ac_unique_file="RPMNAME" ac_default_prefix=/usr @@ -728,7 +728,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures yast2-backup 2.13.2 to adapt to many kinds of systems. +\`configure' configures yast2-backup 2.13.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -795,7 +795,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of yast2-backup 2.13.2:";; + short | recursive ) echo "Configuration of yast2-backup 2.13.3:";; esac cat <<\_ACEOF @@ -812,7 +812,7 @@ Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to <http://www.suse.de/feedback>. +Report bugs to <http://bugs.opensuse.org/>. _ACEOF fi @@ -908,7 +908,7 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -yast2-backup configure 2.13.2 +yast2-backup configure 2.13.3 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -922,7 +922,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by yast2-backup $as_me 2.13.2, which was +It was created by yast2-backup $as_me 2.13.3, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1652,7 +1652,7 @@ # Define the identity of the package. PACKAGE='yast2-backup' - VERSION='2.13.2' + VERSION='2.13.3' cat >>confdefs.h <<_ACEOF @@ -1863,7 +1863,7 @@ -VERSION="2.13.2" +VERSION="2.13.3" RPMNAME="yast2-backup" MAINTAINER="Lukas Ocilka <locilka@suse.cz>" @@ -2693,7 +2693,7 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by yast2-backup $as_me 2.13.2, which was +This file was extended by yast2-backup $as_me 2.13.3, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -2748,7 +2748,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -yast2-backup config.status 2.13.2 +yast2-backup config.status 2.13.3 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-backup-2.13.2/configure.in new/yast2-backup-2.13.3/configure.in --- old/yast2-backup-2.13.2/configure.in 2006-05-09 15:22:11.000000000 +0200 +++ new/yast2-backup-2.13.3/configure.in 2006-07-31 11:27:53.000000000 +0200 @@ -1,9 +1,9 @@ dnl configure.in for yast2-backup dnl -dnl -- This file is generated by y2autoconf 2.13.17 - DO NOT EDIT! -- +dnl -- This file is generated by y2autoconf 2.13.19 - DO NOT EDIT! -- dnl (edit configure.in.in instead) -AC_INIT(yast2-backup, 2.13.2, http://www.suse.de/feedback, yast2-backup) +AC_INIT(yast2-backup, 2.13.3, http://bugs.opensuse.org/, yast2-backup) dnl Check for presence of file 'RPMNAME' AC_CONFIG_SRCDIR([RPMNAME]) @@ -17,7 +17,7 @@ AM_INIT_AUTOMAKE(tar-ustar) dnl searches for some needed programs dnl Important YaST2 variables -VERSION="2.13.2" +VERSION="2.13.3" RPMNAME="yast2-backup" MAINTAINER="Lukas Ocilka <locilka@suse.cz>" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-backup-2.13.2/src/functions.ycp new/yast2-backup-2.13.3/src/functions.ycp --- old/yast2-backup-2.13.2/src/functions.ycp 2006-02-03 08:49:17.000000000 +0100 +++ new/yast2-backup-2.13.3/src/functions.ycp 2006-07-31 11:12:17.000000000 +0200 @@ -8,7 +8,7 @@ * Authors: * Ladislav Slezak <lslezak@suse.cz> * - * $Id: functions.ycp 24423 2005-07-28 10:40:49Z locilka $ + * $Id: functions.ycp 32051 2006-07-31 09:13:47Z locilka $ * * Functions used by backup module. */ @@ -23,6 +23,7 @@ import "Popup"; import "FileUtils"; import "Mode"; +import "FileUtils"; textdomain "backup"; @@ -392,6 +393,9 @@ /** * Add extension to the file name if it is missing. + * This function skips adding when the file is under the /dev/ path + * or when it is an existing device file. + * * @param file filname * @param extension file extension (with dot) * @return string filename with extension @@ -399,16 +403,32 @@ * @example AddMissingExtension("filename.tar", ".gz") -> "filename.tar.gz" * @example AddMissingExtension("filename.tar", ".tar") -> "filename.tar" */ - define string AddMissingExtension(string file, string extension) -``{ + define string AddMissingExtension(string file, string extension) { // input check - if (file == nil) - { + if (file == nil) { return ""; } - if (extension == nil) - { + if (extension == nil) { + return file; + } + + // removing unneded slashes + if (regexpmatch(file, "^/")) { + file = regexpsub(file, "^/+(.*)", "/\\1"); + } + + // skip if the file is a block device + if (FileUtils::Exists(file) && FileUtils::GetFileType(file) == "block") { + y2milestone("Leaving destination unchanged, '%1' is a block device", file); + + return file; + } + + // skipping /dev/ directory + if (regexpmatch(file, "^/dev/")) { + y2milestone("Leaving destination unchanged, '%1' is under the /dev/ directory", file); + return file; } @@ -418,18 +438,14 @@ string result = ""; // check if file can contain extension - if (size(filename) >= size(extension)) - { + if (size(filename) >= size(extension)) { // add extension only if it is missing filename = (substring(filename, size(filename) - size(extension)) != extension) ? filename + extension : filename; - } - else - { + } else { filename = filename + extension; } - if (size(dirs) > 0) - { + if (size(dirs) > 0) { dirs = remove(dirs, size(dirs) - 1); } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-backup-2.13.2/testsuite/tests/AddMissingExtension.out new/yast2-backup-2.13.3/testsuite/tests/AddMissingExtension.out --- old/yast2-backup-2.13.2/testsuite/tests/AddMissingExtension.out 2006-02-03 08:49:18.000000000 +0100 +++ new/yast2-backup-2.13.3/testsuite/tests/AddMissingExtension.out 2006-07-31 11:21:08.000000000 +0200 @@ -12,3 +12,4 @@ Return /dir.ext/.ext Return /dir.ext/file.ext Return /dir1.ext/dir2.ext/file.ext +Return /dev/nst0 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-backup-2.13.2/testsuite/tests/AddMissingExtension.ycp new/yast2-backup-2.13.3/testsuite/tests/AddMissingExtension.ycp --- old/yast2-backup-2.13.2/testsuite/tests/AddMissingExtension.ycp 2006-02-03 08:49:18.000000000 +0100 +++ new/yast2-backup-2.13.3/testsuite/tests/AddMissingExtension.ycp 2006-07-31 11:27:16.000000000 +0200 @@ -4,13 +4,22 @@ // // testedfiles: backup/functions.ycp // -// $Id: AddMissingExtension.ycp 17877 2004-06-16 14:39:16Z lslezak $ +// $Id: AddMissingExtension.ycp 32052 2006-07-31 09:28:49Z locilka $ // { import "Testsuite"; -map readmap = $[ "target" : $["string" : "", "size" : -1, "tmpdir" : "/tmp" ], +map readmap = $[ + "target" : $[ + "string" : "", "size" : -1, "tmpdir" : "/tmp", + "stat" : $[ + "atime":1101890288, "ctime":1101890286, "gid":0, + "inode":29236, "isblock":true, "ischr":false, "isdir":false, + "isfifo":false, "islink":false, "isreg":false, "issock":false, "mtime":1101890286, + "nlink":1, "size":804, "uid":0 + ] + ], "proc" : $["cpuinfo" : $[ "value" : $["0" : $[ "flags" : ""]]]], "probe" : $["has_smp" : false, "is_uml" : false, "cdrom" : $["manual" : []]], ]; @@ -36,5 +45,9 @@ Testsuite::Test( ``(AddMissingExtension("/dir.ext/file.ext", ".ext") ), [ $[], $[], $[] ], nil ); Testsuite::Test( ``(AddMissingExtension("/dir1.ext/dir2.ext/file", ".ext") ), [ $[], $[], $[] ], nil ); +// '/dev/' and block devices should not be bothered by adding an extension +// bugzilla #185042 +// see "target" : $[ "stat" : $[] ] +Testsuite::Test( ``(AddMissingExtension("/dev/nst0", ".ext") ), [ $[], $[], $[] ], nil ); } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit-unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit-help@opensuse.org
participants (1)
-
root@suse.de