diff options
author | joerg <joerg@pkgsrc.org> | 2007-08-09 23:18:30 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2007-08-09 23:18:30 +0000 |
commit | 7a51a218c2402be5199e42d7ed3e7068397539ec (patch) | |
tree | 7782693cc7e7672ac62409c95a7db35650ecd3a2 /pkgtools/pkg_install/files/add | |
parent | 710504e20a8c6719fb57732597870bc7b4512f19 (diff) | |
download | pkgsrc-7a51a218c2402be5199e42d7ed3e7068397539ec.tar.gz |
Change interface of is_automatic_installed and
mark_as_automatic_installed to take a package name and not a full path.
Add assertions to test for this.
Drop a few islinktodir checks.
Change pkg_info to use iterate_pkg_db instead of scanning the directory
by hand. As a side effect don't try to check for the pkgdb dir first,
let pkgdb_dump and iterate_pkg_db handle that.
Make pkgdb_dump return failure if it can't open the package db.
Diffstat (limited to 'pkgtools/pkg_install/files/add')
-rw-r--r-- | pkgtools/pkg_install/files/add/perform.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pkgtools/pkg_install/files/add/perform.c b/pkgtools/pkg_install/files/add/perform.c index c19f6ad7414..41d5d5801a4 100644 --- a/pkgtools/pkg_install/files/add/perform.c +++ b/pkgtools/pkg_install/files/add/perform.c @@ -1,4 +1,4 @@ -/* $NetBSD: perform.c,v 1.52 2007/08/08 22:33:38 joerg Exp $ */ +/* $NetBSD: perform.c,v 1.53 2007/08/09 23:18:30 joerg Exp $ */ #if HAVE_CONFIG_H #include "config.h" @@ -14,7 +14,7 @@ #if 0 static const char *rcsid = "from FreeBSD Id: perform.c,v 1.44 1997/10/13 15:03:46 jkh Exp"; #else -__RCSID("$NetBSD: perform.c,v 1.52 2007/08/08 22:33:38 joerg Exp $"); +__RCSID("$NetBSD: perform.c,v 1.53 2007/08/09 23:18:30 joerg Exp $"); #endif #endif @@ -505,9 +505,9 @@ pkg_do(const char *pkg, lpkg_head_t *pkgs) } /* See if this package (exact version) is already registered */ - if ((isdir(LogDir) || islinktodir(LogDir)) && !Force) { - if (!Automatic && is_automatic_installed(LogDir)) { - if (mark_as_automatic_installed(LogDir, 0) == 0) + if (isdir(LogDir) && !Force) { + if (!Automatic && is_automatic_installed(PkgName)) { + if (mark_as_automatic_installed(PkgName, 0) == 0) warnx("package `%s' was already installed as " "dependency, now marked as installed " "manually", PkgName); @@ -946,7 +946,7 @@ ignore_replace_depends_check: } } if (Automatic) - mark_as_automatic_installed(LogDir, 1); + mark_as_automatic_installed(PkgName, 1); if (Verbose) printf("Package %s registered in %s\n", PkgName, LogDir); } |