Package backend :: Package satellite_tools :: Module updatePackages
[hide private]
[frames] | no frames]

Module updatePackages

source code

Functions [hide private]
 
main() source code
 
process_package_data() source code
 
process_kickstart_trees() source code
 
process_sha256_packages() source code
 
process_package_files() source code
 
process_changelog() source code
Variables [hide private]
  OPTIONS = None
hash(x)
  debug = 0
  verbose = 0
  options_table = [<Option at 0x7f4fd2d0c518: --update-package-f...
  _get_path_query = '\n select id, checksum_type, checksu...
  _update_pkg_path_query = '\n update rhnPackage\n set ...
  _get_sha256_packages_query = '\nselect p.id, p.path\nfrom rhnP...
  _update_sha256_package = '\nupdate rhnPackage\nset checksum_id...
  _select_checksum_type_id = '\nselect id from rhnChecksumType w...
  _update_package_files = '\ndeclare\n checksum_id number;\nb...
  package_query = '\n select p.id as id,\n p.path a...
  package_capabilities = '\n select PC.name,\n PF.p...
  update_packagefile_checksum = '\n update rhnPackageFile\n ...
  insert_packagefile = '\n insert into rhnPackageFile (\n ...
  package_name_query = '\n select pn.name as name,\n ...
  package_repodata_delete = '\n delete\n from rhnPac...
  __package__ = 'backend.satellite_tools'
Variables Details [hide private]

options_table

Value:
[<Option at 0x7f4fd2d0c518: --update-package-files>,
 <Option at 0x7f4fd2d0c560: --update-sha256>,
 <Option at 0x7f4fd2d0c5a8: --update-filer>,
 <Option at 0x7f4fd2d0c5f0: --update-kstrees>,
 <Option at 0x7f4fd2d0c638: --update-changelog>,
 <Option at 0x7f4fd2d0c680: -v/--verbose>,
 <Option at 0x7f4fd2d0c6c8: --debug>]

_get_path_query

Value:
'''
        select id, checksum_type, checksum, path, epoch, new_path
        from (
                select rhnPackage.id,
                       rhnChecksumView.checksum_type,
                       rhnChecksumView.checksum,
                       rhnPackage.path,
                       rhnPackageEvr.epoch,
...

_update_pkg_path_query

Value:
'''
    update rhnPackage
       set path = :new_path
    where id = :the_id
'''

_get_sha256_packages_query

Value:
'''
select p.id, p.path
from rhnPackage p,
     rhnPackageRequires pr,
     rhnPackageCapability pc,
     rhnChecksumView cv
where pr.package_id = p.id and
      pr.capability_id = pc.id and
...

_update_sha256_package

Value:
'''
update rhnPackage
set checksum_id = lookup_checksum(:ctype, :csum),
    path = :path
where id = :id
'''

_select_checksum_type_id

Value:
'''
select id from rhnChecksumType where label = :ctype
'''

_update_package_files

Value:
'''
declare
    checksum_id number;
begin
    begin
        insert into rhnChecksum values (
            sequence_nextval(\'rhnChecksum_seq\'),
            :ctype_id,
...

package_query

Value:
'''
    select p.id as id,
           p.path as path,
           count(pf.capability_id) as filecount,
           count(pf.checksum_id) as nonnullcsums
      from rhnPackage p left outer join rhnPackageFile pf
        on p.id = pf.package_id
     where path is not null
...

package_capabilities

Value:
'''
    select PC.name,
           PF.package_id,
           PF.capability_id,
           C.checksum,
           C.checksum_type
      from rhnPackageFile PF left outer join rhnChecksumView C
        on PF.checksum_id = C.id,
...

update_packagefile_checksum

Value:
'''
    update rhnPackageFile
       set checksum_id = lookup_checksum(:ctype, :csum)
     where package_id = :pid and
           capability_id = :cid
'''

insert_packagefile

Value:
'''
    insert into rhnPackageFile (
            package_id, capability_id, device, inode, file_mode, usern\
ame,
            groupname, rdev, file_size, mtime, linkto, flags, verifyfl\
ags,
            lang, checksum_id
           )
...

package_name_query

Value:
'''
    select pn.name as name,
           evr_t_as_vre_simple(pevr.evr) as vre,
           pa.label as arch
      from rhnPackage p,
           rhnPackageName pn,
           rhnPackageEVR pevr,
           rhnPackageArch pa
...

package_repodata_delete

Value:
'''
    delete
          from rhnPackageRepoData
         where package_id = :pid
'''