151 Commits

Author SHA1 Message Date
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
Stefano Rivera
857778b922 Remove unecessary optparse clutter 2011-12-07 00:01:08 +02:00
Stefano Rivera
86ba4c99ca move --no-lp options into their own group 2011-12-06 23:37:25 +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
5bf59a2cd7 Add --fakesync option, relegating --no-lp to really crazy corner cases. 2011-10-26 22:21:23 +02:00
Stefano Rivera
08513b1897 * syncpackage:
- Ignore CURRENT blacklisting: it's buggy, and we don't have a good use
    for it.
  - Always display blacklist comments, if they exist.
  - Display timestamps for DSD blacklist comments.
2011-10-26 21:08:17 +02:00
Stefano Rivera
c921d40a9f syncpackage, requestsync: Sync from testing for LTSs (LP: #876400) 2011-10-26 01:13:35 +02:00
Benjamin Drung
fdd01746fe syncpackage: Catch user abort. 2011-10-22 23:10:27 +02:00