On Fri, Apr 22, 2005 at 08:45:23AM +0200, Matthias Kurz wrote:
> On Thu, Apr 21, 2005, Michael van Elst wrote:
>
> > On Thu, Apr 21, 2005 at 12:13:38PM +0200, Matthias Kurz wrote:
> [...]
> > Packages in RPM/PKG are only relevant when you do not upgrade
> > but reinstall the version (with the same options or a superset of
> > the options) that was once installed.
>
> Maybe it was not with upgrade (-U) but with some other option(s). I
> observed, that packages that _should_ have been recompiled - because
> one or more prerequisites were recompiled - were not recompiled. Instead
> the binary package from RPM/PKG was reinstalled. This happened for
> installed packages where no new source packages existed. From then on
> i always used the "-u" option.
If a package is a requirement and you don't specify -U, it might be
installed from an already existing binary package in RPM/PKG. That's
what it is supposed to do as it can safely assume that you do not
tamper with the packages in RPM/PKG.
If it is a reverse requirement, i.e you install some package that
the former depends on, then it must be recompiled and anything
in RPM/PKG must be ignored.
If not then it is a bug :)
> > > But. To solve the problem of duplicate packages in the "build" part
> > > probably adds too much complexity in the wrong place. I think it would
> > > be better (easier ?) to put this functionality in the "index" part. E.g.
> > > an option -d for "delete older versions of a package".
> >
> > I do not really understand your setup. Do you compute the index
> > directly from RPM/PKG on the build host ?
>
> I have one build host for every platform/release. There the packages
> are compiled from sources, leading to binary packages under RPM/PKG. In
> this RPM/PKG i run "openpkg index" and it is mounted inside a hierarchy
> that is accessible over anonymous ftp. From there the "slave" machines
> get their binary packages.
I wouldn't do that but copy or move away the generated binary
packages.
> Whenever a new package is compiled from sources, that means, when a new
> binary package is created, the previous version of the binary package
> _remains_ in RPM/PKG. So the different versions of a binary package add
> up.
Yes. That's what rpm does :-/
> When i delete RPM/PKG completely, there is nothing left to install
> the slave hosts. When i _move_ everything from RPM/PKG to another place,
> then i just have the same problem (many versions of the binary packages)
> in this other place.
Maybe this helps:
#!/bin/sh
bin="$1"
dst="$2"
copy="$dst/"`basename "$bin"`
cp "$bin" "$copy"
name=`openpkg rpm -q --qf '%{name}' -p "$bin"`
for b in $dst/$name-*; do
if [ "$b" = "$copy" ]; then
:
else
n=`openpkg rpm -q --qf '%{name}' -p "$b"`
if [ "$n" = "$name" ]; then
rm "$b"
fi
fi
done
Greetings,
--
Michael van Elst
Internet: [EMAIL PROTECTED]
"A potential Snark may lurk in every tree."
______________________________________________________________________
The OpenPKG Project www.openpkg.org
User Communication List [email protected]