Red Hat Bugzilla – Bug 659364
packages.listFiles() does not list objects without checksums (directories, links)
Last modified: 2010-12-16 11:35:49 EST
Description of problem:
API call packages.listFiles() would not return package objects which
have (by definition) no checksum (directories, symbolic links).
Version-Release number of selected component (if applicable):
spacewalk-java-1.2.39-29 / stock Satellite 5.4
Steps to Reproduce:
1. Satellite 5.4, some content imported
2. Find a package id of a package which is known to contain directory
in its file list
3. Use following script to see whether or not are the package directories
contained in the file list returned by packages.listFiles():
my $HOST = 'satellite.domain.com';
my $user = 'user';
my $pass = 'password';
my $pid = 0;
my $client = new Frontier::Client(url => "https://$HOST/rpc/api");
my $session = $client->call('auth.login',$user, $pass);
my $pkglist = $client->call('packages.list_files', $session, $pid);
packages.listFiles() does not return package objects without checksums.
packages.listFiles() will return package objects without checksums.
TO_CHAR(F.mtime, 'YYYY-MM-DD HH24:MI:SS') AS MTIME
FROM rhnPackageFile F, rhnPackageCapability C,
WHERE F.package_id = :pid
AND F.capability_id = C.id
AND F.checksum_id = CS.id
ORDER BY UPPER(C.name)
Use of the inner join in the above statement is incorrect.
spacewalk.git master: 2ae1c1a73d332736e652cb9e2927d3d35aaa6f92
Changing to VERIFIED:
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
The API call packages.listFiles() did not list package objects which have by definition no checksums (directories, symbolic links). This update ensures all package objects are returned, including those without checksums.