Renaming a package, proper values for replaces/conflicts?

2004-03-07 Thread Andreas Metzler
Hello,
I know this is a standard szenario, but the natural solution conflicts
with suggestions in policy.

When jumping from 4.3 to 4.5 I'd like to rename pgrep to pcregrep and
to provide seamless upgrades I'd introduce a dummy package pgrep
depending on pcregrep, however replaces/conflicts gives me a headache.

Package: pcregrep
Architecture: any
Depends: ${shlibs:Depends}
Conflicts: pgrep(<<4.5)
Replaces: pgrep(<<4.5)

Package: pgrep
Section: oldlibs
Architecture: all
Depends: pcregrep

This looks correct, doesn't it? Any[1] version of pgrep fulfilling (<<4.5)
is no dummy package and contains /usr/bin/pcregrep, therefore pcregrep
must conflict with it. (Testing shows that this seems to work, "apt-get
dselect-upgrade" and "apt-get dist-upgrade" will install pcregrep.)

However policy 7.3 says:
| A Conflicts entry should almost never have an "earlier than"
| version clause. This would prevent dpkg from upgrading or
| installing the package which declared such a conflict until
| the upgrade or removal of the conflicted-with package had been
| completed.

My gut feeling tells me to ignore this because I _need_ to conflict with
pgrep(<<4.5) and because high-level packaging managment tools like apt
or dselect handle this quite fine.
   cu andreas
[1] Actually it is any version from 3.3-1 up to the version currently
available, 4.3-4, but I've no idea how to express a range in
replaces/conflicts except by listing all of them, there is no AND.
-- 
"See, I told you they'd listen to Reason," [SPOILER] Svfurlr fnlf,
fuhggvat qbja gur juveyvat tha.
Neal Stephenson in "Snow Crash"


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



Renaming a package, proper values for replaces/conflicts?

2004-03-07 Thread Andreas Metzler
Hello,
I know this is a standard szenario, but the natural solution conflicts
with suggestions in policy.

When jumping from 4.3 to 4.5 I'd like to rename pgrep to pcregrep and
to provide seamless upgrades I'd introduce a dummy package pgrep
depending on pcregrep, however replaces/conflicts gives me a headache.

Package: pcregrep
Architecture: any
Depends: ${shlibs:Depends}
Conflicts: pgrep(<<4.5)
Replaces: pgrep(<<4.5)

Package: pgrep
Section: oldlibs
Architecture: all
Depends: pcregrep

This looks correct, doesn't it? Any[1] version of pgrep fulfilling (<<4.5)
is no dummy package and contains /usr/bin/pcregrep, therefore pcregrep
must conflict with it. (Testing shows that this seems to work, "apt-get
dselect-upgrade" and "apt-get dist-upgrade" will install pcregrep.)

However policy 7.3 says:
| A Conflicts entry should almost never have an "earlier than"
| version clause. This would prevent dpkg from upgrading or
| installing the package which declared such a conflict until
| the upgrade or removal of the conflicted-with package had been
| completed.

My gut feeling tells me to ignore this because I _need_ to conflict with
pgrep(<<4.5) and because high-level packaging managment tools like apt
or dselect handle this quite fine.
   cu andreas
[1] Actually it is any version from 3.3-1 up to the version currently
available, 4.3-4, but I've no idea how to express a range in
replaces/conflicts except by listing all of them, there is no AND.
-- 
"See, I told you they'd listen to Reason," [SPOILER] Svfurlr fnlf,
fuhggvat qbja gur juveyvat tha.
Neal Stephenson in "Snow Crash"



Re: Renaming a package, proper values for replaces/conflicts?

2004-03-07 Thread Colin Watson
On Sun, Mar 07, 2004 at 11:23:40AM +0100, Andreas Metzler wrote:
> When jumping from 4.3 to 4.5 I'd like to rename pgrep to pcregrep and
> to provide seamless upgrades I'd introduce a dummy package pgrep
> depending on pcregrep, however replaces/conflicts gives me a headache.
> 
> Package: pcregrep
> Architecture: any
> Depends: ${shlibs:Depends}
> Conflicts: pgrep(<<4.5)
> Replaces: pgrep(<<4.5)
> 
> Package: pgrep
> Section: oldlibs
> Architecture: all
> Depends: pcregrep
> 
> This looks correct, doesn't it? Any[1] version of pgrep fulfilling (<<4.5)
> is no dummy package and contains /usr/bin/pcregrep, therefore pcregrep
> must conflict with it.

I think you just need Replaces: pgrep (<< 4.5), not Conflicts: at all.
It's a straightforward file conflict. Conflicts: makes the upgrade
painful because it adds extra complexity to the unpack order: this is
why policy recommends against it.

Cheers,

-- 
Colin Watson  [EMAIL PROTECTED]


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



Re: Renaming a package, proper values for replaces/conflicts?

2004-03-07 Thread Andreas Metzler
On 2004-03-07 Colin Watson <[EMAIL PROTECTED]> wrote:
> On Sun, Mar 07, 2004 at 11:23:40AM +0100, Andreas Metzler wrote:
>> When jumping from 4.3 to 4.5 I'd like to rename pgrep to pcregrep and
>> to provide seamless upgrades I'd introduce a dummy package pgrep
>> depending on pcregrep, however replaces/conflicts gives me a headache.

>> Package: pcregrep
>> Architecture: any
>> Depends: ${shlibs:Depends}
>> Conflicts: pgrep(<<4.5)
>> Replaces: pgrep(<<4.5)

>> Package: pgrep
>> Section: oldlibs
>> Architecture: all
>> Depends: pcregrep

>> This looks correct, doesn't it? Any[1] version of pgrep fulfilling (<<4.5)
>> is no dummy package and contains /usr/bin/pcregrep, therefore pcregrep
>> must conflict with it.

> I think you just need Replaces: pgrep (<< 4.5), not Conflicts: at all.
> It's a straightforward file conflict. Conflicts: makes the upgrade
> painful because it adds extra complexity to the unpack order: this is
> why policy recommends against it.

So it is no bug that this file-conflict

| X:/ dpkg -i /apt-zusatz/pgrep_4.3-0.0.1_i386.deb 
| dpkg - warning: downgrading pgrep from 4.5-0.1 to 4.3-0.0.1.
| (Reading database ... 9669 files and directories currently installed.)
| Preparing to replace pgrep 4.5-0.1 (using
| .../pgrep_4.3-0.0.1_i386.deb) ...
| Unpacking replacement pgrep ...
| dpkg: error processing /apt-zusatz/pgrep_4.3-0.0.1_i386.deb
| (--install):
|  trying to overwrite `/usr/bin/pcregrep', which is also in package
|  pcregrep
| Errors were encountered while processing:
|   /apt-zusatz/pgrep_4.3-0.0.1_i386.deb

is not expressed in Conflicts: because basically we only care about
upgrading?
cu andreas
-- 
"See, I told you they'd listen to Reason," [SPOILER] Svfurlr fnlf,
fuhggvat qbja gur juveyvat tha.
Neal Stephenson in "Snow Crash"


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



Re: Renaming a package, proper values for replaces/conflicts?

2004-03-07 Thread Colin Watson
On Sun, Mar 07, 2004 at 01:17:46PM +0100, Andreas Metzler wrote:
> On 2004-03-07 Colin Watson <[EMAIL PROTECTED]> wrote:
> > On Sun, Mar 07, 2004 at 11:23:40AM +0100, Andreas Metzler wrote:
> >> When jumping from 4.3 to 4.5 I'd like to rename pgrep to pcregrep and
> >> to provide seamless upgrades I'd introduce a dummy package pgrep
> >> depending on pcregrep, however replaces/conflicts gives me a headache.
> 
> >> Package: pcregrep
> >> Architecture: any
> >> Depends: ${shlibs:Depends}
> >> Conflicts: pgrep(<<4.5)
> >> Replaces: pgrep(<<4.5)
> 
> >> Package: pgrep
> >> Section: oldlibs
> >> Architecture: all
> >> Depends: pcregrep
> 
> >> This looks correct, doesn't it? Any[1] version of pgrep fulfilling (<<4.5)
> >> is no dummy package and contains /usr/bin/pcregrep, therefore pcregrep
> >> must conflict with it.
> 
> > I think you just need Replaces: pgrep (<< 4.5), not Conflicts: at all.
> > It's a straightforward file conflict. Conflicts: makes the upgrade
> > painful because it adds extra complexity to the unpack order: this is
> > why policy recommends against it.

Actually, Replaces:/Conflicts: has the special meaning of "this package
completely replaces that other package", which I guess is what you want.
Nothing depends on pgrep, so is the dummy package really needed?

> So it is no bug that this file-conflict
> 
> | X:/ dpkg -i /apt-zusatz/pgrep_4.3-0.0.1_i386.deb 
> | dpkg - warning: downgrading pgrep from 4.5-0.1 to 4.3-0.0.1.
> | (Reading database ... 9669 files and directories currently installed.)
> | Preparing to replace pgrep 4.5-0.1 (using
> | .../pgrep_4.3-0.0.1_i386.deb) ...
> | Unpacking replacement pgrep ...
> | dpkg: error processing /apt-zusatz/pgrep_4.3-0.0.1_i386.deb
> | (--install):
> |  trying to overwrite `/usr/bin/pcregrep', which is also in package
> |  pcregrep
> | Errors were encountered while processing:
> |   /apt-zusatz/pgrep_4.3-0.0.1_i386.deb
> 
> is not expressed in Conflicts: because basically we only care about
> upgrading?

That's really a bug in dpkg.

-- 
Colin Watson  [EMAIL PROTECTED]


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



Re: Renaming a package, proper values for replaces/conflicts?

2004-03-07 Thread Andreas Metzler
On 2004-03-07 Colin Watson <[EMAIL PROTECTED]> wrote:
> On Sun, Mar 07, 2004 at 01:17:46PM +0100, Andreas Metzler wrote:
> > On 2004-03-07 Colin Watson <[EMAIL PROTECTED]> wrote:
> > > On Sun, Mar 07, 2004 at 11:23:40AM +0100, Andreas Metzler wrote:
> > >> When jumping from 4.3 to 4.5 I'd like to rename pgrep to pcregrep and
> > >> to provide seamless upgrades I'd introduce a dummy package pgrep
> > >> depending on pcregrep, however replaces/conflicts gives me a headache.

> > >> Package: pcregrep
> > >> Architecture: any
> > >> Depends: ${shlibs:Depends}
> > >> Conflicts: pgrep(<<4.5)
> > >> Replaces: pgrep(<<4.5)
 
> > >> Package: pgrep
> > >> Section: oldlibs
> > >> Architecture: all
> > >> Depends: pcregrep
 
> > >> This looks correct, doesn't it? Any[1] version of pgrep fulfilling (<<4.5)
> > >> is no dummy package and contains /usr/bin/pcregrep, therefore pcregrep
> > >> must conflict with it.
 
> > > I think you just need Replaces: pgrep (<< 4.5), not Conflicts: at all.
> > > It's a straightforward file conflict. Conflicts: makes the upgrade
> > > painful because it adds extra complexity to the unpack order: this is
> > > why policy recommends against it.

> Actually, Replaces:/Conflicts: has the special meaning of "this package
> completely replaces that other package", which I guess is what you want.
> Nothing depends on pgrep, so is the dummy package really needed?
[...]

Yes. If you have pgrep installed and there is no dummy package neither
"apt-get (dist-)upgrade" nor dselect will install pcregrep. The
outdated package will be kept indefinitely.
cu andreas
-- 
"See, I told you they'd listen to Reason," [SPOILER] Svfurlr fnlf,
fuhggvat qbja gur juveyvat tha.
Neal Stephenson in "Snow Crash"


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



Re: Renaming a package, proper values for replaces/conflicts?

2004-03-07 Thread Colin Watson
On Sun, Mar 07, 2004 at 11:23:40AM +0100, Andreas Metzler wrote:
> When jumping from 4.3 to 4.5 I'd like to rename pgrep to pcregrep and
> to provide seamless upgrades I'd introduce a dummy package pgrep
> depending on pcregrep, however replaces/conflicts gives me a headache.
> 
> Package: pcregrep
> Architecture: any
> Depends: ${shlibs:Depends}
> Conflicts: pgrep(<<4.5)
> Replaces: pgrep(<<4.5)
> 
> Package: pgrep
> Section: oldlibs
> Architecture: all
> Depends: pcregrep
> 
> This looks correct, doesn't it? Any[1] version of pgrep fulfilling (<<4.5)
> is no dummy package and contains /usr/bin/pcregrep, therefore pcregrep
> must conflict with it.

I think you just need Replaces: pgrep (<< 4.5), not Conflicts: at all.
It's a straightforward file conflict. Conflicts: makes the upgrade
painful because it adds extra complexity to the unpack order: this is
why policy recommends against it.

Cheers,

-- 
Colin Watson  [EMAIL PROTECTED]



Re: Renaming a package, proper values for replaces/conflicts?

2004-03-07 Thread Andreas Metzler
On 2004-03-07 Colin Watson <[EMAIL PROTECTED]> wrote:
> On Sun, Mar 07, 2004 at 11:23:40AM +0100, Andreas Metzler wrote:
>> When jumping from 4.3 to 4.5 I'd like to rename pgrep to pcregrep and
>> to provide seamless upgrades I'd introduce a dummy package pgrep
>> depending on pcregrep, however replaces/conflicts gives me a headache.

>> Package: pcregrep
>> Architecture: any
>> Depends: ${shlibs:Depends}
>> Conflicts: pgrep(<<4.5)
>> Replaces: pgrep(<<4.5)

>> Package: pgrep
>> Section: oldlibs
>> Architecture: all
>> Depends: pcregrep

>> This looks correct, doesn't it? Any[1] version of pgrep fulfilling (<<4.5)
>> is no dummy package and contains /usr/bin/pcregrep, therefore pcregrep
>> must conflict with it.

> I think you just need Replaces: pgrep (<< 4.5), not Conflicts: at all.
> It's a straightforward file conflict. Conflicts: makes the upgrade
> painful because it adds extra complexity to the unpack order: this is
> why policy recommends against it.

So it is no bug that this file-conflict

| X:/ dpkg -i /apt-zusatz/pgrep_4.3-0.0.1_i386.deb 
| dpkg - warning: downgrading pgrep from 4.5-0.1 to 4.3-0.0.1.
| (Reading database ... 9669 files and directories currently installed.)
| Preparing to replace pgrep 4.5-0.1 (using
| .../pgrep_4.3-0.0.1_i386.deb) ...
| Unpacking replacement pgrep ...
| dpkg: error processing /apt-zusatz/pgrep_4.3-0.0.1_i386.deb
| (--install):
|  trying to overwrite `/usr/bin/pcregrep', which is also in package
|  pcregrep
| Errors were encountered while processing:
|   /apt-zusatz/pgrep_4.3-0.0.1_i386.deb

is not expressed in Conflicts: because basically we only care about
upgrading?
cu andreas
-- 
"See, I told you they'd listen to Reason," [SPOILER] Svfurlr fnlf,
fuhggvat qbja gur juveyvat tha.
Neal Stephenson in "Snow Crash"



Re: Renaming a package, proper values for replaces/conflicts?

2004-03-07 Thread Colin Watson
On Sun, Mar 07, 2004 at 01:17:46PM +0100, Andreas Metzler wrote:
> On 2004-03-07 Colin Watson <[EMAIL PROTECTED]> wrote:
> > On Sun, Mar 07, 2004 at 11:23:40AM +0100, Andreas Metzler wrote:
> >> When jumping from 4.3 to 4.5 I'd like to rename pgrep to pcregrep and
> >> to provide seamless upgrades I'd introduce a dummy package pgrep
> >> depending on pcregrep, however replaces/conflicts gives me a headache.
> 
> >> Package: pcregrep
> >> Architecture: any
> >> Depends: ${shlibs:Depends}
> >> Conflicts: pgrep(<<4.5)
> >> Replaces: pgrep(<<4.5)
> 
> >> Package: pgrep
> >> Section: oldlibs
> >> Architecture: all
> >> Depends: pcregrep
> 
> >> This looks correct, doesn't it? Any[1] version of pgrep fulfilling (<<4.5)
> >> is no dummy package and contains /usr/bin/pcregrep, therefore pcregrep
> >> must conflict with it.
> 
> > I think you just need Replaces: pgrep (<< 4.5), not Conflicts: at all.
> > It's a straightforward file conflict. Conflicts: makes the upgrade
> > painful because it adds extra complexity to the unpack order: this is
> > why policy recommends against it.

Actually, Replaces:/Conflicts: has the special meaning of "this package
completely replaces that other package", which I guess is what you want.
Nothing depends on pgrep, so is the dummy package really needed?

> So it is no bug that this file-conflict
> 
> | X:/ dpkg -i /apt-zusatz/pgrep_4.3-0.0.1_i386.deb 
> | dpkg - warning: downgrading pgrep from 4.5-0.1 to 4.3-0.0.1.
> | (Reading database ... 9669 files and directories currently installed.)
> | Preparing to replace pgrep 4.5-0.1 (using
> | .../pgrep_4.3-0.0.1_i386.deb) ...
> | Unpacking replacement pgrep ...
> | dpkg: error processing /apt-zusatz/pgrep_4.3-0.0.1_i386.deb
> | (--install):
> |  trying to overwrite `/usr/bin/pcregrep', which is also in package
> |  pcregrep
> | Errors were encountered while processing:
> |   /apt-zusatz/pgrep_4.3-0.0.1_i386.deb
> 
> is not expressed in Conflicts: because basically we only care about
> upgrading?

That's really a bug in dpkg.

-- 
Colin Watson  [EMAIL PROTECTED]



Re: Renaming a package, proper values for replaces/conflicts?

2004-03-07 Thread Andreas Metzler
On 2004-03-07 Colin Watson <[EMAIL PROTECTED]> wrote:
> On Sun, Mar 07, 2004 at 01:17:46PM +0100, Andreas Metzler wrote:
> > On 2004-03-07 Colin Watson <[EMAIL PROTECTED]> wrote:
> > > On Sun, Mar 07, 2004 at 11:23:40AM +0100, Andreas Metzler wrote:
> > >> When jumping from 4.3 to 4.5 I'd like to rename pgrep to pcregrep and
> > >> to provide seamless upgrades I'd introduce a dummy package pgrep
> > >> depending on pcregrep, however replaces/conflicts gives me a headache.

> > >> Package: pcregrep
> > >> Architecture: any
> > >> Depends: ${shlibs:Depends}
> > >> Conflicts: pgrep(<<4.5)
> > >> Replaces: pgrep(<<4.5)
 
> > >> Package: pgrep
> > >> Section: oldlibs
> > >> Architecture: all
> > >> Depends: pcregrep
 
> > >> This looks correct, doesn't it? Any[1] version of pgrep fulfilling 
> > >> (<<4.5)
> > >> is no dummy package and contains /usr/bin/pcregrep, therefore pcregrep
> > >> must conflict with it.
 
> > > I think you just need Replaces: pgrep (<< 4.5), not Conflicts: at all.
> > > It's a straightforward file conflict. Conflicts: makes the upgrade
> > > painful because it adds extra complexity to the unpack order: this is
> > > why policy recommends against it.

> Actually, Replaces:/Conflicts: has the special meaning of "this package
> completely replaces that other package", which I guess is what you want.
> Nothing depends on pgrep, so is the dummy package really needed?
[...]

Yes. If you have pgrep installed and there is no dummy package neither
"apt-get (dist-)upgrade" nor dselect will install pcregrep. The
outdated package will be kept indefinitely.
cu andreas
-- 
"See, I told you they'd listen to Reason," [SPOILER] Svfurlr fnlf,
fuhggvat qbja gur juveyvat tha.
Neal Stephenson in "Snow Crash"