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

How can I go back to original REPO https://github.com/lukesampson/scoop #4495

Closed
bfcns opened this issue Nov 4, 2021 · 17 comments

Comments

@bfcns
Copy link

bfcns commented Nov 4, 2021

I changed the repo to another one, and now I want to go back to https://github.com/lukesampson/scoop

What I did:
scoop config SCOOP_REPO https://github.com/lukesampson/scoop
scoop config SCOOP_BRANCH master
scoop update

Updating Scoop...
WARN Master branch should not be used anymore. Migrating to 'main'
Your configuration specifies to merge with the ref 'refs/heads/main'
from the remote, but no such ref was fetched.
ERROR Update failed.

What can I do to restore?

Thanks

@bfcns
Copy link
Author

bfcns commented Nov 4, 2021

Seems like just cloning the original repository to c:\Users<user>\scoop\apps\scoop\current solves the problem.

@bfcns bfcns closed this as completed Nov 4, 2021
@bfcns
Copy link
Author

bfcns commented Nov 4, 2021

It makes the installed apps vanished. Which file hold the data for installed apps?

@bfcns bfcns reopened this Nov 4, 2021
@pratikpc
Copy link
Contributor

pratikpc commented Nov 5, 2021

I changed the repo to another one

@phpcitizen which one?

@bfcns
Copy link
Author

bfcns commented Nov 5, 2021

Shovel. I had to reinstall all apps to restore.

@rashil2000
Copy link
Member

@bfcns
Copy link
Author

bfcns commented Nov 5, 2021

This should be documented in installation sections for new users.

@rashil2000
Copy link
Member

Why?

This is something that should be documented in that fork's own documentation.

The Scoop upstream is not responsible for any incompatibilities that arise as a result of people using random forks.

@bfcns
Copy link
Author

bfcns commented Nov 5, 2021

Yes, but it is your responsibility to protect your users, seems like happening very often until you realize what's really happening. Both side should inform users, and shovel should inform how to uninstall properly.

This is unethical just because you have a feud between.

@rashil2000
Copy link
Member

What feud are you talking about?

This is a community project: please refrain from making stupid accusations.

What I said is standard practice. What opensource project have you seen that takes responsibilities for any and all random modifications that a user does to their software? Show me one example.

@bfcns
Copy link
Author

bfcns commented Nov 5, 2021

If you see something like this:
https://github.com/Ash258/Scoop-Core
https://github.com/Ash258/Shovel-Ash258
https://rasa.github.io/scoop-directory/by-score.html

Someone new might think this is like an upgrade... and go for it after installing a lot of applications.

Thanks for accusing me being stupid, I just will ignore it and think it is just because your age.

@chawyehsu
Copy link
Member

@phpcitizen I assume you don't know how Open Source work. There is NO RESPONSIBILITY for the maintainers to PROTECT users that choose random forks. And it's unfair and so impolite of blaming maintainers with the word of unethical.

The license has documented:

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

Thanks to all participants in #4456, the project and the team are re-active, we all want to make the project to be better, willing to help our users to solve problems, and make a better community. But this requires kind words and friendly talks from all of us, instead of accusing or attacking.

@rashil2000
Copy link
Member

@phpcitizen You still haven't mentioned what feud you thought was happening here, but never mind, I just will ignore it and think it is just because your age.

If you see something like this: https://github.com/Ash258/Scoop-Core https://github.com/Ash258/Shovel-Ash258 https://rasa.github.io/scoop-directory/by-score.html

Someone new might think this is like an upgrade... and go for it after installing a lot of applications.

Not denying that. However, once you move away from the upstream, there's no coming back. If a new user finds the fork more interesting, then it's a fair assumption that they will report any issues they find, in that fork itself.

Thanks for chiming in @chawyehsu, I was about to quote the licensing terms myself, but you stated them much better.

@bfcns
Copy link
Author

bfcns commented Nov 5, 2021

I will not link the feud talks here, this is clearly what you want from me... none of my business.

OK, I understand of course it is not your responsibility per se, but it might have been common sense to inform this obvious your own words "Not denying that." part and save a lot of important time of other people, rather than being stubborn and not willing to see the obvious.

This all is subject to the other project/fork too.

@pratikpc
Copy link
Contributor

pratikpc commented Nov 5, 2021

Then that is a decision which is up to you. We here try our best as unpaid volunteers to update and maintain packages, manifests and update Scoop scripts themselves. The only third party components we list ever are buckets, but those are not full replacements for Scoop itself.

To protect from issues like this, author for example always makes it clear we aren't even supposed to mention Shovel here. Shovel, while being based on Scoop has taken different design decisions in quite a few cases. As a whole, this is an issue which should be discussed on the Shovel repo. Scoop is not at fault here.

Edit:- And to add to that, neither is Shovel in my opinion because their docs don't exactly mention it would be easy to go back either.

@dwettstein
Copy link

dwettstein commented Dec 13, 2021

NOTE: These commands have been run using Git Bash for Windows (scoop install git).

  1. Change back to original scoop:

    scoop config SCOOP_REPO https://github.com/lukesampson/scoop
    scoop config SCOOP_BRANCH master
    
    rm -rf "$(cygpath "$SCOOP/apps/scoop/current")"
    git clone https://github.com/lukesampson/scoop "$(cygpath "$SCOOP/apps/scoop/current")"
    
    scoop update
  2. Fix all the installed apps

    After reverting to original SCOOP_REPO value, you need to rename the following files in every folder within apps:

    • scoop-install.json to install.json

      find $(cygpath "$SCOOP/apps/") -type f -iname scoop-install.json -print -exec sh -c 'mv "{}" "$(dirname "{}")/install.json"' ';'
    • scoop-manifest.json to manifest.json

      find $(cygpath "$SCOOP/apps/") -type f -iname scoop-manifest.json -print -exec sh -c 'mv "{}" "$(dirname "{}")/manifest.json"' ';'

    This is needed as Shovel has migrated these files previously (see Install.json, manifest.json Ash258/Scoop-Core#18).

    BTW, maybe we want to consider this migration as well sometime, as the scoop- prefix clearly distinguish the Scoop files from the app's files.

@dwettstein dwettstein pinned this issue Jan 2, 2022
@JanPokorny

This comment has been minimized.

@rashil2000 rashil2000 unpinned this issue Jan 14, 2022
@leni8ec
Copy link

leni8ec commented Jun 6, 2022

@dwettstein thanks for your solution!

Based on your code, solution for PowerShell 7+.

Migrate from Shovel (Ash258) to Scoop (original)

Solution for PowerShell 7+

1. Replace the scoop app itself

# revert repo in config
scoop config SCOOP_REPO https://github.com/lukesampson/scoop
scoop config SCOOP_BRANCH master

# replace scoop itself
rm -r -force "$Env:SCOOP/apps/scoop/current"
git clone https://github.com/lukesampson/scoop "$Env:SCOOP/apps/scoop/current"

# update scoop
scoop update

2. Fix all installed apps

Rename 'scoop-install.json' and 'scoop-manifest.json' to 'install.json' and 'manifest.json'

# local apps
dir -path "$Env:SCOOP/apps/" -s -in "scoop-install.json" | ren -n { $_.Name.replace("scoop-","") }
dir -path "$Env:SCOOP/apps/" -s -in "scoop-manifest.json" | ren -n { $_.Name.replace("scoop-","") }
# global apps
dir -path "$Env:SCOOP_GLOBAL/apps/" -s -in "scoop-install.json" | ren -n { $_.Name.replace("scoop-","") }
dir -path "$Env:SCOOP_GLOBAL/apps/" -s -in "scoop-manifest.json" | ren -n { $_.Name.replace("scoop-","") }

3. Revert autocompletion module (in 'shovel' it was a built-in)

3.1. Manually remove the old entry from $profile:

Import-Module 'C:\Scoop\apps\scoop\current\supporting\completion\Scoop-Completion.psd1'

# open profile and manually remove the next entry:
# Import-Module 'C:\Scoop\apps\scoop\current\supporting\completion\Scoop-Completion.psd1'

ii $Profile

3.2 Add scoop auto-completion module by Moeologist (from bucket 'extras')

scoop install scoop-completion
Add-Content -Path $Profile -Value "`nImport-Module $env:SCOOP\modules\scoop-completion"

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

No branches or pull requests

8 participants
@dwettstein @bfcns @leni8ec @JanPokorny @chawyehsu @pratikpc @rashil2000 and others