int matchallpkgfile;
int matchinstalled;
int suppressinstalled;
+ int onlylocalinstalled;
int verbose;
int dbrepos;
};
latest = installed;
pkgfile = opt->zpmdb->path;
}
- found = zpm_findpkg(opt->zpmdb, pkgstr, NULL);
- if (found) {
- rv = zpm_vercmp(found, latest);
- if (rv == 1) {
- latest = found;
- pkgfile = opt->zpmdb->path;
+ if (!opt->onlylocalinstalled) {
+ found = zpm_findpkg(opt->zpmdb, pkgstr, NULL);
+ if (found) {
+ rv = zpm_vercmp(found, latest);
+ if (rv == 1) {
+ latest = found;
+ pkgfile = opt->zpmdb->path;
+ }
}
}
*/
int output = 1;
- while ((option = getopt(ac, av, "ljqPRDvp:r:d:MiI")) != -1) {
+ while ((option = getopt(ac, av, "ljqPRDvp:r:d:MiIO")) != -1) {
switch (option) {
case 'l': findlibs = 1; break;
case 'j': json = 1; break;
/* show installed files */
case 'i': opt.matchinstalled = 1; break;
case 'I': opt.suppressinstalled = 1; break;
+ /* only find localdb pkgs if installed */
+ case 'O': opt.onlylocalinstalled = 1; break;
case 'd': opt.localdb = optarg; break;
case 'p': opt.pkgdir = optarg; break;
case 'r': opt.repodir = optarg; break;
if (findlibs) {
checklibs(&opt, check, forlibs, nolib);
+ /* remove from forlibs anything already explicitly
+ * in packages
+ */
}
if (output) {