diff options
author | Timo Teräs <timo.teras@iki.fi> | 2013-06-18 13:01:51 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2013-06-18 13:02:27 +0300 |
commit | fe41ae07b90bbd4609ee6871def851a41027aae8 (patch) | |
tree | 7f5a872c5ee030450e3cfdb84a73c9338f69d7f4 /src/package.c | |
parent | c51d82f8f616c2c8939b74c1d78f723ef778f0c8 (diff) | |
download | apk-tools-fe41ae07b90bbd4609ee6871def851a41027aae8.tar.gz apk-tools-fe41ae07b90bbd4609ee6871def851a41027aae8.tar.bz2 apk-tools-fe41ae07b90bbd4609ee6871def851a41027aae8.tar.xz apk-tools-fe41ae07b90bbd4609ee6871def851a41027aae8.zip |
apk: use string array in applet mains, separate apk_name_foreach_matching
Diffstat (limited to 'src/package.c')
-rw-r--r-- | src/package.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/package.c b/src/package.c index 702a643..fcfdd00 100644 --- a/src/package.c +++ b/src/package.c @@ -1174,10 +1174,11 @@ void apk_pkg_foreach_matching_dependency( unsigned int genid = match & APK_FOREACH_GENID_MASK; struct apk_dependency *d; - if (genid && pkg->foreach_genid >= genid) - return; - if (pkg) + if (pkg && genid) { + if (pkg->foreach_genid >= genid) + return; pkg->foreach_genid = genid; + } foreach_array_item(d, deps) { if (apk_dep_analyze(d, mpkg) & match) { @@ -1211,9 +1212,11 @@ static void foreach_reverse_dependency( continue; if (marked && !pkg0->marked) continue; - if (genid && pkg0->foreach_genid >= genid) - continue; - pkg0->foreach_genid = genid; + if (genid) { + if (pkg0->foreach_genid >= genid) + continue; + pkg0->foreach_genid = genid; + } foreach_array_item(d0, pkg0->depends) { if (apk_dep_analyze(d0, pkg) & match) cb(pkg0, d0, pkg, ctx); |