Created
August 11, 2011 18:37
-
-
Save dnaeon/1140389 to your computer and use it in GitHub Desktop.
pkgdb.c - patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# git diff | |
diff --git a/libpkg/pkgdb.c b/libpkg/pkgdb.c | |
index 93484e1..84df484 100644 | |
--- a/libpkg/pkgdb.c | |
+++ b/libpkg/pkgdb.c | |
@@ -703,7 +703,9 @@ pkgdb_query_remote(struct pkgdb *db, const char *pattern) | |
"arch, osversion, maintainer, www, pkgsize, " | |
"flatsize AS newflatsize, cksum, path AS repopath " | |
"FROM remote.packages " | |
- "WHERE origin = ?1"; | |
+ "WHERE origin = ?1 " | |
+ "AND NOT EXISTS (SELECT 1 FROM main.packages AS p " | |
+ "WHERE p.origin = ?1) "; | |
char sql_deps[] = "" | |
"SELECT d.name, d.origin, d.version " | |
"FROM remote.deps AS d " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment