Re: Bug in apt-get ? [replace essential package / Yes, do as I say]

2003-04-26 Thread Daniel Burrows
On Sat, Apr 26, 2003 at 11:12:00AM +, Miquel van Smoorenburg <[EMAIL 
PROTECTED]> was heard to say:
> # dpkg -i file-rc_0.8.0_all.deb
> Selecting previously deselected package file-rc.
> dpkg: considering removing sysv-rc in favour of file-rc ...
> dpkg: yes, will remove sysv-rc in favour of file-rc.
> (Reading database ... 39148 files and directories currently installed.)
> Unpacking file-rc (from file-rc_0.8.0_all.deb) ...
> Setting up file-rc (0.8.0) ...

  Where'd this deb come from?  0.7.0 is all I can find in the archive..

  Daniel

-- 
/ Daniel Burrows <[EMAIL PROTECTED]> ---\
|"But what *does* kill me bloody well leaves me dead!"|
|  -- Terry Pratchett, _Carpe Jugulum_|
\ Be like the kid in the movie!  Play chess! -- http://www.uschess.org ---/




Re: Bug in apt-get ? [replace essential package / Yes, do as I say]

2003-04-26 Thread Marcelo E. Magallon
On Sat, Apr 26, 2003 at 09:54:39AM -0400, Daniel Burrows wrote:

 >   Where'd this deb come from?  0.7.0 is all I can find in the archive..

 Hint: look at the name of the sysvinit maintainer.

 Maybe Miquel is testing the packages *gasp* before uploading them.

 Marcelo




Re: Bug in apt-get ? [replace essential package / Yes, do as I say]

2003-04-26 Thread Anthony Towns
On Sat, Apr 26, 2003 at 11:12:00AM +, Miquel van Smoorenburg wrote:
> Sysvinit was split up in sysvinit, initscripts and sysv-rc. The last
> one can be replaced by file-rc. Sysv-rc and file-rc conflict and
> replace one another.

Hrm. Any possibility of making sysv-rc and file-rc be concurrently
installable, via alternatives or somethign similar? That's the way mawk
and gawk work, which is a similar situation.

Cheers,
aj

-- 
Anthony Towns <[EMAIL PROTECTED]> 
I don't speak for anyone save myself. GPG signed mail preferred.

  ``Dear Anthony Towns: [...] Congratulations -- 
you are now certified as a Red Hat Certified Engineer!''


pgp4KMzfiwLX3.pgp
Description: PGP signature


Re: Bug in apt-get ? [replace essential package / Yes, do as I say]

2003-04-26 Thread Miquel van Smoorenburg
In article <[EMAIL PROTECTED]>,
Anthony Towns   wrote:
>On Sat, Apr 26, 2003 at 11:12:00AM +, Miquel van Smoorenburg wrote:
>> Sysvinit was split up in sysvinit, initscripts and sysv-rc. The last
>> one can be replaced by file-rc. Sysv-rc and file-rc conflict and
>> replace one another.
>
>Hrm. Any possibility of making sysv-rc and file-rc be concurrently
>installable, via alternatives or somethign similar? That's the way mawk
>and gawk work, which is a similar situation.

Well, that is perhaps possible, but 'there can be ony one'. If file-rc
is the way the system runs, and you change the alternatives links
to the update-rc.d/invoke-rc.d/rc/RCs of sysv-rc, you made your
system unable to boot (or shutdown). Having them both installed
is dangerous.

Besides, I think that what apt is doing is against policy. Policy
says that an essential package /can/ be replaced. Apt refuses
to do that (but dpkg does it just fine). So I though that perhaps
there is something that I'm overlooking. Ideas ?

Perhaps I should just dive into the apt source code and fix it,
but it has been years ago since I touched C++ ..

Mike.




Re: Bug in apt-get ? [replace essential package / Yes, do as I say]

2003-04-26 Thread Daniel Burrows
On Sat, Apr 26, 2003 at 04:31:36PM +0200, "Marcelo E. Magallon" <[EMAIL 
PROTECTED]> was heard to say:
> On Sat, Apr 26, 2003 at 09:54:39AM -0400, Daniel Burrows wrote:
> 
>  >   Where'd this deb come from?  0.7.0 is all I can find in the archive..
> 
>  Hint: look at the name of the sysvinit maintainer.

  Ok, if we're going to play the sarcasm game..

  Hint: look at the name of the file-rc maintainer.

>  Maybe Miquel is testing the packages *gasp* before uploading them.

  So I take it he's NMUing file-rc and these are private packages?  I was
hoping there were 0.8.0 packages in the wild that I could use to unclog
the sysvinit situation on my computer. :(

  Daniel

-- 
/ Daniel Burrows <[EMAIL PROTECTED]> ---\
| "Fluble, the others want you to know that we|
|  have you surrounded with tranquilizer rifles   |
|  and are prepared to use them.  Again."  -- Fluble  |
\-- Does your computer have Super Cow Powers? --- http://www.debian.org --/




Re: Bug in apt-get ? [replace essential package / Yes, do as I say]

2003-04-28 Thread jgg

On Sat, Apr 26, 2003 at 11:12:00AM +, Miquel van Smoorenburg wrote:

> It seems that currently apt is not able to replace an essential
> package. Well in fact the package I am trying to replace isn't
> even really essential...

It is able to, as you demonstrated, it just make it harder than normal.

There are a lot of wonky things that can happen during most of the essential
package remove scenarios that can completely screw your system so it doesn't
boot or can't run programs, install scripts or something er other.

Your case may or may not have these properties, it's impossible to tell.

Basically, I recommend you don't do what you are attempting.

> I do not want to remove sysv-rc, I'm replacing it. Is this a bug in
> apt ? And, why is apt splitting the operation into two steps ?

Replacing is the same as removing, there will always be a portion of time
when that functionality isn't available anymore. APT runs it as two dpkg
operations because that allow the ordering mechanism to work sanely. Trying
to anticipate dpkg auto-removal isn't terribly easy and doesn't add any
safety.

Jason




Re: Bug in apt-get ? [replace essential package / Yes, do as I say]

2003-04-29 Thread Miquel van Smoorenburg
According to [EMAIL PROTECTED]:
> On Sat, Apr 26, 2003 at 11:12:00AM +, Miquel van Smoorenburg wrote:
> 
> > It seems that currently apt is not able to replace an essential
> > package. Well in fact the package I am trying to replace isn't
> > even really essential...
> 
> It is able to, as you demonstrated, it just make it harder than normal.
> 
> There are a lot of wonky things that can happen during most of the essential
> package remove scenarios that can completely screw your system so it doesn't
> boot or can't run programs, install scripts or something er other.
> 
> Your case may or may not have these properties, it's impossible to tell.

Well yes, it probably is. Sysv-rc and file-rc *are not* essential.
Sysvinit is, and it depends on sysv-rc | file-rc, and that's why
apt 'upgrades' the status of those packages to Essential. Even if
I put Essential: no in the control file, apt still ignores that.

I'd say in this case apt is going slightly overboard. It's against
current policy, and dpkg itself does get it right.

Unix is all about having enough rope to hang yourself and being
able to shoot yourself in the foot etc, right, so why is apt
preventing me from doing something that actually makes a lot
of sense.

When replacing a (virtually) essential package, apt should simply
not remove the old package first and install the replacing
package after that. It should let dpkg take care of that. Apt
is able to order things the right way, so it should be able to
configure the replacing package as soon as it is unpacked.

Now I have to find a sane way to describe that, and file a
bug report against apt, I guess. Apt being written in C++ I'm
not going to try to fix it myself.

Mike.




Re: Bug in apt-get ? [replace essential package / Yes, do as I say]

2003-04-29 Thread Jason Gunthorpe

On Tue, 29 Apr 2003, Miquel van Smoorenburg wrote:

> > There are a lot of wonky things that can happen during most of the essential
> > package remove scenarios that can completely screw your system so it doesn't
> > boot or can't run programs, install scripts or something er other.
> > 
> > Your case may or may not have these properties, it's impossible to tell.
 
> Well yes, it probably is. Sysv-rc and file-rc *are not* essential.
> Sysvinit is, and it depends on sysv-rc | file-rc, and that's why
> apt 'upgrades' the status of those packages to Essential. Even if
> I put Essential: no in the control file, apt still ignores that.

Well, for the purposes of this check they are essential. It is
specifically designed to prevent against 
 
> I'd say in this case apt is going slightly overboard. It's against
> current policy, and dpkg itself does get it right.

It isn't against policy.

> Unix is all about having enough rope to hang yourself and being
> able to shoot yourself in the foot etc, right, so why is apt
> preventing me from doing something that actually makes a lot
> of sense.

Yeah, well, a few years ago people were busilly shooting themselves in the
foot and rendering their systems completely inoperable by removing
these 'virtually eseential' packages. They complained loudly that it
should not be the way it was and I agreed. So this check is here to
stay.

You have to find another way to do what you want that isn't so risky.

> When replacing a (virtually) essential package, apt should simply
> not remove the old package first and install the replacing
> package after that. It should let dpkg take care of that. Apt
> is able to order things the right way, so it should be able to
> configure the replacing package as soon as it is unpacked.

This isn't relevent. Dpkg does the same operations internally, it just
does them a little faster. You still get the same potential bad effects.

> Now I have to find a sane way to describe that, and file a
> bug report against apt, I guess. Apt being written in C++ I'm
> not going to try to fix it myself.

It's not a bug, so please don't file more pointless bugs against it.

I seriously recommend against using virtual packages, or |'s with packages
that are marked essential. There is alot of very poor behavior you will
run into.

Jason