summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gentoobrowse/console/packageimport.xml3
-rw-r--r--gentoobrowse/datasources/schema.sql6
2 files changed, 4 insertions, 5 deletions
diff --git a/gentoobrowse/console/packageimport.xml b/gentoobrowse/console/packageimport.xml
index 04375ca..0c1d7df 100644
--- a/gentoobrowse/console/packageimport.xml
+++ b/gentoobrowse/console/packageimport.xml
@@ -62,9 +62,8 @@
FROM files f, categories c
WHERE filetypeid = 4
AND f.pathparts[1] = c.name) x) x
- ) m ON m.categoryid = d.categoryid AND m.pkgname = d.pkgname
+ ) m ON m.categoryid = d.categoryid AND m.pkgname = d.pkgname AND m.r = 1
WHERE d.r = 1
- AND m.r = 1
</sql>
<columns>
<categoryid key="true" />
diff --git a/gentoobrowse/datasources/schema.sql b/gentoobrowse/datasources/schema.sql
index 1f1478f..36877a4 100644
--- a/gentoobrowse/datasources/schema.sql
+++ b/gentoobrowse/datasources/schema.sql
@@ -602,10 +602,10 @@ ALTER TABLE ONLY users
-- Name: repos_pkey; Type: CONSTRAINT; Schema: gentoobrowse; Owner: gentoo; Tablespace:
ALTER TABLE ONLY repos
ADD CONSTRAINT repos_pkey PRIMARY KEY (repoid);
--- Name: uni_ebuild_pkgver; Type: CONSTRAINT; Schema: gentoobrowse; Owner: gentoo; Tablespace:
+-- Name: uni_ebuild_pkgverrepo; Type: CONSTRAINT; Schema: gentoobrowse; Owner: gentoo; Tablespace:
ALTER TABLE ONLY ebuilds
- ADD CONSTRAINT uni_ebuild_pkgver UNIQUE (packageid, version);
-ALTER TABLE ebuilds CLUSTER ON uni_ebuild_pkgver;
+ ADD CONSTRAINT uni_ebuild_pkgverrepo UNIQUE (packageid, version, repoid);
+ALTER TABLE ebuilds CLUSTER ON uni_ebuild_pkgverrepo;
-- Name: uni_files_filename; Type: CONSTRAINT; Schema: gentoobrowse; Owner: gentoo; Tablespace:
ALTER TABLE ONLY files
ADD CONSTRAINT uni_files_filename UNIQUE (filename);