diff options
author | sobomax <sobomax@FreeBSD.org> | 2002-05-05 20:50:27 +0000 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2002-05-05 20:50:27 +0000 |
commit | c1ae331211aba15b32979855d8c599ba5e6ae4f3 (patch) | |
tree | 0ff14c0baabd4155ee00d534ac336c0b39f59706 /usr.sbin/pkg_install/info/perform.c | |
parent | 2bc8601c9e3b2e6386281824133d8a05c94a91f9 (diff) | |
download | FreeBSD-src-c1ae331211aba15b32979855d8c599ba5e6ae4f3.zip FreeBSD-src-c1ae331211aba15b32979855d8c599ba5e6ae4f3.tar.gz |
In a origin lookup mode (-O) don't bail out when encountering empty package
directory, because this prevent this option from being used from the
package-depends target of bsd.port.mk since it creates such empty dir
during its normal operation.
MFC after: 6 days
Diffstat (limited to 'usr.sbin/pkg_install/info/perform.c')
-rw-r--r-- | usr.sbin/pkg_install/info/perform.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.sbin/pkg_install/info/perform.c b/usr.sbin/pkg_install/info/perform.c index 99967e3..538d2ae 100644 --- a/usr.sbin/pkg_install/info/perform.c +++ b/usr.sbin/pkg_install/info/perform.c @@ -440,8 +440,14 @@ find_pkgs_by_origin(const char *db_dir, const char *origin) char *cp, tmp[PATH_MAX]; int cmd; - snprintf(tmp, PATH_MAX, "%s/%s/%s", db_dir, installed[i], - CONTENTS_FNAME); + snprintf(tmp, PATH_MAX, "%s/%s", db_dir, installed[i]); + /* + * SPECIAL CASE: ignore empty dirs, since we can can see them + * during port installation. + */ + if (isemptydir(tmp)) + continue; + snprintf(tmp, PATH_MAX, "%s/%s", tmp, CONTENTS_FNAME); fp = fopen(tmp, "r"); if (fp == NULL) { warn("%s", tmp); |