Code Monkey home page Code Monkey logo

Comments (3)

CyberShadow avatar CyberShadow commented on June 6, 2024

Good observation, but I don't think it is aconfmgr's job to update the system.

In fact, I'm aware of at least one situation where updating the system is not wanted: when recording changes to the configuration of a system which is not up-to-date. Arch Linux regularly replaces some packages with others, and updating packages can change files in the aconfmgr configuration, and these changes would then be unnecessarily difficult to sort out from those done by the user directly. Though this applies to save, running apply during or after tweaking the aconfmgr configuration can be done with the intent to apply the changes done in the configuration to the system, e.g. to discard the unnecessary ones.

Instead of calling pacman once for every package,

aconfmgr performs one pacman invocation to install all missing native packages:

sudo "${pacman_opts[@]}" --sync "${asdeps_arr[@]}" "${target_packages[@]}"

So, I'm not sure if there's anything worth changing in aconfmgr. The observation may warrant being documented. Additionally, you could probably add the pacman --sync commands to your configuration so they're executed automatically when aconfmgr is ran, though I wouldn't recommend this practice due to the implications described above.

from aconfmgr.

jasonhansel avatar jasonhansel commented on June 6, 2024

Fair enough. I agree that aconfmgr save should keep packages at their current version, but I still think that this would be useful for aconfmgr apply. One alternative would be to have a separate command (e.g. PinVersion linux 4.6.2), used to specify a particular version of a package. PinVersion commands would be generated by aconfmgr save, and one could update the system simply by removing all of them (and thus "unpinning" the packages, allowing the latest version to be used). I myself might be interested in implementing this, since it would also preserve idempotency.

For the moment, I may just add pacman --sync --refresh to my configuration. Is there a way to make sure that this only happens on apply, and never on save?

from aconfmgr.

CyberShadow avatar CyberShadow commented on June 6, 2024

Is there a way to make sure that this only happens on apply, and never on save?

As of bf73896, you can check aconfmgr_action in your configuration.

As far as I can see, there are no actionable points left in this issue, so I'm going to close it.

from aconfmgr.

Related Issues (20)

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.