Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 1.2.5. JB#52079 #1

Merged
merged 255 commits into from Nov 3, 2022
Merged

Update to 1.2.5. JB#52079 #1

merged 255 commits into from Nov 3, 2022

Conversation

pvuorela
Copy link
Contributor

@pvuorela pvuorela commented Oct 4, 2022

Updated to new version following the README.sailfishos.

Some notable details:

  • Upstream switched to meson, thus mce commit needed here a bit of adjustment on the build system side.
  • There was one strange zypp commit for removing the whole pk_backend_upgrade_system() which we were also adjusting. The comments on that seemed nonsense and a similar function got later added back in the main branch. More details on the revert commit.
  • Got rid of a bunch of cruft on the rpm packaging. Also squashed all the .spec change commits.
  • Minor adjustments on the sailfish readme
  • Changed few sailfish commits to have the "sfos:" comment style.
  • Jusa's sqlite commit was slightly different merged upstream, assumed that was the more polished version.
  • Some minor adjustments to sailfish policy commit for removing unused variable and moving another one on different place to avoid c compiler warning on declaration between code.

Not much testing so far. Maybe the thing I'd be the most cautious is if the upstream zypp backend changes are all ok. Didn't go through those with thought yet.

hughsie and others added 30 commits January 10, 2020 09:06
With much help from Martin Blanchard <tchaik@gmx.com> too, thanks to all.

https://wiki.gnome.org/Initiatives/GnomeGoals/MesonPorting
The pisi package manager is no longer used as Pardus is Debian-based now.
Mageia 6 switched to DNF backend exclusively and Mageia 5 is EOL. ROSA also
switched to rpm.org + libdnf.
Even macports doesn't carry it anymore.
This is only used in RHEL 7 which is not going to get rebased to this brand new
PackageKit branch.
This restores the original build of the GIR with  automake.
Previously aptcc would report some warnings as errors. This way,
it will drop any warning if there is no error. This matches the
behavior of python-apt.

As a bonus, we also log the entire message as a warning to the
journal.
This prevents an apparently infinite loop due to automatic
retrying. We cannot be sure whether we had a GPG error and/or
other errors, so raising an error that causes automatic
retrying is a bad idea.

This will cause PK_ERROR_ENUM_CANNOT_FETCH_SOURCES to
be emitted by the caller of the function.
Currently packagekit exits on startup when the option was specified:

packagekitd[18705]: Failed to initialize alpm: using
/etc/PackageKit/alpm.d/pacman.conf:
/etc/PackageKit/alpm.d/pacman.conf:8/etc/pacman.conf:41unrecognised
directive 'DisableDownloadTimeout'

This change adds support for DisableDownloadTimeout and fixes the error.
According to upstream doc [1], total being -1 is a signal for download
initialized. We should avoid giving unnecessary assertion failures for every
file download.

[1]
https://git.archlinux.org/pacman.git/tree/lib/libalpm/dload.c?id=e76ec94083235ddc5510ab57b7c2bc12a1d34e8a#n134
No matter whether you are using Tumbleweed or Leap, update-packages is
the place where all the action happens.
In commit e1a6975, updating is handled in update-packages whether you
are using Tumbleweed or not. So remove upgrade-system implementation.
Rather than having them run one after the other, it makes sense
to have them run independently in parallel. This also makes it
clearer in the job logs, since now each build is an independent
CI job.
Use correct function call and add missing comma.
Previously, when users are installing multiple packages at the same
time using "pkcon install", if one/some of those packages is/are already
installed, the whole installing process terminates, withouting
installing those uninstalled packages.

Fix that by ignoring those already installed pacakge and proceeding to
install those which are not yet installed.
packagekit/backends/alpm/meson.build:35:4: ERROR: Expecting rbracket got string.
packagekit/backends/alpm/meson.build:47:2: ERROR: Expecting rparen got string.
packagekit/backends/alpm/meson.build:3:0: ERROR: Tried to access unknown option "confdir".
the latest stable version of libalpm
pvuorela and others added 22 commits October 4, 2022 14:03
Upstream commit 310c944 changed this to filter based on
primary arch, but
a) it's wasn't taking into use the configured arch,
b) pkcon install -> pk_console_install_packages() uses enum_arch
by default presumably to get compatible packages for which there are
no better filters either.

Just assuming pkcon knows better so it's possible to pkcon install
i586 package for x86_64 device with i486 runtime. Like Jolla tablet.
…created to install local packages from file.
Squashed with: Move normal cache dir to /home too. JB#45137
Previously simulate would not be possible with dist-upgrade
mode. Change it so that simulate can be run unless in extended
download size mode.
Make it so upgrade kind complete with only download -flag is
identical in behavior with upgrade kind minimal.
Maintain nemo::query-size: for backwards compability.
Send size details using details signal.
With all the cache switching make sure that our cache is up to date.
Refresh is always run but without forcing the update repositories
are removed but not refreshed as autorefresh option for the repositories
is false. See zypp_refresh_cache() and comment "do as zypper does".
When first package in resolve query is special string 'ext::data:repo'
packages emitted have repository as data field always. If the package
is installed but doesn't have repository return special @System
repository.
[PackageKit] Reset update mode along with upgrade during zypp reset. Fixes JB#50165

Zypp pool is reset when the cache changes, but update mode is not reset. That causes any pending package updates to be performed on any transaction.
If it gets synced during simulations, the repo data of the old version is lost and upgradeable packages will not resolve.
Given a package that is required by other package(s), the allow_deps
argument is meant to control whether it may remove the package and
everything requiring it or fail.

The argument to zypp_perform_execution that was originally hardcoded as
TRUE is forwarded to zypp::Resolver::setForceResolve.

Handling allow_deps this way, although not ideal, is sufficient to fix
our use case and shouldn't make things worse.
This feature has been implemented on zypp backend
Added a new D-Bus API method to PackageKit: org.freedesktop.packagekit.import-pubkey
This feature has been implemented on zypp backend
Added a new D-Bus API method to PackageKit: org.freedesktop.packagekit.remove-pubkey
When querying for the size of the upgrade, the space check was running before the numbers were returned, and an error on lack of download or installation space overrode the real space check.

Move the simulation report above the error generation.
@pvuorela pvuorela requested review from jusa and abranson October 4, 2022 12:15
@Thaodan
Copy link

Thaodan commented Oct 5, 2022

Just wondering with which libzypp version the upstream tested, is our libzypp version still fine?

BuildRequires: gettext
BuildRequires: libarchive-devel
BuildRequires: fontconfig-devel
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was only needed to the gtk backend (just adding why it was removed).

Copy link

@Thaodan Thaodan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a minor comment to the spec file.

rpm/PackageKit.spec Show resolved Hide resolved
@pvuorela
Copy link
Contributor Author

pvuorela commented Oct 5, 2022

Just wondering with which libzypp version the upstream tested, is our libzypp version still fine?

Weell, the actual upstream probably didn't test any version but rather the people doing contributions so that's probably what is there on some newish opensuse. Then again the changes don't generally seem that big or related to libzypp behavior changes.

@pvuorela pvuorela merged commit 46d84f8 into master Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet