Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Mar 2015 13:48:58 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 198898] ports-mgmt/pkg: No syntax warning from pkg version
Message-ID:  <bug-198898-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198898

            Bug ID: 198898
           Summary: ports-mgmt/pkg: No syntax warning from pkg version
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: portmgr@FreeBSD.org
          Reporter: elofu17@hotmail.com
             Flags: maintainer-feedback?(portmgr@FreeBSD.org)
          Assignee: portmgr@FreeBSD.org

If you mistakenly add a word after the command 'pkg version', like 'pkg version
foobargazonk', you don't get any syntax/usage error.
Instead the command takes a _long_ time to execute. I get between 1 to 10
seconds between each line of output.

Example:
# pkg version foobargazonk
<1s>
GeoIP-1.6.5                        >
<2s>
ImageMagick-6.9.0.10,1             >
<10s>
ORBit2-2.14.19_1                   =
<2s>
adns-1.5.0                         >

Without the word "foobargazonk", the output quick.


I guess you should show an error/usage warning and then bail if the index
"foobargazonk" does not exist instead of repeatedly trying to find it (or
whatever is the cause of the slowness).


PS. On another machine (with only one repo and no DNS resolving), the command
executes swiftly, so perhaps the delay only happen on machines with multiple
repos?


The machine uses two repos:
# cat /usr/local/etc/pkg/repos/FreeBSD.conf 
FreeBSD: { enabled: yes, priority: 1 }

# cat /usr/local/etc/pkg/repos/foo.conf 
foo: {
    url:         "pkg+http://blahblah/93amd64-default/",
    mirror_type: "srv",
    enabled:     yes,
    priority:    15
}

# cat /usr/local/etc/pkg.conf
PKG_DBDIR: /var/db/pkg
PKG_CACHEDIR: /var/cache/pkg
PORTSDIR: /usr/ports
PKG_ENV: { http_proxy: "http://10.10.10.10:8080", }
CONSERVATIVE_UPGRADE: YES

/Elof

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-198898-13>