Your message dated Tue, 16 May 2023 19:01:42 +0000
with message-id <[email protected]>
and subject line Bug#1036137: Removed package(s) from unstable
has caused the Debian Bug report #693689,
regarding beancounter: lsportfolio and lspositions fail to display anything
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
693689: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=693689
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: beancounter
Version: 0.8.10
Severity: important
Tags: upstream patch

Dear Maintainer,

I just installed beancounter and started to play around with it. Looks
very promising. However the lsportfolio and lspositions commands failed
to do anything useful. (at least on my SQLite install)
Investigating the source showed two problems
  1) the default date was given in the wrong format
  2) the returnvalue of execute() is not the number of rows
The attached patch fixes the problem for both commands.

(In addition the patch increases the spacing for two columns in lspositions.
Should probably have created a seperate patch, sorry.)

The depsum error is of course due to the fact that it checked my patched
code.

thanks a lot
Nicola

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages beancounter depends on:
ii  libdate-manip-perl              6.32-1
ii  libdbd-pg-perl                  2.19.2-2
ii  libdbd-sqlite3-perl             1.37-1
ii  libdbi-perl                     1.622-1
ii  libfinance-yahooquote-perl      0.24
ii  libstatistics-descriptive-perl  3.0603-1
ii  perl                            5.14.2-15
ii  sqlite3                         3.7.13-1

beancounter recommends no packages.

beancounter suggests no packages.

-- no debconf information

-- debsums errors found:
debsums: changed file /usr/bin/beancounter (from beancounter package)
611c611
<     $stmt = $stmt . qq{where date > '1970-01-01' };
---
>     $stmt = $stmt . qq{where date > '19700101' };
623,634c623,631
<   my $rows = $sth->execute;
<   if ( defined($rows) and $rows > 0 ) {
<     # print the results
<     print "$tl\n\t\t\tPortfolio listing\n$fl\n";
<     printf "%-10.10s%8.8s%8.8s%12.12s%12.12s%12.12s%17.17s\n$fl\n",
<         "Symbol", "Shares", "FX", "  Type", "  Owner", "    Cost", "    Date";
<     while (my @row_ary = $sth->fetchrow_array) {
<       my ($stock, $nb, $fx, $type, $owner, $cost, $date) = @row_ary;
<       printf "%-10.10s%8d%8s%12s%12s%12.2f%17s\n",
<        $stock, $nb, $fx, $type, $owner, $cost, $date;
<     }
<     print "$tl\n";
---
>   my $rows = $sth->execute() or die("Failed to retrive portfolio info");
>   # print the results
>   print "$tl\n\t\t\tPortfolio listing\n$fl\n";
>   printf "%-10.10s%8.8s%8.8s%12.12s%12.12s%12.12s%17.17s\n$fl\n",
>       "Symbol", "Shares", "FX", "  Type", "  Owner", "    Cost", "    Date";
>   while (my @row_ary = $sth->fetchrow_array) {
>     my ($stock, $nb, $fx, $type, $owner, $cost, $date) = @row_ary;
>     printf "%-10.10s%8d%8s%12s%12s%12.2f%17s\n",
>      $stock, $nb, $fx, $type, $owner, $cost, $date;
635a633
>   print "$tl\n";
658c656
<     $stmt = $stmt . qq{where p.date > '1970-01-01' };
---
>     $stmt = $stmt . qq{where p.date > '19700101' };
672c670
<   my $rows = $sth->execute;
---
>   my $rows = $sth->execute() or die("Failed to retrive portfolio info");
674,692c672,684
<   if ( defined($rows) and $rows > 0 ) {
<     # print the results
<     print "$tl\n\t\t\t\tPortfolio listing\n$fl\n";
<     printf "%-7.7s%7.7s%5.5s%8.8s%8.8s%8.8s%12.12s%8.8s%11s\n$fl\n",
<         "Symbol", "Shares", "FX", "  Type", "  Owner", "    Cost", "    Date",
<       " Price", " Net";
<     my $sum = 0;
<     while (my @row_ary = $sth->fetchrow_array) {
<       my ($fxthen,$fxnow) = (1.0,1.0);
<       my ($stock, $nb, $fx, $type, $owner, $cost, $pfdate, $name) = @row_ary;
<       if ($fx ne $Config{currency}) {
<       $fxthen = GetFXDatum($dbh, $pfdate, $fx);
<       $fxnow = GetFXDatum($dbh, $date, $fx);
<       print "Running SQL for $pfdate and $fx: $fxthen -> $fxnow\n" if 
$Config{debug};
<       }
<       my $pnl = $nb * ($prices->{$name}*$fxnow - $cost*$fxthen);
<       printf "%-7.7s%7d%5s%8s%8s%8.2f%12s%8.2f%11.2f\n",
<        $stock, $nb, $fx, $type, $owner, $cost, $pfdate, $prices->{$name}, 
$pnl;
<       $sum = $sum + $pnl;
---
>   # print the results
>   print "$tl\n\t\t\t\tPortfolio listing\n$fl\n";
>   printf "%-7.7s%7.7s%5.5s%8.8s%8.8s%10.10s%12.12s%10.10s%11s\n$fl\n",
>       "Symbol", "Shares", "FX", "  Type", "  Owner", "    Cost", "    Date",
>   " Price", " Net";
>   my $sum = 0;
>   while (my @row_ary = $sth->fetchrow_array) {
>     my ($fxthen,$fxnow) = (1.0,1.0);
>     my ($stock, $nb, $fx, $type, $owner, $cost, $pfdate, $name) = @row_ary;
>     if ($fx ne $Config{currency}) {
>   $fxthen = GetFXDatum($dbh, $pfdate, $fx);
>   $fxnow = GetFXDatum($dbh, $date, $fx);
>   print "Running SQL for $pfdate and $fx: $fxthen -> $fxnow\n" if 
> $Config{debug};
694c686,689
<     printf "$fl\nTotal profit or loss\t\t\t\t\t%18.2f\n$tl\n", $sum;
---
>     my $pnl = $nb * ($prices->{$name}*$fxnow - $cost*$fxthen);
>     printf "%-7.7s%7d%5s%8s%8s%10.2f%12s%10.2f%11.2f\n",
>      $stock, $nb, $fx, $type, $owner, $cost, $pfdate, $prices->{$name}, $pnl;
>     $sum = $sum + $pnl;
695a691
>   printf "$fl\nTotal profit or loss\t\t\t\t\t%22.2f\n$tl\n", $sum;

--- End Message ---
--- Begin Message ---
Version: 0.8.11.1+rm

Dear submitter,

as the package beancounter has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/1036137

The version of this package that was in Debian prior to this removal
can still be found using https://snapshot.debian.org/.

Please note that the changes have been done on the master archive and
will not propagate to any mirrors until the next dinstall run at the
earliest.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
[email protected].

Debian distribution maintenance software
pp.
Scott Kitterman (the ftpmaster behind the curtain)

--- End Message ---

Reply via email to