Bug 474573

Summary: yast2-registration: online_update has no --auto-agree-with-licenses
Product: [openSUSE] openSUSE 11.1 Reporter: Andreas Vetter <vetter>
Component: YaST2Assignee: J. Daniel Schmidt <jdsn>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P4 - Low CC: asklein, jsuchome
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 11.1   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Andreas Vetter 2009-02-10 23:51:22 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; de-DE; rv:1.9.0.6) Gecko/2009012700 SUSE/3.0.6-0.1.2 Firefox/3.0.6

The Automatic Online Update script /etc/cron.daily/opensuse.org-online_update is symlinked to /usr/lib/YaST2/bin/online_update.
There is no possibility to automatically accept the license agreement for updates. There should be an additional Argument --auto-agree-with-licenses in the script. Perhaps configurable in /etc/sysconfig/automatic_online_update.
I propose a new variable AOU_AUTO_AGREE_WITH_LICENSES analogue to 
AOU_SKIP_INTERACTIVE_PATCHES,

The script  /usr/lib/YaST2/bin/online_update should get the followin patch:
diff -u /usr/lib/YaST2/bin/online_update online_update
--- /usr/lib/YaST2/bin/online_update    2008-09-11 16:56:26.000000000 +0200
+++ online_update       2009-02-11 00:38:43.914806019 +0100
@@ -4,6 +4,7 @@
 upcmd="/bin/false"
 syscfgfile="/etc/sysconfig/automatic_online_update"
 skipInteractive="--skip-interactive"
+autoAgreeWithLicenses="--auto-agree-with-licenses"

 if [ -x ${zyppercmd}  ]
 then
@@ -41,7 +42,17 @@
     fi
 fi

+if [ ! -z ${AOU_AUTO_AGREE_WITH_LICENSES} ]
+then
+    if [ ${AOU_AUTO_AGREE_WITH_LICENSES} = "true"  ]
+    then
+        autoAgreeWithLicenses="--auto-agree-with-licenses"
+    else
+        autoAgreeWithLicenses=
+    fi
+fi
+

 # run the update
-${upcmd} --quiet up -y -t patch ${skipInteractive}
+${upcmd} --quiet up -y -t patch ${skipInteractive} ${autoAgreeWithLicenses}

In the file 
/var/adm/fillup-templates/sysconfig.automatic_online_update-yast2-registration
we need to add:

## Type:    boolean
## Default: "true"
#
# This will agree with licenses during an automatic
# online update run.
#
AOU_AUTO_AGREE_WITH_LICENSES="true"

The yast2 code should (but does not have to) be extended to reflect the new choice. At least it should be made sure that 
yast2 online_update_configuration
does not throw away the new variable.

Reproducible: Always
Comment 1 Marcus Meissner 2009-02-11 08:30:08 UTC
-> maintainer yast2-online-update
Comment 2 Jiří Suchomel 2009-02-11 08:42:12 UTC
It's yast2-registration.

Daniel, it could be nice if UI would provide such option as well.
Comment 3 J. Daniel Schmidt 2009-09-24 18:03:19 UTC
Updated package submitted to YaST:Head, will keep this bug open until I created a submitrequest to Factory.
Comment 4 J. Daniel Schmidt 2009-09-28 16:40:05 UTC
Its submitrequest ID 21250.
Comment 5 Bernhard Wiedemann 2016-04-15 09:30:54 UTC
This is an autogenerated message for OBS integration:
This bug (474573) was mentioned in
https://build.opensuse.org/request/show/21250 Factory / yast2-registration
Comment 7 OBSbugzilla Bot 2020-10-27 10:13:26 UTC
This is an autogenerated message for OBS integration:
This bug (474573) was mentioned in
https://build.opensuse.org/request/show/844234 Factory / yast2-registration