Skip to content

Do we need generate.pl to wipe/recreate the download dir every time? #197

@waterkip

Description

@waterkip

I'm regenerating the Dockerfiles and I noticed it takes ages. 10 years ago it was added via 5150798. I'm not 100% if we still need this tear-down, tear-up strategy.

Perhaps we can add some kind of flag to generate.pl to keep the old behaviour, but this would speed up regenerations.

  {
    my $dir = "$downloads/perl-$release->{version}";
    qx{rm -fR $dir};
    mkdir $dir or die "Couldn't create $dir";
    qx{
      tar -C "$downloads" -xf $dir.tar.gz &&\
      cd $dir &&\
      chown -R \$(id -u):\$(id -g) . &&\
      git init &&\
      git add . &&\
      git commit -m tmp
    };
    die "Couldn't create a temp git repo for $release->{version}" if $? != 0;
    Devel::PatchPerl->patch_source($release->{version}, $dir);
    $patch = qx{
      cd $dir && git -c 'diff.mnemonicprefix=false' diff
    };
    die "Couldn't create a Devel::PatchPerl patch for $release->{version}" if $? != 0;
  }

I often see cat *.patch errors in the logs when an image is build, so the slowdown seems not justifiable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions