Re: dpkg script side-effects
TheSin <[email protected]>
| Newsgroups | gmane.os.apple.fink.core |
|---|---|
| Message-ID | <[email protected]> |
By typing all this out it helped me figure it out, if no deb script is present instead for removing $1 I'll just change it to /usr/bin/true and that will give me the arg spacing I need for our scripts. now everything is 100% and see it checked and fixes the la file!!
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 ( /usr/bin/true upgrade 1.4.6-1 )
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 ( /usr/bin/true upgrade 1.4.6-1 )
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 ( /usr/bin/true upgrade 1.4.6-1 )
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 ( /usr/bin/true configure 1.4.6-1 )
Clearing dependency_libs of .la files being installed
---
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