On 10/10/2013 5:23 PM, berenger.mo...@neutralite.org wrote:


Le 10.10.2013 21:59, Jerry Stuckle a écrit :
On 10/10/2013 3:08 PM, berenger.mo...@neutralite.org wrote:


Le 10.10.2013 20:20, Brad Rogers a écrit :
On Thu, 10 Oct 2013 10:54:57 -0700
Gregory Nowak <g...@gregn.net> wrote:

Hello Gregory,

"purge
          purge is identical to remove except that packages are
          removed and
          purged (any configuration files are deleted too)."

As has been said, the man page is imprecise.

I wonder if that could justify a bug report? Speaking about that, I have
no idea about what exactly does the reinstall option: simply remove and
then install, or purge and then install? If, as I think, it's the first
option, what is the use for that, since packages should not lose files
magically?



I'm not sure what the confusion is here.  Sure, it deletes all
configuration files it knows about.  But then I would NOT expect it to
delete any user-generated files, configuration or otherwise.  I would
only expect it to delete what it can restore.

Jerry

Maybe you, since you know how it works. But, someone with no knowledge
would think that it also removes userland configuration files, since it
claims to remove all configuration files.


Actually, I'm pretty new to Debian (and Linux in general), and DON'T know how it works. But I do have 45 years of programming experience, and have written many installation scripts/programs over the years. And not one of them deleted user files.

To be honest, sometimes I would really like it to be able to do so :)
and I could imagine ways to do that, too.
For example, imagine if all softwares would respect XDG Base Directory
Specification ( oh, wait, they won't, lennart participate ;) but
honestly, I really would like it to be followed ) to install
configuration files in $XDG_CONFIG_HOME. dpkg would simply have to check
for all users with a home directory what is their XDG_CONFIG_HOME and
search here the repertory to remove, in case of a purge. That does not
sounds so impossible, right?

And how would you know if a particular file belongs to a certain package, or is something the user created?

Also, many times I will make changes to the default configuration files, i.e. setting different values in PHP. When updating PHP, I do want the new defaults, but I do NOT want my mods to the configuration to be overwritten.

It's quite easy with Debian; just put a file in /etc/php5/apache2/conf.d with my changes and let it go.

Of course, there is the problem of determining where the hell that
variable is defined for each users, and it would also imply that all
softwares respect it, which will probably never happen.
But, in my opinion, having a tool able to remove configuration files
from user directories would help. A lot. Because it happens that I try
some softwares, and then purge them, but I still have to find every
single file they could have installed by hand. And this is *really* boring.
I know that it would have it's own problems, of course, for example when
you install multiple versions of the same program, or if some users want
to keep their files anyway (this issue could be fixed by not effectively
removing those files, but by installing a script which would ask to
users if they want to keep or remove files, script which would be
automatically run at their next session ).


I guess we'll have to disagree here. I would NEVER want a script to remove files from a user directory.

I know that it would not be so easy ( I can think about other problems
that I did not mention, but I do not want to write a novel ) , but it
would be doable, by someone with enough knowledge of package management
and global system, and, again, if most softwares were willing to respect
XDG specs. Vim, bash, xpaint, firefox, those are few examples of widely
known softwares, which does not respect that spec. And for which reason?
I guess there are none. And there are tons of other softwares which does
not.


It's not something I would want.

My homedir is far more messy on Debian than on windows finally, and I
clean it frequently, but I use it far more often on Debian than on
Windows ( where the usages are more to use desktop, other partitions or
"my documents"). Don't you think that something is wrong, here?


My home directories are pretty clean, and I don't clean it at all. But I do manage my files.

The problem is not technical, because it's easy to do, even in C:
======
#define HOME_CONFIG "XDG_CONFIG_DIR" // can be used to keep windows
compatibility without changing any line of code
#define PROGRAM_OWN_CONFIG_DIR "/some/strange/config/dir/name/"
char* user_config_dir = getenv(HOME_CONFIG);
if( !user_config_dir )
   exit( -1 );
unsigned short mcd_len = strlen( user_config_dir ) + strlen(
LEN_OF_PROGRAM_OWN_CONFIG_DIR ) +1;
char* my_config_dir = malloc( mcd_len );
if( !my_config_dir )
   exit( -2 );
if( 0 == strlen( user_config_dir ) )
   strncpy( my_config_dir, "~", 1 );
else
   strncpy( my_config_dir, user_config_dir, strlen( user_config_dir ) );
strncat( my_config_dir + strlen( my_config_dir ),
PROGRAM_OWN_CONFIG_DIR, LEN_OF_PROGRAM_OWN_CONFIG_DIR );
======
That's portable, standard, written in less than 5min and relatively
secure ( there are still flaws there, but I am more used to C++, and
it's a simple demo ). So, why not doing it? Less than 20 lines in C,
less than 5 lines in C++, and probably not more in other languages.



I wouldn't want it.

Jerry


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/52576ed2.7060...@attglobal.net

Reply via email to