Bug 194424 - Online update setup creates unusable cron job
Summary: Online update setup creates unusable cron job
Status: RESOLVED FIXED
: 197094 198141 202982 (view as bug list)
Alias: None
Product: SUSE Linux 10.1
Classification: openSUSE
Component: YaST2 (show other bugs)
Version: Final
Hardware: Other Other
: P5 - None : Major with 5 votes (vote)
Target Milestone: ---
Assignee: Jiří Suchomel
QA Contact: Stanislav Visnovsky
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-24 08:25 UTC by Andreas Vetter
Modified: 2007-01-19 07:56 UTC (History)
9 users (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
yast2 logs (4.19 MB, application/x-compressed-tar)
2006-07-24 08:59 UTC, Andreas Vetter
Details
patch for SLES10 (2.42 KB, patch)
2006-08-16 13:40 UTC, Jiří Suchomel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Vetter 2006-07-24 08:25:23 UTC
open yast2, online update setup.
select daily instead of weekly (I never tried weekly)
click ok.
the created file /etc/cron.d/yast2-online-update contains the line:
26 1 * * * root rug up -t patch  --skip-interactive

when updates are available, they are not installed, because the -y flag is missing:
Subject: Cron <root@beder> rug up -t patch  --skip-interactive

Resolving Dependencies...

The following packages will be installed:
  control-center2 2.12.2-62.15 (nfs://wpyc049/srv/suse/i386/update/10.1)
    control-center2-2.12.2-62.15.x86_64[20060714-165805] needed by atom:control-center2-2.12.2-62.15.x86_64[20060714-165805]

[...]

Proceed with transaction? (y/N) ERROR: Object reference not set to an instance of an object
Comment 1 Michael Gross 2006-07-24 08:48:31 UTC
Please attach the y2logs.
Comment 2 Andreas Vetter 2006-07-24 08:59:55 UTC
Created attachment 94291 [details]
yast2 logs
Comment 3 Andreas Vetter 2006-07-31 11:09:55 UTC
Adding a "-y" to the commandline parameter helps installing the updates, but 
then you get strange characters in the email from cron:

Subject: Cron <root@dc09> rug up -y -t patch  --skip-interactive

Resolving Dependencies...

The following packages will be installed:
  gpg2 1.9.18-17.5 (http://ftp.tu-chemnitz.de/pub/linux/suse/ftp.suse.com/suse/update/10.1)
    gpg2-1.9.18-17.5.x86_64[SUSE-Linux-10.1-Updates] needed by atom:gpg2-1.9.18-17.5.x86_64[SUSE-Linux-10.1-Updates]

  gpg2 1835-0 (http://ftp.tu-chemnitz.de/pub/linux/suse/ftp.suse.com/suse/update/10.1)


Transaction...
^[[1G^[[41m^[[0m 0% ^[[0K
^[[0K^[[1A^[[1G^[[41m^[[0m 0% ^[[0K
^[[0K^[[1A^[[1G^[[41m^[[0m 0% ^[[0K
^[[0K^[[1A^[[1G^[[41m^[[0m 0% ^[[0K
...
Finishing...^[[0K^[[1A^[[1G^[[41m^[[0m 99% ^[[0K
Finishing...^[[0K^[[1A^[[1G^[[41m^[[0m 99% ^[[0K
Finishing...^[[0K^[[1A^[[1G^[[41m^[[0m 99% ^[[0K
^[[0K^[[1A^[[1G^[[41m^[[0m 100% ^[[0K
^[[0K^[[1A

Transaction Finished
Comment 4 Andreas Vetter 2006-07-31 11:13:00 UTC
Another thing:
The man page of rug does not describe all command-line switches. E.g. --skip-interactive is missing. 

I was looking for something that switches the output of "rup up" to a plain format.
Comment 6 Jiří Suchomel 2006-08-04 06:01:07 UTC
Why the '--skip-interactive' option doesn't solve this?
(I added it there as a result of bug #150471) 

Isn't this rather a rug bug?
Comment 7 Jiří Suchomel 2006-08-07 09:02:54 UTC
See last comment.
Comment 9 Dan Mills 2006-08-07 18:20:26 UTC
Some patches can be interactive, beyond the standard rug confirmation question.  The --skip-interactive is meant to skip these "special" patches, not to automatically acknowledge the confirmation.

I'll file a bug to fix the documentation shortly.

As for the terminal control characters showing up, that is a problem in the code 10 branch; it's already fixed in breakout (the next release), where rug detects if the output is to a dumb terminal/file and doesn't print the control chars.

-> Jiri for review.
Comment 10 Dan Mills 2006-08-07 18:34:10 UTC
Doc bug filed: Bug #197655.
Comment 11 Jiří Suchomel 2006-08-08 07:06:50 UTC
Nice :-(
I assume we need a 10.1 (and also SLE10) patch for yast2-online-update, which would fix the cron job line...
Comment 13 Andreas Jaeger 2006-08-08 07:26:25 UTC
Please submit this for the SLE10, we will push it out with the next update soon.

Stano, Harald, please remember to add this to the package list.
Comment 16 Andreas Hanke 2006-08-09 16:33:12 UTC
*** Bug 198141 has been marked as a duplicate of this bug. ***
Comment 17 Jiří Suchomel 2006-08-16 09:24:11 UTC
Harald, Stano?
Comment 18 Jiří Suchomel 2006-08-16 13:40:36 UTC
Created attachment 96231 [details]
patch for SLES10
Comment 19 Stanislav Visnovsky 2006-08-17 11:30:39 UTC
Yes, it should go to SLE10 as well.
Comment 20 Jiří Suchomel 2006-08-17 11:37:49 UTC
I need a swamp-id
Comment 21 Jiří Suchomel 2006-08-17 12:54:49 UTC
Hm, as the newer (=includes also fix for cron job) yast2-online-update with a enhanced callback handling (bug #168844) will be released, I consider this as fixed. Please think about mentioning this bug in libzypp changelog.
Comment 22 Jiří Suchomel 2006-08-18 11:34:10 UTC
*** Bug 197094 has been marked as a duplicate of this bug. ***
Comment 23 Andreas Jaeger 2006-09-01 07:26:28 UTC
*** Bug 202982 has been marked as a duplicate of this bug. ***
Comment 24 Jiri Srain 2007-01-19 07:56:33 UTC
*** Bug 236249 has been marked as a duplicate of this bug. ***