public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
Cc: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] applied-series: [PATCH proxmox 1/2] section-config: make ReST dump reproducible
Date: Tue, 13 Dec 2022 14:53:56 +0100	[thread overview]
Message-ID: <20221213135356.xgcyu5srst7kdlh2@casey.proxmox.com> (raw)
In-Reply-To: <20221213133755.751536-1-f.gruenbichler@proxmox.com>

applied both patches, thanks

On Tue, Dec 13, 2022 at 02:37:54PM +0100, Fabian Grünbichler wrote:
> HashMaps are not ordered, so each package build containing a section config
> dump would have the documentation ordered randomly.
> 
> Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
> ---
> tested PBS build with the resulting proxmox-section-config crate, the -docs
> package is now reproducible ;)
> 
>  proxmox-section-config/src/lib.rs | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/proxmox-section-config/src/lib.rs b/proxmox-section-config/src/lib.rs
> index 1706718..51f6770 100644
> --- a/proxmox-section-config/src/lib.rs
> +++ b/proxmox-section-config/src/lib.rs
> @@ -1110,10 +1110,13 @@ token: asdf@pbs!asdftoken
>  pub fn dump_section_config(config: &SectionConfig) -> String {
>      let mut res = String::new();
>  
> +    let mut plugins: Vec<&String> = config.plugins().keys().collect();
> +    plugins.sort_unstable();
> +
>      let plugin_count = config.plugins().len();
>  
> -    for plugin in config.plugins().values() {
> -        let name = plugin.type_name();
> +    for name in plugins {
> +        let plugin = config.plugins().get(name).unwrap();
>          let properties = plugin.properties();
>          let skip = match plugin.id_property() {
>              Some(id) => vec![id],
> -- 
> 2.30.2




      parent reply	other threads:[~2022-12-13 13:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-13 13:37 [pbs-devel] " Fabian Grünbichler
2022-12-13 13:37 ` [pbs-devel] [PATCH proxmox 2/2] section-config: silence clippy Fabian Grünbichler
2022-12-13 13:53 ` Wolfgang Bumiller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221213135356.xgcyu5srst7kdlh2@casey.proxmox.com \
    --to=w.bumiller@proxmox.com \
    --cc=f.gruenbichler@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal