Fix#466
See #363
Actually, it still doesn't work completely but this particular issue
is fixed. I am now getting:
Auto-installing packages:
sudo dnf install -y /tmp/tito/noarch/tito-0.6.24-1.git.0.2a15b8c.fc39.noarch.rpm
...
Failed to resolve the transaction:
Problem: problem with installed package
- cannot install both tito-0.6.24-1.git.0.2a15b8c.fc39.noarch and tito-0.6.24-2.fc39.noarch
- conflicting requests
Which seems to be fixed in the dnf5 main branch:
https://github.com/rpm-software-management/dnf5/issues/722
This is bit of archeology.
Tito was a plush toy and mascot of Red Hat Network (RHN)_team.
Later when we opensourced Satellite as the Spacewalk project
we created this project. And by that time Tito was already missing
for some time. So in honor of our mascot we decided to name this
project Tito.
The %{?our_sitelib} seems weird right after the if-else tree, I'm a bit
afraid of the order of macro evaluation. NB the 'print "foo"' used in
the corresponding detection command is needed only useful in very old
distributions.
Closes: #437
With @xsuchy we discovered that when doing `tito release`, into Fedora
DistGit, then .patch files are being uploaded to the lookaside
cache. That is not expected behavior, we should commit them to git
only.
I don't remember if the `encoding="utf-8"` parameter for `open` is
necessary in this case but I think I added it for a reason. Let's be
safe and not remove it. Instead let's use `io.open` which supports it
even in python 2.
Previously only 'tito build --srpm|--rpm' worked well with fetch_sources
where we rely on RPM's (rpmbuild) built-in download mechanism. It did
not work well with 'tito release' and DistGit releasers, though.
The thing is that we don't use rpmbuild at all while doing DistGit
releases BUT we still want those files to be (a) downloaded to
%_sourcedir and then (b) uploaded to DistGit lookaside cache. Because
we did not download those files before, every extra source file was
entirely ignored, or even worse, if the file was already uploaded in
the target lookaside cache, the file was removed from sources.
This issue has bitten us during the 'copr-backend' releases several
times before, and now it starts also in 'resalloc-aws' releases.
Unfortunately for this fix, we don't read/use the "buildconfig" options
while instantiating Builder objects from Releaser classes, therefore
I had to add an explicit read for the 'fetch_sources' config.
Closes: PR#420
Relates: #407
I uploaded tito to PyPI, see https://pypi.org/project/tito/
and it says that
> The author of this package has not provided a project description
This should fix it.