You are not logged in.

#1 2020-07-24 11:49:29

jimjamz
Member
From: Nagasaki, Japan
Registered: 2016-04-04
Posts: 115

[Suggestion] User Setup Overwrite After Apt Upgrade

After performing `apt-get upgrade`, if the user config files have been updated, then I am prompted to overwrite my current files with the new ones.  For example, ~/.config/bunsen/autostart is a common file that gets regularly updated in the Bunsen repos.

While this can be a useful feature to have, it does not present the user with many alternatives on what to do with their original file, which is simply overwritten or not.  Although there seems to be a backup of any replaced files being created, perhaps the user should be informed of this during the prompt, or perhaps offer the user a choice on what should happen.

In the 'User Setup' prompt dialog that is displayed, perhaps the inclusion of a checkbox that says: "Backup original files before overwriting".

Offline

#2 2020-07-24 14:34:22

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 661

Re: [Suggestion] User Setup Overwrite After Apt Upgrade

jimjamz wrote:

After performing `apt-get upgrade`, if the user config files have been updated, then I am prompted to overwrite my current files with the new ones.  For example, ~/.config/bunsen/autostart is a common file that gets regularly updated in the Bunsen repos.

While this can be a useful feature to have, it does not present the user with many alternatives on what to do with their original file, which is simply overwritten or not.  Although there seems to be a backup of any replaced files being created, perhaps the user should be informed of this during the prompt, or perhaps offer the user a choice on what should happen.

In the 'User Setup' prompt dialog that is displayed, perhaps the inclusion of a checkbox that says: "Backup original files before overwriting".

1 No, user configfiles is not overwritten! Old one is renamed with a timestamp at the end.

2 it is quite easy to navigate to ~/.config/bunsen/autostart, issue the command meld autostart* (or other prefered diff util), examine diffence and take action and delete backup to ease next diff.

3 I initiated a disussion some time ago about the information. There is potential for improvment of information. I did not provide any concrete suggestion of change.

An log about what file was overwriten would be nice.


// Regards rbh

Online

#3 2020-07-25 02:00:03

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,299
Website

Re: [Suggestion] User Setup Overwrite After Apt Upgrade

This is new functionality and any feedback about user experience is very welcome, so thanks!

jimjamz wrote:

Although there seems to be a backup of any replaced files being created, perhaps the user should be informed of this during the prompt, or perhaps offer the user a choice on what should happen.

In the 'User Setup' prompt dialog that is displayed, perhaps the inclusion of a checkbox that says: "Backup original files before overwriting".

Any overwritten file is always backed up. Would users prefer to have an option not to do this?

The dialogue box that first pops up says:

Some config files may have been updated in a recent package upgrade.
Would you like to import these changes into your HOME directory?
(Files you have edited will not be overwritten without permission.)

You also have the option of running 'bl-user-setup' at a later time.

Could this be improved maybe?

You can answer "No" and at some later date run 'bl-user-setup'. This will give you more control.
See 'bl-user-setup --help' or 'man bl-user-setup' for a bit more information. (Suggestions for improvement welcome.)

A log is already being generated in ~/.cache/bunsen/bl-setup/log
( Please do not alter or delete the other files in ~/.cache/bunsen/bl-setup )

As @rbh suggested, a comparison with 'meld' (my favourite) or 'diff' of the new file and its backup will let you resolve any changes. In the future it might be good to add some kind of built-in diff functionality to make it easier for users to decide whether to import changes or not.

Last edited by johnraff (2020-07-25 02:02:27)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Online

#4 2020-07-25 09:51:17

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 661

Re: [Suggestion] User Setup Overwrite After Apt Upgrade

johnraff wrote:

A log is already being generated in ~/.cache/bunsen/bl-setup/log
( Please do not alter or delete the other files in ~/.cache/bunsen/bl-setup )

Ah, I was unaware of that directory and the log. Makes things much easier. Thanks.

Information of the log should be added to the manpage for  bl-user-setup and in the yad popup infopage.

In som distant future, adding the date of the new configfile, would be helpfull.


// Regards rbh

Online

#5 2020-07-26 06:50:05

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,299
Website

Re: [Suggestion] User Setup Overwrite After Apt Upgrade

rbh wrote:

Information of the log should be added to the manpage for  bl-user-setup and in the yad popup infopage.

Certainly in the manpage. Not sure about adding more lines to the popup though.

In som distant future, adding the date of the new configfile, would be helpfull.

Sorry, not sure what you mean here.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Online

#6 2020-07-26 12:52:33

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 661

Re: [Suggestion] User Setup Overwrite After Apt Upgrade

johnraff wrote:
rbh wrote:

In som distant future, adding the date of the new configfile, would be helpfull.

Sorry, not sure what you mean here.

In the popup, that says there is change of configs and user config is asked permission to be overwritten, it would be nice to see what timestamp the default configfile has.
Then I know if it is just as well to overwrite config for Geany and then examine difference, if it is a new timestamp. If it is old timestamp, I know that there i no need to examine if new good thoughtsd has been implemented, that I ougt to accept...

But, that is far from high priority, thus "distant future"..

Last edited by rbh (2020-07-27 01:01:52)


// Regards rbh

Online

#7 2020-07-27 00:44:14

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,299
Website

Re: [Suggestion] User Setup Overwrite After Apt Upgrade

^If I understood that correctly, then the script should already be taking care of it. It will only prompt with a suggested overwrite if the default config file (in /usr/share/bunsen/skel) has changed since the last time the script was run, ie because of a package upgrade. The timestamp will always be new in such a case.

In fact, because of the way git handles timestamps, all the files in an upgraded package are marked with a new time, even if they haven't changed. Because of this, the script itself uses md5 checksums, not timestamps.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Online

#8 2020-07-27 01:05:31

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 661

Re: [Suggestion] User Setup Overwrite After Apt Upgrade

I mean a timestamp in the yad, so you can read if the skript asks to overwrite your configfile with an old defaultfile you are not interested in...


// Regards rbh

Online

#9 2020-07-27 02:24:45

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,299
Website

Re: [Suggestion] User Setup Overwrite After Apt Upgrade

^But, the script is supposed never to do such a thing anyway. It only offers to overwrite if the config file is newly changed.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Online

Board footer

Powered by FluxBB