the rpm regexp was wrong for local downloads
While I debugged this, I also reworked the prints
This commit is contained in:
parent
a085dbbf86
commit
2d98387c11
@ -545,7 +545,7 @@ def _check_repo_buildsuccess(self, p, opts):
|
|||||||
|
|
||||||
if not tocheckrepos:
|
if not tocheckrepos:
|
||||||
msg = 'Missing i586 and x86_64 in the repo list'
|
msg = 'Missing i586 and x86_64 in the repo list'
|
||||||
print 'UPDATED', msg
|
print msg
|
||||||
self._check_repo_change_review_state(opts, p.request, 'new', message=msg)
|
self._check_repo_change_review_state(opts, p.request, 'new', message=msg)
|
||||||
# Next line not needed, but for documentation
|
# Next line not needed, but for documentation
|
||||||
p.updated = True
|
p.updated = True
|
||||||
@ -612,7 +612,7 @@ def _check_repo_buildsuccess(self, p, opts):
|
|||||||
return False
|
return False
|
||||||
if foundbuilding:
|
if foundbuilding:
|
||||||
msg = '%s is still building for repository %s' % (p.spackage, foundbuilding)
|
msg = '%s is still building for repository %s' % (p.spackage, foundbuilding)
|
||||||
print 'UPDATED', msg
|
print msg
|
||||||
self._check_repo_change_review_state(opts, p.request, 'new', message=msg)
|
self._check_repo_change_review_state(opts, p.request, 'new', message=msg)
|
||||||
# Next line not needed, but for documentation
|
# Next line not needed, but for documentation
|
||||||
p.updated = True
|
p.updated = True
|
||||||
@ -620,7 +620,7 @@ def _check_repo_buildsuccess(self, p, opts):
|
|||||||
if foundfailed:
|
if foundfailed:
|
||||||
msg = '%s failed to build in repository %s - not accepting' % (p.spackage, foundfailed)
|
msg = '%s failed to build in repository %s - not accepting' % (p.spackage, foundfailed)
|
||||||
# failures might be temporary, so don't autoreject but wait for a human to check
|
# failures might be temporary, so don't autoreject but wait for a human to check
|
||||||
print 'UPDATED', msg
|
print msg
|
||||||
self._check_repo_change_review_state(opts, p.request, 'new', message=msg)
|
self._check_repo_change_review_state(opts, p.request, 'new', message=msg)
|
||||||
# Next line not needed, but for documentation
|
# Next line not needed, but for documentation
|
||||||
p.updated = True
|
p.updated = True
|
||||||
@ -832,7 +832,7 @@ def _check_repo_group(self, id_, reqs, opts):
|
|||||||
i = self._check_repo_download(p, opts)
|
i = self._check_repo_download(p, opts)
|
||||||
if p.error:
|
if p.error:
|
||||||
if not p.updated:
|
if not p.updated:
|
||||||
print 'UPDATED', p.error
|
print p.error
|
||||||
self._check_repo_change_review_state(opts, p.request, 'new', message=p.error)
|
self._check_repo_change_review_state(opts, p.request, 'new', message=p.error)
|
||||||
p.updated = True
|
p.updated = True
|
||||||
else:
|
else:
|
||||||
@ -926,7 +926,7 @@ def _check_repo_group(self, id_, reqs, opts):
|
|||||||
msg = 'Please make sure to wait before these depencencies are in %s: %s' % (p.tproject, ', '.join(smissing))
|
msg = 'Please make sure to wait before these depencencies are in %s: %s' % (p.tproject, ', '.join(smissing))
|
||||||
if not p.updated:
|
if not p.updated:
|
||||||
self._check_repo_change_review_state(opts, p.request, 'new', message=msg)
|
self._check_repo_change_review_state(opts, p.request, 'new', message=msg)
|
||||||
print 'UPDATED', msg
|
print msg
|
||||||
p.updated = True
|
p.updated = True
|
||||||
else:
|
else:
|
||||||
print msg
|
print msg
|
||||||
@ -971,14 +971,15 @@ def _check_repo_group(self, id_, reqs, opts):
|
|||||||
os.symlink(d, os.path.join(dir, os.path.basename(d)))
|
os.symlink(d, os.path.join(dir, os.path.basename(d)))
|
||||||
|
|
||||||
repochecker = os.path.join(self.repocheckerdir, 'repo-checker.pl')
|
repochecker = os.path.join(self.repocheckerdir, 'repo-checker.pl')
|
||||||
civs = "LC_ALL=C perl %s '%s' -r %s -f %s 2>&1" % (repochecker, destdir, self.repodir, params_file.name)
|
civs = "LC_ALL=C perl %s '%s' -r %s -f %s" % (repochecker, destdir, self.repodir, params_file.name)
|
||||||
#print civs
|
#print civs
|
||||||
#continue
|
#continue
|
||||||
#exit(1)
|
#exit(1)
|
||||||
p = subprocess.Popen(civs, shell=True, stdout=subprocess.PIPE, close_fds=True)
|
p = subprocess.Popen(civs, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
|
||||||
#ret = os.waitpid(p.pid, 0)[1]
|
#ret = os.waitpid(p.pid, 0)[1]
|
||||||
output, _ = p.communicate()
|
stdoutdata, stderrdata = p.communicate()
|
||||||
ret = p.returncode
|
ret = p.returncode
|
||||||
|
#print ret, stdoutdata, stderrdata
|
||||||
if not ret: # skip the others
|
if not ret: # skip the others
|
||||||
for p, repo, downloads in dirstolink:
|
for p, repo, downloads in dirstolink:
|
||||||
p.goodrepo = repo
|
p.goodrepo = repo
|
||||||
@ -988,13 +989,13 @@ def _check_repo_group(self, id_, reqs, opts):
|
|||||||
updated = {}
|
updated = {}
|
||||||
|
|
||||||
if ret:
|
if ret:
|
||||||
print output, set(map(lambda x: x.request, reqs))
|
#print stdoutdata, set(map(lambda x: x.request, reqs))
|
||||||
|
|
||||||
for p in reqs:
|
for p in reqs:
|
||||||
if updated.get(p.request, False) or p.updated:
|
if updated.get(p.request, False) or p.updated:
|
||||||
continue
|
continue
|
||||||
print 'UPDATED', output
|
print stdoutdata
|
||||||
self._check_repo_change_review_state(opts, p.request, 'new', message=output)
|
self._check_repo_change_review_state(opts, p.request, 'new', message=stdoutdata)
|
||||||
p.updated = True
|
p.updated = True
|
||||||
updated[p.request] = 1
|
updated[p.request] = 1
|
||||||
return
|
return
|
||||||
|
@ -77,7 +77,11 @@ sub write_package($$) {
|
|||||||
my $out = CreatePackageDescr::package_snippet($package);
|
my $out = CreatePackageDescr::package_snippet($package);
|
||||||
|
|
||||||
my $name = basename($package);
|
my $name = basename($package);
|
||||||
$name =~ s,^[^-]*-(.*)\.rpm,$1,;
|
if ($name =~ m/^[a-z0-9]{32}-/) { # repo cache
|
||||||
|
$name =~ s,^[^-]*-(.*)\.rpm,$1,;
|
||||||
|
} else {
|
||||||
|
$name =~ s,^(.*)-[^-]*-[^-]*.rpm,$1,;
|
||||||
|
}
|
||||||
|
|
||||||
if ( $ignore == 1 && defined $toignore{$name} ) {
|
if ( $ignore == 1 && defined $toignore{$name} ) {
|
||||||
return;
|
return;
|
||||||
@ -104,16 +108,17 @@ foreach my $package (@rpms) {
|
|||||||
|
|
||||||
close(PACKAGES);
|
close(PACKAGES);
|
||||||
|
|
||||||
#print "calling installcheck\n";
|
#print STDERR "calling installcheck\n";
|
||||||
#print Dumper(%targets);
|
#print STDERR Dumper(\%targets);
|
||||||
open( INSTALL, "/usr/bin/installcheck x86_64 $pfile 2>&1|" )
|
open( INSTALL, "/usr/bin/installcheck x86_64 $pfile 2>&1|" )
|
||||||
|| die 'exec installcheck';
|
|| die 'exec installcheck';
|
||||||
while (<INSTALL>) {
|
while (<INSTALL>) {
|
||||||
chomp;
|
chomp;
|
||||||
|
# print STDERR "$_\n";
|
||||||
next if (m/unknown line:.*Flx/);
|
next if (m/unknown line:.*Flx/);
|
||||||
if ( $_ =~ m/can't install (.*)-([^-]*)-[^-\.]/ ) {
|
if ( $_ =~ m/can't install (.*)-([^-]*)-[^-\.]/ ) {
|
||||||
|
|
||||||
# print "CI $1\n";
|
# print STDERR "CI $1 " . $targets{$1} . "\n";
|
||||||
if ( defined $targets{$1} ) {
|
if ( defined $targets{$1} ) {
|
||||||
print "$_\n";
|
print "$_\n";
|
||||||
while (<INSTALL>) {
|
while (<INSTALL>) {
|
||||||
@ -127,18 +132,18 @@ while (<INSTALL>) {
|
|||||||
}
|
}
|
||||||
close(INSTALL);
|
close(INSTALL);
|
||||||
|
|
||||||
#print "checking file conflicts\n";
|
#print STDERR "checking file conflicts\n";
|
||||||
my $cmd = sprintf( "perl %s/findfileconflicts $pfile", dirname($0) );
|
my $cmd = sprintf( "perl %s/findfileconflicts $pfile", dirname($0) );
|
||||||
open( INSTALL, "$cmd |" ) || die 'exec fileconflicts';
|
open( INSTALL, "$cmd |" ) || die 'exec fileconflicts';
|
||||||
my $inc = 0;
|
my $inc = 0;
|
||||||
while (<INSTALL>) {
|
while (<INSTALL>) {
|
||||||
chomp;
|
chomp;
|
||||||
|
|
||||||
#print STDERR "$_\n";
|
# print STDERR "$_\n";
|
||||||
if ( $_ =~ m/found conflict of (.*)-[^-]*-[^-]* with (.*)-[^-]*-[^-]*:/ ) {
|
if ( $_ =~ m/found conflict of (.*)-[^-]*-[^-]* with (.*)-[^-]*-[^-]*:/ ) {
|
||||||
$inc = 0;
|
$inc = 0;
|
||||||
|
|
||||||
#print STDERR "F $1 $2\n";
|
# print STDERR "F $1 $2 -$targets{$1}-$targets{$2}-\n";
|
||||||
if ( defined $targets{$1} || defined $targets{$2} ) {
|
if ( defined $targets{$1} || defined $targets{$2} ) {
|
||||||
$inc = 1;
|
$inc = 1;
|
||||||
$ret = 1;
|
$ret = 1;
|
||||||
@ -150,4 +155,5 @@ while (<INSTALL>) {
|
|||||||
}
|
}
|
||||||
close(INSTALL);
|
close(INSTALL);
|
||||||
|
|
||||||
|
#print STDERR "RET $ret\n";
|
||||||
exit($ret);
|
exit($ret);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user