diff -Nur smeserver-yum-2.6.0.old/root/usr/lib/yum-plugins/smeserver.py smeserver-yum-2.6.0/root/usr/lib/yum-plugins/smeserver.py --- smeserver-yum-2.6.0.old/root/usr/lib/yum-plugins/smeserver.py 2019-01-23 22:33:15.281000000 -0500 +++ smeserver-yum-2.6.0/root/usr/lib/yum-plugins/smeserver.py 2019-01-23 23:53:18.272000000 -0500 @@ -25,27 +25,37 @@ # list of packages that need a reboot # if a package name starts with one these names, a reboot is needed -rebootpkgs = ['kernel', 'glibc', 'linux-firmware', 'systemd', 'udev', 'openssl-libs', 'gnutls', 'dbus', 'daemontools', 'lvm2', 'mdadm'] +rebootpkgs = ['daemontools', 'dbus', 'glibc', 'gnutls', 'kernel', 'linux-firmware', 'lvm2', 'mdadm', 'openssl-libs', 'systemd'] +# exclusions : +rebootpkgsexclude = dict() +rebootpkgsexclude['dbus']='-python','-tests','-devel','-doc', +rebootpkgsexclude['glibc']='-devel','-headers','-statics','-utils', +rebootpkgsexclude['gnutls']='-devel', +rebootpkgsexclude['kernel']='-doc','-debug','-devel','-abi-whitelists','tools', +rebootpkgsexclude['lvm2']='-devel','-python', +rebootpkgsexclude['systemd']='-devel', + # list of packages that need a service restart # if a package name starts with one of these values, a service restart is needed # since, for example, httpd means httpd-admin and httpd-e-smith, we won't use these names directly but via serviceslist (see below) -restartpkgs = ['httpd', 'openssh', 'openldap', 'squid', 'dovecot', 'nut', 'freeradius', 'iptables', 'mysql', 'php', 'pptpd', 'proftp', 'qmail', 'qpsmtpd', 'samba', 'spamassassin'] +restartpkgs = ['dovecot','freeradius','httpd','iptables', 'mysql', 'nut', 'openldap', 'openssh', 'php', 'pptpd', 'proftp', 'samba', 'spamassassin', 'squid', 'qmail', 'qpsmtpd'] servicenames = dict() -servicenames['httpd']='httpd-admin','httpd-e-smith' -servicenames['openssh']='sshd', -servicenames['openldap']='ldap', +servicenames['dovecot']='dovecot','pop3','pop3s', servicenames['freeradius']='radiusd', +servicenames['httpd']='httpd-admin','httpd-e-smith' servicenames['iptables']='masq', servicenames['mysql']='mysqld', +servicenames['nut']='nut-server','nut-driver','nut-monitor', +servicenames['openldap']='ldap', +servicenames['openssh']='sshd', servicenames['php']='httpd-e-smith', servicenames['proftp']='ftp', servicenames['samba']='smb', servicenames['spamassassin']='spamd', servicenames['squid']='squid', -servicenames['dovecot']='dovecot','pop3','pop3s' -servicenames['qpsmtpd']='qpsmtpd', servicenames['qmail']='qmail', +servicenames['qpsmtpd']='qpsmtpd' smechange = False ourfile = False @@ -164,8 +174,22 @@ for pkg in rebootpkgs: if n.startswith(pkg): #print 'Package: ' + tsmem.name + ' triggers reboot' - smechange = True - + #smechange = True + # we do some exclusions -devel -doc ... + if rebootpkgsexclude[pkg]: + #print 'lista' + cont=False + for name in rebootpkgsexclude[pkg]: + #print name + if n.startswith(pkg + name): + #print pkg + name + ' => smechange' + cont=True + #smechange = True + if cont: + # this is an exception we do not need reboot : -devel, -doc ... + continue + # either no exception or does not fit exceptions: we need reboot + smechange = True # check if we're upgrading a restartpkgs rpm for pkg in restartpkgs: