Skip to content
Snippets Groups Projects

fix: use domain-specific variable for WORKDIR

Closed Daniel M. Capella requested to merge polyzen/devtools:devtools_workdir into master
1 unresolved thread

Avoid rm -rf'ing some poor soul's $WORKDIR again.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 5 commits

    Compare with previous version

  • Daniel M. Capella changed title from fix: use domain-specific variable to fix: use domain-specific variable for WORKDIR

    changed title from fix: use domain-specific variable to fix: use domain-specific variable for WORKDIR

  • added 1 commit

    • 897a26dc - fix: use domain-specific variable for WORKDIR

    Compare with previous version

  • Daniel M. Capella resolved all threads

    resolved all threads

  • Christian Heusel requested review from @gromit

    requested review from @gromit

  • Christian Heusel changed milestone to %v1.2.0

    changed milestone to %v1.2.0

  • added 2 commits

    • dd88e2ec - fix: use domain-specific variable for $WORKDIR
    • 295d3ccb - fix: use domain-specific variable for $TEMPDIR

    Compare with previous version

  • Christian Heusel changed title from fix: use domain-specific variable for WORKDIR to fix: use domain-specific variable for WORKDIR & TEMPDIR

    changed title from fix: use domain-specific variable for WORKDIR to fix: use domain-specific variable for WORKDIR & TEMPDIR

  • @polyzen I've added another variable refactoring, could you maybe have a look at that aswell? :blush:

  • added 5 commits

    • 295d3ccb...05bea3e9 - 3 commits from branch archlinux:master
    • 12e2e801 - fix: use domain-specific variable for $WORKDIR
    • 34f2cae7 - fix: use domain-specific variable for $TEMPDIR

    Compare with previous version

  • Daniel M. Capella
  • Christian Heusel changed title from fix: use domain-specific variable for WORKDIR & TEMPDIR to fix: use domain-specific variable for WORKDIR

    changed title from fix: use domain-specific variable for WORKDIR & TEMPDIR to fix: use domain-specific variable for WORKDIR

  • Christian Heusel resolved all threads

    resolved all threads

    • @polyzen great, thank you for helping out here :) I'm wondering if a much simpler and less intrusive way would be to simply call `unset WORKDIR` before the declaration of setup_workdir which would effectively provide the same safety with a single line, plus on top even ensure it can't be set by accident. Would that be fine for you? :cat:

    • I think unset WORKDIR would not work when lib/common.sh is sourced repeatedly.

    • Why not? We have guard headers to avoid multi sourcing

    • Oh, never mind then

    • As a note, when WORKDIR is declared readonly, unset WORKDIR will error out since it can't be modified, making builds impossible. Better than deleting files, though.

    • As far as I understand the execution environments, this is not actually true. If you run pkgctl it will spawn a completely independent bash process where environment variables are leaking into but not the readonly properties. It would be different if it's sourced, effectively running in the same execution environment, but when starting thought pkgctl it won't be readonly anymore.

    • Interesting behaviour. I'll keep it in mind. Thanks

    • Please register or sign in to reply
  • Jakub Klinkovský mentioned in merge request !247

    mentioned in merge request !247

  • Levente Polyak changed milestone to %v1.2.1

    changed milestone to %v1.2.1

  • Christian Heusel mentioned in merge request !267 (merged)

    mentioned in merge request !267 (merged)

  • Please register or sign in to reply
    Loading