Code Monkey home page Code Monkey logo

Comments (9)

gregneagle avatar gregneagle commented on June 18, 2024

That's not terribly surprising; the code that looks for matching items in the repo isn't going to be aware of your unexpected manual modification of the pkginfo.

-Greg

On Nov 25, 2013, at 2:17 AM, MiqViq [email protected] wrote:

If I change installs-type key from 'application' to 'bundle' manually in already imported pkginfo-file then autopkg decides to re-import the same item, resulting with unnecessary duplicate item.
This happens for all items that are updated and autoimported to Munki repo by autopkg.
This happens with version 0.2.3 and 0.2.4.


Reply to this email directly or view it on GitHub.

from autopkg.

MiqViq avatar MiqViq commented on June 18, 2024

I figured so.

Could you possibly point out the lines in code which are responsible for this behavior?

from autopkg.

gregneagle avatar gregneagle commented on June 18, 2024

On Nov 25, 2013, at 8:15 AM, MiqViq [email protected] wrote:

I figured so.

Could you possibly point out the lines in code which are responsible for this behavior?

It's going to be in this function:
https://github.com/autopkg/autopkg/blob/master/Code/autopkglib/MunkiImporter.py#L190

from autopkg.

MiqViq avatar MiqViq commented on June 18, 2024

Thanks Greg, I will look into that.

from autopkg.

gregneagle avatar gregneagle commented on June 18, 2024

You might get the behavior you want if you change the code here:
https://github.com/autopkg/autopkg/blob/master/Code/autopkglib/MunkiImporter.py#L218-L220

    # try to match against installed applications
    applist = [item for item in pkginfo.get('installs', [])
               if item['type'] == 'application' and 'path' in item]

to something like:

    # try to match against installed applications and bundles
    applist = [item for item in pkginfo.get('installs', [])
               if item['type'] in ['application', 'bundle'] and 'path' in item]

I don't have an easy way to quickly test this, though.

from autopkg.

gregneagle avatar gregneagle commented on June 18, 2024

MiqViq: any feedback on this?

from autopkg.

MiqViq avatar MiqViq commented on June 18, 2024

Tried this patch on 2 different AutoPkg installations, did not help.
AutoPkg still thinks that it needs to reimport the item if item's pkginfo installs-type that was "application" has been changed to "bundle".
Probably something to do with file checksums (if AutoPkg is using them)?

from autopkg.

gregneagle avatar gregneagle commented on June 18, 2024

Did the file checksums change?

On Jan 6, 2014, at 11:34 AM, MiqViq [email protected] wrote:

Tried this patch on 2 different AutoPkg installations, did not help.
AutoPkg still thinks that it needs to reimport the item if item's pkginfo installs-type that was "application" has been changed to "bundle".
Probably something to do with file checksums (if AutoPkg is using them)?


Reply to this email directly or view it on GitHub.

from autopkg.

MiqViq avatar MiqViq commented on June 18, 2024

I thought that maybe AutoPkg takes a checksum of the pkginfo-file it creates and compares it to the existing pkginfo with the same name…which it does not do, I guess?
Do you mean that the downloaded item in AutoPkg Cache has a different checksum than the already imported installer of the same version in Munki repo?
I have to verify this tomorrow when I get back to office.
Maybe this issue happens with installers that are converted to AppDmg or pkg format…I have to verify this too.

from autopkg.

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.