/[smeserver]/rpms/smeserver-yum/sme7/smeserver-yum-2.0.0-unsavedchanges.patch
ViewVC logotype

Annotation of /rpms/smeserver-yum/sme7/smeserver-yum-2.0.0-unsavedchanges.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Tue Sep 15 16:37:04 2009 UTC (15 years, 1 month ago) by slords
Branch: MAIN
CVS Tags: smeserver-yum-2_0_0-15_el4_sme, smeserver-yum-2_0_0-12_el4_sme, smeserver-yum-2_0_0-8_el4_sme, smeserver-yum-2_0_0-17_el4_sme, smeserver-yum-2_0_0-11_el4_sme, smeserver-yum-2_0_0-14_el4_sme, smeserver-yum-2_0_0-13_el4_sme, smeserver-yum-2_0_0-16_el4_sme, smeserver-yum-2_0_0-10_el4_sme, HEAD
* Tue Sep 15 2009 Shad L. Lords <slords@mail.com> 2.0.0-10.sme
- set unsaved changes in yum event [SME: 2081]
- move yum warming to sme yum plugin [SME: 5472]
- ensure file exists before unlinking [SME: 4169]
- remove semicolons from yum plugin

1 slords 1.1 --- smeserver-yum-2.0.0/root/usr/lib/yum-plugins/smeserver.py.unsavedchanges 2009-09-15 10:04:46.000000000 -0600
2     +++ smeserver-yum-2.0.0/root/usr/lib/yum-plugins/smeserver.py 2009-09-15 10:05:44.000000000 -0600
3     @@ -12,8 +12,11 @@
4     initialize_database = events_path + '/actions/initialize-default-databases'
5     navigation_conf = events_path + '/actions/navigation-conf'
6     signal_event = '/sbin/e-smith/signal-event'
7     +config_set = '/sbin/e-smith/config'
8     status_file = '/var/run/yum.status'
9    
10     +smechange = False
11     +
12     def report_yum_status(status):
13     fileHandle = open(status_file, 'w')
14     fileHandle.write(status)
15     @@ -53,9 +56,8 @@
16     print "smeserver trap pre-install: " + tsmem.name
17    
18     def posttrans_hook(conduit):
19     + global smechange
20     report_yum_status('posttrans')
21     - os.spawnl(os.P_WAIT, initialize_database, initialize_database)
22     - os.spawnl(os.P_WAIT, navigation_conf, navigation_conf)
23     ts = conduit.getTsInfo()
24     for tsmem in ts.getMembers():
25     print "smeserver trap post-install: " + tsmem.name
26     @@ -65,6 +67,25 @@
27     os.spawnl(os.P_WAIT,
28     signal_event, signal_event, smeevent)
29    
30     + (n, a, e, v, r) = tsmem.po.pkgtup
31     + if n.startswith('sme') or n.startswith('e-smith') or r.endswith('sme'):
32     + smechange = True
33     +
34     + if smechange:
35     + os.spawnl(os.P_WAIT, config_set, config_set, 'set', 'UnsavedChanges', 'yes')
36     + os.spawnl(os.P_WAIT, initialize_database, initialize_database)
37     + os.spawnl(os.P_WAIT, navigation_conf, navigation_conf)
38     +
39     def close_hook(conduit):
40     - os.unlink('/var/run/yum.status')
41     + if os.path.isfile('/var/run/yum.status'):
42     + os.unlink('/var/run/yum.status')
43     +
44     + if smechange:
45     + print "\n=============================================================="
46     + print "WARNING: You now need to run BOTH of the following commands"
47     + print "to ensure consistent system state:\n"
48     + print "signal-event post-upgrade; signal-event reboot\n"
49     + print "You should run these commands unless you are certain that"
50     + print "yum made no changes to your system."
51     + print "=============================================================="
52    
53     --- smeserver-yum-2.0.0/root/sbin/e-smith/yum.unsavedchanges 2008-10-07 08:21:29.000000000 -0600
54     +++ smeserver-yum-2.0.0/root/sbin/e-smith/yum 1970-01-01 10:00:00.000000000 +1000
55     @@ -1,30 +0,0 @@
56     -#!/bin/sh
57     -
58     -echo "=============================================================="
59     -echo "WARNING: Additional commands may be required after running yum"
60     -echo "=============================================================="
61     -
62     -BEFORE=$(rpm -qa 2>&1 | sed '/skipping V4 signature/d' | md5sum)
63     -
64     -/usr/bin/yum "$@"
65     -status=$?
66     -
67     -AFTER=$(rpm -qa 2>&1 | sed '/skipping V4 signature/d' | md5sum)
68     -if [ "$BEFORE" = "$AFTER" ]
69     -then
70     - echo "================================================================"
71     - echo "No new rpms were installed. No additional commands are required."
72     - echo "================================================================"
73     -else
74     - echo "=============================================================="
75     - echo "WARNING: You now need to run BOTH of the following commands"
76     - echo "to ensure consistent system state:"
77     - echo
78     - echo "signal-event post-upgrade; signal-event reboot"
79     - echo
80     - echo "You should run these commands unless you are certain that"
81     - echo "yum made no changes to your system."
82     - echo "=============================================================="
83     -fi
84     -
85     -exit $status

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed