Giter Club home page Giter Club logo

Comments (3)

xolox avatar xolox commented on July 4, 2024

Hi Dustin!

Are you running the deb-pkg-tools program or are you using the deb_pkg_tools.* Python modules? Either way, enabling verbose logging should help to determine why sudo is being run. How you do that depends on the answer to my first question:

  1. If you're running the deb-pkg-tools program you can use the -v option to enable verbose logging.

  2. If you're using the deb_pkg_tools.* Python modules the easiest way to enable verbose logging is to run the following Python code before the build starts:

    import coloredlogs, logging
    coloredlogs.install(level=logging.DEBUG)

Since I don't know which part(s) of deb-pkg-tools you're using, I need you to tell me which command uses sudo. Then we can see how to make that invocation of sudo optional so you can disable it.

By the way, just curious: Did you know you can enable password-less sudo for specific commands? I'm not sure what your intended build environment is (local computer, continuous integration environment, build server, etc.) but it's always good to know about all available options when automating builds. This is not to say that making sudo usage in deb-pkg-tools is not useful as well.

from python-deb-pkg-tools.

dsoprea avatar dsoprea commented on July 4, 2024

Yeah, I'm well aware of that. Thanks for teaching me about coloredlogs, though.

It's just a copy:

2014-10-17 21:14:14 dustinsilver deb_pkg_tools.package[67358] INFO Copying files (/private/var/folders/qk/t5991kt11cb2y6qgmzrzm_g00000gp/T/tmp17KDLy/package/op-adam-342) to temporary directory (/var/folders/qk/t5991kt11cb2y6qgmzrzm_g00000gp/T/tmpjxk_A3) ..
Password:

from python-deb-pkg-tools.

xolox avatar xolox commented on July 4, 2024

The output you quoted is an INFO message. I was hoping your output would quote a DEBUG line saying "Executing external command: ...". When you've enabled verbose logging that should be the last line you see before you are asked for your sudo password (unless I'm confused).

I looked through the deb_pkg_tools.* modules, especially deb_pkg_tools.package, but the only remaining relevant references to sudo I can find are in deb_pkg_tools.repo and it sounds like you're just building a *.deb package so you shouldn't be running into that. Those sudo invocations are also the ones controlled by the $DPT_SUDO environment variable you introduced.

from python-deb-pkg-tools.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.