[aur-dev] mismatched AUR IDs
Hi, I'm in the process of updating python3-aur for the 3.0.0 release and I have come across a bug. The IDs of recently updated packages reported by the RPC interface are incorrect. For example, etmtk is currently listed in the Recent Updates feed on the front page. The RPC interface reports the ID as 83532 but the true ID (e.g. for the deletion form) is 80587. Packages that have not been updated since the release of 3.0.0 do not appear to encounter this bug. Regards, Xyne
Hi Xyne, On Sat, 31 May 2014 at 04:29:21, Xyne wrote:
Hi,
I'm in the process of updating python3-aur for the 3.0.0 release and I have come across a bug. The IDs of recently updated packages reported by the RPC interface are incorrect. For example, etmtk is currently listed in the Recent Updates feed on the front page. The RPC interface reports the ID as 83532 but the true ID (e.g. for the deletion form) is 80587.
The correct ID of the package indeed is 83532, whereas 80587 is the ID of the package base. The RPC interface returns information on packages but you can only delete package bases. Maybe we should add the package base ID of packages to the new RPC interface?
Packages that have not been updated since the release of 3.0.0 do not appear to encounter this bug.
Yes, this is because package base ID and package ID are the same for these packages.
Regards, Xyne
Regards, Lukas
This is useful to tools that automatically generate requests to orphan, delete or merge packages. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> --- web/lib/aurjson.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/lib/aurjson.class.php b/web/lib/aurjson.class.php index 983e751..9abb2d6 100644 --- a/web/lib/aurjson.class.php +++ b/web/lib/aurjson.class.php @@ -17,6 +17,7 @@ class AurJSON { ); private static $fields_v1 = array( 'Packages.ID', 'Packages.Name', + 'PackageBases.ID AS PackageBaseID', 'PackageBases.Name AS PackageBase', 'Version', 'CategoryID', 'Description', 'URL', 'NumVotes', 'OutOfDateTS AS OutOfDate', 'Users.UserName AS Maintainer', @@ -25,14 +26,15 @@ class AurJSON { ); private static $fields_v2 = array( 'Packages.ID', 'Packages.Name', + 'PackageBases.ID AS PackageBaseID', 'PackageBases.Name AS PackageBase', 'Version', 'CategoryID', 'Description', 'URL', 'NumVotes', 'OutOfDateTS AS OutOfDate', 'Users.UserName AS Maintainer', 'SubmittedTS AS FirstSubmitted', 'ModifiedTS AS LastModified' ); private static $numeric_fields = array( - 'ID', 'CategoryID', 'NumVotes', 'OutOfDate', 'FirstSubmitted', - 'LastModified' + 'ID', 'PackageBaseID', 'CategoryID', 'NumVotes', 'OutOfDate', + 'FirstSubmitted', 'LastModified' ); /* -- 1.9.3
On 2014-05-31 12:04 +0200 Lukas Fleischer wrote:
This is useful to tools that automatically generate requests to orphan, delete or merge packages.
Perfect, thanks! When do you plan to push the changes?
On Sun, 01 Jun 2014 at 20:27:39, Xyne wrote:
On 2014-05-31 12:04 +0200 Lukas Fleischer wrote:
This is useful to tools that automatically generate requests to orphan, delete or merge packages.
Perfect, thanks! When do you plan to push the changes?
This feature will be part of 3.1.0 which will be released soon.
participants (2)
-
Lukas Fleischer
-
Xyne