Impossible to remove a broken package on 6.5.

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Impossible to remove a broken package on 6.5.

Angelo Rossi
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
    [hidden email]:/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 0xfee00000: 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 0xfec00000, version 11, 24 pins
acpimcfg0 at acpi0
acpimcfg0: addr 0xe0000000, bus 0-255
acpihpet0 at acpi0: 25000000 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: 0x00000010 0x00000011 0x00000000
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 at usb1 configuration 1 interface 0 "NVIDIA EHCI root hub" rev
2.00/1.00 addr 1
azalia0 at pci0 dev 7 function 0 "NVIDIA MCP77 HD Audio" rev 0xa1: apic 2
int 11
azalia0: codecs: VIA/0x0397, NVIDIA/0x0002, using VIA/0x0397
audio0 at azalia0
ppb0 at pci0 dev 8 function 0 "NVIDIA MCP77 PCI" rev 0xa1
pci1 at ppb0 bus 1
ahci0 at pci0 dev 9 function 0 "NVIDIA MCP77 AHCI" rev 0xa2: apic 2 int 5,
AHCI 1.2
ahci0: port 0: 3.0Gb/s
ahci0: port 1: 1.5Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, ST3320613AS, CC2J> SCSI3 0/direct fixed
naa.5000c5001fcb3ad1
sd0: 305245MB, 512 bytes/sector, 625142448 sectors
cd0 at scsibus1 targ 1 lun 0: <Optiarc, DVD RW AD-5260S, 1.00> ATAPI
5/cdrom removable
nfe0 at pci0 dev 10 function 0 "NVIDIA MCP77 LAN" rev 0xa2: apic 2 int 15,
address 90:e6:ba:43:72:2a
eephy0 at nfe0 phy 1: 88E1111 Gigabit PHY, rev. 2
ppb1 at pci0 dev 11 function 0 "NVIDIA MCP77 PCIE" rev 0xa1
pci2 at ppb1 bus 2
vga1 at pci2 dev 0 function 0 vendor "NVIDIA", unknown product 0x0848 rev
0xa2
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
ppb2 at pci0 dev 16 function 0 "NVIDIA MCP77 PCIE" rev 0xa1: msi
pci3 at ppb2 bus 3
ppb3 at pci0 dev 19 function 0 "NVIDIA MCP77 PCI" rev 0xa1: msi
pci4 at ppb3 bus 4
ppb4 at pci0 dev 20 function 0 "NVIDIA MCP77 PCI" rev 0xa1: msi
pci5 at ppb4 bus 5
pchb0 at pci0 dev 24 function 0 "AMD AMD64 10h HyperTransport" rev 0x00
pchb1 at pci0 dev 24 function 1 "AMD AMD64 10h Address Map" rev 0x00
pchb2 at pci0 dev 24 function 2 "AMD AMD64 10h DRAM Cfg" rev 0x00
km0 at pci0 dev 24 function 3 "AMD AMD64 10h Misc Cfg" rev 0x00
pchb3 at pci0 dev 24 function 4 "AMD AMD64 10h Link Cfg" rev 0x00
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
it0 at isa0 port 0x2e/2: IT8720F rev 2, EC port 0xd00
usb2 at ohci0: USB revision 1.0
uhub2 at usb2 configuration 1 interface 0 "NVIDIA OHCI root hub" rev
1.00/1.00 addr 1
usb3 at ohci1: USB revision 1.0
uhub3 at usb3 configuration 1 interface 0 "NVIDIA OHCI root hub" rev
1.00/1.00 addr 1
vmm0 at mainbus0: SVM/RVI
uhidev0 at uhub2 port 2 configuration 1 interface 0 "Logitech G203 Prodigy
Gaming Mouse" rev 2.00/7.03 addr 2
uhidev0: iclass 3/1
ums0 at uhidev0: 16 buttons, Z and W dir
wsmouse0 at ums0 mux 0
uhidev1 at uhub2 port 2 configuration 1 interface 1 "Logitech G203 Prodigy
Gaming Mouse" rev 2.00/7.03 addr 2
uhidev1: iclass 3/0, 17 report ids
ukbd0 at uhidev1 reportid 1: 8 variable keys, 6 key codes
wskbd1 at ukbd0 mux 1
wskbd1: connecting to wsdisplay0
uhid0 at uhidev1 reportid 3: input=4, output=0, feature=0
uhid1 at uhidev1 reportid 4: input=1, output=0, feature=0
uhid2 at uhidev1 reportid 16: input=6, output=6, feature=0
uhid3 at uhidev1 reportid 17: input=19, output=19, feature=0
uhidev2 at uhub3 port 2 configuration 1 interface 0 "Logitech G413 Carbon
Mechanical Gaming Keyboard" rev 2.00/14.00 addr 2
uhidev2: iclass 3/1
ukbd1 at uhidev2: 8 variable keys, 6 key codes
wskbd2 at ukbd1 mux 1
wskbd2: connecting to wsdisplay0
uhidev3 at uhub3 port 2 configuration 1 interface 1 "Logitech G413 Carbon
Mechanical Gaming Keyboard" rev 2.00/14.00 addr 2
uhidev3: iclass 3/0, 18 report ids
ukbd2 at uhidev3 reportid 1: 0 variable keys, 6 key codes
wskbd3 at ukbd2 mux 1
wskbd3: connecting to wsdisplay0
uhid4 at uhidev3 reportid 2: input=1, output=0, feature=0
uhid5 at uhidev3 reportid 17: input=19, output=19, feature=0
uhid6 at uhidev3 reportid 18: input=63, output=63, feature=0
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd0a (ce2ee33bb68fba23.a) swap on sd0b dump on sd0b

thanks for help!
AR
Reply | Threaded
Open this post in threaded view
|

Re: Impossible to remove a broken package on 6.5.

Chris Cappuccio
Angelo Rossi [[hidden email]] 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

Reply | Threaded
Open this post in threaded view
|

Re: Impossible to remove a broken package on 6.5.

me-4
On Fri, Sep 06, 2019 at 07:13:21AM -0700, Chris Cappuccio wrote:

> Angelo Rossi [[hidden email]] 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.

Reply | Threaded
Open this post in threaded view
|

Re: Impossible to remove a broken package on 6.5.

Strahil Nikolov
On September 6, 2019 6:46:32 PM GMT+03:00, [hidden email] wrote:

>On Fri, Sep 06, 2019 at 07:13:21AM -0700, Chris Cappuccio wrote:
>> Angelo Rossi [[hidden email]] 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

Reply | Threaded
Open this post in threaded view
|

Re: Impossible to remove a broken package on 6.5.

Marc Espie-2
In reply to this post by Angelo Rossi
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.

Reply | Threaded
Open this post in threaded view
|

Re: Impossible to remove a broken package on 6.5.

Marc Espie-2
In reply to this post by Chris Cappuccio
On Fri, Sep 06, 2019 at 07:13:21AM -0700, Chris Cappuccio wrote:

> Angelo Rossi [[hidden email]] 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.

Reply | Threaded
Open this post in threaded view
|

Re: Impossible to remove a broken package on 6.5.

Marc Espie-2
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 -0000 1.43
+++ AddCreateDelete.pm 10 Sep 2019 09:45:36 -0000
@@ -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.pm 10 Jul 2018 10:37:59 -0000 1.45
+++ PkgDelete.pm 10 Sep 2019 09:45:36 -0000
@@ -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 -0000 1.10
+++ Dependencies/SolverBase.pm 10 Sep 2019 09:45:36 -0000
@@ -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