__package_apt ignores --version parameter #139

Closed
opened 2021-11-20 13:24:35 +00:00 by ungleich-gitea · 3 comments

Created by: thriqon

The default cdist type __package_apt appears to ignore the --version parameter completely (assuming the Docker repository has been already provided beforehand):

$ cat manifest/test
#!/bin/sh -e
__package docker-engine --version 1.12.6~debian-stretch --state=present
$ cdist config -i manifest/test client01.local
$ ssh client01 "dpkg -l | grep docker-engine"
ii  docker-engine                  17.05.0~ce-0~debian-stretch    amd64        Docker: the open-source application container engine

Are there any reasons this is happening right now or is this simply a bug?

*Created by: thriqon* The default cdist type `__package_apt` appears to ignore the `--version` parameter completely (assuming the Docker repository has been already provided beforehand): ```bash $ cat manifest/test #!/bin/sh -e __package docker-engine --version 1.12.6~debian-stretch --state=present $ cdist config -i manifest/test client01.local $ ssh client01 "dpkg -l | grep docker-engine" ii docker-engine 17.05.0~ce-0~debian-stretch amd64 Docker: the open-source application container engine ``` Are there any reasons this is happening right now or is this simply a bug?
Author
Owner

Created by: thriqon

Looks good. Thanks for the swift implementation!

*Created by: thriqon* Looks good. Thanks for the swift implementation!
Author
Owner

Created by: darko-poljak

@thriqon I added support for --version to __package_apt. Can you clone my repo and checkout
https://github.com/darko-poljak/cdist/tree/package_apt_version and test it?

I tested type with the following manifests in the following order.

  1. __package curl --version "7.52.1-5+deb9u4
  2. __package curl --state present
  3. __package curl --state absent
  4. __package curl --version "7.52.1-5+deb9u4
  5. (downgrade)
__package curlrm --name curl --state absent
__package libcurlrm --name libcurl3 --state absent
require="__package/curlrm __package/libcurlrm" __package libcurl3 --version "7.52.1-5+deb9u3"
require="__package/curlrm __package/libcurlrm __package/libcurl3" __package curl --version "7.52.1-5+deb9u3"
  1. __package curl --version "7.52.1-5+deb9u4"
  2. __package curl --version "7.52.1-5+deb9u3" --state absent
  3. __package curl --version "7.52.1-5+deb9u4"
  4. (no code-remote generated becuase curl version already present) __package curl --version "7.52.1-5+deb9u4"
*Created by: darko-poljak* @thriqon I added support for `--version` to `__package_apt`. Can you clone my repo and checkout https://github.com/darko-poljak/cdist/tree/package_apt_version and test it? I tested type with the following manifests in the following order. 1. `__package curl --version "7.52.1-5+deb9u4` 2. `__package curl --state present` 3. `__package curl --state absent` 4. `__package curl --version "7.52.1-5+deb9u4` 5. (downgrade) ``` __package curlrm --name curl --state absent __package libcurlrm --name libcurl3 --state absent require="__package/curlrm __package/libcurlrm" __package libcurl3 --version "7.52.1-5+deb9u3" require="__package/curlrm __package/libcurlrm __package/libcurl3" __package curl --version "7.52.1-5+deb9u3" ``` 6. `__package curl --version "7.52.1-5+deb9u4"` 7. `__package curl --version "7.52.1-5+deb9u3" --state absent` 8. `__package curl --version "7.52.1-5+deb9u4"` 9. (no code-remote generated becuase curl version already present) `__package curl --version "7.52.1-5+deb9u4"`
Author
Owner

Created by: darko-poljak

@thriqon In __package_apt version parameter is not yet supported. I will implement this support and you can test it.

*Created by: darko-poljak* @thriqon In __package_apt version parameter is not yet supported. I will implement this support and you can test it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: ungleich-public/cdist#139
No description provided.