dpkg script side-effects

TheSin <[email protected]>
Newsgroups gmane.os.apple.fink.core
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.