Re: apt-get -y upgrade for non-interactive sessions - and replacing conf files in /etc

2007-07-06 Thread Florian Lohoff
On Thu, Jul 05, 2007 at 11:57:31AM -0700, Alan Ezust wrote:
> Subject: apt-get -y upgrade for non-interactive sessions - and replacing conf 
> files in /etc
> 
> Hi -  i was wondering, I'm trying to run apt-get upgrade in a
> non-interactive shell.
> I passed -y as an option, and then during the postinst, I have a
> situation where the package has a configuration file which is newer
> than what it is about to replace. I would like it to just replace the
> configuration file without asking me, but it won't do that, even if I
> pass the -y option.
> 
> I realize that the default behavior of apt-get is probably valid, but
> is there a way to run apt-get such that clobbering of configuration
> files can happen without user intervention?

conffiles is a dpkg thing - not apt 

Try something like this ...

DEBIAN_FRONTEND=noninteractive \
apt-get \
-o Dpkg::Options::="--force-confnew" \
--force-yes \
-fuy \
dist-upgrade


I used something like this (a shell script with a couple hundret lines) to 
upgrade
a couple hundret machines from woody via sarge to etch ... (Can we make 6 Year
Release cycles please?).

Flo
-- 
Florian Lohoff  [EMAIL PROTECTED] +49-171-2280134
Those who would give up a little freedom to get a little 
  security shall soon have neither - Benjamin Franklin


signature.asc
Description: Digital signature


Re: apt-get -y upgrade for non-interactive sessions - and replacing conf files in /etc

2007-07-05 Thread martin f krafft
also sprach Alan Ezust <[EMAIL PROTECTED]> [2007.07.06.0017 +0200]:
> Yes, I see it is indeed only prompting me for conffiles that I
> manually modified. In my particular situation, and I realize this is
> unusual/dangerous, I still would like to to clobber my handmade
> changes with newer versions from a .deb file. Setting those two
> environment variables did not change the behavior of dpkg in this
> particular case.

Try adding

  DPkg::options {"--force-confnew";};

to /etc/apt/apt.conf.d/local-dpkg_force-confnew

-- 
Please do not send copies of list mail to me; I read the list!
 
 .''`.   martin f. krafft <[EMAIL PROTECTED]>
: :'  :  proud Debian developer, author, administrator, and user
`. `'`   http://people.debian.org/~madduck - http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems
 
perl -e 'print "The earth is a disk!\n" if ( "a" == "b" );'
   (dedicated to nori)


signature.asc
Description: Digital signature (GPG/PGP)


Re: apt-get -y upgrade for non-interactive sessions - and replacing conf files in /etc

2007-07-05 Thread Daniel Burrows
On Thu, Jul 05, 2007 at 03:17:12PM -0700, Alan Ezust <[EMAIL PROTECTED]> was 
heard to say:
> On 7/5/07, Steve Greenland <[EMAIL PROTECTED]> wrote:
>> Alan, you know that it should only be prompting you on conffiles you 
>> actually
>> modified? Do you really want those overwritten?
>
> Yes, I see it is indeed only prompting me for conffiles that I
> manually modified. In my particular situation, and I realize this is
> unusual/dangerous, I still would like to to clobber my handmade
> changes with newer versions from a .deb file. Setting those two
> environment variables did not change the behavior of dpkg in this
> particular case.

  If you really want to do this, I think you need to pass --force-confnew
to dpkg.  You can arrange this either in /etc/dpkg/dpkg.cfg or in
/etc/apt/apt.conf.

  Daniel


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: apt-get -y upgrade for non-interactive sessions - and replacing conf files in /etc

2007-07-05 Thread Alan Ezust

On 7/5/07, Steve Greenland <[EMAIL PROTECTED]> wrote:

On 05-Jul-07, 14:06 (CDT), Klaus Ethgen <[EMAIL PROTECTED]> wrote:
> Am Do den  5. Jul 2007 um 20:57 schrieb Alan Ezust:
> > I passed -y as an option, and then during the postinst, I have a
> > situation where the package has a configuration file which is newer
> > than what it is about to replace. I would like it to just replace the
> > configuration file without asking me, but it won't do that, even if I
> > pass the -y option.
>
> I think the following lines will help:
>  export DEBIAN_FRONTEND=noninteractive
>  export DEBIAN_PRIORITY=critical

That's only for debconf; I think Alan is talking about the dpkg level
conffile handling.

Alan, you know that it should only be prompting you on conffiles you actually
modified? Do you really want those overwritten?


Yes, I see it is indeed only prompting me for conffiles that I
manually modified. In my particular situation, and I realize this is
unusual/dangerous, I still would like to to clobber my handmade
changes with newer versions from a .deb file. Setting those two
environment variables did not change the behavior of dpkg in this
particular case.


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: apt-get -y upgrade for non-interactive sessions - and replacing conf files in /etc

2007-07-05 Thread Steve Greenland
On 05-Jul-07, 14:06 (CDT), Klaus Ethgen <[EMAIL PROTECTED]> wrote: 
> Am Do den  5. Jul 2007 um 20:57 schrieb Alan Ezust:
> > I passed -y as an option, and then during the postinst, I have a
> > situation where the package has a configuration file which is newer
> > than what it is about to replace. I would like it to just replace the
> > configuration file without asking me, but it won't do that, even if I
> > pass the -y option.
> 
> I think the following lines will help:
>  export DEBIAN_FRONTEND=noninteractive
>  export DEBIAN_PRIORITY=critical

That's only for debconf; I think Alan is talking about the dpkg level
conffile handling.

Alan, you know that it should only be prompting you on conffiles you actually
modified? Do you really want those overwritten? 

Steve
-- 
Steve Greenland
The irony is that Bill Gates claims to be making a stable operating
system and Linus Torvalds claims to be trying to take over the
world.   -- seen on the net


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



apt-get -y upgrade for non-interactive sessions - and replacing conf files in /etc

2007-07-05 Thread Alan Ezust

Hi -  i was wondering, I'm trying to run apt-get upgrade in a
non-interactive shell.
I passed -y as an option, and then during the postinst, I have a
situation where the package has a configuration file which is newer
than what it is about to replace. I would like it to just replace the
configuration file without asking me, but it won't do that, even if I
pass the -y option.

I realize that the default behavior of apt-get is probably valid, but
is there a way to run apt-get such that clobbering of configuration
files can happen without user intervention?


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: apt-get -y upgrade for non-interactive sessions - and replacing conf files in /etc

2007-07-05 Thread Klaus Ethgen
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Am Do den  5. Jul 2007 um 20:57 schrieb Alan Ezust:
> I passed -y as an option, and then during the postinst, I have a
> situation where the package has a configuration file which is newer
> than what it is about to replace. I would like it to just replace the
> configuration file without asking me, but it won't do that, even if I
> pass the -y option.

I think the following lines will help:
 export DEBIAN_FRONTEND=noninteractive
 export DEBIAN_PRIORITY=critical

Gruß
   Klaus
- -- 
Klaus Ethgenhttp://www.ethgen.de/
pub  2048R/D1A4EDE5 2000-02-26 Klaus Ethgen <[EMAIL PROTECTED]>
Fingerprint: D7 67 71 C4 99 A6 D4 FE  EA 40 30 57 3C 88 26 2B
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iQEVAwUBRo1BJp+OKpjRpO3lAQLMuwf9HCnKlKlNabck4tBP7Ja8j7CT6QVoK+tC
lffeFbFbTV3wba7OEOC44a1vErdE2L88hZKiCa0+stB72WVCWhJLMGPKnuyZ0aUz
hXI6loa9qFNTfZweQTQE9aQ9/gNy2gR3VKNGmX/1odnzT05/ci70P5vTplLyoE2R
MNEw/yeMx1mCjXb0SuVhMv5G5Kag64lAVE89jfvIwYXhdAcWvpQuVEIsoGMP14wL
aiOL1sj3gsg1jV8wsz+Eg6oAjqmrmm3cNnuMr09nL5PhYPCPnBiw7lgpJ76zxL38
iakZ716XC7bZ37F/z1JIVZCosx3rHn1AVWeWHZFeOnAATZgNhRpL2Q==
=i+E4
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]