All of lore.kernel.org
 help / color / mirror / Atom feed
* [master][PATCH] standard.py: Provide an additional option for devtool reset
@ 2019-02-08  1:57 Sai Hari Chandana Kalluri
  2019-03-04 20:17 ` Paul Eggleton
  0 siblings, 1 reply; 10+ messages in thread
From: Sai Hari Chandana Kalluri @ 2019-02-08  1:57 UTC (permalink / raw)
  To: openembedded-core; +Cc: Sai Hari Chandana Kalluri

The devtool reset command cleans the sysroot for a recipe in workspace.
It also removes the append file but leaves the source code as in
workspace. The source is not cleaned intentionally and the user has to
manually remove it before calling devtool modify again.

Provide the user with an option to remove the source code from workspace
by adding a flag to the devtool reset command. The --rm-source option for
the devtool reset command will also clean the source code from the
workspace along with the sysroot and the append file.
Ex: devtool reset --rm-source zip or devtool reset -r zip

Signed-off-by: Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com>
---
 scripts/lib/devtool/standard.py | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index b7d4d47..e3bb0d1 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -1751,7 +1751,7 @@ def status(args, config, basepath, workspace):
     return 0
 
 
-def _reset(recipes, no_clean, config, basepath, workspace):
+def _reset(recipes, no_clean, rm_source, config, basepath, workspace):
     """Reset one or more recipes"""
     import oe.path
 
@@ -1828,11 +1828,14 @@ def _reset(recipes, no_clean, config, basepath, workspace):
 
         srctreebase = workspace[pn]['srctreebase']
         if os.path.isdir(srctreebase):
-            if os.listdir(srctreebase):
+            if os.listdir(srctreebase) and not rm_source:
                 # We don't want to risk wiping out any work in progress
                 logger.info('Leaving source tree %s as-is; if you no '
                             'longer need it then please delete it manually'
                             % srctreebase)
+            elif rm_source:
+                 logger.info('Cleaning source tree from workspace ')
+                 shutil.rmtree(srctreebase)
             else:
                 # This is unlikely, but if it's empty we can just remove it
                 os.rmdir(srctreebase)
@@ -1856,7 +1859,7 @@ def reset(args, config, basepath, workspace):
     else:
         recipes = args.recipename
 
-    _reset(recipes, args.no_clean, config, basepath, workspace)
+    _reset(recipes, args.no_clean, args.rm_source, config, basepath, workspace)
 
     return 0
 
@@ -2157,6 +2160,7 @@ def register_commands(subparsers, context):
     parser_reset.add_argument('recipename', nargs='*', help='Recipe to reset')
     parser_reset.add_argument('--all', '-a', action="store_true", help='Reset all recipes (clear workspace)')
     parser_reset.add_argument('--no-clean', '-n', action="store_true", help='Don\'t clean the sysroot to remove recipe output')
+    parser_reset.add_argument('--rm-source', '-r', action="store_true", help='Remove source code from the workspace')
     parser_reset.set_defaults(func=reset)
 
     parser_finish = subparsers.add_parser('finish', help='Finish working on a recipe in your workspace',
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [master][PATCH] standard.py: Provide an additional option for devtool reset
  2019-02-08  1:57 [master][PATCH] standard.py: Provide an additional option for devtool reset Sai Hari Chandana Kalluri
@ 2019-03-04 20:17 ` Paul Eggleton
  2019-03-04 23:27   ` Manjukumar Harthikote Matha
  2019-03-11 21:23   ` Chandana Kalluri
  0 siblings, 2 replies; 10+ messages in thread
From: Paul Eggleton @ 2019-03-04 20:17 UTC (permalink / raw)
  To: openembedded-core, Sai Hari Chandana Kalluri

On Friday, 8 February 2019 2:57:32 PM NZDT Sai Hari Chandana Kalluri wrote:
> The devtool reset command cleans the sysroot for a recipe in workspace.
> It also removes the append file but leaves the source code as in
> workspace. The source is not cleaned intentionally and the user has to
> manually remove it before calling devtool modify again.
> 
> Provide the user with an option to remove the source code from workspace
> by adding a flag to the devtool reset command. The --rm-source option for
> the devtool reset command will also clean the source code from the
> workspace along with the sysroot and the append file.
> Ex: devtool reset --rm-source zip or devtool reset -r zip

When I wrote this I made a conscious decision not to delete the source, in 
case the user has unsaved work in the source tree; at least then the user has 
to take an explicit step (an additional rm -rf) in order to delete it. You 
might argue that adding an option is the same as that explicit step, but I am 
still hesitant as you might for example pick a previously used command from 
your command history with -r in it and only realise after you've run it that 
you've just blown away a bunch of your work.

However, I have received the feedback from a number of people that they find 
it annoying that they have to delete the source themselves before being able 
to run devtool on the recipe again. I'd like to hear from the wider community 
on the following two questions:

1) Does the convenience of having this kind of option outweigh the potential 
danger of deleting unsaved work?

2) Are there issues that anyone is experiencing that force you to run devtool 
clean/finish and then re-run devtool modify (or add, or upgrade), making this 
kind of situation come up more frequently? Or is it mostly that the source 
directories end up being left around to stumble over some time later?

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [master][PATCH] standard.py: Provide an additional option for devtool reset
  2019-03-04 20:17 ` Paul Eggleton
@ 2019-03-04 23:27   ` Manjukumar Harthikote Matha
  2019-08-08 20:17     ` Manjukumar Harthikote Matha
  2019-03-11 21:23   ` Chandana Kalluri
  1 sibling, 1 reply; 10+ messages in thread
From: Manjukumar Harthikote Matha @ 2019-03-04 23:27 UTC (permalink / raw)
  To: Paul Eggleton, openembedded-core, Chandana Kalluri

Hi Paul,

> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org
> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of Paul
> Eggleton
> Sent: Monday, March 04, 2019 12:17 PM
> To: openembedded-core@lists.openembedded.org; Chandana Kalluri
> <ckalluri@xilinx.com>
> Subject: Re: [OE-core] [OE-Core][master][PATCH] standard.py: Provide an additional
> option for devtool reset
> 
> On Friday, 8 February 2019 2:57:32 PM NZDT Sai Hari Chandana Kalluri wrote:
> > The devtool reset command cleans the sysroot for a recipe in workspace.
> > It also removes the append file but leaves the source code as in
> > workspace. The source is not cleaned intentionally and the user has to
> > manually remove it before calling devtool modify again.
> >
> > Provide the user with an option to remove the source code from
> > workspace by adding a flag to the devtool reset command. The
> > --rm-source option for the devtool reset command will also clean the
> > source code from the workspace along with the sysroot and the append file.
> > Ex: devtool reset --rm-source zip or devtool reset -r zip
> 
> When I wrote this I made a conscious decision not to delete the source, in case the
> user has unsaved work in the source tree; at least then the user has to take an
> explicit step (an additional rm -rf) in order to delete it. You might argue that adding
> an option is the same as that explicit step, but I am still hesitant as you might for
> example pick a previously used command from your command history with -r in it
> and only realise after you've run it that you've just blown away a bunch of your
> work.
> 
> However, I have received the feedback from a number of people that they find it
> annoying that they have to delete the source themselves before being able to run
> devtool on the recipe again. I'd like to hear from the wider community on the
> following two questions:
> 
> 1) Does the convenience of having this kind of option outweigh the potential danger
> of deleting unsaved work?
> 
> 2) Are there issues that anyone is experiencing that force you to run devtool
> clean/finish and then re-run devtool modify (or add, or upgrade), making this kind of
> situation come up more frequently? Or is it mostly that the source directories end up
> being left around to stumble over some time later?

We have seen source directories end up being left around (taking more disk space on certain projects), hence a solution to remove it might be optimal. If the preference is not have "-r" option to avoid command history mistake, then a full command like devtool reset --rm-source is acceptable as well

Thanks,
Manju

<...>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [master][PATCH] standard.py: Provide an additional option for devtool reset
  2019-03-04 20:17 ` Paul Eggleton
  2019-03-04 23:27   ` Manjukumar Harthikote Matha
@ 2019-03-11 21:23   ` Chandana Kalluri
  1 sibling, 0 replies; 10+ messages in thread
From: Chandana Kalluri @ 2019-03-11 21:23 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-core

Hello,

For me this was more useful for second scenario where I had to run devtool finish and re run devtool modify. 
This makes it easier to test changes or add new feature to devtool add/modify/ commands. 

Thanks,
Chandana

-----Original Message-----
From: Paul Eggleton <paul.eggleton@linux.intel.com> 
Sent: Monday, March 4, 2019 12:17 PM
To: openembedded-core@lists.openembedded.org; Chandana Kalluri <ckalluri@xilinx.com>
Subject: Re: [OE-core] [OE-Core][master][PATCH] standard.py: Provide an additional option for devtool reset

On Friday, 8 February 2019 2:57:32 PM NZDT Sai Hari Chandana Kalluri wrote:
> The devtool reset command cleans the sysroot for a recipe in workspace.
> It also removes the append file but leaves the source code as in 
> workspace. The source is not cleaned intentionally and the user has to 
> manually remove it before calling devtool modify again.
> 
> Provide the user with an option to remove the source code from 
> workspace by adding a flag to the devtool reset command. The 
> --rm-source option for the devtool reset command will also clean the 
> source code from the workspace along with the sysroot and the append file.
> Ex: devtool reset --rm-source zip or devtool reset -r zip

When I wrote this I made a conscious decision not to delete the source, in case the user has unsaved work in the source tree; at least then the user has to take an explicit step (an additional rm -rf) in order to delete it. You might argue that adding an option is the same as that explicit step, but I am still hesitant as you might for example pick a previously used command from your command history with -r in it and only realise after you've run it that you've just blown away a bunch of your work.

However, I have received the feedback from a number of people that they find it annoying that they have to delete the source themselves before being able to run devtool on the recipe again. I'd like to hear from the wider community on the following two questions:

1) Does the convenience of having this kind of option outweigh the potential danger of deleting unsaved work?

2) Are there issues that anyone is experiencing that force you to run devtool clean/finish and then re-run devtool modify (or add, or upgrade), making this kind of situation come up more frequently? Or is it mostly that the source directories end up being left around to stumble over some time later?

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [master][PATCH] standard.py: Provide an additional option for devtool reset
  2019-03-04 23:27   ` Manjukumar Harthikote Matha
@ 2019-08-08 20:17     ` Manjukumar Harthikote Matha
  2019-08-08 20:27       ` Alexander Kanavin
  0 siblings, 1 reply; 10+ messages in thread
From: Manjukumar Harthikote Matha @ 2019-08-08 20:17 UTC (permalink / raw)
  To: Manjukumar Harthikote Matha, Paul Eggleton, openembedded-core,
	Chandana Kalluri, Bruce Ashfield

Hi Paul,

> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org
> <openembedded-core-bounces@lists.openembedded.org> On Behalf Of
> Manjukumar Harthikote Matha
> Sent: Monday, March 4, 2019 3:27 PM
> To: Paul Eggleton <paul.eggleton@linux.intel.com>; openembedded-
> core@lists.openembedded.org; Chandana Kalluri <ckalluri@xilinx.com>
> Subject: Re: [OE-core] [OE-Core][master][PATCH] standard.py: Provide an
> additional option for devtool reset
> 
> Hi Paul,
> 
> > -----Original Message-----
> > From: openembedded-core-bounces@lists.openembedded.org
> > [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> > Paul Eggleton
> > Sent: Monday, March 04, 2019 12:17 PM
> > To: openembedded-core@lists.openembedded.org; Chandana Kalluri
> > <ckalluri@xilinx.com>
> > Subject: Re: [OE-core] [OE-Core][master][PATCH] standard.py: Provide
> > an additional option for devtool reset
> >
> > On Friday, 8 February 2019 2:57:32 PM NZDT Sai Hari Chandana Kalluri wrote:
> > > The devtool reset command cleans the sysroot for a recipe in workspace.
> > > It also removes the append file but leaves the source code as in
> > > workspace. The source is not cleaned intentionally and the user has
> > > to manually remove it before calling devtool modify again.
> > >
> > > Provide the user with an option to remove the source code from
> > > workspace by adding a flag to the devtool reset command. The
> > > --rm-source option for the devtool reset command will also clean the
> > > source code from the workspace along with the sysroot and the append file.
> > > Ex: devtool reset --rm-source zip or devtool reset -r zip
> >
> > When I wrote this I made a conscious decision not to delete the
> > source, in case the user has unsaved work in the source tree; at least
> > then the user has to take an explicit step (an additional rm -rf) in
> > order to delete it. You might argue that adding an option is the same
> > as that explicit step, but I am still hesitant as you might for
> > example pick a previously used command from your command history with
> > -r in it and only realise after you've run it that you've just blown away a bunch
> of your work.
> >
> > However, I have received the feedback from a number of people that
> > they find it annoying that they have to delete the source themselves
> > before being able to run devtool on the recipe again. I'd like to hear
> > from the wider community on the following two questions:
> >
> > 1) Does the convenience of having this kind of option outweigh the
> > potential danger of deleting unsaved work?
> >
> > 2) Are there issues that anyone is experiencing that force you to run
> > devtool clean/finish and then re-run devtool modify (or add, or
> > upgrade), making this kind of situation come up more frequently? Or is
> > it mostly that the source directories end up being left around to stumble over
> some time later?
> 
> We have seen source directories end up being left around (taking more disk
> space on certain projects), hence a solution to remove it might be optimal. If the
> preference is not have "-r" option to avoid command history mistake, then a full
> command like devtool reset --rm-source is acceptable as well
> 


Any update on this?  Is there a reason not to merge this feature?

Thanks,
Manju


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [master][PATCH] standard.py: Provide an additional option for devtool reset
  2019-08-08 20:17     ` Manjukumar Harthikote Matha
@ 2019-08-08 20:27       ` Alexander Kanavin
  2019-08-08 21:59         ` Mark Hatle
  2019-08-09 10:06         ` Paul Eggleton
  0 siblings, 2 replies; 10+ messages in thread
From: Alexander Kanavin @ 2019-08-08 20:27 UTC (permalink / raw)
  To: Manjukumar Harthikote Matha
  Cc: Paul Eggleton, Bruce Ashfield, openembedded-core

[-- Attachment #1: Type: text/plain, Size: 4264 bytes --]

For what it's worth I am firmly in the camp that finds the non-deletion of
sources annoying. When I run 'devtool reset', there is never any unsaved
work left in there, but I am in too much of a hurry to do the extra 'rm' on
those sources, and so much later (sometimes months later) it has to be done
just prior to starting work on something else entirely (but with the same
upstream component).

Alex


On Thu, 8 Aug 2019 at 22:17, Manjukumar Harthikote Matha <
MANJUKUM@xilinx.com> wrote:

> Hi Paul,
>
> > -----Original Message-----
> > From: openembedded-core-bounces@lists.openembedded.org
> > <openembedded-core-bounces@lists.openembedded.org> On Behalf Of
> > Manjukumar Harthikote Matha
> > Sent: Monday, March 4, 2019 3:27 PM
> > To: Paul Eggleton <paul.eggleton@linux.intel.com>; openembedded-
> > core@lists.openembedded.org; Chandana Kalluri <ckalluri@xilinx.com>
> > Subject: Re: [OE-core] [OE-Core][master][PATCH] standard.py: Provide an
> > additional option for devtool reset
> >
> > Hi Paul,
> >
> > > -----Original Message-----
> > > From: openembedded-core-bounces@lists.openembedded.org
> > > [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> > > Paul Eggleton
> > > Sent: Monday, March 04, 2019 12:17 PM
> > > To: openembedded-core@lists.openembedded.org; Chandana Kalluri
> > > <ckalluri@xilinx.com>
> > > Subject: Re: [OE-core] [OE-Core][master][PATCH] standard.py: Provide
> > > an additional option for devtool reset
> > >
> > > On Friday, 8 February 2019 2:57:32 PM NZDT Sai Hari Chandana Kalluri
> wrote:
> > > > The devtool reset command cleans the sysroot for a recipe in
> workspace.
> > > > It also removes the append file but leaves the source code as in
> > > > workspace. The source is not cleaned intentionally and the user has
> > > > to manually remove it before calling devtool modify again.
> > > >
> > > > Provide the user with an option to remove the source code from
> > > > workspace by adding a flag to the devtool reset command. The
> > > > --rm-source option for the devtool reset command will also clean the
> > > > source code from the workspace along with the sysroot and the append
> file.
> > > > Ex: devtool reset --rm-source zip or devtool reset -r zip
> > >
> > > When I wrote this I made a conscious decision not to delete the
> > > source, in case the user has unsaved work in the source tree; at least
> > > then the user has to take an explicit step (an additional rm -rf) in
> > > order to delete it. You might argue that adding an option is the same
> > > as that explicit step, but I am still hesitant as you might for
> > > example pick a previously used command from your command history with
> > > -r in it and only realise after you've run it that you've just blown
> away a bunch
> > of your work.
> > >
> > > However, I have received the feedback from a number of people that
> > > they find it annoying that they have to delete the source themselves
> > > before being able to run devtool on the recipe again. I'd like to hear
> > > from the wider community on the following two questions:
> > >
> > > 1) Does the convenience of having this kind of option outweigh the
> > > potential danger of deleting unsaved work?
> > >
> > > 2) Are there issues that anyone is experiencing that force you to run
> > > devtool clean/finish and then re-run devtool modify (or add, or
> > > upgrade), making this kind of situation come up more frequently? Or is
> > > it mostly that the source directories end up being left around to
> stumble over
> > some time later?
> >
> > We have seen source directories end up being left around (taking more
> disk
> > space on certain projects), hence a solution to remove it might be
> optimal. If the
> > preference is not have "-r" option to avoid command history mistake,
> then a full
> > command like devtool reset --rm-source is acceptable as well
> >
>
>
> Any update on this?  Is there a reason not to merge this feature?
>
> Thanks,
> Manju
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 5970 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [master][PATCH] standard.py: Provide an additional option for devtool reset
  2019-08-08 20:27       ` Alexander Kanavin
@ 2019-08-08 21:59         ` Mark Hatle
  2019-08-09  8:27           ` Alexander Kanavin
  2019-08-09 10:06         ` Paul Eggleton
  1 sibling, 1 reply; 10+ messages in thread
From: Mark Hatle @ 2019-08-08 21:59 UTC (permalink / raw)
  To: openembedded-core

On 8/8/19 3:27 PM, Alexander Kanavin wrote:
> For what it's worth I am firmly in the camp that finds the non-deletion of
> sources annoying. When I run 'devtool reset', there is never any unsaved work
> left in there, but I am in too much of a hurry to do the extra 'rm' on those
> sources, and so much later (sometimes months later) it has to be done just prior
> to starting work on something else entirely (but with the same upstream component).

May make sense to follow git as an example..

devtool reset does what it already does..

devtool reset --hard  also does the removal of the existing source.

But I've seen too many people blow away in progress source code without meaning
to.  Adding something like the --hard option would make it clear it's going to
all go away.

--Mark

> Alex
> 
> 
> On Thu, 8 Aug 2019 at 22:17, Manjukumar Harthikote Matha <MANJUKUM@xilinx.com
> <mailto:MANJUKUM@xilinx.com>> wrote:
> 
>     Hi Paul,
> 
>     > -----Original Message-----
>     > From: openembedded-core-bounces@lists.openembedded.org
>     <mailto:openembedded-core-bounces@lists.openembedded.org>
>     > <openembedded-core-bounces@lists.openembedded.org
>     <mailto:openembedded-core-bounces@lists.openembedded.org>> On Behalf Of
>     > Manjukumar Harthikote Matha
>     > Sent: Monday, March 4, 2019 3:27 PM
>     > To: Paul Eggleton <paul.eggleton@linux.intel.com
>     <mailto:paul.eggleton@linux.intel.com>>; openembedded-
>     > core@lists.openembedded.org <mailto:core@lists.openembedded.org>; Chandana
>     Kalluri <ckalluri@xilinx.com <mailto:ckalluri@xilinx.com>>
>     > Subject: Re: [OE-core] [OE-Core][master][PATCH] standard.py: Provide an
>     > additional option for devtool reset
>     >
>     > Hi Paul,
>     >
>     > > -----Original Message-----
>     > > From: openembedded-core-bounces@lists.openembedded.org
>     <mailto:openembedded-core-bounces@lists.openembedded.org>
>     > > [mailto:openembedded-core-bounces@lists.openembedded.org
>     <mailto:openembedded-core-bounces@lists.openembedded.org>] On Behalf Of
>     > > Paul Eggleton
>     > > Sent: Monday, March 04, 2019 12:17 PM
>     > > To: openembedded-core@lists.openembedded.org
>     <mailto:openembedded-core@lists.openembedded.org>; Chandana Kalluri
>     > > <ckalluri@xilinx.com <mailto:ckalluri@xilinx.com>>
>     > > Subject: Re: [OE-core] [OE-Core][master][PATCH] standard.py: Provide
>     > > an additional option for devtool reset
>     > >
>     > > On Friday, 8 February 2019 2:57:32 PM NZDT Sai Hari Chandana Kalluri wrote:
>     > > > The devtool reset command cleans the sysroot for a recipe in workspace.
>     > > > It also removes the append file but leaves the source code as in
>     > > > workspace. The source is not cleaned intentionally and the user has
>     > > > to manually remove it before calling devtool modify again.
>     > > >
>     > > > Provide the user with an option to remove the source code from
>     > > > workspace by adding a flag to the devtool reset command. The
>     > > > --rm-source option for the devtool reset command will also clean the
>     > > > source code from the workspace along with the sysroot and the append file.
>     > > > Ex: devtool reset --rm-source zip or devtool reset -r zip
>     > >
>     > > When I wrote this I made a conscious decision not to delete the
>     > > source, in case the user has unsaved work in the source tree; at least
>     > > then the user has to take an explicit step (an additional rm -rf) in
>     > > order to delete it. You might argue that adding an option is the same
>     > > as that explicit step, but I am still hesitant as you might for
>     > > example pick a previously used command from your command history with
>     > > -r in it and only realise after you've run it that you've just blown
>     away a bunch
>     > of your work.
>     > >
>     > > However, I have received the feedback from a number of people that
>     > > they find it annoying that they have to delete the source themselves
>     > > before being able to run devtool on the recipe again. I'd like to hear
>     > > from the wider community on the following two questions:
>     > >
>     > > 1) Does the convenience of having this kind of option outweigh the
>     > > potential danger of deleting unsaved work?
>     > >
>     > > 2) Are there issues that anyone is experiencing that force you to run
>     > > devtool clean/finish and then re-run devtool modify (or add, or
>     > > upgrade), making this kind of situation come up more frequently? Or is
>     > > it mostly that the source directories end up being left around to
>     stumble over
>     > some time later?
>     >
>     > We have seen source directories end up being left around (taking more disk
>     > space on certain projects), hence a solution to remove it might be
>     optimal. If the
>     > preference is not have "-r" option to avoid command history mistake, then
>     a full
>     > command like devtool reset --rm-source is acceptable as well
>     >
> 
> 
>     Any update on this?  Is there a reason not to merge this feature?
> 
>     Thanks,
>     Manju
>     -- 
>     _______________________________________________
>     Openembedded-core mailing list
>     Openembedded-core@lists.openembedded.org
>     <mailto:Openembedded-core@lists.openembedded.org>
>     http://lists.openembedded.org/mailman/listinfo/openembedded-core
> 
> 



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [master][PATCH] standard.py: Provide an additional option for devtool reset
  2019-08-08 21:59         ` Mark Hatle
@ 2019-08-09  8:27           ` Alexander Kanavin
  2019-08-09 14:42             ` Mark Hatle
  0 siblings, 1 reply; 10+ messages in thread
From: Alexander Kanavin @ 2019-08-09  8:27 UTC (permalink / raw)
  To: Mark Hatle; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 661 bytes --]

On Fri, 9 Aug 2019 at 00:00, Mark Hatle <mark.hatle@windriver.com> wrote:

> May make sense to follow git as an example..
>
> devtool reset does what it already does..
>
> devtool reset --hard  also does the removal of the existing source.
>
> But I've seen too many people blow away in progress source code without
> meaning
> to.  Adding something like the --hard option would make it clear it's
> going to
> all go away.
>

It might not be a coincidence, but in many years of using git, I do not
remember finding 'git reset' useful even once, and I am still not sure what
it does exactly. But 'git reset --hard' I use all the time.

Alex

[-- Attachment #2: Type: text/html, Size: 1004 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [master][PATCH] standard.py: Provide an additional option for devtool reset
  2019-08-08 20:27       ` Alexander Kanavin
  2019-08-08 21:59         ` Mark Hatle
@ 2019-08-09 10:06         ` Paul Eggleton
  1 sibling, 0 replies; 10+ messages in thread
From: Paul Eggleton @ 2019-08-09 10:06 UTC (permalink / raw)
  To: Alexander Kanavin, Manjukumar Harthikote Matha, Chandana Kalluri
  Cc: Bruce Ashfield, openembedded-core

On Friday, 9 August 2019 8:27:24 AM NZST Alexander Kanavin wrote:
> On Thu, 8 Aug 2019 at 22:17, Manjukumar Harthikote Matha <
> MANJUKUM@xilinx.com> wrote:
> > Any update on this?  Is there a reason not to merge this feature?
>
> For what it's worth I am firmly in the camp that finds the non-deletion of
> sources annoying. When I run 'devtool reset', there is never any unsaved
> work left in there, but I am in too much of a hurry to do the extra 'rm' on
> those sources, and so much later (sometimes months later) it has to be done
> just prior to starting work on something else entirely (but with the same
> upstream component).

My apologies for not acting upon this earlier - I'm coming around to the realisation that most people want this feature and won't blame the tool if they invoke it when they didn't mean to ;)

Chandana / Manju, overall the patch is good, but could you please make the following revisions:

1) Also add the exact same option to devtool finish (since it's the other path for recipes leaving the workspace)

2) Add some testing in oe-selftest that verifies that:
(a) it devtool does not delete the source by default (this could be tacked onto an existing test) and 
(b) that it does delete it with the option specified (could also be tacked onto another existing test if it doesn't adversely affect it).

3) The prefix to the shortlog should be "devtool:" not "standard.py:" - this is a more useful functional area description to help identify what's being changed.

Thanks
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [master][PATCH] standard.py: Provide an additional option for devtool reset
  2019-08-09  8:27           ` Alexander Kanavin
@ 2019-08-09 14:42             ` Mark Hatle
  0 siblings, 0 replies; 10+ messages in thread
From: Mark Hatle @ 2019-08-09 14:42 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: OE-core

On 8/9/19 3:27 AM, Alexander Kanavin wrote:
> On Fri, 9 Aug 2019 at 00:00, Mark Hatle <mark.hatle@windriver.com
> <mailto:mark.hatle@windriver.com>> wrote:
> 
>     May make sense to follow git as an example..
> 
>     devtool reset does what it already does..
> 
>     devtool reset --hard  also does the removal of the existing source.
> 
>     But I've seen too many people blow away in progress source code without meaning
>     to.  Adding something like the --hard option would make it clear it's going to
>     all go away.
> 
> 
> It might not be a coincidence, but in many years of using git, I do not remember
> finding 'git reset' useful even once, and I am still not sure what it does
> exactly. But 'git reset --hard' I use all the time.

I use them both myself.  'git reset' puts me back to a specific commit without
damaging any changes I've made in my source.. then I can re-evaluate and/or
manipulate them "again".

I would expect other development tools to work in a similar way.  Reset me back
to where I was but don't break things I may have changed.. vs just reset it all
and lose my local changes.

Since devtool doesn't know if you have any local changes it should default to
not erasing anything.

My opinion at least

--Mark

> Alex



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-08-09 14:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-08  1:57 [master][PATCH] standard.py: Provide an additional option for devtool reset Sai Hari Chandana Kalluri
2019-03-04 20:17 ` Paul Eggleton
2019-03-04 23:27   ` Manjukumar Harthikote Matha
2019-08-08 20:17     ` Manjukumar Harthikote Matha
2019-08-08 20:27       ` Alexander Kanavin
2019-08-08 21:59         ` Mark Hatle
2019-08-09  8:27           ` Alexander Kanavin
2019-08-09 14:42             ` Mark Hatle
2019-08-09 10:06         ` Paul Eggleton
2019-03-11 21:23   ` Chandana Kalluri

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.