Skip to content

rustpkg should pull updates for remote packages #9787

Closed
@catamorphism

Description

@catamorphism

On #9732, @brson asked: "How does rustpkg allow sources of dependencies to be updated? What happens when they are read only and need to be updated?"

and I replied:

"What I think will happen right now is that rustpkg will never update sources once they're checked out. That's obviously not the desired behavior.

What I think should happen is that rustpkg should always check for upstream changes unless a specific revision was requested [1]. If there are new changes, it should fetch them into a temporary directory, then force-rm the old checked-out sources [2] and move the temporary directory into the existing directory if everything succeeded.

This is hard to test for the same reason that we don't have tests for anything that makes network requests from a git server.

An alternative is to add a "rustpkg freshen" (or something) command that updates any git sources that are known about. Or, a --update flag that goes with build and install. Personally I'd rather not add more flags, though.

[1] However, if there's no network connection available, it should continue gracefully, perhaps printing a warning.
[2] To protect people against data loss if they accidentally made the files writable and made their own changes, perhaps it could also error out at this point if the existing files that are supposed to be read-only aren't?"

We should decide what to do; then do it.

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