add missing argument for format string
fedup.spec: move 0.7.x cachedir to new name

This saves people the trouble of redownloading stuff if they update to
0.8.x during an upgrade.

Also, update the changelog and bump the version to 0.8.1 (coming soon..ish)
upgrade-prep: don't activate autofs mounts

If we test for /proc/sys/fs/binfmt_misc/.please-unmount, systemd will
automount /proc/sys/fs/binfmt_misc. We don't really want that, so skip
any autofs entries we find.
generator: bail out correctly if $2 is empty

[ -d ] evaluates to true? Oh bash, you are the living end.
fix upgrade startup when packagedir isn't on root (#1045168)

When the generators run, we haven't mounted anything yet. So if
/system-upgrade points to something that isn't on the root or /usr
partition, the [ -d /system-upgrade ] test will fail, and the upgrade
won't start.

We don't need to check it here anyway - upgrade-prep.sh will do sanity
checks to make sure everything we need is actually mounted.
fix traceback for transaction problems with one package (#1047005)

It's possible that pkg2 will be None here, so we need to handle that
case without crashing.
fedup.spec: make sure we have the required systemd version

system-upgrade-generator requires systemd v183 or higher, so make sure
we have a new enough systemd.

This will make fedup 0.8.x unable to install on F17, which is fine since
it doesn't currently work there.
Add version to fedup log message

This requires fedup to know what version it is, so add version.py.. and
for the sake of simplicity, add a 'make version' target that will write
the version in the Makefile into the places it needs to go when we bump
the version.
Fix fedup version logging

Commit 65f8f5f added fedup.version and wrote it into the log, but the
imports were a little screwy. Make sure we actually import the right
stuff.
Fix ValueError with --addrepo/--repo REPOID (#1045090)

We need to be sure that the argument to --addrepo is actually of the
form "REPOID=[@]URL", or we end up with a ValueError when we try to
split it into two parts later on. So let's check that early.

Also, the --repo argument was deprecated and hidden, and it's now
causing confusion with --instrepo, so drop it.
Fix traceback with '--iso <UNMOUNTABLE>' (#1044083)

There's no 'message' function in fedup.commandline.

So: make device_setup return the mountpoint of the device - unless the
mount fails, in which case it returns None. In that case we can print
the message and exit cleanly from the main script, like most other
errors.

Bonus: remove a gratuitous umount attempt (it happens automatically
thanks to atexit)
Add hidden --logtraceback option

This will force fedup to log the traceback for any exception, including
KeyboardInterrupt and TransactionError.
Fix "no update for PKG" message for installonly pkgs

Normally we figure out what packages are being updated by looking at the
"remove" items in the RPM transaction: everything that has an update
will have a corresponding "remove" item.

Except if we're installing a new package alongside the existing one
(e.g. new kernels). The kernel package has an update, but there's no
"remove" item.

To fix that, we can also look at the list of pure "install" items - if
we're going to install a new version of this package, then this package
has an update.
Drop reference to /run/initramfs/upgrade.conf

For some reason upgrade-switch-root.target was looking for upgrade.conf.
This is silly, since we don't create it anymore.
Fix --network VERSION if /etc/debian_release exists (#1057817)

It turns out that platform.linux_distribution() will return the Debian
release version string rather than the Fedora one if /etc/debian_release
exists.

Since fedup is designed for Fedora (and its derivatives), only check the
release files for Fedora (and its derivatives).
Warn the user if upgrade contains no kernels

Various problems can arise if the upgrade contains no kernels, since we
don't build a new initramfs. (Normally we should get a new kernel with
the upgrade but sometimes there's upgrade path problems.)

So: check the upgrade transaction for any package that matches the list
of kernel package names, and warn the user if there's nothing there.

(Yes, in theory we could look through the rpmdb and force-install a
kernel package from the new distribution, but this violates the "no
special cases for packages" principle.)
Treat --network VERSION argument as a float

There are some Fedora-derived distros that use floats for version
numbers (e.g. RHEL 6.5), so we should allow versions to be floats.

As far as I can tell, the last non-float version number in a Red Hat
release was the RHL 9.0.x beta, in 2003.
Fix sudden exit when resizing terminal (#1044987)

So fedup.terminal installed a SIGWINCH handler so that it could update
the terminal size whenever the terminal was changed, rather than polling
to see if the size changed.

If the SIGWINCH happens when we're in select.epoll.poll(), it raises
IOError with errno=4 (EINTR, interrupted system call). The expected
behavior is to simply resume the poll after handling the interrupt.

Unfortunately yum/urlgrabber are kind of stupid about interrupted system
calls, and raise KeyboardError no matter what IOError was raised, which
makes resizing your terminal window work the same as hitting Ctrl-C.

This patch makes us use the same polling mechanism as urlgrabber. Dumb,
but at least we don't silently quit on window resize. And I do love a
patch that removes a file.
tiny formatting fix
Require yum (#1071625)

Until I get around to porting to dnf, fedup is gonna trace back if you
don't have yum installed.. so make sure it's installed.