Bug 1643588 - implement dnf repoquery as a replacement for plain repoquery
Summary: implement dnf repoquery as a replacement for plain repoquery
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: beakerlib
Version: rawhide
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Jakub Heger
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-10-26 15:40 UTC by Dalibor Pospíšil
Modified: 2019-05-24 14:51 UTC (History)
5 users (show)

Fixed In Version: beakerlib-1.18-3
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1673440 (view as bug list)
Environment:
Last Closed: 2019-05-24 14:51:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Dalibor Pospíšil 2018-10-26 15:40:20 UTC
Description of problem:
Repoquery command is provided by dnf-utils package which is not installed by default.

Version-Release number of selected component (if applicable):
beakerlib-1.17-19.el8

Comment 1 Dalibor Pospíšil 2019-02-07 13:14:57 UTC
dnf-utils is not necessary as long as dnf repoquery is used.

Comment 2 Dalibor Pospíšil 2019-02-07 14:26:18 UTC
I will file separate rebase bug.

Comment 3 Pavel Raiskup 2019-02-07 14:31:01 UTC
Is there ETA for this to happen?  It is blocking Fedora CI for
rlFetchSrcForInstalled() call.  Seems like `wget` is not installed (by
default), and `curl` is underneath used for SRPM downloading, and even
though the file doesn't exist -- the 404 placeholder is downloaded.

So you can then do:

$ cat *.src.rpm
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /packages/tar/1.31/4.fc30.pr.00b1c008d5b645cd8edddaa320408ed8/src/tar-1.31-4.fc30.pr.00b1c008d5b645cd8edddaa320408ed8.src.rpm was not found on this server.</p>
</body></html>

.. following scripting mistakenly expects that if rlFetchSrcForInstalled()
did not fail, it is correctly downloaded source RPM.

https://jenkins-continuous-infra.apps.ci.centos.org/job/fedora-rawhide-pr-pipeline/813/artifact/package-tests/logs/FAIL_tar-tar-testsuite.log

Comment 4 Pavel Raiskup 2019-02-07 14:31:56 UTC
Ah, this is RHEL 8 bug.  I'll fill a Fedora one.

Comment 5 Dalibor Pospíšil 2019-02-07 14:35:12 UTC
(In reply to Pavel Raiskup from comment #4)
> Ah, this is RHEL 8 bug.  I'll fill a Fedora one.

I've switched this one.

Comment 6 Dalibor Pospíšil 2019-02-07 14:39:41 UTC
(In reply to Pavel Raiskup from comment #3)
> Is there ETA for this to happen?  It is blocking Fedora CI for
> rlFetchSrcForInstalled() call.  Seems like `wget` is not installed (by
> default), and `curl` is underneath used for SRPM downloading, and even
> though the file doesn't exist -- the 404 placeholder is downloaded.
> 
> So you can then do:
> 
> $ cat *.src.rpm
> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> <html><head>
> <title>404 Not Found</title>
> </head><body>
> <h1>Not Found</h1>
> <p>The requested URL
> /packages/tar/1.31/4.fc30.pr.00b1c008d5b645cd8edddaa320408ed8/src/tar-1.31-4.
> fc30.pr.00b1c008d5b645cd8edddaa320408ed8.src.rpm was not found on this
> server.</p>
> </body></html>
> 
> .. following scripting mistakenly expects that if rlFetchSrcForInstalled()
> did not fail, it is correctly downloaded source RPM.
> 
> https://jenkins-continuous-infra.apps.ci.centos.org/job/fedora-rawhide-pr-
> pipeline/813/artifact/package-tests/logs/FAIL_tar-tar-testsuite.log

However this look to me like a separate bug.

Comment 7 Dalibor Pospíšil 2019-02-07 14:54:50 UTC
(In reply to Dalibor Pospíšil from comment #6)
> However this look to me like a separate bug.


Actually this is probably connected problem. There's no fallback to yumdownloader because curl does not report problem with download of a 404 page.
Moreover yumdownloader is not available or at least not prefered. There's a bunch of changes which needs to be done to this area.

Comment 8 Jakub Heger 2019-02-07 15:00:04 UTC
This should be solved by adding -f option tu curl call. This option causes curl to exit with non-zero code if file is not found.

Comment 9 Pavel Raiskup 2019-02-07 15:04:24 UTC
Or by installing wget (against older beakerlib).  Both fixes are temporary
work-arounds, and I decided a little bit earlier [1].  But the new beakerlib doesn't
seem to be using curl, is that so?

[1] https://src.fedoraproject.org/tests/tar/c/1899fbe52e9a7d748f61e80dbef9f927622a62ba?branch=master

Comment 10 Dalibor Pospíšil 2019-02-07 15:09:50 UTC
(In reply to Pavel Raiskup from comment #9)
> Or by installing wget (against older beakerlib).  Both fixes are temporary
> work-arounds, and I decided a little bit earlier [1].  But the new beakerlib
> doesn't
> seem to be using curl, is that so?

Beakerlib requires wget or curl, internally it preferres wget if both are available.

Comment 11 Jakub Heger 2019-02-11 13:41:00 UTC
Should be fixed with this commit https://github.com/beakerlib/beakerlib/commit/fa2cc618949b566dd312794dc15e921dd5ee58a6

Dalibor, could you please review it?


Note You need to log in before you can comment on or make changes to this bug.