Bug 192356 - ports-mgmt/pkg: 1.3.4 - quiet delete spends a lot of time doing nothing
Summary: ports-mgmt/pkg: 1.3.4 - quiet delete spends a lot of time doing nothing
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-pkg (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-03 15:19 UTC by Lawrence Chen
Modified: 2015-01-17 18:16 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lawrence Chen 2014-08-03 15:19:13 UTC
% uname -v
FreeBSD 9.2-RELEASE-p10 #0: Tue Jul  8 10:48:24 UTC 2014     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC
% pkg -v
1.3.4

Decided that it was time to cleanup the pkg's installed on my system.  The other day it was spending a lot of time updating a port, which was a left over dependency of something else....

Ran pkg_rmleaves....which then spent a long time, and found no further leaves to remove (which didn't make sense, since I know there would be at least be many fpc-* ports still to remove.)

After some digging around, narrowed down on the '-q' (quiet) option.

pkg_rmleaves uses "pkg delete -q -y <pkg>"

"pkg delete <pkg>" works, of course.

"pkg delete -y <pkg>" works.

"pkg delete -q <pkg>" and "pkg delete -q -y <pkg>" don't work...though its spends some time.  "pkg delete -qn <pkg>" works.

....

Looks like query_yesno() is the only way that rc can become true, and its skipped if quiet is set.

If query_yesno() were called, it understands quiet...to return 'yes or default'...
Comment 1 John Marino freebsd_committer freebsd_triage 2014-08-03 18:11:29 UTC
over to maintainer team...