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

Fix service name in sampatcher.py #170

Merged
merged 2 commits into from
Mar 3, 2024

Conversation

throwaway96
Copy link
Member

It appears nobody ever used sampatcher.py (at least unmodified), since it has been using the wrong service name ever since it was first committed: tv.rootmy.hbchannel.service instead of org.webosbrew.hbchannel.service.

I'm not sure sampatcher.py (and the associated method in service.ts) really belongs in Homebrew Channel, but I'll leave that for another time.

@DavidBuchanan314
Copy link
Member

Hm yeah this is kinda vestigial code from the very early commits, I don't think it's been needed for a long time.

IIRC there are two APIs for installing packages, the "proper" way (used for apps installed thru the lg app store), and the developer mode way (which is what webos-homebrew-channel uses).

The former requires apps to be DRMed, and this patches the sam service to always pass those checks - but it's not needed for the latter method. I left it hanging around just in case we wanted to switch back (iirc the "proper" way potentially grants installed apps more privs, in certain contexts?)

Sorry this is a bit vague and off-the-cuff. Anyway, the edit looks good - it corresponds to

/**
* Stub service that emulates luna://com.webos.service.sm/license/apps/getDrmStatus
*/
type GetDrmStatusPayload = { appId: string };
service.register(
'getDrmStatus',
tryRespond(async (message) => ({
appId: (message.payload as GetDrmStatusPayload).appId,
drmType: 'NCG DRM',
installBasePath: '/media/cryptofs',
returnValue: true,
isTimeLimited: false,
})),
);
(which I believe also only exists for this reason)

@throwaway96
Copy link
Member Author

On the other hand, I've been improving support for installing in directories other than /media/developer, so this could be useful in the future.

We're not currently using it.
@throwaway96 throwaway96 merged commit 385edf9 into webosbrew:main Mar 3, 2024
1 check passed
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 this pull request may close these issues.

2 participants