FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 01-11-2008, 07:03 PM
Nagy Gabor
 
Default New sync1007.py pactest

>From 49a346d598433b46e19f841432938f84df480c28 Mon Sep 17 00:00:00 2001
From: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Date: Fri, 11 Jan 2008 21:02:50 +0100
Subject: [PATCH] New sync1007.py pactest

This pactest checks what happens when more than one package can replace the same package.

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
---
pactest/tests/sync1007.py | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
create mode 100644 pactest/tests/sync1007.py

diff --git a/pactest/tests/sync1007.py b/pactest/tests/sync1007.py
new file mode 100644
index 0000000..6f5d9f6
--- /dev/null
+++ b/pactest/tests/sync1007.py
@@ -0,0 +1,19 @@
+self.description = "Multiple packages replace the same package"
+
+sp1 = pmpkg("alternative1")
+sp1.replaces = [ "pkg" ]
+self.addpkg2db("sync", sp1)
+
+sp2 = pmpkg("alternative2")
+sp2.replaces = [ "pkg" ]
+self.addpkg2db("sync", sp2)
+
+lp = pmpkg("pkg", "1.0-1")
+self.addpkg2db("local", lp)
+
+self.args = "-Su"
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("!PKG_EXIST=pkg1")
+self.addrule("PKG_EXIST=alternative1")
+self.addrule("!PKG_EXIST=alternative2")
--
1.5.3.7


_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 01-14-2008, 01:55 PM
Nagy Gabor
 
Default New sync1007.py pactest

> >From 49a346d598433b46e19f841432938f84df480c28 Mon Sep 17 00:00:00
> >2001
> From: Nagy Gabor <ngaba@bibl.u-szeged.hu>
> Date: Fri, 11 Jan 2008 21:02:50 +0100
> Subject: [PATCH] New sync1007.py pactest
>
> This pactest checks what happens when more than one package can
> replace the same package.
>
> Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
> ---
> pactest/tests/sync1007.py | 19 +++++++++++++++++++
> 1 files changed, 19 insertions(+), 0 deletions(-)
> create mode 100644 pactest/tests/sync1007.py
>
> diff --git a/pactest/tests/sync1007.py b/pactest/tests/sync1007.py
> new file mode 100644
> index 0000000..6f5d9f6
> --- /dev/null
> +++ b/pactest/tests/sync1007.py
> @@ -0,0 +1,19 @@
> +self.description = "Multiple packages replace the same package"
> +
> +sp1 = pmpkg("alternative1")
> +sp1.replaces = [ "pkg" ]
> +self.addpkg2db("sync", sp1)
> +
> +sp2 = pmpkg("alternative2")
> +sp2.replaces = [ "pkg" ]
> +self.addpkg2db("sync", sp2)
> +
> +lp = pmpkg("pkg", "1.0-1")
> +self.addpkg2db("local", lp)
> +
> +self.args = "-Su"
> +
> +self.addrule("PACMAN_RETCODE=0")
> +self.addrule("!PKG_EXIST=pkg1")
> +self.addrule("PKG_EXIST=alternative1")
> +self.addrule("!PKG_EXIST=alternative2")

Wow, I made a patch for this, and during testing I realized that
sync134.py and sync135.py expect the opposite behavior.

So, what to do if more packages can replace one?
1. Assume that we have a SET of replacers (sync134.py)
2. Assume that we one replacer is enough (sync1007.py)

Imho 2. is more intuitive, when package foo replaces bar, I think that
foo is "enough" as a replacer.
But 1. is also reasonable...

Bye

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 01-14-2008, 02:26 PM
"Roman Kyrylych"
 
Default New sync1007.py pactest

2008/1/14, Nagy Gabor <ngaba@bibl.u-szeged.hu>:
> > >From 49a346d598433b46e19f841432938f84df480c28 Mon Sep 17 00:00:00
> > >2001
> > From: Nagy Gabor <ngaba@bibl.u-szeged.hu>
> > Date: Fri, 11 Jan 2008 21:02:50 +0100
> > Subject: [PATCH] New sync1007.py pactest
> >
> > This pactest checks what happens when more than one package can
> > replace the same package.
> >
> > Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
> > ---
> > pactest/tests/sync1007.py | 19 +++++++++++++++++++
> > 1 files changed, 19 insertions(+), 0 deletions(-)
> > create mode 100644 pactest/tests/sync1007.py
> >
> > diff --git a/pactest/tests/sync1007.py b/pactest/tests/sync1007.py
> > new file mode 100644
> > index 0000000..6f5d9f6
> > --- /dev/null
> > +++ b/pactest/tests/sync1007.py
> > @@ -0,0 +1,19 @@
> > +self.description = "Multiple packages replace the same package"
> > +
> > +sp1 = pmpkg("alternative1")
> > +sp1.replaces = [ "pkg" ]
> > +self.addpkg2db("sync", sp1)
> > +
> > +sp2 = pmpkg("alternative2")
> > +sp2.replaces = [ "pkg" ]
> > +self.addpkg2db("sync", sp2)
> > +
> > +lp = pmpkg("pkg", "1.0-1")
> > +self.addpkg2db("local", lp)
> > +
> > +self.args = "-Su"
> > +
> > +self.addrule("PACMAN_RETCODE=0")
> > +self.addrule("!PKG_EXIST=pkg1")
> > +self.addrule("PKG_EXIST=alternative1")
> > +self.addrule("!PKG_EXIST=alternative2")
>
> Wow, I made a patch for this, and during testing I realized that
> sync134.py and sync135.py expect the opposite behavior.
>
> So, what to do if more packages can replace one?
> 1. Assume that we have a SET of replacers (sync134.py)
> 2. Assume that we one replacer is enough (sync1007.py)
>
> Imho 2. is more intuitive, when package foo replaces bar, I think that
> foo is "enough" as a replacer.
> But 1. is also reasonable...
>

I don't think there should be situations when more than one packages
with replaces=('foobar')
Replaces are used when a package changed its name (fglrx->catalyst)
or when developers decided to go with a better alternative (cdrtools->cdrkit).
If there are more than one replacing package then its a packaging
error, and pacman shouldn't handle this, so #2 is ok.

--
Roman Kyrylych (*оман Кирилич)
_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 01-14-2008, 02:45 PM
Nagy Gabor
 
Default New sync1007.py pactest

> I don't think there should be situations when more than one packages
> with replaces=('foobar')
> Replaces are used when a package changed its name (fglrx->catalyst)
> or when developers decided to go with a better alternative
> (cdrtools->cdrkit). If there are more than one replacing package then
> its a packaging error, and pacman shouldn't handle this, so #2 is ok.
>
And imho multiple repos (testing...) can also lead to problems with #1.
Bye

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 

Thread Tools




All times are GMT. The time now is 10:56 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org