[aur-dev] [PATCH 1/2] Store {make, check, opt}depends in the database
In addition to parsing and storing dependencies of packages, store makedepends, checkdepends and optdepends. Every dependency (of any type) is displayed on the package details page. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> --- UPGRADING | 23 +++++++++++++++++++++++ schema/aur-schema.sql | 17 ++++++++++++++++- schema/gendummydata.py | 9 ++++++--- web/html/pkgsubmit.php | 36 ++++++++++++++++++++++-------------- web/lib/pkgfuncs.inc.php | 29 +++++++++++++++++++++++------ 5 files changed, 90 insertions(+), 24 deletions(-) diff --git a/UPGRADING b/UPGRADING index a33ea63..48737f2 100644 --- a/UPGRADING +++ b/UPGRADING @@ -142,6 +142,29 @@ CREATE UNIQUE INDEX VoteUsersIDPackageID ON PackageVotes (UsersID, PackageBaseID CREATE UNIQUE INDEX NotifyUserIDPkgID ON CommentNotify (UserID, PackageBaseID); ---- +12. Create a new table to store package dependency types: + +---- +CREATE TABLE DependencyTypes ( + ID TINYINT UNSIGNED NOT NULL AUTO_INCREMENT, + Name VARCHAR(32) NOT NULL DEFAULT '', + PRIMARY KEY (ID) +) ENGINE = InnoDB; +INSERT INTO DependencyTypes VALUES (1, 'depends'); +INSERT INTO DependencyTypes VALUES (2, 'makedepends'); +INSERT INTO DependencyTypes VALUES (3, 'checkdepends'); +INSERT INTO DependencyTypes VALUES (4, 'optdepends'); +---- + +13. Add a field to store the dependency type to the PackageDepends table: + +---- +ALTER TABLE PackageDepends ADD COLUMN DepTypeID TINYINT UNSIGNED NOT NULL; +UPDATE PackageDepends SET DepTypeID = 1; +ALTER TABLE PackageDepends + ADD FOREIGN KEY (DepTypeID) REFERENCES DependencyTypes(ID) ON DELETE NO ACTION; +---- + From 2.2.0 to 2.3.0 ------------------- diff --git a/schema/aur-schema.sql b/schema/aur-schema.sql index 9426a61..327a792 100644 --- a/schema/aur-schema.sql +++ b/schema/aur-schema.sql @@ -133,15 +133,30 @@ CREATE TABLE Packages ( ) ENGINE = InnoDB; +-- Define the package dependency types +-- +CREATE TABLE DependencyTypes ( + ID TINYINT UNSIGNED NOT NULL AUTO_INCREMENT, + Name VARCHAR(32) NOT NULL DEFAULT '', + PRIMARY KEY (ID) +) ENGINE = InnoDB; +INSERT INTO DependencyTypes VALUES (1, 'depends'); +INSERT INTO DependencyTypes VALUES (2, 'makedepends'); +INSERT INTO DependencyTypes VALUES (3, 'checkdepends'); +INSERT INTO DependencyTypes VALUES (4, 'optdepends'); + + -- Track which dependencies a package has -- CREATE TABLE PackageDepends ( PackageID INTEGER UNSIGNED NOT NULL, + DepTypeID TINYINT UNSIGNED NOT NULL, DepName VARCHAR(64) NOT NULL, DepCondition VARCHAR(20), INDEX (PackageID), INDEX (DepName), - FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE + FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE, + FOREIGN KEY (DepTypeID) REFERENCES DependencyTypes(ID) ON DELETE NO ACTION ) ENGINE = InnoDB; diff --git a/schema/gendummydata.py b/schema/gendummydata.py index bc0ede8..18852a2 100755 --- a/schema/gendummydata.py +++ b/schema/gendummydata.py @@ -28,7 +28,7 @@ MAX_USERS = 300 # how many users to 'register' MAX_DEVS = .1 # what percentage of MAX_USERS are Developers MAX_TUS = .2 # what percentage of MAX_USERS are Trusted Users MAX_PKGS = 900 # how many packages to load -PKG_DEPS = (1, 5) # min/max depends a package has +PKG_DEPS = (1, 15) # min/max depends a package has PKG_SRC = (1, 3) # min/max sources a package has PKG_CMNTS = (1, 5) # min/max number of comments a package has CATEGORIES_COUNT = 17 # the number of categories from aur-schema @@ -258,8 +258,11 @@ for p in list(seen_pkgs.keys()): while i != num_deps: dep = random.choice([k for k in seen_pkgs]) if dep not in this_deps: - s = "INSERT INTO PackageDepends VALUES (%d, '%s', NULL);\n" - s = s % (seen_pkgs[p], dep) + deptype = random.randrange(1, 5) + if deptype == 4: + dep += ": for " + random.choice([k for k in seen_pkgs]) + s = "INSERT INTO PackageDepends VALUES (%d, %d, '%s', NULL);\n" + s = s % (seen_pkgs[p], deptype, dep) out.write(s) i += 1 diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index 7db81a5..045b8f9 100644 --- a/web/html/pkgsubmit.php +++ b/web/html/pkgsubmit.php @@ -150,7 +150,13 @@ if ($uid): $pkginfo[] = array_merge($pkgbase_info, $section_info); } } - $section_info = array('depends' => array(), 'source' => array()); + $section_info = array( + 'depends' => array(), + 'makedepends' => array(), + 'checkdepends' => array(), + 'optdepends' => array(), + 'source' => array() + ); /* Fall-through case. */ case 'epoch': case 'pkgdesc': @@ -162,6 +168,9 @@ if ($uid): break; case 'source': case 'depends': + case 'makedepends': + case 'checkdepends': + case 'optdepends': $section_info[$key][] = $value; break; } @@ -181,15 +190,12 @@ if ($uid): if (!isset($pkgbase_info['pkgbase'])) { $pkgbase_info['pkgbase'] = $pkgbase_info['pkgname']; } - if (empty($pkgbase_info['depends'])) { - $pkgbase_info['depends'] = array(); - } else { - $pkgbase_info['depends'] = explode(" ", $pkgbase_info['depends']); - } - if (empty($pkgbase_info['source'])) { - $pkgbase_info['source'] = array(); - } else { - $pkgbase_info['source'] = explode(" ", $pkgbase_info['source']); + foreach (array('source', 'depends', 'makedepends', 'checkdepends', 'optdepends') as $array_opt) { + if (empty($pkgbase_info[$array_opt])) { + $pkgbase_info[$array_opt] = array(); + } else { + $pkgbase_info[$array_opt] = explode(" ", $pkgbase_info[$array_opt]); + } } $pkginfo[] = $pkgbase_info; } @@ -345,10 +351,12 @@ if ($uid): foreach ($pkginfo as $pi) { $pkgid = pkg_create($base_id, $pi['pkgname'], $pi['license'], $pi['full-version'], $pi['pkgdesc'], $pi['url']); - foreach ($pi['depends'] as $dep) { - $deppkgname = preg_replace("/(<|=|>).*/", "", $dep); - $depcondition = str_replace($deppkgname, "", $dep); - pkg_add_dep($pkgid, $deppkgname, $depcondition); + foreach (array('depends', 'makedepends', 'checkdepends', 'optdepends') as $deptype) { + foreach ($pi[$deptype] as $dep) { + $deppkgname = preg_replace("/(<|=|>).*/", "", $dep); + $depcondition = str_replace($deppkgname, "", $dep); + pkg_add_dep($pkgid, $deptype, $deppkgname, $depcondition); + } } foreach ($pi['source'] as $src) { diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php index c6b4a27..153e2a8 100644 --- a/web/lib/pkgfuncs.inc.php +++ b/web/lib/pkgfuncs.inc.php @@ -132,6 +132,21 @@ function pkg_dependencies($pkgid) { } /** + * Get the ID of a dependency type given its name + * + * @param string $name The name of the dependency type + * + * @return int The ID of the dependency type + */ +function pkg_dependency_type_id_from_name($name) { + $dbh = DB::connect(); + $q = "SELECT ID FROM DependencyTypes WHERE Name = "; + $q.= $dbh->quote($name); + $result = $dbh->query($q); + return $result->fetch(PDO::FETCH_COLUMN, 0); +} + +/** * Determine packages that depend on a package * * @param string $name The package name for the dependency search @@ -653,18 +668,20 @@ function pkg_create($base_id, $pkgname, $license, $pkgver, $pkgdesc, $pkgurl) { * Add a dependency for a specific package to the database * * @param int $pkgid The package ID to add the dependency for + * @param string $type The type of dependency to add * @param string $depname The name of the dependency to add * @param string $depcondition The type of dependency for the package * * @return void */ -function pkg_add_dep($pkgid, $depname, $depcondition) { +function pkg_add_dep($pkgid, $type, $depname, $depcondition) { $dbh = DB::connect(); - $q = sprintf("INSERT INTO PackageDepends (PackageID, DepName, DepCondition) VALUES (%d, %s, %s)", - $pkgid, - $dbh->quote($depname), - $dbh->quote($depcondition)); - + $q = sprintf("INSERT INTO PackageDepends (PackageID, DepTypeID, DepName, DepCondition) VALUES (%d, %d, %s, %s)", + $pkgid, + pkg_dependency_type_id_from_name($type), + $dbh->quote($depname), + $dbh->quote($depcondition) + ); $dbh->exec($q); } -- 1.9.2
This adds a label to makedepends, checkdepends and optdepends on the package details page. makedepends are labelled with "(make)", checkdepends with "(check)" and optdepends are labeled with "(optional)", followed by the optdepend description. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> --- web/lib/pkgfuncs.inc.php | 43 ++++++++++++++++++++++++++++++++++++++++++- web/template/pkg_details.php | 13 +++---------- 2 files changed, 45 insertions(+), 11 deletions(-) diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php index 153e2a8..5c30a95 100644 --- a/web/lib/pkgfuncs.inc.php +++ b/web/lib/pkgfuncs.inc.php @@ -116,8 +116,9 @@ function pkg_dependencies($pkgid) { $pkgid = intval($pkgid); if ($pkgid > 0) { $dbh = DB::connect(); - $q = "SELECT pd.DepName, pd.DepCondition, p.ID FROM PackageDepends pd "; + $q = "SELECT pd.DepName, dt.Name, pd.DepCondition, p.ID FROM PackageDepends pd "; $q.= "LEFT JOIN Packages p ON pd.DepName = p.Name "; + $q.= "LEFT JOIN DependencyTypes dt ON dt.ID = pd.DepTypeID "; $q.= "WHERE pd.PackageID = ". $pkgid . " "; $q.= "ORDER BY pd.DepName"; $result = $dbh->query($q); @@ -147,6 +148,46 @@ function pkg_dependency_type_id_from_name($name) { } /** + * Get the HTML code to display a package dependency link + * + * @param string $name The name of the dependency + * @param string $type The name of the dependency type + * @param string $cond The package dependency condition string + * @param int $pkg_id The package of the package to display the dependency for + * + * @return string The HTML code of the label to display + */ +function pkg_depend_link($name, $type, $cond, $pkg_id) { + if ($type == 'optdepends' && strpos($name, ':') !== false) { + $tokens = explode(':', $name, 2); + $name = $tokens[0]; + $desc = $tokens[1]; + } else { + $desc = '(unknown)'; + } + + $link = '<a href="'; + if (is_null($pkg_id)) { + $link .= 'https://www.archlinux.org/packages/?q=' . urlencode($name); + } else { + $link .= htmlspecialchars(get_pkg_uri($name), ENT_QUOTES); + } + $link .= '" title="' . __('View packages details for') .' ' . htmlspecialchars($name) . '">'; + $link .= htmlspecialchars($name) . '</a>'; + $link .= htmlspecialchars($cond); + + if ($type == 'makedepends') { + $link .= ' <em>(make)</em>'; + } elseif ($type == 'checkdepends') { + $link .= ' <em>(check)</em>'; + } elseif ($type == 'optdepends') { + $link .= ' <em>(optional) – ' . htmlspecialchars($desc) . ' </em>'; + } + + return $link; +} + +/** * Determine packages that depend on a package * * @param string $name The package name for the dependency search diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php index 3eaeac7..ef40f1f 100644 --- a/web/template/pkg_details.php +++ b/web/template/pkg_details.php @@ -219,16 +219,9 @@ if ($row["MaintainerUID"]): <h3><?= __('Dependencies') . " (" . count($deps) . ")"?></h3> <?php if (count($deps) > 0): ?> <ul> -<?php - while (list($k, $darr) = each($deps)): - # darr: (DepName, DepCondition, PackageID), where ID is NULL if it didn't exist - if (!is_null($darr[2])): -?> - <li><a href="<?= htmlspecialchars(get_pkg_uri($darr[0]), ENT_QUOTES); ?>" title="<?= __('View packages details for').' '. htmlspecialchars($darr[0]) ?>"><?= htmlspecialchars($darr[0]) ?></a><?= htmlspecialchars($darr[1]) ?></li> - <?php else: ?> - <li><a href="https://www.archlinux.org/packages/?q=<?= urlencode($darr[0])?>" title="<?= __('View packages details for').' ' . htmlspecialchars($darr[0]) ?>"><?= htmlspecialchars($darr[0]) ?></a><?= htmlspecialchars($darr[1]) ?></li> - <?php endif; ?> - <?php endwhile; ?> +<?php while (list($k, $darr) = each($deps)): ?> + <li><?= pkg_depend_link($darr[0], $darr[1], $darr[2], $darr[3]); ?></li> +<?php endwhile; ?> </ul> <?php endif; ?> </div> -- 1.9.2
On Thu, Apr 17, 2014 at 09:13:34PM +0200, Lukas Fleischer wrote:
In addition to parsing and storing dependencies of packages, store makedepends, checkdepends and optdepends. Every dependency (of any type) is displayed on the package details page.
So I'm not sure how it's all set up, but if this can be pulled via the api, then that would be amazing. Would really clean up a bunch of AUR helpers out there. I know pywer has some terrible bash parsing to try and get the depends and optdepends from the actual PKGBUILD file, which is extremely unreliable.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> --- UPGRADING | 23 +++++++++++++++++++++++ schema/aur-schema.sql | 17 ++++++++++++++++- schema/gendummydata.py | 9 ++++++--- web/html/pkgsubmit.php | 36 ++++++++++++++++++++++-------------- web/lib/pkgfuncs.inc.php | 29 +++++++++++++++++++++++------ 5 files changed, 90 insertions(+), 24 deletions(-)
diff --git a/UPGRADING b/UPGRADING index a33ea63..48737f2 100644 --- a/UPGRADING +++ b/UPGRADING @@ -142,6 +142,29 @@ CREATE UNIQUE INDEX VoteUsersIDPackageID ON PackageVotes (UsersID, PackageBaseID CREATE UNIQUE INDEX NotifyUserIDPkgID ON CommentNotify (UserID, PackageBaseID); ----
+12. Create a new table to store package dependency types: + +---- +CREATE TABLE DependencyTypes ( + ID TINYINT UNSIGNED NOT NULL AUTO_INCREMENT, + Name VARCHAR(32) NOT NULL DEFAULT '', + PRIMARY KEY (ID) +) ENGINE = InnoDB; +INSERT INTO DependencyTypes VALUES (1, 'depends'); +INSERT INTO DependencyTypes VALUES (2, 'makedepends'); +INSERT INTO DependencyTypes VALUES (3, 'checkdepends'); +INSERT INTO DependencyTypes VALUES (4, 'optdepends'); +---- + +13. Add a field to store the dependency type to the PackageDepends table: + +---- +ALTER TABLE PackageDepends ADD COLUMN DepTypeID TINYINT UNSIGNED NOT NULL; +UPDATE PackageDepends SET DepTypeID = 1; +ALTER TABLE PackageDepends + ADD FOREIGN KEY (DepTypeID) REFERENCES DependencyTypes(ID) ON DELETE NO ACTION; +---- + From 2.2.0 to 2.3.0 -------------------
diff --git a/schema/aur-schema.sql b/schema/aur-schema.sql index 9426a61..327a792 100644 --- a/schema/aur-schema.sql +++ b/schema/aur-schema.sql @@ -133,15 +133,30 @@ CREATE TABLE Packages ( ) ENGINE = InnoDB;
+-- Define the package dependency types +-- +CREATE TABLE DependencyTypes ( + ID TINYINT UNSIGNED NOT NULL AUTO_INCREMENT, + Name VARCHAR(32) NOT NULL DEFAULT '', + PRIMARY KEY (ID) +) ENGINE = InnoDB; +INSERT INTO DependencyTypes VALUES (1, 'depends'); +INSERT INTO DependencyTypes VALUES (2, 'makedepends'); +INSERT INTO DependencyTypes VALUES (3, 'checkdepends'); +INSERT INTO DependencyTypes VALUES (4, 'optdepends'); + + -- Track which dependencies a package has -- CREATE TABLE PackageDepends ( PackageID INTEGER UNSIGNED NOT NULL, + DepTypeID TINYINT UNSIGNED NOT NULL, DepName VARCHAR(64) NOT NULL, DepCondition VARCHAR(20), INDEX (PackageID), INDEX (DepName), - FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE + FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE, + FOREIGN KEY (DepTypeID) REFERENCES DependencyTypes(ID) ON DELETE NO ACTION ) ENGINE = InnoDB;
diff --git a/schema/gendummydata.py b/schema/gendummydata.py index bc0ede8..18852a2 100755 --- a/schema/gendummydata.py +++ b/schema/gendummydata.py @@ -28,7 +28,7 @@ MAX_USERS = 300 # how many users to 'register' MAX_DEVS = .1 # what percentage of MAX_USERS are Developers MAX_TUS = .2 # what percentage of MAX_USERS are Trusted Users MAX_PKGS = 900 # how many packages to load -PKG_DEPS = (1, 5) # min/max depends a package has +PKG_DEPS = (1, 15) # min/max depends a package has PKG_SRC = (1, 3) # min/max sources a package has PKG_CMNTS = (1, 5) # min/max number of comments a package has CATEGORIES_COUNT = 17 # the number of categories from aur-schema @@ -258,8 +258,11 @@ for p in list(seen_pkgs.keys()): while i != num_deps: dep = random.choice([k for k in seen_pkgs]) if dep not in this_deps: - s = "INSERT INTO PackageDepends VALUES (%d, '%s', NULL);\n" - s = s % (seen_pkgs[p], dep) + deptype = random.randrange(1, 5) + if deptype == 4: + dep += ": for " + random.choice([k for k in seen_pkgs]) + s = "INSERT INTO PackageDepends VALUES (%d, %d, '%s', NULL);\n" + s = s % (seen_pkgs[p], deptype, dep) out.write(s) i += 1
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index 7db81a5..045b8f9 100644 --- a/web/html/pkgsubmit.php +++ b/web/html/pkgsubmit.php @@ -150,7 +150,13 @@ if ($uid): $pkginfo[] = array_merge($pkgbase_info, $section_info); } } - $section_info = array('depends' => array(), 'source' => array()); + $section_info = array( + 'depends' => array(), + 'makedepends' => array(), + 'checkdepends' => array(), + 'optdepends' => array(), + 'source' => array() + ); /* Fall-through case. */ case 'epoch': case 'pkgdesc': @@ -162,6 +168,9 @@ if ($uid): break; case 'source': case 'depends': + case 'makedepends': + case 'checkdepends': + case 'optdepends': $section_info[$key][] = $value; break; } @@ -181,15 +190,12 @@ if ($uid): if (!isset($pkgbase_info['pkgbase'])) { $pkgbase_info['pkgbase'] = $pkgbase_info['pkgname']; } - if (empty($pkgbase_info['depends'])) { - $pkgbase_info['depends'] = array(); - } else { - $pkgbase_info['depends'] = explode(" ", $pkgbase_info['depends']); - } - if (empty($pkgbase_info['source'])) { - $pkgbase_info['source'] = array(); - } else { - $pkgbase_info['source'] = explode(" ", $pkgbase_info['source']); + foreach (array('source', 'depends', 'makedepends', 'checkdepends', 'optdepends') as $array_opt) { + if (empty($pkgbase_info[$array_opt])) { + $pkgbase_info[$array_opt] = array(); + } else { + $pkgbase_info[$array_opt] = explode(" ", $pkgbase_info[$array_opt]); + } } $pkginfo[] = $pkgbase_info; } @@ -345,10 +351,12 @@ if ($uid): foreach ($pkginfo as $pi) { $pkgid = pkg_create($base_id, $pi['pkgname'], $pi['license'], $pi['full-version'], $pi['pkgdesc'], $pi['url']);
- foreach ($pi['depends'] as $dep) { - $deppkgname = preg_replace("/(<|=|>).*/", "", $dep); - $depcondition = str_replace($deppkgname, "", $dep); - pkg_add_dep($pkgid, $deppkgname, $depcondition); + foreach (array('depends', 'makedepends', 'checkdepends', 'optdepends') as $deptype) { + foreach ($pi[$deptype] as $dep) { + $deppkgname = preg_replace("/(<|=|>).*/", "", $dep); + $depcondition = str_replace($deppkgname, "", $dep); + pkg_add_dep($pkgid, $deptype, $deppkgname, $depcondition); + } }
foreach ($pi['source'] as $src) { diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php index c6b4a27..153e2a8 100644 --- a/web/lib/pkgfuncs.inc.php +++ b/web/lib/pkgfuncs.inc.php @@ -132,6 +132,21 @@ function pkg_dependencies($pkgid) { }
/** + * Get the ID of a dependency type given its name + * + * @param string $name The name of the dependency type + * + * @return int The ID of the dependency type + */ +function pkg_dependency_type_id_from_name($name) { + $dbh = DB::connect(); + $q = "SELECT ID FROM DependencyTypes WHERE Name = "; + $q.= $dbh->quote($name); + $result = $dbh->query($q); + return $result->fetch(PDO::FETCH_COLUMN, 0); +} + +/** * Determine packages that depend on a package * * @param string $name The package name for the dependency search @@ -653,18 +668,20 @@ function pkg_create($base_id, $pkgname, $license, $pkgver, $pkgdesc, $pkgurl) { * Add a dependency for a specific package to the database * * @param int $pkgid The package ID to add the dependency for + * @param string $type The type of dependency to add * @param string $depname The name of the dependency to add * @param string $depcondition The type of dependency for the package * * @return void */ -function pkg_add_dep($pkgid, $depname, $depcondition) { +function pkg_add_dep($pkgid, $type, $depname, $depcondition) { $dbh = DB::connect(); - $q = sprintf("INSERT INTO PackageDepends (PackageID, DepName, DepCondition) VALUES (%d, %s, %s)", - $pkgid, - $dbh->quote($depname), - $dbh->quote($depcondition)); - + $q = sprintf("INSERT INTO PackageDepends (PackageID, DepTypeID, DepName, DepCondition) VALUES (%d, %d, %s, %s)", + $pkgid, + pkg_dependency_type_id_from_name($type), + $dbh->quote($depname), + $dbh->quote($depcondition) + ); $dbh->exec($q); }
-- 1.9.2
-- William Giokas | KaiSforza | http://kaictl.net/ GnuPG Key: 0x73CD09CF Fingerprint: F73F 50EF BBE2 9846 8306 E6B8 6902 06D8 73CD 09CF
On Thu, 17 Apr 2014 at 21:33:47, William Giokas wrote:
On Thu, Apr 17, 2014 at 09:13:34PM +0200, Lukas Fleischer wrote:
In addition to parsing and storing dependencies of packages, store makedepends, checkdepends and optdepends. Every dependency (of any type) is displayed on the package details page.
So I'm not sure how it's all set up, but if this can be pulled via the api, then that would be amazing. Would really clean up a bunch of AUR helpers out there. I know pywer has some terrible bash parsing to try and get the depends and optdepends from the actual PKGBUILD file, which is extremely unreliable. [...]
Not yet. My TODO list currently looks like this: 1. Parse and store package conflicts, provides and replaces. 2. Parse and store package groups. 3. Parse and store the license array (currently stored as a string). 4. Update the RPC interface to provide all the new fields. 5. Do a lot of testing. 6. Tell Dave to move mkaurball to [community]. 7. Do a lot of testing. 8. Release 3.0.0. So yes, this will eventually be available via the API.
On Thu, Apr 17, 2014 at 11:07:26PM +0200, Lukas Fleischer wrote:
On Thu, 17 Apr 2014 at 21:33:47, William Giokas wrote:
On Thu, Apr 17, 2014 at 09:13:34PM +0200, Lukas Fleischer wrote:
In addition to parsing and storing dependencies of packages, store makedepends, checkdepends and optdepends. Every dependency (of any type) is displayed on the package details page.
So I'm not sure how it's all set up, but if this can be pulled via the api, then that would be amazing. Would really clean up a bunch of AUR helpers out there. I know pywer has some terrible bash parsing to try and get the depends and optdepends from the actual PKGBUILD file, which is extremely unreliable. [...]
Not yet. My TODO list currently looks like this:
1. Parse and store package conflicts, provides and replaces. 2. Parse and store package groups. 3. Parse and store the license array (currently stored as a string). 4. Update the RPC interface to provide all the new fields. 5. Do a lot of testing. 6. Tell Dave to move mkaurball to [community]. 7. Do a lot of testing. 8. Release 3.0.0.
So yes, this will eventually be available via the API.
Awesome. I'll be more than willing to help with the testing when that phase comes around. Keeping my eye on aur-dev now. Thanks, -- William Giokas | KaiSforza | http://kaictl.net/ GnuPG Key: 0x73CD09CF Fingerprint: F73F 50EF BBE2 9846 8306 E6B8 6902 06D8 73CD 09CF
participants (2)
-
Lukas Fleischer
-
William Giokas