[Rd] tools:: extracting pkg dependencies from DCF

Jan Gorecki j@goreck| @end|ng |rom w|t@edu@p|
Fri Oct 14 23:32:50 CEST 2022


Hello Jan,

Thanks for confirming about many packages reinventing this missing
functionality.
packages.dcf was not meant handle versions. It just extracts names of
dependencies... Yes, such a simple thing, yet missing in base R.

Versions of packages can be controlled when setting up R pkgs repo. This is
how I used to handle it. Making a CRAN subset mirror of fixed version pkgs.
BTW. function for that is also included in mentioned branch. I am just not
proposing it, to increase the chance of having at least this simple,
missing, functionality merged.

Best
Jan

On Fri, Oct 14, 2022, 15:14 Jan Netík <netikja using gmail.com> wrote:

> Hello Jan,
>
> I have seen many packages that implemented dependencies "extraction" on
> their own for internal purposes and today I was doing exactly that for
> mine. It's not a big deal using read.dcf on DESCRIPTION. It was sufficient
> for me, but I had to take care of some \n chars (the overall returned value
> has some rough edges, in my opinion). However, the function from the branch
> seems to not care about version requirements, which are crucial for me.
> Maybe that is something to reconsider before merging.
>
> Best,
> Jan
>
> pá 14. 10. 2022 v 2:27 odesílatel Jan Gorecki <j.gorecki using wit.edu.pl>
> napsal:
>
>> Dear R devs,
>>
>> I would like to raise a request for a simple helper function.
>> Utility function to extract package dependencies from DESCRIPTION file.
>>
>> I do think that tools package is better place, for such a fundamental
>> functionality, than community packages.
>>
>> tools pkg seems perfect fit (having already great function
>> write_PACKAGES).
>>
>> Functionality I am asking for is already in R svn repository since 2016,
>> in
>> a branch tools4pkgs. Function is called 'packages.dcf'.
>> Another one 'repos.dcf' would be a good functional complementary to it.
>>
>> Those two simple helper functions really makes it easier for organizations
>> to glue together usage of their own R packages repos and CRAN repo in a
>> smooth way. That could possibly help to offload CRAN from new submissions.
>>
>> gh mirror link for easy preview:
>>
>> https://github.com/wch/r-source/blob/tools4pkgs/src/library/tools/R/packages.R#L419
>>
>> Regards
>> Jan Gorecki
>>
>>         [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-devel using r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>

	[[alternative HTML version deleted]]



More information about the R-devel mailing list