Opened 15 months ago

Closed 5 months ago

#18591 closed bug (invalid)

[packagefs] unable to downgrade mesa packages

Reported by: diver Owned by: bonefish
Priority: normal Milestone: Unscheduled
Component: File Systems/packagefs Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by diver)

This is hrev57283 x86_64.

I have locally built and installed the latest mesa packages. When I try to full-sync to sync (downgrade) with mesa packages from haikuports I'm getting the following:

pkgman full-sync

The following changes will be made:
  in system:
    upgrade package mesa_lavapipe-23.1.6-1 to 22.0.5-2 from repository HaikuPorts
    upgrade package mesa-23.1.6-1 to 22.0.5-2 from repository HaikuPorts
    upgrade package mesa_devel-23.1.6-1 to 22.0.5-2 from repository HaikuPorts
    uninstall package mesa_eglvnd-23.1.6-1
Continue? [yes/no] (yes) : 
100% mesa_lavapipe-22.0.5-2-x86_64.hpkg [2.09 MiB]
Validating checksum for https://eu.hpkg.haiku-os.org/haikuports/master/x86_64/current/packages/mesa_lavapipe-22.0.5-2-x86_64.hpkg...done.
100% mesa-22.0.5-2-x86_64.hpkg [4.87 MiB]
Validating checksum for https://eu.hpkg.haiku-os.org/haikuports/master/x86_64/current/packages/mesa-22.0.5-2-x86_64.hpkg...done.
100% mesa_devel-22.0.5-2-x86_64.hpkg [316.03 KiB]
Validating checksum for https://eu.hpkg.haiku-os.org/haikuports/master/x86_64/current/packages/mesa_devel-22.0.5-2-x86_64.hpkg...done.
[system] Applying changes ...
*** failed to commit transaction: Failed to change the package activation in packagefs: Invalid Argument

syslog:

CommitTransactionHandler::_ChangePackageActivation(): activating 3, deactivating 4 packages
Volume::_ChangeActivation(): 3 new packages, 4 old packages
package "mesa_devel-23.1.6-1-x86_64.hpkg" deactivated
package "mesa-23.1.6-1-x86_64.hpkg" deactivated
package "mesa_eglvnd-23.1.6-1-x86_64.hpkg" deactivated
package "mesa_lavapipe-23.1.6-1-x86_64.hpkg" deactivated
Failed to open package file "mesa_lavapipe-23.1.6-1-x86_64.hpkg": No such file or directory
Volume::_ChangeActivation(): failed to roll back deactivation of package "mesa_lavapipe-23.1.6-1-x86_64.hpkg" after error
Failed to open package file "mesa_eglvnd-23.1.6-1-x86_64.hpkg": No such file or directory
Volume::_ChangeActivation(): failed to roll back deactivation of package "mesa_eglvnd-23.1.6-1-x86_64.hpkg" after error
Failed to open package file "mesa-23.1.6-1-x86_64.hpkg": No such file or directory
olume::_ChangeActivation(): failed to roll back deactivation of package "mesa-23.1.6-1-x86_64.hpkg" after error
Failed to open package file "mesa_devel-23.1.6-1-x86_64.hpkg": No such file or directory
Volume::_ChangeActivation(): failed to roll back deactivation of package "mesa_devel-23.1.6-1-x86_64.hpkg" after error
package_daemon: Volume::_PackagesEntryRemoved("mesa_devel-23.1.6-1-x86_64.hpkg")
package_daemon: Volume::_PackagesEntryRemoved("mesa-23.1.6-1-x86_64.hpkg")
package_daemon: Volume::_PackagesEntryRemoved("mesa_eglvnd-23.1.6-1-x86_64.hpkg")
package_daemon: Volume::_PackagesEntryRemoved("mesa_lavapipe-23.1.6-1-x86_64.hpkg")
package_daemon: Volume::_PackagesEntryCreated("mesa_lavapipe-22.0.5-2-x86_64.hpkg")
package_daemon: failed to init package for file "mesa_lavapipe-22.0.5-2-x86_64.hpkg"
package_daemon: Volume::_PackagesEntryCreated("mesa-22.0.5-2-x86_64.hpkg")
package_daemon: failed to init package for file "mesa-22.0.5-2-x86_64.hpkg"
package_daemon: Volume::_PackagesEntryCreated("mesa_devel-22.0.5-2-x86_64.hpkg")
package_daemon: failed to init package for file "mesa_devel-22.0.5-2-x86_64.hpkg"
package_daemon: Volume::_PackagesEntryRemoved("mesa_devel-22.0.5-2-x86_64.hpkg")
package_daemon: Volume::_PackagesEntryRemoved("mesa-22.0.5-2-x86_64.hpkg")
package_daemon: Volume::_PackagesEntryRemoved("mesa_lavapipe-22.0.5-2-x86_64.hpkg")
package_daemon: Volume::_PackagesEntryCreated("mesa_devel-23.1.6-1-x86_64.hpkg")
package_daemon: Volume::_PackagesEntryCreated("mesa-23.1.6-1-x86_64.hpkg")
package_daemon: Volume::_PackagesEntryCreated("mesa_eglvnd-23.1.6-1-x86_64.hpkg")
package_daemon: Volume::_PackagesEntryCreated("mesa_lavapipe-23.1.6-1-x86_64.hpkg")

Change History (5)

comment:1 by diver, 15 months ago

Description: modified (diff)

comment:2 by diver, 15 months ago

Description: modified (diff)
Version: R1/beta4R1/Development

comment:3 by diver, 14 months ago

Component: File Systems/packagefsServers/package_daemon
ls /packages | grep mesa
mesa_devel-23.1.9-1
mesa_eglvnd-23.1.9-1
mesa_lavapipe-23.1.9-1
mesa-23.1.9-1

~> pkgman full
100% repochecksum-1 [65 bytes]
Validating checksum for Haiku...done.
100% repochecksum-1 [64 bytes]
Validating checksum for HaikuPorts...done.
100% repochecksum-1 [71 bytes]
Validating checksum for LOTE...done.
The following changes will be made:
  in system:
    upgrade package mesa_lavapipe-23.1.9-1 to 22.0.5-2 from repository HaikuPorts
    upgrade package mesa-23.1.9-1 to 22.0.5-2 from repository HaikuPorts
    upgrade package mesa_devel-23.1.9-1 to 22.0.5-2 from repository HaikuPorts
    uninstall package mesa_eglvnd-23.1.9-1
Continue? [yes/no] (yes) : 
100% mesa_lavapipe-22.0.5-2-x86_64.hpkg [2.09 MiB]
Validating checksum for https://eu.hpkg.haiku-os.org/haikuports/master/x86_64/current/packages/mesa_lavapipe-22.0.5-2-x86_64.hpkg...done.
100% mesa-22.0.5-2-x86_64.hpkg [4.87 MiB]
Validating checksum for https://eu.hpkg.haiku-os.org/haikuports/master/x86_64/current/packages/mesa-22.0.5-2-x86_64.hpkg...done.
100% mesa_devel-22.0.5-2-x86_64.hpkg [316.03 KiB]
Validating checksum for https://eu.hpkg.haiku-os.org/haikuports/master/x86_64/current/packages/mesa_devel-22.0.5-2-x86_64.hpkg...done.
[system] Applying changes ...
*** failed to commit transaction: Failed to change the package activation in packagefs: Invalid Argument

~> ls /packages/| grep mesa
<empty>

comment:4 by waddlesplash, 14 months ago

Component: Servers/package_daemonFile Systems/packagefs

No, this is still a packagefs problem, somehow. The bug I fixed in packagefs indicates that the failure is somewhere in there.

comment:5 by waddlesplash, 5 months ago

Resolution: invalid
Status: newclosed

I added some more checks in hrev57923 and now we see what the problem is:

packagefs: Failed to add node "KHR" of package libglvnd_devel: Is a directory

The libglvnd package contains a directory named "KHR" while the Mesa package contains a file (a symlink, specifically) at the same place. packagefs doesn't know how to resolve this conflict, so it bails.

I don't think there's anything more to do here; packagefs handles this case as it should. The only case I noticed was if you don't activate the downgrade until a reboot, the system will fail to boot with the equivalent error. We could possibly adjust packagefs to try and continue booting with such invalid packages, but I don't think that would be a good idea, so I don't think there is anything more to be done here.

Note: See TracTickets for help on using tickets.