FOSSology  4.4.0
Open Source License Compliance by Open Source Software
common-pkg.php File Reference

This file contains common functions for the package agent. More...

Go to the source code of this file.

Functions

 GetPkgMimetypes ()
 Get package mimetype. More...
 
 IncrSrcBinCounts ($uploadtree_row, $MimetypeArray, &$NumSrcPkgs, &$NumBinPkgs, &$NumBinNoSrcPkgs)
 Increment counts of source package, binary package, and binary with no source. More...
 

Detailed Description

This file contains common functions for the package agent.

Definition in file common-pkg.php.

Function Documentation

◆ GetPkgMimetypes()

GetPkgMimetypes ( )

Get package mimetype.

Returns
Array of mimetype_pk's in the following order:
  1. application/x-rpm
  2. application/x-debian-package
  3. application/x-debian-source

Definition at line 22 of file common-pkg.php.

◆ IncrSrcBinCounts()

IncrSrcBinCounts (   $uploadtree_row,
  $MimetypeArray,
$NumSrcPkgs,
$NumBinPkgs,
$NumBinNoSrcPkgs 
)

Increment counts of source package, binary package, and binary with no source.

Parameters
array$uploadtree_rowUploadtree row + pfile_mimetypefk
array$MimetypeArrayAssoc array of mimetype names and mimetype_pk (from GetPkgMimetypes)
[out]int&$NumSrcPkgsIncremented if this is a source package
[out]int&$NumBinPkgsIncremented if this is a binary package
[out]int&$NumBinNoSrcPkgsIncremented if this binary pkg has no source package
Returns
None. This function increments values passed in by reference.

Definition at line 60 of file common-pkg.php.