From fc9c24c6f93998bea34968b5c641a464da7f2807 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 29 Dec 2009 15:19:45 +0100 Subject: [PATCH] Ticket #1920: Issues with deba and debd VFS Currently, deba and debd VFS contains fake directories a-la "14:21 DEBIAN", "14:21 CONTENTS". Items from DEBIAN directory (conffiles, md5sums, ...) not accessible. The patch fixes this issues. Thanks to Serhiy Storchaka for the patch. --- vfs/extfs/deba.in | 2 +- vfs/extfs/debd.in | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vfs/extfs/deba.in b/vfs/extfs/deba.in index 451718fd9..3d1a55247 100644 --- a/vfs/extfs/deba.in +++ b/vfs/extfs/deba.in @@ -16,7 +16,7 @@ sub list { my($qarchive)=@_; $qarchive = quote($qarchive); - chop($date=`LC_ALL=C date "+%b %d %Y %H:%M"`); + chop($date=`LC_ALL=C date "+%m-%d-%Y %H:%M"`); chop($info_size=`apt-cache show $qarchive | wc -c`); $install_size=length($pressinstall); $upgrade_size=length($pressupgrade); diff --git a/vfs/extfs/debd.in b/vfs/extfs/debd.in index d06be1f45..c39554171 100644 --- a/vfs/extfs/debd.in +++ b/vfs/extfs/debd.in @@ -109,7 +109,7 @@ sub list { my($archive)=@_; my $qarchive = quote($archive); - chop($date=`LC_ALL=C date "+%b %d %Y %H:%M"`); + chop($date=`LC_ALL=C date "+%m-%d-%Y %H:%M"`); chop($info_size=`dpkg -s $qarchive | wc -c`); $repack_size=length($pressrepack); $reinstall_size=length($pressreinstall); @@ -183,7 +183,7 @@ sub copyout system("chmod a+x $qdestfile"); } } elsif($filename =~ /^DEBIAN/) { - $filename=~s!^DEBIAN/!!; + $qfilename=~s!^DEBIAN/!!; system("cat /var/lib/dpkg/info/$qarchive.$qfilename > $qdestfile"); } elsif($filename eq "DPKG-REMOVE" || $filename eq "APT-REMOVE") { if ( open(FILEOUT,">$destfile") ) { @@ -251,7 +251,7 @@ sub run } elsif($filename eq "DPKG-RECONFIGURE") { system("dpkg-reconfigure $qarchive"); } elsif($filename=~/^DEBIAN/) { - $filename=~s!^DEBIAN!!; + $qfilename=~s!^DEBIAN!!; system("/var/lib/dpkg/info/$qarchive.$qfilename"); } else { $qfilename=~s!^CONTENTS!!;