Re: How to do with the offensive ghc-text?

Hanspeter Niederstrasser <[email protected]> Thu, 5 Mar 2020 23:31:41 -0600
Newsgroups gmane.os.apple.fink.devel
Organization Snaggled Works
Message-ID <[email protected]>
On 3/5/20 9:58 PM, Kow KURODA wrote:
> Hi Hanspeter,
> 
>> On Mar 6, 2020, at 12:39, Hanspeter Niederstrasser <[email protected]> wrote:
>>
>> On 3/5/20 9:27 PM, Kow KURODA wrote:
>>> Hi Hanspeter,
>>> Thanks for your help. I appreciate it.
>>> My gcc7 issue was solved.
>>>> Regarding ghc-text:
>>>>
>>>> Its PostInstScript (/sw/var/lib/dpkg/info/ghc-text.postinst) runs the script "/sw/share/doc/ghc-text/register.sh".
>>>> And its PreRmScript (/sw/var/lib/dpkg/info/ghc-text.prerm) runs the script "/sw/share/doc/ghc-text/unregister.sh --force"
>>>>
>>>> But you're getting the error that 'register.sh' and 'unregister.sh' do not exist.
>>>>
>>>> Are register.sh and unregister.sh present in the output of this command (one line)?
>>>>
>>>> dpkg-deb -c /sw/var/cache/apt/archives/ghc-text_1.2.1.3-2_darwin-x86_64.deb
>>> This returned the following:
>>>> $ dpkg-deb -c /sw/var/cache/apt/archives/ghc-text_1.2.1.3-2_darwin-x86_64.deb
>>>> /sw/bin/dpkg-deb: failed to read archive `/sw/var/cache/apt/archives/ghc-text_1.2.1.3-2_darwin-x86_64.deb': No such file or directory
>>
>> Do `ls -l /sw/var/cache/apt/archives/ghc-text* /sw/fink/debs/ghc-text*`
> 
> This command gave me the following, indicating I have one:
> 
> ls: /sw/fink/debs/ghc-text*: No such file or directory
> -rw-r--r--  1 root  admin  2294278 Jun 29  2018 /sw/var/cache/apt/archives/ghc-text_1.2.1.3-2_darwin-x86%5f64.deb
> 
>>
>> If you do get an existing deb out of either of those 2 locations, then run the 'dpkg-deb -c' command on it to look for 'register.sh' and 'unregister.sh'
> 
> So, I ran the following:
> 
> $ dpkg-deb -c /sw/var/cache/apt/archives/ghc-text_1.2.1.3-2_darwin-x86%5f64.deb | grep register
> -rwxr-xr-x root/admin     4007 2018-06-29 02:42 ./sw/share/doc/ghc-text/register.sh
> -rw-r--r-- root/admin      277 2018-06-29 02:42 ./sw/share/doc/ghc-text/unregister.sh
> 
> This shows I have both register.sh and unregister.sh
> 
> I then ran `agt-get -f install` and got the following:
> 
> [snipped]
> Selecting previously deselected package ghc-text.
> Preparing to replace ghc-text 1.2.1.3-2 (using .../ghc-text_1.2.1.3-2_darwin-x86%5f64.deb) ...
> ghc-pkg: cannot find package text-1.2.1.3
> dpkg: warning - old pre-removal script returned error exit status 1
> dpkg - trying script from the new package instead ...
> ghc-pkg: cannot find package text-1.2.1.3
> /sw/bin/dpkg: error processing /sw/var/cache/apt/archives/ghc-text_1.2.1.3-2_darwin-x86%5f64.deb (--unpack):
>   subprocess new pre-removal script returned error exit status 1
> Reading package info from stdin ... done.
> text-1.2.1.3: dependency "binary-0.7.6.1-059990c340d5b3e45b98a0b8ec2aec57" doesn't exist (use --force to override)
> dpkg: error while cleaning up:
>   subprocess post-installation script returned error exit status 1
> Errors were encountered while processing:
>   /sw/var/cache/apt/archives/ghc-text_1.2.1.3-2_darwin-x86%5f64.deb
> E: Sub-process /sw/bin/dpkg returned an error code (1)
> 
> I'm wondering why I get "text-1.2.1.3: dependency ..." instead of "ghc-text-1.2.1.3: dependency ...".

That's the difference between the Fink package name and the ghc module.

1) ghc-text is missing a bunch of deps.
Make sure you have ghc-array, ghc-deepseq-generics, ghc-primitive, 
ghc-binary installed. Try ghc-binary first, and then try `fink reinstall 
ghc-text`.

2) What's the output of `fink dumpinfo -fdebfile ghc-text` ? Is it the 
same deb in /sw/var/cache/apt as above?

3) Output of `ls -l /sw/var/lib/dpkg/info/ghc-text* 
/sw/share/doc/ghc-text/*register.sh`

Hanspeter


_______________________________________________
Fink-devel mailing list
[email protected]
List archive:
https://sourceforge.net/p/fink/mailman/fink-devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel