Skip to content

Conversation

@ciprianbadescu
Copy link
Contributor

@ciprianbadescu ciprianbadescu commented Oct 8, 2019

This commit adds hold property for package providers on
Debian(dpkg/apt/fink/aptitude) and Solaris(pgk) as
alternative of using "held" value for ensure.

Using "held" value for ensure works as before, but it shows
deprecation warning and will be removed in further release.

Allowed values for hold are "yes"/"true"/"no"/"false",
default to "false". Hold can be specified with or without ensure,
if ensure is missing will default to "present".

Hold cannot be specified together with "purged", "absent" or "held"
values for ensure.

@puppetcla
Copy link

CLA signed by all contributors.

@ciprianbadescu ciprianbadescu force-pushed the PUP-1537/dpkg-hold-feature branch from bbebede to 005ff9a Compare October 11, 2019 12:10
@ciprianbadescu
Copy link
Contributor Author

jenkins please test this on debian8-64a,debian8-32a,debian9-64a,debian9-32a,solaris10-64a,solaris114-64a,ubuntu1404-64a,ubuntu1404-32a,ubuntu1604-64a,ubuntu1604-32a,ubuntu1804-64a

@ciprianbadescu
Copy link
Contributor Author

jenkins please test this on
debian8-64a,debian8-32a,debian9-64a,debian9-32a,ubuntu1604-64a,ubuntu1604-32a,ubuntu1804-64a,solaris10-64a,solaris114-64a

@ciprianbadescu
Copy link
Contributor Author

It looks like originally the remove step is not really handled, I will add fix this this before merging

@ciprianbadescu ciprianbadescu force-pushed the PUP-1537/dpkg-hold-feature branch 9 times, most recently from 32a636e to bc3f287 Compare October 28, 2019 15:01
@ciprianbadescu
Copy link
Contributor Author

jenkins please test this on
debian8-64a,debian8-32a,debian9-64a,debian9-32a,solaris10-64a,solaris114-64a,ubuntu140464a,ubuntu1404-32a,ubuntu1604-64a,ubuntu1604-32a,ubuntu1804-64a

Copy link
Contributor

@joshcooper joshcooper left a comment

Choose a reason for hiding this comment

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

We shouldn't modify the resource harness for this one use case. Need to solve the boolean parameter and property bugs in a way that doesn't break providers.

@ciprianbadescu ciprianbadescu force-pushed the PUP-1537/dpkg-hold-feature branch 3 times, most recently from 311a20f to 6a12662 Compare October 31, 2019 13:13
@ciprianbadescu
Copy link
Contributor Author

jenkins please test this on
debian8-64a,debian8-32a,debian9-64a,debian9-32a,ubuntu1604-64a,ubuntu1604-32a,ubuntu1804-64a,solaris10-64a,solaris114-64a

@ciprianbadescu ciprianbadescu force-pushed the PUP-1537/dpkg-hold-feature branch 2 times, most recently from 8eca10b to ecfcb8f Compare November 4, 2019 08:40
This commit adds `hold` property for package providers on
Debian(dpkg/apt/fink/aptitude) and Solaris(pgk) as
alternative of using "held" value for `ensure`.

Using "held" value for `ensure` works as before, but it shows
deprecation warning and will be removed in further release.

Allowed values for `hold` are "yes"/"true"/"no"/"false",
default to "false". Hold can be specified with or without `ensure`,
if `ensure` is missing will default to "present".

Hold cannot be specified together with "purged", "absent" or "held"
values for `ensure`.
@ciprianbadescu
Copy link
Contributor Author

@joshcooper, does it makes sense to extend/rename above hold property and functionality with a mark property accepting values manual/hold/none values?


def should_to_s(value)
(value == :true).to_s
end
Copy link
Contributor

Choose a reason for hiding this comment

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

Does is_to_s need to be overridden?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

without it will print something like:
Changing hold from "false" to true

@joshcooper
Copy link
Contributor

property accepting values manual/hold/none values?

I'm not familiar enough with what those mean to say if they should be a single parameter or different. Suggest asking in #puppet-dev slack.

@ciprianbadescu
Copy link
Contributor Author

Will prepare a second PR replacing hold=[true|false] with mark=[hold|none] to allow extension with further values of mark on apt provider.

@ciprianbadescu
Copy link
Contributor Author

work to be continued on: #7815

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.

3 participants