Commit bc7b9c77 authored by Antoine Le Gonidec's avatar Antoine Le Gonidec

Database update — Add archive-based dependencies

parent 4f524dc6
<?php
use Illuminate\Database\Seeder;
class ArchivesAndDependenciesRelationshipsSeeder extends Seeder {
private $table_name = 'archive_dependency';
private $relationships = [
[
'archive_type' => 'debian',
'dependency_name' => 'dpkg',
],
[
'archive_type' => 'innosetup',
'dependency_name' => 'innoextract',
],
[
'archive_type' => 'innosetup_nolowercase',
'dependency_name' => 'innoextract',
],
[
'archive_type' => 'innosetup1.7',
'dependency_name' => 'innoextract1.7',
],
[
'archive_type' => 'mojosetup',
'dependency_name' => 'bsdtar',
],
[
'archive_type' => 'mojosetup_unzip',
'dependency_name' => 'unzip',
],
[
'archive_type' => 'nullsoft-installer',
'dependency_name' => 'unar',
],
[
'archive_type' => 'rar',
'dependency_name' => 'unar',
],
[
'archive_type' => 'tar',
'dependency_name' => 'tar',
],
[
'archive_type' => 'tar.gz',
'dependency_name' => 'gunzip',
],
[
'archive_type' => 'tar.gz',
'dependency_name' => 'tar',
],
[
'archive_type' => 'zip',
'dependency_name' => 'unzip',
],
[
'archive_type' => 'zip_unclean',
'dependency_name' => 'unzip',
],
];
/**
* Run the database seeds.
*
* @return void
*/
public function run() {
$table = app('db')->table($this->table_name);
$table->insert($this->relationships);
}
}
......@@ -13,6 +13,7 @@ class DatabaseSeeder extends Seeder {
$this->call('GamesTableSeeder');
$this->call('ScriptsTableSeeder');
$this->call('ArchivesTableSeeder');
$this->call('ArchivesAndDependenciesRelationshipsSeeder');
$this->call('GamesAndScriptsRelationshipsSeeder');
$this->call('ArchivesAndScriptsRelationshipsSeeder');
$this->call('ArchivesRelationshipsSeeder');
......
......@@ -9,24 +9,172 @@ class DependenciesTableSeeder extends Seeder {
private $dependencies = [
[
'system' => 'debian',
'name' => null,
'package' => 'dpkg',
'base' => true,
],
[
'system' => 'debian',
'name' => null,
'package' => 'fakeroot',
'base' => true,
],
[
'system' => 'gentoo',
'name' => null,
'package' => 'sys-apps/fakeroot-ng',
'base' => true,
],
[
'system' => 'gentoo',
'name' => null,
'package' => 'sys-apps/portage',
'base' => true,
],
[
'system' => 'archlinux',
'name' => 'dpkg',
'package' => 'dpkg',
'base' => false,
],
[
'system' => 'debian',
'name' => 'dpkg',
'package' => 'dpkg',
'base' => false,
],
[
'system' => 'gentoo',
'name' => 'dpkg',
'package' => 'app-arch/dpkg',
'base' => false,
],
[
'system' => 'archlinux',
'name' => 'innoextract',
'package' => 'innoextract',
'base' => false,
],
[
'system' => 'debian',
'name' => 'innoextract',
'package' => 'innoextract',
'base' => false,
],
[
'system' => 'gentoo',
'name' => 'innoextract',
'package' => 'app-arch/innoextract',
'base' => false,
],
[
'system' => 'archlinux',
'name' => 'innoextract1.7',
'package' => 'innoextract',
'base' => false,
],
[
'system' => 'debian',
'name' => 'innoextract1.7',
'package' => 'innoextract (>= 1.7)',
'base' => false,
],
[
'system' => 'gentoo',
'name' => 'innoextract1.7',
'package' => 'app-arch/innoextract',
'base' => false,
],
[
'system' => 'archlinux',
'name' => 'bsdtar',
'package' => 'libarchive',
'base' => false,
],
[
'system' => 'debian',
'name' => 'bsdtar',
'package' => 'libarchive-tools | bsdtar',
'base' => false,
],
[
'system' => 'gentoo',
'name' => 'bsdtar',
'package' => 'app-arch/libarchive',
'base' => false,
],
[
'system' => 'archlinux',
'name' => 'unzip',
'package' => 'unzip',
'base' => false,
],
[
'system' => 'debian',
'name' => 'unzip',
'package' => 'unzip',
'base' => false,
],
[
'system' => 'gentoo',
'name' => 'unzip',
'package' => 'app-arch/unzip',
'base' => false,
],
[
'system' => 'archlinux',
'name' => 'unar',
'package' => 'unarchiver',
'base' => false,
],
[
'system' => 'debian',
'name' => 'unar',
'package' => 'unar',
'base' => false,
],
[
'system' => 'gentoo',
'name' => 'unar',
'package' => 'app-arch/unar',
'base' => false,
],
[
'system' => 'archlinux',
'name' => 'tar',
'package' => 'tar',
'base' => false,
],
[
'system' => 'debian',
'name' => 'tar',
'package' => 'tar',
'base' => false,
],
[
'system' => 'gentoo',
'name' => 'tar',
'package' => 'app-arch/tar',
'base' => false,
],
[
'system' => 'archlinux',
'name' => 'gunzip',
'package' => 'gzip',
'base' => false,
],
[
'system' => 'debian',
'name' => 'gunzip',
'package' => 'gzip',
'base' => false,
],
[
'system' => 'gentoo',
'name' => 'gunzip',
'package' => 'app-arch/gzip',
'base' => false,
],
];
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment