Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/database-layout.dump31
1 files changed, 16 insertions, 15 deletions
diff --git a/misc/database-layout.dump b/misc/database-layout.dump
index f067205..61c78be 100644
--- a/misc/database-layout.dump
+++ b/misc/database-layout.dump
@@ -1,42 +1,42 @@
blacklist_packages NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `blacklist_packages`()
blacklist_packages:BEGIN
-DECLARE row_count_saved INT DEFAULT 0;
CREATE TEMPORARY TABLE `bl` (`arch` SMALLINT,`pkgbase` VARCHAR(64),UNIQUE KEY `content`(`arch`,`pkgbase`));
CREATE TEMPORARY TABLE `bl_copy` (`arch` SMALLINT,`pkgbase` VARCHAR(64),UNIQUE KEY `content`(`arch`,`pkgbase`));
INSERT IGNORE INTO `bl`(`arch`,`pkgbase`)
SELECT `architectures`.`id`,`blacklist`.`pkgbase`
FROM `blacklist`
- JOIN `architectures` AS `bl_a`
- ON `bl_a`.`name`=`blacklist`.`arch`
- JOIN `architecture_compatibilities`
- ON `architecture_compatibilities`.`runs_on`=`bl_a`.`id` OR `bl_a`.`name`="any"
JOIN `architectures`
- ON `architectures`.`id`=`architecture_compatibilities`.`built_for`
- WHERE `architectures`.`name`!="any";
+ ON `architectures`.`name`=`blacklist`.`arch`;
REPEAT
DELETE
FROM `bl_copy`;
INSERT IGNORE INTO `bl_copy` (`arch`,`pkgbase`)
SELECT `bl`.`arch`, `bl`.`pkgbase`
FROM `bl`;
+INSERT IGNORE INTO `bl`(`arch`,`pkgbase`)
+ SELECT `architecture_compatibilities`.`built_for`,`bl_copy`.`pkgbase`
+ FROM `bl_copy`
+ JOIN `architecture_compatibilities`
+ ON (`architecture_compatibilities`.`runs_on`=`bl_copy`.`arch` OR `bl_copy`.`arch`=1) AND `architecture_compatibilities`.`built_for`!=1;
+DELETE
+ FROM `bl_copy`;
+INSERT IGNORE INTO `bl_copy` (`arch`,`pkgbase`)
+ SELECT `bl`.`arch`, `bl`.`pkgbase`
+ FROM `bl`;
INSERT IGNORE INTO `bl` (`arch`,`pkgbase`)
- SELECT `a_r`.`architecture`,`a_ps`.`pkgbase`
+ SELECT `a_bp`.`architecture`,`a_ps`.`pkgbase`
FROM `package_sources` AS `a_ps`
JOIN `build_assignments` AS `a_ba`
ON `a_ps`.`id`=`a_ba`.`package_source`
JOIN `binary_packages` AS `a_bp`
ON `a_ba`.`id`=`a_bp`.`build_assignment`
- JOIN `binary_packages_in_repositories` AS `a_bpir`
- ON `a_bp`.`id`=`a_bpir`.`package`
- JOIN `repositories` AS `a_r`
- ON `a_bpir`.`repository`=`a_r`.`id`
- JOIN `architectures` AS `a_ra`
- ON `a_r`.`architecture`=`a_ra`.`id`
+ JOIN `architectures` AS `a_a`
+ ON `a_bp`.`architecture`=`a_a`.`id`
JOIN `dependencies`
ON `a_bp`.`id`=`dependencies`.`dependent`
JOIN `dependency_types`
ON `dependencies`.`dependency_type`=`dependency_types`.`id` AND (`dependency_types`.`relevant_for_building` OR `dependency_types`.`relevant_for_binary_packages`)
- WHERE `a_ra`.`name`!="any" AND EXISTS (
+ WHERE EXISTS (
SELECT 1
FROM `install_target_providers`
WHERE `install_target_providers`.`install_target`=`dependencies`.`depending_on`) AND NOT EXISTS (
@@ -59,6 +59,7 @@ SELECT `architectures`.`name`,`bl`.`pkgbase`
JOIN `architectures`
ON `architectures`.`id`=`bl`.`arch`;
DROP TEMPORARY TABLE `bl`;
+DROP TEMPORARY TABLE `bl_copy`;
END utf8mb4 utf8mb4_unicode_ci utf8mb4_unicode_ci
calculate_dependencies_of_package_upto_first_built_one NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `calculate_dependencies_of_package_upto_first_built_one`(IN `target_pkgbase` VARCHAR(64))
BEGIN