Opened 8 years ago

Closed 8 years ago

#13147 closed enhancement (fixed)

Submitting Repositories preflet and HaikuDepot change

Reported by: perelandra Owned by: waddlesplash
Priority: normal Milestone: Unscheduled
Component: Preferences Version: R1/Development
Keywords: repository pkgman HaikuDepot Cc: stippi
Blocked By: Blocking:
Platform: All

Description

I wrote a preflet for updating the repositories used by package management and am submitting it for consideration for inclusion with the Haiku image. HaikuDepot was also modified to add a menu item to open the preflet. My purpose for writing this is to make finding new software easier for new users and also provide a tool for power users to manage repository URLs. This patch is an update to my Depots preflet available here: https://perelandra0x309.github.io/depots/ I have rename it to "Repositories" to remain consistant with wording used in the package kit code, and also updated some wording in HaikuDepot to use "repository" instead of "depot". Discussion on the topic seems to suggest many are used to using the word "repository" while "depot" seems more applicable to describing the actual HaikuDepot application itself. I have made my best attempt at conforming to coding guidelines and freely give this code to Haiku for inclusion under your license.

Attachments (1)

0001-Submitting-new-preflet-Repositories-for-consideratio.patch (77.8 KB ) - added by perelandra 8 years ago.
Repositories preflet patch

Download all attachments as: .zip

Change History (21)

by perelandra, 8 years ago

Repositories preflet patch

comment:1 by perelandra, 8 years ago

patch: 01

comment:2 by michel, 8 years ago

Just for the record, I am hosting the old versions called depot on my gcc2 and x86_64 repositories temporarily. Will remove them if and when this becomes part of the distro.

comment:3 by humdinger, 8 years ago

I applied the patch locally and it works nicely, as expected. One thing that should be removed is the "?" button that shows the About window. Apps that come with the core system don't have them, as it was decided a long while ago. We'll always remember it's your work and we honour you in the AboutSystem and with a special place in our hearts. :)

in reply to:  3 comment:4 by perelandra, 8 years ago

Replying to humdinger:

I applied the patch locally and it works nicely, as expected. One thing that should be removed is the "?" button that shows the About window. Apps that come with the core system don't have them, as it was decided a long while ago.

How should we do that, do I make the change and submit a new patch?

We'll always remember it's your work and we honour you in the AboutSystem and with a special place in our hearts. :)

Somehow that sounds so morbid, like I'm about to die!

Also how does localization work with jam? I don't see a locales directory with the other preflets or apps. There must be someplace for all the translation files.

comment:5 by humdinger, 8 years ago

I think it's best if you update the patch. Maybe wait a bit longer if there's other feedback.

I just noticed, in the Jamfile you include "translation". You can remove that. It hs nothing to do with the localization kit, but with the data translations. There are B_TRANSLATION_CONTEXT defined in RepoRow.cpp and RepositorySettings.cpp which aren't needed as there are no strings to translate in them. May as well remove those too.

WRT catalogs, the "DoCatalogs" in the Jamfile tell the buildsystem to extract the strings for all the listed source files and create a catalog. Which will be trasnferred to the pootle site for translation and imported from there. In trunk you find them in haiku/data/catalogs/. I'm not sure about the exact procedure, but that's how I understand it.

comment:6 by perelandra, 8 years ago

I created a fork of haiku last night to make a working branch for myself for notification_server stuff. Can I make another branch for the new Repository stuff and be able to build haiku on each branch and keep changes from each separate? Then I can make suggested changes available for inspection on github before submitting a final patch. Sounds logical to me but I'm new to git :-)

I had heard of pootle but didn't know exactly what is was. So it is kind of a "repository" for translation catalogs?

Last edited 8 years ago by perelandra (previous) (diff)

comment:7 by humdinger, 8 years ago

That's our pootle site, if you want a looksie: http://i18n.haiku-os.org/pootle/

WRT different branching on github, I defer to others experience. I quickly mess things up when sing branches... :) As long as the final patch lands here, everything's good.

comment:8 by perelandra, 8 years ago

OK I made these changes, they are now in my fork: https://github.com/Perelandra0x309/haiku/tree/repo_preflet

Oh, the pootle system looks nice. I wish my 5 years of German could serve me better but I never got the hang of languages. Looks like you're all over that one!

I welcome any comments on my work. Here is the diff from haiku master: https://github.com/haiku/haiku/compare/master...Perelandra0x309:repo_preflet

comment:9 by pulkomandy, 8 years ago

Yes, that git branching strategy sounds fine.

comment:10 by anevilyak, 8 years ago

Cc: stippi added

comment:11 by waddlesplash, 8 years ago

Owner: changed from nobody to waddlesplash
Status: newin-progress

@perelandra: I'm going over your code now. Don't rebase your commits (yet), as it'll delete any commit comments that might get added by me (or anyone else).

(We really need a Gerrit instance...)

comment:12 by waddlesplash, 8 years ago

Done. I've left a bunch of comments, some of which are general and I didn't note all the instances of explicitly (like the one about pointer stars). Do let me know if you have any questions.

in reply to:  11 comment:13 by perelandra, 8 years ago

Replying to waddlesplash:

@perelandra: I'm going over your code now. Don't rebase your commits (yet), as it'll delete any commit comments that might get added by me (or anyone else).

Eek! Can I commit locally and push changes back up?

comment:14 by waddlesplash, 8 years ago

Yes, you can; just don't git commit --amend, {{git pull --rebase}}}, or git rebase.

Version 0, edited 8 years ago by waddlesplash (next)

comment:15 by perelandra, 8 years ago

OK I pushed a commit of all the changes I made to my branch repo_preflet.

comment:16 by perelandra, 8 years ago

One enhancement to HaikuDepot that also should be made is to have it automatically refresh the repos once changes are made in the Repositories preflet. A couple ways this could be done:

Push: Have the preflet send a message to HaikuDepot (if it is running) once a batch of changes is complete.

Watch: Have HaikuDepot watch the application roster for B_SOME_APP_QUIT messages for the preflet and then do a refresh. However if changes are made but the preflet is not closed HaikuDepot won't automatically refresh.

Watch: HaikuDepot sets up a node watcher for the repo cache files to detect any changes. This would also detect changes made via the pkgman command. Display an alert that changes were detected so the user has a chance to allow/cancel the refresh first?

Other ideas, or comments on this proposal?

Last edited 8 years ago by perelandra (previous) (diff)

comment:17 by waddlesplash, 8 years ago

The first option sounds OK; the third option sounds the most complicated to implement but also the best to me. Either way, that'd be a separate ticket from this one...

comment:18 by waddlesplash, 8 years ago

Went over your additional changes. Looks mostly good to me, a few minor fixes and then I'll merge it. :)

comment:19 by perelandra, 8 years ago

OK, done. *Fingers crossed* :-O

comment:20 by waddlesplash, 8 years ago

Resolution: fixed
Status: in-progressclosed

Merged in hrev50835. Thank you so much!

Note: See TracTickets for help on using tickets.