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

(-)/usr/bin/qpkg (-2 / +30 lines)
Lines 59-64 Link Here
59
		inst=y
59
		inst=y
60
		;;
60
		;;
61
61
62
	-m|--masked)
63
		grepmask="-L"
64
		;;
65
66
	-n|--non-masked)
67
		grepmask="-l"
68
		;;
69
62
	-U|--uninstalled)
70
	-U|--uninstalled)
63
		uninst=y
71
		uninst=y
64
		;;
72
		;;
Lines 168-173 Link Here
168
  ${BL}-fp, --find-pattern${NO}${T}finds to package that owns file matching *<pattern>*
176
  ${BL}-fp, --find-pattern${NO}${T}finds to package that owns file matching *<pattern>*
169
  ${BL}-I,  --installed${NO}${T}Include${YL} only${NO} installed packages
177
  ${BL}-I,  --installed${NO}${T}Include${YL} only${NO} installed packages
170
  ${BL}-U,  --uninstalled${NO}${T}Include${YL} only${NO} uninstalled packages
178
  ${BL}-U,  --uninstalled${NO}${T}Include${YL} only${NO} uninstalled packages
179
  ${BL}-m,  --masked${NO}${T}Include${YL} only${NO} masked packages
180
  ${BL}-n,  --non-masked${NO}${T}Include${YL} only${NO} non-masked packages
171
  ${BL}-g,  --group${NO}${T}${T}Find by group (can be combined with other searches)
181
  ${BL}-g,  --group${NO}${T}${T}Find by group (can be combined with other searches)
172
182
173
${BR}Information Selection:
183
${BR}Information Selection:
Lines 215-220 Link Here
215
	exit
225
	exit
216
fi
226
fi
217
227
228
if [ "${grepmask}" ]; then
229
	mask=`python -c 'import portage; print portage.settings["ACCEPT_KEYWORDS"];' 2> /dev/null`
230
	echo -e "Currently accepted keywords: ${BL}${mask}${NO}"
231
	echo -e
232
	mask=`echo ${mask} | perl -pe 's/\s+/|/'`
233
fi
234
218
#For the --dups switch only
235
#For the --dups switch only
219
if [ "${dups}" ]; then
236
if [ "${dups}" ]; then
220
	#First dig out the list of packages with duplicates
237
	#First dig out the list of packages with duplicates
Lines 302-307 Link Here
302
		if [ ${arg} ]; then
319
		if [ ${arg} ]; then
303
		    ipak=`echo ${ipak}|sed -e "s: :\n:g"|grep ${arg}`
320
		    ipak=`echo ${ipak}|sed -e "s: :\n:g"|grep ${arg}`
304
		fi
321
		fi
322
		if [ -n "${mask}" ]; then
323
		    ipak=`echo ${ipak}|xargs egrep ${grepmask} "^KEYWORDS=.*[[:space:]\"\'](${mask})[[:space:]\"\']"`
324
		fi
305
	fi
325
	fi
306
	# not installed packages (yet:-)
326
	# not installed packages (yet:-)
307
	if [ ! "${inst}" ]; then
327
	if [ ! "${inst}" ]; then
Lines 312-317 Link Here
312
		if [ ${arg} ]; then
332
		if [ ${arg} ]; then
313
		    upak=`echo ${upak}|sed -e "s: :\n:g"|grep ${arg}`
333
		    upak=`echo ${upak}|sed -e "s: :\n:g"|grep ${arg}`
314
		fi
334
		fi
335
		if [ -n "${mask}" ]; then
336
		    upak=`echo ${upak}|xargs egrep ${grepmask} "^KEYWORDS=.*[[:space:]\"\'](${mask})[[:space:]\"\']"`
337
		fi
315
	fi
338
	fi
316
fi
339
fi
317
340
Lines 335-340 Link Here
335
		desc=`grep DESCRIPTION ${p}| cut -d\" -f2`
358
		desc=`grep DESCRIPTION ${p}| cut -d\" -f2`
336
		echo -e "${T}${BL}${desc}${NO} [ ${YL}${home}${NO} ]"
359
		echo -e "${T}${BL}${desc}${NO} [ ${YL}${home}${NO} ]"
337
	fi
360
	fi
361
362
	if [ "${mask}" ]; then
363
		keywords=`grep KEYWORDS ${p}| cut -d\" -f2`
364
		echo -e "${T}Keywords: ${BL}${keywords}${NO}"
365
	fi
338
	
366
	
339
	if [ "${query}" ]; then
367
	if [ "${query}" ]; then
340
		echo -e "${BL}DEPENDED ON BY:${NO}"
368
		echo -e "${BL}DEPENDED ON BY:${NO}"
Lines 463-471 Link Here
463
	fi
491
	fi
464
	
492
	
465
done | (
493
done | (
466
	if [ ! \( "${tcheck}" -o "${mcheck}" -o "${info}" -o "${list}" -o "${query}" -o ${verb} -gt 0 \) ]; then
494
	if [ ! \( "${tcheck}" -o "${mcheck}" -o "${info}" -o "${list}" -o "${query}" -o "${mask}" -o ${verb} -gt 0 \) ]; then
467
		sed -e "s:-r[0-9]\+$::" -e "s:-[0-9][^-]*$::"|sort -k2|uniq -1
495
		sed -e "s:-r[0-9]\+$::" -e "s:-[0-9][^-]*$::"|sort -k2|uniq -1
468
	elif [ ! \( "${tcheck}" -o "${mcheck}" -o "${info}" -o "${list}" -o "${query}" -o ${verb} -lt 2 \) ]; then
496
	elif [ ! \( "${tcheck}" -o "${mcheck}" -o "${info}" -o "${list}" -o "${query}" -o "${mask}" -o ${verb} -lt 2 \) ]; then
469
		sort -k2|uniq -1
497
		sort -k2|uniq -1
470
	else
498
	else
471
		cat
499
		cat

Return to bug 22432