Jump to content

Philip Petev

Philip Petev

Member Since 13 Oct 2006
Offline Last Active Today, 07:26 AM
*****

Posts I've Made

In Topic: Build_Clover.command, another Script to build standard Clover (or customized)

21 February 2018 - 10:31 AM

SF = SourceForge

Sent from my MI 5s using Tapatalk

In Topic: Build_Clover.command, another Script to build standard Clover (or customized)

21 February 2018 - 08:42 AM

The script works perfectly, the problem is at SF.

In Topic: Build_Clover.command, another Script to build standard Clover (or customized)

09 February 2018 - 12:11 PM

Yes, found that last night, just pushed version 4.7.1.

In Topic: Clover General discussion

08 February 2018 - 10:38 AM

So maybe all the previous receipts should be removed in postinstall? Or is that too late and the new receipts are there already? The previously installed stuff should definitely be removed, with caveats that the user needs to choose to remove stuff that doesn't exist in the running installer.

 

 

I understand the change, I just suggest making a different one. Also having HFSPlus and VBoxHFS causes issues. I also think most people think that if they uncheck something it will be removed, I know I do. I expect that.

 

 

I gave you a way to do it, check the current package for the same stuff as the receipts, if not found in the package, use osascript to generate a dialog. I have no idea if there is anyway to add options after the package is already made but that would be a much cleaner solution...

 

 

Yeah, we should maybe remove them in postinstall like

pkgutil --forget @CLOVER_PACKAGE_IDENTITY@

But is that going to remove the currently installing package or the previous.... IDK.

 

EDIT: Actually we can run that at the end of the preinstall, because even if the script ends up failing after, all those files were removed so it's safe to remove the receipts.

 

EDIT2: Actually it's not safe because then the next time the installer is run the choices won't be selected, so it must be in postinstall.

 

EDIT3: Thought of something crazy, don't actually build the package. Put all the components to build into the package, then when installer is run, build a package from the components and missing stuff through receipts. Then run that installer from the current one. Ridiculously that should work..........  :blink:

For now, I'm going to add /var/db/receipts in that preinstall script, so next time when you run the installer, only the packages, selected on the previous install, will be removed before the deployment of the new files. That's only a workaround until I figure out what to do next.

In Topic: Clover General discussion

07 February 2018 - 08:18 PM

Ok the last part is what is really causing an issue, the receipts are invalid or not there? Are the receipts not named well enough that you can figure out they are from which selection or contain any other information besides the names?

EDIT2: Are these receipts removed if an option is then unselected? Or does it just stay there forever?

 The receipts are not being removed. Ever. There is no such practice in the macOS Install framework. The only way to remove them is to delete them manually from /var/db/receipts or /Library/Receipts. That's what this preinstall script is trying to do, but as I said, it's not a good idea and a bad practice, in such cases a preinstall script is being used for every subpackage to remove the older version of the files before deploying the new one. I think to look at this problem when I get some free time (probably this weekend).

 

EDIT: I see that the first line actually tells you which selection they were from right? I don't agree that the filesystem drivers should be excluded. I may want to remove HFSPlus and go back to VBoxHFS, or don't need APFS or NTFS anymore because I don't have those filesystems. You are being forced to manually go in and remove drivers, even if you unselect them - thinking they will be removed, like the rest kinda are....

The reason I suggested that change was the complaints from the user, losing the HFSPlus.efi driver. Because using the custom package (that includes the proprietary drivers) and using the official one (without them) leads to such consequences. Unlike the other drivers, HFSPlus.efi, NTFS.efi and apfs.efi are not part of the Clover/edk2 distribution and like @RehabMan said, it won't hurt if they stay there. You can change them manually whenever you want.

 

EDIT: I should be more clear, everything should be deleted that can be reinstalled from the running installer. Anything else from previous package, the user should be asked to remove or keep each selection.

 Such functionality may be possible through Installer plugins, but someone has to write them. Not familiar with them as never needed them, even when I maintained the HP ProBook Installer package.
 

No, he's saying he installed the driver, then uninstalled the driver. That worked fine. But then removed the package plist and he manually installed the driver, and after running the installer again, the driver was not checked but was removed even though the package plist was removed before running the installer.

Makes perfectly sense to me. The current package doesn't remove anything from /var/db/receipts and considering the fact the first install has added a receipt for it, the file is being deleted, because the Installer reads the receipt.

© 2017 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy