1. 17 Feb, 2020 5 commits
    • Karel Koci's avatar
      src/update_alternatives.sh: move and add help · 1316af20
      Karel Koci authored
      This is now general script that user can use to fix links in its system.
    • Karel Koci's avatar
    • Karel Koci's avatar
      lib: add support for Alternatives · d4964865
      Karel Koci authored
      Moving hook to updater itself mitigates problem when alternatives links
      were not applied during updater run.
      This implementation has one huge drawback and that is that it is not
      checking for file collisions. On the other hand script used up to now
      wasn't checking for them either.
    • Karel Koci's avatar
      tests/system: add system tests for request conditions · 1fa1a698
      Karel Koci authored
      This adds two new tests that are checking if we are correctly handling
      request conditions.
    • Karel Koci's avatar
      lib: allow requests to be conditioned · ae54338b
      Karel Koci authored
      This adds new extra "condition" to Install and Uninstall requests. Those
      are intended to solve problem of cyclic dependencies if we have package
      that extends some other but such dependency has to be patched to that
      package and commonly extending package should rather depend on package
      it extends not other way around.
      Doing it this way allows us to do magic such as that user configures
      updater to track specific languages and exact packages are installed
      depending on other requested packages.
      This behavior can't be solved any other way cleanly because extending
      package depends on package itself. If we do it so that if given package
      is installed that we request extending package then we end up with
      package lock. Package is never removed even if it is no longer required
      unless explicitly uninstalled.
  2. 29 Jan, 2020 3 commits
  3. 28 Jan, 2020 1 commit
    • Karel Koci's avatar
      tests/membench: add new bench to test with a lot of files · 00b231ac
      Karel Koci authored
      I has suspicion that we might be consuming too much memory if we have
      load of files but this doesn't seems to be the case. Let's add membench
      for it anyway.
      This also fixes membench as updater now preferably reads not-compressed
  4. 20 Jan, 2020 6 commits
    • Karel Koci's avatar
      docs/language: fix some indentations · 6d4bcc5c
      Karel Koci authored
    • Karel Koci's avatar
      tests/system: add test that virtual packages are removed from system · 89d7c672
      Karel Koci authored
      This check behavior of package marked as virtual. We have candidate for
      it and it is installed but updater should remove it from system because
      it is considered fulfilled without candidate.
    • Karel Koci's avatar
      Make virtual packages just fulfilled automatically · 4fed67d0
      Karel Koci authored
      This changes behavior of virtual for packages. With this implementation
      virtual packages no longer produce error when there is existing package.
      It instead just ignores those packages.
      The change from original behavior on top of just not throwing error is
      that provides for virtual package are not considered at all.
      This technically standardizes behavior to state where virtual package is
      just considered as fulfilled without any candidate and no candidate is
      installed for it. You can mark any package as virtual to have it
      considered by updater as installed. This skips all candidates (including
      their dependencies) and only dependencies introduced from updater's
      configuration are required.
      This adds new feature symbol reported to user: no_error_virtual
      The reason is to differenciate between updater versions before and after
      this change to virtual behavior.
    • Karel Koci's avatar
    • Karel Koci's avatar
      tests/postprocess: modify test_pkg_merge to check multi depends/provides · a518a5ab
      Karel Koci authored
      There was a mistake in parsing of Provides field when there was more
      than one field. There was not test to check for this.
      This commit modifies existing generic test to also check this case. It
      just adds multi-dependency and multi-provide to first package.
    • Karel Koci's avatar
      lib/autoload/postprocess: replace invalid tab with space · ddaa615e
      Karel Koci authored
      The Provides argument had tab instead of space in regexp and that caused
      space to be considered as part of package name. This effectively created
      new package with space prepended to name.
  5. 14 Jan, 2020 1 commit
  6. 03 Dec, 2019 1 commit
    • Karel Koci's avatar
      lib: drop possibility to embed busybox · 84956460
      Karel Koci authored
      We do not need this. This was originally introduced to ensure that
      updater on its own can run and update system that is pretty much broken.
      The problem is that on such system we fail to run as well. Busybox has
      subset of our dependencies and when we are able to run then busybox
      binary is able to do that as well. We can also update busybox as part of
      our dependencies same as for example libc and there is no gain in not
      doing that.
      This also had a problem that we were fixed on /tmp usage. Any package
      could potentially cause remount of /tmp or could remove content of it
      and updater would no longer work. That means that this was making
      updater potentially more unstable compared to using system busybox.
  7. 26 Nov, 2019 1 commit
    • Karel Koci's avatar
      lib/autoload/postprocess: do not consider provides of same name · c6ad5264
      Karel Koci authored
      This warns and ignores provides for packages of same name. The reason is
      that otherwise we would add copy of package candidates to list of
      candidates making it appear twice. The result together with dependency
      resolution is that this candidate would conflict with itself and
      couldn't be installed at all with updater.
  8. 06 Nov, 2019 5 commits
  9. 04 Sep, 2019 1 commit
    • Karel Koci's avatar
      pkgupdate: create links to alternatives in correct path · 8467e68f
      Karel Koci authored
      The previous fix correctly changed source of alternatives but it was
      still trying to create link in invalid location (ignoring configured
      root). This adds this path in appropriate location.
      Note that TRG is an absolute path so there does not have to be any slash
      between ROOT_DIR and TRG.
  10. 26 Aug, 2019 2 commits
    • Karel Koci's avatar
      pkgupdate: do not create reboot notification for non-root system · 2166034b
      Karel Koci authored
      This skips content of create-notification reboot_required hook in case
      if path to system is not /. Only currently running system should raise
      reboot_required request.
    • Karel Koci's avatar
      pkgupdate: update alternatives hook fix to use ROOT_DIR · bfd4acf3
      Karel Koci authored
      This fixes problem where alternatives were not correctly created in
      system run in non-root mode. This was because as source the global path
      was used but in places like build system this path is invalid. We have
      those files but relative to ROOT_DIR path. This fixes that.
      This also just fixes small shell syntax problem where paths were no
  11. 15 Jun, 2019 1 commit
  12. 06 Jun, 2019 1 commit
    • Karel Koci's avatar
      lib: move prerm to be run before postinst in transaction · 0ecb39fc
      Karel Koci authored
      This moves execution of prerm script from pkg_scripts step to pkg_move
      step. This effectivelly means that prerm and preinst scripts are run in
      plan order at the same time. This solves problems where prerm disables
      service or in general does operation which revers one done previous
      There are two consideration required. This code defines content of
      journal. The difference is that instead of editing all_configs table in
      pkg_scripts we generate it in its fullest in pkg_move. That is all right
      and fully compatible. The more problematic case is when we update from
      previous version of updater and there is journal stuck with completed
      pkg_move step but not yet completed pkg_scripts step. The result is that
      in such case prerm scripts are not run and packages are not in reality
      removed (removed from state). The real removal happens with next updater
      execution. So this is self healing problem that happens only with small
      This also does one degradation in behavior. Previously we were ignoring
      removal operation for packages that were intended to be installed. In
      that case we just skipped remove section. The problem is that pkg_move
      does not have to_install argument and that makes it impossible to check
      if operation tries to remove package that is installed by some other
      one. The effect of such operation in this new implementation is that we
      would run in such case prerm script and removed given package info from
      status while preserved its files in system. That is worst case scenario.
      Other case where install request comes after remove request returns
      given info to state and runs preinst. That effectively just causes us to
      run both prerm and preinst where it should have been reinstall. That
      effectively should not cause anything bad.
      The real reason why we do not care too much is that only case when
      something like that happens is when pkgtransaction is used. pkgupdate
      never generates two operations for same package. Because pkgtransaction
      is dangerous tool in general I don't see it as huge problem.
      Other option is to pass to_install table to pkg_move as well but we
      would have to take care of situation where this field is not part of
  13. 09 Apr, 2019 6 commits
    • Karel Koci's avatar
      pkgupdate: fix --no-reboot causing reboot · 8089fc51
      Karel Koci authored
      In rewrite to argp the --no-reboot and --reboot-required options were
      mangled together and that meant that reboot was happening always when
      reboot was disabled. How unfortunate.
    • Karel Koci's avatar
      pkgupdate: configs: fix obsolete syntax · b9ac3ebd
      Karel Koci authored
    • Karel Koci's avatar
      gitignore: drop unnecessary ignore rules · ffab22fa
      Karel Koci authored
      We no longer use python in this repository and CRL is no longer tested
      so neither downloaded.
    • Karel Koci's avatar
      uri: make threads conditional · c09470a5
      Karel Koci authored
      We do not need error variables to be thread_local but it would be good
      to set them so. The problem is that some libc implementations with C11
      support do not provide this header. We can check for that and for now
      just ignore given option. This means that we provide it in case of
      existing threads.h and ignore it in other case.
    • Karel Koci's avatar
      openssl_purity: simplify makefile · ce8d8ba0
      Karel Koci authored
      This just refactors original openssl_purity.mk.
      Also note that this might no longer be required. From OpenSSL 1.1.0 it
      seems that problems with valgrind were fixed and this might meant that
      we can drop this. We don't want to do that now because OpenSSL 1.0.0
      only systems might still exists but we can do it in future.
    • Karel Koci's avatar
      libupdater: build newer version of uriparser · f5fdb85b
      Karel Koci authored
      This builds uriparser if system provides older version then required.
      This is pretty simple hack but hack non the less.
  14. 08 Apr, 2019 6 commits