{
    "content": [
        {
            "type": "text",
            "text": "# Dpkg::Source::Package (perldoc)\n\n## NAME\n\nDpkg::Source::Package - manipulate Debian source packages\n\n## DESCRIPTION\n\nThis module provides a class that can manipulate Debian source packages. While it supports both\nthe extraction and the creation of source packages, the only API that is officially supported is\nthe one that supports the extraction of the source package.\n\n## Sections\n\n- **NAME**\n- **DESCRIPTION**\n- **FUNCTIONS** (1 subsections)\n- **METHODS**\n- **CHANGES** (1 subsections)\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Dpkg::Source::Package",
        "section": "",
        "mode": "perldoc",
        "summary": "Dpkg::Source::Package - manipulate Debian source packages",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "FUNCTIONS",
                "lines": 3,
                "subsections": [
                    {
                        "name": "set_default_diff_ignore_regex",
                        "lines": 5
                    }
                ]
            },
            {
                "name": "METHODS",
                "lines": 66,
                "subsections": []
            },
            {
                "name": "CHANGES",
                "lines": 18,
                "subsections": [
                    {
                        "name": "get_default_tar_ignore_pattern",
                        "lines": 5
                    }
                ]
            }
        ],
        "sections": {
            "NAME": {
                "content": "Dpkg::Source::Package - manipulate Debian source packages\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This module provides a class that can manipulate Debian source packages. While it supports both\nthe extraction and the creation of source packages, the only API that is officially supported is\nthe one that supports the extraction of the source package.\n",
                "subsections": []
            },
            "FUNCTIONS": {
                "content": "$string = getdefaultdiffignoreregex()\nReturns the default diff ignore regex.\n",
                "subsections": [
                    {
                        "name": "set_default_diff_ignore_regex",
                        "content": "Set a regex as the new default diff ignore regex.\n\n@array = getdefaulttarignorepattern()\nReturns the default tar ignore pattern, as an array.\n"
                    }
                ]
            },
            "METHODS": {
                "content": "$p = Dpkg::Source::Package->new(%opts, options => {})\nCreates a new object corresponding to a source package. When the key filename is set to a\n.dsc file, it will be used to initialize the source package with its description. Otherwise\nif the format key is set to a valid value, the object will be initialized for that format\n(since dpkg 1.19.3).\n\nThe options key is a hash ref which supports the following options:\n\nskipdebianization\nIf set to 1, do not apply Debian changes on the extracted source package.\n\nskippatches\nIf set to 1, do not apply Debian-specific patches. This options is specific for\nsource packages using format \"2.0\" and \"3.0 (quilt)\".\n\nrequirevalidsignature\nIf set to 1, the checksignature() method will be stricter and will error out if the\nsignature can't be verified.\n\nrequirestrongchecksums\nIf set to 1, the checkchecksums() method will be stricter and will error out if\nthere is no strong checksum.\n\ncopyorigtarballs\nIf set to 1, the extraction will copy the upstream tarballs next the target\ndirectory. This is useful if you want to be able to rebuild the source package after\nits extraction.\n\n$p->getfilename()\nReturns the filename of the DSC file.\n\n$p->getfiles()\nReturns the list of files referenced by the source package. The filenames usually do not\nhave any path information.\n\n$p->checkchecksums()\nVerify the checksums embedded in the DSC file. It requires the presence of the other files\nconstituting the source package. If any inconsistency is discovered, it immediately errors\nout. It will make sure at least one strong checksum is present.\n\nIf the object has been created with the \"requirestrongchecksums\" option, then any problem\nwill result in a fatal error.\n\n$p->getupstreamsigningkey($dir)\nGet the filename for the upstream key.\n\n$p->checkoriginaltarballsignature($dir, @asc)\nVerify the original upstream tarball signatures @asc using the upstream public keys. It\nrequires the origin upstream tarballs, their signatures and the upstream signing key, as\nfound in an unpacked source tree $dir. If any inconsistency is discovered, it immediately\nerrors out.\n\n$bool = $p->issigned()\nReturns 1 if the DSC files contains an embedded OpenPGP signature. Otherwise returns 0.\n\n$p->checksignature()\nImplement the same OpenPGP signature check that dpkg-source does. In case of problems, it\nprints a warning or errors out.\n\nIf the object has been created with the \"requirevalidsignature\" option, then any problem\nwill result in a fatal error.\n\n$p->extract($targetdir)\nExtracts the source package in the target directory $targetdir. Beware that if $targetdir\nalready exists, it will be erased (as long as the nooverwritedir option is set).\n",
                "subsections": []
            },
            "CHANGES": {
                "content": "Version 2.01 (dpkg 1.20.1)\nNew method: getupstreamsigningkey().\n\nVersion 2.00 (dpkg 1.20.0)\nNew method: checkoriginaltarballsignature().\n\nRemove variable: $diffignoredefaultregexp.\n\nHide variable: @tarignoredefaultpattern.\n\nVersion 1.03 (dpkg 1.19.3)\nNew option: format in new().\n\nVersion 1.02 (dpkg 1.18.7)\nNew option: requirestrongchecksums in checkchecksums().\n\nVersion 1.01 (dpkg 1.17.2)\nNew functions: getdefaultdiffignoreregex(), setdefaultdiffignoreregex(),",
                "subsections": [
                    {
                        "name": "get_default_tar_ignore_pattern",
                        "content": "Deprecated variables: $diffignoredefaultregexp, @tarignoredefaultpattern\n\nVersion 1.00 (dpkg 1.16.1)\nMark the module as public.\n"
                    }
                ]
            }
        }
    }
}