gobolinux / Scripts

The GoboLinux scripts collection
41 stars 9 forks source link

MakeRecipe: small suggestion for a change (hopefully does not take much time) #38

Open rubyFeedback opened 4 years ago

rubyFeedback commented 4 years ago

Hey there GoboFolks,

I am trying to use a second computer with GoboLinux; a slightly older one but it is working fine (and UEFI etc... does not annoy me on that computer; has a simpler harddisc so it really gives me less problems. Strange how older hardware works better there ... but I digress).

When trying to do MakeRecipe, I noticed one thing that could perhaps be improved.

If you give the URL, it seems as if MakeRecipe insists that there must be a local tarball with the same ending. So for example, http://curl.haxx.se/download/curl-7.72.0.tar.bz2 and MakeRecipe will look at a file called curl-7.72.0.tar.bz2.

Personally I have all these archives available locally anyway, but I am using the .tar.xz format. Mostly because this is more efficient IMO in regards to file size.

MakeRecipe will show a failure message if it can not find a local file in the main archive ( /Data/ ... somewhere ... Archive ... I forgot the path as I write this on my main computer right now sorry, but I think you know the path ... where all the Archives are assumed to be, for MakeRecipe to work, and perhaps also Compile).

So rather than failing early, I propose that MakeRecipe would first also check whether a file called curl-7.72.0.tar.xz exists, and perhaps also a file called curl-7.72.0.tar.gz.

If MakeRecipe only works with the specified tarball format, then I propose that IF such a tarball is found (for example, .tar.xz), it be automatically repackaged into the target format (such as .tar.bz2 in this case, or .tar.gz). That way the user can avoid one manual step.

It is no big deal because I can do so manually (creating the .tar.bz2 archive for example), or will script it anyway via ruby (which I will probably do :) ) - but I thought it may be a good idea for people e. g. to encourage them to contribute recipes, get involved and so on. I think that is important to climb up with involvement.

(And on another side note, perhaps there could be something like the old recipe viewer; I know github somewhat works for that, but the old online viewer was more elegant IMO. The old one was e. g. at http://recipes.gobolinux.org/r/ whereas this is now a redirect to github, which I can understand, but github is not as convenient as the old variant was, IMO. I understand this from a maintainability point of view though. I guess the old script was a .php file? Would be cool if that could be re-used.)

mwh commented 4 years ago

Could you clarify what you want here? It sounds like you want MakeRecipe to work without downloading the file from the URL if you have it in another format already, and you don't want to change the recipe to use the .xz URL either, but the one at the specified URL is the one that actually matters for the checksum. Is that what you mean, or something else?