Re: Impossible to remove a broken package on 6.5.
More specifically: add an indirection to solving dependencies for pure pkg_delete, so that we don't end up constructing full UpdateSets for no reason Index: AddCreateDelete.pm === RCS file: /cvs/src/usr.sbin/pkg_add/OpenBSD/AddCreateDelete.pm,v retrieving revision 1.43 diff -u -p -r1.43 AddCreateDelete.pm --- AddCreateDelete.pm 27 Feb 2018 22:46:53 - 1.43 +++ AddCreateDelete.pm 10 Sep 2019 09:45:36 - @@ -171,6 +171,13 @@ sub ntogo_string $self->f(""); } +sub solve_dependency +{ + my ($self, $solver, $dep, $package) = @_; + # full dependency solving with everything + return $solver->really_solve_dependency($self, $dep, $package); +} + package OpenBSD::AddCreateDelete; use OpenBSD::Error; Index: PkgDelete.pm === RCS file: /cvs/src/usr.sbin/pkg_add/OpenBSD/PkgDelete.pm,v retrieving revision 1.45 diff -u -p -r1.45 PkgDelete.pm --- PkgDelete.pm10 Jul 2018 10:37:59 - 1.45 +++ PkgDelete.pm10 Sep 2019 09:45:36 - @@ -131,6 +131,13 @@ sub deleteset_from_location return $self->deleteset->add_older(OpenBSD::Handle->from_location($location)); } +sub solve_dependency +{ + my ($self, $solver, $dep, $package) = @_; + # simpler dependency solving + return $solver->find_dep_in_installed($self, $dep); +} + package OpenBSD::DeleteSet; sub setup_header { Index: Dependencies/SolverBase.pm === RCS file: /cvs/src/usr.sbin/pkg_add/OpenBSD/Dependencies/SolverBase.pm,v retrieving revision 1.10 diff -u -p -r1.10 SolverBase.pm --- Dependencies/SolverBase.pm 7 Jul 2018 06:25:53 - 1.10 +++ Dependencies/SolverBase.pm 10 Sep 2019 09:45:36 - @@ -326,7 +326,8 @@ sub solve_dependency $state->say("No cache hit on #1", $dep->{pattern}); } - $self->really_solve_dependency($state, $dep, $package); + # we need an indirection because deleting is simpler + $state->solve_dependency($self, $dep, $package); } sub solve_depends
Re: Impossible to remove a broken package on 6.5.
On Fri, Sep 06, 2019 at 07:13:21AM -0700, Chris Cappuccio wrote: > Angelo Rossi [angelo.rossi.home...@gmail.com] wrote: > > > > # pkg_delete -v kicad > > Can't locate object method "updateset_with_new" via package > > "OpenBSD::PkgDelete::State" at /usr/libdata/perl5/OpenBSD/Dependencies.pm > > line 309. > > > > Your /usr/libdata/perl5/OpenBSD directory is corrupted, this should exist > in /usr/libdata/perl5/OpenBSD/PkgAdd.pm > > Your upgrade seems to have failed Nope, there was a specific scenario which got wrong. The problem has been fixed sometimes after 6.4, a few months ago. Updating pkg_* should be safe, independently of the rest of the system. Otherwise, just let kicad stay around until updating to 6.6 in a few months.
Re: Impossible to remove a broken package on 6.5.
On Fri, Sep 06, 2019 at 10:55:32AM +0200, Angelo Rossi wrote: > # pkg_delete -v kicad > Can't locate object method "updateset_with_new" via package > "OpenBSD::PkgDelete::State" at /usr/libdata/perl5/OpenBSD/Dependencies.pm > line 309. Update your pkg tools to -current, nothing bad will happen to the rest of your install.
Re: Impossible to remove a broken package on 6.5.
On September 6, 2019 6:46:32 PM GMT+03:00, m...@jtm.cx wrote: >On Fri, Sep 06, 2019 at 07:13:21AM -0700, Chris Cappuccio wrote: >> Angelo Rossi [angelo.rossi.home...@gmail.com] wrote: >> > >> > # pkg_delete -v kicad >> > Can't locate object method "updateset_with_new" via package >> > "OpenBSD::PkgDelete::State" at >/usr/libdata/perl5/OpenBSD/Dependencies.pm >> > line 309. >> > >> >> Your /usr/libdata/perl5/OpenBSD directory is corrupted, this should >exist >> in /usr/libdata/perl5/OpenBSD/PkgAdd.pm >> >> Your upgrade seems to have failed >> > >The upgrade probably didn't fail. I ran into the exact same issue with >kicad-20100505p11; The package is available in 6.4, but was removed >and marked broken in 6.5 due to an issue with python-wx. I think the >error message Angelo Rossi quoted is simply an issue with `pkg_delete`. >Pkg_delete doesn't know what to do with a package that isn't available >anymore. > >I didn't know what to do here either. I just let the broken kicad >package >float around on my machine :). I tried to take a stab at fixing it, >but my knowledge of pkg_add internals is limited. Have you checked if anything in pkg_check(8) can help you ? Source: https://www.openbsd.org/faq/faq15.html Best Regards, Strahil Nikolov
Re: Impossible to remove a broken package on 6.5.
On Fri, Sep 06, 2019 at 07:13:21AM -0700, Chris Cappuccio wrote: > Angelo Rossi [angelo.rossi.home...@gmail.com] wrote: > > > > # pkg_delete -v kicad > > Can't locate object method "updateset_with_new" via package > > "OpenBSD::PkgDelete::State" at /usr/libdata/perl5/OpenBSD/Dependencies.pm > > line 309. > > > > Your /usr/libdata/perl5/OpenBSD directory is corrupted, this should exist > in /usr/libdata/perl5/OpenBSD/PkgAdd.pm > > Your upgrade seems to have failed > The upgrade probably didn't fail. I ran into the exact same issue with kicad-20100505p11; The package is available in 6.4, but was removed and marked broken in 6.5 due to an issue with python-wx. I think the error message Angelo Rossi quoted is simply an issue with `pkg_delete`. Pkg_delete doesn't know what to do with a package that isn't available anymore. I didn't know what to do here either. I just let the broken kicad package float around on my machine :). I tried to take a stab at fixing it, but my knowledge of pkg_add internals is limited.
Re: Impossible to remove a broken package on 6.5.
Angelo Rossi [angelo.rossi.home...@gmail.com] wrote: > > # pkg_delete -v kicad > Can't locate object method "updateset_with_new" via package > "OpenBSD::PkgDelete::State" at /usr/libdata/perl5/OpenBSD/Dependencies.pm > line 309. > Your /usr/libdata/perl5/OpenBSD directory is corrupted, this should exist in /usr/libdata/perl5/OpenBSD/PkgAdd.pm Your upgrade seems to have failed
Impossible to remove a broken package on 6.5.
Hi, Please help, I've got kicad-20100505p11 installed on 6.4 for some reason, then I forgot it and upgraded to 6.5. During a pkg_add -v -u I've got an error said that it cannot upgrade kicad, so I tried to remove it with pkg_delete: # pkg_delete -v kicad Can't locate object method "updateset_with_new" via package "OpenBSD::PkgDelete::State" at /usr/libdata/perl5/OpenBSD/Dependencies.pm line 309. # pkg_delete -v -D baddepend -D dependencies kicad Can't locate object method "updateset_with_new" via package "OpenBSD::PkgDelete::State" at /usr/libdata/perl5/OpenBSD/Dependencies.pm line 309. # dmesg OpenBSD 6.5 (GENERIC.MP) #5: Thu Aug 29 20:38:30 CEST 2019 r...@syspatch-65-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/ GENERIC.MP real mem = 8438480896 (8047MB) avail mem = 8173101056 (7794MB) mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.5 @ 0x9f400 (63 entries) bios0: vendor American Megatrends Inc. version "1303" date 04/13/2011 bios0: ASUSTeK Computer INC. M4N78 PRO acpi0 at bios0: rev 2 acpi0: sleep states S0 S1 S3 S4 S5 acpi0: tables DSDT FACP APIC MCFG OEMB SRAT HPET INFO NVHD SSDT acpi0: wakeup devices UAR1(S4) SMB0(S4) USB0(S4) USB2(S3) US15(S4) US12(S3) NMAC(S5) P0P1(S4) HDAC(S4) MXR0(S4) BR11(S4) BR12(S4) BR13(S4) BR14(S4) BR15(S4) BR16(S4) [...] acpitimer0 at acpi0: 3579545 Hz, 24 bits acpimadt0 at acpi0 addr 0xfee0: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: AMD Athlon(tm) II X2 240 Processor, 2800.48 MHz, 10-06-02 cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,3DNOW2,3DNOW,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,ITSC cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 1MB 64b/line 16-way L2 cache cpu0: ITLB 32 4KB entries fully associative, 16 4MB entries fully associative cpu0: DTLB 48 4KB entries fully associative, 48 4MB entries fully associative cpu0: AMD erratum 721 detected and fixed cpu0: smt 0, core 0, package 0 mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges cpu0: apic clock running at 199MHz cpu0: mwait min=64, max=64, IBE cpu1 at mainbus0: apid 1 (application processor) cpu1: AMD Athlon(tm) II X2 240 Processor, 2800.01 MHz, 10-06-02 cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,3DNOW2,3DNOW,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,ITSC cpu1: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 1MB 64b/line 16-way L2 cache cpu1: ITLB 32 4KB entries fully associative, 16 4MB entries fully associative cpu1: DTLB 48 4KB entries fully associative, 48 4MB entries fully associative cpu1: AMD erratum 721 detected and fixed cpu1: smt 0, core 1, package 0 ioapic0 at mainbus0: apid 2 pa 0xfec0, version 11, 24 pins acpimcfg0 at acpi0 acpimcfg0: addr 0xe000, bus 0-255 acpihpet0 at acpi0: 2500 Hz acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus 1 (P0P1) acpiprt2 at acpi0: bus 2 (IXVE) acpiprt3 at acpi0: bus 3 (MXR0) acpiprt4 at acpi0: bus -1 (BR11) acpiprt5 at acpi0: bus -1 (BR12) acpiprt6 at acpi0: bus 4 (BR13) acpiprt7 at acpi0: bus 5 (BR14) acpiprt8 at acpi0: bus -1 (BR15) acpiprt9 at acpi0: bus -1 (BR16) acpiprt10 at acpi0: bus -1 (BR17) acpicpu0 at acpi0: C1(@1 halt!), PSS acpicpu1 at acpi0: C1(@1 halt!), PSS acpipci0 at acpi0 PCI0: 0x0010 0x0011 0x aibs0 at acpi0 RTMP RVLT RFAN GGRP GITM SITM acpicmos0 at acpi0 "*pnp0c14" at acpi0 not configured acpibtn0 at acpi0: PWRB "AWY0001" at acpi0 not configured cpu0: 2800 MHz: speeds: 2800 2100 1600 800 MHz pci0 at mainbus0 bus 0 "NVIDIA MCP77 Memory" rev 0xa2 at pci0 dev 0 function 0 not configured pcib0 at pci0 dev 1 function 0 "NVIDIA MCP77 ISA" rev 0xa2 nviic0 at pci0 dev 1 function 1 "NVIDIA MCP77 SMBus" rev 0xa1 iic0 at nviic0 spdmem0 at iic0 addr 0x50: 2GB DDR2 SDRAM non-parity PC2-6400CL6 spdmem1 at iic0 addr 0x51: 2GB DDR2 SDRAM non-parity PC2-6400CL6 spdmem2 at iic0 addr 0x52: 2GB DDR2 SDRAM non-parity PC2-6400CL6 spdmem3 at iic0 addr 0x53: 2GB DDR2 SDRAM non-parity PC2-6400CL6 iic1 at nviic0 "NVIDIA MCP77 Memory" rev 0xa1 at pci0 dev 1 function 2 not configured "NVIDIA MCP77 Co-processor" rev 0xa2 at pci0 dev 1 function 3 not configured "NVIDIA MCP77 Memory" rev 0xa1 at pci0 dev 1 function 4 not configured ohci0 at pci0 dev 2 function 0 "NVIDIA MCP77 USB" rev 0xa1: apic 2 int 15, version 1.0, legacy support ehci0 at pci0 dev 2 function 1 "NVIDIA MCP77 USB" rev 0xa1: apic 2 int 11 usb0 at ehci0: USB revision 2.0 uhub0 at usb0 configuration 1 interface 0 "NVIDIA EHCI root hub" rev 2.00/1.00 addr 1 ohci1 at pci0 dev 4 function 0 "NVIDIA MCP77 USB" rev 0xa1: apic 2 int 10, version 1.0, legacy support ehci1 at pci0 dev 4 function 1 "NVIDIA MCP77 USB" rev 0xa1: apic 2 int 14 usb1 at ehci1: USB revision 2.0 uhub1