Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scoop doesn't extract .tar.* archives fully #3080

Closed
Calinou opened this issue Feb 5, 2019 · 4 comments · Fixed by #3399
Closed

Scoop doesn't extract .tar.* archives fully #3080

Calinou opened this issue Feb 5, 2019 · 4 comments · Fixed by #3399

Comments

@Calinou
Copy link
Contributor

Calinou commented Feb 5, 2019

If one writes an URL to a .tar.* archive (such as .tar.gz) in a manifest's url field, Scoop will download it but will only extract it to an xa-tmp.tar file. To fix this, 7-zip needs to be called twice on those files, so that the .tar is unpacked to its actual data.

@asmgf
Copy link
Contributor

asmgf commented Feb 10, 2019

@Calinou, it seems that extraction should work.

Double extraction logic is already there: https://github.com/lukesampson/scoop/blob/2224da82f8a786b8ae9c203c67924b4c6ef2c652/lib/decompress.ps1#L24-L28

There are also a few manifests that point to .tar.gz archive, for example up: https://github.com/lukesampson/scoop/blob/a2fed1855865d3d2d8f0eb6564c52163db650177/bucket/up.json#L7
I tried running scoop install up and it worked fine for me.

@Ash258
Copy link
Contributor

Ash258 commented Mar 14, 2019

@Calinou Is it OK or is some fix needed?

@Calinou
Copy link
Contributor Author

Calinou commented Mar 14, 2019

I tried updating Scoop but can still reproduce the issue. This is the manifest I'm trying it with:

{
    "homepage": "https://sourceforge.net/projects/freecs-1-5/",
    "description": "Free software reimplementation of Counter-Strike 1.5 running on FTEQW",
    "version": "2019-01-16",
    "license": "GPL-2.0-or-later",
    "url": [
        "https://downloads.sourceforge.net/project/freecs-1-5/freecs-bin-2019-01-16.tar.gz",
        "https://downloads.sourceforge.net/project/freecs-1-5/cstrike-1.5-content.tar.gz"
    ],
    "hash": [
        "34c48ef1b300a811ebf19b975be6b43c6bb2182f780bd0718b1b1ce93ca3600b",
        "71929123b9e823ca7702f5a8c9cb53db3ac5e889785b56f53343278d14def81d"
    ],
    "notes": [
        "Optional but recommended: To avoid missing assets, place an Half-Life installation's \"valve\" folder in:",
        "",
        "\t$persist_dir\\"
    ]
}

Console log:

Installing 'freecs' (2019-01-16) [64bit]
Loading freecs-bin-2019-01-16.tar.gz from cache
Checking hash of freecs-bin-2019-01-16.tar.gz ... ok.
Loading cstrike-1.5-content.tar.gz from cache
Checking hash of cstrike-1.5-content.tar.gz ... ok.
Extracting freecs-bin-2019-01-16.tar.gz ... done.
Extracting cstrike-1.5-content.tar.gz ... done.
Linking ~\scoop\apps\freecs\current => ~\scoop\apps\freecs\2019-01-16
'freecs' (2019-01-16) was installed successfully!
Notes
-----
Optional but recommended: To avoid missing assets, place an Half-Life installation's "valve" folder in:

        C:\Users\Hugo\scoop\persist\freecs\

Those are files I can see in the app directory after installing (the file size matches the second file in the url array):

Explorer file view

@niheaven
Copy link
Member

This is due to this .tar.gz has a diferrent name in inner .tar, and is fixed in #3204 079c4a5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants