Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 269171 | Differences between
and this patch

Collapse All | Expand All

(-)changes.py (-1 / +9 lines)
Lines 89-95 Link Here
89
89
90
	logpath = os.path.join(pkg.get_package_path(), 'ChangeLog')
90
	logpath = os.path.join(pkg.get_package_path(), 'ChangeLog')
91
	if not os.path.isfile(logpath) or not os.access(logpath, os.R_OK):
91
	if not os.path.isfile(logpath) or not os.access(logpath, os.R_OK):
92
		pp.die(1, "%s does not exist or is unreadable"
92
		raise errors.GentoolkitFatalError("%s does not exist or is unreadable"
93
			% pp.path(logpath))
93
			% pp.path(logpath))
94
	
94
	
95
	return logpath
95
	return logpath
Lines 133-138 Link Here
133
		# Extract the package name from the entry, ex: 
133
		# Extract the package name from the entry, ex: 
134
		# *xterm-242 (07 Mar 2009) => xterm-242
134
		# *xterm-242 (07 Mar 2009) => xterm-242
135
		pkg_name = entry.split(' ', 1)[0].lstrip('*')
135
		pkg_name = entry.split(' ', 1)[0].lstrip('*')
136
		if not pkg_name.strip():
137
			continue
136
		pkg_split = pkgsplit(pkg_name)
138
		pkg_split = pkgsplit(pkg_name)
137
		result.append(
139
		result.append(
138
			(VersionMatch(op="=", ver=pkg_split[1], rev=pkg_split[2]), entry))
140
			(VersionMatch(op="=", ver=pkg_split[1], rev=pkg_split[2]), entry))
Lines 315-320 Link Here
315
		pkg = get_match(query)
317
		pkg = get_match(query)
316
		logpath = get_logpath(pkg)
318
		logpath = get_logpath(pkg)
317
		log_entries = split_changelog(logpath)
319
		log_entries = split_changelog(logpath)
320
		if not any(log_entries):
321
			raise errors.GentoolkitFatalError(
322
				"%s exists but doesn't contain entries." % pp.path(logpath))
318
		indexed_entries = index_changelog(log_entries)
323
		indexed_entries = index_changelog(log_entries)
319
324
320
		#
325
		#
Lines 328-333 Link Here
328
			for entry in log_entries[:end]:
333
			for entry in log_entries[:end]:
329
				print entry
334
				print entry
330
			first_run = False
335
			first_run = False
336
		elif log_entries and not indexed_entries:
337
			# We can't match anything, so just print latest:
338
			print log_entries[0].strip()
331
		else:
339
		else:
332
			if ranged_query:
340
			if ranged_query:
333
				pkg = ranged_query
341
				pkg = ranged_query

Return to bug 269171