Stefano Rivera
bb765237db
Port Python scripts to Python 3, remove python 2 modules. ( Closes : #938740 , LP: #1099537 )
2019-09-04 19:24:44 -03:00
Stefano Rivera
2d3765522e
Use the Popen() encoding flag to decode to unicode
...
This should make behavior identical on Python 2 & 3.
2019-09-04 19:24:44 -03:00
Mattia Rizzolo
e0f6b6f97b
archive: Disable dsc signature verification for non-Debian.
...
Ubuntu doesn't have a unified keyring of developers like Debian has, so
it is not feasible to check for the dsc signatures.
Signed-off-by: Mattia Rizzolo <mattia@debian.org>
2019-08-12 13:41:16 +02:00
Mattia Rizzolo
3fb7516d72
Default to checking signatures while pulling a .dsc.
...
Signed-off-by: Mattia Rizzolo <mattia@debian.org>
2019-08-05 13:50:33 +02:00
Robie Basak
a761ccfc72
Fix rmadison parsing for Python 3
...
In Python 3, it matters that the output of rmadison must be decoded
before it can be parsed.
2017-06-30 15:47:29 +01:00
Robie Basak
4c66fba4d9
pull-debian-source: --no-verify-signature option
...
Using pull-debian-source fails on some very old packages such as on
texinfo 4.8.dfsg.1-4. I have hand-verified that the signature is good
(though with no trust path), so presumably this is because the signature
has rotated out of debian-keyring.
Add a --no-verify-signature option so that developers can still make use
of the find-and-download functionality of this tool, albeit without
signture verification.
2017-06-30 15:47:29 +01:00
Benjamin Drung
cc7170eccb
Fix all flake8 issues
2017-05-01 00:20:03 +02:00
Dan Streetman
03fda64eae
pull-uca-source: update to allow using binary pkg names, -pockets, and specific versions
2017-02-03 10:21:37 -05:00
Scott Moser
12c86a8fda
ubuntutools/archive.py/rmadison: return results for sid if asked about unstable
...
Some versions of rmadison return results with 'unstable' when asked about sid.
Others return 'sid'. This makes a query of 'unstable' return results
for sid.
End result is fixing 'pull-debian-source hello' on wily.
2015-10-22 10:00:21 -04:00
Dimitri John Ledkov
866adfd768
Actually, now that more things expect streaming bytes over the wire
...
the mirror tests don't stall anymore. Also use a codec.reader to slurp
up unicode bytes for json.load.
2014-12-18 23:18:00 +00:00
Dimitri John Ledkov
5da114b070
More consistent binary handling throughout.
...
Don't mock open(..., "b") with str / StringIO.
Silence source package pull, buffered/mocked output does not flush.
Disable mirror tests on python3, stall/hang.
2014-12-18 23:03:23 +00:00
Dimitri John Ledkov
ddabeed530
Fix ups
2014-12-18 21:34:13 +00:00
Dimitri John Ledkov
a7dedd9296
archive.py
2014-12-16 02:38:52 +00:00
Benjamin Drung
c2aa97dba2
Move devscripts.logger to ubuntutools.logger.
2013-03-19 00:18:02 +01:00
Stefano Rivera
4056e98a43
ubuntutools.archive: Improve error handling around rmadison calls
...
(LP: #1010951 )
2012-06-20 22:32:20 +02:00
Stefano Rivera
52fc42ca8f
Make ubuntutools.archive a little more testable, by making its urlopener an
...
instance property.
Replace these with mocks, as needed, rather than mocking out urllib2.urlopen.
Makes the test suite pass again.
2012-03-26 10:00:46 +02:00
Stefano Rivera
872957da4e
Whitespace
2012-03-26 09:41:05 +02:00
Daniel Hahler
ee569590a6
ubuntutools/archive.py: use ProxyHandler in _download_file.
...
This makes use of the system proxy (e.g. http_proxy).
2012-03-16 16:22:14 +01:00
Stefano Rivera
70a035f13d
Use httplib2 everywhere that we do https. The python stdlib doesn't do
...
certificate verification.
2011-11-22 15:57:02 +02:00
Stefano Rivera
09e468211a
Add changelog retrieval to lpapicache, and use this in syncpackage and
...
requestsync. The changelogs should be available in Launchpad sooner than
Debian PTS.
2011-11-13 22:50:34 +02:00
Stefano Rivera
bf0709edf6
Cleanup progress bar if there's an exception, too
2011-09-10 01:25:23 +02:00
Stefano Rivera
ca2abaa613
* ubuntutools.archive:
...
- Add quiet option to silence downloading.
- Use wget-style progress bar (fixed width) (LP: #845787 )
2011-09-09 22:44:16 +02:00
Stefano Rivera
17b287e7bf
ubuntutools.archive: Don't write .dsc files until we pull the entire
...
source package, just hold it in memory. Avoids littering the current
directory (LP: #838361 )
2011-09-04 19:01:01 +02:00
Colin Watson
a4000c606c
drop quiet download stuff, not worth an API debate
2011-08-18 15:10:19 +01:00
Colin Watson
d624e9d18f
factor out dsc comparison into a method on ubuntutools.archive.Dsc
2011-08-18 15:06:05 +01:00
Colin Watson
d26a7521b0
make it possible to quieten download progress information, particularly useful if downloading only the small .dsc files
2011-08-17 02:54:37 +01:00
Stefano Rivera
aa99618dd6
backportpackage: Backport from local source packages again (LP: #801945 )
2011-08-16 01:17:25 +02:00
Evan Broder
19c33e5e32
* ubuntutools.subprocess:
...
- New drop-in replacement wrapper module around subprocess that
backports the restore_signals kwarg and defaults close_fds=True
- Switch everything previously using subprocess to use
ubuntutools.subprocess instead (LP: #785854 )
2011-06-24 16:32:07 +02:00
Stefano Rivera
6aee8410eb
Work around pylint bug: http://www.logilab.org/ticket/46273
2011-05-30 15:55:15 +02:00
Stefano Rivera
1c248875b4
ubuntutools.archive: Display any errors rmadison emits, rather than
...
guessing at the cause. (LP: #788447 )
2011-05-30 10:21:12 +02:00
Evan Broder
d82e65e0e2
* ubuntutools.subprocess:
...
- New drop-in replacement wrapper module around subprocess that
backports the restore_signals kwarg and defaults close_fds=True
- Switch everything previously using subprocess to use
ubuntutools.subprocess instead (LP: #785854 )
2011-05-24 20:22:37 +02:00
Benjamin Drung
e8b3a18c45
Move suspicious-source and wrap-and-sort from ubuntu-dev-tools into devscripts.
2011-05-23 23:41:00 +02:00
Scott Kitterman
f5ce76d52e
In ubuntutools/archive.py, instead of an AssertionError liburi-perl is not installed provide a similar message to the one rmadison provides.
2011-04-10 00:41:30 -04:00
Stefano Rivera
5bb84b1548
ubuntutools.archive.rmadison: suite can be None, handle this correctly.
2011-03-28 13:09:13 +02:00
Stefano Rivera
280d8c1172
pull-debian-source: Handle -p-u and -security suites.
2011-03-08 23:31:54 +02:00
Stefano Rivera
a93078cb32
ubuntutools.archive: Filter rmadison results. (LP: #710579 )
2011-03-05 00:05:04 +02:00
Stefano Rivera
7f311a2852
ubuntutools/archive.py: Rewrite launchpadlib redirects to https when
...
fetching dscs.
2011-02-13 14:40:14 +02:00
Stefano Rivera
4faba7c569
ubuntutools.archive: Handle source package in workdir correctly.
...
Add regression tests. (LP: #706403 )
2011-01-22 23:19:31 +02:00
Stefano Rivera
4a97dee930
Break source_is_workdir out of long if statement
2011-01-20 01:28:58 +02:00
Stefano Rivera
a5c5215959
Replace check_call with error and quit
2011-01-20 01:16:11 +02:00
Stefano Rivera
038cd428d3
Use ubuntutools.archive's rmadison code in requestsync.mail
2011-01-15 20:54:45 +02:00
Stefano Rivera
b1b1c9a91a
Please pylint
2011-01-15 20:14:41 +02:00
Stefano Rivera
495d14b69d
Help pylint
2011-01-15 16:05:15 +02:00
Stefano Rivera
baf7a803ae
Read source and version from dsc, not dsc filename
2011-01-15 15:59:59 +02:00
Stefano Rivera
f4bbff9e9c
Move source package verification into ubuntutools.archive
2011-01-15 15:50:07 +02:00
Stefano Rivera
e48a2c92d4
Cannot use with statement with StringIO
2011-01-15 13:55:20 +02:00
Stefano Rivera
394d956a37
Catch URLError, not HTTPError when pulling sources
2011-01-15 13:48:38 +02:00
Stefano Rivera
b62377b374
Handle missing debian-keyring more gracefully
2011-01-15 13:46:40 +02:00
Stefano Rivera
ed91b960e2
Move debdiff into SourcePackage
2011-01-15 13:28:44 +02:00
Stefano Rivera
3ef8324ff7
Improve error handling
2011-01-01 19:51:03 +02:00