[MacPorts] #63979: qca and subports: revisions have not been restored correctly

MacPorts noreply at macports.org
Sun Nov 21 12:10:55 UTC 2021


#63979: qca and subports: revisions have not been restored correctly
-------------------------+----------------------
  Reporter:  ryandesign  |      Owner:  RJVB
      Type:  defect      |     Status:  assigned
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:
Resolution:              |   Keywords:
      Port:  qca         |
-------------------------+----------------------

Comment (by RJVB):

 So I've been tinkering with this issue, first revbumping my local copy of
 `port:qca-qt5-ossl` so that the archive directory had

 {{{
 > ll -htr /opt/local/var/macports/software/qca-qt5-ossl
 total 1.7M
 103736 517K -rw-r--r--    1 root   root 463K Sep 12  2019 qca-
 qt5-ossl-2.2.1_1+LTO+langselect+qt5kde.linux_3.x86_64.tbz2
  47758 517K -rw-r--r--    1 root   root 471K Nov 13 15:33 qca-
 qt5-ossl-2.3.4_0+LTO+cpucompat+langselect+qt5kde.linux_3.x86_64.tbz2
      4 145K drwxrwxr-x 1195 bertin adm  1.2K Nov 13 15:33 ../
  47767 517K -rw-r--r--    1 root   root 471K Nov 21 12:36 qca-
 qt5-ossl-2.3.4_1+LTO+cpucompat+langselect+qt5kde.linux_3.x86_64.tbz2
    436  25K drwxrwxr-x    2 root   adm     5 Nov 21 12:36 ./

 }}}

 (this is on my "LinuxPorts" system, which runs exactly the same MacPorts
 version as I have on Mac; there's no ground to believe it would handle
 epoch/revision issues any differently. Nor that my custom variants would
 have any influence here.)

 After installing the `revision 1` version of the port, I edited the
 Portfile (`revision` -> `epoch`), and ran the following command using the
 exact same destroot directory which I had kept. So we have the added
 situation that the port's files are all strictly identical, down to the
 hash and dates.

 Contrary to what I expected, `port upgrade qca-qt5-ossl` did nothing.
 `port install qca-qt5-ossl` did, but it just activated the "revision 0"
 version.

 Next, I realised that the Qt4 ports had been updated to 2.3.4, so, still
 using the same destroot, I removed the `epoch` statement from the Portfile
 and bumped the version to 2.3.5 (with `revision 0`; this installed v2.3.4
 pretending to be v2.3.5).
 Then, I reverted the `version` change, and added `epoch 1` and saw this:
 {{{
 > sudo port -nok upgrade qca-qt5-ossl
 --->  Computing dependencies for qca-qt5-ossl
 --->  Uninstalling qca-qt5-ossl @2.3.4_0+LTO+cpucompat+langselect+qt5kde
 --->  Cleaning qca-qt5-ossl
 --->  Computing dependencies for qca-qt5-ossl
 --->  Installing qca-qt5-ossl @2.3.4_0+LTO+cpucompat+langselect+qt5kde
 --->  Deactivating qca-qt5-ossl @2.3.5_0+LTO+cpucompat+langselect+qt5kde
 --->  Cleaning qca-qt5-ossl
 --->  Activating qca-qt5-ossl @2.3.4_0+LTO+cpucompat+langselect+qt5kde
 }}}

 This gave me the following archive directory:
 {{{
 > ll -htr /opt/local/var/macports/software/qca-qt5-ossl
 total 2.2M
 103736 517K -rw-r--r--    1 root   root 463K Sep 12  2019 qca-
 qt5-ossl-2.2.1_1+LTO+langselect+qt5kde.linux_3.x86_64.tbz2
      4 145K drwxrwxr-x 1195 bertin adm  1.2K Nov 13 15:33 ../
  47767 517K -rw-r--r--    1 root   root 471K Nov 21 12:36 qca-
 qt5-ossl-2.3.4_1+LTO+cpucompat+langselect+qt5kde.linux_3.x86_64.tbz2
  47927 517K -rw-r--r--    1 root   root 471K Nov 21 12:51 qca-
 qt5-ossl-2.3.5_0+LTO+cpucompat+langselect+qt5kde.linux_3.x86_64.tbz2
  47928 517K -rw-r--r--    1 root   root 471K Nov 21 12:51 qca-
 qt5-ossl-2.3.4_0+LTO+cpucompat+langselect+qt5kde.linux_3.x86_64.tbz2
    436  25K drwxrwxr-x    2 root   adm     6 Nov 21 12:51 ./

 }}}

 The logfile for the install (short enough to paste, I think):
 {{{
 version:1
 :debug:sysinfo Linux 4.14.23-ck1-mainline-core2-rjvb (linux/4.14.23-ck1
 -mainline-core2-rjvb) arch x86_64
 :debug:sysinfo MacPorts 2.6.2.86
 :msg:clean --->  Computing dependencies for qca-qt5-ossl:info:clean
 .:debug:clean qca-qt5-ossl has no conflicts
 :debug:clean Searching for dependency: xz
 :debug:clean Found Dependency: receipt exists for xz
 :debug:clean Searching for dependency: cmake
 :debug:clean Found Dependency: receipt exists for cmake
 :debug:clean Searching for dependency: openssl3-dev
 :debug:clean Found Dependency: receipt exists for openssl3-dev
 :debug:clean Searching for dependency: pkgconfig
 :debug:clean Found Dependency: receipt exists for pkgconfig
 :debug:clean Searching for dependency: qca-qt5
 :debug:clean Found Dependency: receipt exists for qca-qt5
 :debug:clean Searching for dependency: openssl3
 :debug:clean Found Dependency: receipt exists for openssl3
 :debug:main Executing org.macports.main (qca-qt5-ossl)
 :debug:main dropping privileges: euid changed to 505, egid changed to 505.
 :debug:archivefetch archivefetch phase started at Sun Nov 21 12:51:39 CET
 2021
 :debug:archivefetch Executing org.macports.archivefetch (qca-qt5-ossl)
 :debug:archivefetch Privilege de-escalation not attempted as not running
 as root.
 :debug:archivefetch Skipping completed org.macports.fetch (qca-qt5-ossl)
 :debug:archivefetch Privilege de-escalation not attempted as not running
 as root.
 :debug:archivefetch Skipping completed org.macports.checksum (qca-
 qt5-ossl)
 :debug:archivefetch Privilege de-escalation not attempted as not running
 as root.
 :debug:archivefetch Skipping completed org.macports.extract (qca-qt5-ossl)
 :debug:archivefetch Privilege de-escalation not attempted as not running
 as root.
 :debug:archivefetch Skipping completed org.macports.patch (qca-qt5-ossl)
 :debug:archivefetch Privilege de-escalation not attempted as not running
 as root.
 :debug:archivefetch Skipping completed org.macports.configure (qca-
 qt5-ossl)
 :debug:archivefetch Privilege de-escalation not attempted as not running
 as root.
 :debug:archivefetch Skipping completed org.macports.build (qca-qt5-ossl)
 :debug:archivefetch Privilege de-escalation not attempted as not running
 as root.
 :debug:archivefetch Skipping completed org.macports.destroot (qca-
 qt5-ossl)
 :debug:archivefetch Privilege de-escalation not attempted as not running
 as root.
 :debug:install install phase started at Sun Nov 21 12:51:39 CET 2021
 :notice:install --->  Installing qca-qt5-ossl
 @2.3.4_0+LTO+cpucompat+langselect+qt5kde
 :debug:install elevating privileges for install: euid changed to 0, egid
 changed to 0.
 :debug:install Executing org.macports.install (qca-qt5-ossl)
 :debug:install Using /bin/tar
 :debug:install Using /usr/bin/pbzip2 -c9
 :debug:install checksum file: /opt/local/var/lnxports/build
 /_opt_local_site-ports_devel_qca/qca-
 qt5-ossl/work/destroot/opt/local/share/qt5/plugins/crypto/libqca-ossl.so
 :debug:install Creating qca-
 qt5-ossl-2.3.4_0+LTO+cpucompat+langselect+qt5kde.linux_3.x86_64.tbz2
 :debug:install Environment:
 :debug:install CPATH='/opt/local/include'
 :debug:install DEVELOPER_DIR=''
 :debug:install LIBRARY_PATH='/opt/local/lib'
 :debug:install Executing:  cd "/opt/local/var/lnxports/build
 /_opt_local_site-ports_devel_qca/qca-qt5-ossl/work/destroot" && /bin/tar
 -cvf - . | /usr/bin/pbzip2 -c9 > /opt/local/var/lnxports/software/qca-
 qt5-ossl/qca-
 qt5-ossl-2.3.4_0+LTO+cpucompat+langselect+qt5kde.linux_3.x86_64.tbz2
 :debug:install system:  cd "/opt/local/var/lnxports/build/_opt_local_site-
 ports_devel_qca/qca-qt5-ossl/work/destroot" && /bin/tar -cvf - . |
 /usr/bin/pbzip2 -c9 > /opt/local/var/lnxports/software/qca-qt5-ossl/qca-
 qt5-ossl-2.3.4_0+LTO+cpucompat+langselect+qt5kde.linux_3.x86_64.tbz2
 :info:install ./
 :info:install ./+PORTFILE
 :info:install ./+CONTENTS
 :info:install ./+COMMENT
 :info:install ./+STATE
 :info:install ./+DESC
 :info:install ./opt/
 :info:install ./opt/local/
 :info:install ./opt/local/share/
 :info:install ./opt/local/share/qt5/
 :info:install ./opt/local/share/qt5/plugins/
 :info:install ./opt/local/share/qt5/plugins/crypto/
 :info:install ./opt/local/share/qt5/plugins/crypto/libqca-ossl.so
 :debug:install Archive qca-
 qt5-ossl-2.3.4_0+LTO+cpucompat+langselect+qt5kde.linux_3.x86_64.tbz2
 packaged
 :debug:install removing file: /opt/local/var/lnxports/build
 /_opt_local_site-ports_devel_qca/qca-qt5-ossl/work/destroot/+PORTFILE
 :debug:install removing file: /opt/local/var/lnxports/build
 /_opt_local_site-ports_devel_qca/qca-qt5-ossl/work/destroot/+CONTENTS
 :debug:install removing file: /opt/local/var/lnxports/build
 /_opt_local_site-ports_devel_qca/qca-qt5-ossl/work/destroot/+COMMENT
 :debug:install removing file: /opt/local/var/lnxports/build
 /_opt_local_site-ports_devel_qca/qca-qt5-ossl/work/destroot/+STATE
 :debug:install removing file: /opt/local/var/lnxports/build
 /_opt_local_site-ports_devel_qca/qca-qt5-ossl/work/destroot/+DESC
 :debug:activate activate phase started at Sun Nov 21 12:51:39 CET 2021
 :debug:activate Executing org.macports.activate (qca-qt5-ossl)
 :debug:activate Using normalized porturl
 file:///opt/local/var/lnxports/registry/portfiles/qca-
 qt5-ossl-2.3.5_0/fb15f4575dc5aefa721606a3f28e63c1fc0419077f243fad03367d597e1eb240-7754
 :debug:activate Changing to port directory:
 /opt/local/var/lnxports/registry/portfiles/qca-
 qt5-ossl-2.3.5_0/fb15f4575dc5aefa721606a3f28e63c1fc0419077f243fad03367d597e1eb240-7754
 :debug:activate OS linux/4.14.23-ck1-mainline-core2-rjvb arch x86_64
 :debug:activate Already installed Qt5 version: qt5 (qt5-qtbase)
 :debug:activate Qt5 is provided by port:qt5-kde; transferring to PortGroup
 qt5-kde 1.0
 :debug:activate Qt5 is provided by port:qt5-kde
 :debug:activate +qt5kde is set for port:qca-qt5-ossl
 :debug:activate Sourcing PortGroup compiler_blacklist_versions 1.0 from
 /opt/local/var/lnxports/registry/portgroups/4af6c3c88f20ed3161ad8a1d250c796fc7f8d4d7117857d278897f0bd15fc0c7-5084/compiler_blacklist_versions-1.0.tcl
 :debug:activate available_apple_compilers=
 :debug:activate Picking compiler from fallbacks cc macports-clang-3.4
 macports-clang-3.3 macports-gcc-7 macports-gcc-6 macports-gcc-5
 :debug:activate Adding depspec
 "path:libexec/qt5/lib/libQt5Core.so:qt5-kde"
 (/opt/local/var/lnxports/registry/portgroups/9ed7b10c09cdad4b8d6aa7f8b92b76b82039020a632112df0b624e39e84ae716-44676/qt5-kde-1.0.tcl)
 :debug:activate LTO: setting LTO compiler and linker option(s) "-ftracer
 -flto -fuse-linker-plugin -ffat-lto-objects"
 :debug:activate Re-registering default for LTO.cpuflags
 :debug:activate Sourcing PortGroup LTO 1.0 from
 /opt/local/var/lnxports/registry/portgroups/537c7901e8559db9bd5225ea68ebcbc050a1920da967111db1528ea6ca465d96-11087/LTO-1.0.tcl
 :debug:activate Sourcing PortGroup locale_select 1.0 from
 /opt/local/var/lnxports/registry/portgroups/125f26dac2be21443dadd842b4f8b26e3a13318eaba57029f445268bb1cd1f06-7514/locale_select-1.0.tcl
 :debug:activate Sourcing PortGroup qt5-kde 1.0 from
 /opt/local/var/lnxports/registry/portgroups/9ed7b10c09cdad4b8d6aa7f8b92b76b82039020a632112df0b624e39e84ae716-44676/qt5-kde-1.0.tcl
 :debug:activate Sourcing PortGroup qt5-stock 1.0 from
 /opt/local/var/lnxports/registry/portgroups/5a202dadf43e9ec7eb5769ca74328e8ad013cb67d3b49bb3c0c10a6a5a81bcd1-37198/qt5-stock-1.0.tcl
 :debug:activate Sourcing PortGroup qt5 1.0 from
 /opt/local/var/lnxports/registry/portgroups/75f86574c5d39bd484dce9f60b0f739b2f557170805d4d640f049fd02c062ae6-6661/qt5-1.0.tcl
 :debug:activate Re-registering default for destroot.target
 :debug:activate Re-registering default for configure.dir
 :debug:activate Re-registering default for build.dir
 :debug:activate Re-registering default for configure.pre_args
 :debug:activate Sourcing PortGroup cmake 1.1 from
 /opt/local/var/lnxports/registry/portgroups/75a69282dc6940f5841cac13cfbb2d0c659192188816fe9b4a0e5e11884fe334-32380/cmake-1.1.tcl
 :debug:activate available_apple_compilers=
 :debug:activate Picking compiler from fallbacks cc macports-clang-3.4
 macports-clang-3.3 macports-gcc-7 macports-gcc-6 macports-gcc-5
 :debug:activate Sourcing PortGroup openssl 1.0 from
 /opt/local/var/lnxports/registry/portgroups/7a2b9bad7723e8b142f8461a85152bdbe6e8a0df1361e08345b23510e86ad08f-7898/openssl-1.0.tcl
 :debug:activate universal_variant is false, so not adding the default
 universal variant
 :debug:activate Executing variant qt5kde provides qt5kde
 :debug:activate Executing variant LTO provides LTO
 :debug:activate Executing variant cpucompat provides cpucompat
 :debug:activate Executing variant langselect provides langselect
 :debug:activate Running callback
 portconfigure::add_automatic_compiler_dependencies
 :debug:activate Finished running callback
 portconfigure::add_automatic_compiler_dependencies
 :debug:activate Running callback
 portbuild::add_automatic_buildsystem_dependencies
 :debug:activate Finished running callback
 portbuild::add_automatic_buildsystem_dependencies
 :debug:activate Running callback portstartupitem::add_notes
 :debug:activate Finished running callback portstartupitem::add_notes
 :debug:activate Running callback openssl::set_openssl_dependency
 :debug:activate Finished running callback openssl::set_openssl_dependency
 :debug:activate Running callback openssl::check_for_cmake
 :debug:activate Appending cmake to openssl configuration types
 :debug:activate Configure Types 'pkgconfig build_flags cmake'
 :debug:activate  -> Setting openssl pkgconfig configuration
 :debug:activate  -> Setting openssl build flags configuration
 :debug:activate  -> Setting openssl cmake configuration
 :debug:activate Finished running callback openssl::check_for_cmake
 :debug:activate Running callback openssl::configure_build
 :debug:activate Finished running callback openssl::configure_build
 :debug:activate Starting logging for qca-qt5-ossl
 :debug:main Executing org.macports.main (qca-qt5-ossl)
 :debug:clean clean phase started at Sun Nov 21 12:51:40 CET 2021
 :notice:clean --->  Cleaning qca-qt5-ossl
 :debug:clean Executing org.macports.clean (qca-qt5-ossl)
 :info:clean --->  Removing work directory for qca-qt5-ossl
 :debug:clean No work directory found to remove at
 /opt/local/var/lnxports/build
 /_opt_local_var_lnxports_registry_portfiles_qca-
 qt5-ossl-2.3.5_0_fb15f4575dc5aefa721606a3f28e63c1fc0419077f243fad03367d597e1eb240-7754
 /qca-qt5-ossl
 :debug:clean Removing directory: /opt/local/var/lnxports/logs
 /_opt_local_var_lnxports_registry_portfiles_qca-
 qt5-ossl-2.3.5_0_fb15f4575dc5aefa721606a3f28e63c1fc0419077f243fad03367d597e1eb240-7754
 /qca-qt5-ossl
 :msg:clean --->  Activating qca-qt5-ossl
 @2.3.4_0+LTO+cpucompat+langselect+qt5kde
 :debug:clean Using /bin/tar
 :debug:clean Using /usr/bin/pbzip2
 :debug:clean system: /usr/bin/pbzip2 -d -c
 '/opt/local/var/lnxports/software/qca-qt5-ossl/qca-
 qt5-ossl-2.3.4_0+LTO+cpucompat+langselect+qt5kde.linux_3.x86_64.tbz2' | (
 /bin/tar -xvpf - )
 :info:clean ./
 :info:clean ./+PORTFILE
 :info:clean ./+CONTENTS
 :info:clean ./+COMMENT
 :info:clean ./+STATE
 :info:clean ./+DESC
 :info:clean ./opt/
 :info:clean ./opt/local/
 :info:clean ./opt/local/share/
 :info:clean ./opt/local/share/qt5/
 :info:clean ./opt/local/share/qt5/plugins/
 :info:clean ./opt/local/share/qt5/plugins/crypto/
 :info:clean ./opt/local/share/qt5/plugins/crypto/libqca-ossl.so
 :debug:clean activating directory: /
 :debug:clean activating directory: /opt
 :debug:clean activating directory: /opt/local
 :debug:clean activating directory: /opt/local/share
 :debug:clean activating directory: /opt/local/share/qt5
 :debug:clean activating directory: /opt/local/share/qt5/plugins
 :debug:clean activating directory: /opt/local/share/qt5/plugins/crypto
 :debug:clean activating file: /opt/local/share/qt5/plugins/crypto/libqca-
 ossl.so
 :debug:clean Executing proc-post-org.macports.activate-activate-0
 :debug:clean Qt help collection: tDir
 "/opt/local/share/doc/qt5"=1631780765 , tchDir
 "/opt/local/share/doc/qch"=1625778090 , File "/opt/local/share/doc/qt5/MP-
 qthelp-collection.qhc" 1631780765
 :debug:clean Executing portactivate::activate_finish
 :debug:main Executing org.macports.main (qca-qt5-ossl)
 :debug:load load phase started at Sun Nov 21 12:51:40 CET 2021
 :debug:load Executing org.macports.load (qca-qt5-ossl)
 }}}

 So my belief of the effect `epoch` can have was not unfounded, and appears
 to be different in how it handles downgrades in version and downgrades in
 revision. I find that surprising to say the least. Of course there's one
 difference in this final scenario compared to what users of the Qt4
 subports will encounter: I actually got to install the (fake) new version.
 I also didn't run `portindex`, so I repeated the procedure. Rev-bumped
 v2.3.4, ran portindex, did an `upgrade --force` (necessary here, just to
 refresh the 2.3.4_1 install). Then I reverted the revision, re-increased
 the version to the fake 2.3.5, ran portinex ''and did not upgrade the
 port''. Reverted the version upgrade and added `epoch 1` followed by yet
 another portindex. This time, no upgrade as predicted by Ryan.

 Looks like I'm going to have to see if the history of the terminal I used
 for updating the Qt4 subports on my Mac still shows exactly what I did!
 (Or maybe repeat my tests to see if maybe "base" does behave differently
 on Mac...)

-- 
Ticket URL: <https://trac.macports.org/ticket/63979#comment:14>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list