[pacman-dev] [PATCH] Increase maximum database size

Allan McRae allan at archlinux.org
Sat Jan 18 23:42:33 UTC 2020


We previously has the maximum database size as 25MB.  This was set in the days
before repos had as many packages as they do now, and before we started
distributing files databases.  Increase this limit to 128MB.

Signed-off-by: Allan McRae <allan at archlinux.org>
---

So this has been hit in the wild.   Manjaro patches their pacman package to
allow databases of 32MB, because their [community] repo files database
breaks the 25MB limit.   But being Manjaro, the patch was never forwarded
upstream, just like everything they have ever done.

People in Arch are no better.  A bug was reported, but some idiot (named
Antonio Rojas) closed the bug as "not a bug", because it was not an
Arch repo running into the issue.

So I only discovered this by seeing a closed bug report.


Now, onto the change...  this is ~4x bigger than anything seen in the
wild currently.  Is that enough of an increasse.


 lib/libalpm/be_sync.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c
index 07d2b4ae..a7050290 100644
--- a/lib/libalpm/be_sync.c
+++ b/lib/libalpm/be_sync.c
@@ -224,7 +224,7 @@ int SYMEXPORT alpm_db_update(int force, alpm_db_t *db)
 		int sig_ret = 0;
 
 		/* set hard upper limit of 25MiB */
-		payload.max_size = 25 * 1024 * 1024;
+		payload.max_size = 128 * 1024 * 1024;
 
 		/* print server + filename into a buffer */
 		len = strlen(server) + strlen(db->treename) + strlen(dbext) + 2;
-- 
2.25.0


More information about the pacman-dev mailing list