Commit Graph

23 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
ce70887a57
Merge branch 'core3-devel' 2017-05-20 14:43:53 +02:00
Marek Marczykowski-Górecki
dc8047c3bb
dom0-updates: restructure the script to not update metadata twice
When `qubes-dom0-update --refresh` was called, the script checked
metadata twice - once to check updates availability, then to actually
download them. This two stage approach is needed only on Debian, when
--downloadonly option is not supported. Rearrange code accordingly.

Also, drop --doit option (ignore it), as the same (but more readable)
can be achieved with --check-only.
2017-05-20 03:49:13 +02:00
Marek Marczykowski-Górecki
a9e7f91ca6
Fix detection of dom0 updates
dnf stdout messages differ from yum. Handle this particular difference
(info about last metadata check time), but in addition properly use its
exit code - 0 means no updates, 100 means some updates.

Fixes QubesOS/qubes-issues#2096
2016-12-04 22:37:17 +01:00
Marek Marczykowski-Górecki
40d5f85b36
dom0-updates: fix cleaning downloaded packages 2016-07-15 11:27:35 +02:00
Marek Marczykowski-Górecki
9aeecb91f3
dom0-updates: use dnf --best --allowerasing
Otherwise `dnf install` do not want to upgrade existing packages, or
upgrading other packages to satisfy dependencies.

Fixes QubesOS/qubes-issues#2100
2016-06-21 04:33:46 +02:00
Marek Marczykowski-Górecki
07c442f534
dom0-updates: use dnf when available
Since yum-deprecated is slowly removed from Fedora (in Fedora 23 is not
installed by default), we're forced to migrate to dnf. The main problem
with dnf here is lack of --downloaddir option
(https://bugzilla.redhat.com/show_bug.cgi?id=1279001). As nobody is
going to implement it, simply extract downloaded packages from cache
directory (thanks to provided config file, it is always /var/cache/yum).

This basically replaces "dom0-updates: use yum-deprecated instead of dnf
in all calls" with a set of workarounds for dnf missing parts.

Related to QubesOS/qubes-issues#1574
2016-06-01 05:10:18 +02:00
Marek Marczykowski-Górecki
c4ff490844 dom0-updates: add a message explaining yum deprecated warning
Thanks @axon-qubes for the idea.

Fixes QubesOS/qubes-issues#1574
2016-01-04 02:13:21 +01:00
Marek Marczykowski-Górecki
c46c1e4d2c
dom0-updates: fix reporting when no updates are available
Check `yum check-update` exit code, instead of `grep` - when there are
multiple commands on the single line, $? contains exit code of the last
executed.

Fixes QubesOS/qubes-issues#1475
2015-12-26 04:43:23 +01:00
Marek Marczykowski-Górecki
49c7473848
dom0-updates: do not use 'yum check-update -q'
Depending on yum version, adding '-q' option may hide not only
informational messages, but also updates list. This is especially the
case for yum-deprecated in Fedora 22.
So instead of '-q' option, filter the output manually.

QubesOS/qubes-issues#1282
2015-11-11 05:22:26 +01:00
Marek Marczykowski-Górecki
85793fa31f
dom0-updates: use yum-deprecated instead of dnf in all calls
Fix for d44c8ac "dom0-updates: prefer yum-deprecated over dnf"
Because of slightly different options and config syntax, it needs to be
used in call calls, not only the one with --downloaddir option.

QubesOS/qubes-issues#1282
2015-11-11 02:36:55 +01:00
Marek Marczykowski-Górecki
d44c8acdeb
dom0-updates: prefer yum-deprecated over dnf
Some of the reasons:
 - dnf doesn't support --downloaddir option
 - dnf doesn't support `copy_local` repo option (used in automated tests
   only)
 - dnf is horribly slow, especially without cache fetched
 (https://bugzilla.redhat.com/show_bug.cgi?id=1227014)

This is all needed (instead of simply using `yum` command), because
Fedora >= 22 have an command redirection `yum`->`dnf`.

QubesOS/qubes-issues#1282
2015-11-04 00:49:06 +01:00
Marek Marczykowski-Górecki
801c5c62f1
dom0-updates: fix hostname in error message 2015-10-11 01:47:03 +02:00
Marek Marczykowski-Górecki
520178d5dc
dom0-updates: check "yum check-update" exit code, not only its output
QubesOS/qubes-issues#1168
2015-10-10 22:02:16 +02:00
Marek Marczykowski-Górecki
397f6fdc52
dom0-updates: Fix showing package list when --check-only option was used
Fixes QubesOS/qubes-issues#1294
2015-10-10 22:02:12 +02:00
Patrick Schleizer
fc013bd480 show error msg if qubes.ReceiveUpdates failed 2015-09-03 14:56:29 +00:00
Patrick Schleizer
e1e5162720 also inform in cli if no new updates are available 2015-07-19 01:59:07 +02:00
Marek Marczykowski-Górecki
3fdb67ac2b dom0-updates: make the tool working on Debian
Restore support for older yum: no --downloadonly option, so use
yumdownloader.
Also add some a code to handle some Debian quirks - especially default
rpmdb location in user home...
2015-06-16 02:22:42 +02:00
Marek Marczykowski-Górecki
d4023791a2 dom0-update: allow to specify custom yum action 2015-03-26 01:00:55 +01:00
Marek Marczykowski-Górecki
efe7612fbf dom0-updates: confirm yum transaction (yum -y)
Otherwise yum waits for confirmation, without showing the prompt.
2014-04-15 04:09:53 +02:00
Marek Marczykowski-Górecki
a4fc4822ef dom0-updates: use yum --downloadonly instead of yumdownloader
This better handles dependencies (especially of "Obsolete:" type).
Unfortunately yum install/upgrade checks if running as root. Because we
are only downloading packages, using local "system root" (--installroot
option) no real root access is requires, so use fakeroot to mute yum
error.
2014-03-28 06:52:31 +01:00
Marek Marczykowski-Górecki
4e98a28017 dom0-updates: ignore "Obsoleting" word in package list
Apparently -q option do not disable all the headers.
2014-01-10 03:35:04 +01:00
Marek Marczykowski
09050236bc The Underscores Revolution: adjust qrexec path 2013-03-14 04:29:19 +01:00
Marek Marczykowski
ecc812f350 The Underscores Revolution: filenames
Get rid of underscores in filenames, use dashes instead.
This is first part of cleanup in filenames.
"qubes_rpc" still untouched - will be in separate commit.
2013-03-14 01:07:49 +01:00