Bug 130993 - pkg_add(1): pkg_add -n falsely reports present local packages as missing
Summary: pkg_add(1): pkg_add -n falsely reports present local packages as missing
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 7.1-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-25 23:50 UTC by Manolis Kiagias
Modified: 2016-12-10 15:43 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 Manolis Kiagias freebsd_committer freebsd_triage 2009-01-25 23:50:01 UTC
Using -n to perform a "dry run" test installing packages from i.e. a local directory does not yield the expected results.

Example: Assume a package with all its dependencies is stored in a local directory. Then:

pkg_add -n package-x.y_z.tbz will report:

Package dependency package1-x.y_z for package-x.y_z.tbz not found!
Package dependency package2-x.y_z for package-x.y_z.tbz not found!

and so on, while package1, package2 etc are also present in the same directory. In fact,

pkg_add package-x.y_z.tbz 

would work without any problems, using the packages reported as missing by -n

Fix: 

None. The packages can still be installed by a plain pkg_add, but using -n can lead to misleading results.
How-To-Repeat: Using ports, build any package with dependencies on a FreeBSD system. Then create a binary package for it, using pkg_create -Rb

pkg_create -Rb package_name-x.y_z

Copy the resulting package files to another machine. Then run:

pkg_add -n package_name-x.y_z.tbz

Watch -n reporting the present dependencies as missing
Running without -n will install the packages normally.
The above behaviour does not seem to be affected by PKG_PATH values