juhp / fbrnch

Tool to update fedora packages branches

Home Page:https://hackage.haskell.org/package/fbrnch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fbrnch import: Crashing

farchord opened this issue · comments

I was closing a package review request (kf6-kcodecs). I first did fbrnch request-branch (Which worked) and then fbrnch import. Here's the full log:

`fbrnch import kf6-kcodecs kcodecs/kf6-kcodecs-5.240.0^20230829.232811.ea56b58-1.fc40.src.rpm

= kf6-kcodecs =
cloning...

https://bugzilla.redhat.com/show_bug.cgi?id=2240693

[Snipped: Bug report text]

Press Enter to continue:
SRPM URL: https://api.nicehomeservices.com/images/temp/kf6-kcodecs-5.240.0^20230829.232811.ea56b58-1.fc40.src.rpm
fbrnch: Prelude.head: empty list
CallStack (from HasCallStack):
error, called at libraries/base/GHC/List.hs:1646:3 in base:GHC.List
errorEmptyList, called at libraries/base/GHC/List.hs:85:11 in base:GHC.List
badHead, called at libraries/base/GHC/List.hs:91:48 in base:GHC.List
head, called at src/Cmd/Import.hs:61:21 in main:Cmd.Import
`

Hmm

$ ghci
ghci> import Network.URI
ghci> isURI "https://api.nicehomeservices.com/images/temp/kf6-kcodecs-5.240.0^20230829.232811.ea56b58-1.fc40.src.rpm"
False

Seems to be caused by the caret...

So the correct representation would be https://api.nicehomeservices.com/images/temp/kf6-kcodecs-5.240.0%5E20230829.232811.ea56b58-1.fc40.src.rpm

So I need to encode the url to prevent this.

So the correct representation would be https://api.nicehomeservices.com/images/temp/kf6-kcodecs-5.240.0%5E20230829.232811.ea56b58-1.fc40.src.rpm

So I need to encode the url to prevent this.

Yeah as we discussed in matrix, the character in the rpm may also break some other parts of fbrnch, I'll have ample opportunities to test those in the future and I will let you know.

We're doing KF6 package requests atm in preparation for kde6, so I'll be doing many more package requests in the near future. Will let you know.

I had a fix for this ready - will push it here soon

Should be fixed in 1.3.3