From: Jay Freeman (saurik) Date: Thu, 30 Oct 2014 05:22:47 +0000 (-0700) Subject: Migrate the user's legacy APT lists to new Caches. X-Git-Tag: v1.1.14~10 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/e3799a2e08946d914e75ae16d8286868660ba862 Migrate the user's legacy APT lists to new Caches. --- diff --git a/postinst.mm b/postinst.mm index d96d624c..7c2fb683 100644 --- a/postinst.mm +++ b/postinst.mm @@ -172,6 +172,13 @@ int main(int argc, const char *argv[]) { if (access(OldCache_, F_OK) == 0) system("rm -rf " OldCache_); + #define NewCache_ "/var/mobile/Library/Caches/com.saurik.Cydia" + if (access(NewCache_ "/lists", F_OK) != 0 && errno == ENOENT) { + system("su -c 'mkdir -p " NewCache_ "' mobile"); + system("cp -at " NewCache_ " /var/lib/apt/lists"); + system("chown -R 501.501 " NewCache_ "/lists"); + } + FixPermissions(); if (FixApplications())