Simon Quigley
ba3f0511f9
syncpackage: Catch exceptions cleanly, simply skipping to the next package (erring on the side of caution) if there is an error doing the download (LP: #1943286 ).
2025-03-04 13:42:50 -06:00
Simon Quigley
2e550ceff2
syncpackage: Cache the sync blocklist in-memory, so it's not fetched multiple times when syncing more than one package.
2025-03-04 13:39:07 -06:00
Simon Quigley
6c8a5d74bd
syncpackage: s/syncblacklist/syncblocklist/g
2025-03-04 13:29:02 -06:00
Simon Quigley
02d65a5804
[syncpackage] Do not use exit(1) on an error or exception unless it applies to all packages, instead return None so we can continue to the next package.
2025-03-01 11:26:59 -06:00
Simon Quigley
bda85fa6a8
[syncpackage] Add support for -y or --yes, noted that it should be used with care.
2025-03-01 11:22:52 -06:00
Simon Quigley
86a83bf74d
[syncpackage] Within fetch_source_pkg, do not exit(1) on an error or exception, simply return None so we can continue to the next package.
2025-03-01 11:17:02 -06:00
Simon Quigley
162e758671
[syncpackage] When syncing multiple packages, if one of the packages is in the sync blocklist, do not exit, simply continue.
2025-03-01 11:12:49 -06:00
Athos Ribeiro
6bc59d789e
Log syncpackage LP auth errors before halting
2024-02-15 18:06:38 +01:00
Gianfranco Costamagna
5bda35f6b4
Update also syncpackage help
2023-08-25 20:04:12 +02:00
Simon Quigley
784e7814e9
Allow the user to sync multiple packages at one time (LP: #1756748 ).
2023-08-04 14:38:46 -05:00
Simon Quigley
bed2dc470d
Add support for the non-free-firmware components in all tools already referencing non-free.
2023-07-26 13:04:12 -05:00
Steve Langasek
89e788bf48
Remove references to deprecated http://people.canonical.com/~ubuntu-archive .
2023-05-30 19:37:11 -07:00
Benjamin Drung
aa556af89d
Use f-strings
...
pylint complains about C0209: Formatting a regular string which could be
a f-string (consider-using-f-string)
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2023-01-31 19:32:58 +01:00
Benjamin Drung
069a6926c0
Implement conventions found by pylint
...
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2023-01-31 17:28:33 +01:00
Benjamin Drung
444b319c12
Implement refactorings found by pylint
...
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2023-01-31 16:58:24 +01:00
Benjamin Drung
909d945af4
Replace deprecated optparse with argparse
...
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2023-01-31 13:33:18 +01:00
Benjamin Drung
f6fde2e217
fix: Use lazy % formatting in logging functions
...
pylint complains about W1201: Use lazy % formatting in logging functions
(logging-not-lazy) and W1203: Use lazy % formatting in logging functions
(logging-fstring-interpolation).
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2023-01-31 11:13:07 +01:00
Benjamin Drung
4e27045f49
style: Sort Python imports with isort
...
```
isort -l 99 --profile=black .
```
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2023-01-30 21:28:47 +01:00
Benjamin Drung
3354b526b5
style: Format Python code with black
...
```
PYTHON_SCRIPTS=$(grep -l -r '^#! */usr/bin/python3$' .)
black -C -l 99 . $PYTHON_SCRIPTS
```
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2023-01-30 19:45:36 +01:00
Dan Streetman
c2ea95c067
syncpackage: don't login to LP if using --simulate
...
No need to login to LP if no real action is being taken.
2021-06-02 14:55:17 -04:00
Dan Streetman
ec36c7c792
syncpackage: remove calls to no-op pull_dsc()
2021-05-28 16:24:53 -04:00
Dan Streetman
0eeb93ee0c
logging: update ubuntutools.getLogger() to output to stdout/stderr correctly
...
Python logging by default sends all output to stderr, but that's not what
normal programs usually do and is not expected for these scripts.
Change the ubuntutools.getLogger() method to return a logger with handlers
correctly set up to send INFO level (or lower) logs to stdout and WARNING
level (or higher; technically INFO+1 level or higher) logs to stderr.
This results in normally logged output going to stdout and warnings/errors
going to stderr, as expected.
2021-02-02 06:25:12 -05:00
Mattia Rizzolo
4b3e9b8479
syncpackge: Fix the new flake8 E741. Closes : #963310
2020-06-28 15:52:23 +02:00
Dan Streetman
90e8fe81e1
replace ubuntutools.logger with standard python logging
2019-11-25 10:10:06 -05:00
Stefano Rivera
301569e809
Pull out Python 2 support hacks
2019-09-04 19:24:44 -03:00
Stefano Rivera
2c8c4d7268
Port syncpackage to Python 3
2019-09-04 19:24:44 -03:00
Colin Watson
fb22ba116f
syncpackage: Support wildcards in sync-blacklist
...
This brings syncpackage's parsing of sync-blacklist.txt roughly into
line with that in auto-sync (from lp:ubuntu-archive-tools).
2018-12-11 16:39:51 +00:00
Benjamin Drung
cc7170eccb
Fix all flake8 issues
2017-05-01 00:20:03 +02:00
Benjamin Drung
d850fc8cab
Move Version class into ubuntutools module.
2014-04-15 13:01:16 +02:00
Benjamin Drung
b07271fdf8
Remove unused imports.
2013-10-23 00:36:12 +02:00
Dmitrijs Ledkovs
f07c0f8ccb
Since Britney migration was introduced in Ubuntu, automatic syncing is
...
always done from unstable.
2013-10-22 17:04:15 +01:00
Benjamin Drung
c2aa97dba2
Move devscripts.logger to ubuntutools.logger.
2013-03-19 00:18:02 +01:00
Stefano Rivera
87d76c813a
syncpackage: Don't throw away release pockets, returning correct errors
...
when the source and destination match even though the destination release
pocket doesn't.
2012-10-30 09:41:56 +01:00
Colin Watson
cc55071afd
syncpackage: Default to <current_series>-proposed.
2012-10-25 16:58:10 +01:00
Stefano Rivera
343ac49b39
pbuilder-dist, pull-debian-source, pull-lp-source, requestsync,
...
reverse-depends, submittodebian, syncpackage:
Handle outdated distro-info data. Fall back to sane defaults where
possible.
2012-05-06 10:15:54 +02:00
Stefano Rivera
42d9c851f1
syncpackage: Log into Launchpad anonymously with --no-lp
2012-04-12 18:31:36 +02:00
Evan Broder
cb225bd8f2
sponsor-patch, requestsync, syncpackage: Add a config variable for -k arguments
2012-02-11 11:59:46 -08:00
Stefano Rivera
a9386ef070
Improve error message when LP's package importer is out of date
2012-01-23 16:51:19 +02:00
Stefano Rivera
f124357734
syncpackage, backportpackage, sponsor-patch: Use -nc when building source
...
packages. Avoids needing build-deps on the build machine.
2011-12-23 22:34:54 +02:00
Stefano Rivera
12329170f1
syncpackage: Mention sponsorship when closing bugs (LP: #904288 )
2011-12-21 23:18:22 +02:00
Stefano Rivera
75c139ace8
The parameter is sponsored
2011-12-07 15:46:21 +02:00
Stefano Rivera
8178324266
Make syncpackage print a warning when --no-lp is used
2011-12-07 01:23:06 +02:00
Stefano Rivera
73f2273d71
Typo
2011-12-07 01:19:02 +02:00
Stefano Rivera
198d5a8720
Correct logic for obtaining email address for --no-lp sponsorship syncs
2011-12-07 01:18:24 +02:00
Stefano Rivera
c289c20b88
Spelling
2011-12-07 01:03:35 +02:00
Stefano Rivera
8ca2144a74
--no-lp *itself* could get some love, too
2011-12-07 00:51:48 +02:00
Stefano Rivera
b771bf89b0
Clarify --no-lp
2011-12-07 00:48:13 +02:00
Stefano Rivera
79e525d260
Break up some long lines into multiple statements
2011-12-07 00:42:34 +02:00
Stefano Rivera
dc9d6b5bf3
Add sponsorship support
2011-12-07 00:23:22 +02:00
Stefano Rivera
1f2d2e8d62
Pyflakes & PEP-8 fine-tooth comb applied
2011-12-07 00:14:00 +02:00