diff options
author | Timo Teräs <timo.teras@iki.fi> | 2014-12-08 08:30:58 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2014-12-08 08:31:41 +0200 |
commit | 02cd5a9c76cd676545c232bb567d7eb01e5bd6fd (patch) | |
tree | ce05b50bff40784b36c310eee0916be229e640b2 /src/ver.c | |
parent | 6697ed5e86e64516ac56894d2f81c575ff72fd4f (diff) | |
download | apk-tools-02cd5a9c76cd676545c232bb567d7eb01e5bd6fd.tar.gz apk-tools-02cd5a9c76cd676545c232bb567d7eb01e5bd6fd.tar.bz2 apk-tools-02cd5a9c76cd676545c232bb567d7eb01e5bd6fd.tar.xz apk-tools-02cd5a9c76cd676545c232bb567d7eb01e5bd6fd.zip |
make del, fetch, fix and info return errors
In case all applet arguments are packages names (that is are not
including wildcards), return error if they do not match to some
package.
Diffstat (limited to 'src/ver.c')
-rw-r--r-- | src/ver.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -123,9 +123,10 @@ static void ver_print_package_status(struct apk_database *db, const char *match, int i, r = -1; unsigned short tag, allowed_repos; + if (!name) return; + pkg = apk_pkg_get_installed(name); - if (pkg == NULL) - return; + if (!pkg) return; tag = pkg->ipkg->repository_tag; allowed_repos = db->repo_tags[tag].allowed_repos; |