Ritesh Raj Sarraf <r...@researchut.com> writes: > Hi Vasudev, > > Thanks for filing this bug report. While I understand the challenges of > carrying embedded copies, this is mainly does for convenience because > apt-offline has to run on other platforms too. Also different > variations of Linux distributions have different behavior and > philosophy.
Here one thing I would like to point out is file is same in Fedora too I'm not sure about other distributions. But I think it doesn't really matter, please see below. > > > On Wed, 2015-11-04 at 21:41 +0530, Vasudev Kamath wrote: >> Hi, >> >> apt-offline contains embedded code copy of magic.py from python- >> magic, >> though file is renamed as AptOfflineMagicLib.py. I diffed this file >> against the latest version of magic.py from python-magic and there is >> no difference. >> > > Yes. When I moved from my previous library to the system defined one, I > too looked at this. The problem is with what Python upstream treats as > the magic lib vs what standard Linux distributions treat as magic lib. > > As per python: > > https://github.com/ahupp/python-magic/blob/master/magic.py > https://pypi.python.org/pypi/filemagic/1.6 > > vs > > WHat, for example, Debian prefers. And also, what I prefer for apt- > offline: > > http://www.darwinsys.com/file/ > > > So that is the main reason to carry the library embedded. Because if > there is a user with a pypi based magic library, he may run into > unwanted problems. IIRC, I ran into some of those "time wasting" > problems, and thus decided to embed this library. > > And this is not the only library we embed. There's the debianbts > library which is embedded, though it is needed because on Windows, it > will otherwise not be easy for the user. So adding dependencies to the > packages does not help because I expect users to also unzip the apt- > offline archive and be able to run it. > > For most of the embedded libraries, my first preference is to probe for > system installed libraries. Embedded libs are only a fallback plan. But > I think for magic, this is the exception. Because some of the Linux > distributions have moved with python-magic from pypi. I understand your arguments. The actual python-magic provided by src:file is not available from pypi, but where is it actually used?. A quick grep shows its only in *install* subcommand. Now where is *install* command is supposed to be used? Debian or Debian derivatives, it will not work in other places. So is this duplication of code really required? :-). I hope I've clarified myself. Install is used on Debian like system only which all provides same python-magic package. So why this code is still need to be embdedded?
signature.asc
Description: PGP signature