aptly icon indicating copy to clipboard operation
aptly copied to clipboard

RFC: Allow '/' in distribution name

Open adalessandro opened this issue 2 years ago • 5 comments

This is an RFC PR to follow up on the ongoing opened issue https://github.com/aptly-dev/aptly/issues/115 Possible duplicated or already a declined feature. But it's not really clear why this is considered a bug in aptly and what would be the consequences of allowing slash / characters in the distribution name.

This reverts commit 1daa076d65e642f2f365e3cd580a78548a9b65a6.

Fixes https://github.com/aptly-dev/aptly/issues/115

Requirements

All new code should be covered with tests, documentation should be updated. CI should pass.

Description of the Change

Checklist

  • [ ] unit-test added (if change is algorithm)
  • [ ] functional test added/updated (if change is functional)
  • [ ] man page updated (if applicable)
  • [ ] bash completion updated (if applicable)
  • [ ] documentation updated
  • [ ] author name in AUTHORS

adalessandro avatar Jun 24 '22 14:06 adalessandro

Codecov Report

Merging #1089 (45b18e6) into master (c9f5763) will decrease coverage by 0.02%. The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1089      +/-   ##
==========================================
- Coverage   52.11%   52.09%   -0.03%     
==========================================
  Files          73       73              
  Lines       11272    11267       -5     
==========================================
- Hits         5874     5869       -5     
  Misses       4832     4832              
  Partials      566      566              
Impacted Files Coverage Δ
deb/publish.go 62.51% <ø> (-0.22%) :arrow_down:

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

codecov[bot] avatar Jun 27 '22 08:06 codecov[bot]

For reference we've been running with this revert for Apertis for quite a while now and things seem entirely happy ;) But as @adalessandro mentioned we may well be missing the background reason of why this was disallowed in the first place?

sjoerdsimons avatar May 19 '23 07:05 sjoerdsimons

image

randombenj avatar May 22 '23 15:05 randombenj

fwiw the one thing we noticed recently that when publishing a distribution with a / "under" another distribution then removing the top-level one will remove everything underneath :) So that was likely based on the assumption that distribution names under a prefix don't have a / (I'm not sure if aptly also protects against nested prefixes)

As a more practical example of what i meant above, for Apertis, we publish both the current repositories and snapshots with a setup as follows:

  • current: /apertis/dists/v2024pre
  • snapshot: /apertis/dists/v2024pre/snapshots/<timecode>

When dropping current it will actually wipe out everything under /apertis/dists/v2024pre which ofcourse then includes all published snapshots. This was only uncovered recently due to some transition/testing as we'd normally never want to delete the current published repositories and leave the snapshots :)

So for this RFC that's one thing to fix for sure; Based on our experiences thusfar that's likely the only issue with this RFC

sjoerdsimons avatar Sep 05 '23 07:09 sjoerdsimons

are you creating local repos with a / in the distributions, or do you use mirrors with such ?

neolynx avatar Jan 14 '24 21:01 neolynx

superseded by https://github.com/aptly-dev/aptly/pull/1269

neolynx avatar Apr 11 '24 15:04 neolynx