9

In R CMD build, the ID of the user is automatically inserted into the DESCRIPTION file. This is problematic because I work in a corporate computing environment and I do not want to divulge my user ID.

Reproducible example:

git clone git@github.com:tidyverse/reprex
R CMD build reprex
rm -rf reprex
tar -xf reprex*tar.gz
grep Packaged reprex/DESCRIPTION

Current output:

Packaged: 2018-11-06 14:01:50 UTC; <MY USER ID>

Desired output

Packaged: 2018-11-06 14:01:50 UTC; 
landau
  • 5,636
  • 1
  • 22
  • 50
  • Why don't you just remove the name and re-compress it? – Aravind Voggu Nov 09 '18 at 03:23
  • Doesn't seem too hard now that you mention it, but it still feels like something I should not have to clean out manually. – landau Nov 09 '18 at 03:33
  • I added a one line script. That would be much easier than going and changing the internals, then you'll have to make changes every time you update your language. If you're using a build system, try adding this to it. Travis should have post build hooks and is free for opensource projects, try it, it's easy. Or add the script as a bash alias so you don't have to type all of it everytime. – Aravind Voggu Nov 09 '18 at 03:37

1 Answers1

1

I'm not aware of doing this internally, but, why don't you just remove the ID and repackage it?

git clone git@github.com:tidyverse/reprex
R CMD build reprex
rm -rf reprex
tar -xf reprex*tar.gz
grep -l "Packaged" reprex/DESCRIPTION | xargs sed  's/UTC;.*/UTC;/' >  reprex/DESCRIPTION

Now compress it again with tar. Probably add this to your build system.

Aravind Voggu
  • 1,491
  • 12
  • 17
  • 1
    Yeah, I think this is the appropriate way to go. Reminds me of https://github.com/r-lib/pkgdown/issues/492, actually. – landau Nov 09 '18 at 03:42