Bug 200604 - ports-mgmt/pkg: pkg set -n ignores answer to confirmation prompt
Summary: ports-mgmt/pkg: pkg set -n ignores answer to confirmation prompt
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-pkg (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-02 20:13 UTC by Nils
Modified: 2016-04-20 08:47 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 Nils 2015-06-02 20:13:00 UTC
pkg set -n will try to update the database even if the confirmation prompt was answered with "n". Expected behaviour is to abort.

Test was run on PC-BSD 10.1. 

[nde@pcbsd] /usr/local/etc# pkg set -n linux-c6-flashplugin:vim pcbsd-base
Change name from linux-c6-flashplugin to vim for linux-c6-flashplugin-11.2r202.457? [y/N]: n
pkg: sqlite error while executing UPDATE deps SET name = ?1, version=(SELECT version FROM packages WHERE name = ?1) WHERE package_id = ?2 AND name = ?3 in file pkgdb.c:2551: UNIQUE constraint failed: deps.name, deps.version, deps.package_id
[nde@pcbsd] /usr/local/etc# pkg set -n linux-c6-flashplugin:vim pcbsd-base
Change name from linux-c6-flashplugin to vim for linux-c6-flashplugin-11.2r202.457? [y/N]: y
pkg: sqlite error while executing UPDATE packages SET name=?1 WHERE id=?2 in file pkgdb.c:2551: UNIQUE constraint failed: packages.name

(I was trying to remove the dependency for flash in pcbsd-base. It fails because vim is already a dependency. Therefore the sqlite error is justified.)
Comment 1 Baptiste Daroussin freebsd_committer freebsd_triage 2016-04-20 08:47:35 UTC
This has been fixed.