Sensible default for __apt_source --component #31
Labels
No labels
bugfix
cleanup
discussion
documentation
doing
done
feature
improvement
packaging
Stale
testing
TODO
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: ungleich-public/cdist#31
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I reckon, more often than not, if one leaves it empty, they mean
main
. Hence I am proposing we change the default tomain
from the current empty string.I do realise, this seems to be a breaking change, however an empty value here would cause
apt
to fail with an error anyway, so the other option would be to make--component
mandatory. Which -- considering above statement -- would be the less elegant solution. (At least in my view... 😉 )As much as I see the value in @ssrq's suggestions, as this has been stale for 9 months now, I am inclined to close it.
Feel free to reopen, if you disagree...
Thanks for your response, @steven. I looked at a few 3rd party repos and they used
main
, too, so I implied that this is some sort of common agreement.Do you have examples of repositories that do not follow this style, so that we have some basis to reason on?
After scanning through sources.list(5) I take it that you can omit the component if you specify a slash-terminated path instead of distribution + component.
What do you think about if we add a
--path
parameter that is mutually exclusive with--distribution
and--component
?e.g.:
There are much more deb repos in use these days then the ones of Ubuntu and Debian.
Many if not most of them do not use 'main' as the component.
I think the proposed change breaks backwards compatibility for no real added value.
After all, depending on how you structure your cdist types, you're talking about 2 occurrences of the string 'main' that you save.
Grepping through my primary ~/.cdist config I have at least 6 places that would be broken by this change. That's not a lot, but nevertheless.
@ssrq the reason to default to empty string is third party deb repos that either do not have a component part or do not use 'main'.
So -1 from my side.
The
main
component is used by De??an and Ubuntu, so I think that it is a sane default.@steven I'm only wondering what the use case was to have an empty string as the default?
While at it and doing partially breaking changes, I would convert the
--component
parameter to aoptional_multiple
.I think it makes sense to abstract away the construction of the correctly formatted source line from the user.
If the user supplies a space-delimited string, I would print a message to stderr telling the user to consider using multiple
--component
arguments instead.mentioned in merge request !932
changed the description