The 'staging' pocket contains binaries that don't match published binaries,
so log a warning if we fallback to that pocket, and log a warning if pulling
binaries using that pocket.
Signed-off-by: Dan Streetman <ddstreet@canonical.com>
There is no point to doing this, as the Launchpad object is a singleton;
the caller should just call Launchpad.login_with() directly and leave
the SourcePackage class out of it.
Signed-off-by: Dan Streetman <ddstreet@canonical.com>
This reduces duplicate verification steps, and results in logging
error from the verification function if there is a size mismatch,
instead of the silent verification failure that was present in case
neither sha checksum was provided.
Signed-off-by: Dan Streetman <ddstreet@canonical.com>
Update download() function to handle src of plain path, by prepending
'file://' to it. Also handle the case of src and dst pointing to the same
file.
Signed-off-by: Dan Streetman <ddstreet@canonical.com>
There are only 2 options for getting the dsc file:
1) it's provided as 'dscfile' param
2) we look it up via lp_spph
For case #1, update the constructor to immediately read the provided file
to create the self._dsc object, and set package and version from that.
For case #2, simplify various functions to simply use the normal
_download_file_from_urls() function to get the dsc file from the
normal locations (mirrors, masters, directly from lp), using the same
process as any other file, including checking checksum(s).
Signed-off-by: Dan Streetman <ddstreet@canonical.com>
No longer necessary to override this function as the superclass
now does everything the subclass function does.
Signed-off-by: Dan Streetman <ddstreet@canonical.com>
support the param for both native BPPH as well as Debian Snapshot
emulated BPPH
add sourceFileUrls() function
add helper functions to get file urls, checksums, and size
In
https://code.launchpad.net/~cjwatson/launchpad/archive-unambiguous-files-traversals/+merge/345118,
I added support for downloading source package files from Launchpad that
can cope with the situation where different versions of a source package
have the same file name with different contents (normally impossible,
but it can happen with imported archives and due to some old bugs). Use
this where possible.
LP: #1860456
if only the version of a UCA package is specified, search each UCA
archive from latest backwards. This avoids having to specify both
the package version *and* UCA release.
Allow specifying what package statuses should be searched for.
By default search only for Pending and Published, unless a specific
version number is being searched for.
For PPA and UCA repos, the latest build is not necessarily in the
'development' release; so for those SourcePackage classes, search
all the 'active' series (starting with latest devel) for any
matches to the provided package name. This allows not having to
specify the series name when looking in PPA/UCA repos for the 'latest'
version of a specific package.
The UCA source pkg class was its own specific class, but with the
addition of the generic PPA source pkg class, the UCA class is just
a specific case of PPA. Changing it to a subclass of the PPA class
simplifies code.