Re: dpkg script side-effects
TheSin <[email protected]>
| Newsgroups | gmane.os.apple.fink.core |
|---|---|
| Message-ID | <[email protected]> |
I should have included some details
This is an example of the issue, this is libapr.0-dev it has no pastiest but does have .la files that should get cleaned up, but since postinst is getting no args and it expects $2 to be configure sot hat it would clean up .la files this is what we get.
justin@tracer [/sw/fink/dists/local/main/finkinfo]$ sudo dpkg -D663 -i /sw/fink/debs/libapr.0-dev_1.4.6-1_darwin-x86_64.deb
(Reading database ... 195713 files and directories currently installed.)
Preparing to replace libapr.0-dev 1.4.6-1 (using .../libapr.0-dev_1.4.6-1_darwin-x86_64.deb) ...
D000001: process_archive oldversionstatus=installed
D000002: maintainer_script_alternative nonexistent prerm '/sw/var/lib/dpkg/info/libapr.0-dev.prerm'
D000002: Wrapper script '/sw/lib/fink/dpkg-base-files/prerm' will be used alone as there is no 'prerm' script in deb
D000002: fork/exec /sw/lib/fink/dpkg-base-files/prerm ( )
D000002: maintainer_script_new nonexistent preinst '/sw/var/lib/dpkg/tmp.ci/preinst'
D000002: Wrapper script '/sw/lib/fink/dpkg-base-files/preinst' will be used alone as there is no 'preinst' script in deb
D000002: fork/exec /sw/lib/fink/dpkg-base-files/preinst ( )
Unpacking replacement libapr.0-dev ...
D000002: maintainer_script_alternative nonexistent postrm '/sw/var/lib/dpkg/info/libapr.0-dev.postrm'
D000002: Wrapper script '/sw/lib/fink/dpkg-base-files/postrm' will be used alone as there is no 'postrm' script in deb
D000002: fork/exec /sw/lib/fink/dpkg-base-files/postrm ( )
D000001: process_archive updating info directory
D000002: process_archive info unlinked /sw/var/lib/dpkg/info/libapr.0-dev.md5sums
D000002: process_archive tmp.ci script/file '.' contains dot
D000002: process_archive tmp.ci script/file '..' contains dot
D000002: process_archive tmp.ci script/file '/sw/var/lib/dpkg/tmp.ci/control' is control
D000002: process_archive tmp.ci script/file 'package.info' contains dot
D000001: generating infodb hashfile
D000040: checking dependencies of libapr.0-dev:darwin-x86_64 (- <none>)
D000400: checking group ...
D000400: checking possibility -> libapr.0-shlibs
D000400: is installed, ok and found
D000400: found 3
D000400: found 3 matched 0 possfixbytrig -
D000400: checking group ...
D000400: checking possibility -> pkgconfig
D000400: is installed, ok and found
D000400: found 3
D000400: found 3 matched 0 possfixbytrig -
D000400: checking group ...
D000400: checking possibility -> darwin
D000400: virtual version 11.4.0-1 >= 11-1, PASS
D000400: is fink-virtual, ok and found
D000400: found 3
D000400: found 3 matched 0 possfixbytrig -
D000040: ok 2 msgs >><<
D000040: checking Breaks
Setting up libapr.0-dev (1.4.6-1) ...
D000001: deferred_configure updating conffiles
D000002: vmaintainer_script_installed nonexistent postinst
D000002: Wrapper script '/sw/lib/fink/dpkg-base-files/postinst' will be used alone as there is no 'postinst' script in deb
D000002: fork/exec /sw/lib/fink/dpkg-base-files/postinst ( )
This is an example of dpkg which does have pastinst, notice that it does have args.
justin@tracer [/sw/fink/dists/local/main/finkinfo]$ sudo dpkg -D663 -i /sw/fink/debs/dpkg_1.16.4.3-1_darwin-x86_64.deb
(Reading database ... 195713 files and directories currently installed.)
Preparing to replace dpkg 1.16.4.3-1 (using .../dpkg_1.16.4.3-1_darwin-x86_64.deb) ...
D000001: process_archive oldversionstatus=installed
D000002: Wrapper script '/sw/lib/fink/dpkg-base-files/prerm' will be used around '/sw/var/lib/dpkg/info/dpkg.prerm'
D000002: fork/exec /sw/lib/fink/dpkg-base-files/prerm ( /sw/var/lib/dpkg/info/dpkg.prerm upgrade 1.16.4.3-1 )
D000002: Wrapper script '/sw/lib/fink/dpkg-base-files/preinst' will be used around '/sw/var/lib/dpkg/tmp.ci/preinst'
D000002: fork/exec /sw/lib/fink/dpkg-base-files/preinst ( /sw/var/lib/dpkg/tmp.ci/preinst upgrade 1.16.4.3-1 )
Unpacking replacement dpkg ...
D000002: Wrapper script '/sw/lib/fink/dpkg-base-files/postrm' will be used around '/sw/var/lib/dpkg/info/dpkg.postrm'
D000002: fork/exec /sw/lib/fink/dpkg-base-files/postrm ( /sw/var/lib/dpkg/info/dpkg.postrm upgrade 1.16.4.3-1 )
D000001: process_archive updating info directory
D000002: process_archive info installed /sw/var/lib/dpkg/tmp.ci/prerm as /sw/var/lib/dpkg/info/dpkg.prerm
D000002: process_archive info installed /sw/var/lib/dpkg/tmp.ci/preinst as /sw/var/lib/dpkg/info/dpkg.preinst
D000002: process_archive info installed /sw/var/lib/dpkg/tmp.ci/postrm as /sw/var/lib/dpkg/info/dpkg.postrm
D000002: process_archive info installed /sw/var/lib/dpkg/tmp.ci/postinst as /sw/var/lib/dpkg/info/dpkg.postinst
D000002: process_archive info unlinked /sw/var/lib/dpkg/info/dpkg.md5sums
D000002: process_archive tmp.ci script/file '.' contains dot
D000002: process_archive tmp.ci script/file '..' contains dot
D000002: process_archive tmp.ci script/file '/sw/var/lib/dpkg/tmp.ci/control' is control
D000002: process_archive tmp.ci script/file 'package.info' contains dot
D000002: process_archive tmp.ci script/file 'package.patch' contains dot
D000001: generating infodb hashfile
D000040: checking dependencies of dpkg:darwin-x86_64 (- <none>)
D000400: checking group ...
D000400: checking possibility -> bzip2-shlibs
D000400: is installed, ok and found
D000400: found 3
D000400: found 3 matched 0 possfixbytrig -
D000400: checking group ...
D000400: checking possibility -> libgettext8-shlibs
D000400: is installed, ok and found
D000400: found 3
D000400: found 3 matched 0 possfixbytrig -
D000400: checking group ...
D000400: checking possibility -> liblzma5-shlibs
D000400: is installed, ok and found
D000400: found 3
D000400: found 3 matched 0 possfixbytrig -
D000400: checking group ...
D000400: checking possibility -> tar
D000400: is installed, ok and found
D000400: found 3
D000400: found 3 matched 0 possfixbytrig -
D000400: checking group ...
D000400: checking possibility -> darwin
D000400: virtual version 11.4.0-1 >= 11-1, PASS
D000400: is fink-virtual, ok and found
D000400: found 3
D000400: found 3 matched 0 possfixbytrig -
D000040: ok 2 msgs >><<
D000040: checking Breaks
Setting up dpkg (1.16.4.3-1) ...
D000001: deferred_configure updating conffiles
D000002: Wrapper script '/sw/lib/fink/dpkg-base-files/postinst' will be used around '/sw/var/lib/dpkg/info/dpkg.postinst'
D000002: fork/exec /sw/lib/fink/dpkg-base-files/postinst ( /sw/var/lib/dpkg/info/dpkg.postinst configure 1.16.4.3-1 )
The good news is that either way it IS calling the wrapper script. but if I can't get $2 to be configure and $1 to at least be a dummy call then we need to change dpkg-base-files
---
TS
http://www.southofheaven.org/
Life begins and ends with chaos, live between the chaos!
On 2012-07-04, at 9:11 AM, TheSin wrote:
> So I'm adding in dmacks' script side-effect code to the new dpkg and I noticed that I have no idea how it could possibly be working currently even.
>
> I understand that dpkg needs to run the scripts from %p/lib/fink/base-dpkg-files, and shit all the args for it. but here is the issue I see, in postinst in %p/lib/fink/dpkg-base-files, the script expects $2 to be the normal dpkg stuff so {script name} {version}, and $1 to be the real script. so the entire command would look like
>
> %p/lib/fink/dpkg-base-files/postinst %p/lib/dpkg/tmp.ci/postinst configure 1.0.0-1
>
> the problem is that in dmacks patch if the package has no script then we set it to null and force it to run, in this case the call would end up being
>
> %p/lib/fink/dpkg-base-files/postinst configure 1.0.0-1
>
> Notice $1 is now configure and $2 is now 1.0.0-1 so %p/lib/fink/dpkg-base-files/postinst would fail cause things aren't in the right order, if I just try to fill in $1 with say none or - then %p/lib/fink/dpkg-base-files/postinst complains that none or - doesn't exists
>
> So my question is how does this current even work? I can't seem to see how it's even possible.
>
>
> On an other note why is this all being done in dpkg anyhow? Why doesn't fink just inject all this into the scripts before packaging? I seems that would be be safer and much less intrusive to dpkg and make dpkg much much easier to maintain.
> ---
> TS
> http://www.southofheaven.org/
> Life begins and ends with chaos, live between the chaos!
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
fink-core mailing list
[email protected]
List archive:
http://news.gmane.org/gmane.os.apple.fink.core
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-core