#13245: Notify HaikuDepot of de/activated repos
----------------------------------------+----------------------------
Reporter: humdinger | Owner: nobody
Type: enhancement | Status: new
Priority: normal | Milestone: Unscheduled
Component: Preferences/Repositories | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking:
Has a Patch: 0 | Platform: All
----------------------------------------+----------------------------
Comment (by perelandra):
Isn't the menu to filter by repository in HaikuDepot simpler and faster
than enabling and disabling repos in package management? That's how I
would check for packages in a specific repo.
But if you have launched Repositories from the HaikuDepot menu it would be
good to have any changes trigger a refresh. I think updating every time a
change in the Repositories preflet is made would be too much since it is a
long process. But perhaps when Repositories makes changes it could send a
message to HaikuDepot, which would then just set a flag indicating that
the repositories have changed, but not do anything yet. Then two possible
events could trigger a repository refresh in HaikuDepot.
1- Repositories quits and sends a message to HaikuDepot saying "Hey I am
quitting, HaikuDepot you can refresh now".
2- The HaikuDepot application is activated (without quitting
Repositories), when it would detect the set flag and do a refresh.
But if repo changes are instead made via pkgman nothing will happen. So
another method would be for HaikuDepot to put a monitor on the repository
cache. If HaikuDepot gets the node changed message, but it is not the
current active application (you could be in either Repositories or
Terminal making changes), it will set the flag but do nothing yet. Then
when HaikuDepot activates it checks for the flag and refreshes
repositories if needed. This sounds more inclusive to anything that would
do repo adds or drops and be future proof.
So this would need:
HaikuDepot adding a node monitor(s) on repo cache
HaikuDepot catches node changed messages, sets a flag
HaikuDepot adds flag check in AppActivated and refreshes repos if flag is
on
Repositories preflet sends message to HaikuDepot (if running) when it
quits. (without this HaikuDepot would still do a refresh when it is
activated, but triggering it this way will start the process a bit sooner,
maybe)
An important question though would be, is this automatic refreshing
expected by the user, or would it be confusing? Could it interrupt
anything the user was doing (download/installing), reset current search
parameters, do anything else that would make the user say "What are you
doing, I was in the middle of doing X and now it changed on me!!!" ?
Sometimes manual and simple processes are better because you triggered it
so you expect it to happen. I have a recent somewhat related experience.
We just moved to Microsoft Intune on our work phones to get email. It has
this new "feature" called a "Focused Inbox" that tries to be smart and
filters out emails it does not think are as important as others, and
collapses emails into conversions. I didn't realize it was enabled when I
first setup their phones and they would come back to me all confused
because they weren't getting email on their phone that they were getting
on their computer. Well it was this "smart" feature that automatically
rearranged their emails on them. They don't like it and want it turned
off because they don't see their email in the order it comes in. OK, they
are just used to the old way, but they point is they were confused by the
email program doing stuff automatically on them without being clear about
what it was doing. It was too much of a hassle so they just want that
feature off. So just be careful what "automatic" features we implement.
--
Ticket URL: <https://dev.haiku-os.org/ticket/13245#comment:2>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.