loose check for backend detection
Bug #1719338 reported by
Ritesh Raj Sarraf
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Apport |
New
|
Undecided
|
Unassigned | ||
apport (Debian) |
Fix Released
|
Unknown
|
Bug Description
Please see https:/
Currently, setup.py relies on '/etc/apt/
In my opinion, this is fragile, especially given that /etc/apt/
I propose that a check on /usr/bin/apt or /usr/bin/apt-get be made instead. Both binaries are provided by the 'apt' pacakge.
summary: |
- loose check for backed detection + loose check for backend detection |
Changed in apport (Debian): | |
status: | Unknown → New |
Changed in apport (Debian): | |
status: | New → Confirmed |
Changed in apport (Debian): | |
status: | Confirmed → Fix Released |
To post a comment you must log in.
On Mon, 2017-09-25 at 15:04 +0000, Ritesh Raj Sarraf wrote: sources. list' to detect if it sources. list.d/ sub config dir model is also supported.
> Currently, setup.py relies on '/etc/apt/
> is an apt based system.
> In my opinion, this is fragile, especially given that
> /etc/apt/
>
> I propose that a check on /usr/bin/apt or /usr/bin/apt-get be made
> instead. Both binaries are provided by the 'apt' pacakge.
The other bigger problem is that this code check happens outside of any
target. Which results in even the clean target failing. And I cannot
counter the failure with a debian patch I carry in my packaging.
Hence, can you please fix the setup.py script to not be so fragile and
cut out a new release ?
My current patch to setup.py is below. It still is very fragile given
that both distribution types have the possibility of having the
secondary package manager.
LP: 1719338
DBUG: 876683
--- a/setup.py
+++ b/setup.py
@@ -85,7 +85,7 @@
# try to auto-setup packaging_impl exists( 'apport/ packaging_ impl.py' ): exists( '/etc/apt/ sources. list'): exists( '/usr/bin/ apt-get' ):
print( 'Installing apt/dpkg packaging backend.')
shutil. copy('backends/ packaging- apt-dpkg. py', packaging_ impl.py' ) exists( '/usr/bin/ rpm'):
if len(sys.argv) >= 2 and sys.argv[1] != 'sdist' and not
os.path.
- if os.path.
+ if os.path.
'apport/
elif os.path.
-- www.researchut. com
Ritesh Raj Sarraf
RESEARCHUT - http://
"Necessity is the mother of invention."