Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 122005
Collapse All | Expand All

(-)src/portage/package.cc (-2 / +3 lines)
Lines 139-151 Link Here
139
	if(version == NULL) {
139
	if(version == NULL) {
140
		for(unsigned int i = 0; i<size(); ++i)
140
		for(unsigned int i = 0; i<size(); ++i)
141
			for(unsigned int j = 0; j<size(); ++j)
141
			for(unsigned int j = 0; j<size(); ++j)
142
				if(i != j && *((*this)[i]) == *((*this)[j])) {
142
				if(i != j
143
				   && *(BasicVersion*)((*this)[i]) == *(BasicVersion*)((*this)[j])) {
143
					return true;
144
					return true;
144
				}
145
				}
145
	}
146
	}
146
	else {
147
	else {
147
		for(unsigned int i = 0; i<size(); ++i)
148
		for(unsigned int i = 0; i<size(); ++i)
148
			if( *((*this)[i]) == *version ) {
149
			if( *(BasicVersion*)((*this)[i]) == *(BasicVersion*)version ) {
149
				return true;
150
				return true;
150
			}
151
			}
151
	}
152
	}
(-)src/search/packagetest.cc (-3 / +15 lines)
Lines 67-72 Link Here
67
			break;
67
			break;
68
		}
68
		}
69
	}
69
	}
70
71
	if(installed && need < Package::NAME)
72
	{
73
		need = Package::NAME;
74
	}
75
76
	if(dup_versions && need < Package::VERSIONS)
77
	{
78
		need = Package::VERSIONS;
79
	}
70
}
80
}
71
81
72
PackageTest::MatchField
82
PackageTest::MatchField
Lines 123-130 Link Here
123
bool
133
bool
124
PackageTest::stringMatch(Package *pkg) const
134
PackageTest::stringMatch(Package *pkg) const
125
{
135
{
126
	pkg->readNeeded(need);
127
128
	if(field & NAME && (*algorithm)(pkg->name.c_str(), pkg))
136
	if(field & NAME && (*algorithm)(pkg->name.c_str(), pkg))
129
	{
137
	{
130
		return true;
138
		return true;
Lines 167-172 Link Here
167
PackageTest::match(Package *pkg) const
175
PackageTest::match(Package *pkg) const
168
{
176
{
169
	bool is_match = true;
177
	bool is_match = true;
178
179
	pkg->readNeeded(need);
180
170
	if(algorithm.get() != NULL) {
181
	if(algorithm.get() != NULL) {
171
		is_match = stringMatch(pkg);
182
		is_match = stringMatch(pkg);
172
	}
183
	}
Lines 176-183 Link Here
176
		is_match = vardbpkg->isInstalled(pkg);
187
		is_match = vardbpkg->isInstalled(pkg);
177
	}
188
	}
178
189
179
	if(dup_versions && is_match)
190
	if(dup_versions && is_match) {
180
		is_match = pkg->have_duplicate_versions;
191
		is_match = pkg->have_duplicate_versions;
192
	}
181
193
182
	return (invert ? !is_match : is_match);
194
	return (invert ? !is_match : is_match);
183
}
195
}

Return to bug 122005