Skip to content

Commit

Permalink
Merge pull request #163 from gelraen/patch-1
Browse files Browse the repository at this point in the history
Fix recursive package selection in pkgdb_query_autoremove()
  • Loading branch information
Baptiste Daroussin committed Mar 3, 2012
2 parents 62fb03c + 424ae9c commit 80ae95a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libpkg/pkgdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2330,7 +2330,8 @@ pkgdb_query_autoremove(struct pkgdb *db)
sql_exec(db->sqlite, "INSERT OR IGNORE into autoremove(origin, pkgid, weight) "
"SELECT distinct origin, id, %d FROM packages WHERE automatic=1 AND "
"origin NOT IN (SELECT DISTINCT deps.origin FROM deps WHERE "
" deps.origin = packages.origin);"
" deps.origin = packages.origin AND package_id NOT IN "
" (select pkgid from autoremove));"
, weight);
} while (sqlite3_changes(db->sqlite) != 0);

Expand Down

0 comments on commit 80ae95a

Please sign in to comment.