More regression fixes.
This commit is contained in:
parent
aaca7474d3
commit
e27f29260d
47
7ac022a09450f49bc416e00488ef283db0e98795.patch
Normal file
47
7ac022a09450f49bc416e00488ef283db0e98795.patch
Normal file
@ -0,0 +1,47 @@
|
||||
commit 7ac022a09450f49bc416e00488ef283db0e98795
|
||||
Author: Bill Nottingham <notting@redhat.com>
|
||||
Date: Wed Feb 1 16:04:13 2012 -0500
|
||||
|
||||
Rework isSimilarlyConfigured() slightly.
|
||||
|
||||
Even for stop dependencies, all you need to know is if the service is starting in a subset of the places its dependent service is.
|
||||
|
||||
diff --git a/chkconfig.c b/chkconfig.c
|
||||
index a01afce..f8f759a 100644
|
||||
--- a/chkconfig.c
|
||||
+++ b/chkconfig.c
|
||||
@@ -154,15 +154,11 @@ static inline int earlierThan(int i, int j) {
|
||||
return i;
|
||||
}
|
||||
|
||||
-static int isSimilarlyConfigured(struct service s, struct service t, int start) {
|
||||
+static int isSimilarlyConfigured(struct service s, struct service t) {
|
||||
int state_s, state_t;
|
||||
|
||||
state_s = s.currentLevels;
|
||||
state_t = t.currentLevels;
|
||||
- if (!start) {
|
||||
- state_s = ~state_s;
|
||||
- state_t = ~state_t;
|
||||
- }
|
||||
if ((state_s & state_t) == state_s)
|
||||
return 1;
|
||||
else
|
||||
@@ -173,7 +169,7 @@ static void checkDeps(struct service *s, struct dep *deps, struct service *serv,
|
||||
int j,k;
|
||||
|
||||
for (j = 0; deps[j].name ; j++) {
|
||||
- if (!strcmp(deps[j].name, serv->name) && isSimilarlyConfigured(*s, *serv, start)) {
|
||||
+ if (!strcmp(deps[j].name, serv->name) && isSimilarlyConfigured(*s, *serv)) {
|
||||
if (start)
|
||||
s->sPriority = laterThan(s->sPriority, serv->sPriority);
|
||||
else
|
||||
@@ -182,7 +178,7 @@ static void checkDeps(struct service *s, struct dep *deps, struct service *serv,
|
||||
}
|
||||
if (serv->provides) {
|
||||
for (k = 0; serv->provides[k]; k++) {
|
||||
- if (!strcmp(deps[j].name, serv->provides[k]) && isSimilarlyConfigured(*s, *serv, start)) {
|
||||
+ if (!strcmp(deps[j].name, serv->provides[k]) && isSimilarlyConfigured(*s, *serv)) {
|
||||
if (start)
|
||||
s->sPriority = laterThan(s->sPriority, serv->sPriority);
|
||||
else
|
||||
@ -1,7 +1,7 @@
|
||||
Summary: A system tool for maintaining the /etc/rc*.d hierarchy
|
||||
Name: chkconfig
|
||||
Version: 1.3.57
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
License: GPLv2
|
||||
Group: System Environment/Base
|
||||
Source: http://fedorahosted.org/releases/c/h/chkconfig/%{name}-%{version}.tar.bz2
|
||||
@ -9,6 +9,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: newt-devel gettext popt-devel
|
||||
Conflicts: initscripts <= 5.30-1
|
||||
Patch10: 3c9dcf4bf26658ebea02cc942ca1c859de8efcc4.patch
|
||||
Patch11: 7ac022a09450f49bc416e00488ef283db0e98795.patch
|
||||
|
||||
%description
|
||||
Chkconfig is a basic system utility. It updates and queries runlevel
|
||||
@ -31,6 +32,7 @@ page), ntsysv configures the current runlevel (5 if you're using X).
|
||||
%prep
|
||||
%setup -q
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
|
||||
%build
|
||||
|
||||
@ -76,6 +78,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_mandir}/*/ntsysv.8*
|
||||
|
||||
%changelog
|
||||
* Wed Feb 1 2012 Bill Nottingham <notting@redhat.com> 1.3.57-3
|
||||
- fix regression in 'install_initd'
|
||||
|
||||
* Tue Jan 17 2012 Bill Nottingham <notting@redhat.com> 1.3.57-2
|
||||
- fix regression in 'chkconfig <service>' in 1.3.57 (#782152)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user