pkg icon indicating copy to clipboard operation
pkg copied to clipboard

Recent changes to repo.conf handling have broken the '-r' functionality for search, etc.

Open infracaninophile opened this issue 11 years ago • 4 comments

pkg search -r reponame should work against any reponame known in repo.conf files even if marked as enabled: no. Recent changes completely hide the presence of disabled repos.

infracaninophile avatar Jun 29 '14 06:06 infracaninophile

Ah, yes, I wanted to be able to use -r working even if the repo was disabled today, and ended up here 😪

mat813 avatar Dec 03 '14 14:12 mat813

Fixed

bapt avatar Dec 30 '14 00:12 bapt

I'm sorry, but this isn't fixed at all. You still can't use '-r' to override the enabled flag in pkg.conf, which used to work just fine.

maggot:~/src/pkgng:% cat /usr/local/etc/pkg/repos/FreeBSD.conf 
FreeBSD: { enabled: no }
maggot:~/src/pkgng:% pkg search -r FreeBSD -x pkg
maggot:~/src/pkgng:% 

infracaninophile avatar Dec 30 '14 15:12 infracaninophile

The following seems to help:

--- libpkg/pkgdb.c.orig	2022-12-11 18:22:41 UTC
+++ libpkg/pkgdb.c
@@ -825,7 +825,7 @@ pkgdb_open_repos(struct pkgdb *db, const char *reponam
 	struct pkg_repo *r = NULL;
 
 	while (pkg_repos(&r) == EPKG_OK) {
-		if (!r->enable) {
+		if (!r->enable && reponame == NULL) {
 			continue;
 		}
 

jbeich avatar Jan 25 '23 12:01 jbeich