Re: [Pkgutil-users] bldcat problem when packages are renamed
Status: Beta
Brought to you by:
bonivart
|
From: Mark R B. <ma...@pr...> - 2010-11-25 17:04:14
|
On Wed 24/11/10 14:00 , Peter Bonivart bon...@op... sent: > On Wed, Nov 24, 2010 at 2:36 PM, Peter Bonivart bonivart > @opencsw.org> wrote:> On Wed, Nov 24, 2010 at 1:21 PM, Mark R > Bannister> ma > rk...@pr...> wrote:>> I've hit an issue where bldcat continues to re-use > old information in the catalog if the .pkg or .pkg.gz file has > been>> renamed only (but the checksum is the same). > When it re-uses old information, it also re-uses the old filename, > which>> obviously then breaks when a client tries to get > it with pkgutil.>> > >> Would it be possible to fix bldcat so that it > handles renames properly when re-using old info?> > > I just checked in r321, it should take care of > it.> > > http://pkgutil.svn.sourceforge.net/viewvc/pkgutil/trunk/bldcat? > revision=321 > On Dagoberts suggestion I redid the fix so it still reuses the info > but inserts the new filename. Otherwise it would inspect the package > as a new one and be slower. > > It's in r322, http://pkgutil.svn.sourceforge.net/viewvc/pkgutil/trunk/bldcat? > revision=322 > /peter Hi Peter, I have a problem with r322. It doesn't cope very well with GPG signed catalog files: I get - "Use of uninitialized value $hash in hash element" errors. Suggest, instead of: my $hash = $line[4]; $oldcatalog{$hash} = \@line; my $pkgfile = $line[3]; $oldcatalog_bypkgfile{$pkgfile} = \@line; You do: if (scalar(@line) >= 8) { my $hash = $line[4]; $oldcatalog{$hash} = \@line; my $pkgfile = $line[3]; $oldcatalog_bypkgfile{$pkgfile} = \@line; } Regards, Mark. |