syncpackage: downloads .dsc when it really isn't needed

Bug #1928946 reported by Mattia Rizzolo
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-dev-tools (Ubuntu)
Fix Released
Low
Dan Streetman
Hirsute
Won't Fix
Low
Unassigned
Impish
Fix Released
Low
Dan Streetman

Bug Description

[impact]

syncpackage saves the dsc file(s) to disk but doesn't need to

[test case]

ubuntu@lp1928946-h:~$ syncpackage --simulate --no-lp -r bionic ubuntu-dev-tools
The use of --no-lp is not recommended for uploads targeted at Ubuntu. The archive-admins discourage its use, except for fakesyncs.
Downloading ubuntu-dev-tools_0.181.dsc from deb.debian.org (0.002 MiB)
Using existing file ubuntu-dev-tools_0.181.dsc
Downloading ubuntu-dev-tools_0.164.dsc from archive.ubuntu.com (0.002 MiB)

check if the dsc file(s) are now in $PWD:

ubuntu@lp1928946-h:~$ ls -l *dsc
-rw-rw-r-- 1 ubuntu ubuntu 2356 Jun 2 15:40 ubuntu-dev-tools_0.164.dsc
-rw-rw-r-- 1 ubuntu ubuntu 2219 Jun 2 15:40 ubuntu-dev-tools_0.181.dsc

[regression potential]

any regression would likely cause incorrectly saved dsc files, or incorrect failure to save a dsc file to disk when using any of the various scripts included in the ubuntu-dev-tools pacakge, or other scripts that use the python3-ubuntutools package library

[scope]

this is needed only for h and later

this was introduced by commit fed562405d76ab85e2aab96ec0357457eebafcb2 which is included in 0.179, so this bug does not exist in g or earlier

[original description]

It seems that starting from a few versions, syncpackage downloads .dscs, stores them in ~, and leaves them there.

AFAIK there is no need to download anything to sync a package, as launchpad should be able to handle everything through its API, so I'd say the bug is threefold:

1) shouldn't download anything if not needed (when is it needed?!)
2) shouldn't store things in ~ at all, use a tempdir in TMPDIR instead
3) shouldn't leave temporary files around

Currently running version 0.181 under Debian unstable.

Dan Streetman (ddstreet)
description: updated
Changed in ubuntu-dev-tools (Ubuntu Hirsute):
assignee: nobody → Dan Streetman (ddstreet)
status: New → In Progress
Changed in ubuntu-dev-tools (Ubuntu Impish):
status: Confirmed → In Progress
importance: Undecided → Low
Changed in ubuntu-dev-tools (Ubuntu Hirsute):
importance: Undecided → Low
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

autopkgtest fails on impish:

flake8.main.application MainProcess 2058 INFO Found a total of 16 violations and reported 1
./ubuntutools/archive.py:31:1: F401 'urllib.parse.urlparse' imported but unused

so you need to fix the uploads

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-dev-tools - 0.181ubuntu2

---------------
ubuntu-dev-tools (0.181ubuntu2) impish; urgency=medium

  * syncpackage, ubuntutools/archive.py:
    Don't save dsc file to disk until requested with pull()
    (LP: #1928946)
  * syncpackage:
    Don't login to LP if using --simulate
  * d/t/control: Add minimum flake8 version
    The --extend-exclude parameter is first available in flake8 3.8.0
  * ubuntutools/archive.py: Fix flake8 test failure
  * d/rules, d/control: Override build tests to use flake8 and nosetests3

 -- Dan Streetman <email address hidden> Fri, 04 Jun 2021 12:19:29 -0400

Changed in ubuntu-dev-tools (Ubuntu Impish):
status: In Progress → Fix Released
Dan Streetman (ddstreet)
Changed in ubuntu-dev-tools (Ubuntu Hirsute):
status: In Progress → Won't Fix
assignee: Dan Streetman (ddstreet) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.