Skip to content

Conversation

@aavetis
Copy link

@aavetis aavetis commented Feb 1, 2026

If you’ve fetched many packages/repos over time, you currently have to re-run opensrc <pkg> or opensrc <owner/repo> for each one. opensrc update refreshes everything in one command while keeping pinned repo refs stable.

Concept

  • Add opensrc update to refresh all previously fetched sources listed in opensrc/sources.json, matching the existing CLI style (list, remove, clean).
  • Preserve repo refs when updating, including refs encoded as URL hashes.

Expected usage

  # Update everything already fetched
  opensrc update

  # Update only repos or specific registries
  opensrc update --repos
  opensrc update --pypi
  opensrc update --crates

Behavior

  • Packages: re-run with registry + name (resolves to installed/latest versions, same as re-running opensrc <package>).
  • Repos: re-run with stored ref (branch/tag/commit) to avoid drifting.

Methodology

  • New update command builds specs from sources.json and reuses fetchCommand for consistent logging/permissions.
  • Repo parser now reads URL hash refs (https://host/owner/repo#ref) to preserve stored refs.

Coverage

  • Added unit tests for update spec building and URL hash ref parsing.
  • Ran npm test, npm run type-check, and npm run format:check.

@vercel
Copy link

vercel bot commented Feb 1, 2026

@aavetis is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

@vercel vercel bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Suggestion:

URLs from non-standard git hosts (e.g., https://example.com/foo/bar) are incorrectly detected as packages instead of repos because isRepoSpec only recognizes hardcoded hosts (github.com, gitlab.com, bitbucket.org).

Fix on Vercel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant