all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH proxmox-perl-rs] common: d/control: break/replace libpve-rs-perl (<< 0.6.0)
@ 2022-05-09 10:17 Stoiko Ivanov
  2022-05-09 14:49 ` Fabian Grünbichler
  2022-05-10  5:16 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 2 replies; 3+ messages in thread
From: Stoiko Ivanov @ 2022-05-09 10:17 UTC (permalink / raw)
  To: pve-devel

libproxmox-rs-perl ships /usr/share/perl5/PVE/RS/CalendarEvent.pm,
which was also present in libpve-rs-perl until version 0.5.1

This can lead to a (racy) issue while upgrading - depending
on which of libproxmox-rs-perl or libpve-rs-perl gets unpacked first
we potentially run into:
```
dpkg: error processing archive \
/tmp/apt-dpkg-install-lNBzMn/48-libproxmox-rs-perl_0.1.0_amd64.deb (--unpack):
 trying to overwrite '/usr/share/perl5/PVE/RS/CalendarEvent.pm', \
 which is also in package libpve-rs-perl 0.5.1
```

This patch follows the debian policy manual for these situations:
https://www.debian.org/doc/debian-policy/ch-relationships.html#s-breaks

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
Sadly was not able to trigger this issue on any of my systems (and a VM with
a fresh 7.1 ISO install).

 common/pkg/debian/control | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/common/pkg/debian/control b/common/pkg/debian/control
index cdda8c5..8bc510c 100644
--- a/common/pkg/debian/control
+++ b/common/pkg/debian/control
@@ -17,6 +17,8 @@ Depends:
  ${perl:Depends},
  ${shlibs:Depends},
  libpve-rs-perl (>= 0.6.0) | libpmg-rs-perl (>= 0.5.0),
+Breaks: libpve-rs-perl (<< 0.6.0)
+Replaces: libpve-rs-perl (<< 0.6.0)
 Description: PVE/PMG common parts which have been ported to Rust - Perl packages
  Contains the perl side of modules provided by the libraries of both libpve-rs-perl and
  libpmg-rs-perl, loading whichever is available.
-- 
2.30.2





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [pve-devel] [PATCH proxmox-perl-rs] common: d/control: break/replace libpve-rs-perl (<< 0.6.0)
  2022-05-09 10:17 [pve-devel] [PATCH proxmox-perl-rs] common: d/control: break/replace libpve-rs-perl (<< 0.6.0) Stoiko Ivanov
@ 2022-05-09 14:49 ` Fabian Grünbichler
  2022-05-10  5:16 ` [pve-devel] applied: " Thomas Lamprecht
  1 sibling, 0 replies; 3+ messages in thread
From: Fabian Grünbichler @ 2022-05-09 14:49 UTC (permalink / raw)
  To: Proxmox VE development discussion

On May 9, 2022 12:17 pm, Stoiko Ivanov wrote:
> libproxmox-rs-perl ships /usr/share/perl5/PVE/RS/CalendarEvent.pm,
> which was also present in libpve-rs-perl until version 0.5.1
> 
> This can lead to a (racy) issue while upgrading - depending
> on which of libproxmox-rs-perl or libpve-rs-perl gets unpacked first
> we potentially run into:
> ```
> dpkg: error processing archive \
> /tmp/apt-dpkg-install-lNBzMn/48-libproxmox-rs-perl_0.1.0_amd64.deb (--unpack):
>  trying to overwrite '/usr/share/perl5/PVE/RS/CalendarEvent.pm', \
>  which is also in package libpve-rs-perl 0.5.1
> ```
> 
> This patch follows the debian policy manual for these situations:
> https://www.debian.org/doc/debian-policy/ch-relationships.html#s-breaks
> 
> Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>

Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Acked-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>

I noticed this a few weeks back, but it seems it slipped through a 
second time ;) so unless this was intentionally left out when applying 
the original series/patches for some reason I am missing, this seems 
like the correct path to take!

> ---
> Sadly was not able to trigger this issue on any of my systems (and a VM with
> a fresh 7.1 ISO install).
> 
>  common/pkg/debian/control | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/common/pkg/debian/control b/common/pkg/debian/control
> index cdda8c5..8bc510c 100644
> --- a/common/pkg/debian/control
> +++ b/common/pkg/debian/control
> @@ -17,6 +17,8 @@ Depends:
>   ${perl:Depends},
>   ${shlibs:Depends},
>   libpve-rs-perl (>= 0.6.0) | libpmg-rs-perl (>= 0.5.0),
> +Breaks: libpve-rs-perl (<< 0.6.0)
> +Replaces: libpve-rs-perl (<< 0.6.0)
>  Description: PVE/PMG common parts which have been ported to Rust - Perl packages
>   Contains the perl side of modules provided by the libraries of both libpve-rs-perl and
>   libpmg-rs-perl, loading whichever is available.
> -- 
> 2.30.2
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 
> 




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [pve-devel] applied: [PATCH proxmox-perl-rs] common: d/control: break/replace libpve-rs-perl (<< 0.6.0)
  2022-05-09 10:17 [pve-devel] [PATCH proxmox-perl-rs] common: d/control: break/replace libpve-rs-perl (<< 0.6.0) Stoiko Ivanov
  2022-05-09 14:49 ` Fabian Grünbichler
@ 2022-05-10  5:16 ` Thomas Lamprecht
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2022-05-10  5:16 UTC (permalink / raw)
  To: Proxmox VE development discussion, Stoiko Ivanov

Am 5/9/22 um 12:17 schrieb Stoiko Ivanov:
> libproxmox-rs-perl ships /usr/share/perl5/PVE/RS/CalendarEvent.pm,
> which was also present in libpve-rs-perl until version 0.5.1
> 
> This can lead to a (racy) issue while upgrading - depending
> on which of libproxmox-rs-perl or libpve-rs-perl gets unpacked first
> we potentially run into:
> ```
> dpkg: error processing archive \
> /tmp/apt-dpkg-install-lNBzMn/48-libproxmox-rs-perl_0.1.0_amd64.deb (--unpack):
>  trying to overwrite '/usr/share/perl5/PVE/RS/CalendarEvent.pm', \
>  which is also in package libpve-rs-perl 0.5.1
> ```
> 
> This patch follows the debian policy manual for these situations:
> https://www.debian.org/doc/debian-policy/ch-relationships.html#s-breaks
> 
> Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
> ---
> Sadly was not able to trigger this issue on any of my systems (and a VM with
> a fresh 7.1 ISO install).
> 
>  common/pkg/debian/control | 2 ++
>  1 file changed, 2 insertions(+)
> 
>

applied, thanks!




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-10  5:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-09 10:17 [pve-devel] [PATCH proxmox-perl-rs] common: d/control: break/replace libpve-rs-perl (<< 0.6.0) Stoiko Ivanov
2022-05-09 14:49 ` Fabian Grünbichler
2022-05-10  5:16 ` [pve-devel] applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal