[Slackbuilds-users] Content Disposition part 2

Dave Woodfall dave at slackbuilds.org
Sat Apr 30 20:09:16 UTC 2022


On 30/04/22 12:17,
Andrew Payne <phalange at komputermatrix.com> put forth the proposition:
> Hi all, revisiting the Github tarball 'content disposition' problem.
> While manually tweaking the tarball url to
> https://github.com/DEVELOPER/PRGNAM/archive/refs/tags/vVERSION/PRGNAM-VERSION.tar.gz
> works, I have a case where the devs use underscores instead of dots and I
> cannot seem to get a workable url with the above.
> The result is that using wget or in my case python's urllib.request I get
> a truncated tarball name, whereas downloading with firefox will retrieve
> the full name.
> Before I dive into how to manually fix the url or fool with content
> disposition, what about using some variant of this in the slackbuild:


> tar xvf $CWD/$SRCNAM-$VERSION.tar.gz || tar xvf $CWD/$VERSION.tar.gz

I mentioned using this as a last resort but if you can let us know
the link to the repo we could take a look.

> This means I can copy paste the Github tarball url into the *.info file,
> and it matters not how the user downloads it.
> Thoughts?

I have one that uses underscores in the tag - libxlswriter:

https://github.com/jmcnamara/libxlsxwriter/archive/RELEASE_1.0.2/libxlsxwriter-RELEASE_1.0.2.tar.gz

With that I use:

tar xvf $CWD/$PRGNAM-RELEASE_$VERSION.tar.gz

I should add that there are also files that are added manually by the
developer as `assets' in Github-speak, that are extra to the
automatic tag releases and can be named any way the developer likes.

--
Dave

sbo-maintainer-tools:
https://slackbuilds.org/repository/15.0/system/sbo-maintainer-tools/
SBo templates:
https://slackbuilds.org/templates/


More information about the SlackBuilds-users mailing list