Bug 332663

Summary: yast-backup - tar-file
Product: [openSUSE] openSUSE 10.3 Reporter: Bernd Petzold <b.pe>
Component: YaST2Assignee: Lukas Ocilka <locilka>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: ast, coolo, harbrink, hmuelle, iweksler, juerg.allemann
Version: Final   
Target Milestone: ---   
Hardware: x86   
OS: openSUSE 10.3   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: y2logs created with save_y2logs
The resulting backup files
yast2-backup-2.16.0-0.noarch.rpm (new RPM)
y2logs of the backup run with the fixed rpm
New RPM (should fix the previous one)
Patch

Description Bernd Petzold 2007-10-10 16:05:01 UTC
yast-backup create a tar-file consist of binary 0 only and the file-length is principally 10 KB.
Comment 1 Cyril Hrubis 2007-10-10 19:46:28 UTC
Please attach y2logs. If you are in doubt follow:

http://en.opensuse.org/Bugs/YaST

Thanks!
Comment 2 Matej Horvath 2007-10-19 08:36:31 UTC
Please reopen the bug if you can provide the needed information, thanks.
Comment 3 Jürg Allemann 2007-10-19 18:16:38 UTC
I can confirm this behaviour on 2 machines. Same result if using ncurses.
Comment 4 Jürg Allemann 2007-10-19 18:22:26 UTC
Created attachment 179498 [details]
y2logs created with save_y2logs

Backup operation starts at timestamp 2007-10-19 18:43:49, ends at 2007-10-19 18:57:56
Comment 5 Jürg Allemann 2007-10-19 18:26:19 UTC
Created attachment 179501 [details]
The resulting backup files
Comment 6 Lukas Ocilka 2007-10-22 12:16:46 UTC
Did you try to debug it why is it so?
Did you try to list files that are going to be backed up?
Comment 7 Lukas Ocilka 2007-10-22 13:39:59 UTC
I've reproduced the error (and fixed some more) :)
Comment 8 Lukas Ocilka 2007-10-23 13:59:15 UTC
Would you prefer to test a 'patch' (diff to sources) or RPM (i386, x86_64)?
I can't say 'fixed' until you test it :) So, could you, please test it?
Comment 10 Lukas Ocilka 2007-10-23 14:41:14 UTC
Created attachment 180031 [details]
yast2-backup-2.16.0-0.noarch.rpm (new RPM)
Comment 11 Jürg Allemann 2007-10-23 17:22:50 UTC
I just did just one backup run using the fresh rpm. The summary reported "Archive creation failed", (Details: "Total Archived Files: 0"), but the created archive looks ok to me.
Comment 12 Jürg Allemann 2007-10-23 17:25:39 UTC
Created attachment 180094 [details]
y2logs of the backup run with the fixed rpm
Comment 13 Lukas Ocilka 2007-10-25 09:25:08 UTC
Created attachment 180480 [details]
New RPM (should fix the previous one)

My backup result was:

--- cut ---
Modified Files Found: 26
Total Size: 76.91 kB
Files Not in a Package Found: 1224
Total Size: 20.24 MB

Archive /install/archive.tar created successfully
Autoinstallation profile saved to file /install/archive.xml.
--- cut ---
Comment 14 Lukas Ocilka 2007-10-25 09:25:38 UTC
Please, retest :)
Comment 15 Jürg Allemann 2007-10-25 18:43:22 UTC
I made several backup runs, all of them reported "Successful". And the resulting archives seem to be restorable. Cool!
Comment 17 Lukas Ocilka 2007-10-30 08:50:49 UTC
Created attachment 181139 [details]
Patch

Needs to be checked that tar hasn't changed how it behaves with "-C /directory" parameter. The current patch expects that it sometimes doesn't work well and does it the other way.

Anyway, the most important part of the patch is:
--- cut ---
     string filename = nil;
     if (is(WFM::Args(0), string)) {
-       string filename = (string) WFM::Args (0);
+       filename = (string) WFM::Args (0);
     } else {
        y2error ("Wrong parameter for script");
        return false;
--- cut ---

WFM::Args whould have redefine a variable, but defines another one...
Comment 18 Stephan Kulow 2007-10-30 13:13:57 UTC
use MaintenanceTracker-14440
Comment 19 Lukas Ocilka 2007-11-02 10:05:16 UTC
- Fixed creating the archive (tar -C).
- Fixed reading installed packages.
- Better solution of some exceptions when creating the archive and
  temporary directories.
- Fixed escaping backquotes for files presented in UI.
  (All in bugzilla #332663)

- yast2-backup-2.15.5

(Will be released as update soon)
Comment 21 Harald Mueller-Ney 2007-11-09 13:39:01 UTC
Released for 10.3
Comment 22 Lukas Ocilka 2007-11-09 21:35:40 UTC
*** Bug 339896 has been marked as a duplicate of this bug. ***