[opensuse-buildservice] imported package was not deleted when I deleted the built packages from original arch

Hello, We have our own private OBS 2.3.6 instance. I have a project which has two architectures which are i586 and armv7l. I have a cross tool package and configure ExportFilter in project conf like this "ExportFilter: \.armv7l\.rpm$ armv7l" Suppose the cross tool package is 'a' and the result rpms are a.i586.rpm, cross-a.armv7l.rpm and cross-a.armv7hl.rpm. After package 'a' has been built, I have cross-a.rpm in 'armv7l/:full' and the cross tool is available for armv7l repository. But If I disable and wipe the package 'a' from i586 arch, the cross-a package is still available for armv7l repository. I observed that the import event handling code in scheduler had some hole. The i586 scheduler sent import event along with 'replaced.xml' which has the list of packages with 'id'. When armv7l scheduler got the event, it created oldrepo and the key was the just name of rpm plus '.rpm'. In this case the oldrepo had only one entry which was cross-a.armv7hl.rpm because the keys from two packages would be same and cross-a.armv7hl.rpm overwrote cross-a.armv7l.rpm. When scheduler tried to delete imported package from armv7l/:full, it compared 'id' of package. But it was different in this case. because the package in :full was cross-a.armv7l.rpm but the compared 'id' was from cross-a.armv7hl.rpm. So, the scheduler didn't delete it from armv7l/:full. -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org

Any idea regarding it? 2013/5/2 UkJung Kim <ukjung.kim@gmail.com>:
Hello,
We have our own private OBS 2.3.6 instance.
I have a project which has two architectures which are i586 and armv7l. I have a cross tool package and configure ExportFilter in project conf like this "ExportFilter: \.armv7l\.rpm$ armv7l"
Suppose the cross tool package is 'a' and the result rpms are a.i586.rpm, cross-a.armv7l.rpm and cross-a.armv7hl.rpm. After package 'a' has been built, I have cross-a.rpm in 'armv7l/:full' and the cross tool is available for armv7l repository.
But If I disable and wipe the package 'a' from i586 arch, the cross-a package is still available for armv7l repository.
I observed that the import event handling code in scheduler had some hole. The i586 scheduler sent import event along with 'replaced.xml' which has the list of packages with 'id'. When armv7l scheduler got the event, it created oldrepo and the key was the just name of rpm plus '.rpm'. In this case the oldrepo had only one entry which was cross-a.armv7hl.rpm because the keys from two packages would be same and cross-a.armv7hl.rpm overwrote cross-a.armv7l.rpm.
When scheduler tried to delete imported package from armv7l/:full, it compared 'id' of package. But it was different in this case. because the package in :full was cross-a.armv7l.rpm but the compared 'id' was from cross-a.armv7hl.rpm. So, the scheduler didn't delete it from armv7l/:full. -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org

On Tue, Jul 23, 2013 at 03:26:06PM +0900, UkJung Kim wrote:
Any idea regarding it?
I think the easiest fix is to simply prepend the 'id' to the file name in oldrepo when the replaced.xml file is read in, i.e. change my $replaced = (readxml("$jobdir/replaced.xml", $BSXML::dir, 1) || {})->{'entry'}; $oldrepo = {}; for (@{$replaced || []}) { my $rp = $_->{'name'}; $_->{'name'} =~ s/\.[^\.]*$//; $_->{'source'} = 1; $oldrepo->{$rp} = $_; } to my $replaced = (readxml("$jobdir/replaced.xml", $BSXML::dir, 1) || {})->{'entry'}; $oldrepo = {}; for (@{$replaced || []}) { my $rp = "$_->{'id'}/$_->{'name'}"; $_->{'name'} =~ s/\.[^\.]*$//; $_->{'source'} = 1; $oldrepo->{$rp} = $_; } I.e. change my $rp = $_->{'name'}; to my $rp = "$_->{'id'}/$_->{'name'}"; Does that work for you? Cheers, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Jeff Hawn, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (2)
-
Michael Schroeder
-
UkJung Kim