[pacman-dev] [PATCH 6/7] pmtest: install filesystem entries before packages

Andrew Gregory andrew.gregory.8 at gmail.com
Wed Feb 13 21:45:28 EST 2013


On Thu, 14 Feb 2013 12:12:50 +1000
Allan McRae <allan at archlinux.org> wrote:

> On 14/02/13 09:54, Andrew Gregory wrote:
> > local packages should not override explicitly set filesystem contents.
> 
> 
> I'm possibly missing something here...   local packages were being
> installed then filesystem contents were overriding it.   You have
> changed this the other way.
> 

That message may have been slightly misleading.  The later entries don't
overwrite the earlier ones. If there's a conflict they just fail.
Thus, the following would fail with packages installed first but works
with the filesystem installed first:

self.filesystem = ["dir/", "link -> dir/"]
pkg.files = ["link/file"]

> > Signed-off-by: Andrew Gregory <andrew.gregory.8 at gmail.com>
> > ---
> >  test/pacman/pmtest.py | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/test/pacman/pmtest.py b/test/pacman/pmtest.py
> > index d141567..6dc0ee6 100644
> > --- a/test/pacman/pmtest.py
> > +++ b/test/pacman/pmtest.py
> > @@ -168,15 +168,15 @@ def generate(self, pacman):
> >  
> >          # Filesystem
> >          vprint("    Populating file system")
> > -        for pkg in self.db["local"].pkgs:
> > -            vprint("\tinstalling %s" % pkg.fullname())
> > -            pkg.install_package(self.root)
> >          for f in self.filesystem:
> >              vprint("\t%s" % f)
> >              util.mkfile(self.root, f, f)
> >              path = os.path.join(self.root, f)
> >              if os.path.isfile(path):
> >                  os.utime(path, (355, 355))
> > +        for pkg in self.db["local"].pkgs:
> > +            vprint("\tinstalling %s" % pkg.fullname())
> > +            pkg.install_package(self.root)
> >  
> >          # Done.
> >          vprint("    Taking a snapshot of the file system")
> > 
> 
> 


More information about the pacman-dev mailing list