[yast-devel] y2m use cases
hello, i've started dabbling in yast-meta (y2m), and i'm curious how much of it i can remove without stepping on anyone's toes. :) * do you use y2m? * if you don't, why? * if you do, how? * do you have multiple checkouts? how do you workaround y2m's nominal non-support for this? * do you have different subsets of repositories in different checkouts? * do you use the FAV feature? how? also: * do you have some use cases y2m does not support? what would be welcome additions? and: * do we need y2m at all? maybe a bunch of submodules or subtrees in yast-meta would work even better? -- roman -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
Hi, On 03/24/2014 06:23 PM, Roman Neuhauser wrote:
hello,
i've started dabbling in yast-meta (y2m), and i'm curious how much of it i can remove without stepping on anyone's toes. :)
* do you use y2m?
No
* if you don't, why?
For github repos cloning I have my own ruby script based on octokit gem.
* if you do, how? * do you have multiple checkouts? how do you workaround y2m's nominal non-support for this?
No multiple checkouts. But one exception: I have all yast and some opensuse repos checked out just for the goal of grepping the sources.
* do you have different subsets of repositories in different checkouts?
No
* do you use the FAV feature? how?
Never heard of it
also:
* do you have some use cases y2m does not support? what would be welcome additions?
No
and:
* do we need y2m at all? maybe a bunch of submodules or subtrees in yast-meta would work even better?
Indifferent here Thanks for asking. -- Vladimir Moravec SUSE developer -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
# vmoravec@suse.com / 2014-03-25 09:24:51 +0100:
On 03/24/2014 06:23 PM, Roman Neuhauser wrote:
* do you use y2m?
No
* if you don't, why?
For github repos cloning I have my own ruby script based on octokit gem.
nice! would you share it? -- roman -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
On Mon, 24 Mar 2014 18:23:36 +0100 Roman Neuhauser <rneuhauser@suse.cz> wrote:
hello,
i've started dabbling in yast-meta (y2m), and i'm curious how much of it i can remove without stepping on anyone's toes. :)
* do you use y2m?
yes
* if you don't, why? * if you do, how?
simple `y2m clone ALL`
* do you have multiple checkouts? how do you workaround y2m's nominal non-support for this?
Yes, I have. I solve it by changing .y2m when I need new clone as I do not use other options
* do you have different subsets of repositories in different checkouts?
no, always all
* do you use the FAV feature? how?
no as I touch almost all modules if needed and also want grep it if needed
also:
* do you have some use cases y2m does not support? what would be welcome additions?
simple use case that for each clone do `git checkout master && git pull` . Now I solving it using `for` Also I miss generic support for do this for all modules. Useful e.g. for mass changes or for mass add of maintenance branch. Also filter for dropped modules will be nice ( quite easy to recognize as it contain only README.md and something .gitignore )
and:
* do we need y2m at all? maybe a bunch of submodules or subtrees in yast-meta would work even better?
I think we discuss it and it do not bring you enough flexibility and I heard from many sides that git submodules sucks. Also it is not generic enough as I want to checkout complete yast tree and not modify yast-mass everytime we add repo. Josef -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
On Tuesday 25 March 2014 10:45:19 Josef Reidinger wrote:
i've started dabbling in yast-meta (y2m), and i'm curious how much of it i can remove without stepping on anyone's toes. :)
* do you use y2m?
Just a short note on the history of y2m: The y2m tool was created when we switched the YaST repos from SVN to git. It should help people who only knew svn by that time. It was meant to help them to get a full clone easily and to keep track of the modules they maintain (FAV feature). That was its original purpose. I guess the situation now has changed, people know git, and new use cases arise. So feel free to adapt the tool in any way.
* do you have some use cases y2m does not support? what would be welcome additions?
simple use case that for each clone do `git checkout master && git pull` . Now I solving it using `for`
Thats already possible: y2m co master ALL y2m up ALL If you want to do it in one step you could create a new y2m command. Or even better (I only had the idea, but it never made it into y2m): Make y2m a wrapper for any command, so something like this could work: y2m ALL "git checkout master && git pull" y2m FAV "echo 'Jon Doe' >> AUTHORS ; git commit -a -m 'update authors'" That would save lots of loops.
Also filter for dropped modules will be nice ( quite easy to recognize as it contain only README.md and something .gitignore )
Feel free to add it :) Ciao, Daniel -- J. Daniel Schmidt <jdsn@suse.de> SUSE LINUX Products GmbH Research & Development Maxfeldstr. 5 HRB 16746 (AG Nürnberg) D-90409 Nürnberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
# jdsn@suse.de / 2014-03-25 11:32:51 +0100:
y2m co master ALL y2m up ALL
If you want to do it in one step you could create a new y2m command.
Or even better (I only had the idea, but it never made it into y2m): Make y2m a wrapper for any command, so something like this could work:
y2m ALL "git checkout master && git pull" y2m FAV "echo 'Jon Doe' >> AUTHORS ; git commit -a -m 'update authors'"
i've been thinking about this, it's not much shorter than a for */ loop and needs quoting. :( but yeah, we may end up with such a feature. y2m FAV "echo 'Jon Doe' >> AUTHORS ; git commit -a -m 'update authors'" vs. for d in */; do echo 'Jon Doe' >> AUTHORS ; git commit -a -m 'update authors'; done that's mere 12 characters of difference. also, notice the abstraction leak ("git commit"). -- roman -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
On Fri, 28 Mar 2014 13:38:17 +0100 Roman Neuhauser <rneuhauser@suse.cz> wrote:
# jdsn@suse.de / 2014-03-25 11:32:51 +0100:
y2m co master ALL y2m up ALL
If you want to do it in one step you could create a new y2m command.
Or even better (I only had the idea, but it never made it into y2m): Make y2m a wrapper for any command, so something like this could work:
y2m ALL "git checkout master && git pull" y2m FAV "echo 'Jon Doe' >> AUTHORS ; git commit -a -m 'update authors'"
i've been thinking about this, it's not much shorter than a for */ loop and needs quoting. :( but yeah, we may end up with such a feature.
y2m FAV "echo 'Jon Doe' >> AUTHORS ; git commit -a -m 'update authors'"
vs.
for d in */; do echo 'Jon Doe' >> AUTHORS ; git commit -a -m 'update authors'; done
where is cd $d and cd - ? Josef
that's mere 12 characters of difference. also, notice the abstraction leak ("git commit").
-- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
# jreidinger@suse.cz / 2014-03-28 13:40:56 +0100:
On Fri, 28 Mar 2014 13:38:17 +0100 Roman Neuhauser <rneuhauser@suse.cz> wrote:
# jdsn@suse.de / 2014-03-25 11:32:51 +0100:
y2m co master ALL y2m up ALL
If you want to do it in one step you could create a new y2m command.
Or even better (I only had the idea, but it never made it into y2m): Make y2m a wrapper for any command, so something like this could work:
y2m ALL "git checkout master && git pull" y2m FAV "echo 'Jon Doe' >> AUTHORS ; git commit -a -m 'update authors'"
i've been thinking about this, it's not much shorter than a for */ loop and needs quoting. :( but yeah, we may end up with such a feature.
y2m FAV "echo 'Jon Doe' >> AUTHORS ; git commit -a -m 'update authors'"
vs.
for d in */; do echo 'Jon Doe' >> AUTHORS ; git commit -a -m 'update authors'; done
where is cd $d and cd - ?
oh crap, sorry for the brainfart... with the loop body wrapped in "(cd $d; " and ")" it's 21 characters. for d in */; do (cd $d; echo 'Jon Doe' >> AUTHORS ; git commit -a -m 'update authors'); done -- roman -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
On Friday 28 March 2014 13:45:10 Roman Neuhauser wrote:
where is cd $d and cd - ?
oh crap, sorry for the brainfart... with the loop body wrapped in "(cd $d; " and ")" it's 21 characters.
for d in */; do (cd $d; echo 'Jon Doe' >> AUTHORS ; git commit -a -m 'update authors'); done
It's not just the "cd" that is missing. I would assume that y2m does all the rest as well. Think of: * you add a new module name to your FAV list * then you run "y2m FAV $change_author_cmd Then I would expect that y2m notices that the new repo is missing, does the proper cloning and then executes the command. Same for the blacklist feature, that some poeple miss in y2m (opposite of FAV). I think its easier to keep this in a config file, than to always skip the unwanted modules in a "for i in *" loop. All this would be too complex for a simple for loop you need to tpye again and again. The idea was that y2m automates the repo management incl. the cloning. If such functionality is not needed, maybe y2m did its original job and became obsolete. Ciao, Daniel -- J. Daniel Schmidt <jdsn@suse.de> SUSE LINUX Products GmbH Research & Development Maxfeldstr. 5 HRB 16746 (AG Nürnberg) D-90409 Nürnberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
# jdsn@suse.de / 2014-03-28 14:03:17 +0100:
On Friday 28 March 2014 13:45:10 Roman Neuhauser wrote:
where is cd $d and cd - ?
oh crap, sorry for the brainfart... with the loop body wrapped in "(cd $d; " and ")" it's 21 characters.
for d in */; do (cd $d; echo 'Jon Doe' >> AUTHORS ; git commit -a -m 'update authors'); done
It's not just the "cd" that is missing.
i should clarify that 21 is already quite a lot. i'm in the same position with another sw project consisting of multiple standalone repositories, and the for loops are quite annoying. it's just that the alternative proposed here has never seemed too attractive either. i guess we'll get to try it out in y2m sooner or later.
I would assume that y2m does all the rest as well.
Think of: * you add a new module name to your FAV list * then you run "y2m FAV $change_author_cmd
Then I would expect that y2m notices that the new repo is missing, does the proper cloning and then executes the command.
i would expect y2m to bail out and let me resolve it. :)
Same for the blacklist feature, that some poeple miss in y2m (opposite of FAV).
what happens when the intersection of the two lists is not empty?
All this would be too complex for a simple for loop you need to tpye again and again. The idea was that y2m automates the repo management incl. the cloning. If such functionality is not needed, maybe y2m did its original job and became obsolete.
it hasn't, at least for me. ;) -- roman -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
On Friday 28 March 2014 14:34:14 Roman Neuhauser wrote:
Think of: * you add a new module name to your FAV list * then you run "y2m FAV $change_author_cmd
Then I would expect that y2m notices that the new repo is missing, does the proper cloning and then executes the command.
i would expect y2m to bail out and let me resolve it. :)
Let me put it this way: y2m should be able to do it. If it transparently does it for you could well be a configuration option. Its about choice. y2m is your (read "the YaST team's") tool, it should serve the people working on YaST. So redesign it in a way that it serves your needs.
Same for the blacklist feature, that some poeple miss in y2m (opposite of FAV).
what happens when the intersection of the two lists is not empty?
Thats up to the implementer. It was just a general idea. Implementation details can be discussed when it gets implemented. Ciao, Daniel -- J. Daniel Schmidt <jdsn@suse.de> SUSE LINUX Products GmbH Research & Development Maxfeldstr. 5 HRB 16746 (AG Nürnberg) D-90409 Nürnberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
# jdsn@suse.de / 2014-03-28 17:41:38 +0100:
On Friday 28 March 2014 14:34:14 Roman Neuhauser wrote:
Think of: * you add a new module name to your FAV list * then you run "y2m FAV $change_author_cmd
Then I would expect that y2m notices that the new repo is missing, does the proper cloning and then executes the command.
i would expect y2m to bail out and let me resolve it. :)
Let me put it this way: y2m should be able to do it. If it transparently does it for you could well be a configuration option.
Its about choice. y2m is your (read "the YaST team's") tool, it should serve the people working on YaST. So redesign it in a way that it serves your needs.
sure.
Same for the blacklist feature, that some poeple miss in y2m (opposite of FAV).
what happens when the intersection of the two lists is not empty?
Thats up to the implementer. It was just a general idea. Implementation details can be discussed when it gets implemented.
well, the implementation time is now. that's why i'm asking. -- roman -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
On Friday 28 March 2014 18:06:47 Roman Neuhauser wrote:
what happens when the intersection of the two lists is not empty?
Implementation details can be discussed when it gets implemented.
well, the implementation time is now. that's why i'm asking.
Two quick ideas: * Either let the blacklist overwrite the ALL and FAV list * or show the conflict and exit. I think they both are safe enough. Maybe you want to show a warning message in both cases. Ciao, Daniel -- J. Daniel Schmidt <jdsn@suse.de> SUSE LINUX Products GmbH Research & Development Maxfeldstr. 5 HRB 16746 (AG Nürnberg) D-90409 Nürnberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
Dne 24.3.2014 18:23, Roman Neuhauser napsal(a):
hello,
i've started dabbling in yast-meta (y2m), and i'm curious how much of it i can remove without stepping on anyone's toes. :)
* do you use y2m?
Not anymore.
* if you don't, why?
There were some bugs in the past (at the beginning) and I needed more checkouts/branches and I needed to run specific git commands.
* if you do, how? * do you have multiple checkouts? how do you workaround y2m's nominal non-support for this?
Yes, I have multiple checkouts: master and SLE11-SP3 (i.e. the latest openSUSE, the latest SLE). If I need another branch I either temporarily switch one of the checkout above or I create a copy if I need it for something not trivial. As a workaround I have my own script [1] with specific changes for each checkout/branch.
* do you have different subsets of repositories in different checkouts?
Almost the same, except that some already dropped modules are still supported in SLE11.
* do you use the FAV feature? how?
also:
* do you have some use cases y2m does not support? what would be welcome additions?
- Ignore some obsoleted repositories (some YaST modules have been dropped but we do not want to loose the history so the repos are not removed or they are still maintained in SLE11). y2m supports favorite repos, you can list which repos you want to clone/update. I'd like to have the opposite, clone/update *everything except* few listed repos. This allows ignoring the old repos and automatically cloning the newly added repos. - Run a specified command in each Git checkout - I'm actually not sure if it is supported by y2m, but sometimes I need it for mass changes in all supported repos (that's related to the previous item). The mass changes are usually global grep/sed commands, creating new branches after product release globally,... BTW Both features are supported by [1] ;-)
and:
* do we need y2m at all? maybe a bunch of submodules or subtrees in yast-meta would work even better?
I'm not sure, I just heart that there are some problems when using submodules. I actually do not know them much (never used so far), I do not know what advantages they could have for us. But for me a simple script would be sufficient I guess. Thanks for opening the discussion! [1] https://github.com/lslezak/scripts/blob/master/git/yast_sync.rb -- Best Regards Ladislav Slezák Yast Developer ------------------------------------------------------------------------ SUSE LINUX, s.r.o. e-mail: lslezak@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
# lslezak@suse.cz / 2014-03-27 14:06:18 +0100:
Dne 24.3.2014 18:23, Roman Neuhauser napsal(a):
* do you use y2m?
Not anymore.
* if you don't, why?
There were some bugs in the past (at the beginning) and I needed more checkouts/branches and I needed to run specific git commands.
good news, Y2MBASE is no more, you're expected to chdir into the top of the overall checkout. so you can have as many checkouts as you want.
* if you do, how? * do you have multiple checkouts? how do you workaround y2m's nominal non-support for this?
Yes, I have multiple checkouts: master and SLE11-SP3 (i.e. the latest openSUSE, the latest SLE). If I need another branch I either temporarily switch one of the checkout above or I create a copy if I need it for something not trivial.
SLE vs. openSUSE plus releases is a dimension i haven't considered yet, thanks for the reminder.
As a workaround I have my own script [1] with specific changes for each checkout/branch.
cool, thanks for sharing!
y2m supports favorite repos, you can list which repos you want to clone/update. I'd like to have the opposite, clone/update *everything except* few listed repos.
This allows ignoring the old repos and automatically cloning the newly added repos.
would you still need this if `y2m clone SLES11SP3` and similar existed?
- Run a specified command in each Git checkout - I'm actually not sure if it is supported by y2m, but sometimes I need it for mass changes in all supported repos (that's related to the previous item). The mass changes are usually global grep/sed commands, creating new branches after product release globally,...
yeah, y2m co -b <branch> is an obvious deficit.
BTW Both features are supported by [1] ;-)
[1] https://github.com/lslezak/scripts/blob/master/git/yast_sync.rb
thx! -- roman -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
participants (5)
-
J. Daniel Schmidt
-
Josef Reidinger
-
Ladislav Slezak
-
Roman Neuhauser
-
Vladimir Moravec