Opened 4 years ago

Last modified 4 years ago

#52911 new enhancement

rev-upgrade -v should be more verbose about missing architecture

Reported by: mojca (Mojca Miklavec) Owned by: macports-tickets@…
Priority: Low Milestone:
Component: base Version: 2.3.99
Keywords: Cc:
Port:

Description

After installation of wine-devel I managed to end up with non-universal glib2 after upgrading outdated ports. I'm not sure why MacPorts would even allow a non-universal one (something for a separate issue perhaps), but the main problem is that port -v rev-upgrade is not really helpful:

> sudo port -vy rev-upgrade 
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  Found 430 broken files, matching files to ports    
--->  Found 15 broken ports:
     cairo @1.14.6 +quartz+universal+x11
         /opt/local/bin/cairo-sphinx
         /opt/local/lib/libcairo-gobject.2.dylib
     desktop-file-utils @0.23 +universal
         /opt/local/bin/desktop-file-install
         /opt/local/bin/desktop-file-validate
         /opt/local/bin/update-desktop-database
     shared-mime-info @1.7 +universal
         /opt/local/bin/update-mime-database
     at-spi2-atk @2.22.0 +universal
         /opt/local/lib/gtk-2.0/modules/libatk-bridge.so
         /opt/local/lib/libatk-bridge-2.0.0.dylib
     atk @2.22.0 +universal
         /opt/local/lib/libatk-1.0.0.dylib
     at-spi2-core @2.22.0 +universal
         /opt/local/lib/libatspi.0.dylib
         /opt/local/libexec/at-spi-bus-launcher
         /opt/local/libexec/at-spi2-registryd
     wine-devel @1.9.23 
         /opt/local/lib/wine/winegstreamer.dll.so
     gobject-introspection @1.50.0 +universal
     ...

In case of a broken library ("forgotten" upgrade) it's perfectly clear:

Could not open /opt/local/lib/libjasper.1.dylib: Error opening or reading file (referenced from /opt/local/libexec/qt5/plugins/imageformats/libqjp2.dylib)

Running

sudo port -dy rev-upgrade

reveals a hint:

DEBUG: Missing architecture i386 in file /opt/local/lib/libglib-2.0.0.dylib

but it would be awesome if this piece of information was communicated more clearly in the verbose mode already.

Change History (1)

comment:1 Changed 4 years ago by mojca (Mojca Miklavec)

The relevant part of the code from src/macports1.0/macports.tcl:

if {!$libarch_found} {
    ui_debug "Missing architecture [machista::get_arch_name [$architecture cget -mat_arch]] in file $filepath"
    if {[path_is_in_prefix $filepath]} {
        ui_debug "Marking $bpath as broken"
        lappend broken_files $bpath
    } else {
        ui_debug "Missing architecture [machista::get_arch_name [$architecture cget -mat_arch]] in file outside prefix referenced from $bpath"
        # ui_debug "   How did you get that compiled anyway?"
    }
}

Can we change ui_debug into ui_info (to make the message print in verbose mode) or do some other change with a similar effect?

Sadly one side effect of directly replacing ui_debug with ui_info is that I end up with junk output:

Missing architecture i386 in file /opt/local/lib/libgobject-2.0.0.dylib
Missing architecture i386 in file /opt/local/lib/libgio-2.0.0.dylib
Missing architecture i386 in file /opt/local/lib/libgmodule-2.0.0.dylib
      [                                        ]  82.5 %Missing architecture i386 in file /opt/local/lib/libglib-2.0.0.dylib
Missing architecture i386 in file /opt/local/lib/libgobject-2.0.0.dylib
Missing architecture i386 in file /opt/local/lib/libgio-2.0.0.dylib
Missing architecture i386 in file /opt/local/lib/libgmodule-2.0.0.dylib
      [                                        ]  82.5 %Missing architecture i386 in file /opt/local/lib/libglib-2.0.0.dylib
Missing architecture i386 in file /opt/local/lib/libgobject-2.0.0.dylib
Missing architecture i386 in file /opt/local/lib/libgio-2.0.0.dylib
Missing architecture i386 in file /opt/local/lib/libgmodule-2.0.0.dylib
      [                                        ]  82.5 %Missing architecture i386 in file /opt/local/lib/libglib-2.0.0.dylib
Missing architecture i386 in file /opt/local/lib/libgobject-2.0.0.dylib
Missing architecture i386 in file /opt/local/lib/libgio-2.0.0.dylib
Missing architecture i386 in file /opt/local/lib/libgmodule-2.0.0.dylib
      [                                        ]  82.6 %Missing architecture i386 in file /opt/local/lib/libglib-2.0.0.dylib
Missing architecture i386 in file /opt/local/lib/libgobject-2.0.0.dylib
Missing architecture i386 in file /opt/local/lib/libgio-2.0.0.dylib
Missing architecture i386 in file /opt/local/lib/libgmodule-2.0.0.dylib
      [                                        ]  82.6 %Missing architecture i386 in file /opt/local/lib/libglib-2.0.0.dylib
Missing architecture i386 in file /opt/local/lib/libgobject-2.0.0.dylib
Missing architecture i386 in file /opt/local/lib/libgio-2.0.0.dylib
Missing architecture i386 in file /opt/local/lib/libgmodule-2.0.0.dylib
      [                                        ]  98.7 %Missing architecture i386 in file /opt/local/lib/libglib-2.0.0.dylib
Missing architecture i386 in file /opt/local/lib/libgobject-2.0.0.dylib

so most likely some further changes are needed.

The other verbose error comes from src/machista1.0/libmachista.c and apparently "works better" for that particular scenario.

Last edited 4 years ago by mojca (Mojca Miklavec) (previous) (diff)
Note: See TracTickets for help on using tickets.