getsolus / solbuild

The Solus package build system
https://getsol.us
Apache License 2.0
21 stars 12 forks source link

Allow for renaming of simple source files #22

Closed JacekJagosz closed 2 years ago

JacekJagosz commented 2 years ago

This is meant to go with https://github.com/getsolus/ypkg/pull/29 With this patch it is now downloading the source with the filename specified by #newFileName put at the end of the file, and it is correctly exposing it to container. Turns out when I build solbuilt it didn't use the update ypkg. So both patches are fine.

JacekJagosz commented 2 years ago

Finally tested it with patched ypkg, works just fine.

joebonrichie commented 2 years ago

Looks okay to me, i'll test it a bit locally before merging it.

joebonrichie commented 2 years ago

Tested it and looking okay.

Only minor issue I've noted was if you download a source then change it to use a URI fragment it'll redownload and be saved twice on disk.

ls /var/lib/solbuild/sources/77984854bfe00f938353fe4c7604d09967eaf5c609d05f1e6423d3c3dea86e61/
hipamd.tar.gz  rocm-5.1.0.tar.gz

As peeps have to periodically delete the cache relatively often, it's probably okay.

JacekJagosz commented 2 years ago

When I was checking, I saw that url doesn't need to ignore the uri fragment like I made it do with this change: URI: uriObj.String(),, but it also works the way it used to, with full URL: URI: uri,. But I decided that it is better to pass the stripped url instead of the full one with the fragment. What do you think, is the change I made ok, or should I go back?

JacekJagosz commented 2 years ago

Thank you so much!