diff --git a/src/library/pkgcache/DESCRIPTION b/src/library/pkgcache/DESCRIPTION index 417acb401..d1ced1d88 100644 --- a/src/library/pkgcache/DESCRIPTION +++ b/src/library/pkgcache/DESCRIPTION @@ -23,9 +23,9 @@ Config/testthat/edition: 3 Encoding: UTF-8 Language: en-US Roxygen: list(markdown = TRUE, r6 = FALSE) -RoxygenNote: 7.3.1.9000 +RoxygenNote: 7.3.2 NeedsCompilation: yes -Packaged: 2024-06-25 08:37:02 UTC; gaborcsardi +Packaged: 2024-08-08 09:38:56 UTC; gaborcsardi Author: Gábor Csárdi [aut, cre], Posit Software, PBC [cph, fnd] Maintainer: Gábor Csárdi diff --git a/src/library/pkgcache/NEWS.md b/src/library/pkgcache/NEWS.md index 71beb0e96..920193793 100644 --- a/src/library/pkgcache/NEWS.md +++ b/src/library/pkgcache/NEWS.md @@ -7,6 +7,12 @@ anyway, because PPM is in a consistent state w.r.t. metadata and package files (https://github.com/r-lib/pak/issues/623). +* `parse_packages()` now does not throw a warning for empty `PACKAGES*` + files (#107). + +* `repo_set()` and the `ppm_*()` functions, e.g. `ppm_snapshots()`, now + work again after the PPM API changes (#110, #115). + # pkgcache 2.2.2 * pkgcache now treats R 4.5.x (current R-devel) macOS binaries diff --git a/src/library/pkgcache/R/aaa-async.R b/src/library/pkgcache/R/aaa-async.R index a3750a36d..ac3da7259 100644 --- a/src/library/pkgcache/R/aaa-async.R +++ b/src/library/pkgcache/R/aaa-async.R @@ -2886,6 +2886,7 @@ http_post <- mark_as_async(http_post) http_delete <- function(url, headers = character(), file = NULL, options = list()) { url; headers; options; + options <- get_default_curl_options(options) make_deferred_http( function() { diff --git a/src/library/pkgcache/R/installed.R b/src/library/pkgcache/R/installed.R index 1f67f32ec..d6530e6c1 100644 --- a/src/library/pkgcache/R/installed.R +++ b/src/library/pkgcache/R/installed.R @@ -128,7 +128,7 @@ parse_packages <- function(path, type = NULL) { } } - tbl <- as_data_frame(tab) + tbl <- as_data_frame(tab %||% list()) tbl } diff --git a/src/library/pkgcache/R/onload.R b/src/library/pkgcache/R/onload.R index 8d8ea770c..4f728722e 100644 --- a/src/library/pkgcache/R/onload.R +++ b/src/library/pkgcache/R/onload.R @@ -137,444 +137,6 @@ pkgenv$r_versions <- list( list(version = "4.3.0", date = "2023-04-21T07:06:14.217164Z") ) -pkgenv$ppm_versions <- c( - `2017-10-10T00:00:00Z` = "5", `2017-10-25T00:00:00Z` = "6", - `2017-10-30T00:00:00Z` = "7", `2017-11-01T00:00:00Z` = "8", - `2017-11-03T00:00:00Z` = "9", `2017-11-07T00:00:00Z` = "10", - `2017-11-08T00:00:00Z` = "11", `2017-11-13T00:00:00Z` = "12", - `2017-11-15T00:00:00Z` = "13", `2017-11-16T00:00:00Z` = "14", - `2017-11-17T00:00:00Z` = "15", `2017-11-20T00:00:00Z` = "16", - `2017-11-22T00:00:00Z` = "17", `2017-11-27T00:00:00Z` = "18", - `2017-11-28T00:00:00Z` = "19", `2017-11-29T00:00:00Z` = "20", - `2017-11-30T00:00:00Z` = "21", `2017-12-01T00:00:00Z` = "22", - `2017-12-06T00:00:00Z` = "23", `2017-12-08T00:00:00Z` = "24", - `2017-12-11T00:00:00Z` = "25", `2017-12-12T00:00:00Z` = "26", - `2017-12-13T00:00:00Z` = "27", `2017-12-19T00:00:00Z` = "28", - `2017-12-20T00:00:00Z` = "29", `2018-01-04T00:00:00Z` = "30", - `2018-01-05T00:00:00Z` = "31", `2018-01-08T00:00:00Z` = "32", - `2018-01-11T00:00:00Z` = "33", `2018-01-18T00:00:00Z` = "34", - `2018-01-22T00:00:00Z` = "35", `2018-01-29T00:00:00Z` = "36", - `2018-01-31T00:00:00Z` = "37", `2018-02-05T00:00:00Z` = "38", - `2018-02-15T00:00:00Z` = "39", `2018-02-23T00:00:00Z` = "40", - `2018-03-05T00:00:00Z` = "41", `2018-03-08T00:00:00Z` = "42", - `2018-03-13T00:00:00Z` = "43", `2018-03-15T00:00:00Z` = "44", - `2018-03-20T00:00:00Z` = "45", `2018-03-21T00:00:00Z` = "46", - `2018-03-23T00:00:00Z` = "47", `2018-03-27T00:00:00Z` = "48", - `2018-03-28T00:00:00Z` = "49", `2018-04-03T00:00:00Z` = "50", - `2018-04-10T00:00:00Z` = "51", `2018-04-18T00:00:00Z` = "52", - `2018-04-23T00:00:00Z` = "53", `2018-04-26T00:00:00Z` = "54", - `2018-04-30T00:00:00Z` = "55", `2018-05-03T00:00:00Z` = "56", - `2018-05-07T00:00:00Z` = "57", `2018-05-08T00:00:00Z` = "58", - `2018-05-10T00:00:00Z` = "59", `2018-05-14T00:00:00Z` = "60", - `2018-05-17T00:00:00Z` = "61", `2018-05-21T00:00:00Z` = "62", - `2018-05-24T00:00:00Z` = "63", `2018-05-30T00:00:00Z` = "64", - `2018-06-04T00:00:00Z` = "65", `2018-06-07T00:00:00Z` = "66", - `2018-06-11T00:00:00Z` = "67", `2018-06-15T00:00:00Z` = "68", - `2018-06-18T00:00:00Z` = "69", `2018-06-21T00:00:00Z` = "70", - `2018-06-25T00:00:00Z` = "71", `2018-06-28T00:00:00Z` = "72", - `2018-07-02T00:00:00Z` = "73", `2018-07-05T00:00:00Z` = "74", - `2018-07-09T00:00:00Z` = "75", `2018-07-13T00:00:00Z` = "76", - `2018-07-16T00:00:00Z` = "77", `2018-07-19T00:00:00Z` = "78", - `2018-07-23T00:00:00Z` = "79", `2018-07-26T00:00:00Z` = "80", - `2018-07-30T00:00:00Z` = "81", `2018-08-02T00:00:00Z` = "82", - `2018-08-06T00:00:00Z` = "83", `2018-08-09T00:00:00Z` = "84", - `2018-08-14T00:00:00Z` = "85", `2018-08-16T00:00:00Z` = "86", - `2018-08-20T00:00:00Z` = "87", `2018-08-21T00:00:00Z` = "88", - `2018-08-22T00:00:00Z` = "89", `2018-08-23T00:00:00Z` = "90", - `2018-08-24T00:00:00Z` = "91", `2018-08-27T00:00:00Z` = "92", - `2018-08-30T00:00:00Z` = "93", `2018-09-04T00:00:00Z` = "94", - `2018-09-06T00:00:00Z` = "95", `2018-09-10T00:00:00Z` = "96", - `2018-09-13T00:00:00Z` = "97", `2018-09-17T00:00:00Z` = "98", - `2018-09-20T00:00:00Z` = "99", `2018-09-24T00:00:00Z` = "100", - `2018-09-27T00:00:00Z` = "101", `2018-10-01T00:00:00Z` = "102", - `2018-10-04T00:00:00Z` = "103", `2018-10-08T00:00:00Z` = "104", - `2018-10-11T00:00:00Z` = "105", `2018-10-15T00:00:00Z` = "106", - `2018-10-18T00:00:00Z` = "107", `2018-10-22T00:00:00Z` = "108", - `2018-10-25T00:00:00Z` = "109", `2018-10-29T00:00:00Z` = "110", - `2018-11-01T00:00:00Z` = "111", `2018-11-05T00:00:00Z` = "112", - `2018-11-08T00:00:00Z` = "113", `2018-11-13T00:00:00Z` = "114", - `2018-11-15T00:00:00Z` = "115", `2018-11-19T00:00:00Z` = "116", - `2018-11-26T00:00:00Z` = "117", `2018-11-28T00:00:00Z` = "118", - `2018-11-29T00:00:00Z` = "119", `2018-12-03T00:00:00Z` = "120", - `2018-12-06T00:00:00Z` = "121", `2018-12-10T00:00:00Z` = "122", - `2018-12-11T00:00:00Z` = "123", `2018-12-12T00:00:00Z` = "124", - `2018-12-13T00:00:00Z` = "125", `2018-12-17T00:00:00Z` = "126", - `2018-12-20T00:00:00Z` = "127", `2018-12-24T00:00:00Z` = "128", - `2018-12-27T00:00:00Z` = "129", `2018-12-28T00:00:00Z` = "130", - `2018-12-31T00:00:00Z` = "131", `2019-01-03T00:00:00Z` = "132", - `2019-01-07T00:00:00Z` = "133", `2019-01-08T00:00:00Z` = "134", - `2019-01-10T00:00:00Z` = "135", `2019-01-14T00:00:00Z` = "136", - `2019-01-17T00:00:00Z` = "137", `2019-01-22T00:00:00Z` = "138", - `2019-01-25T00:00:00Z` = "139", `2019-01-29T00:00:00Z` = "140", - `2019-02-01T00:00:00Z` = "141", `2019-02-05T00:00:00Z` = "142", - `2019-02-07T00:00:00Z` = "143", `2019-02-11T00:00:00Z` = "144", - `2019-02-14T00:00:00Z` = "145", `2019-02-20T00:00:00Z` = "146", - `2019-02-25T00:00:00Z` = "147", `2019-02-28T00:00:00Z` = "148", - `2019-03-04T00:00:00Z` = "149", `2019-03-07T00:00:00Z` = "150", - `2019-03-11T00:00:00Z` = "151", `2019-03-14T00:00:00Z` = "152", - `2019-03-18T00:00:00Z` = "153", `2019-03-21T00:00:00Z` = "154", - `2019-03-25T00:00:00Z` = "155", `2019-03-28T00:00:00Z` = "156", - `2019-04-01T00:00:00Z` = "157", `2019-04-04T00:00:00Z` = "158", - `2019-04-08T00:00:00Z` = "159", `2019-04-09T00:00:00Z` = "160", - `2019-04-11T00:00:00Z` = "161", `2019-04-16T00:00:00Z` = "162", - `2019-04-18T00:00:00Z` = "163", `2019-04-22T00:00:00Z` = "164", - `2019-04-25T00:00:00Z` = "165", `2019-04-29T00:00:00Z` = "166", - `2019-05-02T00:00:00Z` = "167", `2019-05-06T00:00:00Z` = "168", - `2019-05-07T00:00:00Z` = "169", `2019-05-09T00:00:00Z` = "170", - `2019-05-13T00:00:00Z` = "171", `2019-05-15T00:00:00Z` = "172", - `2019-05-16T00:00:00Z` = "173", `2019-05-22T00:00:00Z` = "174", - `2019-05-24T00:00:00Z` = "175", `2019-05-28T00:00:00Z` = "176", - `2019-05-30T00:00:00Z` = "177", `2019-06-03T00:00:00Z` = "178", - `2019-06-06T00:00:00Z` = "179", `2019-06-10T00:00:00Z` = "180", - `2019-06-13T00:00:00Z` = "181", `2019-06-17T00:00:00Z` = "182", - `2019-06-20T00:00:00Z` = "183", `2019-06-24T00:00:00Z` = "184", - `2019-07-01T00:00:00Z` = "185", `2019-07-07T00:00:00Z` = "186", - `2019-07-08T00:00:00Z` = "187", `2019-07-11T00:00:00Z` = "188", - `2019-07-15T00:00:00Z` = "189", `2019-07-18T00:00:00Z` = "190", - `2019-07-22T00:00:00Z` = "191", `2019-07-23T00:00:00Z` = "192", - `2019-07-25T00:00:00Z` = "193", `2019-07-26T00:00:00Z` = "194", - `2019-07-29T00:00:00Z` = "195", `2019-08-01T00:00:00Z` = "196", - `2019-08-05T00:00:00Z` = "197", `2019-08-08T00:00:00Z` = "198", - `2019-08-12T00:00:00Z` = "199", `2019-08-15T00:00:00Z` = "200", - `2019-08-19T00:00:00Z` = "201", `2019-08-22T00:00:00Z` = "202", - `2019-08-23T00:00:00Z` = "203", `2019-08-26T00:00:00Z` = "204", - `2019-08-29T00:00:00Z` = "205", `2019-09-02T00:00:00Z` = "206", - `2019-09-05T00:00:00Z` = "207", `2019-09-09T00:00:00Z` = "208", - `2019-09-12T00:00:00Z` = "209", `2019-09-16T00:00:00Z` = "210", - `2019-09-19T00:00:00Z` = "211", `2019-09-21T00:00:00Z` = "212", - `2019-09-23T00:00:00Z` = "213", `2019-09-26T00:00:00Z` = "214", - `2019-09-30T00:00:00Z` = "215", `2019-10-03T00:00:00Z` = "216", - `2019-10-07T00:00:00Z` = "217", `2019-10-10T00:00:00Z` = "218", - `2019-10-14T00:00:00Z` = "219", `2019-10-17T00:00:00Z` = "220", - `2019-10-21T00:00:00Z` = "221", `2019-10-24T00:00:00Z` = "222", - `2019-10-28T00:00:00Z` = "223", `2019-10-31T00:00:00Z` = "224", - `2019-11-04T00:00:00Z` = "225", `2019-11-07T00:00:00Z` = "226", - `2019-11-12T00:00:00Z` = "227", `2019-11-13T00:00:00Z` = "228", - `2019-11-14T00:00:00Z` = "229", `2019-11-18T00:00:00Z` = "230", - `2019-11-21T00:00:00Z` = "231", `2019-11-25T00:00:00Z` = "232", - `2019-12-02T00:00:00Z` = "233", `2019-12-05T00:00:00Z` = "234", - `2019-12-10T00:00:00Z` = "235", `2019-12-12T00:00:00Z` = "236", - `2019-12-16T00:00:00Z` = "237", `2019-12-19T00:00:00Z` = "238", - `2020-01-06T00:00:00Z` = "239", `2020-01-08T00:00:00Z` = "240", - `2020-01-09T00:00:00Z` = "241", `2020-01-13T00:00:00Z` = "242", - `2020-01-14T00:00:00Z` = "243", `2020-01-16T00:00:00Z` = "244", - `2020-01-21T00:00:00Z` = "245", `2020-01-23T00:00:00Z` = "246", - `2020-01-27T00:00:00Z` = "247", `2020-01-29T00:00:00Z` = "248", - `2020-01-30T00:00:00Z` = "249", `2020-02-03T00:00:00Z` = "250", - `2020-02-05T00:00:00Z` = "251", `2020-02-06T00:00:00Z` = "252", - `2020-02-10T00:00:00Z` = "253", `2020-02-13T00:00:00Z` = "254", - `2020-02-17T00:00:00Z` = "255", `2020-02-20T00:00:00Z` = "256", - `2020-02-24T00:00:00Z` = "257", `2020-02-27T00:00:00Z` = "258", - `2020-03-02T00:00:00Z` = "259", `2020-03-05T00:00:00Z` = "260", - `2020-03-09T00:00:00Z` = "261", `2020-03-12T00:00:00Z` = "262", - `2020-03-16T00:00:00Z` = "263", `2020-03-19T00:00:00Z` = "264", - `2020-03-23T00:00:00Z` = "265", `2020-03-26T00:00:00Z` = "266", - `2020-03-30T00:00:00Z` = "267", `2020-04-02T00:00:00Z` = "268", - `2020-04-06T00:00:00Z` = "269", `2020-04-09T00:00:00Z` = "270", - `2020-04-13T00:00:00Z` = "271", `2020-04-16T00:00:00Z` = "272", - `2020-04-20T00:00:00Z` = "273", `2020-04-23T00:00:00Z` = "275", - `2020-04-27T00:00:00Z` = "276", `2020-04-30T00:00:00Z` = "277", - `2020-05-04T00:00:00Z` = "278", `2020-05-07T00:00:00Z` = "279", - `2020-05-11T00:00:00Z` = "280", `2020-05-14T00:00:00Z` = "281", - `2020-05-15T00:00:00Z` = "282", `2020-05-18T00:00:00Z` = "283", - `2020-05-21T00:00:00Z` = "284", `2020-05-26T00:00:00Z` = "285", - `2020-05-28T00:00:00Z` = "288", `2020-06-01T00:00:00Z` = "289", - `2020-06-04T00:00:00Z` = "290", `2020-06-08T00:00:00Z` = "291", - `2020-06-11T00:00:00Z` = "292", `2020-06-15T00:00:00Z` = "293", - `2020-06-18T00:00:00Z` = "294", `2020-06-22T00:00:00Z` = "295", - `2020-06-25T00:00:00Z` = "296", `2020-06-29T00:00:00Z` = "297", - `2020-07-02T00:00:00Z` = "298", `2020-07-06T00:00:00Z` = "299", - `2020-07-09T00:00:00Z` = "300", `2020-07-13T00:00:00Z` = "301", - `2020-07-16T00:00:00Z` = "302", `2020-07-20T00:00:00Z` = "303", - `2020-07-23T00:00:00Z` = "304", `2020-07-27T00:00:00Z` = "305", - `2020-07-30T00:00:00Z` = "306", `2020-08-03T00:00:00Z` = "307", - `2020-08-06T00:00:00Z` = "308", `2020-08-10T00:00:00Z` = "309", - `2020-08-13T00:00:00Z` = "310", `2020-08-17T00:00:00Z` = "311", - `2020-08-20T00:00:00Z` = "312", `2020-08-21T00:00:00Z` = "313", - `2020-08-24T00:00:00Z` = "314", `2020-08-27T00:00:00Z` = "315", - `2020-08-31T00:00:00Z` = "316", `2020-09-01T00:00:00Z` = "317", - `2020-09-02T00:00:00Z` = "318", `2020-09-03T00:00:00Z` = "319", - `2020-09-04T00:00:00Z` = "320", `2020-09-08T00:00:00Z` = "321", - `2020-09-09T00:00:00Z` = "322", `2020-09-10T00:00:00Z` = "323", - `2020-09-11T00:00:00Z` = "324", `2020-09-14T00:00:00Z` = "325", - `2020-09-15T00:00:00Z` = "326", `2020-09-16T00:00:00Z` = "327", - `2020-09-17T00:00:00Z` = "328", `2020-09-18T00:00:00Z` = "329", - `2020-09-21T00:00:00Z` = "330", `2020-09-22T00:00:00Z` = "331", - `2020-09-23T00:00:00Z` = "332", `2020-09-24T00:00:00Z` = "333", - `2020-09-25T00:00:00Z` = "334", `2020-09-28T00:00:00Z` = "335", - `2020-09-29T00:00:00Z` = "336", `2020-09-30T00:00:00Z` = "337", - `2020-10-01T00:00:00Z` = "338", `2020-10-02T00:00:00Z` = "339", - `2020-10-05T00:00:00Z` = "340", `2020-10-06T00:00:00Z` = "341", - `2020-10-07T00:00:00Z` = "342", `2020-10-09T00:00:00Z` = "343", - `2020-10-13T00:00:00Z` = "344", `2020-10-14T00:00:00Z` = "345", - `2020-10-15T00:00:00Z` = "346", `2020-10-16T00:00:00Z` = "347", - `2020-10-19T00:00:00Z` = "348", `2020-10-20T00:00:00Z` = "349", - `2020-10-21T00:00:00Z` = "350", `2020-10-22T00:00:00Z` = "351", - `2020-10-23T00:00:00Z` = "352", `2020-10-26T00:00:00Z` = "353", - `2020-10-27T00:00:00Z` = "354", `2020-10-28T00:00:00Z` = "355", - `2020-10-29T00:00:00Z` = "356", `2020-11-02T00:00:00Z` = "357", - `2020-11-03T00:00:00Z` = "358", `2020-11-04T00:00:00Z` = "359", - `2020-11-05T00:00:00Z` = "360", `2020-11-06T00:00:00Z` = "361", - `2020-11-09T00:00:00Z` = "362", `2020-11-10T00:00:00Z` = "363", - `2020-11-11T00:00:00Z` = "364", `2020-11-12T00:00:00Z` = "365", - `2020-11-13T00:00:00Z` = "366", `2020-11-17T00:00:00Z` = "367", - `2020-11-18T00:00:00Z` = "368", `2020-11-19T00:00:00Z` = "369", - `2020-11-20T00:00:00Z` = "371", `2020-11-23T00:00:00Z` = "372", - `2020-11-24T00:00:00Z` = "373", `2020-11-25T00:00:00Z` = "374", - `2020-11-26T00:00:00Z` = "375", `2020-11-27T00:00:00Z` = "376", - `2020-11-30T00:00:00Z` = "2658", `2020-12-01T00:00:00Z` = "16803", - `2020-12-02T00:00:00Z` = "36893", `2020-12-03T00:00:00Z` = "55500", - `2020-12-04T00:00:00Z` = "72624", `2020-12-07T00:00:00Z` = "124693", - `2020-12-08T00:00:00Z` = "147771", `2020-12-09T00:00:00Z` = "164169", - `2020-12-10T00:00:00Z` = "181268", `2020-12-11T00:00:00Z` = "196169", - `2020-12-14T00:00:00Z` = "252737", `2020-12-15T00:00:00Z` = "267651", - `2020-12-16T00:00:00Z` = "287740", `2020-12-17T00:00:00Z` = "304084", - `2020-12-18T00:00:00Z` = "320454", `2020-12-21T00:00:00Z` = "374083", - `2020-12-22T00:00:00Z` = "394182", `2020-12-23T00:00:00Z` = "410586", - `2020-12-28T00:00:00Z` = "499871", `2020-12-30T00:00:00Z` = "535602", - `2020-12-31T00:00:00Z` = "554183", `2021-01-04T00:00:00Z` = "624880", - `2021-01-05T00:00:00Z` = "642006", `2021-01-06T00:00:00Z` = "659883", - `2021-01-07T00:00:00Z` = "678465", `2021-01-08T00:00:00Z` = "696304", - `2021-01-12T00:00:00Z` = "766976", `2021-01-13T00:00:00Z` = "789303", - `2021-01-14T00:00:00Z` = "804177", `2021-01-15T00:00:00Z` = "819819", - `2021-01-18T00:00:00Z` = "874852", `2021-01-19T00:00:00Z` = "890494", - `2021-01-20T00:00:00Z` = "908360", `2021-01-21T00:00:00Z` = "926967", - `2021-01-22T00:00:00Z` = "946314", `2021-01-25T00:00:00Z` = "997643", - `2021-01-26T00:00:00Z` = "1014755", `2021-01-27T00:00:00Z` = "1033374", - `2021-01-28T00:00:00Z` = "1053473", `2021-01-29T00:00:00Z` = "1069075", - `2021-02-01T00:00:00Z` = "1123445", `2021-02-02T00:00:00Z` = "1140568", - `2021-02-03T00:00:00Z` = "1160641", `2021-02-04T00:00:00Z` = "1175516", - `2021-02-05T00:00:00Z` = "1194160", - `2021-02-08T00:00:00Z` = "1248504", `2021-02-09T00:00:00Z` = "1265616", - `2021-02-10T00:00:00Z` = "1293895", `2021-02-11T00:00:00Z` = "1301345", - `2021-02-16T00:00:00Z` = "1390593", `2021-02-17T00:00:00Z` = "1409175", - `2021-02-18T00:00:00Z` = "1426326", `2021-02-19T00:00:00Z` = "1444919", - `2021-02-22T00:00:00Z` = "1499234", `2021-02-23T00:00:00Z` = "1517087", - `2021-02-24T00:00:00Z` = "1534223", `2021-02-25T00:00:00Z` = "1552815", - `2021-02-26T00:00:00Z` = "1570705", `2021-03-01T00:00:00Z` = "1623553", - `2021-03-02T00:00:00Z` = "1640677", `2021-03-03T00:00:00Z` = "1657803", - `2021-03-04T00:00:00Z` = "1678619", `2021-03-05T00:00:00Z` = "1695015", - `2021-03-08T00:00:00Z` = "1750568", `2021-03-09T00:00:00Z` = "1763612", - `2021-03-10T00:00:00Z` = "1790917", `2021-03-11T00:00:00Z` = "1796326", - `2021-03-12T00:00:00Z` = "1796327", `2021-03-15T00:00:00Z` = "1796328", - `2021-03-16T00:00:00Z` = "1797980", `2021-03-18T00:00:00Z` = "1835421", - `2021-03-19T00:00:00Z` = "1852569", `2021-03-22T00:00:00Z` = "1909510", - `2021-03-23T00:00:00Z` = "1927451", `2021-03-24T00:00:00Z` = "1945392", - `2021-03-25T00:00:00Z` = "1964900", `2021-03-26T00:00:00Z` = "1987521", - `2021-03-29T00:00:00Z` = "2038982", `2021-03-30T00:00:00Z` = "2059270", - `2021-03-31T00:00:00Z` = "2080338", `2021-04-01T00:00:00Z` = "2097505", - `2021-04-02T00:00:00Z` = "2116232", `2021-04-05T00:00:00Z` = "2173971", - `2021-04-07T00:00:00Z` = "2209094", `2021-04-09T00:00:00Z` = "2237975", - `2021-04-12T00:00:00Z` = "2305086", `2021-04-15T00:00:00Z` = "2358937", - `2021-04-16T00:00:00Z` = "2380008", `2021-04-20T00:00:00Z` = "2452589", - `2021-04-21T00:00:00Z` = "2472880", `2021-04-22T00:00:00Z` = "2488491", - `2021-04-23T00:00:00Z` = "2511902", `2021-04-26T00:00:00Z` = "2564180", - `2021-04-28T00:00:00Z` = "2605541", `2021-04-29T00:00:00Z` = "2621152", - `2021-04-30T00:00:00Z` = "2639103", `2021-05-03T00:00:00Z` = "2696074", - `2021-05-04T00:00:00Z` = "2716365", `2021-05-05T00:00:00Z` = "2735876", - `2021-05-06T00:00:00Z` = "2752267", `2021-05-07T00:00:00Z` = "2812358", - `2021-05-10T00:00:00Z` = "2827189", `2021-05-11T00:00:00Z` = "2846700", - `2021-05-12T00:00:00Z` = "2866992", `2021-05-13T00:00:00Z` = "2886503", - `2021-05-14T00:00:00Z` = "2959864", `2021-05-17T00:00:00Z` = "2959865", - `2021-05-18T00:00:00Z` = "2976243", `2021-05-19T00:00:00Z` = "2994759", - `2021-05-20T00:00:00Z` = "3018940", `2021-05-24T00:00:00Z` = "3096547", - `2021-05-26T00:00:00Z` = "3132672", `2021-05-27T00:00:00Z` = "3150303", - `2021-06-01T00:00:00Z` = "3255292", `2021-06-02T00:00:00Z` = "3274613", - `2021-06-03T00:00:00Z` = "3296457", `2021-06-04T00:00:00Z` = "3318312", - `2021-06-08T00:00:00Z` = "3399799", `2021-06-09T00:00:00Z` = "3413212", - `2021-06-10T00:00:00Z` = "3433373", `2021-06-11T00:00:00Z` = "3456894", - `2021-06-14T00:00:00Z` = "3512335", `2021-06-15T00:00:00Z` = "3531656", - `2021-06-16T00:00:00Z` = "3555203", `2021-06-17T00:00:00Z` = "3577887", - `2021-06-21T00:00:00Z` = "3656918", `2021-06-22T00:00:00Z` = "3675420", - `2021-06-23T00:00:00Z` = "3695604", `2021-06-24T00:00:00Z` = "3719147", - `2021-06-25T00:00:00Z` = "3739332", `2021-06-28T00:00:00Z` = "3797354", - `2021-06-29T00:00:00Z` = "3817542", `2021-06-30T00:00:00Z` = "3837717", - `2021-07-01T00:00:00Z` = "3844718", `2021-07-02T00:00:00Z` = "3847939", - `2021-07-06T00:00:00Z` = "3927863", `2021-07-07T00:00:00Z` = "3948059", - `2021-07-08T00:00:00Z` = "3969095", `2021-07-09T00:00:00Z` = "3990971", - `2021-07-12T00:00:00Z` = "4049024", `2021-07-13T00:00:00Z` = "4069210", - `2021-07-14T00:00:00Z` = "4089396", `2021-07-15T00:00:00Z` = "4109596", - `2021-07-16T00:00:00Z` = "4129799", `2021-07-19T00:00:00Z` = "4195450", - `2021-07-20T00:00:00Z` = "4217336", `2021-07-21T00:00:00Z` = "4231663", - `2021-07-22T00:00:00Z` = "4251034", `2021-07-23T00:00:00Z` = "4271245", - `2021-07-26T00:00:00Z` = "4331880", `2021-07-27T00:00:00Z` = "4352097", - `2021-07-28T00:00:00Z` = "4372311", `2021-07-29T00:00:00Z` = "4392527", - `2021-07-30T00:00:00Z` = "4412744", `2021-08-02T00:00:00Z` = "4419409", - `2021-08-03T00:00:00Z` = "4419410", `2021-08-04T00:00:00Z` = "4419411", - `2021-08-05T00:00:00Z` = "4419412", `2021-08-06T00:00:00Z` = "4438834", - `2021-08-09T00:00:00Z` = "4501165", `2021-08-10T00:00:00Z` = "4520552", - `2021-08-11T00:00:00Z` = "4526197", `2021-08-12T00:00:00Z` = "4526198", - `2021-08-13T00:00:00Z` = "4526199", `2021-08-16T00:00:00Z` = "4526200", - `2021-08-17T00:00:00Z` = "4541101", `2021-08-18T00:00:00Z` = "4561333", - `2021-08-19T00:00:00Z` = "4581566", `2021-08-20T00:00:00Z` = "4601800", - `2021-08-23T00:00:00Z` = "4662500", `2021-08-24T00:00:00Z` = "4683455", - `2021-08-25T00:00:00Z` = "4703604", `2021-08-26T00:00:00Z` = "4723768", - `2021-08-27T00:00:00Z` = "4743918", `2021-08-30T00:00:00Z` = "4804401", - `2021-08-31T00:00:00Z` = "4824565", `2021-09-02T00:00:00Z` = "4970718", - `2021-09-09T00:00:00Z` = "5006004", `2021-09-10T00:00:00Z` = "5026166", - `2021-09-13T00:00:00Z` = "5086649", `2021-09-14T00:00:00Z` = "5106814", - `2021-09-17T00:00:00Z` = "5139817", `2021-09-20T00:00:00Z` = "5142338", - `2021-09-21T00:00:00Z` = "5163350", `2021-09-22T00:00:00Z` = "5184339", - `2021-09-23T00:00:00Z` = "5202823", `2021-09-24T00:00:00Z` = "5226346", - `2021-09-27T00:00:00Z` = "5281748", `2021-09-28T00:00:00Z` = "5306111", - `2021-09-29T00:00:00Z` = "5324594", `2021-09-30T00:00:00Z` = "5341398", - `2021-10-01T00:00:00Z` = "5380870", `2021-10-04T00:00:00Z` = "5424537", - `2021-10-05T00:00:00Z` = "5443861", `2021-10-06T00:00:00Z` = "5466544", - `2021-10-07T00:00:00Z` = "5490066", `2021-10-08T00:00:00Z` = "5505188", - `2021-10-11T00:00:00Z` = "5565672", `2021-10-12T00:00:00Z` = "5587518", - `2021-10-13T00:00:00Z` = "5604321", `2021-10-14T00:00:00Z` = "5625325", - `2021-10-15T00:00:00Z` = "5645488", `2021-10-19T00:00:00Z` = "5729480", - `2021-10-20T00:00:00Z` = "5749643", `2021-10-21T00:00:00Z` = "5771474", - `2021-10-26T00:00:00Z` = "5869750", `2021-10-27T00:00:00Z` = "5888232", - `2021-10-28T00:00:00Z` = "5912869", `2021-10-29T00:00:00Z` = "5928175", - `2021-11-01T00:00:00Z` = "5997449", `2021-11-02T00:00:00Z` = "6016341", - `2021-11-03T00:00:00Z` = "6038844", `2021-11-04T00:00:00Z` = "6059549", - `2021-11-05T00:00:00Z` = "6082052", `2021-11-09T00:00:00Z` = "6172056", - `2021-11-10T00:00:00Z` = "6190062", `2021-11-11T00:00:00Z` = "6220653", - `2021-11-12T00:00:00Z` = "6229654", `2021-11-15T00:00:00Z` = "6297158", - `2021-11-16T00:00:00Z` = "6316963", `2021-11-17T00:00:00Z` = "6339466", - `2021-11-18T00:00:00Z` = "6360169", `2021-11-19T00:00:00Z` = "6381758", - `2021-11-22T00:00:00Z` = "6454659", `2021-11-23T00:00:00Z` = "6469065", - `2021-11-24T00:00:00Z` = "6489753", `2021-11-25T00:00:00Z` = "6512256", - `2021-11-26T00:00:00Z` = "6532960", `2021-11-29T00:00:00Z` = "6604947", - `2021-11-30T00:00:00Z` = "6623851", `2021-12-01T00:00:00Z` = "6645455", - `2021-12-02T00:00:00Z` = "6662753", `2021-12-03T00:00:00Z` = "6686156", - `2021-12-07T00:00:00Z` = "6774347", `2021-12-08T00:00:00Z` = "6791448", - `2021-12-09T00:00:00Z` = "6813053", `2021-12-10T00:00:00Z` = "6834657", - `2021-12-13T00:00:00Z` = "6901154", `2021-12-14T00:00:00Z` = "6920958", - `2021-12-15T00:00:00Z` = "6945246", `2021-12-16T00:00:00Z` = "6967659", - `2021-12-17T00:00:00Z` = "6990792", `2021-12-21T00:00:00Z` = "7071783", - `2021-12-22T00:00:00Z` = "7094091", `2021-12-23T00:00:00Z` = "7114793", - `2021-12-24T00:00:00Z` = "7139099", `2021-12-29T00:00:00Z` = "7331705", - `2022-01-03T00:00:00Z` = "7347907", `2022-01-04T00:00:00Z` = "7369465", - `2022-01-05T00:00:00Z` = "7397368", `2022-01-06T00:00:00Z` = "7429771", - `2022-01-07T00:00:00Z` = "7440572", `2022-01-10T00:00:00Z` = "7504475", - `2022-01-11T00:00:00Z` = "7526081", `2022-01-12T00:00:00Z` = "7547670", - `2022-01-13T00:00:00Z` = "7569273", `2022-01-19T00:00:00Z` = "7701581", - `2022-01-20T00:00:00Z` = "7718682", `2022-01-21T00:00:00Z` = "7744783", - `2022-01-26T00:00:00Z` = "7855480", `2022-01-27T00:00:00Z` = "7876183", - `2022-01-28T00:00:00Z` = "7895072", `2022-01-31T00:00:00Z` = "7956761", - `2022-02-01T00:00:00Z` = "7979266", `2022-02-03T00:00:00Z` = "8020671", - `2022-02-07T00:00:00Z` = "8109774", `2022-02-08T00:00:00Z` = "8130478", - `2022-02-09T00:00:00Z` = "8152081", `2022-02-10T00:00:00Z` = "8173684", - `2022-02-11T00:00:00Z` = "8194388", `2022-02-14T00:00:00Z` = "8261890", - `2022-02-15T00:00:00Z` = "8282593", `2022-02-16T00:00:00Z` = "8302396", - `2022-02-17T00:00:00Z` = "8326699", `2022-02-22T00:00:00Z` = "8431089", - `2022-02-23T00:00:00Z` = "8455392", `2022-02-24T00:00:00Z` = "8471595", - `2022-02-25T00:00:00Z` = "8494097", `2022-02-28T00:00:00Z` = "8558899", - `2022-03-01T00:00:00Z` = "8580502", `2022-03-02T00:00:00Z` = "8602105", - `2022-03-03T00:00:00Z` = "8623708", `2022-03-04T00:00:00Z` = "8644411", - `2022-03-07T00:00:00Z` = "8709214", `2022-03-08T00:00:00Z` = "8730817", - `2022-03-09T00:00:00Z` = "8752419", `2022-03-10T00:00:00Z` = "8774022", - `2022-03-11T00:00:00Z` = "8796525", `2022-03-15T00:00:00Z` = "8890131", - `2022-03-16T00:00:00Z` = "8906319", `2022-03-17T00:00:00Z` = "8926962", - `2022-03-18T00:00:00Z` = "8953965", `2022-03-21T00:00:00Z` = "9013368", - `2022-03-22T00:00:00Z` = "9034971", `2022-03-23T00:00:00Z` = "9057474", - `2022-03-24T00:00:00Z` = "9083576", `2022-03-25T00:00:00Z` = "9100680", - `2022-03-28T00:00:00Z` = "9164585", `2022-03-29T00:00:00Z` = "9189788", - `2022-03-30T00:00:00Z` = "9207791", `2022-03-31T00:00:00Z` = "9235695", - `2022-04-01T00:00:00Z` = "9253698", `2022-04-04T00:00:00Z` = "9315801", - `2022-04-05T00:00:00Z` = "9344574", `2022-04-06T00:00:00Z` = "9358962", - `2022-04-07T00:00:00Z` = "9381465", `2022-04-08T00:00:00Z` = "9402156", - `2022-04-11T00:00:00Z` = "9473259", `2022-04-12T00:00:00Z` = "9490364", - `2022-04-13T00:00:00Z` = "9511066", `2022-04-14T00:00:00Z` = "9531770", - `2022-04-15T00:00:00Z` = "9555084", `2022-04-18T00:00:00Z` = "9617187", - `2022-04-19T00:00:00Z` = "9639690", `2022-04-20T00:00:00Z` = "9661293", - `2022-04-21T00:00:00Z` = "9683797", `2022-04-22T00:00:00Z` = "9704500", - `2022-04-25T00:00:00Z` = "9772004", `2022-04-26T00:00:00Z` = "9796305", - `2022-04-27T00:00:00Z` = "9810706", `2022-04-28T00:00:00Z` = "9839948", - `2022-04-29T00:00:00Z` = "9855309", `2022-05-02T00:00:00Z` = "9926352", - `2022-05-03T00:00:00Z` = "9948437", `2022-05-04T00:00:00Z` = "9971480", - `2022-05-05T00:00:00Z` = "9998364", `2022-05-06T00:00:00Z` = "10017189", - `2022-05-09T00:00:00Z` = "10086312", `2022-05-10T00:00:00Z` = "10112234", - `2022-05-11T00:00:00Z` = "10132397", `2022-05-12T00:00:00Z` = "10154482", - `2022-05-13T00:00:00Z` = "10180404", `2022-05-17T00:00:00Z` = "10273512", - `2022-05-18T00:00:00Z` = "10292715", `2022-05-19T00:00:00Z` = "10315759", - `2022-05-20T00:00:00Z` = "10340722", `2022-05-23T00:00:00Z` = "10409846", - `2022-05-24T00:00:00Z` = "10431929", `2022-05-25T00:00:00Z` = "10454972", - `2022-05-26T00:00:00Z` = "10479934", `2022-05-27T00:00:00Z` = "10504897", - `2022-05-30T00:00:00Z` = "10570180", `2022-05-31T00:00:00Z` = "10593223", - `2022-06-01T00:00:00Z` = "10619146", `2022-06-02T00:00:00Z` = "10639311", - `2022-06-03T00:00:00Z` = "10661394", `2022-06-06T00:00:00Z` = "10731478", - `2022-06-07T00:00:00Z` = "10753561", `2022-06-08T00:00:00Z` = "10777565", - `2022-06-09T00:00:00Z` = "10800609", `2022-06-10T00:00:00Z` = "10823651", - `2022-06-13T00:00:00Z` = "10893734", `2022-06-14T00:00:00Z` = "10917738", - `2022-06-15T00:00:00Z` = "10938861", `2022-06-16T00:00:00Z` = "10974385", - `2022-06-17T00:00:00Z` = "10983986", `2022-06-20T00:00:00Z` = "11054069", - `2022-06-21T00:00:00Z` = "11076136", `2022-06-22T00:00:00Z` = "11101099", - `2022-06-23T00:00:00Z` = "11123182", `2022-06-24T00:00:00Z` = "11146225", - `2022-06-27T00:00:00Z` = "11215349", `2022-06-28T00:00:00Z` = "11238392", - `2022-06-29T00:00:00Z` = "11261435", `2022-06-30T00:00:00Z` = "11284479", - `2022-07-01T00:00:00Z` = "11311362", `2022-07-05T00:00:00Z` = "11405448", - `2022-07-06T00:00:00Z` = "11427531", `2022-07-08T00:00:00Z` = "11475535", - `2022-07-12T00:00:00Z` = "11567701", `2022-07-13T00:00:00Z` = "11588823", - `2022-07-14T00:00:00Z` = "11609947", `2022-07-15T00:00:00Z` = "11636832", - `2022-07-18T00:00:00Z` = "11704979", `2022-07-19T00:00:00Z` = "11725143", - `2022-07-20T00:00:00Z` = "11752988", `2022-07-21T00:00:00Z` = "11771232", - `2022-07-25T00:00:00Z` = "11864355", `2022-07-26T00:00:00Z` = "11883558", - `2022-07-28T00:00:00Z` = "11934441", `2022-08-01T00:00:00Z` = "12031407", - `2022-08-04T00:00:00Z` = "12091875", `2022-08-09T00:00:00Z` = "12208040", - `2022-08-11T00:00:00Z` = "12256043", `2022-08-16T00:00:00Z` = "12375086", - `2022-08-18T00:00:00Z` = "12421171", `2022-08-24T00:00:00Z` = "12558458", - `2022-08-25T00:00:00Z` = "12577661", `2022-08-26T00:00:00Z` = "12602624", - `2022-08-29T00:00:00Z` = "12672707", `2022-08-30T00:00:00Z` = "12689990", - `2022-08-31T00:00:00Z` = "12712075", `2022-09-01T00:00:00Z` = "12737393", - `2022-09-02T00:00:00Z` = "12758517", `2022-09-06T00:00:00Z` = "12856442", - `2022-09-07T00:00:00Z` = "12873727", `2022-09-08T00:00:00Z` = "12896770", - `2022-09-09T00:00:00Z` = "12925574", `2022-09-12T00:00:00Z` = "12996619", - `2022-09-13T00:00:00Z` = "13012943", `2022-09-14T00:00:00Z` = "13035027", - `2022-09-15T00:00:00Z` = "13061911", `2022-09-16T00:00:00Z` = "13083995", - `2022-09-19T00:00:00Z` = "13153119", `2022-09-20T00:00:00Z` = "13177123", - `2022-09-21T00:00:00Z` = "13200167", `2022-09-22T00:00:00Z` = "13222251", - `2022-09-23T00:00:00Z` = "13246255", `2022-09-26T00:00:00Z` = "13314419", - `2022-09-27T00:00:00Z` = "13335543", `2022-09-28T00:00:00Z` = "13358587", - `2022-09-29T00:00:00Z` = "13382592", `2022-09-30T00:00:00Z` = "13403717", - `2022-10-04T00:00:00Z` = "13499726", `2022-10-05T00:00:00Z` = "13522771", - `2022-10-06T00:00:00Z` = "13548694", `2022-10-07T00:00:00Z` = "13568859", - `2022-10-11T00:00:00Z` = "13660062", `2022-10-12T00:00:00Z` = "13684066", - `2022-10-13T00:00:00Z` = "13707111", `2022-10-14T00:00:00Z` = "13730157", - `2022-10-17T00:00:00Z` = "13799281", `2022-10-18T00:00:00Z` = "13824248", - `2022-10-19T00:00:00Z` = "13853051", `2022-10-20T00:00:00Z` = "13868416", - `2022-10-21T00:00:00Z` = "13891458", `2022-10-24T00:00:00Z` = "13958662", - `2022-10-25T00:00:00Z` = "13985546", `2022-10-26T00:00:00Z` = "14002830", - `2022-10-27T00:00:00Z` = "14030642", `2022-10-28T00:00:00Z` = "14048886", - `2022-10-31T00:00:00Z` = "14121850", `2022-11-01T00:00:00Z` = "14142013", - `2022-11-02T00:00:00Z` = "14164096", `2022-11-03T00:00:00Z` = "14186181", - `2022-11-04T00:00:00Z` = "14212702", `2022-11-07T00:00:00Z` = "14291247", - `2022-11-08T00:00:00Z` = "14312668", `2022-11-09T00:00:00Z` = "14338173", - `2022-11-11T00:00:00Z` = "14384078", `2022-11-14T00:00:00Z` = "14465685", - `2022-11-16T00:00:00Z` = "14510535", `2022-11-17T00:00:00Z` = "14532985", - `2022-11-18T00:00:00Z` = "14557470", `2022-11-21T00:00:00Z` = "14627839", - `2022-11-22T00:00:00Z` = "14653343", `2022-11-23T00:00:00Z` = "14679867", - `2022-11-24T00:00:00Z` = "14701258", `2022-11-25T00:00:00Z` = "14726763", - `2022-11-28T00:00:00Z` = "14801227", `2022-11-29T00:00:00Z` = "14825711", - `2022-11-30T00:00:00Z` = "14850195", `2022-12-01T00:00:00Z` = "14874680", - `2022-12-02T00:00:00Z` = "14899165", `2022-12-05T00:00:00Z` = "14972611", - `2022-12-06T00:00:00Z` = "15002196", `2022-12-07T00:00:00Z` = "15029740", - `2022-12-08T00:00:00Z` = "15051165", `2022-12-09T00:00:00Z` = "15073609", - `2022-12-12T00:00:00Z` = "15143994", `2022-12-13T00:00:00Z` = "15168478", - `2022-12-14T00:00:00Z` = "15197041", `2022-12-15T00:00:00Z` = "15217445", - `2022-12-16T00:00:00Z` = "15243969", `2022-12-19T00:00:00Z` = "15316395", - `2022-12-20T00:00:00Z` = "15339859", `2022-12-21T00:00:00Z` = "15364343", - `2022-12-22T00:00:00Z` = "15415350", `2022-12-26T00:00:00Z` = "15486756", - `2022-12-27T00:00:00Z` = "15509200", `2022-12-28T00:00:00Z` = "15534704", - `2023-01-02T00:00:00Z` = "15655072", `2023-01-03T00:00:00Z` = "15679556", - `2023-01-04T00:00:00Z` = "15707099", `2023-01-06T00:00:00Z` = "15755048", - `2023-01-09T00:00:00Z` = "15830534", `2023-01-10T00:00:00Z` = "15861121", - `2023-01-11T00:00:00Z` = "15877445", `2023-01-12T00:00:00Z` = "15902949", - `2023-01-13T00:00:00Z` = "15928453", `2023-01-17T00:00:00Z` = "16027400", - `2023-01-18T00:00:00Z` = "16050864", `2023-01-19T00:00:00Z` = "16074327", - `2023-01-20T00:00:00Z` = "16097791", `2023-01-23T00:00:00Z` = "16184498", - `2023-01-24T00:00:00Z` = "16196739", `2023-01-25T00:00:00Z` = "16220202", - `2023-01-26T00:00:00Z` = "16245707", `2023-01-27T00:00:00Z` = "16270191", - `2023-01-30T00:00:00Z` = "16343635", `2023-01-31T00:00:00Z` = "16368118", - `2023-02-01T00:00:00Z` = "16391582", `2023-02-02T00:00:00Z` = "16423208", - `2023-02-03T00:00:00Z` = "16440555", `2023-02-06T00:00:00Z` = "16518077", - `2023-02-07T00:00:00Z` = "16538483", `2023-02-08T00:00:00Z` = "16563987", - `2023-02-09T00:00:00Z` = "16588472", `2023-02-10T00:00:00Z` = "16611938", - `2023-02-13T00:00:00Z` = "16698644", `2023-02-14T00:00:00Z` = "16710885" -) - pkgenv$ppm_distros_cached <- utils::read.table(header = TRUE, stringsAsFactors = FALSE, textConnection(" name os binary_url distribution release binaries diff --git a/src/library/pkgcache/R/ppm.R b/src/library/pkgcache/R/ppm.R index 62c4e498a..11cfa2f33 100644 --- a/src/library/pkgcache/R/ppm.R +++ b/src/library/pkgcache/R/ppm.R @@ -107,45 +107,14 @@ get_ppm_base_url <- function() { #' ppm_snapshots() ppm_snapshots <- function() { - snp <- synchronise(async_get_ppm_versions(forget = TRUE)) + last <- as.Date(format_iso_8601(Sys.time())) - 1 + dts <- seq(as.Date("2017-10-10"), last, by = 1) data_frame( - date = parse_iso_8601(names(snp)), - id = as.integer(unname(snp)) + date = dts, + id = as.character(dts) ) } -async_get_ppm_versions <- function(forget = FALSE, date = NULL) { - tmp1 <- tempfile() - def <- if (forget || - (!is.null(date) && date < names(pkgenv$ppm_versions[1])) || - (!is.null(date) && date > last(names(pkgenv$ppm_versions)))) { - url <- Sys.getenv( - "PKGCACHE_PPM_TRANSACTIONS_URL", - paste0(get_ppm_base_url(), "/__api__/sources/1/transactions?_limit=10000") - ) - tmp <- tempfile() - download_file(url, tmp1)$ - then(function(res) { - resp <- jsonlite::fromJSON(tmp1, simplifyVector = FALSE) - vrs <- structure( - vcapply(resp, function(x) as.character(x$id)), - names = vcapply(resp, function(x) as.character(x$published_to)) - ) - pkgenv$ppm_versions <- vrs[order(as.Date(names(vrs)))] - })$ - catch(error = function(err) { - warning("Failed to download PPM versions") - }) - - } else { - async_constant() - } - - def$ - finally(function() unlink(tmp1))$ - then(function() pkgenv$ppm_versions) -} - #' List all platforms supported by Posit Package Manager (PPM) #' #' @return Data frame with columns: diff --git a/src/library/pkgcache/R/repo-set.R b/src/library/pkgcache/R/repo-set.R index 9f76f762b..1ef4ada79 100644 --- a/src/library/pkgcache/R/repo-set.R +++ b/src/library/pkgcache/R/repo-set.R @@ -59,7 +59,7 @@ repo_get <- function(r_version = getRversion(), bioc = TRUE, #' #' @export #' @examplesIf pkgcache:::run_examples() -#' repo_resolve("PPM@2020-01-21") +#' repo_resolve("PPM@2021-01-21") #' #' repo_resolve("PPM@dplyr-1.0.0") #' #' repo_resolve("PPM@R-4.0.0") @@ -211,7 +211,7 @@ repo_sugar_ppm <- function(x, nm) { # if we may have binaries, then get the distro data as well synchronise(when_all( - async_get_ppm_versions(date = if (as.character(date) == "latest") NULL else date), + ppm_snapshots(), if (binaries) { async_get_ppm_status( distribution = current$distribution, @@ -239,16 +239,10 @@ repo_sugar_ppm <- function(x, nm) { if (as.character(date) == "latest") { ver <- "latest" } else { - vers <- pkgenv$ppm_versions - ppm_dates <- names(vers) - if (date < ppm_dates[1]) { - stop("PPM snapshots go back to ", as.Date(ppm_dates[1]), " only") + if (date < "2017-10-10") { + stop("PPM snapshots go back to 2017-10-10 only") } - sel <- which(date <= ppm_dates)[1] - if (is.na(sel)) { - stop("Cannot find matching PPM snapshot for ", date) - } - ver <- vers[[sel]] + ver <- as.character(date) } # create repo URL diff --git a/src/library/pkgcache/src/lib.c b/src/library/pkgcache/src/lib.c index 9d7ee49d8..469a4da70 100644 --- a/src/library/pkgcache/src/lib.c +++ b/src/library/pkgcache/src/lib.c @@ -33,7 +33,7 @@ static R_INLINE int hash_string(char *str, int strlen) { struct hash_table { SEXP nms; - SEXP *nmsptr; + const SEXP *nmsptr; SEXP cols; int *tab; int tablen; @@ -45,7 +45,7 @@ struct hash_table { static void hash_create(struct hash_table *table, SEXP nms, SEXP cols, SEXP tab, int max_cols, int npkgs) { table->nms = nms; - table->nmsptr = STRING_PTR(nms); + table->nmsptr = STRING_PTR_RO(nms); table->cols = cols; table->tab = INTEGER(tab); table->tablen = LENGTH(tab);